mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-17 22:12:12 +00:00
feat: add party name in payment request
(cherry picked from commit 0acb609d97)
# Conflicts:
# erpnext/accounts/doctype/payment_request/payment_request.py
This commit is contained in:
committed by
Mergify
parent
7202939e0d
commit
935f2e11e8
@@ -14,6 +14,7 @@
|
|||||||
"party_details",
|
"party_details",
|
||||||
"party_type",
|
"party_type",
|
||||||
"party",
|
"party",
|
||||||
|
"party_name",
|
||||||
"column_break_4",
|
"column_break_4",
|
||||||
"reference_doctype",
|
"reference_doctype",
|
||||||
"reference_name",
|
"reference_name",
|
||||||
@@ -422,13 +423,19 @@
|
|||||||
"label": "Party Account Currency",
|
"label": "Party Account Currency",
|
||||||
"options": "Currency",
|
"options": "Currency",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "party_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Party Name",
|
||||||
|
"read_only": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"in_create": 1,
|
"in_create": 1,
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"is_submittable": 1,
|
"is_submittable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-09-16 17:50:54.440090",
|
"modified": "2024-10-23 12:23:40.117336",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Request",
|
"name": "Payment Request",
|
||||||
@@ -467,4 +474,4 @@
|
|||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"states": []
|
"states": []
|
||||||
}
|
}
|
||||||
@@ -71,6 +71,7 @@ class PaymentRequest(Document):
|
|||||||
outstanding_amount: DF.Currency
|
outstanding_amount: DF.Currency
|
||||||
party: DF.DynamicLink | None
|
party: DF.DynamicLink | None
|
||||||
party_account_currency: DF.Link | None
|
party_account_currency: DF.Link | None
|
||||||
|
party_name: DF.Data | None
|
||||||
party_type: DF.Link | None
|
party_type: DF.Link | None
|
||||||
payment_account: DF.ReadOnly | None
|
payment_account: DF.ReadOnly | None
|
||||||
payment_channel: DF.Literal["", "Email", "Phone", "Other"]
|
payment_channel: DF.Literal["", "Email", "Phone", "Other"]
|
||||||
@@ -609,6 +610,19 @@ def make_payment_request(**args):
|
|||||||
"party_type": party_type,
|
"party_type": party_type,
|
||||||
"party": args.get("party") or ref_doc.get("customer"),
|
"party": args.get("party") or ref_doc.get("customer"),
|
||||||
"bank_account": bank_account,
|
"bank_account": bank_account,
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
"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
|
||||||
|
),
|
||||||
|
"mute_email": (
|
||||||
|
args.mute_email # new standard
|
||||||
|
or args.order_type == "Shopping Cart" # compat for webshop app
|
||||||
|
or gateway_account.get("payment_channel", "Email") != "Email"
|
||||||
|
),
|
||||||
|
>>>>>>> 0acb609d97 (feat: add party name in payment request)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -375,7 +375,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
recipient_id: me.frm.doc.contact_email,
|
recipient_id: me.frm.doc.contact_email,
|
||||||
payment_request_type: payment_request_type,
|
payment_request_type: payment_request_type,
|
||||||
party_type: payment_request_type == 'Outward' ? "Supplier" : "Customer",
|
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) {
|
callback: function(r) {
|
||||||
if(!r.exc){
|
if(!r.exc){
|
||||||
|
|||||||
Reference in New Issue
Block a user