diff --git a/Back/Controllers/InvoiceController.cs b/Back/Controllers/InvoiceController.cs
index bc54797..7d8d066 100644
--- a/Back/Controllers/InvoiceController.cs
+++ b/Back/Controllers/InvoiceController.cs
@@ -452,7 +452,7 @@ namespace Back.Controllers
var CompanyID= user?.RolUsers.First().CompanyID;
- if (await _servInvoice.ExistInvoiceByInvoiceID(CompanyID.Value, InvoiceID))
+ if (!await _servInvoice.ExistInvoiceByInvoiceID(CompanyID.Value, InvoiceID))
return NotFound();
// Start the child process.
diff --git a/TaxPayerFull/Pages/UserPanel/InvoiceItem.razor b/TaxPayerFull/Pages/UserPanel/InvoiceItem.razor
index dcdb894..f564fa0 100644
--- a/TaxPayerFull/Pages/UserPanel/InvoiceItem.razor
+++ b/TaxPayerFull/Pages/UserPanel/InvoiceItem.razor
@@ -332,7 +332,7 @@
حذف
}
@@ -476,19 +476,20 @@
}
private async Task ShowReport()
{
+ PreloadService.Show(SpinnerColor.Dark);
var rsp = await hc.Get($"Invoice/GetReport/{InvoiceID}");
if (rsp.IsSuccessStatusCode)
{
- var str = await rsp.Content.ReadFromJsonAsync();
+ var str = await rsp.Content.ReadAsStringAsync();
if (string.IsNullOrEmpty(str))
- ShowDangerAlert("خطایی در ساخت فاکتور");
+ ShowDangerAlert("مشکلی در ساخت فایل رخ داده لطفا مجدد تلاش کنید");
else
- await DownloadFileFromStream(str, $"{InvoiceID}.pdf");
+ await DownloadFileFromStream(str, $"{invoice.ID}.pdf");
}
else
- {
- ShowDangerAlert("خطایی در ساخت فاکتور");
- }
+ ShowDangerAlert("خطایی در چاپ فاکتور");
+
+ PreloadService.Hide();
}
private async Task LoadData()
{
@@ -779,4 +780,3 @@
URL.revokeObjectURL(url);
}
-}
\ No newline at end of file
diff --git a/TaxPayerFull/Program.cs b/TaxPayerFull/Program.cs
index b08b0de..ea0270a 100644
--- a/TaxPayerFull/Program.cs
+++ b/TaxPayerFull/Program.cs
@@ -34,10 +34,10 @@ 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("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/") });