mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
Merge pull request #46754 from muruthigitau/create-payment-gateway-account
feat: add optional company parameter to create_payment_gateway_account
This commit is contained in:
@@ -1281,12 +1281,13 @@ def get_account_balances(accounts, company):
|
|||||||
return accounts
|
return accounts
|
||||||
|
|
||||||
|
|
||||||
def create_payment_gateway_account(gateway, payment_channel="Email"):
|
def create_payment_gateway_account(gateway, payment_channel="Email", company=None):
|
||||||
from erpnext.setup.setup_wizard.operations.install_fixtures import create_bank_account
|
from erpnext.setup.setup_wizard.operations.install_fixtures import create_bank_account
|
||||||
|
|
||||||
company = frappe.get_cached_value("Global Defaults", "Global Defaults", "default_company")
|
|
||||||
if not company:
|
if not company:
|
||||||
return
|
company = frappe.get_cached_value("Global Defaults", "Global Defaults", "default_company")
|
||||||
|
if not company:
|
||||||
|
return
|
||||||
|
|
||||||
# NOTE: we translate Payment Gateway account name because that is going to be used by the end user
|
# NOTE: we translate Payment Gateway account name because that is going to be used by the end user
|
||||||
bank_account = frappe.db.get_value(
|
bank_account = frappe.db.get_value(
|
||||||
|
|||||||
Reference in New Issue
Block a user