V4.5.30 selfehosted -problems with calculation of total amounts

The subject has been just installed and before posting the problem we’d run through search of topics here but found nothing how to correct the below.

Can please someone point us into setting for correct calculation of total tax because it does not calculate the total tax correctly - at least not correct total tax amout shown in the invoice (e.g. if I put tax as ONE% it calculates amount based on 0.990100872% which is almost one but figures are not correct. If I put tax as 19% and cost 100 it shows VAT as 15.97 - ? And in invoice form LINE TOTAL it shows amount without tax - ?). And INVOICE TOTAL field does not include the amount of total taxes.
Also I have been trying to find in invoice designe how to change big blue BALANCE DUE to big blue TOTAL INVOICE? It is invoice not the statement of outstanding payments/balances.


You may want to consider upgrading to v5, it has relevant changes.

Did you mean that 4.5.30 does not count correctly and our above assumptions were correct?

v4 should generally be correct but there are cases where it can round off by one, this has been improved in v5.

So 19% from 100 it rounds to 15,97??? Seriously? I tried online version 5 - same things "Balance Due"at the end of the Invoice and not TOTAL AMOUNT as per invoice, no calculation of NET plus VAT amount = TOTAL AMOUNT

Can you please post a screenshot of a sample invoice?

MY sample or which ?

A screenshot of a sample invoice settings so I can see how you have it configured

I will try to install completely fresh V5 via docker.

Seems I stuck installing V 5 via docker (I have installing in QNAP via ssh using their docker and having portainer installed):

sudo docker-compose up -d

Creating network “dockerfiles_invoiceninja” with the default driver
Creating dockerfiles_db_1 … done
Creating dockerfiles_app_1 … done
Creating dockerfiles_server_1 … done

Means thins are working and I can access the installation which I really can:
xxxxx.local:81/setup shows Invoice Ninja Setup
“Success! You can preview test PDF here: /storage/test.pdf”- first passed
But I stuck with Database Connection
host inserted (put fixed IP since DNS records have not been updated yet)
Database, username,password - nothing was changed in “env” or “yaml” files.
Port “yaml” shows:"

If I try with

  • 3306 result SQLSTATE[HY000] [2002] Connection refused
  • 3305 - SQLSTATE[HY000] [1044] Access denied for user ‘ninja’@’%’ to database ‘db-ninja-01’

I presume that I missed to make commands as written “-- Commands to create a MySQL database and user” but on qnap if I try mysql -root -p it says “mysql: command not found”

Where to look for and run the code in order to have the access to DB and run:
CREATE SCHEMA db-ninja-01 DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER ‘ninja’@‘localhost’ IDENTIFIED BY ‘ninja’;
GRANT ALL PRIVILEGES ON ninja.* TO ‘ninja’@‘localhost’;

Thank you

I’m not sure, I’d typically use the mysql CLI

You may want to check with your webhost

Managed to connected to DB - was not clear from instructions what to insert into setup of Database BUT another thing appeared that it is not possible to connect to V5 site using the port specified in “env” file

I’m not sure, you should be able to specify it. Maybe the config is cached?