feat: add OneMonthPrice to institution verification details and update contract pricing logic
This commit is contained in:
@@ -13,6 +13,7 @@ public class GetInstitutionVerificationDetailsViewModel
|
||||
public string ContractStart { get; set; }
|
||||
public string ContractEnd { get; set; }
|
||||
public List<GetInstitutionVerificationDetailsWorkshopsViewModel> Workshops { get; set; }
|
||||
public string OneMonthPrice { get; set; }
|
||||
public string TotalPrice { get; set; }
|
||||
public string TaxPrice { get; set; }
|
||||
public string PaymentPrice { get; set; }
|
||||
|
||||
@@ -5,5 +5,4 @@ public class GetInstitutionVerificationDetailsWorkshopsViewModel
|
||||
public string Name { get; set; }
|
||||
public int PersonnelCount { get; set; }
|
||||
public WorkshopServicesViewModel Services { get; set; }
|
||||
public string Price { get; set; }
|
||||
}
|
||||
@@ -1866,6 +1866,9 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
ContractNo = query.contract.ContractNo,
|
||||
CreationDate = query.contract.CreationDate.ToFarsi(),
|
||||
TaxPrice = query.contract.ValueAddedTax.ToMoney(),
|
||||
OneMonthPrice = query.contract.IsInstallment?
|
||||
query.contract.Installments.OrderBy(x => x.InstallmentDateGr).First().Amount.ToMoney():
|
||||
query.contract.ContractAmount.ToMoney(),
|
||||
TotalPrice = (query.contract.TotalAmount - query.contract.ValueAddedTax).ToMoney(),
|
||||
PaymentPrice = query.contract.TotalAmount.ToMoney(),
|
||||
IsInstallment = query.contract.IsInstallment,
|
||||
@@ -1899,8 +1902,8 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
},
|
||||
Name = x.WorkshopName,
|
||||
PersonnelCount = x.PersonnelCount,
|
||||
Price = x.Price.ToMoney()
|
||||
}).ToList(),
|
||||
|
||||
SecondParty = new InstitutionContratVerificationParty()
|
||||
{
|
||||
Address = query.contract.Address,
|
||||
@@ -3331,8 +3334,7 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
InsuranceInPerson = x.Services.InsuranceInPerson,
|
||||
RollCall = x.Services.RollCall,
|
||||
RollCallInPerson = x.Services.RollCallInPerson
|
||||
},
|
||||
Price = x.Price.ToMoney()
|
||||
}
|
||||
}).ToList()
|
||||
};
|
||||
res.Add(item);
|
||||
|
||||
Reference in New Issue
Block a user