Hi all,
I want to customize the Posted Voucher report (16567) to have invoice details also(against which the payment is made), like "Invoice No." "posting Date" And "Invoice Amount". How should I go for it.
Actually when we post any Cash/bank payment voucher then with the help of function->Apply Entries option we enter the "External Document no." into Cash/Bank payment voucher.
So, i have written the following code under OnAfterGetRecord of G/L Entry DataItem but its not working,
VendorLedgerEntry.RESET;
VendorLedgerEntry.SETRANGE(VendorLedgerEntry."Document No.","External Document No.");
VendorLedgerEntry.SETRANGE(VendorLedgerEntry."Posting Date","Posting Date");
if VendorLedgerEntry.FIND('-') Then
BillNo:=VendorLedgerEntry."Document No.";
Billdate:=VendorLedgerEntry."Posting Date";
BillAmount:=VendorLedgerEntry."Original Amount";
Can anybody guide me.
Comments
try to debug the code.
Thanx for the reply, i have chaged the code as you said but still i am not able to find the coreect data:
why you setrange "extrnal doc" to "Document no."?
If u see the vendor ledger entry table, it contains the "External Document No." that we enter manually while posting cash/bank payment voucher.
Actually the first two SETRANGE gives me the record from vendor ledger entry table but this record is not having that data what i am trying to fetch, so i am trying another filter on the same table whose document no is equal to the external document no of Cash/Bank payment voucher.
it may be wrong, my requirement is to fetch the Invoice No, Date and Amount of that particular invoice that i am entering with Cash/bank Payment voucher.
First, it does not work..
try removing that line and try...
explain the complete scenario...
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
thanx for the reply,
Actually what i want is to print the invoice details(invoice no,date and amount) on posted voucher report. In our case,When we pass any cash/bank payment voucher then we take reference of the posted purchase invoice for that vendor by Function->Apply Entries and pressing f9.
My requirement is to print the invoice details on the posted voucher report, so from where i can get these details.
http://ssdynamics.co.in
actually I am not able to locate where is the reference of the applied entries. NAV is fetching Vendor name from "Vendor" table based on some links through "Vendor Ledger Entry".