Merge branch 'NEW/develop_objets_referents_lots' of github.com:atm-gauthier/dolibarr into NEW/develop_objets_referents_lots
This commit is contained in:
commit
13a3075ffb
@ -698,8 +698,7 @@ function show_stats_for_batch($batch, $socid)
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
if(isModEnabled("reception") && !empty($user->rights->reception->lire)) {
|
||||
|
||||
if (isModEnabled("reception") && !empty($user->rights->reception->lire)) {
|
||||
$nblines++;
|
||||
$ret = $batch->loadStatsReception($socid);
|
||||
if ($ret < 0) {
|
||||
@ -716,9 +715,7 @@ function show_stats_for_batch($batch, $socid)
|
||||
print $batch->stats_reception['qty'];
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
} elseif(isModEnabled('supplier_order') && !empty($user->rights->fournisseur->commande->lire)) {
|
||||
|
||||
} elseif (isModEnabled('supplier_order') && !empty($user->rights->fournisseur->commande->lire)) {
|
||||
$nblines++;
|
||||
$ret = $batch->loadStatsSupplierOrder($socid);
|
||||
if ($ret < 0) {
|
||||
@ -735,7 +732,6 @@ function show_stats_for_batch($batch, $socid)
|
||||
print $batch->stats_supplier_order['qty'];
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
}
|
||||
|
||||
if (isModEnabled('mrp') && !empty($user->rights->mrp->read)) {
|
||||
@ -748,19 +744,19 @@ function show_stats_for_batch($batch, $socid)
|
||||
print '<tr><td>';
|
||||
print '<a href="'.dol_buildpath('/product/stock/stats/mo.php', 1).'?id='.$batch->id.'">'.img_object('', 'mrp', 'class="pictofixedwidth"').$langs->trans("MO").'</a>';
|
||||
print '</td><td class="right">';
|
||||
// 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 '</td><td class="right">';
|
||||
// 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 '</td><td class="right">';
|
||||
// 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 '</td>';
|
||||
print '</tr>';
|
||||
@ -776,7 +772,6 @@ function show_stats_for_batch($batch, $socid)
|
||||
|
||||
|
||||
return $nblines++;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -153,50 +153,50 @@ if ($id > 0 || !empty($ref)) {
|
||||
|
||||
echo '<br>';
|
||||
|
||||
// // Sell by
|
||||
// if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||
// print '<tr><td>';
|
||||
// print $form->editfieldkey($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td><td>';
|
||||
// print $form->editfieldval($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Eat by
|
||||
// if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
|
||||
// print '<tr><td>';
|
||||
// print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td><td>';
|
||||
// print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// if (!empty($conf->global->PRODUCT_LOT_ENABLE_TRACEABOLITY)) {
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// // print '<tr><td>'.$form->editfieldkey($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// // print '<td>'.$form->editfieldval($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// // print '</tr>';
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Quality control
|
||||
// if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) {
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer, 'numeric').'</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Other attributes
|
||||
// include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||
// // Sell by
|
||||
// if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||
// print '<tr><td>';
|
||||
// print $form->editfieldkey($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td><td>';
|
||||
// print $form->editfieldval($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Eat by
|
||||
// if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
|
||||
// print '<tr><td>';
|
||||
// print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td><td>';
|
||||
// print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// if (!empty($conf->global->PRODUCT_LOT_ENABLE_TRACEABOLITY)) {
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// // print '<tr><td>'.$form->editfieldkey($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// // print '<td>'.$form->editfieldval($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// // print '</tr>';
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Quality control
|
||||
// if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) {
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer, 'numeric').'</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Other attributes
|
||||
// include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||
|
||||
print '<table class="border centpercent tableforfield" width="100%">';
|
||||
|
||||
@ -215,7 +215,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 ";
|
||||
}
|
||||
@ -309,7 +309,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 "</tr>\n";
|
||||
|
||||
@ -321,13 +321,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 '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
@ -340,7 +340,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->delivery_date), 'dayhour')."</td>";
|
||||
print '<td class="center">'.$objp->qty."</td>\n";
|
||||
// print '<td align="right">'.price($objp->total_ht_pondere)."</td>\n";
|
||||
// print '<td align="right">'.price($objp->total_ht_pondere)."</td>\n";
|
||||
print '<td align="right">'.$commandefournisseurstatic->LibStatut($objp->statut, 5).'</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
@ -356,7 +356,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td class="center">'.$total_qty.'</td>';
|
||||
// print '<td class="right">'.$total_ht_pondere.'</td>';
|
||||
// print '<td class="right">'.$total_ht_pondere.'</td>';
|
||||
print '<td></td>';
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
@ -153,50 +153,50 @@ if ($id > 0 || !empty($ref)) {
|
||||
|
||||
echo '<br>';
|
||||
|
||||
// // Sell by
|
||||
// if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||
// print '<tr><td>';
|
||||
// print $form->editfieldkey($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td><td>';
|
||||
// print $form->editfieldval($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Eat by
|
||||
// if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
|
||||
// print '<tr><td>';
|
||||
// print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td><td>';
|
||||
// print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// if (!empty($conf->global->PRODUCT_LOT_ENABLE_TRACEABOLITY)) {
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// // print '<tr><td>'.$form->editfieldkey($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// // print '<td>'.$form->editfieldval($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// // print '</tr>';
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Quality control
|
||||
// if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) {
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer, 'numeric').'</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Other attributes
|
||||
// include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||
// // Sell by
|
||||
// if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||
// print '<tr><td>';
|
||||
// print $form->editfieldkey($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td><td>';
|
||||
// print $form->editfieldval($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Eat by
|
||||
// if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
|
||||
// print '<tr><td>';
|
||||
// print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td><td>';
|
||||
// print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// if (!empty($conf->global->PRODUCT_LOT_ENABLE_TRACEABOLITY)) {
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// // print '<tr><td>'.$form->editfieldkey($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// // print '<td>'.$form->editfieldval($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// // print '</tr>';
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Quality control
|
||||
// if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) {
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer, 'numeric').'</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Other attributes
|
||||
// include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||
|
||||
print '<table class="border centpercent tableforfield" width="100%">';
|
||||
|
||||
@ -307,7 +307,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 "</tr>\n";
|
||||
|
||||
@ -325,7 +325,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 '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
@ -336,7 +336,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->date_creation), 'dayhour')."</td>";
|
||||
print '<td class="center">'.$objp->qty."</td>\n";
|
||||
// print '<td align="right">'.price($objp->total_ht)."</td>\n";
|
||||
// print '<td align="right">'.price($objp->total_ht)."</td>\n";
|
||||
print '<td align="right">'.$expeditionstatic->LibStatut($objp->statut, 5).'</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
@ -160,9 +160,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";
|
||||
@ -250,9 +250,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 "</tr>\n";
|
||||
@ -280,9 +280,9 @@ if ($id > 0 || !empty($ref)) {
|
||||
print dol_print_date($db->jdate($objp->date_valid), 'dayhour')."</td>";
|
||||
//print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
|
||||
//print '<td align="right">';
|
||||
// print '<td class="center">'.($objp->nb_toconsume > 0 ? $objp->nb_toconsume : '').'</td>';
|
||||
// print '<td class="center">'.($objp->nb_toconsume > 0 ? $objp->nb_toconsume : '').'</td>';
|
||||
print '<td class="center">'.($objp->nb_consumed > 0 ? $objp->nb_consumed : '').'</td>';
|
||||
// print '<td class="center">'.($objp->nb_toproduce > 0 ? $objp->nb_toproduce : '').'</td>';
|
||||
// print '<td class="center">'.($objp->nb_toproduce > 0 ? $objp->nb_toproduce : '').'</td>';
|
||||
print '<td class="center">'.($objp->nb_produced > 0 ? $objp->nb_produced : '').'</td>';
|
||||
//$mostatic->LibStatut($objp->statut,5).'</td>';
|
||||
print '<td class="right">'.$motmp->getLibStatut(2).'</td>';
|
||||
|
||||
@ -153,50 +153,50 @@ if ($id > 0 || !empty($ref)) {
|
||||
|
||||
echo '<br>';
|
||||
|
||||
// // Sell by
|
||||
// if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||
// print '<tr><td>';
|
||||
// print $form->editfieldkey($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td><td>';
|
||||
// print $form->editfieldval($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Eat by
|
||||
// if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
|
||||
// print '<tr><td>';
|
||||
// print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td><td>';
|
||||
// print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// if (!empty($conf->global->PRODUCT_LOT_ENABLE_TRACEABOLITY)) {
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// // print '<tr><td>'.$form->editfieldkey($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// // print '<td>'.$form->editfieldval($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// // print '</tr>';
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Quality control
|
||||
// if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) {
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer, 'numeric').'</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Other attributes
|
||||
// include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||
// // Sell by
|
||||
// if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||
// print '<tr><td>';
|
||||
// print $form->editfieldkey($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td><td>';
|
||||
// print $form->editfieldval($langs->trans('SellByDate'), 'sellby', $object->sellby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Eat by
|
||||
// if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
|
||||
// print '<tr><td>';
|
||||
// print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td><td>';
|
||||
// print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
|
||||
// print '</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// if (!empty($conf->global->PRODUCT_LOT_ENABLE_TRACEABOLITY)) {
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// // print '<tr><td>'.$form->editfieldkey($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// // print '<td>'.$form->editfieldval($langs->trans('FirstUseDate'), 'commissionning_date', $object->commissionning_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// // print '</tr>';
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('DestructionDate'), 'scrapping_date', $object->scrapping_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Quality control
|
||||
// if (!empty($conf->global->PRODUCT_LOT_ENABLE_QUALITY_CONTROL)) {
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('EndOfLife'), 'eol_date', $object->eol_date, $object, $user->rights->stock->creer, 'datepicker').'</td>';
|
||||
// print '</tr>';
|
||||
// print '<tr><td>'.$form->editfieldkey($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer).'</td>';
|
||||
// print '<td>'.$form->editfieldval($langs->trans('QCFrequency'), 'qc_frequency', $object->qc_frequency, $object, $user->rights->stock->creer, 'numeric').'</td>';
|
||||
// print '</tr>';
|
||||
// }
|
||||
//
|
||||
// // Other attributes
|
||||
// include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||
|
||||
print '<table class="border centpercent tableforfield" width="100%">';
|
||||
|
||||
@ -306,7 +306,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 "</tr>\n";
|
||||
|
||||
@ -324,7 +324,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 '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
@ -335,7 +335,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->date_creation), 'dayhour')."</td>";
|
||||
print '<td class="center">'.$objp->qty."</td>\n";
|
||||
// print '<td align="right">'.price($objp->total_ht)."</td>\n";
|
||||
// print '<td align="right">'.price($objp->total_ht)."</td>\n";
|
||||
print '<td align="right">'.$receptionstatic->LibStatut($objp->statut, 5).'</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user