remove hidden constant MAIN_ADVANCE_NUMLOT
This commit is contained in:
parent
53cf042a57
commit
83350cde8f
@ -1084,11 +1084,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
// Batch number management
|
||||
if (!empty($conf->productbatch->enabled)) {
|
||||
print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td colspan="3">';
|
||||
if (empty($conf->global ->MAIN_ADVANCE_NUMLOT)) {
|
||||
$statutarray = array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"));
|
||||
} else {
|
||||
$statutarray = array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"), '2' => $langs->trans("ProductStatusOnSerial"));
|
||||
}
|
||||
$statutarray = array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"), '2' => $langs->trans("ProductStatusOnSerial"));
|
||||
print $form->selectarray('status_batch', $statutarray, GETPOST('status_batch'));
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -1548,11 +1544,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
if ($conf->productbatch->enabled) {
|
||||
if ($object->isProduct() || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
|
||||
print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td colspan="3">';
|
||||
if (empty($conf->global ->MAIN_ADVANCE_NUMLOT)) {
|
||||
$statutarray = array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"));
|
||||
} else {
|
||||
$statutarray = array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"), '2' => $langs->trans("ProductStatusOnSerial"));
|
||||
}
|
||||
$statutarray = array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"), '2' => $langs->trans("ProductStatusOnSerial"));
|
||||
print $form->selectarray('status_batch', $statutarray, $object->status_batch);
|
||||
print '</td></tr>';
|
||||
}
|
||||
@ -2040,11 +2032,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
if (!empty($conf->productbatch->enabled)) {
|
||||
if ($object->isProduct() || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
|
||||
print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td colspan="2">';
|
||||
if (!empty($conf->use_javascript_ajax) && $usercancreate && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE) && empty($conf->global->MAIN_ADVANCE_NUMLOT)) {
|
||||
print ajax_object_onoff($object, 'status_batch', 'tobatch', 'ProductStatusOnBatch', 'ProductStatusNotOnBatch');
|
||||
} else {
|
||||
print $object->getLibStatut(0, 2);
|
||||
}
|
||||
print $object->getLibStatut(0, 2);
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -4747,10 +4747,10 @@ class Product extends CommonObject
|
||||
if ($type == 2) {
|
||||
switch ($mode) {
|
||||
case 0:
|
||||
$label = ($status == 0 ? $langs->trans('ProductStatusNotOnBatch') : ($status == 1 || empty($conf->global->MAIN_ADVANCE_NUMLOT) ? $langs->trans('ProductStatusOnBatch') : $langs->trans('ProductStatusOnSerial')));
|
||||
$label = ($status == 0 ? $langs->trans('ProductStatusNotOnBatch') : ($status == 1 ? $langs->trans('ProductStatusOnBatch') : $langs->trans('ProductStatusOnSerial')));
|
||||
return dolGetStatus($label);
|
||||
case 1:
|
||||
$label = ($status == 0 ? $langs->trans('ProductStatusNotOnBatchShort') : ($status == 1 || empty($conf->global->MAIN_ADVANCE_NUMLOT) ? $langs->trans('ProductStatusOnBatchShort') : $langs->trans('ProductStatusOnSerialShort')));
|
||||
$label = ($status == 0 ? $langs->trans('ProductStatusNotOnBatchShort') : ($status == 1 ? $langs->trans('ProductStatusOnBatchShort') : $langs->trans('ProductStatusOnSerialShort')));
|
||||
return dolGetStatus($label);
|
||||
case 2:
|
||||
return $this->LibStatut($status, 3, 2).' '.$this->LibStatut($status, 1, 2);
|
||||
@ -4788,10 +4788,10 @@ class Product extends CommonObject
|
||||
$labelStatus = $langs->trans('ProductStatusOnBuyShort');
|
||||
$labelStatusShort = $langs->trans('ProductStatusOnBuy');
|
||||
} elseif ($type == 2) {
|
||||
$labelStatus = ($status == 1 || empty($conf->global->MAIN_ADVANCE_NUMLOT) ? $langs->trans('ProductStatusOnBatch') : $langs->trans('ProductStatusOnSerial'));
|
||||
$labelStatusShort = ($status == 1 || empty($conf->global->MAIN_ADVANCE_NUMLOT) ? $langs->trans('ProductStatusOnBatchShort') : $langs->trans('ProductStatusOnSerialShort'));
|
||||
$labelStatus = ($status == 1 ? $langs->trans('ProductStatusOnBatch') : $langs->trans('ProductStatusOnSerial'));
|
||||
$labelStatusShort = ($status == 1 ? $langs->trans('ProductStatusOnBatchShort') : $langs->trans('ProductStatusOnSerialShort'));
|
||||
}
|
||||
} elseif (! empty($conf->global->MAIN_ADVANCE_NUMLOT) && $type == 2 && $status == 2) {
|
||||
} elseif ( $type == 2 && $status == 2 ) {
|
||||
$labelStatus = $langs->trans('ProductStatusOnSerial');
|
||||
$labelStatusShort = $langs->trans('ProductStatusOnSerialShort');
|
||||
}
|
||||
|
||||
@ -971,18 +971,13 @@ if ($resql) {
|
||||
// To batch
|
||||
if (!empty($arrayfields['p.tobatch']['checked'])) {
|
||||
print '<td class="liste_titre center">';
|
||||
|
||||
if (empty($conf->global ->MAIN_ADVANCE_NUMLOT)) {
|
||||
print $form->selectyesno('search_tobatch', $search_tobatch, 1, false, 1);
|
||||
} else {
|
||||
$statutarray = array(
|
||||
'-1' => '',
|
||||
'0' => $langs->trans("ProductStatusNotOnBatchShort"),
|
||||
'1' => $langs->trans("ProductStatusOnBatchShort"),
|
||||
'2' => $langs->trans("ProductStatusOnSerialShort")
|
||||
);
|
||||
print $form->selectarray('search_tobatch', $statutarray, $search_tobatch);
|
||||
}
|
||||
$statutarray = array(
|
||||
'-1' => '',
|
||||
'0' => $langs->trans("ProductStatusNotOnBatchShort"),
|
||||
'1' => $langs->trans("ProductStatusOnBatchShort"),
|
||||
'2' => $langs->trans("ProductStatusOnSerialShort")
|
||||
);
|
||||
print $form->selectarray('search_tobatch', $statutarray, $search_tobatch);
|
||||
print '</td>';
|
||||
}
|
||||
// Country
|
||||
@ -1672,11 +1667,7 @@ if ($resql) {
|
||||
// Lot/Serial
|
||||
if (!empty($arrayfields['p.tobatch']['checked'])) {
|
||||
print '<td class="center">';
|
||||
if (empty($conf->global->MAIN_ADVANCE_NUMLOT)) {
|
||||
print yn($obj->tobatch);
|
||||
} else {
|
||||
print $product_static->getLibStatut(1, 2);
|
||||
}
|
||||
print $product_static->getLibStatut(1, 2);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user