From 40f52afb9e16a85bc3e28575e2172464ebc12c03 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 17 Feb 2023 09:06:07 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/core/lib/product.lib.php | 21 ++- .../product/stock/class/productlot.class.php | 120 +++++++++--------- .../stock/stats/commande_fournisseur.php | 100 +++++++-------- htdocs/product/stock/stats/expedition.php | 94 +++++++------- htdocs/product/stock/stats/mo.php | 12 +- htdocs/product/stock/stats/reception.php | 94 +++++++------- 6 files changed, 218 insertions(+), 223 deletions(-) diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 7f2f626beee..fc2fa468533 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -697,8 +697,7 @@ function show_stats_for_batch($batch, $socid) print ''; } - if(isModEnabled("reception") && !empty($user->rights->reception->lire)) { - + if (isModEnabled("reception") && !empty($user->rights->reception->lire)) { $nblines++; $ret = $batch->load_stats_reception($socid); if ($ret < 0) { @@ -715,9 +714,7 @@ function show_stats_for_batch($batch, $socid) print $batch->stats_reception['qty']; print ''; print ''; - - } elseif(isModEnabled('supplier_order') && !empty($user->rights->fournisseur->commande->lire)) { - + } elseif (isModEnabled('supplier_order') && !empty($user->rights->fournisseur->commande->lire)) { $nblines++; $ret = $batch->load_stats_supplier_order($socid); if ($ret < 0) { @@ -734,7 +731,6 @@ function show_stats_for_batch($batch, $socid) print $batch->stats_supplier_order['qty']; print ''; print ''; - } if (isModEnabled('mrp') && !empty($user->rights->mrp->read)) { @@ -747,19 +743,19 @@ function show_stats_for_batch($batch, $socid) print ''; print ''.img_object('', 'mrp', 'class="pictofixedwidth"').$langs->trans("MO").''; print ''; -// print $form->textwithpicto($batch->stats_mo['customers_toconsume'], $langs->trans("ToConsume")); Makes no sense with batch, at this moment we don't know batch number + // print $form->textwithpicto($batch->stats_mo['customers_toconsume'], $langs->trans("ToConsume")); Makes no sense with batch, at this moment we don't know batch number print $form->textwithpicto($batch->stats_mo['customers_consumed'], $langs->trans("QtyAlreadyConsumed")); -// print $form->textwithpicto($batch->stats_mo['customers_toproduce'], $langs->trans("QtyToProduce")); Makes no sense with batch, at this moment we don't know batch number + // print $form->textwithpicto($batch->stats_mo['customers_toproduce'], $langs->trans("QtyToProduce")); Makes no sense with batch, at this moment we don't know batch number print $form->textwithpicto($batch->stats_mo['customers_produced'], $langs->trans("QtyAlreadyProduced")); print ''; -// print $form->textwithpicto($batch->stats_mo['nb_toconsume'], $langs->trans("ToConsume")); Makes no sense with batch, at this moment we don't know batch number + // print $form->textwithpicto($batch->stats_mo['nb_toconsume'], $langs->trans("ToConsume")); Makes no sense with batch, at this moment we don't know batch number print $form->textwithpicto($batch->stats_mo['nb_consumed'], $langs->trans("QtyAlreadyConsumed")); -// print $form->textwithpicto($batch->stats_mo['nb_toproduce'], $langs->trans("QtyToProduce")); Makes no sense with batch, at this moment we don't know batch number + // print $form->textwithpicto($batch->stats_mo['nb_toproduce'], $langs->trans("QtyToProduce")); Makes no sense with batch, at this moment we don't know batch number print $form->textwithpicto($batch->stats_mo['nb_produced'], $langs->trans("QtyAlreadyProduced")); print ''; -// print $form->textwithpicto($batch->stats_mo['qty_toconsume'], $langs->trans("ToConsume")); Makes no sense with batch, at this moment we don't know batch number + // print $form->textwithpicto($batch->stats_mo['qty_toconsume'], $langs->trans("ToConsume")); Makes no sense with batch, at this moment we don't know batch number print $form->textwithpicto($batch->stats_mo['qty_consumed'], $langs->trans("QtyAlreadyConsumed")); -// print $form->textwithpicto($batch->stats_mo['qty_toproduce'], $langs->trans("QtyToProduce")); Makes no sense with batch, at this moment we don't know batch number + // print $form->textwithpicto($batch->stats_mo['qty_toproduce'], $langs->trans("QtyToProduce")); Makes no sense with batch, at this moment we don't know batch number print $form->textwithpicto($batch->stats_mo['qty_produced'], $langs->trans("QtyAlreadyProduced")); print ''; print ''; @@ -775,7 +771,6 @@ function show_stats_for_batch($batch, $socid) return $nblines++; - } /** diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index c87a63c11e3..182f3ac1a76 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -570,7 +570,7 @@ class Productlot extends CommonObject $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()."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) { $sql .= ", ".$this->db->prefix()."societe_commerciaux as sc"; } @@ -596,25 +596,25 @@ class Productlot extends CommonObject // 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 (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) { -// $TFather = $this->getFather(); -// if (is_array($TFather) && !empty($TFather)) { -// foreach ($TFather as &$fatherData) { -// $pFather = new Product($this->db); -// $pFather->id = $fatherData['id']; -// $qtyCoef = $fatherData['qty']; -// -// if ($fatherData['incdec']) { -// $pFather->load_stats_expedition($socid); -// -// $this->stats_expedition['customers'] += $pFather->stats_expedition['customers']; -// $this->stats_expedition['nb'] += $pFather->stats_expedition['nb']; -// $this->stats_expedition['rows'] += $pFather->stats_expedition['rows']; -// $this->stats_expedition['qty'] += $pFather->stats_expedition['qty'] * $qtyCoef; -// } -// } -// } -// } + // if (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) { + // $TFather = $this->getFather(); + // if (is_array($TFather) && !empty($TFather)) { + // foreach ($TFather as &$fatherData) { + // $pFather = new Product($this->db); + // $pFather->id = $fatherData['id']; + // $qtyCoef = $fatherData['qty']; + // + // if ($fatherData['incdec']) { + // $pFather->load_stats_expedition($socid); + // + // $this->stats_expedition['customers'] += $pFather->stats_expedition['customers']; + // $this->stats_expedition['nb'] += $pFather->stats_expedition['nb']; + // $this->stats_expedition['rows'] += $pFather->stats_expedition['rows']; + // $this->stats_expedition['qty'] += $pFather->stats_expedition['qty'] * $qtyCoef; + // } + // } + // } + // } $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('loadStatsLotExpedition', $parameters, $this, $action); @@ -645,7 +645,7 @@ class Productlot extends CommonObject $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_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) { $sql .= ", ".$this->db->prefix()."societe_commerciaux as sc"; } @@ -671,25 +671,25 @@ class Productlot extends CommonObject // 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 (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) { -// $TFather = $this->getFather(); -// if (is_array($TFather) && !empty($TFather)) { -// foreach ($TFather as &$fatherData) { -// $pFather = new Product($this->db); -// $pFather->id = $fatherData['id']; -// $qtyCoef = $fatherData['qty']; -// -// if ($fatherData['incdec']) { -// $pFather->stats_supplier_order($socid); -// -// $this->stats_supplier_order['customers'] += $pFather->stats_supplier_order['customers']; -// $this->stats_supplier_order['nb'] += $pFather->stats_supplier_order['nb']; -// $this->stats_supplier_order['rows'] += $pFather->stats_supplier_order['rows']; -// $this->stats_supplier_order['qty'] += $pFather->stats_supplier_order['qty'] * $qtyCoef; -// } -// } -// } -// } + // if (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) { + // $TFather = $this->getFather(); + // if (is_array($TFather) && !empty($TFather)) { + // foreach ($TFather as &$fatherData) { + // $pFather = new Product($this->db); + // $pFather->id = $fatherData['id']; + // $qtyCoef = $fatherData['qty']; + // + // if ($fatherData['incdec']) { + // $pFather->stats_supplier_order($socid); + // + // $this->stats_supplier_order['customers'] += $pFather->stats_supplier_order['customers']; + // $this->stats_supplier_order['nb'] += $pFather->stats_supplier_order['nb']; + // $this->stats_supplier_order['rows'] += $pFather->stats_supplier_order['rows']; + // $this->stats_supplier_order['qty'] += $pFather->stats_supplier_order['qty'] * $qtyCoef; + // } + // } + // } + // } $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('loadStatsLotSupplierOrder', $parameters, $this, $action); @@ -719,7 +719,7 @@ class Productlot extends CommonObject $sql .= " COUNT(cfdi.rowid) as nb_rows, SUM(cfdi.qty) as qty"; $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 .= ", ".$this->db->prefix()."societe as s"; + // $sql .= ", ".$this->db->prefix()."societe as s"; if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", ".$this->db->prefix()."societe_commerciaux as sc"; } @@ -745,25 +745,25 @@ class Productlot extends CommonObject // 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 (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) { -// $TFather = $this->getFather(); -// if (is_array($TFather) && !empty($TFather)) { -// foreach ($TFather as &$fatherData) { -// $pFather = new Product($this->db); -// $pFather->id = $fatherData['id']; -// $qtyCoef = $fatherData['qty']; -// -// if ($fatherData['incdec']) { -// $pFather->load_stats_expedition($socid); -// -// $this->stats_expedition['customers'] += $pFather->stats_expedition['customers']; -// $this->stats_expedition['nb'] += $pFather->stats_expedition['nb']; -// $this->stats_expedition['rows'] += $pFather->stats_expedition['rows']; -// $this->stats_expedition['qty'] += $pFather->stats_expedition['qty'] * $qtyCoef; -// } -// } -// } -// } + // if (!empty($conf->global->PRODUCT_STATS_WITH_PARENT_PROD_IF_INCDEC)) { + // $TFather = $this->getFather(); + // if (is_array($TFather) && !empty($TFather)) { + // foreach ($TFather as &$fatherData) { + // $pFather = new Product($this->db); + // $pFather->id = $fatherData['id']; + // $qtyCoef = $fatherData['qty']; + // + // if ($fatherData['incdec']) { + // $pFather->load_stats_expedition($socid); + // + // $this->stats_expedition['customers'] += $pFather->stats_expedition['customers']; + // $this->stats_expedition['nb'] += $pFather->stats_expedition['nb']; + // $this->stats_expedition['rows'] += $pFather->stats_expedition['rows']; + // $this->stats_expedition['qty'] += $pFather->stats_expedition['qty'] * $qtyCoef; + // } + // } + // } + // } $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('loadStatsLotReception', $parameters, $this, $action); diff --git a/htdocs/product/stock/stats/commande_fournisseur.php b/htdocs/product/stock/stats/commande_fournisseur.php index a8a5d529b53..34fe3780c9f 100644 --- a/htdocs/product/stock/stats/commande_fournisseur.php +++ b/htdocs/product/stock/stats/commande_fournisseur.php @@ -152,50 +152,50 @@ if ($id > 0 || !empty($ref)) { echo '
'; -// // Sell by -// if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { -// print ''; -// print $form->editfieldkey($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker'); -// print ''; -// print $form->editfieldval($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker'); -// print ''; -// print ''; -// } -// -// // Eat by -// if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { -// print ''; -// print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker'); -// print ''; -// print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker'); -// print ''; -// print ''; -// } -// -// if (!empty($conf->global->PRODUCT_LOT_ENABLE_TRACEABOLITY)) { -// print ''.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).''; -// print ''.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').''; -// print ''; -// // print ''.$form->editfieldkey($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer).''; -// // print ''.$form->editfieldval($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer, 'datepicker').''; -// // print ''; -// print ''.$form->editfieldkey($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer).''; -// print ''.$form->editfieldval($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer, 'datepicker').''; -// print ''; -// } -// -// // Quality control -// if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) { -// print ''.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).''; -// print ''.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').''; -// print ''; -// print ''.$form->editfieldkey($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer).''; -// print ''.$form->editfieldval($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer, 'numeric').''; -// print ''; -// } -// -// // Other attributes -// include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + // // Sell by + // if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + // print ''; + // print $form->editfieldkey($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker'); + // print ''; + // print $form->editfieldval($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker'); + // print ''; + // print ''; + // } + // + // // Eat by + // if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + // print ''; + // print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker'); + // print ''; + // print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker'); + // print ''; + // print ''; + // } + // + // if (!empty($conf->global->PRODUCT_LOT_ENABLE_TRACEABOLITY)) { + // print ''.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).''; + // print ''.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').''; + // print ''; + // // print ''.$form->editfieldkey($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer).''; + // // print ''.$form->editfieldval($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer, 'datepicker').''; + // // print ''; + // print ''.$form->editfieldkey($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer).''; + // print ''.$form->editfieldval($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer, 'datepicker').''; + // print ''; + // } + // + // // Quality control + // if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) { + // print ''.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).''; + // print ''.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').''; + // print ''; + // print ''.$form->editfieldkey($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer).''; + // print ''.$form->editfieldval($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer, 'numeric').''; + // print ''; + // } + // + // // Other attributes + // include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; print ''; @@ -214,7 +214,7 @@ if ($id > 0 || !empty($ref)) { $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_fournisseur,"; $sql .= " cf.ref, cf.date_commande, cf.date_livraison as delivery_date, cf.fk_statut as statut, cf.rowid as facid,"; $sql .= " cfd.rowid, SUM(cfdi.qty) as qty"; -// $sql.= ", cfd.total_ht * SUM(cfdi.qty) / cfd.qty as total_ht_pondere"; + // $sql.= ", cfd.total_ht * SUM(cfdi.qty) / cfd.qty as total_ht_pondere"; if (empty($user->rights->societe->client->voir) && !$socid) { $sql .= ", sc.fk_soc, sc.fk_user "; } @@ -308,7 +308,7 @@ if ($id > 0 || !empty($ref)) { print_liste_field_titre("OrderDate", $_SERVER["PHP_SELF"], "cf.date_commande", "", $option, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("DateDeliveryPlanned", $_SERVER["PHP_SELF"], "cf.date_livraison", "", $option, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "cfdi.qty", "", $option, 'align="center"', $sortfield, $sortorder); -// print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "total_ht_pondere", "", $option, 'align="right"', $sortfield, $sortorder); + // print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "total_ht_pondere", "", $option, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cf.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder); print "\n"; @@ -320,13 +320,13 @@ if ($id > 0 || !empty($ref)) { $objp->qty = -($objp->qty); } -// $total_ht_pondere += $objp->total_ht_pondere; + // $total_ht_pondere += $objp->total_ht_pondere; $total_qty += $objp->qty; $commandefournisseurstatic->id = $objp->facid; $commandefournisseurstatic->ref = $objp->ref; $societestatic->fetch($objp->socid); -// $paiement = $commandefournisseurstatic->getSommePaiement(); + // $paiement = $commandefournisseurstatic->getSommePaiement(); print ''; print '"; print '\n"; -// print '\n"; + // print '\n"; print ''; print "\n"; $i++; @@ -355,7 +355,7 @@ if ($id > 0 || !empty($ref)) { print ''; print ''; print ''; -// print ''; + // print ''; print ''; print "
'; @@ -339,7 +339,7 @@ if ($id > 0 || !empty($ref)) { print ''; print dol_print_date($db->jdate($objp->delivery_date), 'dayhour')."'.$objp->qty."'.price($objp->total_ht_pondere)."'.price($objp->total_ht_pondere)."'.$commandefournisseurstatic->LibStatut($objp->statut, 5).'
'.$total_qty.''.$total_ht_pondere.''.$total_ht_pondere.'
"; print ''; diff --git a/htdocs/product/stock/stats/expedition.php b/htdocs/product/stock/stats/expedition.php index f675f5745fb..0db73a319b3 100644 --- a/htdocs/product/stock/stats/expedition.php +++ b/htdocs/product/stock/stats/expedition.php @@ -152,50 +152,50 @@ if ($id > 0 || !empty($ref)) { echo '
'; -// // Sell by -// if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { -// print ''; -// print $form->editfieldkey($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker'); -// print ''; -// print $form->editfieldval($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker'); -// print ''; -// print ''; -// } -// -// // Eat by -// if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { -// print ''; -// print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker'); -// print ''; -// print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker'); -// print ''; -// print ''; -// } -// -// if (!empty($conf->global->PRODUCT_LOT_ENABLE_TRACEABOLITY)) { -// print ''.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).''; -// print ''.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').''; -// print ''; -// // print ''.$form->editfieldkey($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer).''; -// // print ''.$form->editfieldval($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer, 'datepicker').''; -// // print ''; -// print ''.$form->editfieldkey($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer).''; -// print ''.$form->editfieldval($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer, 'datepicker').''; -// print ''; -// } -// -// // Quality control -// if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) { -// print ''.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).''; -// print ''.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').''; -// print ''; -// print ''.$form->editfieldkey($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer).''; -// print ''.$form->editfieldval($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer, 'numeric').''; -// print ''; -// } -// -// // Other attributes -// include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + // // Sell by + // if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + // print ''; + // print $form->editfieldkey($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker'); + // print ''; + // print $form->editfieldval($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker'); + // print ''; + // print ''; + // } + // + // // Eat by + // if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + // print ''; + // print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker'); + // print ''; + // print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker'); + // print ''; + // print ''; + // } + // + // if (!empty($conf->global->PRODUCT_LOT_ENABLE_TRACEABOLITY)) { + // print ''.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).''; + // print ''.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').''; + // print ''; + // // print ''.$form->editfieldkey($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer).''; + // // print ''.$form->editfieldval($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer, 'datepicker').''; + // // print ''; + // print ''.$form->editfieldkey($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer).''; + // print ''.$form->editfieldval($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer, 'datepicker').''; + // print ''; + // } + // + // // Quality control + // if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) { + // print ''.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).''; + // print ''.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').''; + // print ''; + // print ''.$form->editfieldkey($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer).''; + // print ''.$form->editfieldval($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer, 'numeric').''; + // print ''; + // } + // + // // Other attributes + // include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; print ''; @@ -306,7 +306,7 @@ if ($id > 0 || !empty($ref)) { print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", "", $option, '', $sortfield, $sortorder); print_liste_field_titre("DateCreation", $_SERVER["PHP_SELF"], "exp.date_creation", "", $option, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $option, 'align="center"', $sortfield, $sortorder); -// print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "d.total_ht", "", $option, 'align="right"', $sortfield, $sortorder); + // print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "d.total_ht", "", $option, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "exp.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder); print "\n"; @@ -324,7 +324,7 @@ if ($id > 0 || !empty($ref)) { $expeditionstatic->id = $objp->facid; $expeditionstatic->ref = $objp->ref; $societestatic->fetch($objp->socid); -// $paiement = $expeditionstatic->getSommePaiement(); + // $paiement = $expeditionstatic->getSommePaiement(); print ''; print '"; print '\n"; -// print '\n"; + // print '\n"; print ''; print "\n"; $i++; diff --git a/htdocs/product/stock/stats/mo.php b/htdocs/product/stock/stats/mo.php index 4133448aa63..ff1e60e046a 100644 --- a/htdocs/product/stock/stats/mo.php +++ b/htdocs/product/stock/stats/mo.php @@ -159,9 +159,9 @@ if ($id > 0 || !empty($ref)) { $now = dol_now(); $sql = "SELECT"; -// $sql .= " sum(".$db->ifsql("cd.role='toconsume'", "cd.qty", 0).') as nb_toconsume,'; + // $sql .= " sum(".$db->ifsql("cd.role='toconsume'", "cd.qty", 0).') as nb_toconsume,'; $sql .= " sum(".$db->ifsql("cd.role='consumed'", "cd.qty", 0).') as nb_consumed,'; -// $sql .= " sum(".$db->ifsql("cd.role='toproduce'", "cd.qty", 0).') as nb_toproduce,'; + // $sql .= " sum(".$db->ifsql("cd.role='toproduce'", "cd.qty", 0).') as nb_toproduce,'; $sql .= " sum(".$db->ifsql("cd.role='produced'", "cd.qty", 0).') as nb_produced,'; $sql .= " c.rowid as rowid, c.ref, c.date_valid, c.status"; //$sql .= " s.nom as name, s.rowid as socid, s.code_client"; @@ -249,9 +249,9 @@ if ($id > 0 || !empty($ref)) { //print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", "&id=".$object->id, '', $sortfield, $sortorder); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "c.date_valid", "", $option."&id=".$object->id, 'align="center"', $sortfield, $sortorder); //print_liste_field_titre("AmountHT"),$_SERVER["PHP_SELF"],"c.amount","","&id=".$object->id,'align="right"',$sortfield,$sortorder); -// print_liste_field_titre("ToConsume", $_SERVER["PHP_SELF"], "", "", "&id=".$object->id, '', $sortfield, $sortorder, 'center '); + // print_liste_field_titre("ToConsume", $_SERVER["PHP_SELF"], "", "", "&id=".$object->id, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("QtyAlreadyConsumed", $_SERVER["PHP_SELF"], "", "", $option."&id=".$object->id, '', $sortfield, $sortorder, 'center '); -// print_liste_field_titre("QtyToProduce", $_SERVER["PHP_SELF"], "", "", "&id=".$object->id, '', $sortfield, $sortorder, 'center '); + // print_liste_field_titre("QtyToProduce", $_SERVER["PHP_SELF"], "", "", "&id=".$object->id, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("QtyAlreadyProduced", $_SERVER["PHP_SELF"], "", "", $option."&id=".$object->id, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "c.status", "", $option."&id=".$object->id, '', $sortfield, $sortorder, 'right '); print "\n"; @@ -279,9 +279,9 @@ if ($id > 0 || !empty($ref)) { print dol_print_date($db->jdate($objp->date_valid), 'dayhour').""; //print "\n"; //print ''; + // print ''; print ''; -// print ''; + // print ''; print ''; //$mostatic->LibStatut($objp->statut,5).''; print ''; diff --git a/htdocs/product/stock/stats/reception.php b/htdocs/product/stock/stats/reception.php index f289c469a6d..498a39c41d8 100644 --- a/htdocs/product/stock/stats/reception.php +++ b/htdocs/product/stock/stats/reception.php @@ -152,50 +152,50 @@ if ($id > 0 || !empty($ref)) { echo '
'; -// // Sell by -// if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { -// print ''; -// print ''; -// } -// -// // Eat by -// if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { -// print ''; -// print ''; -// } -// -// if (!empty($conf->global->PRODUCT_LOT_ENABLE_TRACEABOLITY)) { -// print ''; -// print ''; -// print ''; -// // print ''; -// // print ''; -// // print ''; -// print ''; -// print ''; -// print ''; -// } -// -// // Quality control -// if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) { -// print ''; -// print ''; -// print ''; -// print ''; -// print ''; -// print ''; -// } -// -// // Other attributes -// include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + // // Sell by + // if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + // print ''; + // print ''; + // } + // + // // Eat by + // if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + // print ''; + // print ''; + // } + // + // if (!empty($conf->global->PRODUCT_LOT_ENABLE_TRACEABOLITY)) { + // print ''; + // print ''; + // print ''; + // // print ''; + // // print ''; + // // print ''; + // print ''; + // print ''; + // print ''; + // } + // + // // Quality control + // if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) { + // print ''; + // print ''; + // print ''; + // print ''; + // print ''; + // print ''; + // } + // + // // Other attributes + // include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; print '
'; @@ -335,7 +335,7 @@ if ($id > 0 || !empty($ref)) { print ''; print dol_print_date($db->jdate($objp->date_creation), 'dayhour')."'.$objp->qty."'.price($objp->total_ht)."'.price($objp->total_ht)."'.$expeditionstatic->LibStatut($objp->statut, 5).'
".price($objp->total_ht)."'; -// print ''.($objp->nb_toconsume > 0 ? $objp->nb_toconsume : '').''.($objp->nb_toconsume > 0 ? $objp->nb_toconsume : '').''.($objp->nb_consumed > 0 ? $objp->nb_consumed : '').''.($objp->nb_toproduce > 0 ? $objp->nb_toproduce : '').''.($objp->nb_toproduce > 0 ? $objp->nb_toproduce : '').''.($objp->nb_produced > 0 ? $objp->nb_produced : '').''.$motmp->getLibStatut(2).'
'; -// print $form->editfieldkey($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker'); -// print ''; -// print $form->editfieldval($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker'); -// print '
'; -// print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker'); -// print ''; -// print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker'); -// print '
'.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).''.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').'
'.$form->editfieldkey($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer).''.$form->editfieldval($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer, 'datepicker').'
'.$form->editfieldkey($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer).''.$form->editfieldval($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer, 'datepicker').'
'.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).''.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').'
'.$form->editfieldkey($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer).''.$form->editfieldval($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer, 'numeric').'
'; + // print $form->editfieldkey($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker'); + // print ''; + // print $form->editfieldval($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker'); + // print '
'; + // print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker'); + // print ''; + // print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker'); + // print '
'.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).''.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').'
'.$form->editfieldkey($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer).''.$form->editfieldval($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer, 'datepicker').'
'.$form->editfieldkey($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer).''.$form->editfieldval($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer, 'datepicker').'
'.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).''.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').'
'.$form->editfieldkey($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer).''.$form->editfieldval($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer, 'numeric').'
'; @@ -305,7 +305,7 @@ if ($id > 0 || !empty($ref)) { print_liste_field_titre("SupplierCode", $_SERVER["PHP_SELF"], "s.code_fournisseur", "", $option, '', $sortfield, $sortorder); print_liste_field_titre("DateCreation", $_SERVER["PHP_SELF"], "recep.date_creation", "", $option, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $option, 'align="center"', $sortfield, $sortorder); -// print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "d.total_ht", "", $option, 'align="right"', $sortfield, $sortorder); + // print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "d.total_ht", "", $option, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "recep.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder); print "\n"; @@ -323,7 +323,7 @@ if ($id > 0 || !empty($ref)) { $receptionstatic->id = $objp->facid; $receptionstatic->ref = $objp->ref; $societestatic->fetch($objp->socid); -// $paiement = $receptionstatic->getSommePaiement(); + // $paiement = $receptionstatic->getSommePaiement(); print ''; print '"; print '\n"; -// print '\n"; + // print '\n"; print ''; print "\n"; $i++;
'; @@ -334,7 +334,7 @@ if ($id > 0 || !empty($ref)) { print ''; print dol_print_date($db->jdate($objp->date_creation), 'dayhour')."'.$objp->qty."'.price($objp->total_ht)."'.price($objp->total_ht)."'.$receptionstatic->LibStatut($objp->statut, 5).'