Skip to content

Commit

Permalink
fix: update action and filter opening invoices
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket322 committed Apr 17, 2024
1 parent 45c19f6 commit afd1b51
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ def on_cancel(self):
"match_status": "",
"link_name": "",
"link_doctype": "",
"action": "No Action",
}
if doc_name:
for name in doc_name:
frappe.db.set_value("GST Inward Supply", name, updated_data)
frappe.db.set_value("GST Inward Supply", doc_name[0], updated_data)

# Code adapted from AccountsController.on_trash
def on_trash(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ def get_query(self, additional_fields=None, is_return=False):
.on(pi_item.parent == self.PI.name)
.where(self.PI.docstatus == 1)
.where(IfNull(self.PI.reconciliation_status, "") != "Not Applicable")
.where(self.PI.is_opening == "NO")
.groupby(self.PI.name)
.select(
*fields,
Expand Down
4 changes: 2 additions & 2 deletions india_compliance/gst_india/overrides/purchase_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ def on_cancel(doc, method=None):
"match_status": "",
"link_name": "",
"link_doctype": "",
"action": "No Action",
}
if doc_name:
for name in doc_name:
frappe.db.set_value("GST Inward Supply", name, updated_data)
frappe.db.set_value("GST Inward Supply", doc_name[0], updated_data)


def set_reconciliation_status(doc):
Expand Down

0 comments on commit afd1b51

Please sign in to comment.