From aee8a23626df78b6d823c3ac8b983af98390c96d Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Wed, 6 Nov 2024 12:02:29 +0530 Subject: [PATCH 1/5] fix: removed single quotes from deferred revenue (#43985) (cherry picked from commit 834d18840c0644140fe2d3af2883c44bd687550c) --- erpnext/accounts/deferred_revenue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/deferred_revenue.py b/erpnext/accounts/deferred_revenue.py index cd34bf7f8501..a88764cf1b2f 100644 --- a/erpnext/accounts/deferred_revenue.py +++ b/erpnext/accounts/deferred_revenue.py @@ -58,7 +58,7 @@ def build_conditions(process_type, account, company): ) if account: - conditions += f"AND {deferred_account}='{frappe.db.escape(account)}'" + conditions += f"AND {deferred_account}={frappe.db.escape(account)}" elif company: conditions += f"AND p.company = {frappe.db.escape(company)}" From 657bd3712b7ed7cc4c735a612fcdcba61a06c321 Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Wed, 6 Nov 2024 13:21:19 +0530 Subject: [PATCH 2/5] fix: error when saving POS merge log (#43989) (cherry picked from commit c62596b323f81bcd2235e103765153e92802b43b) --- .../doctype/pos_invoice_merge_log/pos_invoice_merge_log.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index a183a5ee6aa0..8c8fa09a2921 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -389,7 +389,9 @@ def split_invoices(invoices): if not item.serial_no: continue - return_against_is_added = any(d for d in _invoices if d.pos_invoice == pos_invoice.return_against) + return_against_is_added = any( + d for d in _invoices if d[0].pos_invoice == pos_invoice.return_against + ) if return_against_is_added: break From 5c8af850864cd78dd3f844f122c42b04f4209c0d Mon Sep 17 00:00:00 2001 From: Sagar Vora Date: Wed, 6 Nov 2024 14:04:30 +0530 Subject: [PATCH 3/5] fix: ensure list has items (cherry picked from commit e13e688987755ed1456cf8d41666e50a906d439b) --- .../doctype/pos_invoice_merge_log/pos_invoice_merge_log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py index 8c8fa09a2921..23dee2985b80 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/pos_invoice_merge_log.py @@ -390,7 +390,7 @@ def split_invoices(invoices): continue return_against_is_added = any( - d for d in _invoices if d[0].pos_invoice == pos_invoice.return_against + d for d in _invoices if d and d[0].pos_invoice == pos_invoice.return_against ) if return_against_is_added: break From bc9f0f8368173e7d8c1c31e9bc2c11a68b10f7ee Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:49:42 +0530 Subject: [PATCH 4/5] fix: task showing limit in customer portal (backport #44003) (#44004) fix: task showing limit in customer portal (#44003) (cherry picked from commit 44832c3b5cd38223072842cf0937aa5615f93114) Co-authored-by: Nihantra C. Patel <141945075+Nihantra-Patel@users.noreply.github.com> --- erpnext/templates/pages/projects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/templates/pages/projects.py b/erpnext/templates/pages/projects.py index e3e26fc82a6f..787c7c0069b1 100644 --- a/erpnext/templates/pages/projects.py +++ b/erpnext/templates/pages/projects.py @@ -51,7 +51,7 @@ def get_tasks(project, start=0, search=None, item_status=None): "parent_task", ], limit_start=start, - limit_page_length=10, + limit_page_length=100, ) task_nest = [] for task in tasks: From 9838eaa3321da07d8576f48429d5e7349389f5ce Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 7 Nov 2024 13:12:46 +0530 Subject: [PATCH 5/5] fix: serial no ledger report (#44006) --- erpnext/stock/doctype/serial_no/serial_no.js | 18 ++++++++++++++++++ .../serial_no_ledger/serial_no_ledger.js | 8 ++++++++ 2 files changed, 26 insertions(+) diff --git a/erpnext/stock/doctype/serial_no/serial_no.js b/erpnext/stock/doctype/serial_no/serial_no.js index 88ed7abe2bdb..b12bbbdb27cc 100644 --- a/erpnext/stock/doctype/serial_no/serial_no.js +++ b/erpnext/stock/doctype/serial_no/serial_no.js @@ -18,3 +18,21 @@ cur_frm.cscript.onload = function () { frappe.ui.form.on("Serial No", "refresh", function (frm) { frm.toggle_enable("item_code", frm.doc.__islocal); }); + +frappe.ui.form.on("Serial No", { + refresh(frm) { + frm.trigger("view_ledgers"); + }, + + view_ledgers(frm) { + frm.add_custom_button(__("View Ledgers"), () => { + frappe.route_options = { + item_code: frm.doc.item_code, + serial_no: frm.doc.name, + posting_date: frappe.datetime.now_date(), + posting_time: frappe.datetime.now_time(), + }; + frappe.set_route("query-report", "Serial No Ledger"); + }); + }, +}); diff --git a/erpnext/stock/report/serial_no_ledger/serial_no_ledger.js b/erpnext/stock/report/serial_no_ledger/serial_no_ledger.js index 6c2c17db52c0..6ba2b0ec634e 100644 --- a/erpnext/stock/report/serial_no_ledger/serial_no_ledger.js +++ b/erpnext/stock/report/serial_no_ledger/serial_no_ledger.js @@ -45,8 +45,16 @@ frappe.query_reports["Serial No Ledger"] = { { label: __("As On Date"), fieldtype: "Date", + reqd: 1, fieldname: "posting_date", default: frappe.datetime.get_today(), }, + { + label: __("Posting Time"), + fieldtype: "Time", + reqd: 1, + fieldname: "posting_time", + default: frappe.datetime.now_time(), + }, ], };