Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
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
2
Merge Requests
2
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
third-party
Commits
9c74eac6
Commit
9c74eac6
authored
Jul 20, 2021
by
Alexis Aoun
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adaptation de la detection price to weight à couchdb
parent
54954ebe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
reception_produits.js
reception/static/js/reception_produits.js
+8
-5
No files found.
reception/static/js/reception_produits.js
View file @
9c74eac6
...
...
@@ -176,23 +176,26 @@ function update_distant_orders() {
function
price_to_weight_confirmed_callback
(
foundProduct
,
scannedProduct
)
{
return
function
price_to_weight_confirmed
()
{
let
newQty
=
null
;
if
(
priceToWeightIsCorrect
)
{
foundProduct
.
data
.
product_q
ty
=
scannedProduct
.
qty
;
newQ
ty
=
scannedProduct
.
qty
;
}
else
{
var
tmp
=
Number
((
scannedProduct
.
value
/
document
.
getElementById
(
"new_price_to_weight"
).
value
).
toFixed
(
3
));
let
tmp
=
Number
((
scannedProduct
.
value
/
document
.
getElementById
(
"new_price_to_weight"
).
value
).
toFixed
(
3
));
if
(
isFinite
(
tmp
))
{
foundProduct
.
data
.
product_q
ty
=
tmp
;
newQ
ty
=
tmp
;
}
}
if
(
foundProduct
.
data
!==
null
&&
isFinite
(
tmp
))
{
editProductInfo
(
foundProduct
.
data
,
foundProduct
.
data
.
product_qty
);
if
(
foundProduct
.
data
!==
null
&&
newQty
!=
null
)
{
if
(
foundProduct
.
place
===
'to_process'
)
{
let
row
=
table_to_process
.
row
(
$
(
'#'
+
foundProduct
.
data
.
product_id
[
0
]));
remove_from_toProcess
(
row
,
foundProduct
.
data
);
}
editing_product
=
foundProduct
.
data
;
editProductInfo
(
foundProduct
.
data
,
newQty
);
editing_product
=
null
;
resetPopUpButtons
();
}
};
...
...
Damien Moulard
@DamienM
mentioned in commit
1835290c
Jan 17, 2022
mentioned in commit
1835290c
mentioned in commit 1835290c2a6ff23629dd84d8d34ae2c61cb8406d
Toggle commit list
Damien Moulard
@DamienM
mentioned in merge request
!105 (merged)
Jan 17, 2022
mentioned in merge request
!105 (merged)
mentioned in merge request !105
Toggle commit list
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