Dear Admin & Experts, I am try to make triple discount provide in invoice i have a problem in recalculate the amount field pls help me. Guide me where i am go wrong. Screen shoot & code is as under: [#Field : VCH Value] ResetVal : If (@@NoBaseUnits OR $$IsEmpty:$BilledQty) then $$Value else ((($Rate * $BilledQty * (100 - $Discount) * (100 - $TlyTrngDiscount) * (100 - $TlyTrngDiscountM))) / 10000) [System : Formula] NrmlAmount : ((100 * 100 * $Amount) / (100 - $Discount)) / (100 - $$Number:$TlyTrngDiscount) / (100 - $$Number:$TlyTrngDiscountM) CalcedAmt : ((((if $$IsMultiGodownOn Then $BatchRate else $Rate) * $BilledQty * (100 - $Discount) * (100 - $TlyTrngDiscount) * (100 - $TlyTrngDiscountM))) / 10000)
If you Want Simple Discount Like Disc1 + Disc2 + Disc3 Then $Rate * $BilledQty * ( (100 - ($Discount+$TlyTrngDiscount+$TlyTrngDiscountM)) /100) Or you want compound Then (((($Rate * $BilledQty * (100-$Discount)/100)*(100-$TlyTrngDiscount)/100)*(100-$TlyTrngDiscountM)/100)
Hello Mr. Drive, As per your guidance i will change the code but it is not successful. Code is as under: [System : UDF] TlyTrng Discount : Number : 3011 TlyTrng DiscountM : Number : 3012 [#Field : VCH Value] Resetval : (((($Rate * $BilledQty * (100-$Discount)/100) * (100-$TlyTrngDiscount) / 100) * (100-$TlyTrngDiscountM) / 100)) ;; ResetVal : If (@@NoBaseUnits OR $$IsEmpty:$BilledQty) then $$Value else ((($Rate * $BilledQty * (100 - $Discount) * (100 - $TlyTrngDiscount) * (100 - $TlyTrngDiscountM))) / 10000) ;; [System : Formula] ;; NrmlAmount : (((($Rate * $BilledQty * (100-$Discount)/100)*(100-$TlyTrngDiscount)/100)*(100-$TlyTrngDiscountM)/100)) ;;((((100 * 100 * $Rate * $BilledQty / (100-$Discount)/100) * (100-$TlyTrngDiscount)/100) * (100-$TlyTrngDiscountM)/100) / 100) ;;NrmlAmount : ((100 * 100 * $Amount) / (100 - $Discount)) / (100 - $$Number:$TlyTrngDiscount) / (100 - $$Number:$TlyTrngDiscountM) CalcedAmt : ((((if $$IsMultiGodownOn Then $BatchRate else $Rate) * $BilledQty * (100 - $Discount) * (100 - $TlyTrngDiscount) * (100 - $TlyTrngDiscountM))) / 100)
Thanks to Admin, Experts & One of my known experts who help me to achieve It Now able to add 4 or 5 level of discount module should be generate & print also.