mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
Merge branch 'version-14-hotfix' into mergify/bp/version-14-hotfix/pr-34895
This commit is contained in:
@@ -19,6 +19,8 @@
|
|||||||
"column_break_17",
|
"column_break_17",
|
||||||
"enable_common_party_accounting",
|
"enable_common_party_accounting",
|
||||||
"allow_multi_currency_invoices_against_single_party_account",
|
"allow_multi_currency_invoices_against_single_party_account",
|
||||||
|
"journals_section",
|
||||||
|
"merge_similar_account_heads",
|
||||||
"report_setting_section",
|
"report_setting_section",
|
||||||
"use_custom_cash_flow",
|
"use_custom_cash_flow",
|
||||||
"deferred_accounting_settings_section",
|
"deferred_accounting_settings_section",
|
||||||
@@ -356,6 +358,18 @@
|
|||||||
"fieldname": "book_tax_discount_loss",
|
"fieldname": "book_tax_discount_loss",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Book Tax Loss on Early Payment Discount"
|
"label": "Book Tax Loss on Early Payment Discount"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "journals_section",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Journals"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"description": "Rows with Same Account heads will be merged on Ledger",
|
||||||
|
"fieldname": "merge_similar_account_heads",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Merge Similar Account Heads"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"icon": "icon-cog",
|
"icon": "icon-cog",
|
||||||
@@ -363,7 +377,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2023-04-14 17:22:03.680886",
|
"modified": "2023-04-17 11:45:42.049247",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Accounts Settings",
|
"name": "Accounts Settings",
|
||||||
|
|||||||
@@ -878,6 +878,8 @@ class JournalEntry(AccountsController):
|
|||||||
def make_gl_entries(self, cancel=0, adv_adj=0):
|
def make_gl_entries(self, cancel=0, adv_adj=0):
|
||||||
from erpnext.accounts.general_ledger import make_gl_entries
|
from erpnext.accounts.general_ledger import make_gl_entries
|
||||||
|
|
||||||
|
merge_entries = frappe.db.get_single_value("Accounts Settings", "merge_similar_account_heads")
|
||||||
|
|
||||||
gl_map = self.build_gl_map()
|
gl_map = self.build_gl_map()
|
||||||
if self.voucher_type in ("Deferred Revenue", "Deferred Expense"):
|
if self.voucher_type in ("Deferred Revenue", "Deferred Expense"):
|
||||||
update_outstanding = "No"
|
update_outstanding = "No"
|
||||||
@@ -885,7 +887,13 @@ class JournalEntry(AccountsController):
|
|||||||
update_outstanding = "Yes"
|
update_outstanding = "Yes"
|
||||||
|
|
||||||
if gl_map:
|
if gl_map:
|
||||||
make_gl_entries(gl_map, cancel=cancel, adv_adj=adv_adj, update_outstanding=update_outstanding)
|
make_gl_entries(
|
||||||
|
gl_map,
|
||||||
|
cancel=cancel,
|
||||||
|
adv_adj=adv_adj,
|
||||||
|
merge_entries=merge_entries,
|
||||||
|
update_outstanding=update_outstanding,
|
||||||
|
)
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_balance(self, difference_account=None):
|
def get_balance(self, difference_account=None):
|
||||||
|
|||||||
@@ -326,5 +326,6 @@ erpnext.patches.v14_0.change_autoname_for_tax_withheld_vouchers
|
|||||||
erpnext.patches.v14_0.update_asset_value_for_manual_depr_entries
|
erpnext.patches.v14_0.update_asset_value_for_manual_depr_entries
|
||||||
erpnext.patches.v14_0.set_pick_list_status
|
erpnext.patches.v14_0.set_pick_list_status
|
||||||
erpnext.patches.v13_0.update_docs_link
|
erpnext.patches.v13_0.update_docs_link
|
||||||
|
execute:frappe.db.set_single_value("Accounts Settings", "merge_similar_account_heads", 0)
|
||||||
# below migration patches should always run last
|
# below migration patches should always run last
|
||||||
erpnext.patches.v14_0.migrate_gl_to_payment_ledger
|
erpnext.patches.v14_0.migrate_gl_to_payment_ledger
|
||||||
|
|||||||
@@ -1453,6 +1453,7 @@ def get_next_stock_reco(kwargs):
|
|||||||
)
|
)
|
||||||
.orderby(CombineDatetime(sle.posting_date, sle.posting_time))
|
.orderby(CombineDatetime(sle.posting_date, sle.posting_time))
|
||||||
.orderby(sle.creation)
|
.orderby(sle.creation)
|
||||||
|
.limit(1)
|
||||||
)
|
)
|
||||||
|
|
||||||
if kwargs.get("batch_no"):
|
if kwargs.get("batch_no"):
|
||||||
|
|||||||
Reference in New Issue
Block a user