...
This commit is contained in:
@@ -129,7 +129,21 @@ 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 ? ((decimal)resval).ToString("N0") : resval.ToString());
|
||||
|
||||
if (item.eName == "insp" )
|
||||
// زمانی که صورتحساب فقط نسیه بود مبلغ کل فاکتور در نسیه نشسته شود
|
||||
{
|
||||
if (InvoiceItem.setm == 1) item.Value = "0";
|
||||
|
||||
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.DefVals = item.InputBox == "fromdb" ? _codingRepo.Get(w => w.FildID == item.FildID).Select(ss => new _TaxPayer.Coding() { ID = ss.Code, Name = ss.Title }).ToList() : new List<_TaxPayer.Coding>();
|
||||
item.Des = /*item.ModeID == 3 ?*/ _specialConditionRepo.Get(w => w.FildID == item.FildID).Select(ss => ss.condition).ToArray() /*: null*/;
|
||||
}
|
||||
|
Reference in New Issue
Block a user