Line 549:
Line 549:
// Applying a multiplying/dividing coefficient to an HT price will give a mathematically correct TTC price since the taxes are also a multiplier
// Applying a multiplying/dividing coefficient to an HT price will give a mathematically correct TTC price since the taxes are also a multiplier
// However, if you want to apply other mathematical operations (like addition or substaction), you should use the total price with $line->total_ttc
// However, if you want to apply other mathematical operations (like addition or substaction), you should use the total price with $line->total_ttc
−
if (isset($linecf->customfields->cf_coefficient)) {
+
if (!empty($linecf->customfields->cf_coefficient)) {
echo price($line->total_ht * $linecf->customfields->cf_coefficient);
echo price($line->total_ht * $linecf->customfields->cf_coefficient);
} else {
} else {