Explore Categories

 

 PDF

Understanding Integration –Transactions

Introduction

The Voucher is the document used for recording all type of transactions in accounting standards. It can be either impact of cash or material between two entities. There are various voucher types available in Tally to categorize the transactions as Purchase, Sales, Payment, Receipt, Journal etc.  The details of all  voucher types available here

Sales Transaction

Here the Sales voucher is considered for explaining the integration of sales vouchers from TPA to Tally.

Sales voucher type used to record the sales transactions of an organization. A bill is generated on sale of goods or services provided or both sales and services. All these requirements fulfilled in Tally. There are two modes, ‘As voucher’ and ‘As invoice’, available in Tally to record the sales transactions. Both the mode supports to enter the transactions with or without inventory details. The mode ‘As Invoice’ prints the voucher in Invoice format and it can be hand it over to the Buyer / Party for proof of transaction.

  • The mandatory XML tags for a Sale transaction is given below. However, it has to specified depends upon the mode of transaction. The structure and hierarchy of each mode explained below with sample XML requests.

Tags

Data Type

Permissible
Values

Description

VOUCHER VCHTYPE=”VOUCHERTYPENAME” ACTION=”Create” OBJVIEW=”Accounting Voucher View”

Static Values

VCHTYPE is to provide voucher type name
ACTION is to provide action name
OBJVIEW is to provide the object view

This is opening tag for voucher where the OBJVIEW parameter decides the type of voucher, vchtype informs about voucher type and action undertakes the action to be performed on object voucher

PERSISTEDVIEW

String

Accounting Voucher View
Invoice Voucher View
Inventory Voucher View
Pay Slip Voucher View
Consumption Voucher View
Multi Consumption Voucher View

To identify the Voucher behaviour.

VOUCHERTYPENAME

String

Name of the voucher type

To provide voucher type name

DATE

Date

Uni date in format of yyyymmdd

To provide date for the voucher

ISINVOICE

Logical

Boolean

To identify whether the voucher should be recorded as invoice or voucher.

ALLLEDGERENTRIES.LIST

List Tag

  To provide ledger details of the voucher

LEDGERNAME

String

Ledger Name

To provide ledger name

ISDEEMEDPOSITIVE

Logical

Boolean

This tag decides whether the ledger amount to be debited or credited. In sales voucher this should be set to YES for all debiting a ledger

ISPARTYLEDGER

Logical

Boolean

To identify whether the ledger is a party ledger or not

AMOUNT

Amount

Amount

To provide amount for the ledger

BILLALLOCATIONS.LIST

List Tag

 

This is opening tag for providing bill details for party ledger and is mandate only for party ledger. For other ledgers the tag is not required

NAME

String

Text

To provide name / number for the bill

BILLTYPE

String

Advance
Agst Ref
New Ref
On Account

To identify the payment type received from party. This would impact bill outstanding report

AMOUNT

Amount

Amount

To provide bill amount

/BILLALLOCATIONS.LIST

List Tag

 

This is closing tag of bill allocation

/ALLLEDGERENTRIES.LIST

List Tag

 

This is closing tag for ledger details

ALLINVENTORYENTRIES.LIST

List Tag

 

This is opening tag for Inventory Entries of voucher

STOCKITEMNAME

String

 

To provide stock item name

ISDEEMEDPOSITIVE

Logical

Boolean

This tag is set to NO for outward transactions

ACTUALQTY

Quantity

Number

To provide actual quantity of the item

BILLEDQTY

Quantity

Number

To provide billed quantity of the item

RATE

Rate

Number

To provide rate for billed quantity

AMOUNT

Amount

 

To provide amount for the item

ACCOUNTINGALLOCATIONS.LIST

List Tag

 

This is the opening tag to provide accounting details for item

LEDGERNAME

String

Text

To provide sales / Tax ledger name

ISDEEMEDPOSITIVE

Logical

Boolean

This tag decides whether the ledger amount to be debited or credited. In sales voucher this should be set to No for Sales ledger

AMOUNT

Number

Amount

To provide amount for the ledger

/ACCOUNTINGALLOCATIONS.LIST

List Tag

 

This is a closing tag for accounting allocations

BATCHALLOCATIONS.LIST

List Tag

#NA

This is opening tag for Batch allocations

GODOWNNAME

String

 

To provide godown name. Incase godown is not enabled but batch is used the value has to be Main Location

BATCHNAME

String

 

To provide batch name. Incase batch is not enabled but godown / tracking number is used the value has to be Primary Batch

AMOUNT

Amount

 

This tag is to provide amount for batch

ACTUALQTY

Quantity

 

This tag is to provide actual quantity sent by the supplier. This would affect all inventory reports

BILLEDQTY

Quantity

 

To provide the quantity billed

/BATCHALLOCATIONS.LIST

List Tag

 

This is a closing tag for Batch allocations

/ALLINVENTORYENTRIES.LIST

List Tag

 

This is a closing tag for Inventory Entries of voucher

/VOUCHER

List Tag

 

This is a closing tag for voucher

Sales Transaction – As Voucher

The voucher mode is the traditional way to record an entry with only the accounting information, i.e. Recording the entry in Dr-Cr or By-To format to specify ledger amount either debit and credit.

Sample XML Request for Creating a sales transaction in voucher mode

<ENVELOPE>

<HEADER>

   <VERSION>1</VERSION>

   <TALLYREQUEST>Import</TALLYREQUEST>

   <TYPE>Data</TYPE>

   <ID>Vouchers</ID>

</HEADER>

<BODY>

<DESC>

</DESC>

<DATA>

<TALLYMESSAGE>

<VOUCHER>

    <DATE>20160401</DATE>

    <VOUCHERTYPENAME>Sales</VOUCHERTYPENAME>

    <VOUCHERNUMBER>1</VOUCHERNUMBER>

    <PERSISTEDVIEW>Accounting Voucher View</PERSISTEDVIEW>

    <ISINVOICE>No</ISINVOICE>

    <LEDGERENTRIES.LIST>

      <LEDGERNAME>ABC Company Limited</LEDGERNAME>

      <ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>

      <ISPARTYLEDGER>Yes</ISPARTYLEDGER>

      <ISLASTDEEMEDPOSITIVE>Yes</ISLASTDEEMEDPOSITIVE>

      <AMOUNT>-215476.00</AMOUNT>

    </LEDGERENTRIES.LIST>

    <LEDGERENTRIES.LIST>

         <LEDGERNAME>Sales</LEDGERNAME>

         <ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>

         <AMOUNT>21546.00</AMOUNT>

     </LEDGERENTRIES.LIST>

</VOUCHER>

</TALLYMESSAGE>

</DATA>

</BODY>

</ENVELOPE>

Note 1: The inventory details can be added by just adding the below tags under sales ledger as the inventory details are the break-up of sales ledger.

 

  <INVENTORYALLOCATIONS.LIST>

        <STOCKITEMNAME>SAMSUNG DVD PLAYER</STOCKITEMNAME>

        <ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>

        <AMOUNT>21546.00</AMOUNT>

        <ACTUALQTY> 1 nos</ACTUALQTY>

        <BILLEDQTY> 1 nos</BILLEDQTY>

        <BATCHALLOCATIONS.LIST>

         <GODOWNNAME>Factory</GODOWNNAME>

         <BATCHNAME>Primary Batch</BATCHNAME>

         <AMOUNT>21546.00</AMOUNT>

         <ACTUALQTY> 1 nos</ACTUALQTY>

         <BILLEDQTY> 1 nos</BILLEDQTY>

        </BATCHALLOCATIONS.LIST>

       </INVENTORYALLOCATIONS.LIST>

Note 2: As stated earlier, an invoice can be recorded without inventory entries for the purpose of preparing service bills by changing below mentioned two tags. Such transactions called as ‘Accounting Invoice’ in Tally.

<PERSISTEDVIEW>Invoice Voucher View</PERSISTEDVIEW>

<ISINVOICE>Yes</ISINVOICE>

Sales Transaction – As Invoice

The Item invoice recorded in Tally using the Invoice mode where the calculations can be automated and the user can experience the ease of feeding the transactions into the system. The invoice mode is the modern way to record an entry, i.e., you simply provide required data and an auto calculation would take place.

Voucher Creation

This below mentioned XML request imports a voucher, As Item Invoice, in TallyPrime. The same can be viewed in the reports where the sales transactions are captured, For example: Day Book, Sales Register, etc.

Sample XML Request for creating a sales transaction in Invoice Mode

<ENVELOPE>

<HEADER>

     <VERSION>1</VERSION>

     <TALLYREQUEST>Import</TALLYREQUEST>

     <TYPE>Data</TYPE>

     <ID>Vouchers</ID>

</HEADER>

<BODY>

<DESC></DESC>

<DATA>

<TALLYMESSAGE>

<VOUCHER>

  <DATE>20160401</DATE>

  <VOUCHERTYPENAME>Sales</VOUCHERTYPENAME>

  <VOUCHERNUMBER>1</VOUCHERNUMBER>

  <PERSISTEDVIEW>Invoice Voucher View</PERSISTEDVIEW>

  <ISINVOICE>Yes</ISINVOICE>

  <OBJVIEW>Invoice Voucher View</OBJVIEW>

  <LEDGERENTRIES.LIST>

    <LEDGERNAME>ABC Company Limited</LEDGERNAME>

    <ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>

    <ISPARTYLEDGER>Yes</ISPARTYLEDGER>

    <ISLASTDEEMEDPOSITIVE>Yes</ISLASTDEEMEDPOSITIVE>

    <AMOUNT>-21546.00</AMOUNT>

    <BILLALLOCATIONS.LIST>

       <NAME>1</NAME>

       <BILLTYPE>New Ref</BILLTYPE>

       <AMOUNT>-21546.00</AMOUNT>

   </BILLALLOCATIONS.LIST>

</LEDGERENTRIES.LIST>

<LEDGERENTRIES.LIST>

   <LEDGERNAME>Packing Charges</LEDGERNAME>

   <ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>

   <AMOUNT>900.00</AMOUNT>

</LEDGERENTRIES.LIST>

<LEDGERENTRIES.LIST>

   <BASICRATEOFINVOICETAX.LIST TYPE=”Number”>

   <BASICRATEOFINVOICETAX> 14</BASICRATEOFINVOICETAX>

   </BASICRATEOFINVOICETAX.LIST>

   <ROUNDTYPE/>

   <LEDGERNAME>VAT</LEDGERNAME>

   <ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>

   <AMOUNT>2646.00</AMOUNT>

</LEDGERENTRIES.LIST>

<ALLINVENTORYENTRIES.LIST>

   <STOCKITEMNAME>Sony Television 14 inches</STOCKITEMNAME>

   <ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>

   <RATE>15000.00/nos</RATE>

   <AMOUNT>15000.00</AMOUNT>

   <ACTUALQTY> 1 nos</ACTUALQTY>

   <BILLEDQTY> 1 nos</BILLEDQTY>

    <BATCHALLOCATIONS.LIST>

        <GODOWNNAME>Main Location</GODOWNNAME>

        <BATCHNAME>Primary Batch</BATCHNAME>

        <DESTINATIONGODOWNNAME>Main Location</DESTINATIONGODOWNNAME>

        <AMOUNT>15000.00</AMOUNT>

        <ACTUALQTY> 1 nos</ACTUALQTY>

        <BILLEDQTY> 1 nos</BILLEDQTY>

     </BATCHALLOCATIONS.LIST>

     <ACCOUNTINGALLOCATIONS.LIST>

          <LEDGERNAME>Sales</LEDGERNAME>

          <ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>

          <AMOUNT>15000.00</AMOUNT>

      </ACCOUNTINGALLOCATIONS.LIST>

   </ALLINVENTORYENTRIES.LIST>

   <ALLINVENTORYENTRIES.LIST>

      <STOCKITEMNAME>Samsung DVD Player</STOCKITEMNAME>

      <ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>

      <RATE>3000.00/nos</RATE>

      <AMOUNT>3000.00</AMOUNT>

      <ACTUALQTY> 1 nos</ACTUALQTY>

      <BILLEDQTY> 1 nos</BILLEDQTY>

    <BATCHALLOCATIONS.LIST>

       <GODOWNNAME>Main Location</GODOWNNAME>

       <BATCHNAME>Primary Batch</BATCHNAME>

       <DESTINATIONGODOWNNAME>Main Location</DESTINATIONGODOWNNAME>

            <AMOUNT>3000.00</AMOUNT>

            <ACTUALQTY> 1 nos</ACTUALQTY>

            <BILLEDQTY> 1 nos</BILLEDQTY>

        </BATCHALLOCATIONS.LIST>

        <ACCOUNTINGALLOCATIONS.LIST>

             <LEDGERNAME>Sales</LEDGERNAME>

             <ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>

             <AMOUNT>3000.00</AMOUNT>

         </ACCOUNTINGALLOCATIONS.LIST>

       </ALLINVENTORYENTRIES.LIST>

   </VOUCHER>

</TALLYMESSAGE>

</DATA>

</BODY>

</ENVELOPE>

XML Response

On processing the above request for importing vouchers, the requested vouchers are created in Tally and the returns the response as mentioned below:

The above XML Response is a log of vouchers created, altered, combined, ignored or not imported due to some errors. It also contains information pertaining to last Voucher ID imported.

Voucher Alteration

In case of voucher alteration or cancellation, a vital information required is voucher identifier. Identification of voucher can be achieved through Master ID, Voucher Number, Voucher Type and date

Sample XML Request for Voucher Alteration

<ENVELOPE>

      <HEADER>

         <VERSION>1</VERSION>

         <TALLYREQUEST>Import</TALLYREQUEST>

         <TYPE>Data</TYPE>

         <ID>Vouchers</ID>

      </HEADER>

    <BODY>

    <DESC></DESC>

    <DATA>

    <TALLYMESSAGE>

       <VOUCHER DATE=”01-Apr-2016″ TAGNAME =”Voucher Number”

                TAGVALUE=”1″ Action=”Alter” VCHTYPE = “Sales”>

       <NARRATION>Being Goods sold</NARRATION>

       </VOUCHER>

    </TALLYMESSAGE>

    </DATA>

    </BODY>

</ENVELOPE>

Voucher Cancellation

Voucher cancellation is similar to above Voucher Alteration. For Voucher Cancellation, Action must be set to “Cancel”.

Sample XML Request for cancellation

<ENVELOPE>

<HEADER>

  <VERSION>1</VERSION>

  <TALLYREQUEST>Import</TALLYREQUEST>

  <TYPE>Data</TYPE>

  <ID>Vouchers</ID>

 </HEADER>

 <BODY>

   <DESC></DESC>

   <DATA>

   <TALLYMESSAGE>

   <VOUCHER DATE=”01-Apr-2016″ TAGNAME = “VoucherNumber” TAGVALUE=”2″

    ACTION=”Cancel” VCHTYPE = “Sales”>

      <NARRATION>Being good returned</NARRATION>

   </VOUCHER>

   </TALLYMESSAGE>

</DATA>

</BODY>

</ENVELOPE>

Guidelines

To understand or import the values of other than mandatory tags, create the expected voucher entry in TallyPrime and export the same in XML format. This is the format of the XML the TPA must generate. So, pick up the relevant tags from here and place it as per the hierarchy in your XML request.

Examples of few possible errors

 DESC not found

Sample XML response:

<ENVELOPE>

  <HEADER>

     <VERSION>1</VERSION>

     <STATUS>0</STATUS>

   </HEADER>

   <BODY>

     <DATA>DESC not found </DATA>

   </BODY>

</ENVELOPE>


Solution: Ensure the specified masters in the XML are created and available in Tally

Voucher totals do not match! 

 Sample XML response:

<ENVELOPE>

<HEADER>

    <VERSION>1</VERSION>

    <STATUS>0</STATUS>

 </HEADER>

 <BODY>

 <DATA>

   <LINEERROR>Voucher totals do not match! Dr: 20,394.00 Dr Cr: 20,395.00 Cr Diff: 1.00 Cr</LINEERROR>

   <CREATED>0</CREATED>

   <ALTERED>0</ALTERED>

   <DELETED>0</DELETED>

   <LASTVCHID>0</LASTVCHID>

   <LASTMID>0</LASTMID>

   <COMBINED>0</COMBINED>

   <IGNORED>0</IGNORED>

   <ERRORS>1</ERRORS>

   <CANCELLED>0</CANCELLED>

   <VCHNUMBER>1</VCHNUMBER>

   <DESC></DESC>

   </DATA>

</BODY>

</ENVELOPE>


Solution: Ensure the total of debit amounts are equals to the total of credit amounts

Apart from the XML response, the statistics of import execution logs the file Tally.imp as well, under the folder where the TallyPrime is installed

Prerequisites to import Vouchers

  • Make sure that the necessary masters (Ledger, Stock Item, UOM, etc.) exists in TallyPrime
  • In case non-base currencies are used, make sure these currencies are available in TallyPrime
  • The totals of Debit values and Credit values of Voucher should be equal
  • All dates must follow the YYYYMMDD format.
TallyHelpwhatsAppbanner
Is this information useful?
YesNo
Helpful?
/* */