Friday, 23 August 2013

Pass Customized fields to CustTrans, VendTrans, and BankAccountTrans

In continuation to my last post. In this tutorial we will run through how to pass new fields for Customer Transactions, Vendor Transaction, and Bank Account Transaction. If you have not checked out the last post please do so for a reference before this.


Lets Begin !

Step 1. Create a new field in the CustTrans, VendTrans and BankAccountTrans table. Name it ARNID 

For the Customer and Vendor Transaction we will also have to add this field to the CustVendTrans Map. 

Step 2. Add this field to the CustTrans and VendTrans to the CustVendTrans Map.

Step 3. Under Mappings Map the Field ARNID to the both CustTrans and VendTrans


Step 5.  Declare ARNID (or the field of your choosing) in the class declaration of the CustVendVoucher class and BankVoucher class.

Step 4.  Create a parm method in the CustVendVoucher class and the BankVoucher class.

 public ARNID parmARNID(ARNID _ARNID = ARNID)  
 {  
    ARNID = _ARNID;  
    return ARNID;  
 }  

Step 5.  Modify the initCustVendTrans method in the CustVendVoucher class.

custVendTrans.ARNID = ARNID;

Step 6. In the previous post we added code to LedgerVoucherObject and LedgerVoucherObjectTrans. in order to add a field to GeneralJournalAccounttEntry. In order for that customization to work when posting a customer or vendor voucher. Modify the post method in the CustVendVoucher class with following code.

ledgerVoucherTransObject.parmARNID(ARNID);

Step 7. Next modify the method newCustVoucherJournal in the CustVoucher class.

custVoucher.parmARNID(_ledgerJournalTrans.ARNID);

Step 8. Next modify the method newVendVoucherJournal in the VendVoucher class.

VendVoucher.parmARNID(_ledgerJournalTrans.ARNID);

Step 9. Modify the createBankAccountTrans method in the BankVoucher class.

bankAccountTrans.ARNID = ARNID;

Step 10. n the previous post we added code to LedgerVoucherObject and LedgerVoucherObjectTrans. in order to add a field to GeneralJournalAccounttEntry. In order for that customization to work when posting a bank voucher. Modify the post method in the BankVoucher class with following code.

ledgerVoucherTransObject.parmARNID(ARNID);

Thats Wraps it up. We are all set.

No comments:

Post a Comment