mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-26 13:25:20 +00:00
refactor(gl): give SI and PI their own precision-loss GL entry method
Remove the doctype-branching make_precision_loss_gl_entry from exchange_gain_loss.py (and its accounts_controller wrapper); add a dedicated method to each of SalesInvoiceGLComposer and PurchaseInvoiceGLComposer. The SI variant now passes 'Sales Invoice' as the round-off voucher type (output-equivalent) and the throwaway return value no longer shadows the gettext _ helper.
This commit is contained in:
@@ -1043,11 +1043,6 @@ class AccountsController(TransactionBase):
|
||||
|
||||
set_advance_gain_or_loss(self)
|
||||
|
||||
def make_precision_loss_gl_entry(self, gl_entries):
|
||||
from erpnext.accounts.services.exchange_gain_loss import make_precision_loss_gl_entry
|
||||
|
||||
make_precision_loss_gl_entry(self, gl_entries)
|
||||
|
||||
def gain_loss_journal_already_booked(
|
||||
self, gain_loss_account, exc_gain_loss, ref2_dt, ref2_dn, ref2_detail_no
|
||||
) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user