Vouchers are duplicated when imported to Tally Prime

Discussion in 'Tally Developer' started by Researcher1, Nov 8, 2023.

    
  1. Researcher1

    Researcher1 Member


    When I exported vouchers based on a specific date and then imported them into Tally, all the vouchers were duplicated. However, on a subsequent attempt to import the same set of vouchers, they did not duplicate. Can Anyone explain why this happened.

    For example, I exported four vouchers from Tally and then imported them. After importing, the number of vouchers doubled to eight. However, when I attempted to import the same four vouchers again, they did not duplicate, and the voucher count remained at eight. Can you explain why this occurred?

    Note: This happens only with portable Tally Prime exe. When I tried with locally installed exe, there was no issue.
     


  2. Sai Vineeth

    Sai Vineeth Active Member


    As I Explained here
    Alter/Create Voucher request is not working properly in Tally portable exe | TDLeXperts-World's first online TDL (Tally Definition Language) community

    If you send voucher with RemoteId, it will alter if voucher with same remoteId exists else, it will create new one.

    To clarify on portable Tally Prime, every installation of tally is portable exe only.
    So, there will be no difference in app whether you copied from folder or installed through installer.
     


  3. Researcher1

    Researcher1 Member


    The issue was resolved when the "Overwrite voucher when a voucher with the same GUID exists" option was set to "Yes" in the Import configuration in Tally.

    Now, I would like to know if it's possible to retrieve this tag value using a TDL XML request.
     


  4. Sai Vineeth

    Sai Vineeth Active Member


    You can set any import configuration through static variables
    For this setting use SVOverwriteImpVch

    Code:
     
    <STATICVARIABLES>
                    <SVOverwriteImpVch>Yes</SVOverwriteImpVch>
                </STATICVARIABLES>
    
     


  5. Researcher1

    Researcher1 Member


    Can you please modify this request so that It works for me. I just want to update this setting to'YES'
    Code:
    <ENVELOPE>
    <HEADER>
    <VERSION>1</VERSION>
    <TALLYREQUEST>Import Data</TALLYREQUEST>
    <TYPE>Import Configuration</TYPE>
    </HEADER>
    <BODY>
    <DESC>
    <STATICVARIABLES>
    <SVOverwriteImpVch>Yes</SVOverwriteImpVch>
    <SVCURRENTCOMPANY>Approved2</SVCURRENTCOMPANY>
    </STATICVARIABLES>
    </DESC>
    </BODY>
    </ENVELOPE>
     


  6. Sai Vineeth

    Sai Vineeth Active Member


    Not like that
    Use the same voucher XML you use to post data just add the required setting to staticVariable

    Code:
    <ENVELOPE>
    <HEADER>
    <TALLYREQUEST>Import Data</TALLYREQUEST>
    </HEADER>
    <BODY>
    <IMPORTDATA>
    <REQUESTDESC>
    <REPORTNAME>Vouchers</REPORTNAME>
    <STATICVARIABLES>
    <SVCURRENTCOMPANY>CompanyName</SVCURRENTCOMPANY>
    <SVOverwriteImpVch>Yes</SVOverwriteImpVch>
    </STATICVARIABLES>
    </REQUESTDESC>
    <REQUESTDATA>
    <TALLYMESSAGE xmlns:UDF="TallyUDF">
    <VOUCHER>
    .....Data ..
    </VOUCHER>
    </TALLYMESSAGE>
    </REQUESTDATA>
    </IMPORTDATA>
    </BODY>
    </ENVELOPE>
    
     
    naren1234 likes this.


  7. Researcher1

    Researcher1 Member


    Thank you , for your time, patience and efforts in answering us
     
    Sai Vineeth likes this.


  8. Researcher1

    Researcher1 Member


    I want this XML request setting to overwrite the GUI -("Overwrite voucher when a voucher with the same GUID exists" option ) setting. For example , If in XML request i have mentioned overwrite as "yes " . but in Tally GUI the setting is "no". This is causing exceptions . I want the XML setting to override the GUI setting . Can I do it ? If yes , how?
     


  9. Sai Vineeth

    Sai Vineeth Active Member


    the value you send in SVOverwriteImpVch will be taken into consideration irrespective what is set in Tally
     


  10. Researcher1

    Researcher1 Member


    can u please tell me how to set this using XML request? Can I use "<SVOverwriteImpVch>Yes</SVOverwriteImpVch>" while importing transactions also?
     


  11. Sai Vineeth

    Sai Vineeth Active Member


    Yes & you can use for transactions
     


  12. Researcher1

    Researcher1 Member


    it is not working, its creating duplicate vouchers in tally.

    I have set "Overwrite voucher when a voucher with the same GUID exists" option to No in GUI(tally).
    and imported 'daybook ' report exported from tally by adding below tag as you mentioned,still not working.
     


Share This Page