mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Fix option STOCK_SUPPORTS_SERVICES
This commit is contained in:
@@ -1302,12 +1302,16 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Batch number managment
|
// Batch number managment
|
||||||
if ($conf->productbatch->enabled) {
|
if ($conf->productbatch->enabled)
|
||||||
|
{
|
||||||
|
if ($object->isProduct() || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
|
||||||
|
{
|
||||||
print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td colspan="3">';
|
||||||
$statutarray=array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"));
|
$statutarray=array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"));
|
||||||
print $form->selectarray('status_batch',$statutarray,$object->status_batch);
|
print $form->selectarray('status_batch',$statutarray,$object->status_batch);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Barcode
|
// Barcode
|
||||||
$showbarcode=empty($conf->barcode->enabled)?0:1;
|
$showbarcode=empty($conf->barcode->enabled)?0:1;
|
||||||
@@ -1391,7 +1395,6 @@ else
|
|||||||
print '<input name="duration_unit" type="radio" value="m"'.($object->duration_unit=='m'?' checked':'').'>'.$langs->trans("Month");
|
print '<input name="duration_unit" type="radio" value="m"'.($object->duration_unit=='m'?' checked':'').'>'.$langs->trans("Month");
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input name="duration_unit" type="radio" value="y"'.($object->duration_unit=='y'?' checked':'').'>'.$langs->trans("Year");
|
print '<input name="duration_unit" type="radio" value="y"'.($object->duration_unit=='y'?' checked':'').'>'.$langs->trans("Year");
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1718,28 +1721,11 @@ else
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Status (to sell)
|
|
||||||
/*
|
|
||||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td colspan="2">';
|
|
||||||
if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
|
||||||
print ajax_object_onoff($object, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell');
|
|
||||||
} else {
|
|
||||||
print $object->getLibStatut(2,0);
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Status (to buy)
|
|
||||||
print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td colspan="2">';
|
|
||||||
if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
|
||||||
print ajax_object_onoff($object, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy');
|
|
||||||
} else {
|
|
||||||
print $object->getLibStatut(2,1);
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Batch number management (to batch)
|
// Batch number management (to batch)
|
||||||
if (! empty($conf->productbatch->enabled)) {
|
if (! empty($conf->productbatch->enabled))
|
||||||
|
{
|
||||||
|
if ($object->isProduct() || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
|
||||||
|
{
|
||||||
print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td colspan="2">';
|
print '<tr><td>'.$langs->trans("ManageLotSerial").'</td><td colspan="2">';
|
||||||
if (! empty($conf->use_javascript_ajax) && $usercancreate && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
if (! empty($conf->use_javascript_ajax) && $usercancreate && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
||||||
print ajax_object_onoff($object, 'status_batch', 'tobatch', 'ProductStatusOnBatch', 'ProductStatusNotOnBatch');
|
print ajax_object_onoff($object, 'status_batch', 'tobatch', 'ProductStatusOnBatch', 'ProductStatusNotOnBatch');
|
||||||
@@ -1748,6 +1734,7 @@ else
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td colspan="2">'.(dol_textishtml($object->description)?$object->description:dol_nl2br($object->description,1,true)).'</td></tr>';
|
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td colspan="2">'.(dol_textishtml($object->description)?$object->description:dol_nl2br($object->description,1,true)).'</td></tr>';
|
||||||
|
|||||||
Reference in New Issue
Block a user