xml Request to Export Vouchers with Inventory details

Discussion in 'Tally Integration' started by Varadha, Dec 7, 2024.

  1. Varadha

    Varadha Member


    Hi All,
    I am trying to Import Ledger statements of Sundry Debtors and Creditors to Google sheets. I wrote an xml request to fetch the voucher details which is working fine but I want inventory details in the transactions. Following is my xml request. Please help me out in this regard

    <?xml version="1.0" encoding="utf-8"?>
    <ENVELOPE>
    <HEADER>
    <VERSION>1</VERSION>
    <TALLYREQUEST>Export</TALLYREQUEST>
    <TYPE>Data</TYPE>
    <ID>MyReportLedgerVouchers</ID>
    </HEADER>
    <BODY>
    <DESC>
    <STATICVARIABLES>
    <SVFROMDATE>20230301</SVFROMDATE>
    <SVTODATE>20240331</SVTODATE>
    <EXPLODEFLAG>Yes</EXPLODEFLAG>
    <DBINVEXPLODEFLAG>Yes</DBINVEXPLODEFLAG>
    <SVEXPORTFORMAT>ASCII(Comma Delimited)</SVEXPORTFORMAT>
    </STATICVARIABLES>
    <TDL>
    <TDLMESSAGE>
    <REPORT NAME="MyReportLedgerVouchers">
    <FORMS>MyReportForm</FORMS>
    <Variables>LName : String</Variables>
    <Set>LName: "Sundry Debtors"</Set>
    </REPORT>
    <FORM NAME="MyReportForm">
    <PARTS>MyVoucherPart</PARTS>
    </FORM>
    <PART NAME="MyVoucherPart">
    <LINES>MyVoucherLine</LINES>
    <REPEAT>MyVoucherLine : MyVoucherCollection</REPEAT>
    <SCROLLED>Vertical</SCROLLED>
    </PART>
    <LINE NAME="MyVoucherLine">
    <FIELDS>
    DateField,VoucherTypeField,VoucherNumberField,LedgerField,OtherLedgerField,DrAmountField,CrAmountField,Parent
    </FIELDS>
    </LINE>

    <FIELD NAME="Parent">
    <SET>$Parent</SET>
    </FIELD>
    <FIELD NAME="DateField">
    <SET>$Date</SET>
    </FIELD>
    <FIELD NAME="VoucherTypeField">
    <SET>$VoucherTypeName</SET>
    </FIELD>
    <FIELD NAME="VoucherNumberField">
    <SET>$VoucherNumber</SET>
    </FIELD>
    <FIELD NAME="LedgerField">
    <SET>$PartyLedgerName</SET>
    </FIELD>
    <FIELD NAME="OtherLedgerField">
    <SET>$ledgername</SET>
    </FIELD>
    <FIELD NAME="DrAmountField">
    <SET> $$IfCr:($Amount) </SET>
    <Format>Decimal:2,"NoZero"</Format>

    </FIELD>
    <FIELD NAME="CrAmountField">
    <SET> $$IfDr:$Amount</SET>
    <Format>Decimal:2,"NoZero"</Format>

    </FIELD>
    <COLLECTION NAME="MyVoucherCollection" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
    <SourceCollection>MyVoucherCollectionSrc</SourceCollection>
    <Walk>AllLedgerEntries,AllInventoryEntries</Walk>
    <Method>Date : $Date</Method>
    <Method>VoucherTypeName : $VoucherTypeName</Method>
    <Method>VoucherNumber : $VoucherNumber</Method>
    <Method>LedgerName : $LedgerName</Method>
    <Method>Amount :$Amount</Method>
    <Method>PartyLedgerName:$PartyLedgerName</Method>
    <Method>IsDeemedPositive:$IsDeemedPositive</Method>
    <Method>$Parent:Ledger:$PartyLedgerName</Method>
    <Method>StockItemName:$StockItemName</Method>
    <Filters>NotSameLedger</Filters>

    </COLLECTION>
    <COLLECTION NAME="MyVoucherCollectionSrc" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
    <Type>Vouchers</Type>
    <Filters>IsSundryDebtorsOrCreditors</Filters>
    <NativeMethod>Date,VoucherTypeName,VoucherNumber,LedgerName,Amount,IsDeemedPositive,Parent</NativeMethod>
    </COLLECTION>
    <SYSTEM TYPE="Formulae" NAME="NotSameLedger" ISMODIFY="No" ISFIXED="No" ISINTERNAL="No">$LedgerName!=$PartyLedgerName </SYSTEM>
    <SYSTEM TYPE="Formulae" NAME="IsSundryDebtorsOrCreditors">
    $$IsLedOfGrp:$PartyLedgerName:$$GroupSundryDebtors OR $$IsLedOfGrp:$PartyLedgerName:$$GroupSundryCreditors</SYSTEM>
    </TDLMESSAGE>
    </TDL>
    </DESC>
    </BODY>
    </ENVELOPE>
     

    Attached Files:



Share This Page