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
d36aa518
Commit
d36aa518
authored
Aug 08, 2023
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reception: dont add unchanged product to updated products list
parent
b76bd834
Pipeline
#2871
failed with stage
in 1 minute 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
reception_produits.js
reception/static/js/reception_produits.js
+4
-4
No files found.
reception/static/js/reception_produits.js
View file @
d36aa518
...
...
@@ -1270,7 +1270,7 @@ function editProductInfo (productToEdit, value = null, batch = false) {
// Check if the product is already in the 'updated' list
var
index
=
searchUpdatedProduct
();
var
firstUpdate
=
false
;
var
isValid
=
false
;
var
isValid
=
false
;
// "valid" == no change from initial value
let
newValue
=
value
;
var
addition
=
false
;
...
...
@@ -1419,9 +1419,7 @@ function editProductInfo (productToEdit, value = null, batch = false) {
// If the product info has been updated and for the first time
if
(
firstUpdate
)
{
updatedProducts
.
push
(
productToEdit
);
//if product is validated thru edition -> add to valid_products
//if product is validated thru edition without change -> add to valid_products
if
(
isValid
)
{
// Create 'valid_products' list in order if not exists
if
(
!
orders
[
productToEdit
.
id_po
][
'valid_products'
])
{
...
...
@@ -1429,6 +1427,8 @@ function editProductInfo (productToEdit, value = null, batch = false) {
}
orders
[
productToEdit
.
id_po
][
'valid_products'
].
push
(
productToEdit
[
'id'
]);
}
else
{
updatedProducts
.
push
(
productToEdit
);
// Create 'updated_products' list in order if not exists
if
(
!
orders
[
productToEdit
.
id_po
][
'updated_products'
])
{
orders
[
productToEdit
.
id_po
][
'updated_products'
]
=
[];
...
...
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