Commit 469eaca5 by Thibault Grandjean

fix selector undefined

parent 37d90424
...@@ -82,7 +82,11 @@ odoo.define("pos_meal_voucher.screens", function (require) { ...@@ -82,7 +82,11 @@ odoo.define("pos_meal_voucher.screens", function (require) {
var order = this.pos.get_order(); var order = this.pos.get_order();
if (!this.meal_voucher_activated()) { if (!this.meal_voucher_activated()) {
this.el.querySelector(".summary .meal-voucher").style.display = 'none'; const meal_voucher_summary = this.el.querySelector(".summary .meal-voucher");
if (meal_voucher_summary != null) {
meal_voucher_summary.style.display = 'none';
}
// this.el.querySelector(".summary .meal-voucher").style.display = 'none';
return; return;
} }
if (!order.get_orderlines().length) { if (!order.get_orderlines().length) {
...@@ -321,8 +325,6 @@ odoo.define("pos_meal_voucher.screens", function (require) { ...@@ -321,8 +325,6 @@ odoo.define("pos_meal_voucher.screens", function (require) {
return; return;
} }
var meal_voucher_available = this.meal_voucher_activated();
// Update meal voucher summary // Update meal voucher summary
var total_eligible = order.get_total_meal_voucher_eligible(); var total_eligible = order.get_total_meal_voucher_eligible();
this.el.querySelector("#meal-voucher-eligible-amount").textContent = this.format_currency(total_eligible); this.el.querySelector("#meal-voucher-eligible-amount").textContent = this.format_currency(total_eligible);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment