Commit 33bb5937 by Damien Moulard

merge conflict

parents 20c13305 211f61c9
Pipeline #1126 passed with stage
in 1 minute 23 seconds
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,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;
......
...@@ -987,7 +987,8 @@ function prepare_datatable_data(product_ids = []) { ...@@ -987,7 +987,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);
...@@ -1056,6 +1057,9 @@ function prepare_datatable_columns() { ...@@ -1056,6 +1057,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%"
} }
......
...@@ -507,7 +507,7 @@ class CagetteProducts(models.Model): ...@@ -507,7 +507,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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment