38@phan-var-force CommonObjectLine|CommonInvoiceLine|CommonOrderLine|ExpeditionLigne|PropaleLigne $line
39@phan-var-force Propal|Contrat|Commande|Facture|Expedition|Delivery|CommandeFournisseur|FactureFournisseur|SupplierProposal $this
40@phan-var-force Propal|Contrat|Commande|Facture|Expedition|Delivery|CommandeFournisseur|FactureFournisseur|SupplierProposal $object
41@phan-var-force int $num
44global $inputalsopricewithtax;
46if (empty($inputalsopricewithtax)) {
47 $inputalsopricewithtax = 0;
50echo
"<!-- BEGIN PHP TEMPLATE subtotal_view.tpl.php -->\n";
52$langs->load(
'subtotals');
54$line_options = $line->extraparams[
"subtotal"] ?? array();
56$line_color = $this->getSubtotalColors($line->qty);
58echo
'<tr data-level="' . $line->qty .
'" data-desc="' . $line->desc .
'" data-rang="' . $line->rang .
'" id="row-' . $line->id .
'" class="drag drop" style="background:#' . $line_color .
'">';
62 echo
'<td class="linecolnum center"><span class="opacitymedium">' . ($i + 1) .
'</span></td>';
65if ($line->qty > 0) { ?>
66 <td
class=
"linecollabel" <?php echo !
colorIsLight($line_color) ?
' style="color: white"' :
' style="color: black"' ?>><?php echo str_repeat(
' ', (
int) ($line->qty - 1) * 8); ?>
69 if (array_key_exists(
'titleshowuponpdf', $line_options)) {
70 echo
' ' .
img_picto($langs->trans(
"ShowUPOnPDF"),
'invoicing');
72 if (array_key_exists(
'titleshowtotalexludingvatonpdf', $line_options)) {
73 echo
' <span title="' . $langs->trans(
"ShowTotalExludingVATOnPDF") .
'">%</span>';
75 if (array_key_exists(
'titleforcepagebreak', $line_options)) {
76 echo
' ' .
img_picto($langs->trans(
"ForcePageBreak"),
'file');
80 <td
class=
"linecolvat nowrap right">
83 if (
GETPOST(
'mode',
'aZ09') ==
'vatforblocklines' &&
GETPOSTINT(
'lineid') == $line->id) {
84 $type_tva = $type_tva ?? 0;
85 print
'<div class="inline-block nowraponall">';
86 print $form->load_tva(
'vatforblocklines',
'',
$mysoc,
$object->thirdparty, 0, (
int) $line->info_bits, $line->product_type,
false, 1, $type_tva);
87 print
'<input type="hidden" name="lineid" value="' . $line->id .
'">';
88 print
'<input class="inline-block button smallpaddingimp" type="submit" name="updateallvatlinesblock" value="' . $langs->trans(
"Update") .
'">';
91 print
'<a class="reposition" href="' . $_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'&mode=vatforblocklines&lineid=' . $line->id .
'">';
93 echo
img_edit($langs->trans(
"ApplyVATForBlock"), 0,
'style="color: white"');
95 echo
img_edit($langs->trans(
"ApplyVATForBlock"), 0,
'style="color: #666"');
102 <td
class=
"linecoluht"></td>
104 if (
isModEnabled(
"multicurrency") && $this->multicurrency_code && $this->multicurrency_code != $conf->currency) {
105 print
'<td class="linecoluht_currency"></td>';
108 if (!empty($inputalsopricewithtax) && !
getDolGlobalInt(
'MAIN_NO_INPUT_PRICE_WITH_TAX')) {
109 print
'<td class="linecoluttc"></td>';
111 if (
isModEnabled(
"multicurrency") && $this->multicurrency_code && $this->multicurrency_code != $conf->currency && !empty($inputalsopricewithtax) && !
getDolGlobalInt(
'MAIN_NO_INPUT_PRICE_WITH_TAX')) {
112 print
'<td class="linecoluttc_currency"></td>';
115 print
'<td class="linecolqty"></td>';
119 print
'<td class="linecoluseunit"></td>';
122 <td
class=
"linecoldiscount right">
124 if ($this->
status == 0 &&
$object->element !=
'facturerec') {
125 if (
GETPOST(
'mode',
'aZ09') ==
'discountforblocklines' &&
GETPOSTINT(
'lineid') == $line->id) {
126 print
'<div class="inline-block nowraponall">';
127 print
'<input type="text" class="flat right width40" name="discountforblocklines" id="discountforblocklines" value="0"><span class="hideonsmartphone"';
129 print
'style="color: white"';
131 print
'style="color: black"';
134 print
'<input type="hidden" name="lineid" value="' . $line->id .
'">';
135 print
'<input class="inline-block button smallpaddingimp" type="submit" name="updatealldiscountlinesblock" value="' . $langs->trans(
"Update") .
'">';
138 print
'<a class="reposition" href="' . $_SERVER[
"PHP_SELF"] .
'?id=' .
$object->id .
'&mode=discountforblocklines&lineid=' . $line->id .
'">';
140 echo
img_edit($langs->trans(
"ApplyDiscountForBlock"), 0,
'style="color: white"');
142 echo
img_edit($langs->trans(
"ApplyDiscountForBlock"), 0,
'style="color: #666"');
151 if (property_exists($this,
'situation_cycle_ref') && isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
152 print
'<td class="linecolcycleref nowrap right"></td>';
154 print
'<td class="nowrap right"></td>';
156 print
'<td class="linecolcycleref2 right nowrap"></td>';
160 if (!empty(
$object->element) && in_array(
$object->element, array(
'facture',
'facturerec',
'propal',
'commande')) &&
isModEnabled(
'margin') && empty($user->socid)) {
161 if ($user->hasRight(
'margins',
'creer')) {
162 print
'<td class="linecolmargin1 nowrap margininfos right"></td>';
164 if (
getDolGlobalString(
'DISPLAY_MARGIN_RATES') && $user->hasRight(
'margins',
'liretous')) {
165 print
'<td class="linecolmargin2 nowrap margininfos right"></td>';
167 if (
getDolGlobalString(
'DISPLAY_MARK_RATES') && $user->hasRight(
'margins',
'liretous')) {
168 print
'<td class="linecolmark1 nowrap margininfos right"></td>';
172 <td
class=
"linecolht"></td>
173 <?php
if (
isModEnabled(
"multicurrency") && $this->multicurrency_code && $this->multicurrency_code != $conf->currency) { ?>
174 <td
class=
"linecoltotalht_currency"></td>
176<?php } elseif ($line->qty < 0) {
180 if (
isModEnabled(
"multicurrency") && $this->multicurrency_code && $this->multicurrency_code != $conf->currency) {
184 if (!empty($inputalsopricewithtax) && !
getDolGlobalInt(
'MAIN_NO_INPUT_PRICE_WITH_TAX')) {
187 if (
isModEnabled(
"multicurrency") && $this->multicurrency_code && $this->multicurrency_code != $conf->currency && !empty($inputalsopricewithtax) && !
getDolGlobalInt(
'MAIN_NO_INPUT_PRICE_WITH_TAX')) {
191 if (property_exists($this,
'situation_cycle_ref') && isset($this->situation_cycle_ref) && $this->situation_cycle_ref) {
199 if (!empty(
$object->element) && in_array(
$object->element, array(
'facture',
'facturerec',
'propal',
'commande')) &&
isModEnabled(
'margin') && empty($user->socid)) {
200 if ($user->hasRight(
'margins',
'creer')) {
203 if (
getDolGlobalString(
'DISPLAY_MARGIN_RATES') && $user->hasRight(
'margins',
'liretous')) {
206 if (
getDolGlobalString(
'DISPLAY_MARK_RATES') && $user->hasRight(
'margins',
'liretous')) {
216 <td
class=
"linecollabel nowrap right" <?php echo !
colorIsLight($line_color) ?
' style="color: white"' :
' style="color: black"' ?> colspan=
"<?php echo $colspan + 2 ?>">
219 if (array_key_exists(
'subtotalshowtotalexludingvatonpdf', $line_options)) {
220 echo
' <span title="' . $langs->trans(
"ShowTotalExludingVATOnPDF") .
'">%</span>';
225 <td
class=
"linecolamount nowrap right" <?php echo !
colorIsLight($line_color) ?
' style="color: white"' :
' style="color: black"' ?>>
227 echo $this->getSubtotalLineAmount($line);
232 echo
'<td class="linecolamount nowrap right"';
233 echo !
colorIsLight($line_color) ?
' style="color: white"' :
' style="color: black"';
235 echo $this->getSubtotalLineMulticurrencyAmount($line);
243 echo
'<td class="linecoledit center">';
244 echo
'<a class="reposition" href="' . $_SERVER[
"PHP_SELF"] .
'?id=' . $this->
id .
'&action=editline&token=' .
newToken() .
'&lineid=' . $line->id .
'">';
246 echo
img_edit(
'default', 0,
'style="color: white"');
248 echo
img_edit(
'default', 0,
'style="color: #666"');
253 echo
'<td class="linecoldelete center">';
254 echo
'<a class="reposition" href="' . $_SERVER[
"PHP_SELF"] .
'?id=' . $this->
id .
'&action=ask_subtotal_deleteline&token=' .
newToken() .
'&lineid=' . $line->id;
255 if ($line->qty > 0) {
260 echo
img_delete(
'default',
'class="pictodelete" style="color: white"');
262 echo
img_delete(
'default',
'class="pictodelete" style="color: #666"');
267 if ($num > 1 && $conf->browser->layout !=
'phone' && ((property_exists($this,
'situation_counter') && $this->situation_counter == 1) || (property_exists($this,
'situation_cycle_ref') && empty($this->situation_cycle_ref))) && empty($disablemove)) {
268 echo
'<td class="linecolmove tdlineupdown center"';
270 echo
'data-gripimg="grip_title.png"';
274 echo
'<a class="lineupdown" href="' . $_SERVER[
"PHP_SELF"] .
'?id=' . $this->
id .
'&action=up&token=' .
newToken() .
'&rowid=' . $line->id .
'">';
275 echo
img_up(
'default', 0,
'imgupforline');
279 echo
'<a class="lineupdown" href="' . $_SERVER[
"PHP_SELF"] .
'?id=' . $this->
id .
'&action=down&token=' .
newToken() .
'&rowid=' . $line->id .
'">';
280 echo
img_down(
'default', 0,
'imgdownforline');
285 echo
'<td ' . (($conf->browser->layout !=
'phone' && empty($disablemove)) ?
' class="linecolmove tdlineupdown center"' :
' class="linecolmove center"') .
'></td>';
292 print
'<td colspan="' . $colspan .
'"></td>';
295if ($action ==
'selectlines') { ?>
296 <td
class=
"linecolcheck center"><input
type=
"checkbox" class=
"linecheckbox" name=
"line_checkbox[<?php print $i + 1; ?>]" value=
"<?php print $line->id; ?>" ></td>
300echo
'<!-- END PHP TEMPLATE subtotal_view.tpl.php -->';
if(! $sortfield) if(! $sortorder) $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.
isModEnabled($module)
Is Dolibarr module enabled.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
img_up($titlealt='default', $selected=0, $moreclass='')
Show top arrow logo.
if(preg_match('/(crypted|dolcrypt):/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',...
$conf db name
Only used if Module[ID]Name translation string is not found.