**Phase 1**
- [ ] State Doctype to have state code and state name https://bitbu…cket.org/mntechnique/gst_api/raw/3e9af570eb86600bd0a81c8ebad2c103dcb88c63/gst_api/fixtures/gst_india_state.json
- [x] Add link to State doctype in Address, Warehouse Address
- [ ] Copy Address from selected link to address_display (small text/html)
- [x] Add HSN Code Doctype to record Category and code https://bitbucket.org/mntechnique/gst_api/raw/3e9af570eb86600bd0a81c8ebad2c103dcb88c63/gst_api/fixtures/hsn_code.json
- [x] Link to HSN code in Item master
- [x] PAN to be added for all customers / suppliers https://github.com/frappe/erpnext/issues/8373
- [x] GSTIN to be added for company, Address and Warehouse
- [ ] Default tax account and template for SGST/CGST/IGST/UGST for Intra/Inter State
- [ ] In transactions, based on based on first 2 digits of source and target GSTIN, identify intra/inter state and accordingly set tax template.
- [x] Prepare data for GSTR1 Sales Invoice (Item-wise Sales Register)
- [x] Prepare data for GSTR2 Purchase Invoice (Item-wise Purchase Register)
- [ ] Prepare data for GSTR6 Input service distributors (Purchase Invoice for services)
- [ ] Prepare data for GSTR8 Annual Returns
- [ ] Reconciliation Tool for GSTR2A and Item-wise Purchase Register
- [ ] Manual Export of data via reports so that users can export xls, csv and submit it to their Auditors/Tax consultants
- [ ] GST on charges like transport, packing etc (Maintain Item for such charges as it has HSN codes and should be submitted in GSTR1 as line item)
- [x] Validation for GSTIN
- should be alphanumeric, 15 digits and first 2 digits should be state code
- [x] Add HSN Code on Sales/Purchase Invoice Item and item-wise sales/purchase register
- [ ] GST for stock transfer
- via Stock Entry
- Introduce tax table, item-wise tax calculation
- Fetch Addresses from Warehouse
- Validate that source and target warehouse belong to one state respectively
- [x] Patch
- Remove standard tax_id field from Supplier and create custom field where data exists
- Create State record based on value in Address
- Remove address fields from warehouse and patch to create address records
**Phase 2**
- [ ] Field to record GST Portal Username (The taxpayer who has registered on portal with a mobile number, otp will be sent to this number/username)
- [ ] Prepare Payload for GSP integration
e.g GSTR1 Payload (GSP - GST Server)
```
{
"gstin": "27AHQPA7588L1ZJ",
"fp": "122016",
"gt": 3782969.01,
"b2b": [
{
"ctin": "01AABCE2207R1Z5",
"inv": [
{
"inum": "S008400",
"idt": "24-11-2016",
"val": 729248.16,
"pos": "06",
"rchrg": "N",
"prs": "Y",
"od_num": "DR008400",
"od_dt": "20-11-2016",
"etin": "01AABCE5507R1Z4",
"itms": [
{
"num": 1,
"itm_det": {
"ty": "G",
"hsn_sc": "G1221",
"txval": 10000,
"irt": 3,
"iamt": 833.33,
"crt": 4,
"camt": 500,
"srt": 5,
"samt": 900,
"csrt": 2,
"csamt": 500
}
}
]
}
]
}
],
"b2ba": [
{
"ctin": "01AABCE2207R1Z5",
"inv": [
{
"oinum": "S008400",
"oidt": "24-11-2016",
"inum": "S008400",
"idt": "24-11-2016",
"val": 729248.16,
"pos": "06",
"rchrg": "N",
"prs": "Y",
"od_num": "DR008400",
"od_dt": "20-11-2016",
"etin": "01AABCE5507R1Z4",
"itms": [
{
"num": 1,
"itm_det": {
"ty": "G",
"hsn_sc": "G1221",
"txval": 10000,
"irt": 3,
"iamt": 833.33,
"crt": 4,
"camt": 500,
"srt": 5,
"samt": 900,
"csrt": 2,
"csamt": 500
}
}
]
}
]
}
],
"b2cl": [
{
"state_cd": "05",
"inv": [
{
"cname": "R_Glasswork Enterprise",
"inum": "B129840",
"idt": "14-04-2016",
"val": 1000.03,
"pos": "06",
"prs": "Y",
"od_num": "DR008400",
"od_dt": "20-11-2016",
"etin": "27AHQPA8875L1ZU",
"itms": [
{
"num": 1,
"itm_det": {
"ty": "S",
"hsn_sc": "S249",
"txval": 10000,
"irt": 3,
"iamt": 833.33,
"csrt": 2,
"csamt": 500
}
}
]
}
]
}
],
"b2cla": [
{
"state_cd": "05",
"inv": [
{
"oinum": "9266",
"oidt": "10-02-2016",
"cname": "Glass store shop",
"inum": "92661",
"idt": "10-01-2016",
"val": 784586.33,
"pos": "01",
"prs": "N",
"od_num": "DR008400",
"od_dt": "20-11-2016",
"etin": "27AHQPA8875L1ZU",
"itms": [
{
"num": 1,
"itm_det": {
"ty": "S",
"hsn_sc": "S2469",
"txval": 10000,
"irt": 3,
"iamt": 833.33,
"csrt": 2,
"csamt": 500
}
}
]
}
]
}
],
"b2cs": [
{
"state_cd": "05",
"ty": "G",
"hsn_sc": "G2469",
"txval": 10000,
"irt": 3,
"iamt": 500,
"crt": 4,
"camt": 500,
"srt": 5,
"samt": 900,
"csrt": 3,
"csamt": 833,
"prs": "Y",
"od_num": "DR008400",
"od_dt": "20-11-2016",
"etin": "20ABCDE7588L1ZJ",
"typ": "E"
}
],
"b2csa": [
{
"omon": "122016",
"oty": "S",
"ohsn_sc": "S2811",
"osupst_cd": "05",
"ty": "G",
"hsn_sc": "G811",
"state_cd": "05",
"txval": 10000,
"irt": 3,
"iamt": 500,
"crt": 4,
"camt": 500,
"srt": 5,
"samt": 900,
"csrt": 3,
"csamt": 833,
"prs": "Y",
"od_num": "DR008400",
"od_dt": "20-11-2016",
"etin": "20ABCDE7588L1ZJ",
"typ": "E"
}
],
"cdnr": [
{
"ctin": "01AAAAP1208Q1ZS",
"nt": [
{
"ntty": "C",
"nt_num": "533515",
"nt_dt": "23-09-2016",
"rsn": "Not mentioned",
"inum": "915914",
"idt": "23-09-2016",
"rchrg": "N",
"val": 10000,
"irt": 3,
"iamt": 833.33,
"crt": 4,
"camt": 500,
"srt": 5,
"samt": 900,
"csrt": 2,
"csamt": 500,
"etin": "01AAAAP1208Q1Z7"
}
]
}
],
"cdnra": [
{
"ctin": "01AAAAP1208Q1ZS",
"nt": [
{
"ntty": "C",
"rsn": "Not mentioned",
"ont_num": "533515",
"ont_dt": "23-09-2016",
"nt_num": "533515",
"nt_dt": "23-09-2016",
"inum": "915914",
"idt": "23-09-2016",
"rchrg": "N",
"val": 5225.28,
"irt": 3,
"iamt": 833.33,
"crt": 4,
"camt": 500,
"srt": 5,
"samt": 900,
"csrt": 2,
"csamt": 500,
"etin": "01AAAAP1208Q1Z7"
}
]
}
],
"at": [
{
"typ": "B2B",
"cpty": "12DEFPS5555D1Z2",
"state_cd": "12",
"doc_num": "100001",
"doc_dt": "10-03-2016",
"itms": [
{
"ty": "S",
"hsn_sc": "S9043",
"ad_amt": 100,
"irt": 3,
"iamt": 833.33,
"crt": 4,
"camt": 500,
"srt": 5,
"samt": 900,
"csrt": 2,
"csamt": 500
}
]
}
],
"ata": [
{
"typ": "B2B",
"ocpty": "R_Glasswork Enterprise",
"odoc_num": "A100001",
"odoc_dt": "10-03-2016",
"cpty": "Glasswork Enterprise",
"state_cd": "12",
"doc_num": "100001",
"doc_dt": "10-03-2016",
"itms": [
{
"ty": "S",
"hsn_sc": "S9043",
"ad_amt": 10,
"irt": 3,
"iamt": 833.33,
"crt": 4,
"camt": 500,
"srt": 5,
"samt": 900,
"csrt": 2,
"csamt": 500
}
]
}
],
"exp": [
{
"ex_tp": "WPAY",
"inv": [
{
"inum": "81542",
"idt": "12-02-2016",
"val": 995048.36,
"sbpcode": "ASB9950",
"sbnum": "84298",
"sbdt": "04-10-2016",
"prs": "Y",
"od_num": "DR008400",
"od_dt": "20-11-2016",
"itms": [
{
"ty": "G",
"hsn_sc": "G9207",
"txval": 10000,
"irt": 3,
"iamt": 833.33,
"crt": 4,
"camt": 500,
"srt": 5,
"samt": 900,
"csrt": 2,
"csamt": 500
}
]
}
]
}
],
"expa": [
{
"ex_tp": "WPAY",
"inv": [
{
"oinum": "81542",
"oidt": "12-02-2016",
"inum": "815421",
"idt": "22-02-2016",
"val": 995048.36,
"sbpcode": "ASB9950",
"sbnum": "84298",
"sbdt": "04-10-2016",
"prs": "Y",
"od_num": "DR008400",
"od_dt": "20-11-2016",
"itms": [
{
"ty": "G",
"hsn_sc": "G9207",
"txval": 10000,
"irt": 3,
"iamt": 833.33,
"crt": 4,
"camt": 500,
"srt": 5,
"samt": 900,
"csrt": 2,
"csamt": 500
}
]
}
]
}
],
"nil": [
{
"g": [
{
"sply_ty": "INTRB2B",
"expt_amt": 123.45,
"nil_amt": 1470.85,
"ngsup_amt": 1258.5
},
{
"sply_ty": "INTRB2C",
"expt_amt": 123.45,
"nil_amt": 1470.85,
"ngsup_amt": 1258.5
},
{
"sply_ty": "INTRAB2B",
"expt_amt": 123.45,
"nil_amt": 1470.85,
"ngsup_amt": 1258.5
},
{
"sply_ty": "INTRAB2C",
"expt_amt": 123.45,
"nil_amt": 1470.85,
"ngsup_amt": 1258.5
}
],
"s": [
{
"sply_ty": "INTRB2B",
"expt_amt": 123.45,
"nil_amt": 1470.85,
"ngsup_amt": 1258.5
},
{
"sply_ty": "INTRB2C",
"expt_amt": 123.45,
"nil_amt": 1470.85,
"ngsup_amt": 1258.5
},
{
"sply_ty": "INTRAB2B",
"expt_amt": 123.45,
"nil_amt": 1470.85,
"ngsup_amt": 1258.5
},
{
"sply_ty": "INTRAB2C",
"expt_amt": 123.45,
"nil_amt": 1470.85,
"ngsup_amt": 1258.5
}
]
}
],
"hsn": [
{
"data": [
{
"num": 1,
"ty": "G",
"hsn_sc": "1009",
"txval": 10.23,
"irt": 12.52,
"iamt": 14.52,
"crt": 78.52,
"camt": 78.52,
"srt": 12.34,
"samt": 12.9,
"csrt": 2,
"csamt": 500,
"desc": "Goods Description",
"uqc": "1",
"qty": 2.05,
"sply_ty": "INTRB2B"
}
]
}
],
"txpd": [
{
"typ": "B2B",
"cpty": "27ABCDE7588L1ZJ",
"inum": "533515",
"idt": "20-10-2016",
"doc_num": "533515",
"doc_dt": "23-09-2016",
"irt": 3,
"iamt": 833.33,
"crt": 4,
"camt": 500,
"srt": 5,
"samt": 900,
"csrt": 2,
"csamt": 500
}
]
}
```