This commit is contained in:
2021-06-17 19:22:44 +00:00
parent c51cbe763f
commit 7785448b8b

View File

@@ -2227,6 +2227,8 @@ namespace AyaNova.Biz
o.TaxCodeViz = Tax.Name;
//Calculate totals and taxes
if (o.ChargeToCustomer)
{
o.TaxAViz = 0;
o.TaxBViz = 0;
@@ -2247,11 +2249,25 @@ namespace AyaNova.Biz
o.TaxBViz = o.ChargeAmount * (Tax.TaxBPct / 100);
}
}
}
o.LineTotalViz = o.ChargeAmount + o.TaxAViz + o.TaxBViz;
}else{
o.LineTotalViz = o.ChargeAmount + o.TaxPaid;
}
}
}
/*
As of Alpha.109 "LineTotalViz" is derived incorrectly. It is presently looking like it uses TotalCost and "ChargeToCustomer"=true, instead needs to be based on ChargeAmount
IF "ChargeToCustomer" = true then do below to get "LineTotalViz": ,
If "ChargeTaxCodeId" has a value, then "LineTotalViz": = ( "ChargeAmount" + ((TaxA% * "ChargeAmount") + (TaxB% * "ChargeAmount"))
ELSE
If "ChargeTaxCodeId" does NOT have a value then "LineTotalViz": = ( "ChargeAmount" + "TaxPaid")
ELSE skip and "LineTotalViz" is empty
*/
// ////////////////////////////////////////////////////////////////////////////////////////////////
// //BIZ ACTIONS
// //