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
caad0771
Commit
caad0771
authored
May 15, 2023
by
Yvon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
story 4617 : blocage validation cas offert supérieur à dû
parent
e1f5bc02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
screens.js
odoo/addons/point_of_sale/static/src/js/screens.js
+15
-0
No files found.
odoo/addons/point_of_sale/static/src/js/screens.js
View file @
caad0771
...
@@ -1900,6 +1900,21 @@ var PaymentScreenWidget = ScreenWidget.extend({
...
@@ -1900,6 +1900,21 @@ var PaymentScreenWidget = ScreenWidget.extend({
return
false
;
return
false
;
}
}
var
totalPaidExceptCashOrMealVoucherPaper
=
0
;
//block if this amount is more than total with tax
for
(
i
=
0
;
i
<
plines
.
length
;
i
++
)
{
if
(
plines
[
i
].
get_type
()
!==
'cash'
&&
!
plines
[
i
].
is_paper_meal_voucher
())
{
totalPaidExceptCashOrMealVoucherPaper
+=
plines
[
i
].
get_amount
();
}
}
if
(
!
force_validation
&&
order
.
get_total_with_tax
()
>
0
&&
(
order
.
get_total_with_tax
()
<
totalPaidExceptCashOrMealVoucherPaper
))
{
this
.
gui
.
show_popup
(
'error'
,{
title
:
_t
(
'Le rendu de monnaie est possible seulement sur les lignes espèces et chèques repas.'
),
body
:
_t
(
'Pour valider le paiement, la somme des montants offerts des lignes (hors espèces et chèques repas) doit donc être inférieure au total dû.'
),
});
return
false
;
}
return
true
;
return
true
;
},
},
...
...
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