...
This commit is contained in:
@@ -46,7 +46,7 @@ namespace Back.Controllers
|
||||
|
||||
else
|
||||
{
|
||||
if (!result.PatternID.HasValue || result.PatternID==0)
|
||||
if (!result.PatternID.HasValue || result.PatternID == 0)
|
||||
return BadRequest(new List<string> { "ابتدا برای این صورتحساب الگو در نظر بگیرید" });
|
||||
|
||||
if (result.invoiceType == InvoiceType.Bidding)
|
||||
@@ -435,6 +435,8 @@ namespace Back.Controllers
|
||||
{
|
||||
foreach (var item in responseModel.Body.Result)
|
||||
{
|
||||
//ta imja
|
||||
|
||||
var ressenttax = new SentTax
|
||||
{
|
||||
InvoiceID = result.ID,
|
||||
@@ -444,7 +446,8 @@ namespace Back.Controllers
|
||||
ReferenceNumber = item.ReferenceNumber,
|
||||
uId = item.Uid,
|
||||
SentStatus = SentStatus.Send,
|
||||
InvoiceModel = JsonConvert.SerializeObject(result),
|
||||
InvoiceModel = JsonConvert.SerializeObject(result, Formatting.Indented,new JsonSerializerSettings
|
||||
{ PreserveReferencesHandling = PreserveReferencesHandling.Objects }),
|
||||
ResponseModel = JsonConvert.SerializeObject(responseModel)
|
||||
};
|
||||
await _servTaxPayer.AddSentTax(ressenttax);
|
||||
@@ -495,7 +498,7 @@ namespace Back.Controllers
|
||||
return BadRequest(new List<string> { "خطا در احراز هویت سازمان مالیاتی" });
|
||||
|
||||
DataInSendTaxDto desData = new DataInSendTaxDto();
|
||||
if (item.SentStatus==SentStatus.Send
|
||||
if (item.SentStatus == SentStatus.Send
|
||||
|| item.SentStatus == SentStatus.pending
|
||||
|| item.SentStatus == SentStatus.IN_PROGRESS)
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
using Back.Common;
|
||||
using Shared.DTOs;
|
||||
namespace Back.Data.Models
|
||||
@@ -72,7 +73,7 @@ namespace Back.Data.Models
|
||||
//اریخ کوتاژ اظهارنامه گمرکی
|
||||
// Unix Time => from fild CottageDateOfCustomsDeclaration
|
||||
[MaxLength(5)]
|
||||
public long? cdcd { get { return new DateTimeOffset(CottageDateOfCustomsDeclaration.Trim().ToMiladi()).ToUnixTimeMilliseconds(); } }
|
||||
public long? cdcd { get { return string.IsNullOrEmpty(CottageDateOfCustomsDeclaration) ? null : new DateTimeOffset(CottageDateOfCustomsDeclaration.Trim().ToMiladi()).ToUnixTimeMilliseconds(); } }
|
||||
//کد پستی خریدار
|
||||
[MaxLength(10)]
|
||||
public string? bpc { get { return Customer.ZipCode; } }
|
||||
@@ -175,6 +176,7 @@ namespace Back.Data.Models
|
||||
[ForeignKey("PatternID")]
|
||||
public virtual Pattern? pattern { get; set; }
|
||||
[ForeignKey("CompanyID")]
|
||||
[JsonIgnore]
|
||||
public virtual Company? company { get; set; }
|
||||
#endregion
|
||||
}
|
||||
|
@@ -21,6 +21,7 @@ namespace Back.Services
|
||||
}
|
||||
public string GenerateTaxid(string FactorNo, string InvoiceDate)
|
||||
{
|
||||
return "testTaxid";
|
||||
return TaxApiService.Instance.TaxIdGenerator.GenerateTaxId(_UniqueMemory,
|
||||
Convert.ToInt64(FactorNo), InvoiceDate.ToMiladi());
|
||||
}
|
||||
@@ -36,8 +37,12 @@ namespace Back.Services
|
||||
}
|
||||
public async Task<TaxCollectData.Library.Dto.HttpResponse<AsyncResponseModel>> SendInvoice(int CompanyID,InvoiceHeaderDto header, List<InvoiceBodyDto> InvoiceBody, PaymentDto payment)
|
||||
{
|
||||
var stringtest = "{\"ReferenceNumber\":\"18084a18-1eb4-41cd-8bd3-2cad73c45398\",\"Uid\":\"0a4a4ab2-8047-4c31-b765-456ddf0e9c53\",\"Status\":\"SUCCESS\",\"Data\":{\"ValueKind\":1},\"PacketType\":\"receive_invoice_confirm\",\"FiscalId\":\"A2FFKZ\"}";
|
||||
return JsonConvert.DeserializeObject<TaxCollectData.Library.Dto.HttpResponse<AsyncResponseModel>>(stringtest);
|
||||
return new TaxCollectData.Library.Dto.HttpResponse<AsyncResponseModel>
|
||||
( body: new AsyncResponseModel(
|
||||
1702299112
|
||||
,new HashSet<PacketResponse>(new List<PacketResponse> { new PacketResponse("5d0c7198-e2fd-4cc1-8802-fe498d6ccf73", "a70444a4-1810-4cea-8bcc-7acb4bc75645", null,null)})
|
||||
,new List<ErrorModel>()), 200);
|
||||
|
||||
if (!await login(CompanyID))
|
||||
return null;
|
||||
return await TaxApiService.Instance.TaxApis.SendInvoicesAsync(new List<InvoiceDto>()
|
||||
|
@@ -340,12 +340,12 @@
|
||||
<Button class="mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
|
||||
حذف
|
||||
</Button>
|
||||
<Button class="mt-3" Color="ButtonColor.Primary" @onclick="ShowReport" Type="ButtonType.Button">
|
||||
@* <Button class="mt-3" Color="ButtonColor.Primary" @onclick="ShowReport" Type="ButtonType.Button">
|
||||
pdf
|
||||
</Button>
|
||||
<Button class="mt-3" Color="ButtonColor.Info" @onclick="onClickLink" Type="ButtonType.Button">
|
||||
لینک
|
||||
</Button>
|
||||
</Button> *@
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -37,10 +37,10 @@ builder.Services.AddScoped(sp => new UserAuthenticationDTO()
|
||||
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") });
|
||||
|
||||
//Home
|
||||
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") });
|
||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://localhost:7075/api/") });
|
||||
|
||||
//farzan
|
||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
|
||||
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
|
||||
|
||||
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");
|
||||
|
||||
|
Reference in New Issue
Block a user