From ef2f9b7f4026f1f68e75e56fcf5ccdd13680add5 Mon Sep 17 00:00:00 2001 From: devdiogenes Date: Tue, 7 Apr 2026 12:34:50 +0000 Subject: [PATCH 1/2] fix: POS Closing Entry, reload invoices when changing dates --- .../doctype/pos_closing_entry/pos_closing_entry.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js index afb8f179fe34..6a15a3d64d78 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js +++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js @@ -56,7 +56,7 @@ frappe.ui.form.on("POS Closing Entry", { } }, - pos_opening_entry(frm) { + reload_invoices: function (frm) { if ( frm.doc.pos_opening_entry && frm.doc.period_start_date && @@ -73,6 +73,18 @@ frappe.ui.form.on("POS Closing Entry", { } }, + pos_opening_entry(frm) { + frm.trigger("reload_invoices"); + }, + + period_start_date(frm) { + frm.trigger("reload_invoices"); + }, + + period_end_date(frm) { + frm.trigger("reload_invoices"); + }, + set_opening_amounts(frm) { return frappe.db .get_doc("POS Opening Entry", frm.doc.pos_opening_entry) From 300c33348ac94827a800269bda37755b219ffb6c Mon Sep 17 00:00:00 2001 From: devdiogenes Date: Fri, 17 Apr 2026 18:01:26 -0300 Subject: [PATCH 2/2] fix: POS Closing Entry, only set period_end_date onload if it was not set yet --- erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js index 6a15a3d64d78..e91159042377 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js +++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.js @@ -8,7 +8,7 @@ frappe.ui.form.on("POS Closing Entry", { return { filters: { status: "Open", docstatus: 1 } }; }); - if (frm.doc.docstatus === 0 && !frm.doc.amended_from) + if (frm.doc.docstatus === 0 && !frm.doc.amended_from && !frm.doc.period_end_date) frm.set_value("period_end_date", frappe.datetime.now_datetime()); frappe.realtime.on("closing_process_complete", async function (data) {