From ce45d1664db996bcdb220fe0ffe09076defa3aeb Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Wed, 21 May 2025 12:46:36 +0200 Subject: [PATCH 1/6] fix: translate_pos_buttons --- .../selling/page/point_of_sale/pos_past_order_summary.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js index 18d9e6aad34..9166b7f3512 100644 --- a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js +++ b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js @@ -356,17 +356,17 @@ erpnext.PointOfSale.PastOrderSummary = class { get_condition_btn_map(after_submission) { if (after_submission) - return [{ condition: true, visible_btns: ["Print Receipt", "Email Receipt", "New Order"] }]; + return [{ condition: true, visible_btns: [__("Print Receipt"), __("Email Receipt"), __("New Order")] }]; return [ - { condition: this.doc.docstatus === 0, visible_btns: ["Edit Order", "Delete Order"] }, + { condition: this.doc.docstatus === 0, visible_btns: [__("Edit Order"), __("Delete Order")] }, { condition: !this.doc.is_return && this.doc.docstatus === 1, - visible_btns: ["Print Receipt", "Email Receipt", "Return"], + visible_btns: [__("Print Receipt"), __("Email Receipt"), __("Return")], }, { condition: this.doc.is_return && this.doc.docstatus === 1, - visible_btns: ["Print Receipt", "Email Receipt"], + visible_btns: [__("Print Receipt"), __("Email Receipt")], }, ]; } From 4a6b5b99931c2bedbb4fc12dfb16790bccc53733 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Wed, 21 May 2025 12:54:25 +0200 Subject: [PATCH 2/6] fix: linter --- .../selling/page/point_of_sale/pos_past_order_summary.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js index 9166b7f3512..c6e311e8bab 100644 --- a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js +++ b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js @@ -356,7 +356,12 @@ erpnext.PointOfSale.PastOrderSummary = class { get_condition_btn_map(after_submission) { if (after_submission) - return [{ condition: true, visible_btns: [__("Print Receipt"), __("Email Receipt"), __("New Order")] }]; + return [ + { + condition: true, + visible_btns: [__("Print Receipt"), __("Email Receipt"), __("New Order")] + }, + ]; return [ { condition: this.doc.docstatus === 0, visible_btns: [__("Edit Order"), __("Delete Order")] }, From 1953c8489ccd86fcc27a7d492fd618b138fbf8f2 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Wed, 21 May 2025 12:59:07 +0200 Subject: [PATCH 3/6] fix: prettier --- erpnext/selling/page/point_of_sale/pos_past_order_summary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js index c6e311e8bab..6eb0c89875e 100644 --- a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js +++ b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js @@ -359,7 +359,7 @@ erpnext.PointOfSale.PastOrderSummary = class { return [ { condition: true, - visible_btns: [__("Print Receipt"), __("Email Receipt"), __("New Order")] + visible_btns: [__("Print Receipt"), __("Email Receipt"), __("New Order")], }, ]; From a442ec4e80e9d5839f742081f6233bf0371cd3ec Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Wed, 21 May 2025 13:01:11 +0200 Subject: [PATCH 4/6] fix: space --- .../selling/page/point_of_sale/pos_past_order_summary.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js index 6eb0c89875e..81badc84d00 100644 --- a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js +++ b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js @@ -357,10 +357,10 @@ erpnext.PointOfSale.PastOrderSummary = class { get_condition_btn_map(after_submission) { if (after_submission) return [ - { - condition: true, - visible_btns: [__("Print Receipt"), __("Email Receipt"), __("New Order")], - }, + { + condition: true, + visible_btns: [__("Print Receipt"), __("Email Receipt"), __("New Order")], + }, ]; return [ From 50a5b5190902be01deb3e3ceddb7d881da06d379 Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Wed, 21 May 2025 13:04:08 +0200 Subject: [PATCH 5/6] fix: space --- erpnext/selling/page/point_of_sale/pos_past_order_summary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js index 81badc84d00..83c686bf446 100644 --- a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js +++ b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js @@ -359,7 +359,7 @@ erpnext.PointOfSale.PastOrderSummary = class { return [ { condition: true, - visible_btns: [__("Print Receipt"), __("Email Receipt"), __("New Order")], + visible_btns: [__("Print Receipt"), __("Email Receipt"), __("New Order")], }, ]; From 2839fc94607bc3e2063675d8d5927c3c435a2fed Mon Sep 17 00:00:00 2001 From: mahsem <137205921+mahsem@users.noreply.github.com> Date: Wed, 21 May 2025 13:21:55 +0200 Subject: [PATCH 6/6] fix: prettier --- erpnext/selling/page/point_of_sale/pos_past_order_summary.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js index 83c686bf446..d6cbe3bd1c0 100644 --- a/erpnext/selling/page/point_of_sale/pos_past_order_summary.js +++ b/erpnext/selling/page/point_of_sale/pos_past_order_summary.js @@ -364,7 +364,10 @@ erpnext.PointOfSale.PastOrderSummary = class { ]; return [ - { condition: this.doc.docstatus === 0, visible_btns: [__("Edit Order"), __("Delete Order")] }, + { + condition: this.doc.docstatus === 0, + visible_btns: [__("Edit Order"), __("Delete Order")], + }, { condition: !this.doc.is_return && this.doc.docstatus === 1, visible_btns: [__("Print Receipt"), __("Email Receipt"), __("Return")],