Resources / Guide
Tally masters cleansing checklist
Clean Tally ledgers, groups, units and GSTINs before a NetSuite migration. Free Excel checklist with formulas and Python snippets for each check.
Tally masters are the ledgers, groups, units and stock items a company has built up over the years. Before they move to NetSuite, five kinds of problem need a decision: duplicates, unused ledgers, unit variants, group mapping and GSTIN errors. The Excel checklist on this page has one sheet for each, with the check, how to spot it in a Tally export, a formula or Python snippet, what to do, and a status column.
The quick way: Upload the client's Tally backup to mark. and it reads the company's ledgers, groups, vouchers, trial balance, bills and stock, checks its totals against Tally's own, and gives you the real masters to cleanse. Start a free trial
Download: tally-masters-cleansing-checklist.xlsx
What the workbook contains
The file has seven sheets:
- Read me: how to use the file and where each check comes from.
- Paste ledger list: paste the exported ledger list here and the helper columns flag duplicates, unused ledgers and GSTIN problems.
- Duplicates, Unused ledgers, Unit variants, Group mapping and GSTIN checks: the checklists, each with a Status drop-down (Not started, In progress, Done, Not applicable).
- Python snippets: the same checks for lists too long for a spreadsheet.
The three sample rows on the paste sheet are made up. Delete them before you paste real data.
Start with an export, one file per company
Export the ledger list with name, group, GSTIN and opening balance, and the stock item list with name and unit. Export each Tally company separately and keep the files apart, because one client often runs several companies and the masters differ between them.
TallyPrime's Chart of Accounts is the place to see every master in one list. Tally's help describes it as "a consolidated list of all masters, such as accounting, inventory, and payroll" that lets you create and alter multiple masters at once and identify unused ones (View and Manage Masters in Chart of Accounts). Press Alt+G, choose Chart of Accounts, then pick Ledgers. Press F5 for the ledger view.
The checks below flag records for a person to decide. Merging, deleting and renaming inside the client's company is the client accountant's call.
1. Duplicates
A duplicate is one party or item entered twice. The common causes are small spelling differences, a party that buys and sells, and branches entered as separate ledgers.
Spelling variants are the easiest to find. Sort the ledger list by name and read the neighbours. Names that differ only in case, full stops, commas, "&" against "and", or "Pvt Ltd" against "Private Limited" sit next to each other. A match key makes the computer do the reading. The workbook builds one in column F of the paste sheet:
=TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(
UPPER(A2),".",""),",","")," PRIVATE LIMITED"," PVT LTD"),"LIMITED","LTD"),"&","AND")," "," "))
Column G then reads Check wherever two rows share a key, using =COUNTIF($F$2:$F$2000,F2)>1.
A worked example. A ledger list has 1,200 rows. After the match key runs, 38 keys appear twice. Of those, 31 are the same party typed two ways, 4 are branches of one party with separate GSTINs, and 3 are one name under both Sundry Debtors and Sundry Creditors, a customer who is also a vendor. The first 31 merge, the 4 stay as separate address records, and the 3 get a decision from the finance lead. The list of 38 is the agenda for a 30-minute call.
A repeated GSTIN is the second signal. Sort by GSTIN and look for the same number against different names. The same party entered twice merges. Two branches share a PAN but carry different GSTINs, so a repeated full GSTIN points at the same party twice.
Tally lets the client clean up before the move if they choose. Its help states that you can delete a ledger "if it is no longer required, created by mistake, or is a duplicate", and lists what blocks deletion: the ledger is predefined, has transactions, or is used in another master or feature (Chart of Accounts). A duplicate that carries vouchers stays in the source company. In the migration file it maps to the surviving ledger.
2. Unused ledgers
Unused ledgers have no vouchers and no opening balance. TallyPrime finds them for you: in Chart of Accounts press Ctrl+J for Exception Reports and choose Show Unused (Chart of Accounts). The same screen lists unused groups and stock items.
From an export, the test is two zeros. In the workbook, column J on the paste sheet reads Check where the opening balance and the voucher count are both zero. In Python:
df = pd.read_csv("ledgers.csv")
print(df[(df["opening"].fillna(0) == 0) & (df["vouchers"].fillna(0) == 0)])
Example: of 1,200 ledgers, 190 show no opening balance and no vouchers. Another 60 carry an opening balance and no vouchers this year, which means they carry a balance forward. Those 60 stay because they feed the opening balance load. The 190 go on an exclusion list. Keep the exclusion list as a record of what was left behind and why.
Ledgers used only in earlier years are a separate case. They have no movement after the cut-over year and a zero closing balance. Ask the accountant whether history on those is needed in NetSuite. Opening balances at the cut-over date need live ledgers only.
3. Unit variants
Tally stores a unit as a symbol. Over the years the same unit gets typed as Kg, KG, Kgs and kgs, or Nos, No. and Pcs. NetSuite wants one unit list. The cleansing job is a table from each Tally symbol to one standard unit.
Tally's help explains the unit types to expect. A simple unit has a symbol and a formal name, such as pcs and Pieces. A compound unit relates two units by a conversion and "can be created up to any level", for example "milligram < gram < kilogram < quintal < tonne". A stock item can also carry an alternate unit with a conversion factor against the primary one (Create and Alter Units of Measurement). Each of the three needs its own question for the client: which become NetSuite units, which become conversion rates, and which retire.
The Python snippet in the workbook groups spellings under a key that ignores case, full stops, spaces and a trailing "s":
it = pd.read_csv("items.csv")
it["unit_key"] = it["unit"].astype(str).str.upper().str.replace(r"[. ]", "", regex=True).str.rstrip("S")
g = it.groupby("unit_key")["unit"].agg(spellings=lambda s: sorted(set(s)), items="count")
print(g[g["spellings"].map(len) > 1])
On a test list of five rows it returns KG: [KGS, Kg] and NO: [No., Nos]. Each pair of spellings goes to the storekeeper, who knows whether a "bag" is 25 kg or 50 kg. Pack sizes belong in a conversion factor. The unit name stays plain.
The second unit check finds one item with two units. Group the item list by name and count distinct units. An item bought in kilograms and sold in numbers needs a conversion in the item record, and the opening stock quantity converts with it. The opening inventory balances guide covers the load that follows.
4. Group mapping
Every ledger in Tally sits under a group, and the group tells you the ledger's nature. In the migration the group decides the NetSuite account type. The Group mapping sheet lists each group with its parent, a ledger count, the nature and the account type chosen.
Work the sheet in this order:
- List every group that has ledgers. Drop the empty ones (the unused groups from section 2).
- Give every group an account type. Custom groups under a standard parent may need a different type from the parent's.
- Check for the same group name under two parents. Rename in the cleaned copy so each name maps once.
- Fold single-ledger groups into their parent if the accountant agrees.
The full mapping for Sundry Debtors, Sundry Creditors, bank groups and tax ledgers is on the chart of accounts mapping page. Tally's own help for changing groups in bulk is the Multi Alter screen in Chart of Accounts, where you can "change the name of ledger, Group, and Opening Balance of the ledgers" (Chart of Accounts). The client can regroup there before export if the accountant prefers to fix the source.
5. GSTIN checks
A GSTIN is 15 characters. The CBIC registration flier gives the layout: "The first 2 digits of the GSTIN is the State code, next 10 digits are the PAN of the legal entity, the next two digits are for entity code, and the last digit is check sum number" (CBIC GST registration flier).
Laid out position by position:
| Positions | Content | Check |
|---|---|---|
| 1-2 | State code | Two digits; compare with the party's state |
| 3-12 | PAN | 5 letters, 4 digits, 1 letter |
| 13 | Entity number | Counts registrations on the same PAN in one state |
| 14 | Z on regular registrations in public format guides | Review any other letter before changing it |
| 15 | Check character | Calculated from the first 14 characters |
The CBIC flier groups positions 13 and 14 as the entity code. Public format guides describe position 14 as the letter Z and position 15 as a check character calculated from the first 14. The checklist treats both as flags to review, because an unusual character can be a typing error or a registration type the guides do not cover.
The sheet's formulas test the parts you can test in Excel:
Length: =LEN(C2)=15
State code: =ISNUMBER(--LEFT(C2,2))
PAN shape: =AND(ISNUMBER(--MID(C2,8,4)),
SUMPRODUCT(--(CODE(MID(C2,{3,4,5,6,7,12},1))>=65),
--(CODE(MID(C2,{3,4,5,6,7,12},1))<=90))=6)
Position 14:=MID(C2,14,1)="Z"
The check character takes a short script. This one follows the calculation described in public GSTIN format guides (each character gets a base-36 value, every second one is doubled, the digit sums add up, and the check character is what brings the total to a multiple of 36):
A = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def check_char(first14):
total = 0
for i, ch in enumerate(first14):
p = A.index(ch) * (1 if i % 2 == 0 else 2)
total += p // 36 + p % 36
return A[(36 - total % 36) % 36]
For the made-up number 27AAAAA0000A1Z2, check_char("27AAAAA0000A1Z") returns 2, so the number passes. Change the last character and it fails. A failure is a prompt to look the number up. The party's certificate or the GST portal has the final word.
TallyPrime has its own validation. On a party ledger, Alt+L (Fetch Details Using GSTIN/UIN) sends the number to the portal; Tally's help says an incorrect or invalid number is rejected with the message "Could not retrieve data" (Validate GSTIN/UIN of Parties). For many parties, the Validate Party GSTIN/UIN report does it in one pass, and a party whose GSTIN has fewer than 15 characters raises a confirmation screen first. Where the number is wrong, the fix is on the party ledger: Alt+G, Alter Master, Ledger, update the GSTIN/UIN and save (Invalid GSTIN).
Two more GSTIN checks are in the sheet. A blank GSTIN on a party under Sundry Debtors or Sundry Creditors needs one question: is the party unregistered? And characters 3 to 12 shared across parties show which ones are one legal entity with several registrations, which feeds the customer and vendor hierarchy in NetSuite.
Order of work
A sequence that avoids rework:
- Export the masters per company and paste the ledger list.
- Run the duplicates check, then the unused check, so the later checks run on a shorter list.
- Map groups on the cleaned list.
- Build the unit table on the item list.
- Run the GSTIN checks last, because duplicate parties often hold the same wrong number twice.
- Send each sheet's open rows to the accountant as one list, and record each answer in the Notes column.
Customer and vendor opening balances load from the cleaned party list; the opening balances guide has the steps. Cost centres carry their own decisions, covered in the cost centre mapping guide. The overall route is on the Tally to NetSuite migration page.
Doing it by hand, and with mark.
| By hand | With mark. |
|---|---|
| Sort the ledger list by name, build a match key, count repeated keys, and sort by GSTIN to find duplicates. | mark. reads the company's ledgers and vouchers, so duplicate checks run on the company's own ledger list. |
| Press Ctrl+J in Chart of Accounts for Show Unused, or test opening balance and voucher count both zero. | mark. reads vouchers and trial balance, so unused ledgers are visible from the company's own records. |
| Group unit spellings under a key and send each pair to the storekeeper. | mark. reads stock items and units, so the unit table starts from the company's own stock list. |
| List every group with ledgers, assign an account type, and check for the same group name under two parents. | mark. reads groups and ledgers, so the mapping starts from the company's real group list. |
| Test GSTIN length, state code, PAN shape, position 14, and the check character, then validate in Tally. | mark. reads ledgers, so the GSTIN checks start from the company's own party list. |
Do this step in mark.
mark. reads a client's Tally company from a data folder, a zip or an ERP 9 backup into a snapshot, and checks the reader's totals against Tally's own. The consultant works from the company's ledgers, groups, units and stock items. mark. lists duplicates and unit variants with the file each one came from, so the question to the accountant names the record and its source. The consultant decides each one, and the decisions go into the registers. Start a free trial or book a session.
The quick way is mark.: upload the client's Tally backup, read the company's real masters, and run your checks from there. Try it free.
Sources
- help.tallysolutions.com/charts-of-accounts/
- help.tallysolutions.com/units-of-measurement/
- help.tallysolutions.com/validate-party-gstin-uin/
- help.tallysolutions.com/company-invalid-gstin/
- cbic-gst.gov.in/pdf/e-version-gst-fliers/regn-GST-onlineversion-07june2017.pdf
Have mark. check this against the client's own files
mark. reads the client's files and sets each point against them, with the source beside it.
Twenty minutes on one client folder. Your 21-day trial opens on the call.