Update product.class.php

This commit is contained in:
ptibogxiv 2019-08-10 09:43:26 +02:00 committed by GitHub
parent 4f69be2c2c
commit 0ce22d68ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2788,7 +2788,7 @@ class Product extends CommonObject
public function load_stats_facture($socid = 0)
{
// phpcs:enable
global $db, $conf, $user;
global $db, $conf, $user;
$sql = "SELECT COUNT(DISTINCT f.fk_soc) as nb_customers, COUNT(DISTINCT f.rowid) as nb,";
$sql.= " COUNT(fd.rowid) as nb_rows, SUM(".$db->ifsql('f.type != 2', 'fd.qty', 'fd.qty * -1').") as qty";