This commit is contained in:
mmrbnjd
2024-07-22 22:29:28 +03:30
parent f88a935418
commit 87aee3685b
8 changed files with 64 additions and 15 deletions

View File

@@ -312,8 +312,11 @@ else
}
else
{
var rsp = await hc.Post<_TaxPayer.Atemplatefield>($"TaxPayer/PreparationInvoiceBeforeSending", invoice);
string route = "PreparationInvoiceBeforeSending";
if (FullInvoice)
route = "UpdateInvoice";
var rsp = await hc.Post<_TaxPayer.Atemplatefield>($"TaxPayer/{route}", invoice);
if (rsp.IsSuccessStatusCode)
{
var response = await rsp.Content.ReadFromJsonAsync<bool>();
@@ -322,7 +325,7 @@ else
if (FullInvoice)
ShowMessage(ToastType.Success, "تغییرات با موفقیت انجام شد");
if (!FullInvoice)
else
{
ShowMessage(ToastType.Light, "در حال ارسال صورتحساب");
rsp = await hc.Get($"TaxPayer/SendInvoice/{InvoiceID}");
@@ -349,9 +352,6 @@ else
}
else
{
if (FullInvoice)
ShowMessage(ToastType.Danger, "خطای در ذخیره سازی اطلاعات رخ داده");
else
ShowMessage(ToastType.Danger, "خطای در آماده سازی اطلاعات رخ داده");
}
}

View File

@@ -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");