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
8c470aae
Commit
8c470aae
authored
Feb 01, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better detection of meal voucher payment lines
parent
87ebf8c9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
models.js
lacagette_addons/pos_meal_voucher/static/src/js/models.js
+2
-2
screens.js
lacagette_addons/pos_meal_voucher/static/src/js/screens.js
+1
-2
No files found.
lacagette_addons/pos_meal_voucher/static/src/js/models.js
View file @
8c470aae
...
...
@@ -42,13 +42,13 @@ odoo.define("pos_meal_voucher.models", function (require) {
var
paymentlines
=
[];
// Add fork&knife symbol on pos ticket for product with meal voucher allowed & when meal voucher is used
// Add fork&knife symbol on pos ticket for product
s
with meal voucher allowed & when meal voucher is used
var
meal_voucher_used
=
false
;
this
.
paymentlines
.
each
(
function
(
paymentline
){
var
line
=
paymentline
.
export_for_printing
();
paymentlines
.
push
(
line
);
if
(
line
.
journal
.
toLowerCase
().
includes
(
"dej"
)
||
line
.
journal
.
toLowerCase
().
includes
(
"déj"
))
{
if
(
paymentline
.
is_meal_voucher
(
))
{
meal_voucher_used
=
true
;
}
});
...
...
lacagette_addons/pos_meal_voucher/static/src/js/screens.js
View file @
8c470aae
...
...
@@ -168,8 +168,7 @@ odoo.define("pos_meal_voucher.screens", function (require) {
// Add fork&knife symbol on pos ticket for product with meal voucher allowed & when meal voucher is used
var
meal_voucher_used
=
false
;
for
(
var
i
=
0
;
i
<
paymentlines
.
length
;
i
++
)
{
var
line
=
paymentlines
[
i
].
export_for_printing
();
if
(
line
.
journal
.
toLowerCase
().
includes
(
"dej"
)
||
line
.
journal
.
toLowerCase
().
includes
(
"déj"
))
{
if
(
paymentlines
[
i
].
is_meal_voucher
())
{
meal_voucher_used
=
true
;
break
;
}
...
...
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