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
c5954160
Commit
c5954160
authored
Oct 13, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALC: fix use of product minimal stock
parent
0d624d73
Pipeline
#2436
passed with stage
in 1 minute 25 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
orders_helper.js
orders/static/js/orders_helper.js
+5
-1
No files found.
orders/static/js/orders_helper.js
View file @
c5954160
...
...
@@ -284,9 +284,13 @@ function compute_purchase_qty_for_coverage(product, coeff, stock, incoming_qty,
purchase_package_qty_for_coverage
=
1
;
}
else
{
purchase_qty_for_coverage
=
days
*
daily_conso
-
stock
-
incoming_qty
+
product
.
minimal_stock
;
purchase_qty_for_coverage
=
days
*
daily_conso
-
stock
-
incoming_qty
;
purchase_qty_for_coverage
=
(
purchase_qty_for_coverage
<
0
)
?
0
:
purchase_qty_for_coverage
;
if
(
purchase_qty_for_coverage
+
stock
+
incoming_qty
<
product
.
minimal_stock
)
{
purchase_qty_for_coverage
=
product
.
minimal_stock
-
stock
-
incoming_qty
;
}
// Reduce to nb of packages to purchase
purchase_package_qty_for_coverage
=
purchase_qty_for_coverage
/
product
.
suppliersinfo
[
0
].
package_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