Merge pull request #40163 from vorasmit/ic-deps-v15
fix: add flags for repost to ensure correct accounting from India Compliance App (#40162)
This commit is contained in:
commit
84a359c760
@ -88,6 +88,7 @@ class RepostAccountingLedger(Document):
|
|||||||
).append(gle.update({"old": True}))
|
).append(gle.update({"old": True}))
|
||||||
|
|
||||||
def generate_preview_data(self):
|
def generate_preview_data(self):
|
||||||
|
frappe.flags.through_repost_accounting_ledger = True
|
||||||
self.gl_entries = []
|
self.gl_entries = []
|
||||||
self.get_existing_ledger_entries()
|
self.get_existing_ledger_entries()
|
||||||
for x in self.vouchers:
|
for x in self.vouchers:
|
||||||
@ -141,6 +142,7 @@ class RepostAccountingLedger(Document):
|
|||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def start_repost(account_repost_doc=str) -> None:
|
def start_repost(account_repost_doc=str) -> None:
|
||||||
|
frappe.flags.through_repost_accounting_ledger = True
|
||||||
if account_repost_doc:
|
if account_repost_doc:
|
||||||
repost_doc = frappe.get_doc("Repost Accounting Ledger", 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):
|
def repost(doc):
|
||||||
try:
|
try:
|
||||||
|
frappe.flags.through_repost_item_valuation = True
|
||||||
if not frappe.db.exists("Repost Item Valuation", doc.name):
|
if not frappe.db.exists("Repost Item Valuation", doc.name):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user