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
ff876c1c
Commit
ff876c1c
authored
Oct 13, 2022
by
François C.
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '3985-alc-bad-coverage' into 'dev_cooperatic'
ALC: fix use of product minimal stock See merge request
!209
parents
90a84df1
c5954160
Pipeline
#2444
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 @
ff876c1c
...
...
@@ -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