This commit is contained in:
mmrbnjd
2024-12-14 14:20:36 +03:30
parent 8c06064476
commit 9d468a4dda
4 changed files with 11 additions and 13 deletions

View File

@@ -130,7 +130,7 @@ namespace Back.Services
foreach (_TaxPayer.Fild item in head)
{
var resval = InvoiceItem.GetType().GetProperties().Where(w => w.Name == item.eName).Select(s => s.GetValue(InvoiceItem)).FirstOrDefault();
item.Value = resval == null ? "" : (item.eName == "InvoicIssueDate" || item.eName == "InvoiceDate" || item.eName == "CottageDateOfCustomsDeclaration" ? resval.ToString().ShamciToFormatShamci() : resval.ToString().Split('.').Length == 2 ? ((decimal)resval).ToString("N0") : resval.ToString());
item.Value = resval == null ? "" : (item.eName == "InvoicIssueDate" || item.eName == "InvoiceDate" || item.eName == "CottageDateOfCustomsDeclaration" ? resval.ToString().ShamciToFormatShamci() : resval.ToString().Split('.').Length == 2 || item.eName == "tvop" || item.eName == "tvam" ? ((decimal)resval).ToString("N0") : resval.ToString());
if (item.eName == "insp" )
// زمانی که صورتحساب فقط نسیه بود مبلغ کل فاکتور در نسیه نشسته شود
@@ -140,7 +140,7 @@ namespace Back.Services
if (InvoiceItem.setm == 2)
{
var rescalcinsp = InvoiceItem.GetType().GetProperties().Where(w => w.Name == "Calcinsp").Select(s => s.GetValue(InvoiceItem)).FirstOrDefault();
item.Value = rescalcinsp == null ? "" : rescalcinsp.ToString().Split('.').Length == 2 ? ((decimal)rescalcinsp).ToString("N0") : rescalcinsp.ToString();
item.Value = rescalcinsp == null ? "" : rescalcinsp.ToString().Split('.').Length == 2 || item.eName == "tvop" || item.eName == "tvam" ? ((decimal)rescalcinsp).ToString("N0") : rescalcinsp.ToString();
}
}
@@ -174,11 +174,9 @@ namespace Back.Services
{
item.Value = "";
}
else if (resval.ToString().Split('.').Length == 2 )
else if (resval.ToString().Split('.').Length == 2 || item.eName == "vam" || item.eName == "cop" || item.eName == "vop")
{
if (item.eName == "cfee")
{
}
try
{
item.Value = ((decimal)resval).ToString("N0");