mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-16 00:37:15 +00:00
feat: add party name in payment request
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
"party_details",
|
||||
"party_type",
|
||||
"party",
|
||||
"party_name",
|
||||
"column_break_4",
|
||||
"reference_doctype",
|
||||
"reference_name",
|
||||
@@ -437,13 +438,19 @@
|
||||
"label": "Party Account Currency",
|
||||
"options": "Currency",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "party_name",
|
||||
"fieldtype": "Data",
|
||||
"label": "Party Name",
|
||||
"read_only": 1
|
||||
}
|
||||
],
|
||||
"in_create": 1,
|
||||
"index_web_pages_for_search": 1,
|
||||
"is_submittable": 1,
|
||||
"links": [],
|
||||
"modified": "2024-09-16 17:50:54.440090",
|
||||
"modified": "2024-10-23 12:23:40.117336",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Payment Request",
|
||||
@@ -482,4 +489,4 @@
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
}
|
||||
@@ -63,6 +63,7 @@ class PaymentRequest(Document):
|
||||
outstanding_amount: DF.Currency
|
||||
party: DF.DynamicLink | None
|
||||
party_account_currency: DF.Link | None
|
||||
party_name: DF.Data | None
|
||||
party_type: DF.Link | None
|
||||
payment_account: DF.ReadOnly | None
|
||||
payment_channel: DF.Literal["", "Email", "Phone", "Other"]
|
||||
@@ -608,6 +609,7 @@ def make_payment_request(**args):
|
||||
"party_type": party_type,
|
||||
"party": args.get("party") or ref_doc.get("customer"),
|
||||
"bank_account": bank_account,
|
||||
"party_name": args.get("party_name") or ref_doc.get("customer_name"),
|
||||
"make_sales_invoice": (
|
||||
args.make_sales_invoice # new standard
|
||||
or args.order_type == "Shopping Cart" # compat for webshop app
|
||||
|
||||
@@ -375,7 +375,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
recipient_id: me.frm.doc.contact_email,
|
||||
payment_request_type: payment_request_type,
|
||||
party_type: payment_request_type == 'Outward' ? "Supplier" : "Customer",
|
||||
party: payment_request_type == 'Outward' ? me.frm.doc.supplier : me.frm.doc.customer
|
||||
party: payment_request_type == 'Outward' ? me.frm.doc.supplier : me.frm.doc.customer,
|
||||
party_name:payment_request_type == 'Outward' ? me.frm.doc.supplier_name : me.frm.doc.customer_name
|
||||
},
|
||||
callback: function(r) {
|
||||
if(!r.exc){
|
||||
|
||||
Reference in New Issue
Block a user