...
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Back.Data.Models
|
||||
[MaxLength(18)]
|
||||
public decimal? cfee { get { return
|
||||
invoice?.pattern?.inp == 2 ? _cfee
|
||||
: invoice?.pattern?.inp == 1 && exr != null && exr != 0 ? fee / exr
|
||||
: invoice?.pattern?.inp == 1 && exr != null && exr != 0 ? Math.Floor(fee.Value / exr.Value)
|
||||
: null ; } }
|
||||
//مبلغ مالیات بر ارزش افزوده
|
||||
[MaxLength(18)]
|
||||
|
@@ -138,7 +138,7 @@ namespace Back.Services
|
||||
var body = await invok.Where(w => w.Fild.Title == "B").Select(s => new _TaxPayer.Fild()
|
||||
{
|
||||
FildID = s.FildID,
|
||||
eName = s.Fild.Name == "cfee" ? "_cfee" : s.Fild.Name,
|
||||
eName = s.Fild.Name,
|
||||
fName = s.Fild.Type,
|
||||
ModeID = s.FildModeID,
|
||||
ModeTitle = s.FildMode.Title,
|
||||
@@ -153,10 +153,34 @@ namespace Back.Services
|
||||
{
|
||||
|
||||
var resval = invoicedetail.GetType().GetProperties().Where(w => w.Name == item.eName).Select(s => s.GetValue(invoicedetail)).FirstOrDefault();
|
||||
item.Value = resval == null ? "" : resval.ToString().Split('.').Length == 2 ? ((decimal)resval).ToString("N0") : resval.ToString();
|
||||
|
||||
|
||||
if (resval == null)
|
||||
{
|
||||
item.Value = "";
|
||||
}
|
||||
else if (resval.ToString().Split('.').Length == 2 )
|
||||
{
|
||||
if (item.eName == "cfee")
|
||||
{
|
||||
}
|
||||
try
|
||||
{
|
||||
item.Value = ((decimal)resval).ToString("N0");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
item.Value = resval.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
else { item.Value = resval.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*/;
|
||||
|
||||
if (item.eName == "cfee") item.eName = "_cfee";
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user