XML for bills payables and bills receivables with MasterId and AlterId from Tally

Discussion in 'Tally & TDL Learning HUB' started by Rutal Jadav, Jul 26, 2022.

    
  1. Sai Vineeth

    Sai Vineeth Active Member


    In older versions delete means delete
    deleted Items cannot be restored
    Instead of deleting you can cancel voucher or mark as optional
     
    Last edited: Aug 9, 2022


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    There is a OLD thread about "RECYCLE BIN" for Tally.......... find it, try it and see if it fits your requirements.
     


  3. Rutal Jadav

    Rutal Jadav Member


    Is it possible to find out whether the tally is open or not without knowing the port number?

    For Example, we hit "http://localhost:9000" if our tally port is 9000 but what if we didn't know the tally port number?
    Is there any alternate way to find that tally is open or not if open then on which port number it's working currently?
     


  4. Rutal Jadav

    Rutal Jadav Member


    Okay, I got that. One more thing I want to know is,

    Is it possible to find out whether the tally is open or not without knowing the port number?

    For Example, we hit "http://localhost:9000" if our tally port is 9000 but what if we didn't know the tally port number?
    Is there any alternate way to find that tally is open or not if open then on which port number it's working currently?
     


  5. Sai Vineeth

    Sai Vineeth Active Member


    You can iterate through all the process and compare with name (Tally Prime or Tally ERP 9)
    Open exe location of process
    Open File - tally.ini from exe location
    Search for ServerPort=* in File
    The value of server port will be value on which Tally opens port
     


  6. Rutal Jadav

    Rutal Jadav Member


    Yes, I have already followed that way but getting issues when tally users install Tally ERP9 or Tally Prime not at the pre-defined specified location in C drive but somewhere else. No matter we can handle it that way.

    Is it possible to get which Tally version is open currently? (Eg: Some of the tally users install multiple tally versions on the same machine. So is it possible to get the current open tally version using XML?
     


  7. Sai Vineeth

    Sai Vineeth Active Member


    I never said to see default location,
    Current Process information have some information like name id and exe location and more
    If you filter current processes with name tally, you will find all tally processes and their location, whether is default or not
    upload_2022-9-7_12-13-30.png

    Yes, we can get version of Tally using below XML
    Code:
    <ENVELOPE>
        <HEADER>
            <VERSION>1</VERSION>
            <TALLYREQUEST>EXPORT</TALLYREQUEST>
            <TYPE>Function</TYPE>
            <ID>$$String</ID>
        </HEADER>
        <BODY>
            <DESC>
                <FUNCPARAMLIST>
                    <PARAM>
    if @@CapProductDetails contains "Tally.ERP 9" then $$SPrintf:@@CapProductDetails:@@VersionGetProductSeries:@@VersionReleaseString:@@VersionBuildString:@@ProductBitnessStr:($$String:@@MajorReleaseeFormula):($$String:@@MinorReleaseFormula):"0":@@CapBuildNumberFormula else $$SPrintf:@@CapProductDetails:@@VersionReleaseString:@@VersionBuildString:@@ProductBitnessStr:($$String:@@MajorReleaseeFormula):($$String:@@MinorReleaseFormula):"0":@@CapBuildNumberFormula
    </PARAM>
                </FUNCPARAMLIST>
            </DESC>
        </BODY>
    </ENVELOPE>
     
    Last edited: Sep 14, 2022


  8. Rutal Jadav

    Rutal Jadav Member


    Yes, I got the tally Version using above mention XML. Thank you.

    Is it possible to get deleted Master data (For Eg: Ledger, StockItem, Group, VoucherType, StockGroup, StockCategory, Unit, Godown, etc.) using MasterId or AlterId?

    I am using XML below to get all the Master data from the tally.

    <ENVELOPE>
    <HEADER>
    <VERSION>1</VERSION>
    <TALLYREQUEST>Export</TALLYREQUEST>
    <TYPE>Collection</TYPE>
    <ID>CustMasterColl</ID>
    </HEADER>
    <BODY>
    <DESC>
    <STATICVARIABLES>
    <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
    </STATICVARIABLES>
    <TDL>
    <TDLMESSAGE>
    <COLLECTION ISMODIFY="No" ISFIXED="No" ISINITIALIZE="Yes" ISOPTION="No" ISINTERNAL="No" NAME="CustMasterColl">
    <!-- * Tally Masters Types like Ledger, Group, StockItem ..etc., -->
    <TYPE>Ledger</TYPE>
    <FETCH>*,MASTERID,ALTERID</FETCH>
    <FILTERS>AlterIdFilter</FILTERS>
    </COLLECTION>
    <!-- * IF you want Between then $ALTERID &gt; '100' AND $ALTERID &lt; '120' -->
    <SYSTEM TYPE="Formulae" NAME="AlterIdFilter">$AlterID &gt; 0</SYSTEM>
    </TDLMESSAGE>
    </TDL>
    </DESC>
    </BODY>
    </ENVELOPE>
     


  9. Sai Vineeth

    Sai Vineeth Active Member


    No, you cannot get deleted masters
    If Edit log is enabled try
    Code:
    <IncludeDeleted>Yes</IncludeDeleted>
    inside collection
    Even by enabling edit log I am having trouble getting Deleted Masters don't know why
    But you can give it a try
     


  10. Rutal Jadav

    Rutal Jadav Member


    Is it possible to change the tally config file (For Eg: Tally acts as, ODBC or Tally Port) and change save changes forcefully while the tally instance is open?
     


  11. Maulik Patel

    Maulik Patel Active Member


    Yes, you can write a function in xml and change it but it will work unless and until the instance is open. When the instance is closing Tally is overwriting config file as per currently closing instance. So your configuration will be replaced with the instance's configuration.
     


  12. Sai Vineeth

    Sai Vineeth Active Member


    You can directly change File by changing text, but requires restarting tally to take effect
    Same approach is used in tally connector developed by and tested with Tally Prime
     


  13. Rutal Jadav

    Rutal Jadav Member


    Yes, I have already done it before but my problem is I have to restart the tally to apply those config file changes.
     


  14. Rutal Jadav

    Rutal Jadav Member


    Can you please elaborate and show me the XML?
     


  15. Sai Vineeth

    Sai Vineeth Active Member


    Yes, you need to restart tally to apply changes
    Even if you done these changes manually you need to restart tally
     


  16. Rutal Jadav

    Rutal Jadav Member


    Is it possible to get a tally license number with using this particular XML?
     


  17. Sai Vineeth

    Sai Vineeth Active Member


    Post new thread for newer questions, it will be helpful for others searching the same.

    You can get License Number or Any license information using
    $$LicenseInfo function
    Example is listed in this postman collection along with other commonly used xmls
     


  18. Rutal Jadav

    Rutal Jadav Member


    Yes, I will post a new thread accordingly.
    For that existing XML. What I am asking is. I am using mentioned XML for the tally version. Is it possible to get a tally license number within the same XML?

    <ENVELOPE>
    <HEADER>
    <VERSION>1</VERSION>
    <TALLYREQUEST>EXPORT</TALLYREQUEST>
    <TYPE>Function</TYPE>
    <ID>$$String</ID>
    </HEADER>
    <BODY>
    <DESC>
    <FUNCPARAMLIST>
    <PARAM>$$SPrintf@@CapProductDetails@@VersionReleaseString@@VersionBuildString@@ProductBitnessStr:$$String@@MajorReleaseeFormula):$$String@@MinorReleaseFormula):"0"@@CapBuildNumberFormula</PARAM>
    </FUNCPARAMLIST>
    </DESC>
    </BODY>
    </ENVELOPE>
     
    Last edited: Sep 20, 2022


  19. Sai Vineeth

    Sai Vineeth Active Member


    Using that XML, you can get single response only.

    If you want more details, create custom TDL report,
    Example I provided in this link https://documenter.getpostman.com/view/13855108/TzeRpAMt#3db1ca3f-ae96-4e08-abd8-e4fc37c6ddef as hyperlink
     
    Last edited: Sep 20, 2022


  20. Vtiger07

    Vtiger07 New Member


    Here VCHAlterId always gives first ledger entries masterid. How should we iterate and get all masterids if bill has more than one ledgerentries.
     


  21. Sai Vineeth

    Sai Vineeth Active Member


    Create a line that repeats over
    LedgerEntries
     


  22. Rutal Jadav

    Rutal Jadav Member


    Using this below mention XML to export Pending bills. Is possible to export FINALBALANCE (Total Balance) of Pending bill not only Closing Balance.
    For Example, Total bill Amount is 5000 and paid it partially half. So is it possible to get as Total Amount Or Final Balance is 5000 and Closing Balance is 2500.


    <ENVELOPE>
    <HEADER>
    <VERSION>1</VERSION>
    <TALLYREQUEST>Export</TALLYREQUEST>
    <TYPE>Data</TYPE>
    <ID>Bills Payable</ID>
    </HEADER>
    <BODY>
    <DESC>
    <STATICVARIABLES>
    <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
    </STATICVARIABLES>
    <TDL>
    <TDLMESSAGE>
    <Report ISMODIFY="Yes" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="Bills Payable">
    <LOCAL>LINE : BillDetail:XMLTAG:"BILL"</LOCAL>
    <LOCAL>LINE : BillDetail:FIELDS:MasterId</LOCAL>
    <LOCAL>LINE : BillDetail:FIELDS:AlterId</LOCAL>
    <LOCAL>LINE : BillDetail:FIELDS:GUID</LOCAL>
    </Report>
    <FIELD ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="MasterId">
    <SET>$MasterId</SET>
    </FIELD>
    <FIELD ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="AlterId">
    <SET>$AlterId</SET>
    </FIELD>
    <FIELD ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="GuId">
    <SET>$GuId</SET>
    </FIELD>
    <COLLECTION ISMODIFY="Yes" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No" NAME="Company Payables">
    <COMPUTE>AlterId:$LedgerEntries.AlterID</COMPUTE>
    <COMPUTE>MasterId:$LedgerEntries.MASTERID</COMPUTE>
    <COMPUTE>GuId:$LedgerEntries.GUID</COMPUTE>
    <FILTER>AlterIdFilter</FILTER>
    </COLLECTION>
    <SYSTEM TYPE="Formulae" NAME="AlterIdFilter">$LedgerEntries.AlterID &gt; 0</SYSTEM>
    </TDLMESSAGE>
    </TDL>
    </DESC>
    </BODY>
    </ENVELOPE>


    Result:

    <ENVELOPE>
    <BILL>
    <BILLFIXED>
    <BILLDATE>9-Nov-22</BILLDATE>
    <BILLREF>123</BILLREF>
    <BILLPARTY>Purchase Ledger</BILLPARTY>
    </BILLFIXED>
    <BILLCL>590.00</BILLCL>
    <MASTERID>7097</MASTERID>
    <ALTERID>13195</ALTERID>
    <GUID>76b505d4-a067-4007-9114-40f58c14c407-00001bb9</GUID>
    <BILLDUE>9-Dec-22</BILLDUE>
    <BILLOVERDUE></BILLOVERDUE>
    </BILL>
    </ENVELOPE>

    Expected Result:
    <ENVELOPE>
    <BILL>
    <BILLFIXED>
    <BILLDATE>9-Nov-22</BILLDATE>
    <BILLREF>123</BILLREF>
    <BILLPARTY>Purchase Ledger</BILLPARTY>
    </BILLFIXED>
    <BILLCL>2500</BILLCL>
    <FINALBALANCE>5000</FINALBALANCE>
    <MASTERID>7097</MASTERID>
    <ALTERID>13195</ALTERID>
    <GUID>76b505d4-a067-4007-9114-40f58c14c407-00001bb9</GUID>
    <BILLDUE>9-Dec-22</BILLDUE>
    <BILLOVERDUE></BILLOVERDUE>
    </BILL>
    </ENVELOPE>
     


Share This Page