I am trying to solve the problem with grossprices giving differences on the invoice because of rounding the net-price to 2 decimals.
When customerprice incl. VAT is 39 Euro (7%) the calculated netprice is 36,4485981308 with 11 units I get 2 Cent too much on the invoice.
With 11 products at gross 29 Euro (net 27,1028037383) 3 cents too little is on the invoice.
The solution is to quit rounding in the background in the DB save the netprice like 36,4485981308 and present with 2 decimals in the program.
Field product_price - decimal(20,10) was given in the DB.
the following 4 Fields were adjusted to decimal 20,10
ip_invoice_items - item-price
ip_invoice_item_amounts - item_subtotal
ip_invoice_item_amounts - item_total
ip_invoice_amounts - invoice_item_subtotal
After that I still had 2 cent too much
I adjusted all fields that could cause it to decimal 20,10 without result
as far as I see it the summs are calcutated here
So I am searching where the values from the DB get read,
can someone tell where that is, I just started a few days ago with code igniter.
I have been working with openbravopos, unicentapos, chromispos etc. where the netproce is calculated with
7 decimals, we do not have differences there. So I thought that adjusting the decimals might solve the problem.