This commit is contained in:
@@ -2396,6 +2396,7 @@ namespace AyaNova.Biz
|
|||||||
return null;
|
return null;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
await LoanBizActionsAsync(AyaEvent.Created, newObject, null, null);
|
||||||
//newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
|
//newObject.Tags = TagBiz.NormalizeTags(newObject.Tags);
|
||||||
//newObject.CustomFields = JsonUtil.CompactJson(newObject.CustomFields);
|
//newObject.CustomFields = JsonUtil.CompactJson(newObject.CustomFields);
|
||||||
await ct.WorkOrderItemLoan.AddAsync(newObject);
|
await ct.WorkOrderItemLoan.AddAsync(newObject);
|
||||||
@@ -2442,6 +2443,7 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
await LoanValidateAsync(putObject, dbObject);
|
await LoanValidateAsync(putObject, dbObject);
|
||||||
if (HasErrors) return null;
|
if (HasErrors) return null;
|
||||||
|
await LoanBizActionsAsync(AyaEvent.Modified, putObject, dbObject, null);
|
||||||
ct.Replace(dbObject, putObject);
|
ct.Replace(dbObject, putObject);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -2541,11 +2543,11 @@ namespace AyaNova.Biz
|
|||||||
|
|
||||||
|
|
||||||
//manual price overrides anything
|
//manual price overrides anything
|
||||||
o.PriceViz=o.ListPrice;
|
o.PriceViz = o.ListPrice;
|
||||||
if (o.PriceOverride != null)
|
if (o.PriceOverride != null)
|
||||||
o.PriceViz = (decimal)o.PriceOverride;
|
o.PriceViz = (decimal)o.PriceOverride;
|
||||||
//Currently not contract discounted so no further calcs need apply to priceViz
|
//Currently not contract discounted so no further calcs need apply to priceViz
|
||||||
|
|
||||||
//Calculate totals and taxes
|
//Calculate totals and taxes
|
||||||
//NET
|
//NET
|
||||||
o.NetViz = o.PriceViz * o.Quantity;
|
o.NetViz = o.PriceViz * o.Quantity;
|
||||||
@@ -2578,7 +2580,7 @@ namespace AyaNova.Biz
|
|||||||
//BIZ ACTIONS
|
//BIZ ACTIONS
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
private async Task LoanUnitBizActionsAsync(AyaEvent ayaEvent, WorkOrderItemLoan newObj, WorkOrderItemLoan oldObj, IDbContextTransaction transaction)
|
private async Task LoanBizActionsAsync(AyaEvent ayaEvent, WorkOrderItemLoan newObj, WorkOrderItemLoan oldObj, IDbContextTransaction transaction)
|
||||||
{
|
{
|
||||||
//automatic actions on record change, called AFTER validation
|
//automatic actions on record change, called AFTER validation
|
||||||
|
|
||||||
@@ -2593,8 +2595,8 @@ namespace AyaNova.Biz
|
|||||||
if (ayaEvent == AyaEvent.Modified)
|
if (ayaEvent == AyaEvent.Modified)
|
||||||
{
|
{
|
||||||
//If it wasn't a complete part change there is no need to set pricing
|
//If it wasn't a complete part change there is no need to set pricing
|
||||||
if (newObj.LoanUnitId == oldObj.LoanUnitId && newObj.Rate == oldObj.Rate)
|
if (newObj.LoanUnitId == oldObj.LoanUnitId && newObj.Rate == oldObj.Rate)
|
||||||
SnapshotPricing = false;
|
SnapshotPricing = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Pricing
|
//Pricing
|
||||||
|
|||||||
Reference in New Issue
Block a user