Dear all TDL programmer how to give cash discount (auto calculate) based on total sale value for example if total sale is between 2001 to 4999 cash discount will be 1% if total sale is between 5001 to 9999 cash discount will be 2% if total sale is greater than 10000 cash discount will be 3% which i am giving manually Scr shot
[#Field: EI ValueSubTotal] Inactive:No [#Field:EIAccRate] Set as: if (#EIAccDesc="Cash Discount" and #EIValueSubTotal > 2000 and #EIValueSubTotal < 5000 ) Then -1 Else if (#EIAccDesc="Cash Discount" and #EIValueSubTotal > 5000 and #EIValueSubTotal < 10000 ) Then -2 Else if (#EIAccDesc="Cash Discount" and #EIValueSubTotal > 10000 ) Then -3 Else $$Value Set Always:Yes
I really must express my gratitude at the help you freely gave me in order to complete my project. Once again thank you very much
It will be cyclic as the subtotal is calculated after discounts mentioned in columns and Cash Discount in Accounting Entries at the bottom will again calculated on subtotal. Both are depending on subtotal . does not appear to be logical.
[#Field: EI ValueSubTotal] Inactive:Not $$IsSales:##SVVoucherType [#Field:EIAccRate] Set as: if ($$IsSales:##SVVoucherType and #EIAccDesc="Cash Discount" and #EIValueSubTotal > 2000 and #EIValueSubTotal < 5000 ) Then -1 Else if ($$IsSales:##SVVoucherType and #EIAccDesc="Cash Discount" and #EIValueSubTotal > 5000 and #EIValueSubTotal < 10000 ) Then -2 Else if ($$IsSales:##SVVoucherType and #EIAccDesc="Cash Discount" and #EIValueSubTotal > 10000 ) Then -3 Else $$Value Set Always:$$IsSales:##SVVoucherType