Merge pull request #23375 from grandoc/new_branch_30_12_2022
update code toward php8 compliance
This commit is contained in:
commit
268f0b7c36
@ -73,7 +73,7 @@ if ($nolinesbefore) {
|
||||
print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>';
|
||||
|
||||
if ($filtertype != 1) {
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
print '<td class="linecoluseunit left">';
|
||||
print '<span id="title_units">';
|
||||
print $langs->trans('Unit');
|
||||
@ -145,7 +145,7 @@ print '<td class="bordertop nobottom linecolqty right"><input type="text" size="
|
||||
print '</td>';
|
||||
|
||||
if ($filtertype != 1) {
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$coldisplay++;
|
||||
print '<td class="nobottom linecoluseunit left">';
|
||||
print '</td>';
|
||||
|
||||
@ -126,7 +126,7 @@ if (($line->info_bits & 2) != 2) {
|
||||
print '</td>';
|
||||
|
||||
if ($filtertype != 1) {
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$coldisplay++;
|
||||
print '<td class="nobottom linecoluseunit left">';
|
||||
print '</td>';
|
||||
|
||||
@ -67,7 +67,7 @@ print '</td>';
|
||||
print '<td class="linecolqty right">'.$form->textwithpicto($langs->trans('Qty'), ($filtertype != 1) ? $langs->trans("QtyRequiredIfNoLoss") : '').'</td>';
|
||||
|
||||
if ($filtertype != 1) {
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
print '<td class="linecoluseunit left">' . $langs->trans('Unit') . '</td>';
|
||||
}
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but
|
||||
print '</td>';
|
||||
|
||||
if ($filtertype != 1) {
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
print '<td class="linecoluseunit nowrap left">';
|
||||
$label = $tmpproduct->getLabelOfUnit('long');
|
||||
if ($label !== '') {
|
||||
|
||||
@ -1513,7 +1513,7 @@ if ($action == 'create') {
|
||||
// print '<td width="80" class="right">'.$langs->trans("PriceUHTCurrency").'</td>';
|
||||
//}
|
||||
print '<td width="30" class="center">'.$langs->trans("Qty").'</td>';
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
print '<td width="30" class="left">'.$langs->trans("Unit").'</td>';
|
||||
}
|
||||
print '<td width="50" class="right">'.$langs->trans("ReductionShort").'</td>';
|
||||
@ -1594,7 +1594,7 @@ if ($action == 'create') {
|
||||
// Quantity
|
||||
print '<td class="center">'.$objp->qty.'</td>';
|
||||
// Unit
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
print '<td class="left">'.$langs->trans($object->lines[$cursorline - 1]->getLabelOfUnit()).'</td>';
|
||||
}
|
||||
// Discount
|
||||
@ -1739,7 +1739,7 @@ if ($action == 'create') {
|
||||
print '<td class="center"><input size="2" type="text" name="elqty" value="'.$objp->qty.'"></td>';
|
||||
|
||||
// Unit
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
print '<td class="left">';
|
||||
print $form->selectUnits($objp->fk_unit, "unit");
|
||||
print '</td>';
|
||||
@ -1765,7 +1765,7 @@ if ($action == 'create') {
|
||||
if (isModEnabled('margin') && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) {
|
||||
$colspan++;
|
||||
}
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$colspan++;
|
||||
}
|
||||
|
||||
|
||||
@ -651,7 +651,7 @@ abstract class CommonDocGenerator
|
||||
);
|
||||
|
||||
// Units
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$resarray['line_unit'] = $outputlangs->trans($line->getLabelOfUnit('long'));
|
||||
$resarray['line_unit_short'] = $outputlangs->trans($line->getLabelOfUnit('short'));
|
||||
}
|
||||
|
||||
@ -5121,7 +5121,7 @@ abstract class CommonObject
|
||||
print '<td class="linecoluht_currency right">'.$langs->trans('PriceUHTCurrency').'</td>';
|
||||
}
|
||||
print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>';
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
print '<td class="linecoluseunit left">'.$langs->trans('Unit').'</td>';
|
||||
}
|
||||
print '<td class="linecoldiscount right">'.$langs->trans('ReductionShort').'</td>';
|
||||
@ -5259,7 +5259,7 @@ abstract class CommonObject
|
||||
$this->tpl['total_ht'] = price($line->total_ht);
|
||||
$this->tpl['multicurrency_price'] = price($line->multicurrency_subprice);
|
||||
$this->tpl['qty'] = (($line->info_bits & 2) != 2) ? $line->qty : ' ';
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->tpl['unit'] = $langs->transnoentities($line->getLabelOfUnit('long'));
|
||||
}
|
||||
$this->tpl['remise_percent'] = (($line->info_bits & 2) != 2) ? vatrate($line->remise_percent, true) : ' ';
|
||||
|
||||
@ -2545,7 +2545,7 @@ class Form
|
||||
$outarray = array();
|
||||
|
||||
// Units
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$langs->load('other');
|
||||
}
|
||||
|
||||
@ -2589,7 +2589,7 @@ class Form
|
||||
$selectFields .= ", idprodcustprice, custprice, custprice_ttc, custprice_base_type, custtva_tx, custdefault_vat_code, custref";
|
||||
}
|
||||
// Units
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$sql .= ", u.label as unit_long, u.short_label as unit_short, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units";
|
||||
$selectFields .= ', unit_long, unit_short, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units';
|
||||
}
|
||||
@ -2634,7 +2634,7 @@ class Form
|
||||
$sql .= " LEFT JOIN ".$this->db->prefix()."product_customer_price as pcp ON pcp.fk_soc=".((int) $socid)." AND pcp.fk_product=p.rowid";
|
||||
}
|
||||
// Units
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$sql .= " LEFT JOIN ".$this->db->prefix()."c_units u ON u.rowid = p.fk_unit";
|
||||
}
|
||||
// Multilang : we add translation
|
||||
@ -2941,7 +2941,7 @@ class Form
|
||||
|
||||
// Units
|
||||
$outvalUnits = '';
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
if (!empty($objp->unit_short)) {
|
||||
$outvalUnits .= ' - '.$objp->unit_short;
|
||||
}
|
||||
@ -3277,7 +3277,7 @@ class Form
|
||||
|
||||
$langs->load('stocks');
|
||||
// Units
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$langs->load('other');
|
||||
}
|
||||
|
||||
@ -3292,7 +3292,7 @@ class Form
|
||||
$sql .= ", p.description";
|
||||
}
|
||||
// Units
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$sql .= ", u.label as unit_long, u.short_label as unit_short, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units";
|
||||
}
|
||||
if (isModEnabled('barcode')) {
|
||||
@ -3305,7 +3305,7 @@ class Form
|
||||
}
|
||||
$sql .= " LEFT JOIN ".$this->db->prefix()."societe as s ON pfp.fk_soc = s.rowid";
|
||||
// Units
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$sql .= " LEFT JOIN ".$this->db->prefix()."c_units u ON u.rowid = p.fk_unit";
|
||||
}
|
||||
$sql .= " WHERE p.entity IN (".getEntity('product').")";
|
||||
@ -3398,7 +3398,7 @@ class Form
|
||||
|
||||
// Units
|
||||
$outvalUnits = '';
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
if (!empty($objp->unit_short)) {
|
||||
$outvalUnits .= ' - '.$objp->unit_short;
|
||||
}
|
||||
|
||||
@ -1319,7 +1319,7 @@ class pdf_standard_asset extends ModelePDFAsset
|
||||
),
|
||||
'border-left' => true, // add left line separator
|
||||
);
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->cols['unit']['status'] = true;
|
||||
}
|
||||
|
||||
|
||||
@ -173,7 +173,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
// Define position of columns
|
||||
$this->posxdesc = $this->marge_gauche + 1;
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->posxtva = 101;
|
||||
$this->posxup = 118;
|
||||
$this->posxqty = 135;
|
||||
@ -509,7 +509,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars
|
||||
|
||||
// Unit
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY($this->posxunit, $curY);
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 4, $unit, 0, 'L');
|
||||
@ -1238,7 +1238,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C');
|
||||
}
|
||||
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
|
||||
if (empty($hidetop)) {
|
||||
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
|
||||
|
||||
@ -1866,7 +1866,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
),
|
||||
'border-left' => true, // add left line separator
|
||||
);
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->cols['unit']['status'] = true;
|
||||
}
|
||||
|
||||
|
||||
@ -180,7 +180,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
// Define position of columns
|
||||
$this->posxdesc = $this->marge_gauche + 1;
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->posxtva = 101;
|
||||
$this->posxup = 118;
|
||||
$this->posxqty = 135;
|
||||
@ -677,7 +677,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars
|
||||
|
||||
// Unit
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY($this->posxunit, $curY);
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 4, $unit, 0, 'L');
|
||||
@ -1710,7 +1710,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C');
|
||||
}
|
||||
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
|
||||
if (empty($hidetop)) {
|
||||
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
|
||||
|
||||
@ -2593,7 +2593,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
),
|
||||
'border-left' => true, // add left line separator
|
||||
);
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->cols['unit']['status'] = true;
|
||||
}
|
||||
|
||||
|
||||
@ -233,7 +233,7 @@ class modProduct extends DolibarrModules
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||
$this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('l.lang'=>'Language', 'l.label'=>'TranslatedLabel', 'l.description'=>'TranslatedDescription', 'l.note'=>'TranslatedNote'));
|
||||
}
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->export_fields_array[$r]['p.fk_unit'] = 'Unit';
|
||||
}
|
||||
$this->export_TypeFields_array[$r] = array(
|
||||
@ -640,7 +640,7 @@ class modProduct extends DolibarrModules
|
||||
if (isModEnabled('barcode')) {
|
||||
$this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.barcode'=>'BarCode'));
|
||||
}
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->import_fields_array[$r]['p.fk_unit'] = 'Unit';
|
||||
}
|
||||
|
||||
@ -724,7 +724,7 @@ class modProduct extends DolibarrModules
|
||||
if (isModEnabled('barcode')) {
|
||||
$import_sample = array_merge($import_sample, array('p.barcode'=>''));
|
||||
}
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$import_sample = array_merge(
|
||||
$import_sample,
|
||||
array(
|
||||
|
||||
@ -198,7 +198,7 @@ class modService extends DolibarrModules
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||
$this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('l.lang'=>'Language', 'l.label'=>'TranslatedLabel', 'l.description'=>'TranslatedDescription', 'l.note'=>'TranslatedNote'));
|
||||
}
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->export_fields_array[$r]['p.fk_unit'] = 'Unit';
|
||||
}
|
||||
$this->export_TypeFields_array[$r] = array(
|
||||
@ -587,7 +587,7 @@ class modService extends DolibarrModules
|
||||
if (isModEnabled('barcode')) {
|
||||
$this->import_fields_array[$r] = array_merge($this->import_fields_array[$r], array('p.barcode'=>'BarCode'));
|
||||
}
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->import_fields_array[$r]['p.fk_unit'] = 'Unit';
|
||||
}
|
||||
// Add extra fields
|
||||
@ -678,7 +678,7 @@ class modService extends DolibarrModules
|
||||
if (isModEnabled('barcode')) {
|
||||
$import_sample = array_merge($import_sample, array('p.barcode'=>''));
|
||||
}
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$import_sample = array_merge(
|
||||
$import_sample,
|
||||
array(
|
||||
|
||||
@ -169,7 +169,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
|
||||
// Define position of columns
|
||||
$this->posxdesc = $this->marge_gauche + 1;
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->posxtva = 101;
|
||||
$this->posxup = 118;
|
||||
$this->posxqty = 135;
|
||||
@ -620,7 +620,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars
|
||||
|
||||
// Unit
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY($this->posxunit, $curY);
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 4, $unit, 0, 'L');
|
||||
@ -1437,7 +1437,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C');
|
||||
}
|
||||
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
|
||||
if (empty($hidetop)) {
|
||||
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
|
||||
|
||||
@ -2009,7 +2009,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
),
|
||||
'border-left' => true, // add left line separator
|
||||
);
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->cols['unit']['status'] = true;
|
||||
}
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$this->posxdiscount = 162;
|
||||
$this->postotalht = 174;
|
||||
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->posxtva = 99;
|
||||
$this->posxup = 114;
|
||||
$this->posxqty = 130;
|
||||
@ -480,7 +480,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars
|
||||
|
||||
// Unit
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY($this->posxunit, $curY);
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 4, $unit, 0, 'L');
|
||||
@ -932,7 +932,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C');
|
||||
}
|
||||
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
|
||||
if (empty($hidetop)) {
|
||||
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
|
||||
|
||||
@ -1623,7 +1623,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
),
|
||||
'border-left' => true, // add left line separator
|
||||
);
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->cols['unit']['status'] = true;
|
||||
}
|
||||
|
||||
|
||||
@ -169,7 +169,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$this->posxdiscount = 162;
|
||||
$this->postotalht = 174;
|
||||
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->posxtva = 95;
|
||||
$this->posxup = 114;
|
||||
$this->posxqty = 132;
|
||||
@ -552,7 +552,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars
|
||||
|
||||
// Unit
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY($this->posxunit, $curY);
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 4, $unit, 0, 'L');
|
||||
@ -1097,7 +1097,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C');
|
||||
}
|
||||
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
|
||||
if (empty($hidetop)) {
|
||||
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
|
||||
|
||||
@ -167,7 +167,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$this->posxdiscount = 162;
|
||||
$this->postotalht = 174;
|
||||
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$this->posxup = 112;
|
||||
$this->posxqty = 135;
|
||||
$this->posxunit = 151;
|
||||
@ -527,7 +527,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars
|
||||
|
||||
// Unit
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY($this->posxunit, $curY);
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 4, $unit, 0, 'L');
|
||||
@ -1200,7 +1200,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C');
|
||||
}
|
||||
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
|
||||
if (empty($hidetop)) {
|
||||
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
|
||||
|
||||
@ -127,7 +127,7 @@ if ($nolinesbefore) {
|
||||
<?php } ?>
|
||||
<td class="linecolqty right"><?php echo $langs->trans('Qty'); ?></td>
|
||||
<?php
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
print '<td class="linecoluseunit left">';
|
||||
print '<span id="title_units">';
|
||||
print $langs->trans('Unit');
|
||||
@ -424,7 +424,7 @@ if ($nolinesbefore) {
|
||||
<input type="text" name="qty" id="qty" class="flat width40 right" value="<?php echo (GETPOSTISSET("qty") ? GETPOST("qty", 'alpha', 2) : 1); ?>">
|
||||
</td>
|
||||
<?php
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
|
||||
$coldisplay++;
|
||||
print '<td class="nobottom linecoluseunit left">';
|
||||
print $form->selectUnits(empty($line->fk_unit) ? $conf->global->PRODUCT_USE_UNITS : $line->fk_unit, "units");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user