1 2 3function calcDonorCoveredFee(amount,percentageFee,fixedFee,additionalFee) { 4 //total_fee = ( ( percentage_fee * transaction_amount ) + fixed_fee ) / ( 1 - percentage_fee ) 5 var scope={ 6 amount: amount, 7 percentageFee: percentageFee, 8 fixedFee: fixedFee, 9 additionalFee: additionalFee 10 } 11 return math.evaluate('((percentageFee*amount)+fixedFee)/(1-percentageFee )+additionalFee',scope).toFixed(2); 12} 13 14function calcDafFee(amount,chariot_percentage,additionalFee) { 15 let scope={ 16 amount: amount, 17 percentageFee: chariot_percentage, 18 fixedFee: 0, 19 additionalFee: additionalFee 20 } 21 let fee = Math.ceil(math.evaluate('((percentageFee*amount)+fixedFee)/(1-percentageFee)',scope)); 22 return Math.ceil(fee+Number(additionalFee)); 23} 24 25function addAmountAndDonorCoveredFee(amount,donorCoveredFee){ 26 var scope={ 27 amount: amount, 28 donorCoveredFee: donorCoveredFee, 29 } 30 return math.evaluate('amount+donorCoveredFee',scope).toFixed(2); 31} 32 33function addAmountAndDafFee(amount,donorCoveredFee){ 34 return Math.ceil(amount+donorCoveredFee); 35}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.