fix: add flags for repost to ensure correct accounting from India Compliance App
This commit is contained in:
parent
07fd93a6f6
commit
7d14ecfcb8
@ -88,6 +88,7 @@ class RepostAccountingLedger(Document):
|
||||
).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:
|
||||
@ -141,6 +142,7 @@ class RepostAccountingLedger(Document):
|
||||
|
||||
@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)
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user