Total price rounding

In my invoice i have € 529,98 for total price
in automatic has to give € 530 ?!?
how do I fix it? Thanks

help me :frowning:

How is anybody supposed to help you with the information you posted?
More details about the invoice, taxes, discounts and so on would be helpful. Also, what you mean with “in automatic”.

Ciao Kovah, you’re right, sorry
after many tests I have this result

Senza titolo-1

In my Mdl_item_amounts.php I added this

    $item_subtotal = $item->item_quantity * $item->item_price * 100 / 122;
    $item_tax_total = $item_subtotal * ($item->item_tax_rate_percent / 100);
    $item_discount_total = $item_subtotal * ($item->item_discount_amount / 100);
    $item_total = $item_subtotal + $item_tax_total - $item_discount_total;

it’s almost all right but if you see the total for invoice is € 560,99
is not correct, it would want a rounding and become € 561

do you understand what I mean? sorry for my bad english :frowning:

Are you always wanting to round up?

If so, you can use the ceil() function.

Otherwise to go to the nearest whole number you can use round().

Thanks nmay;
how do I add this feature?

Are you just wanting it to round the total on the PDF’s?
or are you wanting it to round the figures across the entire application?