...
This commit is contained in:
@@ -252,7 +252,7 @@ namespace Back.Controllers
|
||||
// مجموع سایر مالیات، عوارض و وجوه قانونی
|
||||
Todam = result.todam ?? null,
|
||||
//صورتحساب مجموع
|
||||
Tbill = result.tbill ?? null,
|
||||
Tbill =-10 /* result.tbill ?? null*/,
|
||||
//مجموع وزن خالض
|
||||
Tonw = level == 10 ? result.tonw : null,
|
||||
//مجموع ارزش ریالی
|
||||
|
@@ -22,26 +22,13 @@ namespace Back.Services
|
||||
}
|
||||
public string GenerateTaxid(string FactorNo, string InvoiceDate)
|
||||
{
|
||||
return "testTaxid";
|
||||
//return "testTaxid";
|
||||
return TaxApiService.Instance.TaxIdGenerator.GenerateTaxId(_UniqueMemory,
|
||||
Convert.ToInt64(FactorNo), InvoiceDate.ToMiladi());
|
||||
}
|
||||
public async Task<InquiryResultModel> GetResultByUid(int CompanyID, string uid)
|
||||
{
|
||||
//return new InquiryResultModel("18084a18-1eb4-41cd-8bd3-2cad73c45398", "0a4a4ab2-8047-4c31-b765-456ddf0e9c53", "SUCCESS",
|
||||
// new DataInSendTaxDto()
|
||||
// {
|
||||
// error=new List<MessageInSendTaxDto>()
|
||||
// {
|
||||
// new MessageInSendTaxDto()
|
||||
// {
|
||||
// code="21001",message="یک خطای تست"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// , "receive_invoice_confirm", "A2FFKZ");
|
||||
if (!await login(CompanyID))
|
||||
return null;
|
||||
|
||||
var uidAndFiscalId = new UidAndFiscalId(uid, _UniqueMemory);
|
||||
var inquiryResultModels = TaxApiService.Instance.TaxApis.InquiryByUidAndFiscalId(new() { uidAndFiscalId });
|
||||
if (inquiryResultModels.Count > 0)
|
||||
@@ -50,14 +37,6 @@ namespace Back.Services
|
||||
}
|
||||
public async Task<TaxCollectData.Library.Dto.HttpResponse<AsyncResponseModel>> SendInvoice(int CompanyID,InvoiceHeaderDto header, List<InvoiceBodyDto> InvoiceBody, List<PaymentDto> payments)
|
||||
{
|
||||
//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>()
|
||||
{
|
||||
new()
|
||||
@@ -74,7 +53,7 @@ namespace Back.Services
|
||||
//-------------------internal
|
||||
public async Task<bool> login(int CompanyID)
|
||||
{
|
||||
return true;
|
||||
|
||||
try
|
||||
{
|
||||
#region TokenTax
|
||||
@@ -88,7 +67,7 @@ namespace Back.Services
|
||||
_PrivateKey = resquth.PrivateKey;
|
||||
TaxApiService.Instance.Init(_UniqueMemory,
|
||||
new SignatoryConfig(_PrivateKey, null),
|
||||
new NormalProperties(ClientType.SELF_TSP), "https://tp.tax.gov.ir/req/api/");
|
||||
new NormalProperties(ClientType.SELF_TSP), /*"https://tp.tax.gov.ir/req/api/"*/ "https://sandboxrc.tax.gov.ir/req/api/");
|
||||
await TaxApiService.Instance.TaxApis.GetServerInformationAsync();
|
||||
}
|
||||
#endregion
|
||||
|
@@ -331,7 +331,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-5">
|
||||
<br />
|
||||
@if (!invoice.IsDeleted)
|
||||
{
|
||||
@@ -392,7 +392,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-1">
|
||||
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -153,6 +153,7 @@
|
||||
var ingriddata= request.list.Where(w => w.ID == ID).First();
|
||||
ingriddata.SentStatus = requestsendTax.SentStatus;
|
||||
ingriddata.msgSentStatus = requestsendTax.msgSentStatus;
|
||||
SpinnerVisible = false;
|
||||
//-----------------
|
||||
var parameters = new Dictionary<string, object>();
|
||||
parameters.Add("inData", requestsendTax);
|
||||
@@ -160,9 +161,10 @@
|
||||
}
|
||||
else{
|
||||
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
||||
SpinnerVisible = false;
|
||||
ShowDangerAlert(request[0]);
|
||||
}
|
||||
SpinnerVisible = false;
|
||||
|
||||
}
|
||||
public async Task Load(int pi)
|
||||
{
|
||||
|
@@ -305,8 +305,8 @@ else
|
||||
<div class="col-md-12">
|
||||
<div class="mb-2">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-auto">
|
||||
<div class="col-md-6">
|
||||
|
||||
@if (FullInvoice)
|
||||
{
|
||||
<Button Disabled="SpinnerVisible" Color="ButtonColor.Primary" @onclick="Send">ثبت تغییرات</Button>
|
||||
@@ -316,7 +316,11 @@ else
|
||||
<Button Disabled="SpinnerVisible" Color="ButtonColor.Primary" @onclick="Send">آماده سازی و ارسال</Button>
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -374,12 +378,7 @@ else
|
||||
public async Task Send()
|
||||
{
|
||||
SpinnerVisible = true;
|
||||
if (!FullInvoice && !await CheckAuth())
|
||||
{
|
||||
ShowMessage(ToastType.Danger, "خطا در احراز هویت سازمان مالیاتی");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
string route = "PreparationInvoiceBeforeSending";
|
||||
if (FullInvoice)
|
||||
route = "UpdateInvoice";
|
||||
@@ -428,7 +427,7 @@ else
|
||||
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
||||
ShowMessage(ToastType.Danger, request[0]);
|
||||
}
|
||||
}
|
||||
|
||||
SpinnerVisible = false;
|
||||
}
|
||||
public async Task<bool> CheckAuth()
|
||||
|
@@ -33,13 +33,13 @@ builder.Services.AddScoped(sp => new UserAuthenticationDTO()
|
||||
}) ;
|
||||
|
||||
// Server
|
||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") });
|
||||
//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("http://localhost:5271/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