33@phan-var-force Propal|Contrat|Commande|Facture|Expedition|Delivery|CommandeFournisseur|FactureFournisseur|SupplierProposal|Fichinter $object
34@phan-var-force CommonObjectLine|CommonInvoiceLine|CommonOrderLine|ExpeditionLigne|PropaleLigne|FichinterLigne $line
39$sub_options = $line->extraparams[
"subtotal"] ?? array();
41$titleshowuponpdf = !empty($sub_options[
'titleshowuponpdf']);
42$titleshowtotalexludingvatonpdf = !empty($sub_options[
'titleshowtotalexludingvatonpdf']);
43$titleforcepagebreak = !empty($sub_options[
'titleforcepagebreak']);
44$subtotalshowtotalexludingvatonpdf = !empty($sub_options[
'subtotalshowtotalexludingvatonpdf']);
47 'titleshowuponpdf' => array(
'type' => array(
'title'),
'value' =>
'on',
'checked' => $titleshowuponpdf,
'trans_key' =>
'ShowUPOnPDF'),
48 'titleshowtotalexludingvatonpdf' => array(
'type' => array(
'title'),
'value' =>
'on',
'checked' => $titleshowtotalexludingvatonpdf,
'trans_key' =>
'ShowTotalExludingVATOnPDF'),
49 'titleforcepagebreak' => array(
'type' => array(
'title'),
'value' =>
'on',
'checked' => $titleforcepagebreak,
'trans_key' =>
'ForcePageBreak'),
50 'subtotalshowtotalexludingvatonpdf' => array(
'type' => array(
'subtotal'),
'value' =>
'on',
'checked' => $subtotalshowtotalexludingvatonpdf,
'trans_key' =>
'ShowTotalExludingVATOnPDF'),
54$line_type = $line->qty > 0 ?
'title' :
'subtotal';
56print
"<!-- BEGIN PHP TEMPLATE subtotal_edit.tpl.php -->\n";
58echo
'<tr class="oddeven tredited">';
61 echo
'<td class="linecolnum center">' . ($i + 1) .
'</td>';
68if (!empty(
$object->element) && in_array(
$object->element, array(
'facture',
'facturerec',
'propal',
'commande')) &&
isModEnabled(
'margin') && empty($user->socid)) {
69 if ($user->hasRight(
'margins',
'creer')) {
72 if (
getDolGlobalString(
'DISPLAY_MARGIN_RATES') && $user->hasRight(
'margins',
'liretous')) {
75 if (
getDolGlobalString(
'DISPLAY_MARK_RATES') && $user->hasRight(
'margins',
'liretous')) {
97<td
class=
"linecoldesc minwidth250onall">
98 <div
id=
"line_<?php echo $line->id; ?>"></div>
100 <input
type=
"hidden" name=
"lineid" value=
"<?php echo $line->id; ?>">
101 <input
type=
"hidden" id=
"product_type" name=
"type" value=
"<?php echo $line->product_type; ?>">
102 <input
type=
"hidden" id=
"special_code" name=
"special_code" value=
"<?php echo $line->special_code; ?>">
103 <input
type=
"hidden" id=
"fk_parent_line" name=
"fk_parent_line" value=
"<?php echo $line->fk_parent_line; ?>">
104 <input
type=
"hidden" name=
"action" value=
"update<?php echo $line_type ?>line">
108 $situationinvoicelinewithparent = 0;
109 if ($line->fk_prev_id !=
null && in_array(
$object->element, array(
'facture',
'facturedet'))) {
112 if (
$object->type == $object::TYPE_SITUATION) {
114 $situationinvoicelinewithparent = 1;
121 $situationinvoicelinewithparent = 0;
124 $langs->load(
'subtotals');
127 if (!$situationinvoicelinewithparent) {
128 print
'<input type="text" name="line_desc" class="marginrightonly" id="line_desc" value="';
129 print GETPOSTISSET(
'product_desc') ?
GETPOST(
'product_desc',
'restricthtml') : $line->
description .
'"';
131 if ($line_type ==
'subtotal') {
132 print
' readonly="readonly"';
136 $depth_array = $this->getPossibleLevels($langs);
137 print $form->selectarray(
'line_depth', $depth_array, abs($line->qty), 0, 0, 0,
'', 0, 0, $disabled);
139 print
'<input type="hidden" name="line_depth" value="' . $line->qty .
'">';
141 print
'<div><ul class="ecmjqft">';
142 foreach ($line_options as $key => $value) {
143 if (in_array($line_type, $value[
'type'])) {
144 print
'<li><label for="' . $key .
'">' . $langs->trans($value[
'trans_key']) .
'</label>';
145 print
'<input style="float: left;margin-top: 9px;" id="' . $key .
'" type="checkbox" name="' . $key .
'" value="' . $value[
'value'] .
'" ';
146 print $value[
'checked'] ?
'checked' :
'';
150 print
'</ul></div></td>';
151 print
'<td colspan="' . $colspan .
'" class="right"></td>';
153 print
'<input type="text" readonly name="line_desc" id="line_desc" value="';
154 print GETPOSTISSET(
'product_desc') ?
GETPOST(
'product_desc',
'restricthtml') : $line->
description;
160<td
class=
"center valignmiddle" colspan=
"4">
161 <input
type=
"submit" class=
"reposition button buttongen button-save" id=
"savelinebutton marginbottomonly" name=
"save" value=
"<?php echo $langs->trans("Save
"); ?>"><br>
162 <input
type=
"submit" class=
"reposition button buttongen button-cancel" id=
"cancellinebutton" name=
"cancel" value=
"<?php echo $langs->trans("Cancel
"); ?>">
166<!-- END PHP TEMPLATE objectline_edit.tpl.php -->
if(! $sortfield) if(! $sortorder) $object
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
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.