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
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
Alexis AOUN
third-party
Commits
9c74eac6
Commit
9c74eac6
authored
Jul 20, 2021
by
Alexis Aoun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adaptation de la detection price to weight à couchdb
parent
54954ebe
Show 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() {
...
@@ -176,23 +176,26 @@ function update_distant_orders() {
function
price_to_weight_confirmed_callback
(
foundProduct
,
scannedProduct
)
{
function
price_to_weight_confirmed_callback
(
foundProduct
,
scannedProduct
)
{
return
function
price_to_weight_confirmed
()
{
return
function
price_to_weight_confirmed
()
{
let
newQty
=
null
;
if
(
priceToWeightIsCorrect
)
{
if
(
priceToWeightIsCorrect
)
{
foundProduct
.
data
.
product_q
ty
=
scannedProduct
.
qty
;
newQ
ty
=
scannedProduct
.
qty
;
}
else
{
}
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
))
{
if
(
isFinite
(
tmp
))
{
foundProduct
.
data
.
product_q
ty
=
tmp
;
newQ
ty
=
tmp
;
}
}
}
}
if
(
foundProduct
.
data
!==
null
&&
isFinite
(
tmp
))
{
if
(
foundProduct
.
data
!==
null
&&
newQty
!=
null
)
{
editProductInfo
(
foundProduct
.
data
,
foundProduct
.
data
.
product_qty
);
if
(
foundProduct
.
place
===
'to_process'
)
{
if
(
foundProduct
.
place
===
'to_process'
)
{
let
row
=
table_to_process
.
row
(
$
(
'#'
+
foundProduct
.
data
.
product_id
[
0
]));
let
row
=
table_to_process
.
row
(
$
(
'#'
+
foundProduct
.
data
.
product_id
[
0
]));
remove_from_toProcess
(
row
,
foundProduct
.
data
);
remove_from_toProcess
(
row
,
foundProduct
.
data
);
}
}
editing_product
=
foundProduct
.
data
;
editProductInfo
(
foundProduct
.
data
,
newQty
);
editing_product
=
null
;
resetPopUpButtons
();
resetPopUpButtons
();
}
}
};
};
...
...
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