mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 15:39:20 +00:00
Merge pull request #42533 from frappe/mergify/bp/version-15-hotfix/pr-42476
refactor: checkbox to control Payment Request creation (backport #42476)
This commit is contained in:
@@ -73,7 +73,9 @@
|
|||||||
"remarks_section",
|
"remarks_section",
|
||||||
"general_ledger_remarks_length",
|
"general_ledger_remarks_length",
|
||||||
"column_break_lvjk",
|
"column_break_lvjk",
|
||||||
"receivable_payable_remarks_length"
|
"receivable_payable_remarks_length",
|
||||||
|
"payment_request_settings",
|
||||||
|
"create_pr_in_draft_status"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@@ -475,6 +477,18 @@
|
|||||||
"fieldname": "calculate_depr_using_total_days",
|
"fieldname": "calculate_depr_using_total_days",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Calculate daily depreciation using total days in depreciation period"
|
"label": "Calculate daily depreciation using total days in depreciation period"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Payment Request created from Sales Order or Purchase Order will be in Draft status. When disabled document will be in unsaved state.",
|
||||||
|
"fieldname": "payment_request_settings",
|
||||||
|
"fieldtype": "Tab Break",
|
||||||
|
"label": "Payment Request"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "1",
|
||||||
|
"fieldname": "create_pr_in_draft_status",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Create in Draft Status"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "icon-cog",
|
"icon": "icon-cog",
|
||||||
@@ -482,7 +496,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-07-12 00:24:20.957726",
|
"modified": "2024-07-26 06:48:52.714630",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Accounts Settings",
|
"name": "Accounts Settings",
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class AccountsSettings(Document):
|
|||||||
book_tax_discount_loss: DF.Check
|
book_tax_discount_loss: DF.Check
|
||||||
calculate_depr_using_total_days: DF.Check
|
calculate_depr_using_total_days: DF.Check
|
||||||
check_supplier_invoice_uniqueness: DF.Check
|
check_supplier_invoice_uniqueness: DF.Check
|
||||||
|
create_pr_in_draft_status: DF.Check
|
||||||
credit_controller: DF.Link | None
|
credit_controller: DF.Link | None
|
||||||
delete_linked_ledger_entries: DF.Check
|
delete_linked_ledger_entries: DF.Check
|
||||||
determine_address_tax_category_from: DF.Literal["Billing Address", "Shipping Address"]
|
determine_address_tax_category_from: DF.Literal["Billing Address", "Shipping Address"]
|
||||||
|
|||||||
@@ -500,7 +500,8 @@ def make_payment_request(**args):
|
|||||||
if args.order_type == "Shopping Cart" or args.mute_email:
|
if args.order_type == "Shopping Cart" or args.mute_email:
|
||||||
pr.flags.mute_email = True
|
pr.flags.mute_email = True
|
||||||
|
|
||||||
pr.insert(ignore_permissions=True)
|
if frappe.db.get_single_value("Accounts Settings", "create_pr_in_draft_status", cache=True):
|
||||||
|
pr.insert(ignore_permissions=True)
|
||||||
if args.submit_doc:
|
if args.submit_doc:
|
||||||
pr.submit()
|
pr.submit()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user