This commit is contained in:
2021-05-26 23:10:00 +00:00
parent 7cf7f25019
commit 045c078e26
2 changed files with 30 additions and 15 deletions

View File

@@ -2539,15 +2539,6 @@ namespace AyaNova.Biz
if (Tax != null) if (Tax != null)
o.TaxCodeViz = Tax.Name; o.TaxCodeViz = Tax.Name;
o.PriceViz = 0;
if (loanUnit != null)
{
switch(o.Rate){
case LoanUnitRateUnit.None:
o.PriceViz=0;
break;
}
}
//manual price overrides anything //manual price overrides anything
if (o.PriceOverride != null) if (o.PriceOverride != null)
@@ -2656,14 +2647,25 @@ namespace AyaNova.Biz
if (SnapshotPricing) if (SnapshotPricing)
{ {
//default in case nothing to apply //default in case nothing to apply
newObj.Charges = 0; newObj.Cost = 0;
newObj.ListPrice = 0;
LoanUnit loanUnit = await ct.LoanUnit.AsNoTracking().FirstOrDefaultAsync(x => x.Id == newObj.LoanUnitId); LoanUnit loanUnit = await ct.LoanUnit.AsNoTracking().FirstOrDefaultAsync(x => x.Id == newObj.LoanUnitId);
if (loanUnit != null) if (loanUnit != null)
{ {
newObj.Charges = s.Cost;
newObj.ListPrice = s.Retail; switch (newObj.Rate)
{
case LoanUnitRateUnit.None:
break;
case LoanUnitRateUnit.Hours:
newObj.Cost=loanUnit.
break;
}
} }
} }
} }

View File

@@ -44,6 +44,19 @@ namespace AyaNova.Models
[Required] [Required]
public decimal RateYear { get; set; } public decimal RateYear { get; set; }
[Required]
public decimal RateHourCost { get; set; }
[Required]
public decimal RateHalfDayCost { get; set; }
[Required]
public decimal RateDayCost { get; set; }
[Required]
public decimal RateWeekCost { get; set; }
[Required]
public decimal RateMonthCost { get; set; }
[Required]
public decimal RateYearCost { get; set; }
[Required] [Required]
public LoanUnitRateUnit DefaultRate { get; set; } public LoanUnitRateUnit DefaultRate { get; set; }