Commit 56e55b0a by Damien Moulard

fix bad meal voucher amount when mona payment exists

parent b58475ef
...@@ -335,6 +335,13 @@ odoo.define("pos_meal_voucher.screens", function (require) { ...@@ -335,6 +335,13 @@ odoo.define("pos_meal_voucher.screens", function (require) {
// update selected (last) payment line & order with meal voucher data // update selected (last) payment line & order with meal voucher data
function update_order_meal_voucher_data(issuer = '') { function update_order_meal_voucher_data(issuer = '') {
var total_eligible = order.get_total_meal_voucher_eligible(); var total_eligible = order.get_total_meal_voucher_eligible();
// Function defined in module "lacagette_mona", that may not be activated.
// If said module is activated, consider this eligible amount.
if (typeof order.get_total_meal_vouchers_eligible_including_mona === "function") {
total_eligible = order.get_total_meal_vouchers_eligible_including_mona();
}
var total_received = order.get_total_meal_voucher_received(); var total_received = order.get_total_meal_voucher_received();
var max_amount = self.pos.config.max_meal_voucher_amount; var max_amount = self.pos.config.max_meal_voucher_amount;
var current_max = total_eligible; var current_max = 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