2010-09-08 18:09:59 +02:00
< ? php
2018-10-27 14:43:12 +02:00
/* Copyright ( C ) 2010 - 2013 Regis Houssin < regis . houssin @ inodbox . com >
2012-08-23 13:45:51 +02:00
* Copyright ( C ) 2010 - 2011 Laurent Destailleur < eldy @ users . sourceforge . net >
2013-10-30 18:17:37 +01:00
* Copyright ( C ) 2012 - 2013 Christophe Battarel < christophe . battarel @ altairis . fr >
2014-11-14 16:43:49 +01:00
* Copyright ( C ) 2012 Cédric Salvador < csalvador @ gpcsolutions . fr >
* Copyright ( C ) 2012 - 2014 Raphaël Doursenaud < rdoursenaud @ gpcsolutions . fr >
2013-06-10 16:05:41 +02:00
* Copyright ( C ) 2013 Florian Henry < florian . henry @ open - concept . pro >
2017-08-30 14:36:00 +02:00
* Copyright ( C ) 2017 Juanjo Menent < jmenent @ 2 byte . es >
2010-09-08 18:09:59 +02:00
*
* 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
2013-01-16 15:36:08 +01:00
* the Free Software Foundation ; either version 3 of the License , or
2010-09-08 18:09:59 +02:00
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2011-08-01 01:45:11 +02:00
* along with this program . If not , see < http :// www . gnu . org / licenses />.
2010-09-08 18:09:59 +02:00
*
2014-08-30 20:36:53 +02:00
* Need to have following variables defined :
* $object ( invoice , order , ... )
* $conf
* $langs
* $dateSelector
* $forceall ( 0 by default , 1 for supplier invoices / orders )
2015-02-28 03:11:15 +01:00
* $element ( used to test $user -> rights -> $element -> creer )
* $permtoedit ( used to replace test $user -> rights -> $element -> creer )
2014-08-30 20:36:53 +02:00
* $senderissupplier ( 0 by default , 1 for supplier invoices / orders )
* $inputalsopricewithtax ( 0 by default , 1 to also show column with unit price including tax )
2015-02-27 18:05:12 +01:00
* $usemargins ( 0 to disable all margins columns , 1 to show according to margin setup )
2016-04-24 18:55:19 +02:00
* $object_rights -> creer initialized from = $object -> getRights ()
2016-04-26 22:00:41 +02:00
* $disableedit , $disablemove , $disableremove
2017-08-29 20:40:51 +02:00
*
2013-03-22 17:10:17 +01:00
* $type , $text , $description , $line
2010-09-08 18:09:59 +02:00
*/
2014-08-30 20:36:53 +02:00
2017-12-21 13:32:16 +01:00
// Protection to avoid direct call of template
if ( empty ( $object ) || ! is_object ( $object ))
{
print " Error, template page can't be called as URL " ;
exit ;
}
2017-02-15 01:11:25 +01:00
global $forceall , $senderissupplier , $inputalsopricewithtax , $outputalsopricetotalwithtax ;
2015-03-04 17:54:43 +01:00
2014-08-30 20:36:53 +02:00
$usemargins = 0 ;
2015-11-15 18:23:42 +01:00
if ( ! empty ( $conf -> margin -> enabled ) && ! empty ( $object -> element ) && in_array ( $object -> element , array ( 'facture' , 'propal' , 'commande' ))) $usemargins = 1 ;
2014-08-30 20:36:53 +02:00
if ( empty ( $dateSelector )) $dateSelector = 0 ;
if ( empty ( $forceall )) $forceall = 0 ;
if ( empty ( $senderissupplier )) $senderissupplier = 0 ;
if ( empty ( $inputalsopricewithtax )) $inputalsopricewithtax = 0 ;
2016-10-24 10:18:24 +02:00
if ( empty ( $outputalsopricetotalwithtax )) $outputalsopricetotalwithtax = 0 ;
2017-02-15 01:11:25 +01:00
2018-02-20 17:46:32 +01:00
// add html5 elements
$domData = ' data-element="' . $line -> element . '"' ;
$domData .= ' data-id="' . $line -> id . '"' ;
$domData .= ' data-qty="' . $line -> qty . '"' ;
$domData .= ' data-product_type="' . $line -> product_type . '"' ;
2010-09-08 18:09:59 +02:00
?>
2013-06-10 16:05:41 +02:00
< ? php $coldisplay = 0 ; ?>
2012-08-23 13:45:51 +02:00
<!-- BEGIN PHP TEMPLATE objectline_view . tpl . php -->
2018-09-20 16:13:22 +02:00
< tr id = " row-<?php echo $line->id ?> " class = " drag drop oddeven " < ? php echo $domData ; ?> >
2011-12-16 18:31:54 +01:00
< ? php if ( ! empty ( $conf -> global -> MAIN_VIEW_LINE_NUMBER )) { ?>
2015-10-20 16:08:25 +02:00
< td class = " linecolnum " align = " center " >< ? php $coldisplay ++ ; ?> <?php echo ($i+1); ?></td>
2011-12-16 18:31:54 +01:00
< ? php } ?>
2017-04-07 14:18:04 +02:00
< td class = " linecoldescription minwidth300imp " >< ? php $coldisplay ++ ; ?> <div id="line_<?php echo $line->id; ?>"></div>
2017-08-29 20:40:51 +02:00
< ? php
2015-04-18 16:54:00 +02:00
if (( $line -> info_bits & 2 ) == 2 ) {
?>
2010-09-08 18:09:59 +02:00
< a href = " <?php echo DOL_URL_ROOT.'/comm/remx.php?id='. $this->socid ; ?> " >
2011-11-16 18:58:11 +01:00
< ? php
$txt = '' ;
print img_object ( $langs -> trans ( " ShowReduc " ), 'reduc' ) . ' ' ;
if ( $line -> description == '(DEPOSIT)' ) $txt = $langs -> trans ( " Deposit " );
2016-11-25 11:04:42 +01:00
elseif ( $line -> description == '(EXCESS RECEIVED)' ) $txt = $langs -> trans ( " ExcessReceived " );
2018-02-19 15:52:07 +01:00
elseif ( $line -> description == '(EXCESS PAID)' ) $txt = $langs -> trans ( " ExcessPaid " );
2011-11-16 18:58:11 +01:00
//else $txt=$langs->trans("Discount");
print $txt ;
?>
2010-09-08 18:09:59 +02:00
</ a >
2011-11-16 18:58:11 +01:00
< ? php
if ( $line -> description )
{
2017-01-28 12:42:02 +01:00
if ( $line -> description == '(CREDIT_NOTE)' && $line -> fk_remise_except > 0 )
2013-03-22 17:10:17 +01:00
{
$discount = new DiscountAbsolute ( $this -> db );
$discount -> fetch ( $line -> fk_remise_except );
echo ( $txt ? ' - ' : '' ) . $langs -> transnoentities ( " DiscountFromCreditNote " , $discount -> getNomUrl ( 0 ));
}
2017-01-28 12:42:02 +01:00
elseif ( $line -> description == '(DEPOSIT)' && $line -> fk_remise_except > 0 )
2013-03-22 17:10:17 +01:00
{
$discount = new DiscountAbsolute ( $this -> db );
$discount -> fetch ( $line -> fk_remise_except );
echo ( $txt ? ' - ' : '' ) . $langs -> transnoentities ( " DiscountFromDeposit " , $discount -> getNomUrl ( 0 ));
// Add date of deposit
2017-08-29 20:40:51 +02:00
if ( ! empty ( $conf -> global -> INVOICE_ADD_DEPOSIT_DATE ))
2017-01-28 12:42:02 +01:00
echo ' (' . dol_print_date ( $discount -> datec ) . ')' ;
2013-03-22 17:10:17 +01:00
}
2016-11-25 11:04:42 +01:00
elseif ( $line -> description == '(EXCESS RECEIVED)' && $objp -> fk_remise_except > 0 )
{
$discount = new DiscountAbsolute ( $this -> db );
$discount -> fetch ( $line -> fk_remise_except );
echo ( $txt ? ' - ' : '' ) . $langs -> transnoentities ( " DiscountFromExcessReceived " , $discount -> getNomUrl ( 0 ));
}
2018-02-19 15:52:07 +01:00
elseif ( $line -> description == '(EXCESS PAID)' && $objp -> fk_remise_except > 0 )
{
$discount = new DiscountAbsolute ( $this -> db );
$discount -> fetch ( $line -> fk_remise_except );
echo ( $txt ? ' - ' : '' ) . $langs -> transnoentities ( " DiscountFromExcessPaid " , $discount -> getNomUrl ( 0 ));
}
2013-03-22 17:10:17 +01:00
else
{
echo ( $txt ? ' - ' : '' ) . dol_htmlentitiesbr ( $line -> description );
2010-09-08 18:09:59 +02:00
}
2011-11-16 18:58:11 +01:00
}
2013-03-22 17:10:17 +01:00
}
else
{
2016-02-16 15:38:24 +01:00
$format = $conf -> global -> MAIN_USE_HOURMIN_IN_DATE_RANGE ? 'dayhour' : 'day' ;
2017-08-29 20:40:51 +02:00
2016-02-16 15:38:24 +01:00
if ( $line -> fk_product > 0 )
2015-02-27 18:05:12 +01:00
{
2016-03-25 15:24:57 +01:00
echo $form -> textwithtooltip ( $text , $description , 3 , '' , '' , $i , 0 ,( ! empty ( $line -> fk_parent_line ) ? img_picto ( '' , 'rightarrow' ) : '' ));
2015-02-27 18:05:12 +01:00
}
else
{
2013-03-22 17:10:17 +01:00
if ( $type == 1 ) $text = img_object ( $langs -> trans ( 'Service' ), 'service' );
else $text = img_object ( $langs -> trans ( 'Product' ), 'product' );
2012-08-25 15:21:34 +02:00
2013-03-22 17:10:17 +01:00
if ( ! empty ( $line -> label )) {
$text .= ' <strong>' . $line -> label . '</strong>' ;
2016-03-25 15:24:57 +01:00
echo $form -> textwithtooltip ( $text , dol_htmlentitiesbr ( $line -> description ), 3 , '' , '' , $i , 0 ,( ! empty ( $line -> fk_parent_line ) ? img_picto ( '' , 'rightarrow' ) : '' ));
2013-03-22 17:10:17 +01:00
} else {
2013-10-12 11:58:38 +02:00
if ( ! empty ( $line -> fk_parent_line )) echo img_picto ( '' , 'rightarrow' );
2013-03-22 17:10:17 +01:00
echo $text . ' ' . dol_htmlentitiesbr ( $line -> description );
2012-08-23 13:45:51 +02:00
}
2018-03-12 12:27:40 +01:00
}
2013-03-22 17:10:17 +01:00
2018-03-12 12:27:40 +01:00
// Show date range
if ( $line -> element == 'facturedetrec' ) {
2018-03-27 23:01:54 +02:00
if ( $line -> date_start_fill || $line -> date_end_fill ) echo '<br><div class="clearboth nowraponall">' ;
2018-03-12 12:27:40 +01:00
if ( $line -> date_start_fill ) echo $langs -> trans ( 'AutoFillDateFromShort' ) . ': ' . yn ( $line -> date_start_fill );
if ( $line -> date_start_fill && $line -> date_end_fill ) echo ' - ' ;
if ( $line -> date_end_fill ) echo $langs -> trans ( 'AutoFillDateToShort' ) . ': ' . yn ( $line -> date_end_fill );
if ( $line -> date_start_fill || $line -> date_end_fill ) echo '</div>' ;
}
else {
2018-04-14 23:24:01 +02:00
if ( $line -> date_start || $line -> date_end ) echo '<br><div class="clearboth nowraponall">' . get_date_range ( $line -> date_start , $line -> date_end , $format ) . '</div>' ;
2018-03-27 23:01:54 +02:00
//echo get_date_range($line->date_start, $line->date_end, $format);
2018-03-12 12:27:40 +01:00
}
2013-03-22 17:10:17 +01:00
2018-03-12 12:27:40 +01:00
// Add description in form
if ( $line -> fk_product > 0 && ! empty ( $conf -> global -> PRODUIT_DESC_IN_FORM ))
{
print ( ! empty ( $line -> description ) && $line -> description != $line -> product_label ) ? '<br>' . dol_htmlentitiesbr ( $line -> description ) : '' ;
2011-11-16 18:58:11 +01:00
}
2013-03-22 17:10:17 +01:00
}
2018-03-19 12:30:48 +01:00
2018-03-19 12:13:18 +01:00
if ( ! empty ( $conf -> accounting -> enabled ) && $line -> fk_accounting_account > 0 )
{
$accountingaccount = new AccountingAccount ( $this -> db );
$accountingaccount -> fetch ( $line -> fk_accounting_account );
2018-03-19 12:30:48 +01:00
echo '<div class="clearboth"></div><br><span class="opacitymedium">' . $langs -> trans ( 'AccountingAffectation' ) . ' : </span>' . $accountingaccount -> getNomUrl ( 0 , 1 , 1 );
2018-03-19 12:13:18 +01:00
}
2018-03-19 12:30:48 +01:00
2013-03-22 17:10:17 +01:00
?>
2010-09-08 18:09:59 +02:00
</ td >
2017-11-12 15:30:21 +01:00
< ? php
if ( $object -> element == 'supplier_proposal' || $object -> element == 'order_supplier' || $object -> element == 'invoice_supplier' ) // We must have same test in printObjectLines
{
?>
< td class = " linecolrefsupplier " >< ? php
echo ( $line -> ref_fourn ? $line -> ref_fourn : $line -> ref_supplier );
?> </td>
< ? php
}
2016-10-29 21:02:08 +02:00
// VAT Rate
?>
2017-08-29 20:40:51 +02:00
< td align = " right " class = " linecolvat nowrap " >< ? php $coldisplay ++ ; ?> <?php
$positiverates = '' ;
2017-09-25 21:41:53 +02:00
if ( price2num ( $line -> tva_tx )) $positiverates .= ( $positiverates ? '/' : '' ) . price2num ( $line -> tva_tx );
2017-08-30 14:36:00 +02:00
if ( price2num ( $line -> total_localtax1 )) $positiverates .= ( $positiverates ? '/' : '' ) . price2num ( $line -> localtax1_tx );
2017-08-30 16:43:57 +02:00
if ( price2num ( $line -> total_localtax2 )) $positiverates .= ( $positiverates ? '/' : '' ) . price2num ( $line -> localtax2_tx );
2017-08-29 20:40:51 +02:00
if ( empty ( $positiverates )) $positiverates = '0' ;
echo vatrate ( $positiverates . ( $line -> vat_src_code ? ' (' . $line -> vat_src_code . ')' : '' ), '%' , $line -> info_bits );
//echo vatrate($line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), '%', $line->info_bits);
?> </td>
2010-09-18 16:44:57 +02:00
2015-10-20 16:08:25 +02:00
< td align = " right " class = " linecoluht nowrap " >< ? php $coldisplay ++ ; ?> <?php echo price($line->subprice); ?></td>
2017-08-29 20:40:51 +02:00
2018-05-02 11:30:35 +02:00
< ? php if ( ! empty ( $conf -> multicurrency -> enabled ) && $this -> multicurrency_code != $conf -> currency ) { ?>
2016-01-18 19:45:27 +01:00
< td align = " right " class = " linecoluht_currency nowrap " >< ? php $coldisplay ++ ; ?> <?php echo price($line->multicurrency_subprice); ?></td>
< ? php } ?>
2017-08-29 20:40:51 +02:00
2014-08-30 20:36:53 +02:00
< ? php if ( $inputalsopricewithtax ) { ?>
2015-10-20 16:08:25 +02:00
< td align = " right " class = " linecoluttc nowrap " >< ? php $coldisplay ++ ; ?> <?php echo (isset($line->pu_ttc)?price($line->pu_ttc):price($line->subprice)); ?></td>
2012-08-27 19:11:44 +02:00
< ? php } ?>
2012-08-22 17:42:40 +02:00
2015-10-20 16:08:25 +02:00
< td align = " right " class = " linecolqty nowrap " >< ? php $coldisplay ++ ; ?>
2012-10-04 16:26:33 +02:00
< ? php if ((( $line -> info_bits & 2 ) != 2 ) && $line -> special_code != 3 ) {
2012-10-06 23:13:46 +02:00
// I comment this because it shows info even when not required
// for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated
// must also not be output for most entities (proposal, intervention, ...)
//if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." ";
2012-10-04 16:26:33 +02:00
echo $line -> qty ;
} else echo ' ' ; ?>
2010-09-08 18:09:59 +02:00
</ td >
2010-09-18 16:44:57 +02:00
2015-02-26 14:15:33 +01:00
< ? php
if ( $conf -> global -> PRODUCT_USE_UNITS )
{
2015-10-20 16:08:25 +02:00
print '<td align="left" class="linecoluseunit nowrap">' ;
2015-04-21 15:49:58 +02:00
$label = $line -> getLabelOfUnit ( 'short' );
2015-02-26 14:15:33 +01:00
if ( $label !== '' ) {
print $langs -> trans ( $label );
}
print '</td>' ;
}
?>
2010-09-08 18:09:59 +02:00
< ? php if ( ! empty ( $line -> remise_percent ) && $line -> special_code != 3 ) { ?>
2015-10-20 16:08:25 +02:00
< td class = " linecoldiscount " align = " right " >< ? php
2015-02-28 18:10:31 +01:00
$coldisplay ++ ;
include_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php' ;
echo dol_print_reduction ( $line -> remise_percent , $langs );
?> </td>
2010-09-08 18:09:59 +02:00
< ? php } else { ?>
2015-10-20 16:08:25 +02:00
< td class = " linecoldiscount " >< ? php $coldisplay ++ ; ?> </td>
2012-08-22 17:42:40 +02:00
< ? php }
2012-07-18 15:52:15 +02:00
2014-11-14 16:43:49 +01:00
if ( $this -> situation_cycle_ref ) {
$coldisplay ++ ;
2015-10-20 16:08:25 +02:00
print '<td align="right" class="linecolcycleref nowrap">' . $line -> situation_percent . '%</td>' ;
2014-11-14 16:43:49 +01:00
}
2015-02-28 18:10:31 +01:00
if ( $usemargins && ! empty ( $conf -> margin -> enabled ) && empty ( $user -> societe_id ))
2015-02-27 18:05:12 +01:00
{
$rounding = min ( $conf -> global -> MAIN_MAX_DECIMALS_UNIT , $conf -> global -> MAIN_MAX_DECIMALS_TOT );
?>
2017-08-29 20:40:51 +02:00
2016-12-15 12:01:46 +01:00
< ? php if ( ! empty ( $user -> rights -> margins -> creer )) { ?>
2015-10-20 16:08:25 +02:00
< td align = " right " class = " linecolmargin1 nowrap margininfos " >< ? php $coldisplay ++ ; ?> <?php echo price($line->pa_ht); ?></td>
2016-12-15 12:01:46 +01:00
< ? php } ?>
2015-02-27 18:05:12 +01:00
< ? php if ( ! empty ( $conf -> global -> DISPLAY_MARGIN_RATES ) && $user -> rights -> margins -> liretous ) { ?>
2015-10-20 16:08:25 +02:00
< td align = " right " class = " linecolmargin2 nowrap margininfos " >< ? php $coldisplay ++ ; ?> <?php echo (($line->pa_ht == 0)?'n/a':price($line->marge_tx, null, null, null, null, $rounding).'%'); ?></td>
2015-02-27 18:05:12 +01:00
< ? php }
if ( ! empty ( $conf -> global -> DISPLAY_MARK_RATES ) && $user -> rights -> margins -> liretous ) { ?>
2015-10-20 16:08:25 +02:00
< td align = " right " class = " linecolmargin2 nowrap margininfos " >< ? php $coldisplay ++ ; ?> <?php echo price($line->marque_tx, null, null, null, null, $rounding).'%'; ?></td>
2015-02-27 18:05:12 +01:00
< ? php }
}
?>
2010-09-18 16:44:57 +02:00
2010-09-08 18:09:59 +02:00
< ? php if ( $line -> special_code == 3 ) { ?>
2015-10-20 16:08:25 +02:00
< td align = " right " class = " linecoloption nowrap " >< ? php $coldisplay ++ ; ?> <?php echo $langs->trans('Option'); ?></td>
2010-09-08 18:09:59 +02:00
< ? php } else { ?>
2018-09-11 17:56:11 +02:00
< td align = " right " class = " linecolht nowrap " >< ? php $coldisplay ++ ; ?> <?php echo price($line->total_ht); ?></td>
2018-05-02 11:30:35 +02:00
< ? php if ( ! empty ( $conf -> multicurrency -> enabled ) && $this -> multicurrency_code != $conf -> currency ) { ?>
2016-01-18 19:45:27 +01:00
< td align = " right " class = " linecolutotalht_currency nowrap " >< ? php $coldisplay ++ ; ?> <?php echo price($line->multicurrency_total_ht); ?></td>
< ? php } ?>
2010-09-08 18:09:59 +02:00
< ? php } ?>
2016-10-24 10:18:24 +02:00
< ? php if ( $outputalsopricetotalwithtax ) { ?>
2018-09-11 17:56:11 +02:00
< td align = " right " class = " linecolht nowrap " >< ? php $coldisplay ++ ; ?> <?php echo price($line->total_ttc); ?></td>
2016-10-12 12:30:22 +02:00
< ? php } ?>
2010-09-08 18:09:59 +02:00
2017-08-29 20:40:51 +02:00
< ? php
2018-02-21 17:06:40 +01:00
if ( $this -> statut == 0 && ( $object_rights -> creer ) && $action != 'selectlines' ) { ?>
2015-10-20 16:08:25 +02:00
< td class = " linecoledit " align = " center " >< ? php $coldisplay ++ ; ?>
2016-04-24 18:55:19 +02:00
< ? php if (( $line -> info_bits & 2 ) == 2 || ! empty ( $disableedit )) { ?>
2010-09-08 18:09:59 +02:00
< ? php } else { ?>
2015-03-23 01:17:43 +01:00
< a href = " <?php echo $_SERVER["PHP_SELF"] .'?id='. $this->id .'&action=editline&lineid='. $line->id .'#line_'. $line->id ; ?> " >
2010-09-08 18:09:59 +02:00
< ? php echo img_edit (); ?>
</ a >
< ? php } ?>
</ td >
2010-09-18 16:44:57 +02:00
2015-10-20 16:08:25 +02:00
< td class = " linecoldelete " align = " center " >< ? php $coldisplay ++ ; ?>
2014-11-14 16:43:49 +01:00
< ? php
2016-04-26 22:00:41 +02:00
if (( $this -> situation_counter == 1 || ! $this -> situation_cycle_ref ) && empty ( $disableremove )) {
2014-11-14 16:43:49 +01:00
print '<a href="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $this -> id . '&action=ask_deleteline&lineid=' . $line -> id . '">' ;
print img_delete ();
print '</a>' ;
}
?>
2010-09-08 18:09:59 +02:00
</ td >
2010-09-18 16:44:57 +02:00
2017-08-29 20:40:51 +02:00
< ? php
2018-09-02 16:45:03 +02:00
if ( $num > 1 && $conf -> browser -> layout != 'phone' && ( $this -> situation_counter == 1 || ! $this -> situation_cycle_ref ) && empty ( $disablemove )) { ?>
2015-10-20 16:08:25 +02:00
< td align = " center " class = " linecolmove tdlineupdown " >< ? php $coldisplay ++ ; ?>
2010-09-08 18:09:59 +02:00
< ? php if ( $i > 0 ) { ?>
2010-09-18 17:00:40 +02:00
< a class = " lineupdown " href = " <?php echo $_SERVER["PHP_SELF"] .'?id='. $this->id .'&action=up&rowid='. $line->id ; ?> " >
2015-03-22 21:18:25 +01:00
< ? php echo img_up ( 'default' , 0 , 'imgupforline' ); ?>
2010-09-08 18:09:59 +02:00
</ a >
< ? php } ?>
< ? php if ( $i < $num - 1 ) { ?>
2010-09-18 17:00:40 +02:00
< a class = " lineupdown " href = " <?php echo $_SERVER["PHP_SELF"] .'?id='. $this->id .'&action=down&rowid='. $line->id ; ?> " >
2015-03-22 21:18:25 +01:00
< ? php echo img_down ( 'default' , 0 , 'imgdownforline' ); ?>
2010-09-08 18:09:59 +02:00
</ a >
< ? php } ?>
</ td >
2010-10-02 22:47:55 +02:00
< ? php } else { ?>
2018-09-02 16:45:03 +02:00
< td align = " center " < ? php echo (( $conf -> browser -> layout != 'phone' && empty ( $disablemove )) ? ' class="linecolmove tdlineupdown"' : ' class="linecolmove"' ); ?> ><?php $coldisplay++; ?></td>
2010-09-08 18:09:59 +02:00
< ? php } ?>
< ? php } else { ?>
2013-06-10 16:05:41 +02:00
< td colspan = " 3 " >< ? php $coldisplay = $coldisplay + 3 ; ?> </td>
2010-09-08 18:09:59 +02:00
< ? php } ?>
2018-02-21 17:06:40 +01:00
< ? php if ( $action == 'selectlines' ){ ?>
2018-02-23 09:23:50 +01:00
< td class = " linecolcheck " align = " center " >< input type = " checkbox " class = " linecheckbox " name = " line_checkbox[<?php echo $i +1; ?>] " value = " <?php echo $line->id ; ?> " ></ td >
2018-02-21 17:06:40 +01:00
< ? php } ?>
2010-09-08 18:09:59 +02:00
2018-03-20 10:10:21 +01:00
</ tr >
2013-06-10 16:05:41 +02:00
< ? php
//Line extrafield
2014-09-23 19:37:59 +02:00
if ( ! empty ( $extrafieldsline ))
{
2018-08-07 10:44:26 +02:00
print $line -> showOptionals ( $extrafieldsline , 'view' , array ( 'style' => 'class="drag drop oddeven"' , 'colspan' => $coldisplay ), '' , '' , empty ( $conf -> global -> MAIN_EXTRAFIELDS_IN_ONE_TD ) ? 0 : 1 );
2013-06-10 16:05:41 +02:00
}
?>
2012-08-23 13:45:51 +02:00
<!-- END PHP TEMPLATE objectline_view . tpl . php -->