Custom XML from Voucher

Discussion in 'Tally Developer' started by NIRMALGHORAWATIN, Sep 9, 2023.

    
  1. NIRMALGHORAWATIN

    NIRMALGHORAWATIN New Member


    I want to create a Custom XML File from Payment Voucher.
    with the following Fields: Voucher Number; Date, Party Ledger Name and Amount.

    I am facing difficulty in
    1. Creating Collection for Current Voucher Report
    Code:
    [Collection: CurrentPaymentVoucher]
        Data Source: Report: Current
        Client Only: Yes
        Fetch: $Date, $VoucherNumber, $Amount, $PartyLedgerName
    If I create Report / Form / Part / Line / Field --> Displayed with a Button in Voucher; I am unable to fetch field values.

    Full Code
    Code:
    [#Form: PaymentColor]
        Add: Top Button: At Beginning: Export PayAdvise
       
    [Button : Export PayAdvise]
    Key : Alt + S
    Action :Display: Export PayAdvise
       
    [Report: Export PayAdvise]
        Form: Export PayAdvise
        Title: "Electronic Payment Advise"
       
    [Form: Export PayAdvise]
        Part: Export PayAdvise
        Horizontal Align: Left
        Vertical Align: Top
       
    [Part:Export PayAdvise]
        Lines: ePayVoucherType, ePayVoucherNo, PaymentFrom, ReceiptBy, TranDate, TranAmount
        Scroll:Both
        Float: No
        Common Border:Yes
        Height: 30% Page
        Width: 40% Page
       
    [Line: ePayVoucherType]
        Field: Medium Prompt, ePayVoucherType
        Local: Field: Medium Prompt: Set as: "Document Type:"
       
    [Field: ePayvoucherType]
        Use: Name Field
        XMLTag: "ePADocType"
        Set as: "Electronic Payment Advise"
       
    [Line: ePayVoucherNo]
        Field: Medium Prompt, ePayVoucherNo
        Local: Field: Medium Prompt: Set as: "Document No:"
       
    [Field: ePayVoucherNo]
        Use: Name Field
        XMLTag: "ePADocNo"
        Set as: $$CollectionField:$VoucherNumber:1:CurrentPaymentVoucher
       
    [Line: PaymentFrom]
        Field: Medium Prompt, Payment From
        Local: Field: Medium Prompt: Set as:"Payment From:"
       
    [Field: Payment From]
        Use: Name Field
        XMLTag: "ePAPayFrom"
        Set as : @@CMPMailName
       
    [Line: ReceiptBy]
        Field: Medium Prompt, Receipt By
        Local: Field: Medium Prompt: Set as:"Receipt By:"
    
    [Field: Receipt By]
        Use: Name Field
        XMLTag: "ePARcptBy"
        Set as: $$CollectionField:$PartyLedgerName:1:CurrentPaymentVoucher
       
    [Line: TranDate]
        Field: Medium Prompt, TranDate
        Local: Field: Medium Prompt: Set as:"Transaction Date:"
       
    [Field: TranDate]
        Use: Uni Date Field
        XMLTag: "ePATranDate"
        Set as: $$CollectionField:$Date:1:CurrentPaymentVoucher
    
    [Line: TranAmount]
        Field: Medium Prompt, TranAmount
        Local: Field: Medium Prompt: Set as:"Transaction Amount:"
       
    [Field: TranAmount]
        Use: Amount Field
        XMLTag: "ePATranAmt"
        Set as: $$CollectionField:$Amount:1:CurrentPaymentVoucher
     



  2. Its not getting the object...
    make the object aviable to the report you ahve made like OBJECT : VOUCHER
    it will work...
    also check the default codes you will have the answer what u expect
     
    NIRMALGHORAWATIN likes this.


Share This Page