@Amit Kamdar sir please help me, in pos voucher customized default fields, but balance in change field not working properly, net sales, tender is working. see this image and tdl [#Form : POS INVOICE Color] Use : Voucher [#part: VCH POS Normal] Add:Line:After:VCH POS InvoiceTotal: VCH POS PTOTAL1, VCH POSPTOTAL2, VCHPOSPTOTAL3, VCHPOSPTOTAL4 [Line:VCH POS PTOTAL1] Left Field:SHORT PROMPT,VCH POSCashLedger1, VCH POSCashAmount1 Local : Field : Short Prompt : Set as : $$LocaleString:"Cash" [Field: VCH POSCashLedgerName1] Use : Name Field Set as : #VCHPOSCashLedger Storage : POSCashLedger Set Always : Yes Skip : Yes Invisible : Yes [Field:VCH POSCashLedger1] Use : Name Field Set as : If $$IsEmpty:$LedgerName OR $$IsEmpty:#VCHPOSCashAmount Then $$SysName:NotApplicable Else $LedgerName Storage : LedgerName:LedgerEntries:First:NOT $$IsSysName:$LedgerName AND $LedgerName = $POSCashLedger Table : POS Cash Ledgers Extract, NOT Applicable Keys : Create Ledger, Alter Ledger Variable : SV Ledger Width : @@VCHNameWidth Show Table : On Blank Skip : $$AmountAdd:#VCHPOSBankAmount:$$AmountAdd:#VCHPOSCardAmount:#VCHPOSCouponAmount = #VCHPOSInvoiceTotal OR #VCHPOSInvoiceTotal=0 Option : VCH POSCashSinglePymt : ##POSSinglePayment Option : VCH POSForced : NOT $$InAlterMode [Field:VCH POSCashAmount1] Use : Amount Forex Field Storage : Amount:LedgerEntries:First:NOT $$IsSysName:$LedgerName AND $LedgerName = $POSCashLedger Set as : If NOT $$IsFieldEdited Then $$AmountAdd:#VCHPOSInvoiceTotal:$$AmountAdd:#VCHPOSCardAmount:$$AmountAdd:#VCHPOSCouponAmount:#VCHPOSBankAmount + Else $$Value Validate : If $$IsNegative:#VCHPOSInvoiceTotal Then $$AmountAdd:$$Value:$$AmountAdd:#VCHPOSBankAmount:$$AmountAdd:#VCHPOSCardAmount:#VCHPOSCouponAmount >= #VCHPOSInvoiceTotal Else + $$AmountAdd:$$Value:$$AmountAdd:#VCHPOSBankAmount:$$AmountAdd:#VCHPOSCardAmount:#VCHPOSCouponAmount <= #VCHPOSInvoiceTotal+ AND NOT $$IsNegative:$$Value Set Always : Yes Option : VCH POS SinglePymt :##POSSinglePayment Format : "Symbol, No Zero," + ##ShowForex Inactive : $$IsNOTApplicable:#VCHPOSCashLedger OR $$IsEmpty:#VCHPOSCashLedger Skip : $$IsNotApplicable:#VCHPOSCashLedger OR $$AmountAdd:#VCHPOSBankAmount:$$AmountAdd:#VCHPOSCardAmount:#VCHPOSCouponAmount = #VCHPOSInvoiceTotal ;-------- [Line:VCH POS PTOTAL2] Left Field:EI POS TOTAL2 [Field:EI POS TOTAL2] FieldOS INFO1, POS QTY1, POS AMOUNT1 Border:THIN BOX Align:Left [FieldOS INFO1] Info:"NET SALES :-" Width:18 Local:StyleEFAULT:Height:12 Background:Blue Color : Lily White Local:StyleEFAULT:Space Top : 0.5 [FieldOS QTY1] Info:"" Width:6 [FieldOS AMOUNT1] Use : Amount Forex Field Storage : Amount:LedgerEntries:First:NOT $$IsSysName:$LedgerName AND $LedgerName = $POSCashLedger1 Set as : If NOT $$IsFieldEdited Then $$AmountAdd:#VCHPOSInvoiceTotal:$$AmountAdd:#VCHPOSCardAmount:$$AmountAdd:#VCHPOSCouponAmount:#VCHPOSBankAmount + Else $$Value Validate : If $$IsNegative:#VCHPOSInvoiceTotal Then $$AmountAdd:$$Value:$$AmountAdd:#VCHPOSBankAmount:$$AmountAdd:#VCHPOSCardAmount:#VCHPOSCouponAmount >= #VCHPOSInvoiceTotal Else + $$AmountAdd:$$Value:$$AmountAdd:#VCHPOSBankAmount:$$AmountAdd:#VCHPOSCardAmount:#VCHPOSCouponAmount <= #VCHPOSInvoiceTotal+ AND NOT $$IsNegative:$$Value Set Always : Yes Option : VCH POS SinglePymt :##POSSinglePayment Format : "Symbol, No Zero," + ##ShowForex Inactive : $$IsNOTApplicable:#VCHPOSCashLedger1 OR $$IsEmpty:#VCHPOSCashLedger1 Skip : $$IsNotApplicable:#VCHPOSCashLedger1 OR $$AmountAdd:#VCHPOSBankAmount:$$AmountAdd:#VCHPOSCardAmount:#VCHPOSCouponAmount = #VCHPOSInvoiceTotal Align:Left Width:12 Background:Blue Color : Lily White ;===================== [Line:VCH POS PTOTAL3] Left Field:EI POS TOTAL3 [Field:EI POS TOTAL3] FieldOS INFO2, POS QTY2, VCHPOSMoneyTendered1 Border:THIN BOX Align:Left [FieldOS INFO2] Info:"TENDER :-" Width:18 Local:StyleEFAULT:Height:12 Background:Blue Color : Lily White Local:StyleEFAULT:Space Top : 0.5 [FieldOS QTY2] Info:"" Width:6 [Field:VCHPOSMoneyTendered1] Use : Amount Forex Field Storage : POSCashReceived Validate : If (@@UseClassFmt AND $$InCreateMode) + Then $$Value >= $$AsPositive:#CIPOSCashAmount Else $$Value >= $$AsPositive:#VCHPOSCashAmount ;;AsPositive is used so that the cases of Positive and Negative Cash Amount both are considered. Format : "Symbol, No Zero," + ##ShowForex Set Always : Yes Align:Left Width:12 Background:Blue Color : Lily White ;========================== [Line:VCH POS PTOTAL4] Left Field:EI POS TOTAL4 [Field:EI POS TOTAL4] FieldOS INFO3, POS QTY3, POS AMOUNT3 Border:THIN BOX Align:Left [FieldOS INFO3] Info:"BALANCE IN CHANGE :-" Width:22 Local:StyleEFAULT:Height:10 Background:Blue Color : Lily White Local:StyleEFAULT:Space Top : 0.5 [FieldOS QTY3] Info:"" Width: 6 [FieldOS AMOUNT3] Use : Amount Forex Field Set as : If NOT $$IsEmpty:#VCHPOSCashAmount AND #VCHPOSMoneyTendered > $$AsPositive:#VCHPOSCashAmount Then $POSCashReceived - $$AsPositive:#VCHPOSCashAmount Else + If NOT $$IsEmpty:#CIPOSCashAmount AND #VCHPOSMoneyTendered > $$AsPositive:#CIPOSCashAmount Then $POSCashReceived - $$AsPositive:#CIPOSCashAmount Else "" Set Always : Yes Skip : Yes Format : "Symbol, No Zero," + ##ShowForex Align:Left Width:12 Background:Blue Color : Lily White #Field: VCH POSCashLedgerName] Invisible:Yes [#Field: VCH POS CashDeemedPos] Invisible:Yes [#Field: VCH POSCashNoZero] Invisible:Yes [#Field: VCH POSCashLedger] Invisible:Yes [#Field: VCH POSCashAmount] ;Invisible:Yes [#Field: VCH POS MoneyTendered] Invisible:Yes [#Field: VCH POS Balance] Invisible:Yes [#Line: VCH POS Cash Receipt] Invisible:Yes
You have made the above code and yet you ask this simple question.......?? Try it and see.....you know enough coding by now........
ok got it, sir, I did it, you have given me a wrong solution sir, #POSAMOUNT1 - #VCHPOSMoneyTendered1 this is correct solution sir Ji - #VCHPOSMoneyTendered1 - #POSAMOUNT1 see this I got it solution [FieldOS QTY3] Use : - Amount Forex Field Set as : #VCHPOSMoneyTendered1 - #POSAMOUNT1 Width: 6
Well i have give the right CashFlow logical solution.... when Bill is 23/- and Cash tendered is 30/-, then it should be -7...since you have to give back 7 back to the customer.
SIR as per your solution balance in change amount showing in minus see this image and as per my solution is showing like this sir. see this image
You can select whatever way you want to displayed....as negative or as positive.... if you want positive then follow the method that you have used. but going by accounting logic, the amount should be negative, as that is the amount going OUT from your cash.......
The solution i have given has nothing to do with your Voucher...... try this....make it "blank" i.e. in Set As : "" ... temporarily and see........