Fix balance of colspan

This commit is contained in:
Laurent Destailleur 2019-04-30 16:44:11 +02:00
parent 203998a2c7
commit 9c45b781af
6 changed files with 34 additions and 39 deletions

View File

@ -4457,7 +4457,9 @@ elseif ($id > 0 || ! empty($ref))
// Show global modifiers // Show global modifiers
if (! empty($conf->global->INVOICE_USE_SITUATION)) if (! empty($conf->global->INVOICE_USE_SITUATION))
{ {
if ($object->situation_cycle_ref && $object->statut == 0) { if ($object->situation_cycle_ref && $object->statut == 0)
{
print '<!-- Area to change globally the situation percent -->'."\n";
print '<div class="div-table-responsive">'; print '<div class="div-table-responsive">';
print '<form name="updatealllines" id="updatealllines" action="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '#updatealllines" method="POST">'; print '<form name="updatealllines" id="updatealllines" action="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '#updatealllines" method="POST">';
@ -4473,38 +4475,19 @@ elseif ($id > 0 || ! empty($ref))
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
print '<td align="center" width="5">&nbsp;</td>'; print '<td align="center" width="5">&nbsp;</td>';
} }
print '<td>' . $langs->trans('ModifyAllLines') . '</td>'; print '<td class="minwidth500imp">' . $langs->trans('ModifyAllLines') . '</td>';
print '<td class="right" width="50">&nbsp;</td>'; print '<td class="right">' . $langs->trans('Progress') . '</td>';
print '<td class="right" width="80">&nbsp;</td>';
if ($inputalsopricewithtax) print '<td class="right" width="80">&nbsp;</td>';
print '<td class="right" width="50">&nbsp</td>';
print '<td class="right" width="50">&nbsp</td>';
print '<td class="right" width="50">' . $langs->trans('Progress') . '</td>';
if (! empty($conf->margin->enabled) && empty($user->societe_id))
{
print '<td class="margininfos right" width="80">&nbsp;</td>';
if ((! empty($conf->global->DISPLAY_MARGIN_RATES) || ! empty($conf->global->DISPLAY_MARK_RATES)) && $usercanreadallmargin) {
print '<td class="margininfos right" width="50">&nbsp;</td>';
}
}
print '<td class="right" width="50">&nbsp;</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td width="10">&nbsp;</td>';
print '<td width="10">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
print '<tr class="nodrag nodrop">';
// Adds a line numbering column // Adds a line numbering column
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
print '<td align="center" width="5">&nbsp;</td>'; print '<td align="center" width="5">&nbsp;</td>';
} }
print '<tr width="100%" class="nodrag nodrop">';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td width="50">&nbsp;</td>';
print '<td width="80">&nbsp;</td>';
print '<td width="50">&nbsp;</td>';
print '<td width="50">&nbsp;</td>';
print '<td class="nowrap right"><input type="text" size="1" value="" name="all_progress">%</td>'; print '<td class="nowrap right"><input type="text" size="1" value="" name="all_progress">%</td>';
print '<td colspan="4" class="right"><input class="button" type="submit" name="all_percent" value="Modifier" /></td>'; print '<td class="right"><input class="button" type="submit" name="all_percent" value="Modifier" /></td>';
print '</tr>'; print '</tr>';
print '</table>'; print '</table>';

View File

@ -3963,8 +3963,10 @@ abstract class CommonObject
// Reduction short // Reduction short
print '<td class="linecoldiscount right">'.$langs->trans('ReductionShort').'</td>'; print '<td class="linecoldiscount right">'.$langs->trans('ReductionShort').'</td>';
// Fields for situation invoice
if ($this->situation_cycle_ref) { if ($this->situation_cycle_ref) {
print '<td class="linecolcycleref right">' . $langs->trans('Progress') . '</td>'; print '<td class="linecolcycleref right">' . $langs->trans('Progress') . '</td>';
//print '<td class="linecolcycleref2 right">' . $langs->trans('TotalHT100') . '</td>';
} }
if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id)) if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id))

View File

@ -131,8 +131,10 @@ if ($nolinesbefore) {
?> ?>
<td class="linecoldiscount right"><?php echo $langs->trans('ReductionShort'); ?></td> <td class="linecoldiscount right"><?php echo $langs->trans('ReductionShort'); ?></td>
<?php <?php
// Fields for situation invoice
if ($this->situation_cycle_ref) { if ($this->situation_cycle_ref) {
print '<td class="linecolcycleref right">' . $langs->trans('Progress') . '</td>'; print '<td class="linecolcycleref right">' . $langs->trans('Progress') . '</td>';
//print '<td class="linecolcycleref2 right"></td>';
} }
if (! empty($usemargins)) if (! empty($usemargins))
{ {

View File

@ -60,12 +60,15 @@ if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf-
<!-- BEGIN PHP TEMPLATE objectline_edit.tpl.php --> <!-- BEGIN PHP TEMPLATE objectline_edit.tpl.php -->
<?php <?php
$coldisplay=-1; // We remove first td $coldisplay=0;
?> ?>
<tr class="oddeven tredited"> <tr class="oddeven tredited">
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?> <?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
<td class="linecolnum center"><?php $coldisplay++; ?><?php echo ($i+1); ?></td> <td class="linecolnum center"><?php $coldisplay++; ?><?php echo ($i+1); ?></td>
<?php } ?> <?php }
$coldisplay++;
?>
<td> <td>
<div id="line_<?php echo $line->id; ?>"></div> <div id="line_<?php echo $line->id; ?>"></div>
@ -137,6 +140,7 @@ $coldisplay=-1; // We remove first td
<?php <?php
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines
{ {
$coldisplay++;
?> ?>
<td class="right"><input id="fourn_ref" name="fourn_ref" class="flat minwidth75" value="<?php echo ($line->ref_supplier ? $line->ref_supplier : $line->ref_fourn); ?>"></td> <td class="right"><input id="fourn_ref" name="fourn_ref" class="flat minwidth75" value="<?php echo ($line->ref_supplier ? $line->ref_supplier : $line->ref_fourn); ?>"></td>
<?php <?php
@ -155,6 +159,7 @@ $coldisplay=-1; // We remove first td
print '></td>'; print '></td>';
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) {
$coldisplay++;
print '<td class="right"><input rel="'.$object->multicurrency_tx.'" type="text" class="flat right" size="5" id="multicurrency_subprice" name="multicurrency_subprice" value="'.price($line->multicurrency_subprice).'" /></td>'; print '<td class="right"><input rel="'.$object->multicurrency_tx.'" type="text" class="flat right" size="5" id="multicurrency_subprice" name="multicurrency_subprice" value="'.price($line->multicurrency_subprice).'" /></td>';
} }
@ -183,6 +188,7 @@ $coldisplay=-1; // We remove first td
<?php <?php
if($conf->global->PRODUCT_USE_UNITS) if($conf->global->PRODUCT_USE_UNITS)
{ {
$coldisplay++;
print '<td class="left">'; print '<td class="left">';
print $form->selectUnits($line->fk_unit, "units"); print $form->selectUnits($line->fk_unit, "units");
print '</td>'; print '</td>';
@ -205,12 +211,11 @@ $coldisplay=-1; // We remove first td
} }
if (! empty($usemargins)) if (! empty($usemargins))
{ {
if (!empty($user->rights->margins->creer)) { if (!empty($user->rights->margins->creer))
?> {
<td class="margininfos right">
<?php
$coldisplay++; $coldisplay++;
?> ?>
<td class="margininfos right">
<!-- For predef product --> <!-- For predef product -->
<?php if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { ?> <?php if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { ?>
<select id="fournprice_predef" name="fournprice_predef" class="flat right" style="display: none;"></select> <select id="fournprice_predef" name="fournprice_predef" class="flat right" style="display: none;"></select>
@ -218,8 +223,8 @@ $coldisplay=-1; // We remove first td
<!-- For free product --> <!-- For free product -->
<input class="flat right" type="text" size="5" id="buying_price" name="buying_price" class="hideobject" value="<?php echo price($line->pa_ht, 0, '', 0); ?>"> <input class="flat right" type="text" size="5" id="buying_price" name="buying_price" class="hideobject" value="<?php echo price($line->pa_ht, 0, '', 0); ?>">
</td> </td>
<?php } ?> <?php }
<?php
if ($user->rights->margins->creer) { if ($user->rights->margins->creer) {
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) if (! empty($conf->global->DISPLAY_MARGIN_RATES))
{ {
@ -246,7 +251,7 @@ $coldisplay=-1; // We remove first td
?> ?>
<!-- colspan=4 for this td because it replace total_ht+3 td for buttons --> <!-- colspan=4 for this td because it replace total_ht+3 td for buttons -->
<td class="center valignmiddle" colspan="<?php echo $colspan; ?>"><?php $coldisplay+=4; ?> <td class="center valignmiddle" colspan="<?php echo $colspan; ?>"><?php $coldisplay+=$colspan; ?>
<input type="submit" class="button" id="savelinebutton" name="save" value="<?php echo $langs->trans("Save"); ?>"><br> <input type="submit" class="button" id="savelinebutton" name="save" value="<?php echo $langs->trans("Save"); ?>"><br>
<input type="submit" class="button" id="cancellinebutton" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>"> <input type="submit" class="button" id="cancellinebutton" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>">
</td> </td>
@ -263,9 +268,9 @@ if (!empty($extrafieldsline))
<?php if (! empty($conf->service->enabled) && $line->product_type == 1 && $dateSelector) { ?> <?php if (! empty($conf->service->enabled) && $line->product_type == 1 && $dateSelector) { ?>
<tr id="service_duration_area" class="treditedlinefordate"> <tr id="service_duration_area" class="treditedlinefordate">
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?> <?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
<td class="linecolnum center"><?php $coldisplay++; ?></td> <td class="linecolnum center"></td>
<?php } ?> <?php } ?>
<td colspan="<?php echo 7+$colspan ?>"><?php echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; ?> <td colspan="<?php echo $coldisplay-1 ?>"><?php echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; ?>
<?php <?php
$hourmin=(isset($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE:''); $hourmin=(isset($conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE)?$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE:'');
print $form->selectDate($line->date_start, 'date_start', $hourmin, $hourmin, $line->date_start?0:1, "updateline", 1, 0); print $form->selectDate($line->date_start, 'date_start', $hourmin, $hourmin, $line->date_start?0:1, "updateline", 1, 0);

View File

@ -237,9 +237,12 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
<td class="linecoldiscount"><?php $coldisplay++; ?>&nbsp;</td> <td class="linecoldiscount"><?php $coldisplay++; ?>&nbsp;</td>
<?php } <?php }
if ($this->situation_cycle_ref) { // Fields for situation invoices
if ($this->situation_cycle_ref)
{
$coldisplay++; $coldisplay++;
print '<td class="linecolcycleref nowrap right">' . $line->situation_percent . '%</td>'; print '<td class="linecolcycleref nowrap right">' . $line->situation_percent . '%</td>';
//print '<td align="right" class="linecolcycleref2 nowrap">' . $line->situation_percent . '</td>';
} }
if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id)) if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id))

View File

@ -2958,7 +2958,7 @@ table.nobottomiftotal tr.liste_total td {
background-color: #fff; background-color: #fff;
border-bottom: 0px !important; border-bottom: 0px !important;
} }
table.nobottom { table.nobottom, td.nobottom {
border-bottom: 0px !important; border-bottom: 0px !important;
} }
div.liste_titre .tagtd { div.liste_titre .tagtd {