mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
refactor: make reposting implicit
(cherry picked from commit 722ef92324)
# Conflicts:
# erpnext/accounts/doctype/journal_entry/journal_entry.py
This commit is contained in:
@@ -99,6 +99,20 @@ class JournalEntry(AccountsController):
|
|||||||
self.update_asset_value()
|
self.update_asset_value()
|
||||||
self.update_inter_company_jv()
|
self.update_inter_company_jv()
|
||||||
self.update_invoice_discounting()
|
self.update_invoice_discounting()
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
self.update_booked_depreciation()
|
||||||
|
|
||||||
|
def on_update_after_submit(self):
|
||||||
|
if hasattr(self, "repost_required"):
|
||||||
|
self.needs_repost = self.check_if_fields_updated(
|
||||||
|
fields_to_check=[], child_tables={"accounts": []}
|
||||||
|
)
|
||||||
|
if self.needs_repost:
|
||||||
|
self.validate_for_repost()
|
||||||
|
self.db_set("repost_required", self.needs_repost)
|
||||||
|
self.repost_accounting_entries()
|
||||||
|
>>>>>>> 722ef92324 (refactor: make reposting implicit)
|
||||||
|
|
||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
# References for this Journal are removed on the `on_cancel` event in accounts_controller
|
# References for this Journal are removed on the `on_cancel` event in accounts_controller
|
||||||
|
|||||||
@@ -601,6 +601,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
if self.needs_repost:
|
if self.needs_repost:
|
||||||
self.validate_for_repost()
|
self.validate_for_repost()
|
||||||
self.db_set("repost_required", self.needs_repost)
|
self.db_set("repost_required", self.needs_repost)
|
||||||
|
self.repost_accounting_entries()
|
||||||
|
|
||||||
def make_gl_entries(self, gl_entries=None, from_repost=False):
|
def make_gl_entries(self, gl_entries=None, from_repost=False):
|
||||||
update_outstanding = "No" if (cint(self.is_paid) or self.write_off_account) else "Yes"
|
update_outstanding = "No" if (cint(self.is_paid) or self.write_off_account) else "Yes"
|
||||||
|
|||||||
@@ -549,6 +549,7 @@ class SalesInvoice(SellingController):
|
|||||||
if self.needs_repost:
|
if self.needs_repost:
|
||||||
self.validate_for_repost()
|
self.validate_for_repost()
|
||||||
self.db_set("repost_required", self.needs_repost)
|
self.db_set("repost_required", self.needs_repost)
|
||||||
|
self.repost_accounting_entries()
|
||||||
|
|
||||||
def set_paid_amount(self):
|
def set_paid_amount(self):
|
||||||
paid_amount = 0.0
|
paid_amount = 0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user