Skip to content

Commit

Permalink
fix: check if a NIL return can be filed (#3069)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5c85aa2)

Co-authored-by: Sanket322 <shahsanket322003.com>
  • Loading branch information
vorasmit authored Feb 12, 2025
2 parents 1b2d637 + 7721c48 commit dddf26e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,11 @@ class GSTR1 {
if (!this.data || !is_gstr1_api_enabled()) return;

const has_records = this.data.books_summary?.some(row => row.no_of_records > 0);
// Nil return cannot be filed for quarterly M1 and M2
const can_file_nil_return = this.frm.doc.filing_preference === "Monthly" ||
(this.frm.doc.filing_preference === "Quarterly" && this.frm.doc.month_or_quarter % 3 === 0);

if (!has_records && this.data.status != "Filed")
if (!has_records && this.data.status != "Filed" && can_file_nil_return)
this.frm.set_df_property("file_nil_gstr1", "hidden", 0);
else this.frm.set_df_property("file_nil_gstr1", "hidden", 1);
}
Expand Down

0 comments on commit dddf26e

Please sign in to comment.