diff --git a/default_thai_company/tax_withholding.py b/default_thai_company/tax_withholding.py index 6afe4ee..e5c5774 100644 --- a/default_thai_company/tax_withholding.py +++ b/default_thai_company/tax_withholding.py @@ -183,9 +183,33 @@ class ThaiPaymentEntry(PaymentEntry): @frappe.whitelist() -def get_payment_entry(*args, **kwargs): - """Create > Payment from a Sales Invoice: arrive with withholding applied.""" - pe = _get_payment_entry(*args, **kwargs) +def get_payment_entry( + dt, + dn, + party_amount=None, + bank_account=None, + bank_amount=None, + party_type=None, + payment_type=None, + reference_date=None, + created_from_payment_request=False, +): + """Create > Payment from a Sales Invoice: arrive with withholding applied. + + Signature mirrors ERPNext's so `frappe.call` drops request-only args + (`cmd`, ...) instead of forwarding them. + """ + pe = _get_payment_entry( + dt, + dn, + party_amount=party_amount, + bank_account=bank_account, + bank_amount=bank_amount, + party_type=party_type, + payment_type=payment_type, + reference_date=reference_date, + created_from_payment_request=created_from_payment_request, + ) if auto_apply_customer_withholding(pe) and pe.source_exchange_rate: set_customer_withholding(pe) return pe