Sales Vouchers With GST Without Inventory
Published
This exercise imports Sales Vouchers with GST — IGST for inter-state
sales, CGST and SGST for local sales — from Excel into Tally Prime. There are
no stock items. It builds on
the Sales Vouchers With Multiple Ledgers exercise
and shows how GROUPBY combines rows of the same invoice, how
SKIP leaves out the tax entries and tax ledgers that are not needed,
and how the GST details of the party and the tax ledgers are created.
The Excel sheet
Each row has the HSN/SAC code (column F), the taxable Amount (column I), the tax percentages and tax amounts (columns J to O) and the ledger names (columns P to S). Invoice 2 spans two rows with different tax rates, so both rows go into one voucher. The tax amounts are already calculated in the sheet.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | inv-no | inv-date | party | gstin | state | hsn | country | place-of-supply | amount | igst-perc | igst-amt | cgst-perc | cgst-amt | sgst-perc | sgst-amt | sales-ledger | igst-ledger | cgst-ledger | sgst-ledger | narration |
| 2 | 1 | 01/04/2026 | IGST Party | Maharashtra | 998313 | India | Maharashtra | 100 | 18 | 18 | Sales (IGST) @ 18% | igst @ 18% | ||||||||
| 3 | 2 | 01/04/2026 | Local Party | Gujarat | 998313 | India | Gujarat | 100 | 9 | 9 | 9 | 9 | Sales (Local) @ 18% | cgst @ 9% | sgst @ 9% | |||||
| 4 | 2 | 01/04/2026 | Local Party | Gujarat | 998313 | India | Gujarat | 100 | 6 | 6 | 6 | 6 | Sales (Local) @ 12% | cgst @ 6% | sgst @ 6% |
Step 1 — Create the Party Ledger master
The party is created under Sundry Debtors with bill-wise tracking on.
Its GST registration type depends on the GSTIN in column D: Regular when a
GSTIN is given, otherwise Unregistered. The country defaults to India when
column G is empty. For Tally Prime 3.0, the GST details go into
LEDGSTREGDETAILS.LIST (registration type, state, place of supply and
GSTIN) and the address into LEDMAILINGDETAILS.LIST. The place of
supply is taken from column H, or from the state in column E when column H is empty.
<!--
Excel columns in sales-with-gst-without-inventory.csv:
A = INV-NO B = INV-DATE C = PARTY
D = GSTIN E = STATE F = HSN
G = COUNTRY H = PLACE-OF-SUPPLY I = AMOUNT (taxable value)
J = IGST-PERC K = IGST-AMT
L = CGST-PERC M = CGST-AMT
N = SGST-PERC O = SGST-AMT
P = SALES-LEDGER Q = IGST-LEDGER R = CGST-LEDGER S = SGST-LEDGER
T = NARRATION
-->
<!-- Create Party Ledger Masters from Column C -->
<MASTER TYPE="LEDGER">
<NAME.LIST>
<NAME COLUMNREFERENCE="C"/>
</NAME.LIST>
<ADDITIONALNAME COLUMNREFERENCE="C"/>
<PARENT>Sundry Debtors</PARENT>
<ISBILLWISEON>Yes</ISBILLWISEON>
<ISCOSTCENTRESON>No</ISCOSTCENTRESON>
<GSTREGISTRATIONTYPE FORMULA="=if(len(trim(D#))=0,"Unregistered","Regular")"/>
<PARTYGSTIN FORMULA="=trim(D#)"/>
<COUNTRYNAME FORMULA="=if(len(trim(G#))=0,"India",G#)"/>
<STATENAME FORMULA="=proper(trim(E#))"/>
<LEDSTATENAME FORMULA="=proper(trim(E#))"/>
<!-- Tally Prime 3.0 -->
<LEDGSTREGDETAILS.LIST>
<APPLICABLEFROM>20260401</APPLICABLEFROM>
<GSTREGISTRATIONTYPE FORMULA="=if(len(trim(D#))=0,"Unregistered/Consumer","Regular")"/>
<STATE FORMULA="=proper(trim(E#))"/>
<PLACEOFSUPPLY FORMULA="=if(len(trim(H#))>0,proper(trim(H#)),proper(trim(E#)))"/>
<GSTIN FORMULA="=trim(D#)"/>
</LEDGSTREGDETAILS.LIST>
<LEDMAILINGDETAILS.LIST>
<APPLICABLEFROM>20260401</APPLICABLEFROM>
<MAILINGNAME COLUMNREFERENCE="C"/>
<STATE FORMULA="=proper(trim(E#))"/>
<COUNTRY FORMULA="=if(len(trim(G#))=0,"India",G#)"/>
</LEDMAILINGDETAILS.LIST>
</MASTER>
Step 2 — Create the Sales and Tax Ledger masters
The Sales ledger name is read from column P, and the name already carries the GST rate (for example Sales (Local) @ 18%). Each Sales ledger therefore holds exactly one GST rate, which is written into the ledger's GST details along with the HSN/SAC code from column F. The rate is the IGST percentage (column J), or CGST + SGST (columns L and N) when the IGST percentage is 0 or blank.
<!-- Create Sales Ledger Masters from Column P -->
<MASTER TYPE="LEDGER">
<NAME.LIST>
<NAME COLUMNREFERENCE="P"/>
</NAME.LIST>
<PARENT>Sales Accounts</PARENT>
<TAXTYPE>Others</TAXTYPE>
<ISBILLWISEON>No</ISBILLWISEON>
<ISCOSTCENTRESON>No</ISCOSTCENTRESON>
<AFFECTSSTOCK>No</AFFECTSSTOCK>
<USEFORVAT>No</USEFORVAT>
<GSTAPPLICABLE FORMULA="="~[~ Applicable""/>
<GSTTYPEOFSUPPLY>Services</GSTTYPEOFSUPPLY>
<GSTDETAILS.LIST>
<APPLICABLEFROM>20260401</APPLICABLEFROM>
<TAXABILITY>Taxable</TAXABILITY>
<SRCOFGSTDETAILS>Specify Details Here</SRCOFGSTDETAILS>
<ISREVERSECHARGEAPPLICABLE>No</ISREVERSECHARGEAPPLICABLE>
<ISNONGSTGOODS>No</ISNONGSTGOODS>
<STATEWISEDETAILS.LIST>
<STATENAME FORMULA="="~[~ Any""/>
<RATEDETAILS.LIST>
<GSTRATEDUTYHEAD>CGST</GSTRATEDUTYHEAD>
<GSTRATEVALUATIONTYPE>Based on Value</GSTRATEVALUATIONTYPE>
<GSTRATE FORMULA="=if(Round(L#,2)>0,Round(L#,2),Round(J#,2)/2)"/>
</RATEDETAILS.LIST>
<RATEDETAILS.LIST>
<GSTRATEDUTYHEAD>SGST/UTGST</GSTRATEDUTYHEAD>
<GSTRATEVALUATIONTYPE>Based on Value</GSTRATEVALUATIONTYPE>
<GSTRATE FORMULA="=if(Round(N#,2)>0,Round(N#,2),Round(J#,2)/2)"/>
</RATEDETAILS.LIST>
<RATEDETAILS.LIST>
<GSTRATEDUTYHEAD>IGST</GSTRATEDUTYHEAD>
<GSTRATEVALUATIONTYPE>Based on Value</GSTRATEVALUATIONTYPE>
<GSTRATE FORMULA="=if(Round(J#,2)>0,Round(J#,2),Round(L#,2)+Round(N#,2))"/>
</RATEDETAILS.LIST>
<RATEDETAILS.LIST>
<GSTRATEDUTYHEAD>Cess</GSTRATEDUTYHEAD>
<GSTRATEVALUATIONTYPE FORMULA="="~[~ Not Applicable""/>
<GSTRATE>0</GSTRATE>
</RATEDETAILS.LIST>
<RATEDETAILS.LIST>
<GSTRATEDUTYHEAD>State Cess</GSTRATEDUTYHEAD>
<GSTRATEVALUATIONTYPE>Based on Value</GSTRATEVALUATIONTYPE>
<GSTRATE>0</GSTRATE>
</RATEDETAILS.LIST>
</STATEWISEDETAILS.LIST>
</GSTDETAILS.LIST>
<HSNDETAILS.LIST>
<APPLICABLEFROM>20260401</APPLICABLEFROM>
<HSNCODE COLUMNREFERENCE="F"/>
<SRCOFHSNDETAILS>Specify Details Here</SRCOFHSNDETAILS>
</HSNDETAILS.LIST>
</MASTER>
The IGST, CGST and SGST ledgers are created under Duties & Taxes,
with the duty head (Integrated, Central or State Tax) and the rate taken from the
percentage columns. An import ignores a MASTER whose name is empty,
so SKIP is placed on the NAME tag, not on the
MASTER tag. The IGST ledger is therefore not created when the IGST
amount (column K) is 0. The CGST (ledger R, rate L, amount M) and SGST (ledger S,
rate N, amount O) masters follow the same pattern.
<!--
NOTE: udiMagic skips a MASTER when its NAME is empty. Hence, the SKIP condition
must be used on the NAME tag and NOT on the MASTER tag.
e.g. SKIP="=Round(K#,2)=0" on NAME skips the IGST ledger when IGST amount is 0.
-->
<!-- Create IGST Ledger Master from Column Q (only when IGST amount is non-zero) -->
<MASTER TYPE="LEDGER">
<NAME.LIST>
<NAME SKIP="=Round(K#,2)=0" COLUMNREFERENCE="Q"/>
</NAME.LIST>
<PARENT>Duties & Taxes</PARENT>
<ISCOSTCENTRESON>No</ISCOSTCENTRESON>
<AFFECTSSTOCK>No</AFFECTSSTOCK>
<GSTAPPLICABLE FORMULA="="~[~ Applicable""/>
<GSTDUTYHEAD>Integrated Tax</GSTDUTYHEAD>
<TAXTYPE>GST</TAXTYPE>
<RATEOFTAXCALCULATION COLUMNREFERENCE="J"/>
</MASTER>
<!-- Create CGST Ledger Master from Column R (only when CGST amount is non-zero) -->
<MASTER TYPE="LEDGER">
<NAME.LIST>
<NAME SKIP="=Round(M#,2)=0" COLUMNREFERENCE="R"/>
</NAME.LIST>
<PARENT>Duties & Taxes</PARENT>
<ISCOSTCENTRESON>No</ISCOSTCENTRESON>
<AFFECTSSTOCK>No</AFFECTSSTOCK>
<GSTAPPLICABLE FORMULA="="~[~ Applicable""/>
<GSTDUTYHEAD>Central Tax</GSTDUTYHEAD>
<TAXTYPE>GST</TAXTYPE>
<RATEOFTAXCALCULATION COLUMNREFERENCE="L"/>
</MASTER>
<!-- Create SGST Ledger Master from Column S (only when SGST amount is non-zero) -->
<MASTER TYPE="LEDGER">
<NAME.LIST>
<NAME SKIP="=Round(O#,2)=0" COLUMNREFERENCE="S"/>
</NAME.LIST>
<PARENT>Duties & Taxes</PARENT>
<ISCOSTCENTRESON>No</ISCOSTCENTRESON>
<AFFECTSSTOCK>No</AFFECTSSTOCK>
<GSTAPPLICABLE FORMULA="="~[~ Applicable""/>
<GSTDUTYHEAD>State Tax</GSTDUTYHEAD>
<TAXTYPE>GST</TAXTYPE>
<RATEOFTAXCALCULATION COLUMNREFERENCE="N"/>
</MASTER>
Step 3 — Write the Voucher tags
One Sales voucher is created for each invoice number. The GST details of the party (GSTIN, registration type, state, country and place of supply) are repeated on the voucher. Then come the ledger entries:
-
Party debit —
GROUPBY="=A#"groups all rows of the invoice into one entry. Its amount is the taxable value plus IGST, CGST and SGST, shown as a negative amount, and the same amount goes to the bill allocation. - Sales credit — grouped by the Sales ledger name with its rate, the same name used in the Sales ledger master. It sums the taxable values, so rows of one invoice at different rates become separate sales lines, each posted to its own ledger.
-
IGST, CGST and SGST credits — grouped by the tax ledger name
(columns Q, R and S), so rows with the same tax rate become one line.
SKIPdrops the entry when its tax amount is 0 or blank, so a local sale carries no IGST entry and an inter-state sale carries no CGST or SGST entries.
<!-- One Sales Voucher per invoice number in Column A -->
<VOUCHER>
<GUID FORMULA="="udi-SPB1-" & A#"/>
<DATE COLUMNREFERENCE="B"/>
<EFFECTIVEDATE COLUMNREFERENCE="B"/>
<VOUCHERTYPENAME>Sales</VOUCHERTYPENAME>
<VOUCHERNUMBER COLUMNREFERENCE="A"/>
<REFERENCE COLUMNREFERENCE="A"/>
<NARRATION COLUMNREFERENCE="T"/>
<ISINVOICE>Yes</ISINVOICE>
<PERSISTEDVIEW>Invoice Voucher View</PERSISTEDVIEW>
<!-- GST details of the party -->
<PARTYGSTIN FORMULA="=trim(D#)"/>
<GSTREGISTRATIONTYPE FORMULA="=if(len(trim(D#))=0,"Unregistered","Regular")"/>
<STATENAME FORMULA="=proper(trim(E#))"/>
<COUNTRYOFRESIDENCE FORMULA="=if(len(trim(G#))=0,"India",G#)"/>
<PLACEOFSUPPLY FORMULA="=if(len(trim(H#))>0,proper(trim(H#)),proper(trim(E#)))"/>
<PARTYNAME COLUMNREFERENCE="C"/>
<PARTYLEDGERNAME COLUMNREFERENCE="C"/>
<BASICBASEPARTYNAME COLUMNREFERENCE="C"/>
<BASICBUYERNAME COLUMNREFERENCE="C"/>
<!--
Party debit: GROUPBY=A# groups all rows of the invoice (e.g. invoice 2 spans two rows
with different tax rates). Debit = Taxable value + IGST + CGST + SGST, shown as negative.
-->
<LEDGERENTRIES.LIST GROUPBY="=A#">
<LEDGERNAME COLUMNREFERENCE="C"/>
<ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>
<AMOUNT FORMULA="={Round(I#,2)+Round(K#,2)+Round(M#,2)+Round(O#,2)}*-1"/>
<BILLALLOCATIONS.LIST SKIP="=Len(trim(A#))=0">
<NAME COLUMNREFERENCE="A"/>
<BILLTYPE>New Ref</BILLTYPE>
<AMOUNT FORMULA="={Round(I#,2)+Round(K#,2)+Round(M#,2)+Round(O#,2)}*-1"/>
</BILLALLOCATIONS.LIST>
</LEDGERENTRIES.LIST>
<!--
Sales credit: grouped by the Sales Ledger name with its rate (Column P),
which is the same name used in the Sales Ledger master above. Rows of one invoice with
different rates therefore become separate sales lines, each posted to its own ledger.
-->
<LEDGERENTRIES.LIST GROUPBY="=trim(P#)">
<LEDGERNAME COLUMNREFERENCE="P"/>
<ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>
<AMOUNT FORMULA="={Round(I#,2)}"/>
</LEDGERENTRIES.LIST>
<!--
GROUPBY = IGST/CGST/SGST ledger name (Columns Q/R/S) so that multiple rows of the
same invoice with the same tax rate are grouped into one line.
The SKIP condition skips the ledger if the amount is zero or blank.
-->
<!-- IGST credit: skipped when the IGST amount is 0 or blank -->
<LEDGERENTRIES.LIST GROUPBY="=trim(Q#)" SKIP="={Round(K#,2)}=0">
<LEDGERNAME COLUMNREFERENCE="Q"/>
<ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>
<AMOUNT FORMULA="={Round(K#,2)}"/>
</LEDGERENTRIES.LIST>
<!-- CGST credit: skipped when the CGST amount is 0 or blank -->
<LEDGERENTRIES.LIST GROUPBY="=trim(R#)" SKIP="={Round(M#,2)}=0">
<LEDGERNAME COLUMNREFERENCE="R"/>
<ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>
<AMOUNT FORMULA="={Round(M#,2)}"/>
</LEDGERENTRIES.LIST>
<!-- SGST credit: skipped when the SGST amount is 0 or blank -->
<LEDGERENTRIES.LIST GROUPBY="=trim(S#)" SKIP="={Round(O#,2)}=0">
<LEDGERNAME COLUMNREFERENCE="S"/>
<ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>
<AMOUNT FORMULA="={Round(O#,2)}"/>
</LEDGERENTRIES.LIST>
</VOUCHER>
Import into Tally
- Start Tally Prime and open the company you want to import into.
- Minimize Tally (leave it running).
- Start udiMagic and select
Excel to Tally. - Select option
Import data into Tally. - Browse to select both the Excel sheet and the XML tags file — you're prompted for the XML file on the same screen as the Excel sheet.
- Follow the wizard to complete the import.
- The ledger names for Sales, IGST, CGST and SGST come from columns P to S, so the voucher always matches the ledgers created in the masters. The names also carry the GST rate, for example Sales (Local) @ 18% and cgst @ 9%.
- Invoice 2 has two rows at different rates (9% + 9% and 6% + 6%). Both are combined into one voucher;
GROUPBYadds up the amounts per ledger, and each rate is posted to its own Sales ledger. - The tax amounts are not calculated by the XML tags. Calculate them in the sheet, for example
=I2*J2/100. - The Sales ledger is created with its GST rate and HSN/SAC code, so the voucher carries no GST rate override.
- Leave the GSTIN blank for an unregistered party. Fill the Place-of-Supply only when it differs from the party's state.
Ready to import your Excel data into Tally?
Download udiMagic and start a 14-day free trial — no credit card required.
Download udiMagic View Pricing