This commit is contained in:
mmrbnjd
2024-12-13 16:04:57 +03:30
parent 90f57ece26
commit 8c06064476
4 changed files with 21 additions and 7 deletions

View File

@@ -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);