Dear Experts, How to I calculate the Dis(Amount) Calculate in payment voucher. [# Line: VCHBILL CTLineOne] Add: Right Field :after : VCHBILL DrCrTitleOne: Vch Discnt,Vch Disamt, Vch ValueT [# Line: VCHBILL CTLineTwo] Add: Right Field :after : VCHBILL DrCrTitleTwo: DisT,DisAnt,ValutT [# Line: VCHBILL MainLine] Add : Right Field : After : VCHBILLDrCr : VchDis, Vchamt ,Vch valueamt [Field: Vch Discnt] Width : @@VCHAmountWidth Setas : $$LocaleString:"Dis (%)" Style : Small Bold Align : Right Skip : Yes Fixed : Yes [Field: VchDis] Use : Number Field Width : @@VCHAmountWidth Storage : vchDis Set always : Yes Align : Right Format : "No Zero,Percent" [Field: Vch Disamt] Width : @@VCHAmountWidth Setas : $$LocaleString:"Dis(Amt)" Style : Small Bold Align : Right Skip : Yes Fixed : Yes [Field: Vchamt] Use : Amount Field Width : @@VCHAmountWidth Storage : vchDisAmt Set always : Yes Align : Right [Field : Vch ValueT] Width : @@VCHAmountWidth Setas : $$LocaleString:"Total Amount" Style : Small Bold Align : Right Skip : Yes Fixed : Yes [Field: Vch valueamt] Use : Amount Field Width : @@VCHAmountWidth Storage : Value ;Set By Condition: (($Amount*$vchDis)/$$Number:100);then $$Value else ($Amount-$vchDisAmt) Set as : ($Amount*$vchDis)/$$Number:100 ;Set as : @MyFormula2 Set always : Yes Align : Right [System : UDF] vchDis : Number : 15241 vchDisAmt : Amount : 15245 Value : Amount : 15250 [# Line: VCHBILL Total] Add : Right Fields : After : VCHBILL DrCrTotal : Vch DiscntTotal, Vch DisamtTotal,Vch ValueTotalFld [Field: Vch DiscntTotal] Use : Amount Forex Field Width : @@VCHAmountWidth Border : Totals Skip : Yes ; Set as : $$AsPositive:$$Total:VCHBillAmt Set always : Yes [Field: Vch DisamtTotal] Use : Amount Forex Field Width : @@VCHAmountWidth Border : Totals Skip : Yes ; Set as : $$AsPositive:$$Total:VCHBillAmt Set always : Yes [Field: Vch ValueTotalFld] Use : Amount Field Width : @@VCHAmountWidth Border : Totals Skip : Yes Set as : $$AsPositive:$$Total:Vchvalueamt Set always : Yes [Field: DisT] Width : @@VCHAmountWidth Set as : "" Skip : Yes [Field: DisAnt] Width : @@VCHAmountWidth Set as : "" Skip : Yes [Field: ValutT] Width : @@VCHAmountWidth Set as : "" Skip : Yes
Mam, Small mistake. Just change these two fields as [Field: Vchamt] Use : Amount Field Width : @@VCHAmountWidth Set as : ($Amount*$vchDis)/$$Number:100 ;changed Storage : vchDisAmt Set always : Yes Align : Right [Field: Vch valueamt] Use : Amount Field Width : @@VCHAmountWidth Storage : Value Set as : $Amount - #VchAmt ;changed Set always : Yes Align : Right Regards,
Hi, it is working after Mr. sanjeev's suggestion. But the payment amount reduced in the 'select screen' is not effected in the payment screen. Should not the discount amount be properly reduced in the original amount and accordingly voucher payment altered. Correct me if I am wrong somewhere. Thanks for a good contribution. Happy HOLI to you.
Dear Sir, I have to put some value in Dis(%) For Example: Dis(%) Calculated Correctly Amount = 2750 Dis(%) = 5% Dis(Amt) = Empty Total Amount = 137.50 Dis(Amt) Not calculated Amount = 2750 Dis(%) = Empty Dis(Amt) = 750 Total Amount = (Not calculated) please correct this.
Dear Sir, I have to put some value in Dis(%) For Example: Dis(%) Calculated Correctly Amount = 2750 Dis(%) = 5% Dis(Amt) = Empty Total Amount = 137.50 I have to put some value in Dis(Amt) For Example: Dis(Amt) Not calculated Amount = 2750 Dis(%) = Empty Dis(Amt) = 750 Total Amount = (Not calculated) please correct this.
Check this code, [#Part: VCHBILL Allocation] Total: Vch valueamt [Field: Vch valueamt] Use : Amount Field Width : @@VCHAmountWidth Set as : ($Amount - @DiscAmt)-$vchDisAmt DiscAmt: ($Amount*$vchDis)/$$Number:100 Storage : Value Set always : Yes Align : Right