mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 04:59:18 +00:00
fix: moved pos related accounts settings configuration to pos settings
This commit is contained in:
@@ -64,10 +64,6 @@
|
|||||||
"role_allowed_to_over_bill",
|
"role_allowed_to_over_bill",
|
||||||
"credit_controller",
|
"credit_controller",
|
||||||
"make_payment_via_journal_entry",
|
"make_payment_via_journal_entry",
|
||||||
"pos_tab",
|
|
||||||
"pos_setting_section",
|
|
||||||
"post_change_gl_entries",
|
|
||||||
"column_break_xrnd",
|
|
||||||
"assets_tab",
|
"assets_tab",
|
||||||
"asset_settings_section",
|
"asset_settings_section",
|
||||||
"calculate_depr_using_total_days",
|
"calculate_depr_using_total_days",
|
||||||
@@ -282,13 +278,6 @@
|
|||||||
"fieldname": "column_break_19",
|
"fieldname": "column_break_19",
|
||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"default": "1",
|
|
||||||
"description": "If enabled, ledger entries will be posted for change amount in POS transactions",
|
|
||||||
"fieldname": "post_change_gl_entries",
|
|
||||||
"fieldtype": "Check",
|
|
||||||
"label": "Create Ledger Entries for Change Amount"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
"description": "Learn about <a href=\"https://docs.erpnext.com/docs/v13/user/manual/en/accounts/articles/common_party_accounting#:~:text=Common%20Party%20Accounting%20in%20ERPNext,Invoice%20against%20a%20primary%20Supplier.\">Common Party</a>",
|
"description": "Learn about <a href=\"https://docs.erpnext.com/docs/v13/user/manual/en/accounts/articles/common_party_accounting#:~:text=Common%20Party%20Accounting%20in%20ERPNext,Invoice%20against%20a%20primary%20Supplier.\">Common Party</a>",
|
||||||
@@ -329,11 +318,6 @@
|
|||||||
"fieldtype": "Tab Break",
|
"fieldtype": "Tab Break",
|
||||||
"label": "Accounts Closing"
|
"label": "Accounts Closing"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldname": "pos_setting_section",
|
|
||||||
"fieldtype": "Section Break",
|
|
||||||
"label": "POS Setting"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"fieldname": "invoice_and_billing_tab",
|
"fieldname": "invoice_and_billing_tab",
|
||||||
"fieldtype": "Tab Break",
|
"fieldtype": "Tab Break",
|
||||||
@@ -348,11 +332,6 @@
|
|||||||
"fieldname": "column_break_17",
|
"fieldname": "column_break_17",
|
||||||
"fieldtype": "Column Break"
|
"fieldtype": "Column Break"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldname": "pos_tab",
|
|
||||||
"fieldtype": "Tab Break",
|
|
||||||
"label": "POS"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
"description": "Enabling this will allow creation of multi-currency invoices against single party account in company currency",
|
"description": "Enabling this will allow creation of multi-currency invoices against single party account in company currency",
|
||||||
@@ -536,10 +515,6 @@
|
|||||||
"label": "Posting Date Inheritance for Exchange Gain / Loss",
|
"label": "Posting Date Inheritance for Exchange Gain / Loss",
|
||||||
"options": "Invoice\nPayment\nReconciliation Date"
|
"options": "Invoice\nPayment\nReconciliation Date"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"fieldname": "column_break_xrnd",
|
|
||||||
"fieldtype": "Column Break"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"default": "Buffered Cursor",
|
"default": "Buffered Cursor",
|
||||||
"fieldname": "receivable_payable_fetch_method",
|
"fieldname": "receivable_payable_fetch_method",
|
||||||
@@ -665,7 +640,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2026-01-02 18:17:18.994348",
|
"modified": "2026-01-09 17:38:04.250917",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Accounts Settings",
|
"name": "Accounts Settings",
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ class AccountsSettings(Document):
|
|||||||
make_payment_via_journal_entry: DF.Check
|
make_payment_via_journal_entry: DF.Check
|
||||||
merge_similar_account_heads: DF.Check
|
merge_similar_account_heads: DF.Check
|
||||||
over_billing_allowance: DF.Currency
|
over_billing_allowance: DF.Currency
|
||||||
post_change_gl_entries: DF.Check
|
|
||||||
receivable_payable_fetch_method: DF.Literal["Buffered Cursor", "UnBuffered Cursor", "Raw SQL"]
|
receivable_payable_fetch_method: DF.Literal["Buffered Cursor", "UnBuffered Cursor", "Raw SQL"]
|
||||||
receivable_payable_remarks_length: DF.Int
|
receivable_payable_remarks_length: DF.Int
|
||||||
reconciliation_queue_size: DF.Int
|
reconciliation_queue_size: DF.Int
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"invoice_type",
|
"invoice_type",
|
||||||
|
"column_break_vwwt",
|
||||||
|
"post_change_gl_entries",
|
||||||
"section_break_gyos",
|
"section_break_gyos",
|
||||||
"invoice_fields",
|
"invoice_fields",
|
||||||
"pos_search_fields"
|
"pos_search_fields"
|
||||||
@@ -34,12 +36,24 @@
|
|||||||
{
|
{
|
||||||
"fieldname": "section_break_gyos",
|
"fieldname": "section_break_gyos",
|
||||||
"fieldtype": "Section Break"
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_vwwt",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"description": "If enabled, ledger entries will be posted for change amount in POS transactions",
|
||||||
|
"fieldname": "post_change_gl_entries",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Create Ledger Entries for Change Amount",
|
||||||
|
"options": "1"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"hide_toolbar": 1,
|
"hide_toolbar": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2026-01-02 18:18:17.586225",
|
"modified": "2026-01-09 17:30:41.476806",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "POS Settings",
|
"name": "POS Settings",
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class POSSettings(Document):
|
|||||||
invoice_fields: DF.Table[POSField]
|
invoice_fields: DF.Table[POSField]
|
||||||
invoice_type: DF.Literal["Sales Invoice", "POS Invoice"]
|
invoice_type: DF.Literal["Sales Invoice", "POS Invoice"]
|
||||||
pos_search_fields: DF.Table[POSSearchFields]
|
pos_search_fields: DF.Table[POSSearchFields]
|
||||||
|
post_change_gl_entries: DF.Check
|
||||||
# end: auto-generated types
|
# end: auto-generated types
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
|
|||||||
@@ -1726,7 +1726,7 @@ class SalesInvoice(SellingController):
|
|||||||
def make_pos_gl_entries(self, gl_entries):
|
def make_pos_gl_entries(self, gl_entries):
|
||||||
if cint(self.is_pos):
|
if cint(self.is_pos):
|
||||||
skip_change_gl_entries = not cint(
|
skip_change_gl_entries = not cint(
|
||||||
frappe.get_single_value("Accounts Settings", "post_change_gl_entries")
|
frappe.get_single_value("POS Settings", "post_change_gl_entries")
|
||||||
)
|
)
|
||||||
|
|
||||||
for payment_mode in self.payments:
|
for payment_mode in self.payments:
|
||||||
|
|||||||
@@ -1173,7 +1173,7 @@ class TestSalesInvoice(ERPNextTestSuite):
|
|||||||
self.assertEqual(expected, res)
|
self.assertEqual(expected, res)
|
||||||
|
|
||||||
def test_pos_with_no_gl_entry_for_change_amount(self):
|
def test_pos_with_no_gl_entry_for_change_amount(self):
|
||||||
frappe.db.set_single_value("Accounts Settings", "post_change_gl_entries", 0)
|
frappe.db.set_single_value("POS Settings", "post_change_gl_entries", 0)
|
||||||
|
|
||||||
make_pos_profile(
|
make_pos_profile(
|
||||||
company="_Test Company with perpetual inventory",
|
company="_Test Company with perpetual inventory",
|
||||||
@@ -1221,7 +1221,7 @@ class TestSalesInvoice(ERPNextTestSuite):
|
|||||||
|
|
||||||
self.validate_pos_gl_entry(pos, pos, 60, validate_without_change_gle=True)
|
self.validate_pos_gl_entry(pos, pos, 60, validate_without_change_gle=True)
|
||||||
|
|
||||||
frappe.db.set_single_value("Accounts Settings", "post_change_gl_entries", 1)
|
frappe.db.set_single_value("POS Settings", "post_change_gl_entries", 1)
|
||||||
|
|
||||||
def validate_pos_gl_entry(self, si, pos, cash_amount, validate_without_change_gle=False):
|
def validate_pos_gl_entry(self, si, pos, cash_amount, validate_without_change_gle=False):
|
||||||
if validate_without_change_gle:
|
if validate_without_change_gle:
|
||||||
|
|||||||
Reference in New Issue
Block a user