...
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Service">
|
||||
<HintPath>..\..\..\LocalGit\TaxPayerTools\Service\bin\Debug\Service.dll</HintPath>
|
||||
<HintPath>..\..\Dlls\Service.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
|
@@ -98,10 +98,10 @@ namespace Back.Controllers
|
||||
|
||||
}
|
||||
[HttpPut("Update")]
|
||||
public async Task<ActionResult<int>> Update([FromBody] NUInvoiceDTO item)
|
||||
public async Task<ActionResult<bool>> Update([FromBody] NUInvoiceDTO item)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(item);
|
||||
//if (!ModelState.IsValid)
|
||||
// return BadRequest(item);
|
||||
|
||||
//-----GetUserAndCompany
|
||||
var claim = HttpContext.User.Claims.First(c => c.Type == "UserID");
|
||||
@@ -125,7 +125,7 @@ namespace Back.Controllers
|
||||
if (await _servTaxPayer.ExistSuccessfulorSendorpendingInvoice(invoice))
|
||||
return BadRequest(new List<string> { "این صورتحساب به سازمان ارسال شده"+'\n'+
|
||||
"برای تغییر ،صورتحساب را ابطال/اصلاح یا برگشت بزنید"});
|
||||
else if (invoice.invoiceType != InvoiceType.BackFrmSale)
|
||||
else if (invoice.invoiceType == InvoiceType.BackFrmSale)
|
||||
{
|
||||
return BadRequest(new List<string>
|
||||
{ "صورتحساب در وضعیت برگشت از فروش نمی تواند ویرایش شود" });
|
||||
|
@@ -27,8 +27,7 @@
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label class="col-sm-4 col-form-label" for="inputinvoiceTypeTitle">نوع</label>
|
||||
@if (InvoiceID == 0 || InvoiceID == null ? false : true){
|
||||
<select @bind="invoice.invoiceType" disabled class="form-control" aria-label="Default select example" id="inputinvoiceTypeTitle">
|
||||
<select @bind="invoice.invoiceType" class="form-control" aria-label="Default select example" disabled id="inputinvoiceTypeTitle">
|
||||
@if (!invoice.invoiceType.HasValue)
|
||||
{
|
||||
<option value="0" style="color: #b5b5b5" selected>انتخاب کنید...</option>
|
||||
@@ -54,15 +53,8 @@
|
||||
}
|
||||
|
||||
|
||||
</select>
|
||||
}
|
||||
else
|
||||
{
|
||||
<select @bind="invoice.invoiceType" class="form-control" aria-label="Default select example" disabled id="inputinvoiceTypeTitle">
|
||||
<option value="10" style="color: #b5b5b5" selected>پیشنهاد قیمت</option>
|
||||
|
||||
</select>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-2">
|
||||
@@ -188,7 +180,7 @@
|
||||
</div>
|
||||
<div class="form-group col-md-4">
|
||||
<br />
|
||||
@if (invoice.ID == 0)
|
||||
@if(InvoiceID == 0 || InvoiceID == null)
|
||||
{
|
||||
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickAdd" Type="ButtonType.Button">
|
||||
جدید
|
||||
@@ -249,6 +241,7 @@
|
||||
{
|
||||
invoice = new InvoiceDTO()
|
||||
{
|
||||
invoiceType=InvoiceType.Bidding,
|
||||
ID = 0,
|
||||
InvoiceDate = DateTime.Now.ConvertMiladiToShamsiinFront().ShamciToFormatShamciinFront(),
|
||||
InvoicIssueDate = DateTime.Now.ConvertMiladiToShamsiinFront().ShamciToFormatShamciinFront(),
|
||||
@@ -345,7 +338,7 @@
|
||||
var request = await rsp.Content.ReadFromJsonAsync<bool>();
|
||||
if (request)
|
||||
{
|
||||
ToastService.Notify(new ToastMessage(ToastType.Success, $"عملیات حذف با موفقیت انجام شد"));
|
||||
//ToastService.Notify(new ToastMessage(ToastType.Success, $"عملیات حذف با موفقیت انجام شد"));
|
||||
hc._nav.NavigateTo("Invoice");
|
||||
}
|
||||
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
||||
@@ -371,18 +364,19 @@
|
||||
ID = InvoiceID,
|
||||
CustomerID = invoice.CustomerID,
|
||||
Des = invoice.Des,
|
||||
InvoiceDate = invoice.InvoiceDate,
|
||||
InvoicIssueDate = invoice.InvoicIssueDate,
|
||||
InvoiceDate = invoice.InvoiceDate.Replace("/", ""),
|
||||
InvoicIssueDate = invoice.InvoicIssueDate.Replace("/", ""),
|
||||
PatternID = invoice.PatternID,
|
||||
Title = invoice.Title
|
||||
});
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
var request = await rsp.Content.ReadFromJsonAsync<int>();
|
||||
var request = await rsp.Content.ReadFromJsonAsync<bool>();
|
||||
|
||||
if (request > 0)
|
||||
if (request)
|
||||
{
|
||||
InvoiceID = request;
|
||||
ToastService.Notify(new ToastMessage(ToastType.Success, $"عملیات با موفقیت انجام شد"));
|
||||
|
||||
}
|
||||
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
|
||||
}
|
||||
|
@@ -34,9 +34,9 @@ builder.Services.AddScoped(sp => new UserAuthenticationDTO()
|
||||
}) ;
|
||||
|
||||
|
||||
//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/") });
|
||||
|
||||
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