Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
eb627b5
feat: add transformation logic to conditionally ignore export types i…
rakesh8848 Nov 13, 2025
5011297
fix: Accounting dimensions filters in GST Balance Report
rakesh8848 Nov 13, 2025
57d2a64
refactor: consistent logic for cost center and project filters
rakesh8848 Nov 13, 2025
ca1e85c
fix: update finance book filter logic in GSTBalanceReport
rakesh8848 Nov 13, 2025
4a43679
fix: correct gst_accounts initialization in GSTBalanceReport
rakesh8848 Nov 13, 2025
5fdb7a3
fix: add otp_handler decorator to request_otp function for error hand…
rakesh8848 Nov 13, 2025
8bbd68d
fix: use load_doc for onload trigger in get_source_destination_addres…
rakesh8848 Nov 13, 2025
6950d67
test: add unit test for get_source_destination_address with Stock Ent…
rakesh8848 Nov 13, 2025
c71298f
fix: show documents even if document reference is missing in GST Job …
rakesh8848 Nov 13, 2025
3b827bc
fix: add confirmation dialog for missing entries
rakesh8848 Nov 13, 2025
facf4b3
fix: correct link field route
rakesh8848 Nov 13, 2025
ce29cd0
refactor: streamline invalid data handling in ITC-04 JSON export
rakesh8848 Nov 13, 2025
bc1c284
test: update the itc_04 test case
rakesh8848 Nov 13, 2025
8f079c6
fix: update ignore_pos_if_export method to discard first argument for…
rakesh8848 Nov 13, 2025
ca161a2
fix: exclude specific document types from count in summary of Documen…
rakesh8848 Nov 13, 2025
c6a75cd
fix: do not update dict when iterating the same dict
rakesh8848 Nov 13, 2025
63dfaa7
fix: avoid recursion in GSTR1 data generation by modifying filters fo…
rakesh8848 Nov 13, 2025
a255137
fix: update month_or_quarter with correct value
rakesh8848 Nov 13, 2025
7531e69
chore(release): Bumped to Version 15.23.0
rakesh8848 Nov 13, 2025
d1fed22
fix: refactor exception handling for GSP server errors and add GSPLim…
rakesh8848 Nov 13, 2025
7274177
fix: correct error message for GSP server downtime
rakesh8848 Nov 13, 2025
627d291
fix: prevent throwing exceptions for empty error messages in handle_s…
rakesh8848 Nov 13, 2025
13ae8ed
fix: correct condition to check for included documents for quarterly …
rakesh8848 Nov 13, 2025
22ea7d2
fix: enhance error handling in HSNSUM class and format error messages
rakesh8848 Nov 13, 2025
083598e
fix: update error message in TestHSNSUMError
rakesh8848 Nov 13, 2025
0a77091
refactor: remove redundant code
rakesh8848 Nov 13, 2025
3fd36fb
refactor: fix linters
rakesh8848 Nov 13, 2025
8198b6b
fix: correct item gst details with same account in multiple tax rows
rakesh8848 Nov 13, 2025
8bd30a0
fix: add validation for item GST details to ensure accuracy of tax am…
rakesh8848 Nov 13, 2025
96267fc
fix: always validate rounded value
rakesh8848 Nov 13, 2025
116f098
fix: consistent allowed difference
rakesh8848 Nov 13, 2025
dc5bbb9
chore: remove redundant code
rakesh8848 Nov 13, 2025
330d1c7
fix: excel export gstr3b
rakesh8848 Nov 13, 2025
925caae
refactor: streamline GSTR 3B Excel export process and improve code re…
rakesh8848 Nov 13, 2025
e7958c0
fix: month and year in correct format
rakesh8848 Nov 13, 2025
8caf33f
fix: improve error handling in Excel export
rakesh8848 Nov 13, 2025
47333c6
refactor: enhance GSTR 3B Excel export with improved state mapping an…
rakesh8848 Nov 13, 2025
c17e8d9
refactor: correct mapping for section 5
rakesh8848 Nov 13, 2025
43ca383
refactor: enhance ITC value setting for import rows in Excel export
rakesh8848 Nov 13, 2025
5195abc
refactor: enhance GSTR-3B Excel export with improved data handling
rakesh8848 Nov 13, 2025
f2b5e2c
test: add GSTR-3B Excel export functionality test case
rakesh8848 Nov 13, 2025
d654a57
fix: permission handling
rakesh8848 Nov 13, 2025
6a55346
chore: remove redundant code error
rakesh8848 Nov 13, 2025
c951e75
fix: improve cell type checking for Excel export]
rakesh8848 Nov 13, 2025
6cc00ac
fix: file name of gst 3b excel file
rakesh8848 Nov 13, 2025
5b60b2b
fix: always set correct gst treatment
rakesh8848 Nov 13, 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
2 changes: 1 addition & 1 deletion india_compliance/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "15.22.1"
__version__ = "15.23.0"
16 changes: 11 additions & 5 deletions india_compliance/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
class GSPServerError(Exception):
def __init__(self, message="GSP/GST server is down", *args, **kwargs):
super().__init__(message, *args, **kwargs)
import frappe


class GSPServerError(frappe.ValidationError):
message = "GSP/GST server is down"
title = "GSP/GST Server Error"

class GSPLimitExceededError(GSPServerError):
message = "GSP/GST account limit exceeded"
http_status_code = 429

class GatewayTimeoutError(GSPServerError):
def __init__(self, message="The server took too long to respond", *args, **kwargs):
super().__init__(message, *args, **kwargs)
message = "The server took too long to respond"
http_status_code = 504


class OTPRequestedError(Exception):
Expand Down
27 changes: 19 additions & 8 deletions india_compliance/gst_india/api_classes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
from frappe.utils import sbool
from frappe.utils.scheduler import is_scheduler_disabled

from india_compliance.exceptions import GatewayTimeoutError, GSPServerError
from india_compliance.exceptions import (
GatewayTimeoutError,
GSPLimitExceededError,
GSPServerError,
)
from india_compliance.gst_india.utils import is_api_enabled
from india_compliance.gst_india.utils.api import enqueue_integration_request

Expand Down Expand Up @@ -224,18 +228,25 @@ def handle_error_response(self, response_json):
title=_("API Request Failed"),
)

def handle_server_error(self, error_messages):
error_message_list = [
ERROR_MESSAGES = {
GSPServerError: (
"GSPGSTDOWN",
"GSPERR300",
"Connection reset",
"No route to host",
]
),
GSPLimitExceededError: ("GEN5005",),
}

for message in error_messages:
for error in error_message_list:
if error in message:
raise GSPServerError
def handle_server_error(self, error_messages):
for exception, error_message_list in self.ERROR_MESSAGES.items():
for error_pattern in error_message_list:
if any(error_pattern in msg for msg in error_messages if msg):
frappe.throw(
msg=exception.message,
exc=exception,
title=exception.title,
)

def is_ignored_error(self, response_json):
# Override in subclass, return truthy value to stop frappe.throw
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,13 @@ def default_subcategory_summary(self, subcategory):

@staticmethod
def count_doc_issue_summary(summary_row, data_row):
if data_row.get(inv_f.DOC_TYPE) in (
"Excluded from Report (Invalid Invoice Number)",
"Excluded from Report (Same GSTIN Billing)",
"Excluded from Report (Is Opening Entry)",
):
return

summary_row["no_of_records"] += (
data_row.get(inv_f.TOTAL_COUNT, 0)
- data_row.get(inv_f.CANCELLED_COUNT, 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ frappe.ui.form.on("GSTR 3B Report", {
frm.set_intro(__("Please save the report again to rebuild or update"));
frm.doc.__unsaved = 1;

// Download Button
// Download JSON Button
frm.add_custom_button(__("Download JSON"), function () {
var w = window.open(
frappe.urllib.get_full_url(
Expand All @@ -41,6 +41,22 @@ frappe.ui.form.on("GSTR 3B Report", {
}
});

// Download Excel Button
frm.add_custom_button(__("Download Excel"), function () {
var w = window.open(
frappe.urllib.get_full_url(
"/api/method/india_compliance.gst_india.doctype.gstr_3b_report.gstr_3b_report.download_gstr3b_as_excel?" +
"name=" +
encodeURIComponent(frm.doc.name)
)
);

if (!w) {
frappe.msgprint(__("Please enable pop-ups"));
return;
}
});

// View Form Button
frm.add_custom_button(__("View Form"), function () {
frappe.call({
Expand Down
Loading