Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: GST Invoice Management System (IMS) Implementation #2638

Draft
wants to merge 182 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 178 commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
e14350d
fix: invoice management system api implementation
Ninad1306 Sep 23, 2024
10ebf51
fix: endpoint for ims api actions
Ninad1306 Sep 23, 2024
65a2a70
fix: api endpoint to get files data
Ninad1306 Sep 23, 2024
3d72bf1
fix: api endpoint for save and reset action
Ninad1306 Sep 24, 2024
f132bd0
fix: different methods not required
Ninad1306 Sep 24, 2024
e6cabfb
fix: api endpoint for request status of the action
Ninad1306 Sep 24, 2024
fa60325
Merge branch 'develop' of github.com:resilient-tech/india-compliance …
Ninad1306 Oct 15, 2024
f97eeb4
fix: save and reset should be put request
Ninad1306 Oct 15, 2024
cb6d465
fix: use APIs to save ims invoices
Ninad1306 Oct 16, 2024
f7167ef
fix: use APIs to reset ims invoices
Ninad1306 Oct 16, 2024
be36968
fix: use APIs to get invoices
Ninad1306 Oct 23, 2024
673373a
Merge branch 'develop' into ims_api_implementation
Ninad1306 Oct 25, 2024
153ab13
Merge branch 'ims_api_implementation' of github.com:Ninad1306/india-c…
Ninad1306 Oct 25, 2024
d629eb9
fix: doctype creation
Ninad1306 Oct 25, 2024
052eaf8
fix: required fields
Ninad1306 Oct 25, 2024
655994c
fix: ims actions ui
Ninad1306 Oct 25, 2024
50df652
fix: ims actions backend implementation
Ninad1306 Oct 25, 2024
0043683
fix: convert to class method
Ninad1306 Oct 25, 2024
6f19bec
fix: adjust width
Ninad1306 Nov 4, 2024
bab49bf
fix: detailed view dialog to view differences
Ninad1306 Nov 4, 2024
0a2831b
fix: refactor
Ninad1306 Nov 4, 2024
52e03ea
fix: use gstr3b bundle file
Ninad1306 Nov 4, 2024
f3d1d36
fix: more performant updation
Ninad1306 Nov 4, 2024
f707611
fix: clone object instead of assigning reference and some minor fixes
Ninad1306 Nov 4, 2024
04e0791
fix: common listner for all actions
Ninad1306 Nov 4, 2024
a3f21f5
fix: reduce unnecessary filtering of data
Ninad1306 Nov 5, 2024
b542e4f
fix: ui refactor, added actions and filter button
Ninad1306 Nov 11, 2024
fe11181
fix: invoice type not required, added return period field
Ninad1306 Nov 11, 2024
e4e42e8
fix: render empty state initially or when filters change
Ninad1306 Nov 11, 2024
2c6c20b
fix: data generation refactor for backend
Ninad1306 Nov 11, 2024
f05798e
fix: data mapping in frontend
Ninad1306 Nov 11, 2024
e2a29db
fix: better name for field
Ninad1306 Nov 11, 2024
e3e5baf
fix: setup filters for datatable
Ninad1306 Nov 11, 2024
1e183ed
fix: toggle primary action
Ninad1306 Nov 12, 2024
770d10f
fix: setup filter button only once
Ninad1306 Nov 12, 2024
7c03ddd
fix: move actions button besides filter
Ninad1306 Nov 12, 2024
ee8bbe4
fix: show actions button only if data
Ninad1306 Nov 12, 2024
2e03181
fix: bulk update actions
Ninad1306 Nov 12, 2024
3596c18
fix: detailed view dialog for comparision
Ninad1306 Nov 12, 2024
ed5bd93
fix: update action in backend and dont render datatable again
Ninad1306 Nov 13, 2024
2771be0
fix: removed fields not required and minor fixes
Ninad1306 Nov 13, 2024
02bc637
fix: delete existing transactions not included in download
Ninad1306 Nov 13, 2024
4a9f7bf
fix: download invoices from portal and autoreconcile
Ninad1306 Nov 13, 2024
ad7f293
fix: simplified implementation using class
Ninad1306 Nov 14, 2024
4564e58
Merge branch 'develop' of github.com:resilient-tech/india-compliance …
Ninad1306 Nov 14, 2024
42c84af
fix: otp handler for downloading invoices
Ninad1306 Nov 14, 2024
9e7985c
fix: apply actions on individual invoices
Ninad1306 Nov 15, 2024
1346845
Merge branch 'develop' of github.com:resilient-tech/india-compliance …
Ninad1306 Nov 18, 2024
52e37fb
fix: taxes available in invoice itself
Ninad1306 Nov 18, 2024
4a8f9ab
fix: validate based on pending action allowed or not
Ninad1306 Nov 18, 2024
b9a731d
fix: api implementation refactor
Ninad1306 Nov 19, 2024
15d0d29
fix: save api in working state
vorasmit Nov 19, 2024
cef57f8
fix: new gstr2b api implementation
Ninad1306 Nov 20, 2024
d52727b
fix: gstr3b api implementation
Ninad1306 Nov 20, 2024
04cce70
fix: refactor
Ninad1306 Nov 20, 2024
fd6cc03
fix: update previous_action instead of ims_action
Ninad1306 Nov 22, 2024
53a6859
fix: values available in invoice only, added TODOs
Ninad1306 Nov 22, 2024
5b1328c
fix: initial upload implementation
Ninad1306 Nov 22, 2024
19d39af
fix: better implementation
Ninad1306 Nov 22, 2024
b7f01a0
fix: handle null values and verify request in progress
Ninad1306 Nov 25, 2024
1dac634
fix: proper folder structuring
Ninad1306 Nov 25, 2024
043a7d3
fix: backend implementation for reset invoices
Ninad1306 Nov 25, 2024
a040f36
fix: change in doctype name
Ninad1306 Nov 25, 2024
a5ad821
fix: return period not required
Ninad1306 Nov 26, 2024
60d7a92
fix: reset previous ims action in all invoices
Ninad1306 Nov 26, 2024
866ac05
fix: wrapper function to download invoices
Ninad1306 Nov 26, 2024
0173f19
fix: actionable match summary
Ninad1306 Nov 26, 2024
78af941
fix: summary by actions performed
Ninad1306 Nov 26, 2024
5268aa8
fix: actions summary and filter by document type
Ninad1306 Nov 26, 2024
a8f308c
fix: actionable actions summary
Ninad1306 Nov 26, 2024
7495954
fix: IMPG and ISD categories not required
Ninad1306 Nov 26, 2024
e572b41
fix: invoice download fixes
Ninad1306 Nov 28, 2024
caddd29
fix: mapping for gov response
Ninad1306 Nov 28, 2024
d02a47f
fix: common utilities for reconciliation
Ninad1306 Nov 28, 2024
005b7ca
fix: create and link purchases
Ninad1306 Nov 28, 2024
a75d462
fix: allow actions except which are currently performed
Ninad1306 Dec 4, 2024
eb58bbe
fix: action and category mapping, consistent class names
Ninad1306 Dec 4, 2024
7391f3c
fix: upload and reset invoices workflow
Ninad1306 Dec 4, 2024
6d34524
fix: return error report after request processed
Ninad1306 Dec 4, 2024
437c3ea
fix: return if no data for request
Ninad1306 Dec 4, 2024
df62e50
Merge branch 'develop' of github.com:resilient-tech/india-compliance …
Ninad1306 Dec 4, 2024
e812ac8
fix: ignore rcm purchases
Ninad1306 Dec 4, 2024
116ebbf
fix: better function names
Ninad1306 Dec 4, 2024
5113eda
fix: change related to purchase reco refactor
Ninad1306 Dec 4, 2024
a2fa07d
fix: enqueue notification after request processed
Ninad1306 Dec 4, 2024
3512d53
fix: scope DOM manipulation to current doctype
Ninad1306 Dec 5, 2024
8ba0ad6
fix: summary shouldn't change based on filters
Ninad1306 Dec 5, 2024
6cf9113
fix: minor changes as suggestions as per review
vorasmit Dec 5, 2024
4c5ab80
fix: hardcode return period
Ninad1306 Dec 5, 2024
2733fd4
fix: updated actions name
Ninad1306 Dec 5, 2024
5cfe434
fix: common constant
Ninad1306 Dec 5, 2024
2f922b9
fix: columns refactor and pending upload column for better ux
Ninad1306 Dec 6, 2024
d3274f7
fix: uniform colors
Ninad1306 Dec 6, 2024
ab9dc52
fix: set gstin on change of company and hide actions summary
Ninad1306 Dec 6, 2024
061e952
fix: remove filter when clicked again
Ninad1306 Dec 6, 2024
bd6b1bb
fix: refactor as per review
Ninad1306 Dec 6, 2024
cf42f43
fix: columns required for ims
Ninad1306 Dec 6, 2024
2142b17
fix: create import log for large file download
Ninad1306 Dec 6, 2024
3792ce3
fix: circular imports
Ninad1306 Dec 6, 2024
6373fbb
fix: better error messages
Ninad1306 Dec 9, 2024
cad729f
fix: actions can be filtered from summary of actions
Ninad1306 Dec 11, 2024
fe437d0
fix: delete missing transactions
Ninad1306 Dec 11, 2024
73fe81c
fix: error reports workflow implementation
Ninad1306 Dec 12, 2024
cf8db60
Merge branch 'develop' of github.com:resilient-tech/india-compliance …
Ninad1306 Dec 12, 2024
02662f3
fix: better naming
Ninad1306 Dec 12, 2024
64bfd41
fix: handle existing transactions and consistent mappings
Ninad1306 Dec 12, 2024
37b97f1
fix: minor fixes as per review
Ninad1306 Dec 12, 2024
68a51cd
fix: filterable classification and columns reordering and renaming
Ninad1306 Dec 12, 2024
5455bd6
fix: accept action not allowed when missing purchase
Ninad1306 Dec 16, 2024
7915d18
fix: actions ordering according to gst portal
Ninad1306 Dec 16, 2024
ba2215f
fix: better workflow for files download and improved user messages
Ninad1306 Dec 16, 2024
9ab04a5
fix: ignore if no data
Ninad1306 Dec 16, 2024
579bf75
refactor: minor changes as per review
vorasmit Dec 17, 2024
0ff9096
fix: refactor apply_action function
Ninad1306 Dec 17, 2024
d99c2ce
fix: enqueue download of invoices
Ninad1306 Dec 17, 2024
7a3e38a
refactor: changes as per review
Ninad1306 Dec 17, 2024
f5a6b74
Merge branch 'develop' of github.com:resilient-tech/india-compliance …
Ninad1306 Dec 18, 2024
bbfd7ac
fix: minor refactor and reset invoices by category
Ninad1306 Dec 18, 2024
8c5b1c3
Merge branch 'develop' of github.com:resilient-tech/india-compliance …
Ninad1306 Dec 18, 2024
8d4e299
fix: minor changes as per review
vorasmit Dec 18, 2024
1dfbfaf
fix: tabs should be field group
Ninad1306 Dec 18, 2024
0cdd252
fix: changes as per review
Ninad1306 Dec 18, 2024
e6496d0
fix: better naming for tabs
Ninad1306 Dec 18, 2024
e6f1993
fix: ignore filters if zero value
Ninad1306 Dec 18, 2024
c1d2bc2
fix: refactor queries and reconcile everytime data is fetched
Ninad1306 Dec 19, 2024
8afff42
fix: handle credit note condition
Ninad1306 Dec 19, 2024
52f2557
fix: split upload, reset actions and refactor error handling after up…
Ninad1306 Dec 20, 2024
b87b455
fix: remove redundant error handling
Ninad1306 Dec 20, 2024
534c162
fix: datatable accessible inside tab
Ninad1306 Dec 20, 2024
a8cfdb8
fix: set link options for reconciliation
Ninad1306 Dec 20, 2024
ca345fd
fix: improved mapping and minor fixes
Ninad1306 Dec 24, 2024
cdaadbb
test: validate saving of data to internal format
Ninad1306 Dec 24, 2024
d68812b
chore: rename constants
vorasmit Dec 31, 2024
1a397d9
refactor: changes to make it consistent with gstr2a
vorasmit Dec 31, 2024
fa48b56
refactor: changes as per review
Ninad1306 Jan 6, 2025
a1bea9b
refactor: move function `set_gstr_actions`
vorasmit Jan 7, 2025
a6c1cfa
refactor: ims reconciler
vorasmit Jan 7, 2025
71923c8
refactor: ims apis
vorasmit Jan 7, 2025
c0ca864
fix: filter purchases by link name and show invoices after successful…
Ninad1306 Jan 7, 2025
d8ddae0
fix: prepare complete data and then save
Ninad1306 Jan 7, 2025
1737ffe
refactor: common utils for creating notification
Ninad1306 Jan 7, 2025
2868b62
Merge branch 'develop' of github.com:resilient-tech/india-compliance …
Ninad1306 Jan 8, 2025
1869cbb
fix: common utils for reconciliation
Ninad1306 Jan 8, 2025
f6173ea
Merge branch 'develop' of github.com:resilient-tech/india-compliance …
Ninad1306 Jan 8, 2025
5e32f6f
Merge branch 'develop' of github.com:resilient-tech/india-compliance …
Ninad1306 Jan 8, 2025
379483b
fix: notify users to upload data again
Ninad1306 Jan 8, 2025
ab326ba
fix: reset previous ims action irrespective of data
Ninad1306 Jan 8, 2025
779fcc5
chore: changes as per review
vorasmit Jan 9, 2025
86e3bcd
fix: changes as per review
vorasmit Jan 9, 2025
2e04eb9
chore: fix linters
Ninad1306 Jan 9, 2025
07d89bd
fix: proper variable names
Ninad1306 Jan 10, 2025
6f5512a
fix: return to source page conditionally
Ninad1306 Jan 10, 2025
a1bca83
fix: skip custom buttons setup if no data
Ninad1306 Jan 10, 2025
927cf9d
Merge branch 'develop' of github.com:resilient-tech/india-compliance …
Ninad1306 Jan 17, 2025
c6cb0e9
fix: use frm._call utility
Ninad1306 Jan 17, 2025
4dd045e
fix: add message to download invoices
Ninad1306 Jan 17, 2025
ce44136
refactor: common utilities
Ninad1306 Jan 17, 2025
3133fc0
Merge branch 'develop' of github.com:resilient-tech/india-compliance …
Ninad1306 Jan 20, 2025
602f76d
refactor: remove common code
Ninad1306 Jan 20, 2025
35a9e52
chore: fix codacy issues
vorasmit Jan 20, 2025
66f24e8
refactor: changes as per review
vorasmit Jan 20, 2025
f3ad1fa
refactor: restructuring as per review
Ninad1306 Jan 20, 2025
8daf6b0
refactor: reco components in public js
vorasmit Jan 20, 2025
18bd039
refactor: consistent variable name
vorasmit Jan 20, 2025
868e0cf
chore: rename function
vorasmit Jan 20, 2025
7fb0278
refactor: minor changes as per reveiw
vorasmit Jan 20, 2025
c416a38
fix: keep similar params for link options
vorasmit Jan 20, 2025
d70712d
fix: changed params for link docs
vorasmit Jan 20, 2025
18bac8e
fix: fieldname change in govt data
Ninad1306 Jan 21, 2025
4d3b144
fix: revert ims action when purchase unlinked
Ninad1306 Jan 21, 2025
a43be09
fix: minor fix for fieldname change
Ninad1306 Jan 21, 2025
432cdee
fix: utility for current fiscal year start date
Ninad1306 Jan 21, 2025
4eaeb7f
fix: category required for gstin level matching
Ninad1306 Jan 21, 2025
1393df0
fix: better default date filter
vorasmit Jan 21, 2025
4d94884
fix: process pending actions and better filter toggl
vorasmit Jan 21, 2025
0d66d6c
fix: add filter for is pending action allowed
vorasmit Jan 21, 2025
fc01641
chore: update todos
vorasmit Jan 21, 2025
bc2ee4f
fix: independent requests for save and reset
Ninad1306 Jan 21, 2025
8057e6a
chore: fix codacy issues
vorasmit Jan 22, 2025
584681d
chore: minor refactor, fix: ensure there is data before trying to reu…
vorasmit Jan 22, 2025
c139d0e
chore: remove unnecessary async
vorasmit Jan 22, 2025
3a86143
fix: update pending upload in frontend
vorasmit Jan 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions india_compliance/gst_india/api_classes/taxpayer_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,13 +466,12 @@ def generate_app_key(self):

return app_key

def get_files(self, return_period, token, action, endpoint, otp=None):
def get_files(self, return_period, token, action, endpoint):
response = self.get(
action=action,
return_period=return_period,
params={"ret_period": return_period, "token": token},
endpoint=endpoint,
otp=otp,
)

if response.error_type == "queued":
Expand Down
243 changes: 239 additions & 4 deletions india_compliance/gst_india/api_classes/taxpayer_returns.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import frappe
from frappe import _

from india_compliance.gst_india.api_classes.taxpayer_base import TaxpayerBaseAPI
from india_compliance.gst_india.api_classes.taxpayer_base import (
FilesAPI,
TaxpayerBaseAPI,
)


class ReturnsAPI(TaxpayerBaseAPI):
Expand All @@ -23,9 +26,9 @@ class ReturnsAPI(TaxpayerBaseAPI):
"RET2B1010": "authorization_failed", # API Authorization Failed for 2B
}

def download_files(self, return_period, token, otp=None):
def download_files(self, return_period, token):
return super().get_files(
return_period, token, action="FILEDET", endpoint="returns", otp=otp
return_period, token, action="FILEDET", endpoint="returns"
)

def get_return_status(self, return_period, reference_id, otp=None):
Expand Down Expand Up @@ -57,6 +60,7 @@ def proceed_to_file(self, return_type, return_period, is_nil_return, otp=None):

class GSTR2bAPI(ReturnsAPI):
API_NAME = "GSTR-2B"
END_POINT = "returns/gstr2b"

def get_data(self, return_period, otp=None, file_num=None):
params = {"rtnprd": return_period}
Expand All @@ -67,10 +71,29 @@ def get_data(self, return_period, otp=None, file_num=None):
action="GET2B",
return_period=return_period,
params=params,
endpoint="returns/gstr2b",
endpoint=self.END_POINT,
otp=otp,
)

def regenerate_2b(self, return_period):
return self.put(
json={
"action": "GEN2B",
"data": {"rtin": self.company_gstin, "itcprd": return_period},
},
endpoint=self.END_POINT,
)

def get_2b_gen_status(self, transaction_id):
return self.get(
action="GENSTS2B",
params={
"gstin": self.company_gstin,
"int_tran_id": transaction_id,
},
endpoint=self.END_POINT,
)


class GSTR2aAPI(ReturnsAPI):
API_NAME = "GSTR-2A"
Expand Down Expand Up @@ -153,3 +176,215 @@ def file_gstr_1(self, return_period, summary_data, pan, evc_otp):
},
endpoint="returns/gstr1",
)


class GSTR3bAPI(ReturnsAPI):
END_POINT = "returns/gstr3b"

def setup(self, company_gstin, return_period):
self.return_period = return_period
super().setup(company_gstin=company_gstin)

def get_data(self):
return self.get(
action="RETSUM",
return_period=self.return_period,
params={"gstin": self.company_gstin, "ret_period": self.return_period},
endpoint=self.END_POINT,
)

def save_gstr3b(self, data):
return self.put(
return_period=self.return_period,
json={
"action": "RETSAVE",
"data": data,
},
endpoint=self.END_POINT,
)

def submit_gstr3b(self, data):
return self.post(
return_period=self.return_period,
json={
"action": "RETSUBMIT",
"data": data,
},
endpoint=self.END_POINT,
)

def save_offset_liability_gstr3b(self, data):
return self.put(
return_period=self.return_period,
json={
"action": "RETOFFSET",
"data": data,
},
endpoint=self.END_POINT,
)

def file_gstr_3b(self, data, pan, evc_otp):
return self.post(
return_period=self.return_period,
json={
"action": "RETFILE",
"data": data,
"st": "EVC",
"sid": f"{pan}|{evc_otp}",
},
endpoint=self.END_POINT,
)

def get_itc_liab_data(self):
return self.get(
action="AUTOLIAB",
return_period=self.return_period,
params={"gstin": self.company_gstin, "ret_period": self.return_period},
endpoint=self.END_POINT,
)

def validate_3b_against_auto_calc(self, data):
return self.post(
return_period=self.return_period,
json={
"action": "VALID",
"data": data,
},
endpoint=self.END_POINT,
)

def get_system_calc_interest(self):
return self.get(
action="RETINT",
return_period=self.return_period,
params={"gstin": self.company_gstin, "ret_period": self.return_period},
endpoint=self.END_POINT,
)

def recompute_interest(self):
return self.post(
return_period=self.return_period,
json={
"action": "CMPINT",
"data": {"gstn": self.company_gstin, "ret_period": self.return_period},
},
endpoint=self.END_POINT,
)

def save_past_liab(self, data):
return self.put(
return_period=self.return_period,
json={"action": "RETBKP", "data": data},
endpoint=self.END_POINT,
)

def get_itc_reversal_bal(self):
return self.get(
action="CLOSINGBAL",
return_period=self.return_period,
params={"gstin": self.company_gstin},
endpoint=self.END_POINT,
)

def get_rcm_bal(self):
return self.get(
action="RCMCLOSINGBAL",
return_period=self.return_period,
params={"gstin": self.company_gstin},
endpoint=self.END_POINT,
)

def get_opening_bal(self):
return self.get(
action="OPENINGBAL",
return_period=self.return_period,
params={"gstin": self.company_gstin},
endpoint=self.END_POINT,
)

def get_rcm_opening_bal(self):
return self.get(
action="RCMOPNBAL",
return_period=self.return_period,
params={"gstin": self.company_gstin},
endpoint=self.END_POINT,
)

def save_opening_bal(self, data):
return self.post(
return_period=self.return_period,
json={"action": "SAVEOB", "data": data},
endpoint=self.END_POINT,
)

def submit_rcm_opening_bal(self, data):
return self.post(
return_period=self.return_period,
json={
"action": "SAVERCMOPNBAL",
"data": data,
},
endpoint=self.END_POINT,
)


class IMSAPI(ReturnsAPI):
API_NAME = "IMS"
END_POINT = "returns/ims"

def get_data(self, section):
return self.get(
action="GETINV",
params={
"gstin": self.company_gstin,
"section": section,
},
endpoint=self.END_POINT,
)

def download_files(self, return_period, token):
return self.get_files(
return_period, token, action="FILEDET", endpoint=self.END_POINT
)

def get_files(self, return_period, token, action, endpoint):
response = self.get(
action=action,
return_period=return_period,
params={"gstin": self.company_gstin, "token": token},
endpoint=endpoint,
)

if response.error_type == "queued":
return response

return FilesAPI().get_all(response)

def save(self, data):
return self.put(
endpoint=self.END_POINT,
json={
"action": "SAVE",
"data": {"rtin": self.company_gstin, "reqtyp": "SAVE", "invdata": data},
},
)

def reset(self, data):
return self.put(
endpoint=self.END_POINT,
json={
"action": "RESETIMS",
"data": {
"rtin": self.company_gstin,
"reqtyp": "RESET",
"invdata": data,
},
},
)

def get_request_status(self, transaction_id):
return self.get(
action="REQSTS",
endpoint=self.END_POINT,
params={"gstin": self.company_gstin, "int_tran_id": transaction_id},
)
11 changes: 5 additions & 6 deletions india_compliance/gst_india/client_scripts/purchase_invoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,19 @@ frappe.ui.form.on(DOCTYPE, {

on_submit: function (frm) {
if (!frm._inward_supply) return;

// go back to previous page and match the invoice with the inward supply
setTimeout(() => {
frappe.route_hooks.after_load = reco_frm => {
if (!reco_frm.purchase_reconciliation_tool) return;
purchase_reconciliation_tool.link_documents(
reco_frm,
frappe.route_hooks.after_load = source_frm => {
if (!source_frm.reconciliation_tabs) return;
reconciliation.link_documents(
source_frm,
frm.doc.name,
frm._inward_supply.name,
"Purchase Invoice",
false
);
};
frappe.set_route("Form", "Purchase Reconciliation Tool");
frappe.set_route("Form", frm._inward_supply.source_doc);
}, 2000);
},
});
Expand Down
17 changes: 17 additions & 0 deletions india_compliance/gst_india/constants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,23 @@
"Input Service Distributor": "B2B",
}

GST_CATEGORY_MAP = {
"R": "Regular",
"SEZWP": "SEZ supplies with payment of tax",
"SEZWOP": "SEZ supplies with out payment of tax",
"DE": "Deemed exports",
"CBW": "Intra-State Supplies attracting IGST",
}

ACTION_MAP = {"A": "Accepted", "R": "Rejected", "P": "Pending", "N": "No Action"}

STATUS_CODE_MAP = {
"P": "Processed",
"PE": "Processed with Errors",
"ER": "Error",
"IP": "In Progress",
}

EXPORT_TYPES = (
"WOP", # Without Payment of Tax [0]
"WP", # With Payment of Tax [1]
Expand Down
Loading
Loading