$discount_amount variable in a table cell with two decimal places using the number_format function. If you want to display the value with three decimal places without rounding off, you can update the number_format function as follows:<th class="p-1 text-left" id="discount_amount"><?php echo isset($discount_amount) ? number_format($discount_amount, 3, '.', '') : '0.000' ?></th>
number_format function to 3, you can display the value with three decimal places. Additionally, setting an empty string '' as the decimal separator and providing '0.000' as the default value will ensure that the number is displayed with three decimals even if $discount_amount is not set.discount_amount with exactly three decimal places and avoid rounding off the value.