...
This commit is contained in:
@@ -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.
|
||||
|
@@ -332,7 +332,7 @@
|
||||
حذف
|
||||
</Button>
|
||||
<Button class="mt-3" Color="ButtonColor.Primary" @onclick="ShowReport" Type="ButtonType.Button">
|
||||
چاپ
|
||||
pdf
|
||||
</Button>
|
||||
|
||||
}
|
||||
@@ -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<string>();
|
||||
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);
|
||||
}
|
||||
</script>
|
||||
}
|
@@ -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/") });
|
||||
|
Reference in New Issue
Block a user