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
ae224347
Commit
ae224347
authored
May 04, 2022
by
François C.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add barcode encoded qty functionality to shelf inventory interface
parent
e2a1e194
Pipeline
#2174
passed with stage
in 1 minute 28 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
shelfs.css
shelfs/static/css/shelfs.css
+3
-1
shelf_inventory.js
shelfs/static/js/shelf_inventory.js
+10
-1
No files found.
shelfs/static/css/shelfs.css
View file @
ae224347
...
@@ -150,7 +150,9 @@ div#container_edition {
...
@@ -150,7 +150,9 @@ div#container_edition {
#product_uom
{
#product_uom
{
font-size
:
small
;
font-size
:
small
;
}
}
#reset_to_previous_qty
{
cursor
:
pointer
;
}
.blink_me
{
.blink_me
{
animation
:
blinker
1s
ease-in-out
;
animation
:
blinker
1s
ease-in-out
;
}
}
...
...
shelfs/static/js/shelf_inventory.js
View file @
ae224347
...
@@ -102,6 +102,12 @@ function barcode_analyzer(chars) {
...
@@ -102,6 +102,12 @@ function barcode_analyzer(chars) {
select_product_from_bc
(
barcode
);
select_product_from_bc
(
barcode
);
}
}
}
}
function
reset_previous_value
()
{
if
(
editing_item
!=
null
)
{
$
(
'#edition_input'
).
val
(
editing_item
.
qty
);
}
}
// Directly send a line to edition when barcode is read
// Directly send a line to edition when barcode is read
function
select_product_from_bc
(
barcode
)
{
function
select_product_from_bc
(
barcode
)
{
var
found
=
null
,
var
found
=
null
,
...
@@ -837,7 +843,10 @@ function init() {
...
@@ -837,7 +843,10 @@ function init() {
*/
*/
});
});
if
(
$
(
this
).
val
().
length
>
0
)
{
if
(
$
(
this
).
val
().
length
>
0
)
{
$
(
"#reset_to_previous_qty"
).
show
();
let
reset_icon
=
$
(
"#reset_to_previous_qty"
);
reset_icon
.
show
();
reset_icon
.
off
();
reset_icon
.
on
(
"click"
,
reset_previous_value
);
}
else
{
}
else
{
$
(
"#reset_to_previous_qty"
).
hide
();
$
(
"#reset_to_previous_qty"
).
hide
();
}
}
...
...
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