Hi Harish,
Sorry for late reply. I am providing solution for above post .
There is mainly BankChequePrint, VendOutPaym_Cheque, ChequeController, CustVendCheque, ChequeDp Classes are involved.
We need to write code in CustVendCheque Class . In this Class there is a Output Method. In this method add the following code.
while select crosscompany
specTrans
order by
specTrans.RecId
where specTrans.SpecTableId == tableNum
(LedgerJournalTrans) &&
specTrans.SpecRecId == ledgerJournalTrans.RecId &&
specTrans.SpecCompany == ledgerJournalTrans.company()
{
vendTrans = specTrans.vendTrans();
ttsBegin
;
chequeInvoicesTmp.Invoice = vendTrans.Invoice;
chequeInvoicesTmp.InvoiceDate = vendTrans.documentInvoiceDate();
chequeInvoicesTmp.AmountCur = VendInvoiceJour::findFromVendTrans(vendTrans.Invoice,vendTrans.TransDate,vendTrans.AccountNum).InvoiceAmount;
chequeInvoicesTmp.AmountPaid = specTrans.Balance01;
chequeInvoicesTmp.Discount = specTrans.getPossibleCashDiscAmount(ledgerJournalTrans.TransDate, VendPaymModeTable::discGraceDays(ledgerJournalTrans.PaymMode));
chequeInvoicesTmp.NetAmountPaid = chequeInvoicesTmp.AmountCur + chequeInvoicesTmp.Discount;
chequeInvoicesTmp.ChequeNum = ledgerJournalTrans.BankChequeNum;
chequeInvoicesTmp.SerialNumber =
1
;
chequeInvoicesTmp.insert();
ttsCommit
;
We need to add same fields in ChequeDp and VendOutPaym_Cheque classes. VendOutPaymclass there is a method PrintDocument .In this method we need to add the same fields and design the report as per requirement in visual studio.
Thanks,
ali.