Fixing style errors.

This commit is contained in:
stickler-ci 2020-10-14 06:47:16 +00:00
parent 6ff58aafdc
commit 7abb0caf91
2 changed files with 15 additions and 14 deletions

View File

@ -367,20 +367,20 @@ function show_stats_for_company($product, $socid)
print '<tr><td>';
print '<a href="mo.php?id='.$product->id.'">'.img_object('', 'mrp').' '.$langs->trans("MO").'</a>';
print '</td><td class="right">';
print $form->textwithpicto($product->stats_mo['customers_toconsume'],$langs->trans("ToConsume"));
print $form->textwithpicto($product->stats_mo['customers_consumed'],$langs->trans("QtyAlreadyConsumed"));
print $form->textwithpicto($product->stats_mo['customers_toproduce'],$langs->trans("QtyToProduce"));
print $form->textwithpicto($product->stats_mo['customers_produced'],$langs->trans("QtyAlreadyProduced"));
print $form->textwithpicto($product->stats_mo['customers_toconsume'], $langs->trans("ToConsume"));
print $form->textwithpicto($product->stats_mo['customers_consumed'], $langs->trans("QtyAlreadyConsumed"));
print $form->textwithpicto($product->stats_mo['customers_toproduce'], $langs->trans("QtyToProduce"));
print $form->textwithpicto($product->stats_mo['customers_produced'], $langs->trans("QtyAlreadyProduced"));
print '</td><td class="right">';
print $form->textwithpicto($product->stats_mo['nb_toconsume'],$langs->trans("ToConsume"));
print $form->textwithpicto($product->stats_mo['nb_consumed'],$langs->trans("QtyAlreadyConsumed"));
print $form->textwithpicto($product->stats_mo['nb_toproduce'],$langs->trans("QtyToProduce"));
print $form->textwithpicto($product->stats_mo['nb_produced'],$langs->trans("QtyAlreadyProduced"));
print $form->textwithpicto($product->stats_mo['nb_toconsume'], $langs->trans("ToConsume"));
print $form->textwithpicto($product->stats_mo['nb_consumed'], $langs->trans("QtyAlreadyConsumed"));
print $form->textwithpicto($product->stats_mo['nb_toproduce'], $langs->trans("QtyToProduce"));
print $form->textwithpicto($product->stats_mo['nb_produced'], $langs->trans("QtyAlreadyProduced"));
print '</td><td class="right">';
print $form->textwithpicto($product->stats_mo['qty_toconsume'],$langs->trans("ToConsume"));
print $form->textwithpicto($product->stats_mo['qty_consumed'],$langs->trans("QtyAlreadyConsumed"));
print $form->textwithpicto($product->stats_mo['qty_toproduce'],$langs->trans("QtyToProduce"));
print $form->textwithpicto($product->stats_mo['qty_produced'],$langs->trans("QtyAlreadyProduced"));
print $form->textwithpicto($product->stats_mo['qty_toconsume'], $langs->trans("ToConsume"));
print $form->textwithpicto($product->stats_mo['qty_consumed'], $langs->trans("QtyAlreadyConsumed"));
print $form->textwithpicto($product->stats_mo['qty_toproduce'], $langs->trans("QtyToProduce"));
print $form->textwithpicto($product->stats_mo['qty_produced'], $langs->trans("QtyAlreadyProduced"));
print '</td>';
print '</tr>';
}

View File

@ -2364,13 +2364,14 @@ class Product extends CommonObject
* @param int $socid Id societe
* @return integer Tableau des stats dans $this->stats_mo, <0 if ko >0 if ok
*/
public function load_stats_mo($socid = 0) {
public function load_stats_mo($socid = 0)
{
// phpcs:enable
global $user, $hookmanager;
$error=0;
foreach(array('toconsume','consumed','toproduce','produced') as $role) {
foreach (array('toconsume','consumed','toproduce','produced') as $role) {
$this->stats_mo['customers_'.$role] = 0;
$this->stats_mo['nb_'.$role] = 0;
$this->stats_mo['qty_'.$role] = 0;