Module CustomFields Cases: Difference between revisions

Jump to navigation Jump to search
Line 427: Line 427:
$customfields = customfields_fill_object($linecf);
$customfields = customfields_fill_object($linecf);


// Modifying the TTC price and printing it on the Dolibarr's datasheet interface
// Modifying the HT price and printing it on the Dolibarr's datasheet interface
echo price($line->total_ttc * $linecf->customfields->cf_coefficient);
// 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
echo price($line->total_ht * $linecf->customfields->cf_coefficient);
?>
?>
</source>
</source>
439

edits

Navigation menu