...
This commit is contained in:
@@ -274,8 +274,8 @@ namespace Back.Controllers
|
||||
invoiceType = InvoiceType.Repair,
|
||||
CustomerID = Invoice.CustomerID,
|
||||
CompanyID = Invoice.CompanyID,
|
||||
InvoicIssueDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
||||
InvoiceDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
||||
InvoicIssueDate = DateTime.Now.ConvertMiladiToShamsi(),
|
||||
InvoiceDate = DateTime.Now.ConvertMiladiToShamsi(),
|
||||
LastChangeUserID = Convert.ToInt32(UserID),
|
||||
BillReference = Invoice.ID,
|
||||
IsDeleted = false,
|
||||
@@ -341,8 +341,8 @@ namespace Back.Controllers
|
||||
invoiceType = InvoiceType.BackFrmSale,
|
||||
CustomerID = Invoice.CustomerID,
|
||||
CompanyID = Invoice.CompanyID,
|
||||
InvoicIssueDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
||||
InvoiceDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
||||
InvoicIssueDate = DateTime.Now.ConvertMiladiToShamsi(),
|
||||
InvoiceDate = DateTime.Now.ConvertMiladiToShamsi(),
|
||||
LastChangeUserID = Convert.ToInt32(UserID),
|
||||
BillReference = Invoice.ID,
|
||||
IsDeleted = false,
|
||||
@@ -420,8 +420,8 @@ namespace Back.Controllers
|
||||
invoiceType = InvoiceType.BackFrmSale,
|
||||
CustomerID = Invoice.CustomerID,
|
||||
CompanyID = Invoice.CompanyID,
|
||||
InvoicIssueDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
||||
InvoiceDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
||||
InvoicIssueDate = DateTime.Now.ConvertMiladiToShamsi(),
|
||||
InvoiceDate = DateTime.Now.ConvertMiladiToShamsi(),
|
||||
LastChangeUserID = Convert.ToInt32(UserID),
|
||||
BillReference = Invoice.ID,
|
||||
IsDeleted = false,
|
||||
|
@@ -129,6 +129,15 @@ namespace Back.Controllers
|
||||
return BadRequest(new List<string> { "در صورتحساب برگشت از فروش نمیتوان مبلغ واحد را تغییر داد" });
|
||||
}
|
||||
|
||||
if (invoice.invoiceType == InvoiceType.Repair && invoiceitem.dis != model.item.dis)
|
||||
{
|
||||
return BadRequest(new List<string> { "در صورتحساب اصلاحی نمیتوان مبلغ تخفیف را تغییر داد" });
|
||||
}
|
||||
if (invoice.invoiceType == InvoiceType.BackFrmSale && invoiceitem.dis != model.item.dis)
|
||||
{
|
||||
return BadRequest(new List<string> { "در صورتحساب برگشت از فروش نمیتوان مبلغ تخفیف را تغییر داد" });
|
||||
}
|
||||
|
||||
|
||||
if (invoice.invoiceType==InvoiceType.BackFrmSale && invoiceitem.am < model.item.am)
|
||||
return BadRequest(new List<string> { "در صورتحساب برگشت از فروش تعداد آیتم فقط میتواند کاهشی باشد" });
|
||||
|
@@ -184,6 +184,11 @@ namespace Back.Controllers
|
||||
&& !await _servTaxPayer.ExistSuccessfulorSendorpendingInvoice(result.invoice))
|
||||
return BadRequest(new List<string> { "در وضعیت برگشت از فروش و اصلاحی باید صورتحساب مرجع به سامانه مودیان ارسال شده باشد" });
|
||||
|
||||
if (result.invoiceType == InvoiceType.Cancellation && string.IsNullOrEmpty(result.taxid))
|
||||
{
|
||||
return BadRequest(new List<string> { "صورتحساب در وضعیت ابطالی باید صورتحساب مرجع آن به سامانه مودیان ارسال شده باشد" });
|
||||
|
||||
}
|
||||
#region Inital Send
|
||||
InvoiceHeaderDto header = new InvoiceHeaderDto();
|
||||
PreparationHeaderTaxInvoice preparation = new PreparationHeaderTaxInvoice(result, _actionTaxPayer);
|
||||
|
@@ -36,7 +36,7 @@ namespace Back.Data.Models
|
||||
public string? tins { get { return company?.EconomicCode; } }
|
||||
//شماره اقتصادی خریدار
|
||||
[MaxLength(14)]
|
||||
public string? tinb { get { return Customer.CustomerType==CustomerType.WithoutIdentity ?null : Customer.EconomicCode; } }
|
||||
public string? tinb { get { return Customer.CustomerType==CustomerType.WithoutIdentity ? null : Customer.EconomicCode; } }
|
||||
//مجموع مبلغ قبل از کسر تخفیف
|
||||
[MaxLength(18)]
|
||||
public decimal? tprdis { get { return invoiceDetails.Sum(i => i.prdis); } }
|
||||
|
Reference in New Issue
Block a user