Fight against useless colspan
This commit is contained in:
parent
c2c69620eb
commit
0f11a42fe4
@ -924,8 +924,8 @@ print "</tr>";
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) {
|
||||
|
||||
if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE))
|
||||
{
|
||||
print '<br><br>';
|
||||
print_titre($langs->trans('AddNewProductStockWarehouse'));
|
||||
//print '<br />';
|
||||
@ -944,11 +944,11 @@ if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) {
|
||||
$pse = new ProductStockEntrepot($db);
|
||||
$lines = $pse->fetchAll(GETPOST('id'));
|
||||
|
||||
if(!empty($lines)) {
|
||||
|
||||
if (!empty($lines))
|
||||
{
|
||||
$var=false;
|
||||
foreach($lines as $line) {
|
||||
|
||||
foreach($lines as $line)
|
||||
{
|
||||
$ent = new Entrepot($db);
|
||||
$ent->fetch($line['fk_entrepot']);
|
||||
print '<tr '.$bc[$var].'><td width="40%" colspan="4">'.$ent->getNomUrl(3).'</td>';
|
||||
@ -957,15 +957,12 @@ if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) {
|
||||
print '<td align="right"><a href="?id='.GETPOST('id').'&fk_productstockwarehouse='.$line['id'].'&action=delete_productstockwarehouse">'.img_delete().'</a></td>';
|
||||
print '</tr>';
|
||||
$var=!$var;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
print '</form>';
|
||||
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2010-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -15,6 +15,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* $object must be defined
|
||||
* $backtopage
|
||||
*/
|
||||
?>
|
||||
|
||||
@ -54,30 +55,34 @@
|
||||
print '<tr>';
|
||||
if ($object->element == 'product')
|
||||
{
|
||||
print '<td width="20%" class="fieldrequired" colspan="2">'.$langs->trans("Warehouse").'</td>';
|
||||
print '<td width="20%">';
|
||||
print '<td width="20%" class="fieldrequired">'.$langs->trans("Warehouse").'</td>';
|
||||
print '<td width="30%">';
|
||||
print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid",'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot','int'):'ifone')), 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100');
|
||||
print ' <select name="mouvement" id="mouvement">';
|
||||
print '<option value="0">'.$langs->trans("Add").'</option>';
|
||||
print '<option value="1"'.(GETPOST('mouvement')?' selected="selected"':'').'>'.$langs->trans("Delete").'</option>';
|
||||
print '</select>';
|
||||
print '</td>';
|
||||
}
|
||||
if ($object->element == 'stock')
|
||||
{
|
||||
print '<td width="20%" class="fieldrequired" colspan="2">'.$langs->trans("Product").'</td>';
|
||||
print '<td width="20%">';
|
||||
print '<td width="30%">';
|
||||
print $form->select_produits(GETPOST('product_id'), 'product_id', (empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''), 20, 0, -1);
|
||||
print ' <select name="mouvement" id="mouvement">';
|
||||
print '<option value="0">'.$langs->trans("Add").'</option>';
|
||||
print '<option value="1"'.(GETPOST('mouvement')?' selected="selected"':'').'>'.$langs->trans("Delete").'</option>';
|
||||
print '</select>';
|
||||
print '</td>';
|
||||
}
|
||||
print '<td width="20%">';
|
||||
print '<select name="mouvement" id="mouvement" class="flat">';
|
||||
print '<option value="0">'.$langs->trans("Add").'</option>';
|
||||
print '<option value="1"'.(GETPOST('mouvement')?' selected="selected"':'').'>'.$langs->trans("Delete").'</option>';
|
||||
print '</select></td>';
|
||||
print '<td width="20%" class="fieldrequired">'.$langs->trans("NumberOfUnit").'</td><td width="20%"><input class="flat" name="nbpiece" id="nbpiece" size="10" value="'.GETPOST("nbpiece").'"></td>';
|
||||
print '<td width="20%" class="fieldrequired">'.$langs->trans("NumberOfUnit").'</td>';
|
||||
print '<td width="30%"><input name="nbpiece" id="nbpiece" size="10" value="'.GETPOST("nbpiece").'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Purchase price
|
||||
print '<tr>';
|
||||
print '<td width="20%" colspan="2">'.$langs->trans("UnitPurchaseValue").'</td>';
|
||||
print '<td colspan="'.(!empty($conf->projet->enabled) ? '2' : '4').'"><input class="flat" name="unitprice" id="unitprice" size="10" value="'.GETPOST("unitprice").'"></td>';
|
||||
print '<td width="25%">'.$langs->trans("UnitPurchaseValue").'</td>';
|
||||
print '<td colspan="'.(!empty($conf->projet->enabled) ? '1' : '3').'"><input name="unitprice" id="unitprice" size="10" value="'.GETPOST("unitprice").'"></td>';
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
print '<td>'.$langs->trans('Project').'</td>';
|
||||
@ -94,15 +99,15 @@
|
||||
)
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td colspan="2"'.($object->element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").'</td><td colspan="4">';
|
||||
print '<td'.($object->element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").'</td><td colspan="3">';
|
||||
print '<input type="text" name="batch_number" size="40" value="'.GETPOST("batch_number").'">';
|
||||
print '</td>';
|
||||
print '</tr><tr>';
|
||||
print '<td colspan="2">'.$langs->trans("EatByDate").'</td><td>';
|
||||
print '</tr>';
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("EatByDate").'</td><td>';
|
||||
$eatbyselected=dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear'));
|
||||
$form->select_date($eatbyselected,'eatby','','',1,"");
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
print '<td>'.$langs->trans("SellByDate").'</td><td>';
|
||||
$sellbyselected=dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear'));
|
||||
$form->select_date($sellbyselected,'sellby','','',1,"");
|
||||
@ -113,11 +118,11 @@
|
||||
// Label of mouvement of id of inventory
|
||||
$valformovementlabel=((GETPOST("label") && (GETPOST('label') != $langs->trans("MovementCorrectStock",''))) ? GETPOST("label") : $langs->trans("MovementCorrectStock", $productref));
|
||||
print '<tr>';
|
||||
print '<td width="20%" colspan="2">'.$langs->trans("MovementLabel").'</td>';
|
||||
print '<td colspan="2">';
|
||||
print '<td>'.$langs->trans("MovementLabel").'</td>';
|
||||
print '<td>';
|
||||
print '<input type="text" name="label" size="60" value="'.$valformovementlabel.'">';
|
||||
print '</td>';
|
||||
print '<td width="20%">'.$langs->trans("InventoryCode").'</td><td width="20%"><input class="flat maxwidth100onsmartphone" name="inventorycode" id="inventorycode" value="'.GETPOST("inventorycode").'"></td>';
|
||||
print '<td>'.$langs->trans("InventoryCode").'</td><td><input class="maxwidth100onsmartphone" name="inventorycode" id="inventorycode" value="'.GETPOST("inventorycode").'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2010-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -61,23 +61,23 @@
|
||||
print '<tr>';
|
||||
if ($object->element == 'product')
|
||||
{
|
||||
print '<td width="15%" class="fieldrequired">'.$langs->trans("WarehouseSource").'</td>';
|
||||
print '<td width="15%">';
|
||||
print '<td width="20%" class="fieldrequired">'.$langs->trans("WarehouseSource").'</td>';
|
||||
print '<td width="30%">';
|
||||
print $formproduct->selectWarehouses((GETPOST("dwid")?GETPOST("dwid",'int'):(GETPOST('id_entrepot')?GETPOST('id_entrepot','int'):'ifone')), 'id_entrepot', 'warehouseopen,warehouseinternal', 1);
|
||||
print '</td>';
|
||||
}
|
||||
if ($object->element == 'stock')
|
||||
{
|
||||
print '<td width="15%" class="fieldrequired">'.$langs->trans("Product").'</td>';
|
||||
print '<td width="15%">';
|
||||
print '<td width="20%" class="fieldrequired">'.$langs->trans("Product").'</td>';
|
||||
print '<td width="30%">';
|
||||
print $form->select_produits(GETPOST('product_id'),'product_id',(empty($conf->global->STOCK_SUPPORTS_SERVICES)?'0':''));
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
print '<td width="15%" class="fieldrequired">'.$langs->trans("WarehouseTarget").'</td><td width="15%">';
|
||||
print '<td width="20%" class="fieldrequired">'.$langs->trans("WarehouseTarget").'</td><td width="30%">';
|
||||
print $formproduct->selectWarehouses(GETPOST('id_entrepot_destination'), 'id_entrepot_destination', 'warehouseopen,warehouseinternal', 1);
|
||||
print '</td>';
|
||||
print '<td width="15%" class="fieldrequired">'.$langs->trans("NumberOfUnit").'</td><td width="15%"><input type="text" class="flat" name="nbpiece" size="10" value="'.dol_escape_htmltag(GETPOST("nbpiece")).'"></td>';
|
||||
print '</td></tr>';
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("NumberOfUnit").'</td><td colspan="3"><input type="text" name="nbpiece" size="10" value="'.dol_escape_htmltag(GETPOST("nbpiece")).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
// Serial / Eat-by date
|
||||
@ -87,7 +87,7 @@
|
||||
)
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td'.($object->element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").'</td><td colspan="5">';
|
||||
print '<td'.($object->element == 'stock'?'': ' class="fieldrequired"').'>'.$langs->trans("batch_number").'</td><td colspan="3">';
|
||||
if ($pdluoid > 0)
|
||||
{
|
||||
// If form was opened for a specific pdluoid, field is disabled
|
||||
@ -99,14 +99,15 @@
|
||||
print '<input type="text" name="batch_number" size="40" value="'.(GETPOST('batch_number')?GETPOST('batch_number'):$pdluo->batch).'">';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr><tr>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("EatByDate").'</td><td>';
|
||||
print $form->select_date(($d_eatby?$d_eatby:$pdluo->eatby),'eatby','','',1,"", 1, 0, 1, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled
|
||||
print '</td>';
|
||||
print '<td>'.$langs->trans("SellByDate").'</td><td>';
|
||||
print $form->select_date(($d_sellby?$d_sellby:$pdluo->sellby),'sellby','','',1,"", 1, 0, 1, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled
|
||||
print '</td>';
|
||||
print '<td colspan="2"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -114,10 +115,10 @@
|
||||
$valformovementlabel=(GETPOST("label")?GETPOST("label"):$langs->trans("MovementTransferStock", $productref));
|
||||
print '<tr>';
|
||||
print '<td width="15%">'.$langs->trans("MovementLabel").'</td>';
|
||||
print '<td colspan="3">';
|
||||
print '<td>';
|
||||
print '<input type="text" name="label" size="60" value="'.dol_escape_htmltag($valformovementlabel).'">';
|
||||
print '</td>';
|
||||
print '<td width="20%">'.$langs->trans("InventoryCode").'</td><td width="20%"><input class="flat maxwidth100onsmartphone" name="inventorycode" id="inventorycode" value="'.(GETPOST("inventorycode")?GETPOST("inventorycode",'alpha'):dol_print_date(dol_now(),'%y%m%d%H%M%S')).'"></td>';
|
||||
print '<td width="15%">'.$langs->trans("InventoryCode").'</td><td><input class="maxwidth100onsmartphone" name="inventorycode" id="inventorycode" value="'.(GETPOST("inventorycode")?GETPOST("inventorycode",'alpha'):dol_print_date(dol_now(),'%y%m%d%H%M%S')).'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user