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
1
Merge Requests
1
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
f4e20155
Commit
f4e20155
authored
Feb 01, 2021
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quelques modifications manuelles sur fichiers JS (warnings ESLint)
parent
8d008341
Pipeline
#728
failed with stage
in 10 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
12 deletions
+7
-12
custom_lists.js
inventory/static/js/custom_lists.js
+2
-2
stock_movements.js
stock/static/js/stock_movements.js
+2
-7
stock_movements_view.js
stock/static/js/stock_movements_view.js
+3
-3
No files found.
inventory/static/js/custom_lists.js
View file @
f4e20155
...
@@ -12,7 +12,7 @@ function init_datatable() {
...
@@ -12,7 +12,7 @@ function init_datatable() {
{
{
data
:
"datetime_created"
,
data
:
"datetime_created"
,
title
:
"Liste"
,
title
:
"Liste"
,
render
:
function
(
data
,
type
,
full
,
meta
)
{
render
:
function
(
data
)
{
return
"Liste du "
+
data
;
return
"Liste du "
+
data
;
}
}
},
},
...
@@ -31,7 +31,7 @@ function init_datatable() {
...
@@ -31,7 +31,7 @@ function init_datatable() {
title
:
"Inventaire à faire"
,
title
:
"Inventaire à faire"
,
className
:
"dt-body-center"
,
className
:
"dt-body-center"
,
width
:
"15%"
,
width
:
"15%"
,
render
:
function
(
data
,
type
,
full
,
meta
)
{
render
:
function
(
data
)
{
if
(
data
==
''
)
if
(
data
==
''
)
return
"<button class='btn--primary do_inventory'>Inventaire en rayon</button>"
;
return
"<button class='btn--primary do_inventory'>Inventaire en rayon</button>"
;
else
else
...
...
stock/static/js/stock_movements.js
View file @
f4e20155
...
@@ -276,10 +276,8 @@ function get_stored_product_with_bc(barcode) {
...
@@ -276,10 +276,8 @@ function get_stored_product_with_bc(barcode) {
/*
/*
* Fetch a product when barcode is read
* Fetch a product when barcode is read
* On dynamic_search mode, we try to read barcode as it is written,
* so the process is slightly different
*/
*/
function
fetch_product_from_bc
(
barcode
,
dynamic_search
=
false
)
{
function
fetch_product_from_bc
(
barcode
)
{
//console.log(barcode)
//console.log(barcode)
if
(
barcode
==
''
)
{
if
(
barcode
==
''
)
{
...
@@ -293,9 +291,6 @@ function fetch_product_from_bc(barcode, dynamic_search = false) {
...
@@ -293,9 +291,6 @@ function fetch_product_from_bc(barcode, dynamic_search = false) {
if
(
p
==
null
)
{
if
(
p
==
null
)
{
$
(
'#icon_product_not_found'
).
show
();
$
(
'#icon_product_not_found'
).
show
();
alert
(
"Le code-barre "
+
barcode
+
" ne correspond à aucun article connu."
);
alert
(
"Le code-barre "
+
barcode
+
" ne correspond à aucun article connu."
);
// if (!dynamic_search) {
// reset_focus();
// }
return
-
1
;
return
-
1
;
}
}
...
@@ -761,7 +756,7 @@ $(document).ready(function() {
...
@@ -761,7 +756,7 @@ $(document).ready(function() {
barcode
=
barcode_input
.
val
();
barcode
=
barcode_input
.
val
();
}
}
fetch_product_from_bc
(
barcode
,
true
);
fetch_product_from_bc
(
barcode
);
}
}
});
});
...
...
stock/static/js/stock_movements_view.js
View file @
f4e20155
...
@@ -11,7 +11,7 @@ var dateFormat = "yy-mm-dd",
...
@@ -11,7 +11,7 @@ var dateFormat = "yy-mm-dd",
// Return a date from a string if valid, else return null
// Return a date from a string if valid, else return null
function
getDate
(
element
)
{
function
getDate
(
element
)
{
var
date
;
var
date
=
null
;
try
{
try
{
date
=
$
.
datepicker
.
parseDate
(
dateFormat
,
element
);
date
=
$
.
datepicker
.
parseDate
(
dateFormat
,
element
);
...
@@ -61,7 +61,7 @@ function display_movements(movements) {
...
@@ -61,7 +61,7 @@ function display_movements(movements) {
data
:
"inventory_value"
,
data
:
"inventory_value"
,
title
:
"Valeur"
,
title
:
"Valeur"
,
className
:
"dt-body-center"
,
className
:
"dt-body-center"
,
render
:
function
(
data
,
type
,
full
)
{
render
:
function
(
data
)
{
return
parseFloat
(
data
).
toFixed
(
2
)
+
' €'
;
return
parseFloat
(
data
).
toFixed
(
2
)
+
' €'
;
}
}
},
},
...
@@ -69,7 +69,7 @@ function display_movements(movements) {
...
@@ -69,7 +69,7 @@ function display_movements(movements) {
data
:
"date_done"
,
data
:
"date_done"
,
title
:
"Trier par Date"
,
title
:
"Trier par Date"
,
className
:
"dt-body-center"
,
className
:
"dt-body-center"
,
render
:
function
(
data
,
type
,
full
)
{
render
:
function
(
data
)
{
return
'<i>'
+
data
+
'</i>'
;
return
'<i>'
+
data
+
'</i>'
;
}
}
}
}
...
...
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