Commit 8a0accbd by Yvon

POS cb dej : efface la ligne montant max et total éligible devient le min entre…

POS cb dej : efface la ligne montant max et total éligible devient le min entre total eligible et montant max
parent 704d1e6a
...@@ -353,12 +353,10 @@ odoo.define("pos_meal_voucher.screens", function (require) { ...@@ -353,12 +353,10 @@ odoo.define("pos_meal_voucher.screens", function (require) {
// 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);
var max_amount = this.pos.config.max_meal_voucher_amount; var max_amount = this.pos.config.max_meal_voucher_amount;
if (max_amount !== 0) {
this.el.querySelector("#meal-voucher-max-amount").textContent = this.format_currency(max_amount); this.el.querySelector("#meal-voucher-eligible-amount").textContent = this.format_currency(Math.min(total_eligible,max_amount));
}
var total_received = order.get_total_meal_voucher_received(); var total_received = order.get_total_meal_voucher_received();
this.el.querySelector("#meal-voucher-received-amount").textContent = this.format_currency(total_received); this.el.querySelector("#meal-voucher-received-amount").textContent = this.format_currency(total_received);
......
...@@ -47,15 +47,6 @@ ...@@ -47,15 +47,6 @@
<i id="meal-voucher-eligible-warning" class="fa fa-warning"/> <i id="meal-voucher-eligible-warning" class="fa fa-warning"/>
</td> </td>
</tr> </tr>
<t t-if="widget.pos.config.max_meal_voucher_amount !== 0">
<tr>
<td>Max Amount</td>
<td>
<span id="meal-voucher-max-amount">0.00 €</span>
<i id="meal-voucher-max-warning" class="fa fa-warning"/>
</td>
</tr>
</t>
<tr> <tr>
<td>Total Received</td> <td>Total Received</td>
<td> <td>
......
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