Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
odoo
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
odoo
Commits
2d9449d7
Commit
2d9449d7
authored
3 years ago
by
Etienne Freiss
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add of popup if amount exceded
parent
7cd0bdea
dev_principale
…
2144-check-if-meal-voucher-amount-is-relevant
2251-shift-screen-associate
3408-archived-products-removed
3882-explication-pour-suppression-presence
5873-prevent-special-status-to-be-lost-when-adding-capital-shares
6833--nouveaux-sans-statut
ajout_module_exports_pour_capital_membres
branch_prod_anticipee_Cagette
correctifs_lacagette_membership
curtlery_pos_meal_voucher
dev_cooperatic
docker
graoucoop_backup
graoucoop_prod
lacagette_prod
nouvelle_implentation_mails_rappel
pour_mep
revert-c649eae1
supercafoutch-prod-20220811
supercafoutch_prod
ticket_6464
test
supercafoutch_20240609_115709
supercafoutch_20240212_082431
supercafoutch_20240107_181851
supercafoutch_prod_until_240107
supercafoutch-prod-20220811
supercafoutch-230915
supercafoutch-230823
3 merge requests
!38
Intégration développement Coopératic pour La Cagette
,
!25
Intégration Meal vouchers et fix makeup missed case
,
!23
2158 check if meal voucher card amount is relevant
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
fr.po
lacagette_addons/pos_meal_voucher/i18n/fr.po
+7
-0
screens.js
lacagette_addons/pos_meal_voucher/static/src/js/screens.js
+33
-0
No files found.
lacagette_addons/pos_meal_voucher/i18n/fr.po
View file @
2d9449d7
...
@@ -292,3 +292,9 @@ msgstr "En cliquant sur ce bouton, tous les produits de cette catégories auront
...
@@ -292,3 +292,9 @@ msgstr "En cliquant sur ce bouton, tous les produits de cette catégories auront
msgid "kg"
msgid "kg"
msgstr "kg"
msgstr "kg"
#. module: pos_meal_voucher
#. openerp-web
#: code:addons/pos_meal_voucher/static/src/js/screens.js:110
#, python-format
msgid "Warning, the input amount of meal voucher is above the maximum amount of "
msgstr "Le montant saisi est supérieur au montant maximum/au maximum éligible de "
\ No newline at end of file
This diff is collapsed.
Click to expand it.
lacagette_addons/pos_meal_voucher/static/src/js/screens.js
View file @
2d9449d7
...
@@ -90,6 +90,39 @@ odoo.define("pos_meal_voucher.screens", function (require) {
...
@@ -90,6 +90,39 @@ odoo.define("pos_meal_voucher.screens", function (require) {
},
},
payment_input
:
function
()
{
var
self
=
this
;
this
.
_super
.
apply
(
this
,
arguments
);
var
order
=
this
.
pos
.
get_order
();
if
(
order
.
selected_paymentline
.
is_meal_voucher
()){
var
total_eligible
=
order
.
get_total_meal_voucher_eligible
();
var
total_received
=
order
.
get_total_meal_voucher_received
();
var
max_amount
=
this
.
pos
.
config
.
max_meal_voucher_amount
;
var
current_max
=
total_eligible
;
if
(
max_amount
)
{
current_max
=
Math
.
min
(
total_eligible
,
max_amount
);
}
if
(
total_received
>
current_max
){
this
.
gui
.
show_popup
(
"alert"
,
{
'title'
:
_t
(
"Meal Voucher Amount incorrect"
),
'body'
:
_t
(
"Warning, the input amount of meal voucher is above the maximum amount of "
)
+
this
.
format_currency
(
current_max
),
});
const
max_curent_amount
=
total_eligible
-
total_received
+
order
.
selected_paymentline
.
get_amount
()
;
order
.
selected_paymentline
.
set_amount
(
max_curent_amount
);
this
.
order_changes
();
this
.
render_paymentlines
();
this
.
$
(
'.paymentline.selected .edit'
).
text
(
this
.
format_currency_no_symbol
(
max_curent_amount
));
this
.
inputbuffer
=
""
;
}
}
},
render_paymentlines
:
function
()
{
render_paymentlines
:
function
()
{
var
self
=
this
;
var
self
=
this
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment