Fixing style errors.

This commit is contained in:
stickler-ci 2023-02-17 09:32:05 +00:00
parent 13a3075ffb
commit bc954af404

View File

@ -571,7 +571,7 @@ class Productlot extends CommonObject
$sql .= " FROM ".$this->db->prefix()."expeditiondet_batch as edb"; $sql .= " FROM ".$this->db->prefix()."expeditiondet_batch as edb";
$sql .= " INNER JOIN ".$this->db->prefix()."expeditiondet as ed ON (ed.rowid = edb.fk_expeditiondet)"; $sql .= " INNER JOIN ".$this->db->prefix()."expeditiondet as ed ON (ed.rowid = edb.fk_expeditiondet)";
$sql .= " INNER JOIN ".$this->db->prefix()."expedition as exp ON (exp.rowid = ed.fk_expedition)"; $sql .= " INNER JOIN ".$this->db->prefix()."expedition as exp ON (exp.rowid = ed.fk_expedition)";
// $sql .= ", ".$this->db->prefix()."societe as s"; // $sql .= ", ".$this->db->prefix()."societe as s";
if (empty($user->rights->societe->client->voir) && !$socid) { if (empty($user->rights->societe->client->voir) && !$socid) {
$sql .= ", ".$this->db->prefix()."societe_commerciaux as sc"; $sql .= ", ".$this->db->prefix()."societe_commerciaux as sc";
} }
@ -597,25 +597,25 @@ class Productlot extends CommonObject
// Virtual products can't be used with kits (see langs with key ErrorNoteAlsoThatSubProductCantBeFollowedByLot) // Virtual products can't be used with kits (see langs with key ErrorNoteAlsoThatSubProductCantBeFollowedByLot)
// if it's a virtual product, maybe it is in invoice by extension // if it's a virtual product, maybe it is in invoice by extension
// if (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) { // if (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) {
// $TFather = $this->getFather(); // $TFather = $this->getFather();
// if (is_array($TFather) && !empty($TFather)) { // if (is_array($TFather) && !empty($TFather)) {
// foreach ($TFather as &$fatherData) { // foreach ($TFather as &$fatherData) {
// $pFather = new Product($this->db); // $pFather = new Product($this->db);
// $pFather->id = $fatherData['id']; // $pFather->id = $fatherData['id'];
// $qtyCoef = $fatherData['qty']; // $qtyCoef = $fatherData['qty'];
// //
// if ($fatherData['incdec']) { // if ($fatherData['incdec']) {
// $pFather->loadStatsExpedition($socid); // $pFather->loadStatsExpedition($socid);
// //
// $this->stats_expedition['customers'] += $pFather->stats_expedition['customers']; // $this->stats_expedition['customers'] += $pFather->stats_expedition['customers'];
// $this->stats_expedition['nb'] += $pFather->stats_expedition['nb']; // $this->stats_expedition['nb'] += $pFather->stats_expedition['nb'];
// $this->stats_expedition['rows'] += $pFather->stats_expedition['rows']; // $this->stats_expedition['rows'] += $pFather->stats_expedition['rows'];
// $this->stats_expedition['qty'] += $pFather->stats_expedition['qty'] * $qtyCoef; // $this->stats_expedition['qty'] += $pFather->stats_expedition['qty'] * $qtyCoef;
// } // }
// } // }
// } // }
// } // }
$parameters = array('socid' => $socid); $parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('loadStatsLotExpedition', $parameters, $this, $action); $reshook = $hookmanager->executeHooks('loadStatsLotExpedition', $parameters, $this, $action);
@ -646,7 +646,7 @@ class Productlot extends CommonObject
$sql .= " FROM ".$this->db->prefix()."commande_fournisseur_dispatch as cfdi"; $sql .= " FROM ".$this->db->prefix()."commande_fournisseur_dispatch as cfdi";
$sql .= " INNER JOIN ".$this->db->prefix()."commande_fournisseurdet as cfd ON (cfd.rowid = cfdi.fk_commandefourndet)"; $sql .= " INNER JOIN ".$this->db->prefix()."commande_fournisseurdet as cfd ON (cfd.rowid = cfdi.fk_commandefourndet)";
$sql .= " INNER JOIN ".$this->db->prefix()."commande_fournisseur as cf ON (cf.rowid = cfd.fk_commande)"; $sql .= " INNER JOIN ".$this->db->prefix()."commande_fournisseur as cf ON (cf.rowid = cfd.fk_commande)";
// $sql .= ", ".$this->db->prefix()."societe as s"; // $sql .= ", ".$this->db->prefix()."societe as s";
if (empty($user->rights->societe->client->voir) && !$socid) { if (empty($user->rights->societe->client->voir) && !$socid) {
$sql .= ", ".$this->db->prefix()."societe_commerciaux as sc"; $sql .= ", ".$this->db->prefix()."societe_commerciaux as sc";
} }
@ -672,25 +672,25 @@ class Productlot extends CommonObject
// Virtual products can't be used with kits (see langs with key ErrorNoteAlsoThatSubProductCantBeFollowedByLot) // Virtual products can't be used with kits (see langs with key ErrorNoteAlsoThatSubProductCantBeFollowedByLot)
// if it's a virtual product, maybe it is in invoice by extension // if it's a virtual product, maybe it is in invoice by extension
// if (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) { // if (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) {
// $TFather = $this->getFather(); // $TFather = $this->getFather();
// if (is_array($TFather) && !empty($TFather)) { // if (is_array($TFather) && !empty($TFather)) {
// foreach ($TFather as &$fatherData) { // foreach ($TFather as &$fatherData) {
// $pFather = new Product($this->db); // $pFather = new Product($this->db);
// $pFather->id = $fatherData['id']; // $pFather->id = $fatherData['id'];
// $qtyCoef = $fatherData['qty']; // $qtyCoef = $fatherData['qty'];
// //
// if ($fatherData['incdec']) { // if ($fatherData['incdec']) {
// $pFather->stats_supplier_order($socid); // $pFather->stats_supplier_order($socid);
// //
// $this->stats_supplier_order['customers'] += $pFather->stats_supplier_order['customers']; // $this->stats_supplier_order['customers'] += $pFather->stats_supplier_order['customers'];
// $this->stats_supplier_order['nb'] += $pFather->stats_supplier_order['nb']; // $this->stats_supplier_order['nb'] += $pFather->stats_supplier_order['nb'];
// $this->stats_supplier_order['rows'] += $pFather->stats_supplier_order['rows']; // $this->stats_supplier_order['rows'] += $pFather->stats_supplier_order['rows'];
// $this->stats_supplier_order['qty'] += $pFather->stats_supplier_order['qty'] * $qtyCoef; // $this->stats_supplier_order['qty'] += $pFather->stats_supplier_order['qty'] * $qtyCoef;
// } // }
// } // }
// } // }
// } // }
$parameters = array('socid' => $socid); $parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('loadStatsLotSupplierOrder', $parameters, $this, $action); $reshook = $hookmanager->executeHooks('loadStatsLotSupplierOrder', $parameters, $this, $action);
@ -720,7 +720,7 @@ class Productlot extends CommonObject
$sql .= " COUNT(cfdi.rowid) as nb_rows, SUM(cfdi.qty) as qty"; $sql .= " COUNT(cfdi.rowid) as nb_rows, SUM(cfdi.qty) as qty";
$sql .= " FROM ".$this->db->prefix()."commande_fournisseur_dispatch as cfdi"; $sql .= " FROM ".$this->db->prefix()."commande_fournisseur_dispatch as cfdi";
$sql .= " INNER JOIN ".$this->db->prefix()."reception as recep ON (recep.rowid = cfdi.fk_reception)"; $sql .= " INNER JOIN ".$this->db->prefix()."reception as recep ON (recep.rowid = cfdi.fk_reception)";
// $sql .= ", ".$this->db->prefix()."societe as s"; // $sql .= ", ".$this->db->prefix()."societe as s";
if (empty($user->rights->societe->client->voir) && !$socid) { if (empty($user->rights->societe->client->voir) && !$socid) {
$sql .= ", ".$this->db->prefix()."societe_commerciaux as sc"; $sql .= ", ".$this->db->prefix()."societe_commerciaux as sc";
} }
@ -746,25 +746,25 @@ class Productlot extends CommonObject
// Virtual products can't be used with kits (see langs with key ErrorNoteAlsoThatSubProductCantBeFollowedByLot) // Virtual products can't be used with kits (see langs with key ErrorNoteAlsoThatSubProductCantBeFollowedByLot)
// if it's a virtual product, maybe it is in invoice by extension // if it's a virtual product, maybe it is in invoice by extension
// if (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) { // if (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) {
// $TFather = $this->getFather(); // $TFather = $this->getFather();
// if (is_array($TFather) && !empty($TFather)) { // if (is_array($TFather) && !empty($TFather)) {
// foreach ($TFather as &$fatherData) { // foreach ($TFather as &$fatherData) {
// $pFather = new Product($this->db); // $pFather = new Product($this->db);
// $pFather->id = $fatherData['id']; // $pFather->id = $fatherData['id'];
// $qtyCoef = $fatherData['qty']; // $qtyCoef = $fatherData['qty'];
// //
// if ($fatherData['incdec']) { // if ($fatherData['incdec']) {
// $pFather->loadStatsReception($socid); // $pFather->loadStatsReception($socid);
// //
// $this->stats_expedition['customers'] += $pFather->stats_expedition['customers']; // $this->stats_expedition['customers'] += $pFather->stats_expedition['customers'];
// $this->stats_expedition['nb'] += $pFather->stats_expedition['nb']; // $this->stats_expedition['nb'] += $pFather->stats_expedition['nb'];
// $this->stats_expedition['rows'] += $pFather->stats_expedition['rows']; // $this->stats_expedition['rows'] += $pFather->stats_expedition['rows'];
// $this->stats_expedition['qty'] += $pFather->stats_expedition['qty'] * $qtyCoef; // $this->stats_expedition['qty'] += $pFather->stats_expedition['qty'] * $qtyCoef;
// } // }
// } // }
// } // }
// } // }
$parameters = array('socid' => $socid); $parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('loadStatsLotReception', $parameters, $this, $action); $reshook = $hookmanager->executeHooks('loadStatsLotReception', $parameters, $this, $action);