Skip to content

Commit

Permalink
fix: rename field
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket322 committed Dec 26, 2024
1 parent ad6f235 commit e5c919d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions india_compliance/gst_india/api_classes/taxpayer_returns.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_return_status(self, return_period, reference_id, otp=None):
otp=otp,
)

def proceed_to_file(self, return_type, return_period, is_nil_rated, otp=None):
def proceed_to_file(self, return_type, return_period, is_nil_return, otp=None):
return self.post(
return_type=return_type,
return_period=return_period,
Expand All @@ -46,7 +46,7 @@ def proceed_to_file(self, return_type, return_period, is_nil_rated, otp=None):
"data": {
"gstin": self.company_gstin,
"ret_period": return_period,
"isnil": "Y" if is_nil_rated else "N",
"isnil": "Y" if is_nil_return else "N",
},
},
endpoint="returns/gstrptf",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -747,15 +747,15 @@ def process_reset_gstr1(self):

return response

def upload_gstr1(self, json_data, is_nil_rated, force):
def upload_gstr1(self, json_data, is_nil_return, force):
if not json_data:
return

verify_request_in_progress(self, force)

keys = {category.value for category in GovJsonKey}
if all(key not in json_data for key in keys):
if not cint(is_nil_rated):
if not cint(is_nil_return):
frappe.msgprint(
_(
'No data to upload.To file Nil Return Select "File Nil GSTR-1" checkbox.'
Expand Down Expand Up @@ -820,11 +820,11 @@ def process_upload_gstr1(self):

return response

def proceed_to_file_gstr1(self, is_nil_rated, force):
def proceed_to_file_gstr1(self, is_nil_return, force):
verify_request_in_progress(self, force)

api = GSTR1API(self)
response = api.proceed_to_file("GSTR1", self.return_period, is_nil_rated)
response = api.proceed_to_file("GSTR1", self.return_period, is_nil_return)

# Return Form already ready to be filed
if response.error and response.error.error_cd == "RET00003":
Expand Down
14 changes: 7 additions & 7 deletions india_compliance/gst_india/doctype/gstr_1_beta/gstr_1_beta.js
Original file line number Diff line number Diff line change
Expand Up @@ -2571,11 +2571,11 @@ class GSTR1Action extends FileGSTR1Dialog {
this.check_action_status_with_retry(request_type, 0, true)
);

this.check_for_nil_rated();
this.check_for_nil_return();
});
}

check_for_nil_rated() {
check_for_nil_return() {
const data = this.frm.doc.__gst_data;
if (Object.keys(data.unfiled).length == 1 && data.status == "Not Filed") {
this.frm.set_df_property("file_nil_gstr1", "hidden", 0)
Expand Down Expand Up @@ -2603,7 +2603,7 @@ class GSTR1Action extends FileGSTR1Dialog {
frappe.show_alert(__("Uploading data to GSTN"));
this.check_action_status_with_retry(action);
},
{ is_nil_rated : this.frm.doc.file_nil_gstr1 });
{ is_nil_return : this.frm.doc.file_nil_gstr1 });
};

// has draft invoices
Expand Down Expand Up @@ -2644,12 +2644,12 @@ class GSTR1Action extends FileGSTR1Dialog {
if (r.message){
this.toggle_actions(true);
this.handle_proceed_to_file_response(r.message);
this.check_for_nil_rated();
this.check_for_nil_return();
}
else this.check_action_status_with_retry(action);
// TODO: this.check_for_nil_rated should also go after else condition
// TODO: this.check_for_nil_return should also go after else condition
},
{ is_nil_rated : this.frm.doc.file_nil_gstr1 });
{ is_nil_return : this.frm.doc.file_nil_gstr1 });
}

async mark_as_unfiled() {
Expand All @@ -2671,7 +2671,7 @@ class GSTR1Action extends FileGSTR1Dialog {
this.frm.doc.__gst_data.status = "Not Filed";
this.frm.refresh();
this.frm.gstr1.refresh_data();
this.check_for_nil_rated();
this.check_for_nil_return();
},
});
}
Expand Down

0 comments on commit e5c919d

Please sign in to comment.