ams-utils
v1.0.7
Published
methods to be used:
Downloads
6
Readme
methods to be used:
backhaulDiscountCalculations: it will calculate backhaul discounts. will calculate labor,feul charges and savings and actualPrice prices based on provided inputs.
*) Labor = hourlyRate * numberOfHours;
*) fuel calculation:
if "fuelChargeType==0":
fuelVal =0
if "fuelChargeType==1":
fuelVal = existing fuelItem value
if "fuelChargeType==2":
fuelCal= travelItem.value + Labor;
fuelCal = (fuelCal * parseFloat(fuelCharge)) /100;
*) once after we calculate both labor and fuel, then we will calculate actualPrice.
*) depositeAmount calculation: actualPriceAfterDiscount * 0.20