Debug v18
This commit is contained in:
parent
e641c0379b
commit
e203346b2a
4 changed files with 55 additions and 23 deletions
|
|
@ -2013,7 +2013,7 @@ if ($resql) {
|
|||
print '<tr class="oddeven">';
|
||||
|
||||
// Action column
|
||||
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
|
|
@ -2646,7 +2646,7 @@ if ($resql) {
|
|||
}
|
||||
|
||||
// Action column
|
||||
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans('ParentProducts').'</td>';
|
||||
print '<td>'.$langs->trans('Label').'</td>';
|
||||
print '<td>'.$langs->trans('Qty').'</td>';
|
||||
print '<td class="right">'.$langs->trans('Qty').'</td>';
|
||||
print '</td>';
|
||||
if (count($prodsfather) > 0) {
|
||||
foreach ($prodsfather as $value) {
|
||||
|
|
@ -342,7 +342,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
print '<tr class="oddeven">';
|
||||
print '<td>'.$productstatic->getNomUrl(1, 'composition').'</td>';
|
||||
print '<td>'.dol_escape_htmltag($productstatic->label).'</td>';
|
||||
print '<td>'.dol_escape_htmltag($value['qty']).'</td>';
|
||||
print '<td class="right">'.dol_escape_htmltag($value['qty']).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
} else {
|
||||
|
|
@ -384,7 +384,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
print '<td class="right">'.$langs->trans('Stock').'</td>';
|
||||
}
|
||||
// Qty in kit
|
||||
print '<td class="center">'.$langs->trans('Qty').'</td>';
|
||||
print '<td class="right">'.$langs->trans('Qty').'</td>';
|
||||
// Stoc inc/dev
|
||||
print '<td class="center">'.$langs->trans('ComposedProductIncDecStock').'</td>';
|
||||
// Move
|
||||
|
|
@ -461,7 +461,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
|
||||
// Qty + IncDec
|
||||
if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) {
|
||||
print '<td class="center"><input type="text" value="'.$nb_of_subproduct.'" name="TProduct['.$productstatic->id.'][qty]" size="4" class="right" /></td>';
|
||||
print '<td class="center"><input type="text" value="'.$nb_of_subproduct.'" name="TProduct['.$productstatic->id.'][qty]" class="right width40" /></td>';
|
||||
print '<td class="center"><input type="checkbox" name="TProduct['.$productstatic->id.'][incdec]" value="1" '.($value['incdec'] == 1 ? 'checked' : '').' /></td>';
|
||||
} else {
|
||||
print '<td>'.$nb_of_subproduct.'</td>';
|
||||
|
|
@ -491,10 +491,11 @@ if ($id > 0 || !empty($ref)) {
|
|||
for ($i = 0; $i < $value['level']; $i++) {
|
||||
print ' '; // Add indentation
|
||||
}
|
||||
print $productstatic->getNomUrl(1, 'composition').'</td>';
|
||||
print $productstatic->getNomUrl(1, 'composition');
|
||||
print '</td>';
|
||||
|
||||
// Product label
|
||||
print '<td>'.$productstatic->label.'</td>';
|
||||
print '<td>'.dol_escape_htmltag($productstatic->label).'</td>';
|
||||
|
||||
// Best buying price
|
||||
print '<td> </td>';
|
||||
|
|
@ -509,7 +510,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
}
|
||||
|
||||
// Qty in kit
|
||||
print '<td class="center">'.$value['nb'].'</td>';
|
||||
print '<td class="right">'.dol_escape_htmltag($value['nb']).'</td>';
|
||||
|
||||
// Inc/dec
|
||||
print '<td> </td>';
|
||||
|
|
@ -622,7 +623,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
print ajax_combobox('parent');
|
||||
}
|
||||
print '<div class="inline-block">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Search").'">';
|
||||
print '<input type="submit" class="button small" value="'.$langs->trans("Search").'">';
|
||||
print '</div>';
|
||||
print '</form>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1367,7 +1367,7 @@ if (!$variants) {
|
|||
<td style="text-align: center;"><?php echo $prodstatic->getLibStatut(2, 1) ?></td>
|
||||
<td class="right"><?php echo $prodstatic->stock_reel ?></td>
|
||||
<td class="right">
|
||||
<a class="paddingleft paddingright" href="<?php echo dol_buildpath('/product/stock/product.php?id='.$currcomb->fk_product_child, 2) ?>"><?php echo img_edit() ?></a>
|
||||
<a class="paddingleft paddingright editfielda" href="<?php echo dol_buildpath('/product/stock/product.php?id='.$currcomb->fk_product_child, 2) ?>"><?php echo img_edit() ?></a>
|
||||
</td>
|
||||
<?php
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -900,6 +900,15 @@ if (!empty($id) || !empty($ref)) {
|
|||
?>
|
||||
<table class="liste">
|
||||
<tr class="liste_titre">
|
||||
<?php
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="liste_titre center">';
|
||||
$searchpicto = $form->showCheckAddButtons('checkforselect', 1);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
}
|
||||
?>
|
||||
<td class="liste_titre"><?php echo $langs->trans('Product') ?></td>
|
||||
<td class="liste_titre"><?php echo $langs->trans('Combination') ?></td>
|
||||
<td class="liste_titre right"><?php echo $langs->trans('PriceImpact') ?></td>
|
||||
|
|
@ -910,10 +919,13 @@ if (!empty($id) || !empty($ref)) {
|
|||
<td class="liste_titre center"><?php echo $langs->trans('OnBuy') ?></td>
|
||||
<td class="liste_titre"></td>
|
||||
<?php
|
||||
print '<td class="liste_titre center">';
|
||||
$searchpicto = $form->showCheckAddButtons('checkforselect', 1);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="liste_titre center">';
|
||||
$searchpicto = $form->showCheckAddButtons('checkforselect', 1);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<?php
|
||||
|
|
@ -922,9 +934,22 @@ if (!empty($id) || !empty($ref)) {
|
|||
foreach ($productCombinations as $currcomb) {
|
||||
$prodstatic->fetch($currcomb->fk_product_child);
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
if (!empty($productCombinations) || $massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($prodstatic->id, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
}
|
||||
print '<input id="cb'.$prodstatic->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$prodstatic->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
print '<td>'.$prodstatic->getNomUrl(1).'</td>';
|
||||
print '<td>';
|
||||
|
||||
$productCombination2ValuePairs = $comb2val->fetchByFkCombination($currcomb->id);
|
||||
$iMax = count($productCombination2ValuePairs);
|
||||
|
||||
|
|
@ -941,19 +966,25 @@ if (!empty($id) || !empty($ref)) {
|
|||
}
|
||||
print '<td class="center">'.$prodstatic->getLibStatut(2, 0).'</td>';
|
||||
print '<td class="center">'.$prodstatic->getLibStatut(2, 1).'</td>';
|
||||
|
||||
print '<td class="right">';
|
||||
print '<a class="paddingleft paddingright editfielda" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=edit&token='.newToken().'&valueid='.$currcomb->id.'">'.img_edit().'</a>';
|
||||
print '<a class="paddingleft paddingright" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=delete&token='.newToken().'&valueid='.$currcomb->id.'">'.img_delete().'</a>';
|
||||
print '</td>';
|
||||
print '<td class="nowrap center">';
|
||||
if (!empty($productCombinations) || $massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($prodstatic->id, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
if (!empty($productCombinations) || $massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($prodstatic->id, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
}
|
||||
print '<input id="cb'.$prodstatic->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$prodstatic->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
print '<input id="cb'.$prodstatic->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$prodstatic->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
print '</td>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue