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
870ff1e2
Commit
870ff1e2
authored
May 24, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
INV: save new qty only when validate pressed, not when cancel pressed
parent
4f963d49
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
28 deletions
+29
-28
shelf_inventory.js
shelfs/static/js/shelf_inventory.js
+0
-0
shelfs_admin.js
shelfs/static/js/shelfs_admin.js
+29
-28
No files found.
shelfs/static/js/shelf_inventory.js
View file @
870ff1e2
This diff is collapsed.
Click to expand it.
shelfs/static/js/shelfs_admin.js
View file @
870ff1e2
...
...
@@ -355,36 +355,37 @@ var is_product_in_shelf_adding_queue_list = function(testing_pid) {
};
var
printProduct
=
function
()
{
let
clicked
=
$
(
this
);
let
tr_to_print
=
clicked
.
closest
(
'tr'
);
let
barcode
=
tr_to_print
.
data
(
'bc'
)
openModal
();
try
{
$
.
ajax
({
url
:
'/products/get_product_data'
,
data
:
{
'barcode'
:
barcode
}
})
.
done
(
function
(
res
)
{
var
product
=
res
.
product
var
product_tmpl_id
=
product
.
product_tmpl_id
[
0
]
let
clicked
=
$
(
this
);
let
tr_to_print
=
clicked
.
closest
(
'tr'
);
let
barcode
=
tr_to_print
.
data
(
'bc'
);
openModal
();
try
{
$
.
ajax
({
url
:
'/products/label_print/'
+
product_tmpl_id
})
.
done
(
function
(
res_print
)
{
closeModal
();
if
(
"error"
in
res_print
.
res
)
{
console
.
log
(
res_print
.
res
);
alert
(
'Une erreur est survenue...'
);
}
else
{
alert
(
'Impression lancée'
);
}
url
:
'/products/get_product_data'
,
data
:
{
'barcode'
:
barcode
}
})
})
}
catch
(
e
)
{
closeModal
();
alert
(
'Une erreur est survenue...'
);
}
.
done
(
function
(
res
)
{
var
product
=
res
.
product
;
var
product_tmpl_id
=
product
.
product_tmpl_id
[
0
];
$
.
ajax
({
url
:
'/products/label_print/'
+
product_tmpl_id
})
.
done
(
function
(
res_print
)
{
closeModal
();
if
(
"error"
in
res_print
.
res
)
{
console
.
log
(
res_print
.
res
);
alert
(
'Une erreur est survenue...'
);
}
else
{
alert
(
'Impression lancée'
);
}
});
});
}
catch
(
e
)
{
closeModal
();
alert
(
'Une erreur est survenue...'
);
}
};
...
...
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