Debug
This commit is contained in:
parent
477e9ddd4c
commit
ee428109e0
@ -708,7 +708,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
$url = $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addconsumeline&token='.newToken();
|
$url = $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addconsumeline&token='.newToken();
|
||||||
$permissiontoaddaconsumeline = $object->status != $object::STATUS_PRODUCED && $object->status != $object::STATUS_CANCELED && $action != 'consumeorproduce' && $action != 'consumeandproduceall';
|
$permissiontoaddaconsumeline = $object->status != $object::STATUS_PRODUCED && $object->status != $object::STATUS_CANCELED && $action != 'consumeorproduce' && $action != 'consumeandproduceall';
|
||||||
$parameters = array('morecss'=>'reposition');
|
$parameters = array('morecss'=>'reposition');
|
||||||
$newcardbutton = dolGetButtonTitle($langs->trans('AddNewConsumeLines'), '', 'fa fa-plus-circle size15x', $url, '', $permissiontoaddaconsumeline, $parameters);
|
|
||||||
|
$newcardbutton = '';
|
||||||
|
if ($action != 'consumeorproduce' && $action != 'consumeandproduceall') {
|
||||||
|
$newcardbutton = dolGetButtonTitle($langs->trans('AddNewConsumeLines'), '', 'fa fa-plus-circle size15x', $url, '', $permissiontoaddaconsumeline, $parameters);
|
||||||
|
}
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans('Consumption'), $newcardbutton, '', 0, '', '', '');
|
print load_fiche_titre($langs->trans('Consumption'), $newcardbutton, '', 0, '', '', '');
|
||||||
|
|
||||||
@ -894,7 +898,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
// Stock
|
// Stock
|
||||||
if ($conf->stock->enabled) {
|
if ($conf->stock->enabled) {
|
||||||
print '<td>';
|
print '<td class="nowraponall right">';
|
||||||
if ($tmpproduct->stock_reel < ($line->qty - $alreadyconsumed)) {
|
if ($tmpproduct->stock_reel < ($line->qty - $alreadyconsumed)) {
|
||||||
print img_warning($langs->trans('StockTooLow')).' ';
|
print img_warning($langs->trans('StockTooLow')).' ';
|
||||||
}
|
}
|
||||||
@ -1000,7 +1004,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
if ($tmpproduct->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
|
if ($tmpproduct->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
|
||||||
if (empty($line->disable_stock_change)) {
|
if (empty($line->disable_stock_change)) {
|
||||||
$preselected = (GETPOSTISSET('idwarehouse-'.$line->id.'-'.$i) ? GETPOST('idwarehouse-'.$line->id.'-'.$i) : ($tmpproduct->fk_default_warehouse > 0 ? $tmpproduct->fk_default_warehouse : 'ifone'));
|
$preselected = (GETPOSTISSET('idwarehouse-'.$line->id.'-'.$i) ? GETPOST('idwarehouse-'.$line->id.'-'.$i) : ($tmpproduct->fk_default_warehouse > 0 ? $tmpproduct->fk_default_warehouse : 'ifone'));
|
||||||
print $formproduct->selectWarehouses($preselected, 'idwarehouse-'.$line->id.'-'.$i, '', 1, 0, $line->fk_product, '', 1, 0, null, 'maxwidth300');
|
print $formproduct->selectWarehouses($preselected, 'idwarehouse-'.$line->id.'-'.$i, '', 1, 0, $line->fk_product, '', 1, 0, null, 'maxwidth200');
|
||||||
} else {
|
} else {
|
||||||
print '<span class="opacitymedium">'.$langs->trans("DisableStockChange").'</span>';
|
print '<span class="opacitymedium">'.$langs->trans("DisableStockChange").'</span>';
|
||||||
}
|
}
|
||||||
@ -1016,7 +1020,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
// Lot / Batch
|
// Lot / Batch
|
||||||
if ($conf->productbatch->enabled) {
|
if ($conf->productbatch->enabled) {
|
||||||
print '<td>aaa';
|
print '<td>';
|
||||||
if ($tmpproduct->status_batch) {
|
if ($tmpproduct->status_batch) {
|
||||||
$preselected = (GETPOSTISSET('batch-'.$line->id.'-'.$i) ? GETPOST('batch-'.$line->id.'-'.$i) : '');
|
$preselected = (GETPOSTISSET('batch-'.$line->id.'-'.$i) ? GETPOST('batch-'.$line->id.'-'.$i) : '');
|
||||||
print '<input type="text" class="width50" name="batch-'.$line->id.'-'.$i.'" value="'.$preselected.'" list="batch-'.$line->id.'-'.$i.'">';
|
print '<input type="text" class="width50" name="batch-'.$line->id.'-'.$i.'" value="'.$preselected.'" list="batch-'.$line->id.'-'.$i.'">';
|
||||||
@ -1280,7 +1284,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
if ($tmpproduct->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
|
if ($tmpproduct->type == Product::TYPE_PRODUCT || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
|
||||||
$preselected = (GETPOSTISSET('idwarehousetoproduce-'.$line->id.'-'.$i) ? GETPOST('idwarehousetoproduce-'.$line->id.'-'.$i) : ($object->fk_warehouse > 0 ? $object->fk_warehouse : 'ifone'));
|
$preselected = (GETPOSTISSET('idwarehousetoproduce-'.$line->id.'-'.$i) ? GETPOST('idwarehousetoproduce-'.$line->id.'-'.$i) : ($object->fk_warehouse > 0 ? $object->fk_warehouse : 'ifone'));
|
||||||
print $formproduct->selectWarehouses($preselected, 'idwarehousetoproduce-'.$line->id.'-'.$i, '', 1, 0, $line->fk_product, '', 1, 0, null, 'maxwidth300 csswarehouse_'.$line->id.'_'.$i);
|
print $formproduct->selectWarehouses($preselected, 'idwarehousetoproduce-'.$line->id.'-'.$i, '', 1, 0, $line->fk_product, '', 1, 0, null, 'maxwidth200 csswarehouse_'.$line->id.'_'.$i);
|
||||||
} else {
|
} else {
|
||||||
print '<span class="opacitymedium">'.$langs->trans("NoStockChangeOnServices").'</span>';
|
print '<span class="opacitymedium">'.$langs->trans("NoStockChangeOnServices").'</span>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user