...
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Service">
|
||||
<HintPath>..\..\..\LocalGit\TaxPayerTools\Service\bin\Debug\Service.dll</HintPath>
|
||||
<HintPath>..\..\Dlls\Service.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
|
@@ -95,7 +95,8 @@ namespace Back.Controllers
|
||||
LastChangeUserID = Convert.ToInt32(UserID),
|
||||
BillReference = null,
|
||||
IsDeleted = false,
|
||||
PatternID = item.PatternID
|
||||
PatternID = item.PatternID,
|
||||
setm=1
|
||||
}));
|
||||
|
||||
|
||||
@@ -249,6 +250,7 @@ namespace Back.Controllers
|
||||
BillReference = Invoice.ID,
|
||||
IsDeleted = false,
|
||||
PatternID = Invoice.PatternID,
|
||||
setm=Invoice.setm,
|
||||
invoiceDetails=Invoice.invoiceDetails.Select(s=>new InvoiceItem
|
||||
{
|
||||
CODID=s.CODID,
|
||||
@@ -277,6 +279,7 @@ namespace Back.Controllers
|
||||
BillReference = Invoice.ID,
|
||||
IsDeleted = false,
|
||||
PatternID = Invoice.PatternID,
|
||||
setm = Invoice.setm,
|
||||
invoiceDetails = Invoice.invoiceDetails.Select(s => new InvoiceItem
|
||||
{
|
||||
CODID = s.CODID,
|
||||
@@ -361,7 +364,8 @@ namespace Back.Controllers
|
||||
BillReference = Invoice.ID,
|
||||
IsDeleted = false,
|
||||
PatternID = Invoice.PatternID,
|
||||
invoiceDetails=Invoice.invoiceDetails.Select(s => new InvoiceItem
|
||||
setm = Invoice.setm,
|
||||
invoiceDetails =Invoice.invoiceDetails.Select(s => new InvoiceItem
|
||||
{
|
||||
CODID = s.CODID,
|
||||
am = s.am,
|
||||
|
@@ -90,7 +90,7 @@ namespace Back.Data.Models
|
||||
public string? sbc { get { return company?.BranchID; } }
|
||||
//مبلغ پرداختی نقدی
|
||||
[MaxLength(18)]
|
||||
public decimal? cap { get { return insp - tvam - todam - tbill; } }
|
||||
public decimal? cap { get { return tbill- insp- tvam- todam; } }
|
||||
//موضوع صورتحساب
|
||||
[MaxLength(1)]
|
||||
public int? ins { get { return (int)invoiceType; } }
|
||||
@@ -131,11 +131,16 @@ namespace Back.Data.Models
|
||||
//روش تسویه
|
||||
private int? _setm;
|
||||
[MaxLength(1)]
|
||||
public int? setm { get { return pattern.BillTypeID == 3 || pattern.BillTypeID == 4 || pattern.inp==8
|
||||
public int? setm
|
||||
{
|
||||
get
|
||||
{
|
||||
return pattern.BillTypeID == 3 || pattern.BillTypeID == 4 || pattern.inp == 8
|
||||
? 1
|
||||
:_setm; }
|
||||
: _setm;
|
||||
}
|
||||
set { _setm = value; }
|
||||
}
|
||||
}
|
||||
//مبلغ نسیه
|
||||
[MaxLength(18)]
|
||||
public decimal? insp { get; set; } = 0;
|
||||
|
@@ -95,7 +95,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());
|
||||
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.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;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ namespace Back.Services
|
||||
foreach (_TaxPayer.Fild item in body)
|
||||
{
|
||||
var resval = invoicedetail.GetType().GetProperties().Where(w => w.Name == item.eName).Select(s => s.GetValue(invoicedetail)).FirstOrDefault();
|
||||
item.Value = resval == null ? "" : resval.ToString();
|
||||
item.Value = resval == null ? "" : resval.ToString().Split('.').Length == 2 ? ((decimal)resval).ToString("N0") : 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;
|
||||
}
|
||||
@@ -140,7 +140,7 @@ namespace Back.Services
|
||||
foreach (_TaxPayer.Fild item in pay)
|
||||
{
|
||||
var resval = InvoiceItem.payments.GetType().GetProperties().Where(w => w.Name == item.eName).Select(s => s.GetValue(InvoiceItem.payments)).FirstOrDefault();
|
||||
item.Value = resval == null ? "" : resval.ToString();
|
||||
item.Value = resval == null ? "" : resval.ToString().Split('.').Length == 2 ? ((decimal)resval).ToString("N0") : 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;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ namespace Back.Services
|
||||
}
|
||||
private void SetValue<T>(_TaxPayer.Fild fild, ref T obj)
|
||||
{
|
||||
var resvaltype = obj.GetType().GetProperties().Where(w => w.Name == (fild.eName=="tax17" ? "seventeentax" : fild.eName)).FirstOrDefault();
|
||||
var resvaltype = obj.GetType().GetProperties().Where(w => w.Name == fild.eName).FirstOrDefault();
|
||||
//if (resvaltype != null)
|
||||
//{
|
||||
if ((resvaltype.GetValue(obj) == null && !string.IsNullOrEmpty(fild.Value))
|
||||
|
Reference in New Issue
Block a user