Commit d9246966 by Damien Moulard

fix bad amount clicking on pos meal voucher payment method

parent 56e55b0a
============================
La Cagette - MonA
============================
This module extends the Point of Sale Odoo module, as well as the POS Meal Voucher module.
MonA is the payment method of a Common Food Fund experimentation.
The products elligible are the same as the ones elligible to Meal Vouchers.
Configuration
=============
Payment Method
~~~~~~~~
Go to the payment methods and add/update the MonA payment method (needs to be done each time the module is uninstalled/reinstalled).
"Type" should be "Bank".
In the "Point of sale" tab, check the "Pay with MonA" checkbox.
Point of sale
~~~~~~~~
Go to your point of sale and click on the "Activate MonA payment" checkbox.
Add the MonA payment method to your point of sale.
...@@ -332,6 +332,12 @@ odoo.define("pos_meal_voucher.screens", function (require) { ...@@ -332,6 +332,12 @@ odoo.define("pos_meal_voucher.screens", function (require) {
// if user choose card meal voucher // if user choose card meal voucher
if(order.selected_paymentline.is_meal_voucher() && order.selected_paymentline.is_dematerialized_meal_voucher()){ if(order.selected_paymentline.is_meal_voucher() && order.selected_paymentline.is_dematerialized_meal_voucher()){
// Set selected payment line amount to 0 before any further check
order.selected_paymentline.set_amount(0);
paymentScreen.order_changes();
paymentScreen.render_paymentlines();
paymentScreen.$(".paymentline.selected .edit").text(paymentScreen.format_currency_no_symbol(0));
// 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();
......
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