Skip to content

Commit

Permalink
fix: add flags for repost to ensure correct accounting from India Com…
Browse files Browse the repository at this point in the history
…pliance App
  • Loading branch information
vorasmit committed Feb 27, 2024
1 parent 07fd93a commit 7d14ecf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def get_existing_ledger_entries(self):
).append(gle.update({"old": True}))

def generate_preview_data(self):
frappe.flags.through_repost_accounting_ledger = True
self.gl_entries = []
self.get_existing_ledger_entries()
for x in self.vouchers:
Expand Down Expand Up @@ -141,6 +142,7 @@ def on_submit(self):

@frappe.whitelist()
def start_repost(account_repost_doc=str) -> None:
frappe.flags.through_repost_accounting_ledger = True
if account_repost_doc:
repost_doc = frappe.get_doc("Repost Accounting Ledger", account_repost_doc)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ def on_doctype_update():

def repost(doc):
try:
frappe.flags.through_repost_item_valuation = True
if not frappe.db.exists("Repost Item Valuation", doc.name):
return

Expand Down

0 comments on commit 7d14ecf

Please sign in to comment.