Skip to content

Commit 37bccaa

Browse files
committed
chore: revert unused additions
1 parent e9ad21d commit 37bccaa

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

india_compliance/gst_india/doctype/gstr_1_beta/gstr_1_beta.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ frappe.ui.form.on(DOCTYPE, {
111111
// Set Default Values
112112
set_default_company_gstin(frm);
113113
set_options_for_year(frm);
114-
set_options_for_month_or_quarter(frm, true);
114+
set_options_for_month_or_quarter(frm);
115115

116116
if (is_gstr1_api_enabled()) {
117117
frm.set_df_property("filing_preference", "read_only", 1);
@@ -164,6 +164,7 @@ frappe.ui.form.on(DOCTYPE, {
164164

165165
if (
166166
frm.doc.company_gstin !== filters.company_gstin ||
167+
frm.doc.month_or_quarter != filters.month_or_quarter ||
167168
frm.doc.year != filters.year
168169
)
169170
return;
@@ -218,7 +219,7 @@ frappe.ui.form.on(DOCTYPE, {
218219

219220
year(frm) {
220221
render_empty_state(frm);
221-
set_options_for_month_or_quarter(frm, true);
222+
set_options_for_month_or_quarter(frm);
222223
},
223224

224225
refresh(frm) {
@@ -2996,11 +2997,10 @@ async function update_fields_based_on_filing_preference(frm) {
29962997

29972998
if (preference === undefined || preference === frm.doc.filing_preference) return;
29982999

2999-
frm.doc.filing_preference = preference;
3000-
frm.refresh_field("filing_preference");
3000+
frm.set_value("filing_preference", preference);
30013001
}
30023002

3003-
function set_options_for_month_or_quarter(frm, with_update = false) {
3003+
function set_options_for_month_or_quarter(frm) {
30043004
/**
30053005
* Set options for Month or Quarter based on the year and current date
30063006
* 1. If the year is current year, then options are till current month
@@ -3029,8 +3029,6 @@ function set_options_for_month_or_quarter(frm, with_update = false) {
30293029

30303030
set_field_options("month_or_quarter", options);
30313031

3032-
if (!with_update) return;
3033-
30343032
if (frm.doc.year === current_year && options.length > 1)
30353033
// set second last option as default
30363034
frm.set_value("month_or_quarter", options[options.length - 2]);

0 commit comments

Comments
 (0)