mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-28 17:34:47 +00:00
Merge pull request #42476 from ruthra-kumar/configuration_to_control_payment_request_creation
refactor: checkbox to control Payment Request creation
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"]
|
||||||
|
|||||||
@@ -509,7 +509,8 @@ def make_payment_request(**args):
|
|||||||
for dimension in get_accounting_dimensions():
|
for dimension in get_accounting_dimensions():
|
||||||
pr.update({dimension: ref_doc.get(dimension)})
|
pr.update({dimension: ref_doc.get(dimension)})
|
||||||
|
|
||||||
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