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
7cea0713
Commit
7cea0713
authored
Jul 29, 2021
by
Damien Moulard
Browse files
Options
Browse Files
Download
Plain Diff
fix conflict
parents
86d0cf71
94eefeab
Pipeline
#1261
passed with stage
in 1 minute 22 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
12 deletions
+18
-12
orders_helper.js
orders/static/js/orders_helper.js
+1
-1
reception_index.js
reception/static/js/reception_index.js
+1
-1
stock_movements.js
stock/static/js/stock_movements.js
+16
-10
No files found.
orders/static/js/orders_helper.js
View file @
7cea0713
...
@@ -952,7 +952,7 @@ function delete_cdb_order() {
...
@@ -952,7 +952,7 @@ function delete_cdb_order() {
alert
(
"Erreur lors de la suppression de la commande... Si l'erreur persiste contactez un administrateur svp."
);
alert
(
"Erreur lors de la suppression de la commande... Si l'erreur persiste contactez un administrateur svp."
);
console
.
log
(
err
);
console
.
log
(
err
);
reject
(
new
Error
(
'fail'
));
reject
(
new
Error
(
"Error while deleting order"
));
}
}
});
});
});
});
...
...
reception/static/js/reception_index.js
View file @
7cea0713
...
@@ -355,7 +355,7 @@ function display_orders_table() {
...
@@ -355,7 +355,7 @@ function display_orders_table() {
$
(
'#orders'
).
empty
();
$
(
'#orders'
).
empty
();
}
}
for
(
let
j
in
orders
)
{
for
(
let
j
in
orders
)
{
console
.
log
(
orders
[
j
].
id
)
console
.
log
(
orders
[
j
].
id
)
;
}
}
table_orders
=
$
(
'#orders'
).
DataTable
({
table_orders
=
$
(
'#orders'
).
DataTable
({
data
:
orders
,
data
:
orders
,
...
...
stock/static/js/stock_movements.js
View file @
7cea0713
...
@@ -166,6 +166,7 @@ function init_datatable() {
...
@@ -166,6 +166,7 @@ function init_datatable() {
let
data
=
row
.
data
();
let
data
=
row
.
data
();
let
validated_data
=
qty_validation
(
qty
,
data
.
uom
.
id
);
let
validated_data
=
qty_validation
(
qty
,
data
.
uom
.
id
);
if
(
validated_data
>=
0
)
{
if
(
validated_data
>=
0
)
{
data
.
qty
=
validated_data
;
data
.
qty
=
validated_data
;
row
.
remove
().
draw
();
row
.
remove
().
draw
();
...
@@ -423,28 +424,33 @@ var update_existing_product = function(product, added_qty, undo_option = false)
...
@@ -423,28 +424,33 @@ var update_existing_product = function(product, added_qty, undo_option = false)
function
qty_validation
(
qty
,
uom_id
)
{
function
qty_validation
(
qty
,
uom_id
)
{
if
(
qty
==
null
||
qty
==
''
)
{
if
(
qty
==
null
||
qty
==
''
)
{
$
.
notify
(
"Il n'y a pas de quantité indiquée, ou ce n'est pas un nombre"
,
{
$
.
notify
(
"Il n'y a pas de quantité indiquée, ou ce n'est pas un nombre"
,
{
globalPosition
:
"top right"
,
globalPosition
:
"top right"
,
className
:
"error"
});
className
:
"error"
});
return
-
1
;
return
-
1
;
}
}
if
(
uom_id
==
1
)
{
if
(
uom_id
==
1
)
{
if
(
qty
/
parseInt
(
qty
)
!=
1
&&
qty
!=
0
){
if
(
qty
/
parseInt
(
qty
)
!=
1
&&
qty
!=
0
)
{
$
.
notify
(
"Une quantité avec décimale est indiquée alors que c'est un article à l'unité"
,
{
$
.
notify
(
"Une quantité avec décimale est indiquée alors que c'est un article à l'unité"
,
{
globalPosition
:
"top right"
,
globalPosition
:
"top right"
,
className
:
"error"
});
className
:
"error"
});
return
-
2
;}
return
-
2
;
}
qty
=
parseInt
(
qty
);
// product by unit
qty
=
parseInt
(
qty
);
// product by unit
}
else
{
}
else
{
qty
=
parseFloat
(
qty
).
toFixed
(
2
);
qty
=
parseFloat
(
qty
).
toFixed
(
2
);
}
}
if
(
isNaN
(
qty
)){
if
(
isNaN
(
qty
))
{
$
.
notify
(
"Une quantité n'est pas un nombre"
,
{
$
.
notify
(
"Une quantité n'est pas un nombre"
,
{
globalPosition
:
"top right"
,
globalPosition
:
"top right"
,
className
:
"error"
});
className
:
"error"
});
return
-
3
;}
return
-
3
;
}
return
qty
;
return
qty
;
}
}
...
...
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