33@phan-var-force Propal|Contrat|Commande|Facture|Expedition|Delivery|FactureFournisseur|FactureFournisseur|SupplierProposal $object
34@phan-var-force CommonObjectLine|CommonInvoiceLine|CommonOrderLine|ExpeditionLigne|PropaleLigne $line
38$sub_options = $line->extraparams[
"subtotal"] ?? array();
40$titleshowuponpdf = !empty($sub_options[
'titleshowuponpdf']);
41$titleshowtotalexludingvatonpdf = !empty($sub_options[
'titleshowtotalexludingvatonpdf']);
42$titleforcepagebreak = !empty($sub_options[
'titleforcepagebreak']);
43$subtotalshowtotalexludingvatonpdf = !empty($sub_options[
'subtotalshowtotalexludingvatonpdf']);
46 'titleshowuponpdf' => array(
'type' => array(
'title'),
'value' =>
'on',
'checked' => $titleshowuponpdf,
'trans_key' =>
'ShowUPOnPDF'),
47 'titleshowtotalexludingvatonpdf' => array(
'type' => array(
'title'),
'value' =>
'on',
'checked' => $titleshowtotalexludingvatonpdf,
'trans_key' =>
'ShowTotalExludingVATOnPDF'),
48 'titleforcepagebreak' => array(
'type' => array(
'title'),
'value' =>
'on',
'checked' => $titleforcepagebreak,
'trans_key' =>
'ForcePageBreak'),
49 'subtotalshowtotalexludingvatonpdf' => array(
'type' => array(
'subtotal'),
'value' =>
'on',
'checked' => $subtotalshowtotalexludingvatonpdf,
'trans_key' =>
'ShowTotalExludingVATOnPDF'),
53$line_type = $line->qty > 0 ?
'title' :
'subtotal';
55print
"<!-- BEGIN PHP TEMPLATE subtotal_edit.tpl.php -->\n";
57echo
'<tr class="oddeven tredited">';
60 echo
'<td class="linecolnum center">' . ($i + 1) .
'</td>';
67if (!empty(
$object->element) && in_array(
$object->element, array(
'facture',
'facturerec',
'propal',
'commande')) && isModEnabled(
'margin') && empty($user->socid)) {
68 if ($user->hasRight(
'margins',
'creer')) {
71 if (
getDolGlobalString(
'DISPLAY_MARGIN_RATES') && $user->hasRight(
'margins',
'liretous')) {
74 if (
getDolGlobalString(
'DISPLAY_MARK_RATES') && $user->hasRight(
'margins',
'liretous')) {
80if (isModEnabled(
'multicurrency') &&
$object->multicurrency_code !=
$conf->currency) {
96<td
class=
"linecoldesc minwidth250onall">
97 <div
id=
"line_<?php echo $line->id; ?>"></div>
99 <input
type=
"hidden" name=
"lineid" value=
"<?php echo $line->id; ?>">
100 <input
type=
"hidden" id=
"product_type" name=
"type" value=
"<?php echo $line->product_type; ?>">
101 <input
type=
"hidden" id=
"special_code" name=
"special_code" value=
"<?php echo $line->special_code; ?>">
102 <input
type=
"hidden" id=
"fk_parent_line" name=
"fk_parent_line" value=
"<?php echo $line->fk_parent_line; ?>">
103 <input
type=
"hidden" name=
"action" value=
"update<?php echo $line_type ?>line">
107 $situationinvoicelinewithparent = 0;
108 if ($line->fk_prev_id !=
null && in_array(
$object->element, array(
'facture',
'facturedet'))) {
111 if (
$object->type == $object::TYPE_SITUATION) {
113 $situationinvoicelinewithparent = 1;
120 $situationinvoicelinewithparent = 0;
123 $langs->load(
'subtotals');
126 if (!$situationinvoicelinewithparent) {
127 print
'<input type="text" name="line_desc" class="marginrightonly" id="line_desc" value="';
128 print GETPOSTISSET(
'product_desc') ?
GETPOST(
'product_desc',
'restricthtml') : $line->
description .
'"';
130 if ($line_type ==
'subtotal') {
131 print
' readonly="readonly"';
135 $depth_array = $this->getPossibleLevels($langs);
136 print $form->selectarray(
'line_depth', $depth_array, abs($line->qty), 0, 0, 0,
'', 0, 0, $disabled);
138 print
'<input type="hidden" name="line_depth" value="' . $line->qty .
'">';
140 print
'<div><ul class="ecmjqft">';
141 foreach ($line_options as $key => $value) {
142 if (in_array($line_type, $value[
'type'])) {
143 print
'<li><label for="' . $key .
'">' . $langs->trans($value[
'trans_key']) .
'</label>';
144 print
'<input style="float: left;" id="' . $key .
'" type="checkbox" name="' . $key .
'" value="' . $value[
'value'] .
'" ';
145 print $value[
'checked'] ?
'checked' :
'';
149 print
'</ul></div></td>';
150 print
'<td colspan="' . $colspan .
'" class="right"></td>';
152 print
'<input type="text" readonly name="line_desc" id="line_desc" value="';
153 print GETPOSTISSET(
'product_desc') ?
GETPOST(
'product_desc',
'restricthtml') : $line->
description;
159<td
class=
"center valignmiddle" colspan=
"4">
160 <input
type=
"submit" class=
"reposition button buttongen button-save" id=
"savelinebutton marginbottomonly" name=
"save" value=
"<?php echo $langs->trans("Save
"); ?>"><br>
161 <input
type=
"submit" class=
"reposition button buttongen button-cancel" id=
"cancellinebutton" name=
"cancel" value=
"<?php echo $langs->trans("Cancel
"); ?>">
165<!-- END PHP TEMPLATE objectline_edit.tpl.php -->
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $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.
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.