37@phan-var-force CommonObjectLine|CommonInvoiceLine|CommonOrderLine|ExpeditionLigne|PropaleLigne $line
38@phan-var-force CommonObject $this
39@phan-var-force Propal|Contrat|Commande|Facture|Expedition|Delivery|FactureFournisseur|FactureFournisseur|SupplierProposal $object
40@phan-var-force int $num
43echo
"<!-- BEGIN PHP TEMPLATE subtotal_view.tpl.php -->\n";
45$langs->load(
'subtotals');
47$line_options = $line->extraparams[
"subtotal"] ?? array();
49$line_color = $this->getSubtotalColors($line->qty);
51echo
'<tr data-level="' . $line->qty .
'" data-desc="' . $line->desc .
'" data-rang="' . $line->rang .
'" id="row-' . $line->id .
'" class="drag drop" style="background:#' . $line_color .
'">';
55 echo
'<td class="linecolnum center"><span class="opacitymedium">' . ($i + 1) .
'</span></td>';
58if ($line->qty > 0) { ?>
59 <td
class=
"linecollabel" <?php echo !
colorIsLight($line_color) ?
' style="color: white"' :
' style="color: black"' ?>><?php echo str_repeat(
' ', (
int) ($line->qty - 1) * 8); ?>
62 if (array_key_exists(
'titleshowuponpdf', $line_options)) {
63 echo
' ' .
img_picto($langs->trans(
"ShowUPOnPDF"),
'invoicing');
65 if (array_key_exists(
'titleshowtotalexludingvatonpdf', $line_options)) {
66 echo
' <span title="' . $langs->trans(
"ShowTotalExludingVATOnPDF") .
'">%</span>';
68 if (array_key_exists(
'titleforcepagebreak', $line_options)) {
69 echo
' ' .
img_picto($langs->trans(
"ForcePageBreak"),
'file');
73 <td
class=
"linecolvat nowrap right">
76 if (
GETPOST(
'mode',
'aZ09') ==
'vatforblocklines' &&
GETPOSTINT(
'lineid') == $line->id) {
77 $type_tva = $type_tva ?? 0;
78 print
'<div class="inline-block nowraponall">';
79 print $form->load_tva(
'vatforblocklines',
'', $mysoc,
$object->thirdparty, 0, $line->info_bits, $line->product_type,
false, 1, $type_tva);
80 print
'<input type="hidden" name="lineid" value="' . $line->id .
'">';
81 print
'<input class="inline-block button smallpaddingimp" type="submit" name="updateallvatlinesblock" value="' . $langs->trans(
"Update") .
'">';
84 print
'<a class="reposition" href="' . $_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'&mode=vatforblocklines&lineid=' . $line->id .
'">';
86 echo
img_edit($langs->trans(
"ApplyVATForBlock"), 0,
'style="color: white"');
88 echo
img_edit($langs->trans(
"ApplyVATForBlock"), 0,
'style="color: #666"');
95 <td
class=
"linecoluht"></td>
97 if (isModEnabled(
"multicurrency") && $this->multicurrency_code !=
$conf->currency) {
98 print
'<td class="linecoluht_currency"></td>';
102 print
'<td class="linecoluttc"></td>';
105 print
'<td class="linecolqty"></td>';
109 print
'<td class="linecoluseunit"></td>';
112 <td
class=
"linecoldiscount right">
114 if ($this->
status == 0 &&
$object->element !=
'facturerec') {
115 if (
GETPOST(
'mode',
'aZ09') ==
'discountforblocklines' &&
GETPOSTINT(
'lineid') == $line->id) {
116 print
'<div class="inline-block nowraponall">';
117 print
'<input type="text" class="flat right width40" name="discountforblocklines" id="discountforblocklines" value="0"><span class="hideonsmartphone"';
119 print
'style="color: white"';
121 print
'style="color: black"';
124 print
'<input type="hidden" name="lineid" value="' . $line->id .
'">';
125 print
'<input class="inline-block button smallpaddingimp" type="submit" name="updatealldiscountlinesblock" value="' . $langs->trans(
"Update") .
'">';
128 print
'<a class="reposition" href="' . $_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'&mode=discountforblocklines&lineid=' . $line->id .
'">';
130 echo
img_edit($langs->trans(
"ApplyDiscountForBlock"), 0,
'style="color: white"');
132 echo
img_edit($langs->trans(
"ApplyDiscountForBlock"), 0,
'style="color: #666"');
141 if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
142 print
'<td class="linecolcycleref nowrap right"></td>';
144 print
'<td class="nowrap right"></td>';
146 print
'<td class="linecolcycleref2 right nowrap"></td>';
150 if (!empty(
$object->element) && in_array(
$object->element, array(
'facture',
'facturerec',
'propal',
'commande')) && isModEnabled(
'margin') && empty($user->socid)) {
151 if ($user->hasRight(
'margins',
'creer')) {
152 print
'<td class="linecolmargin1"></td>';
154 if (
getDolGlobalString(
'DISPLAY_MARGIN_RATES') && $user->hasRight(
'margins',
'liretous')) {
155 print
'<td class="linecolmargin2"></td>';
157 if (
getDolGlobalString(
'DISPLAY_MARK_RATES') && $user->hasRight(
'margins',
'liretous')) {
158 print
'<td class="linecolmark1"></td>';
162 <td
class=
"linecolht"></td>
163 <?php
if (isModEnabled(
"multicurrency") && $this->multicurrency_code !=
$conf->currency) { ?>
164 <td
class=
"linecoltotalht_currency"></td>
166<?php } elseif ($line->qty < 0) {
170 if (isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
178 if (!empty(
$object->element) && in_array(
$object->element, array(
'facture',
'facturerec',
'propal',
'commande')) && isModEnabled(
'margin') && empty($user->socid)) {
179 if ($user->hasRight(
'margins',
'creer')) {
182 if (
getDolGlobalString(
'DISPLAY_MARGIN_RATES') && $user->hasRight(
'margins',
'liretous')) {
185 if (
getDolGlobalString(
'DISPLAY_MARK_RATES') && $user->hasRight(
'margins',
'liretous')) {
191 if (isModEnabled(
'multicurrency') &&
$object->multicurrency_code !=
$conf->currency) {
205 <td
class=
"linecollabel nowrap right" <?php echo !
colorIsLight($line_color) ?
' style="color: white"' :
' style="color: black"' ?> colspan=
"<?php echo $colspan + 2 ?>">
208 if (array_key_exists(
'subtotalshowtotalexludingvatonpdf', $line_options)) {
209 echo
' <span title="' . $langs->trans(
"ShowTotalExludingVATOnPDF") .
'">%</span>';
214 <td
class=
"linecolamount nowrap right" <?php echo !
colorIsLight($line_color) ?
' style="color: white"' :
' style="color: black"' ?>>
216 echo $this->getSubtotalLineAmount($line);
220 if (isModEnabled(
'multicurrency') &&
$object->multicurrency_code !=
$conf->currency) {
221 echo
'<td class="linecolamount nowrap right"';
222 echo !
colorIsLight($line_color) ?
' style="color: white"' :
' style="color: black"';
224 echo $this->getSubtotalLineMulticurrencyAmount($line);
232 echo
'<td class="linecoledit center">';
233 echo
'<a class="reposition" href="' . $_SERVER[
"PHP_SELF"] .
'?id=' . $this->
id .
'&action=editline&token=' .
newToken() .
'&lineid=' . $line->id .
'">';
235 echo
img_edit(
'default', 0,
'style="color: white"');
237 echo
img_edit(
'default', 0,
'style="color: #666"');
242 echo
'<td class="linecoldelete center">';
243 echo
'<a class="reposition" href="' . $_SERVER[
"PHP_SELF"] .
'?id=' . $this->
id .
'&action=ask_subtotal_deleteline&token=' .
newToken() .
'&lineid=' . $line->id;
244 if ($line->qty > 0) {
249 echo
img_delete(
'default',
'class="pictodelete" style="color: white"');
251 echo
img_delete(
'default',
'class="pictodelete" style="color: #666"');
256 if ($num > 1 &&
$conf->browser->layout !=
'phone' && ((property_exists($this,
'situation_counter') && $this->situation_counter == 1) || empty($this->situation_cycle_ref)) && empty($disablemove)) {
257 echo
'<td class="linecolmove tdlineupdown center"';
259 echo
'data-gripimg="grip_title.png"';
263 echo
'<a class="lineupdown" href="' . $_SERVER[
"PHP_SELF"] .
'?id=' . $this->
id .
'&action=up&token=' .
newToken() .
'&rowid=' . $line->id .
'">';
264 echo
img_up(
'default', 0,
'imgupforline');
268 echo
'<a class="lineupdown" href="' . $_SERVER[
"PHP_SELF"] .
'?id=' . $this->
id .
'&action=down&token=' .
newToken() .
'&rowid=' . $line->id .
'">';
269 echo
img_down(
'default', 0,
'imgdownforline');
274 echo
'<td ' . ((
$conf->browser->layout !=
'phone' && empty($disablemove)) ?
' class="linecolmove tdlineupdown center"' :
' class="linecolmove center"') .
'></td>';
278 if (isModEnabled(
'asset') &&
$object->element ==
'invoice_supplier') {
281 print
'<td colspan="' . $colspan .
'"></td>';
284if ($action ==
'selectlines') { ?>
285 <td
class=
"linecolcheck center"><input
type=
"checkbox" class=
"linecheckbox" name=
"line_checkbox[<?php print $i + 1; ?>]" value=
"<?php print $line->id; ?>" ></td>
289echo
'<!-- END PHP TEMPLATE subtotal_view.tpl.php -->';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
print $langs trans("Ref").' m titre as m m statut as status
Or an array listing all the potential status of the object: array: int of the status => translated la...
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
img_delete($titlealt='default', $other='class="pictodelete"', $morecss='')
Show delete logo.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
img_down($titlealt='default', $selected=0, $moreclass='')
Show down arrow logo.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
colorIsLight($stringcolor)
Return true if the color is light.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
img_up($titlealt='default', $selected=0, $moreclass='')
Show top arrow logo.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
if(preg_match('/(crypted|dolcrypt):/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
$conf db name
Only used if Module[ID]Name translation string is not found.