mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 17:04:47 +00:00
Merge pull request #45081 from frappe/mergify/copy/develop/pr-44949
Add phone number field when channel is phone on Payment Request doctype (copy #44949)
This commit is contained in:
@@ -60,7 +60,9 @@
|
|||||||
"payment_order",
|
"payment_order",
|
||||||
"amended_from",
|
"amended_from",
|
||||||
"column_break_pnyv",
|
"column_break_pnyv",
|
||||||
"payment_url"
|
"payment_url",
|
||||||
|
"column_break_iiuv",
|
||||||
|
"phone_number"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@@ -378,6 +380,7 @@
|
|||||||
"read_only": 1
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"depends_on": "eval: doc.payment_channel==\"Phone\"",
|
||||||
"fetch_from": "payment_gateway_account.payment_channel",
|
"fetch_from": "payment_gateway_account.payment_channel",
|
||||||
"fieldname": "payment_channel",
|
"fieldname": "payment_channel",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
@@ -444,13 +447,22 @@
|
|||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"label": "Party Name",
|
"label": "Party Name",
|
||||||
"read_only": 1
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_iiuv",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "phone_number",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Phone Number"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"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-10-23 12:23:40.117336",
|
"modified": "2025-01-04 05:39:32.448857",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Request",
|
"name": "Payment Request",
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ class PaymentRequest(Document):
|
|||||||
payment_order: DF.Link | None
|
payment_order: DF.Link | None
|
||||||
payment_request_type: DF.Literal["Outward", "Inward"]
|
payment_request_type: DF.Literal["Outward", "Inward"]
|
||||||
payment_url: DF.Data | None
|
payment_url: DF.Data | None
|
||||||
|
phone_number: DF.Data | None
|
||||||
print_format: DF.Literal[None]
|
print_format: DF.Literal[None]
|
||||||
project: DF.Link | None
|
project: DF.Link | None
|
||||||
reference_doctype: DF.Link | None
|
reference_doctype: DF.Link | None
|
||||||
@@ -221,6 +222,7 @@ class PaymentRequest(Document):
|
|||||||
sender=self.email_to,
|
sender=self.email_to,
|
||||||
currency=self.currency,
|
currency=self.currency,
|
||||||
payment_gateway=self.payment_gateway,
|
payment_gateway=self.payment_gateway,
|
||||||
|
phone_number=self.phone_number,
|
||||||
)
|
)
|
||||||
|
|
||||||
controller.validate_transaction_currency(self.currency)
|
controller.validate_transaction_currency(self.currency)
|
||||||
@@ -643,6 +645,7 @@ def make_payment_request(**args):
|
|||||||
or args.order_type == "Shopping Cart" # compat for webshop app
|
or args.order_type == "Shopping Cart" # compat for webshop app
|
||||||
or gateway_account.get("payment_channel", "Email") != "Email"
|
or gateway_account.get("payment_channel", "Email") != "Email"
|
||||||
),
|
),
|
||||||
|
"phone_number": args.get("phone_number") if args.get("phone_number") else None,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user