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
63d873b3
Commit
63d873b3
authored
Feb 15, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2297 fix error when changing stats period
parent
6ce91bb9
Pipeline
#1790
passed with stage
in 1 minute 39 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
orders_helper.js
orders/static/js/orders_helper.js
+2
-10
No files found.
orders/static/js/orders_helper.js
View file @
63d873b3
...
...
@@ -240,7 +240,6 @@ function compute_products_coverage_qties() {
order_doc
.
coeff
=
coeff
;
if
(
order_doc
.
coverage_days
!=
null
)
{
compute_and_affect_product_supplier_quantities
(
coeff
,
order_doc
.
coverage_days
);
resolve
();
}
else
if
(
order_doc
.
targeted_amount
!=
null
)
{
const
small_step
=
0.1
,
max_iter
=
182
;
// Assume that no more than 1/2 year coverage is far enough
...
...
@@ -265,10 +264,6 @@ function compute_products_coverage_qties() {
step
=
small_step
;
// we have gone too far, let's go back, using small step
days
-=
step
;
}
/* console.log(iter)
console.log(order_total_value_f + '/' + targeted_amount_f)
console.log(days)
console.log(go_on)*/
}
else
{
if
(
step
==
small_step
)
{
// amount was above the target, let's compute again with the previous value
...
...
@@ -282,13 +277,10 @@ function compute_products_coverage_qties() {
iter
++
;
}
resolve
();
}
/* console.log(rder_doc.coverage_days);
console.log(order_doc.targeted_amount)*/
});
resolve
();
});
}
/**
...
...
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