...
This commit is contained in:
@@ -274,8 +274,8 @@ namespace Back.Controllers
|
|||||||
invoiceType = InvoiceType.Repair,
|
invoiceType = InvoiceType.Repair,
|
||||||
CustomerID = Invoice.CustomerID,
|
CustomerID = Invoice.CustomerID,
|
||||||
CompanyID = Invoice.CompanyID,
|
CompanyID = Invoice.CompanyID,
|
||||||
InvoicIssueDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
InvoicIssueDate = DateTime.Now.ConvertMiladiToShamsi(),
|
||||||
InvoiceDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
InvoiceDate = DateTime.Now.ConvertMiladiToShamsi(),
|
||||||
LastChangeUserID = Convert.ToInt32(UserID),
|
LastChangeUserID = Convert.ToInt32(UserID),
|
||||||
BillReference = Invoice.ID,
|
BillReference = Invoice.ID,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
@@ -341,8 +341,8 @@ namespace Back.Controllers
|
|||||||
invoiceType = InvoiceType.BackFrmSale,
|
invoiceType = InvoiceType.BackFrmSale,
|
||||||
CustomerID = Invoice.CustomerID,
|
CustomerID = Invoice.CustomerID,
|
||||||
CompanyID = Invoice.CompanyID,
|
CompanyID = Invoice.CompanyID,
|
||||||
InvoicIssueDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
InvoicIssueDate = DateTime.Now.ConvertMiladiToShamsi(),
|
||||||
InvoiceDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
InvoiceDate = DateTime.Now.ConvertMiladiToShamsi(),
|
||||||
LastChangeUserID = Convert.ToInt32(UserID),
|
LastChangeUserID = Convert.ToInt32(UserID),
|
||||||
BillReference = Invoice.ID,
|
BillReference = Invoice.ID,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
@@ -420,8 +420,8 @@ namespace Back.Controllers
|
|||||||
invoiceType = InvoiceType.BackFrmSale,
|
invoiceType = InvoiceType.BackFrmSale,
|
||||||
CustomerID = Invoice.CustomerID,
|
CustomerID = Invoice.CustomerID,
|
||||||
CompanyID = Invoice.CompanyID,
|
CompanyID = Invoice.CompanyID,
|
||||||
InvoicIssueDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
InvoicIssueDate = DateTime.Now.ConvertMiladiToShamsi(),
|
||||||
InvoiceDate = Invoice.InvoicIssueDate.Replace("/", ""),
|
InvoiceDate = DateTime.Now.ConvertMiladiToShamsi(),
|
||||||
LastChangeUserID = Convert.ToInt32(UserID),
|
LastChangeUserID = Convert.ToInt32(UserID),
|
||||||
BillReference = Invoice.ID,
|
BillReference = Invoice.ID,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
@@ -129,6 +129,15 @@ namespace Back.Controllers
|
|||||||
return BadRequest(new List<string> { "در صورتحساب برگشت از فروش نمیتوان مبلغ واحد را تغییر داد" });
|
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)
|
if (invoice.invoiceType==InvoiceType.BackFrmSale && invoiceitem.am < model.item.am)
|
||||||
return BadRequest(new List<string> { "در صورتحساب برگشت از فروش تعداد آیتم فقط میتواند کاهشی باشد" });
|
return BadRequest(new List<string> { "در صورتحساب برگشت از فروش تعداد آیتم فقط میتواند کاهشی باشد" });
|
||||||
|
@@ -184,6 +184,11 @@ namespace Back.Controllers
|
|||||||
&& !await _servTaxPayer.ExistSuccessfulorSendorpendingInvoice(result.invoice))
|
&& !await _servTaxPayer.ExistSuccessfulorSendorpendingInvoice(result.invoice))
|
||||||
return BadRequest(new List<string> { "در وضعیت برگشت از فروش و اصلاحی باید صورتحساب مرجع به سامانه مودیان ارسال شده باشد" });
|
return BadRequest(new List<string> { "در وضعیت برگشت از فروش و اصلاحی باید صورتحساب مرجع به سامانه مودیان ارسال شده باشد" });
|
||||||
|
|
||||||
|
if (result.invoiceType == InvoiceType.Cancellation && string.IsNullOrEmpty(result.taxid))
|
||||||
|
{
|
||||||
|
return BadRequest(new List<string> { "صورتحساب در وضعیت ابطالی باید صورتحساب مرجع آن به سامانه مودیان ارسال شده باشد" });
|
||||||
|
|
||||||
|
}
|
||||||
#region Inital Send
|
#region Inital Send
|
||||||
InvoiceHeaderDto header = new InvoiceHeaderDto();
|
InvoiceHeaderDto header = new InvoiceHeaderDto();
|
||||||
PreparationHeaderTaxInvoice preparation = new PreparationHeaderTaxInvoice(result, _actionTaxPayer);
|
PreparationHeaderTaxInvoice preparation = new PreparationHeaderTaxInvoice(result, _actionTaxPayer);
|
||||||
|
Reference in New Issue
Block a user