diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 7b5bbbc50c5..049bcf89c8b 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -530,7 +530,8 @@ class FactureFournisseur extends CommonInvoice $this->lines[$i]->date_end, $this->lines[$i]->array_options, $this->lines[$i]->fk_unit, - $this->lines[$i]->multicurrency_subprice + $this->lines[$i]->multicurrency_subprice, + $this->lines[$i]->ref_supplier ); } else { $this->error = $this->db->lasterror(); @@ -568,7 +569,15 @@ class FactureFournisseur extends CommonInvoice $line->fk_product, 'HT', (!empty($line->info_bits) ? $line->info_bits : ''), - $line->product_type + $line->product_type, + $line->remise_percent, + 0, + $line->date_start, + $line->date_end, + $line->array_options, + $line->fk_unit, + $line->multicurrency_subprice, + $line->ref_supplier ); } else { $this->error = $this->db->lasterror(); diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 2c847b9a421..09588389cb1 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -721,12 +721,12 @@ if ($id > 0 || !empty($ref)) { print '
| '; print ' | '; - if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { - print ' | '; - print $form->selectDate($pdluo->eatby, 'eatby', '', '', 1, '', 1, 0); - print ' | '; - } if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { print ''; print $form->selectDate($pdluo->sellby, 'sellby', '', '', 1, '', 1, 0); print ' | '; } + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print ''; + print $form->selectDate($pdluo->eatby, 'eatby', '', '', 1, '', 1, 0); + print ' | '; + } print ''.$pdluo->qty.($pdluo->qty < 0 ? ' '.img_warning() : '').' | '; print ''; print ' | '.dol_print_date($pdluo->eatby, 'day').' | '; - } if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { $colspan--; print ''.dol_print_date($pdluo->sellby, 'day').' | '; } + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + $colspan--; + print ''.dol_print_date($pdluo->eatby, 'day').' | '; + } print ''.$pdluo->qty.($pdluo->qty < 0 ? ' '.img_warning() : '').' | '; print ''; print ' | '; diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php index d8ac85d004d..22f32f0c8b9 100644 --- a/htdocs/product/stock/productlot_card.php +++ b/htdocs/product/stock/productlot_card.php @@ -463,16 +463,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print $producttmp->getNomUrl(1, 'stock')." - ".$producttmp->label; 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 '||||||||||
| '; @@ -483,6 +473,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea 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 '||||||||||
| '.$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').' | '; diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index 6e2ab53dd0e..05d628902fb 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -120,18 +120,18 @@ if (!empty($conf->productbatch->enabled) && print ''; print '||||||||||
| '.$langs->trans("EatByDate").' | '; - $eatbyselected = dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); - print $form->selectDate($eatbyselected, 'eatby', '', '', 1, ""); - print ' | '; - } if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { print ''.$langs->trans("SellByDate").' | '; $sellbyselected = dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); print $form->selectDate($sellbyselected, 'sellby', '', '', 1, ""); print ' | '; } + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print ''.$langs->trans("EatByDate").' | '; + $eatbyselected = dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); + print $form->selectDate($eatbyselected, 'eatby', '', '', 1, ""); + print ' | '; + } print '||||||
| '.$langs->trans("EatByDate").' | '; - print $form->selectDate(($d_eatby ? $d_eatby : $pdluo->eatby), 'eatby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled - print ' | '; - } if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { print ''.$langs->trans("SellByDate").' | '; print $form->selectDate(($d_sellby ? $d_sellby : $pdluo->sellby), 'sellby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled print ' | '; } + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print ''.$langs->trans("EatByDate").' | '; + print $form->selectDate(($d_eatby ? $d_eatby : $pdluo->eatby), 'eatby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled + print ' | '; + } print ''.$langs->trans("batch_number").' | '; - if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { - print ''.$langs->trans("EatByDate").' | '; - } if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { print ''.$langs->trans("SellByDate").' | '; } + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print ''.$langs->trans("EatByDate").' | '; + } } print "\n"; } @@ -1153,12 +1153,12 @@ if ($action == 'create') { if (!empty($conf->productbatch->enabled)) { if (!empty($product->status_batch)) { print ''; - if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { print ' | '; print $form->selectDate($dispatchLines[$indiceAsked]['DLC'], 'dlc'.$indiceAsked, '', '', 1, ""); print ' | '; } - if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { print ''; print $form->selectDate($dispatchLines[$indiceAsked]['DLUO'], 'dluo'.$indiceAsked, '', '', 1, ""); print ' | '; @@ -1829,14 +1829,14 @@ if ($action == 'create') { print ''.$formproduct->selectWarehouses($lines[$i]->fk_entrepot, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1).' | '; // Batch number managment if ($conf->productbatch->enabled && !empty($lines[$i]->product->status_batch)) { - print ''; - if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { - print $langs->trans('EatByDate').' : '; - print $form->selectDate($lines[$i]->eatby, 'dlc'.$line_id, '', '', 1, "").''; - } + print ' | '; if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { print $langs->trans('SellByDate').' : '; - print $form->selectDate($lines[$i]->sellby, 'dluo'.$line_id, '', '', 1, ""); + print $form->selectDate($lines[$i]->sellby, 'dlc'.$line_id, '', '', 1, "").''; + } + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print $langs->trans('EatByDate').' : '; + print $form->selectDate($lines[$i]->eatby, 'dluo'.$line_id, '', '', 1, ""); } print ' | ';
}