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
0
Merge Requests
0
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
Alexis AOUN
third-party
Commits
c9d6fb42
Commit
c9d6fb42
authored
Jun 30, 2021
by
François
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sigma and vpc data in 'title' of average sale column
parent
dd73be81
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
oders_helper_style.css
orders/static/css/oders_helper_style.css
+1
-1
orders_helper.js
orders/static/js/orders_helper.js
+5
-1
models.py
products/models.py
+1
-1
No files found.
orders/static/css/oders_helper_style.css
View file @
c9d6fb42
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
width
:
300px
;
width
:
300px
;
border-radius
:
10px
;
border-radius
:
10px
;
}
}
#products_table
.help
{
cursor
:
help
;}
#table_header_select_all
{
#table_header_select_all
{
display
:
flex
;
display
:
flex
;
align-content
:
center
;
align-content
:
center
;
...
...
orders/static/js/orders_helper.js
View file @
c9d6fb42
...
@@ -904,7 +904,8 @@ function prepare_datatable_data(product_ids = []) {
...
@@ -904,7 +904,8 @@ function prepare_datatable_data(product_ids = []) {
qty_available
:
+
parseFloat
(
product
.
qty_available
).
toFixed
(
3
),
qty_available
:
+
parseFloat
(
product
.
qty_available
).
toFixed
(
3
),
daily_conso
:
product
.
daily_conso
,
daily_conso
:
product
.
daily_conso
,
purchase_ok
:
product
.
purchase_ok
,
purchase_ok
:
product
.
purchase_ok
,
uom
:
product
.
uom_id
[
1
]
uom
:
product
.
uom_id
[
1
],
stats
:
"Ecart type: "
+
product
.
sigma
+
", % jours sans vente = "
+
(
product
.
vpc
)
*
100
};
};
const
computed_data
=
_compute_product_data
(
product
);
const
computed_data
=
_compute_product_data
(
product
);
...
@@ -973,6 +974,9 @@ function prepare_datatable_columns() {
...
@@ -973,6 +974,9 @@ function prepare_datatable_columns() {
{
{
data
:
"daily_conso"
,
data
:
"daily_conso"
,
title
:
"Conso moy /jour"
,
title
:
"Conso moy /jour"
,
render
:
function
(
data
,
type
,
full
)
{
return
'<div class="help" title="'
+
full
.
stats
+
'">'
+
data
+
'</div>'
;
},
className
:
"dt-body-center"
,
className
:
"dt-body-center"
,
width
:
"6%"
width
:
"6%"
}
}
...
...
products/models.py
View file @
c9d6fb42
...
@@ -511,7 +511,7 @@ class CagetteProducts(models.Model):
...
@@ -511,7 +511,7 @@ class CagetteProducts(models.Model):
#'to': '2019-08-10',
#'to': '2019-08-10',
}
}
sales
=
CagetteProducts
.
get_template_products_sales_average
(
sales_average_params
)
sales
=
CagetteProducts
.
get_template_products_sales_average
(
sales_average_params
)
if
'list'
in
sales
and
len
(
sales
[
'list'
])
>
0
:
if
'list'
in
sales
and
len
(
sales
[
'list'
])
>
0
:
sales
=
sales
[
'list'
]
sales
=
sales
[
'list'
]
else
:
else
:
...
...
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