You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This functionality needs to be replicated in python so that server-side document creation populates this missing information in the validation of a Payment Entry. Here is a working draft:
defset_payment_mode_account(pe):
fromerpnext.accounts.doctype.sales_invoice.sales_invoiceimportget_bank_cash_accountifnotpe.company:
frappe.throw("Please select a Company first")
ifnotpe.mode_of_payment:
returnaccount=get_bank_cash_account(pe.mode_of_payment, pe.company)["account"]
field="paid_to"ifpe.payment_type=="Receive"else"paid_from"setattr(pe, field, account)
Module
accounts
Version
Version 15
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Information about bug
The Javascript client functionality for a Payment Entry includes the following code to import the Account from the Mode of Payment:
erpnext/erpnext/public/js/controllers/accounts.js
Lines 247 to 269 in ff2ccf9
This functionality needs to be replicated in python so that server-side document creation populates this missing information in the validation of a Payment Entry. Here is a working draft:
Module
accounts
Version
Version 15
The text was updated successfully, but these errors were encountered: