Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Sales Tax causes a negative? #16

Open
tkintenn opened this issue Aug 28, 2019 · 9 comments
Open

Sales Tax causes a negative? #16

tkintenn opened this issue Aug 28, 2019 · 9 comments
Labels

Comments

@tkintenn
Copy link

Several invoices show a negative balance. These were paid invoices from Invoiceplane with sales tax items. The negative amounts are exactly the sales tax.

I can reimport again, is there a way to fix this though?

@tkintenn
Copy link
Author

tkintenn commented Aug 28, 2019

Also, it appears that lines with discounts don't work properly.
For instance I have an invoice where there is a line with 4 items at 125. I discounted each item by 125, effectively 0.
That invoice in invoiceninja shows the line properly, $125 count at 4. But the line total is -125???

The original invoice is paid, but in invoiceninja it imported only as sent.

@turbo124
Copy link
Owner

@tkintenn when i first wrote this tool, Invoice Ninja didn't support line discounts hence when you may be seeing an issue with this, i'll try an get around to putting in a fix for this

@turbo124 turbo124 added the bug label Aug 28, 2019
@tkintenn
Copy link
Author

What's odd is i deleted the information in the line, re-typed it and had the same result. I'm guessing there is something i'm not seeing happening on the backend.

That would be awesome if you got a fix for it.

Any idea why the sales tax caused negative amounts?

@tkintenn
Copy link
Author

update, the discounts look correct in the DB invoice_items table... they're populated correctly in the discount column.

@turbo124
Copy link
Owner

The sales tax issue may be due to the tax being inclusive vs exclusive of the line total... If you can send a sample data file to [email protected] , i'll try and see if i can fix this.

@tkintenn
Copy link
Author

tkintenn commented Sep 3, 2019

So the sales tax... it's because the line item sales tax didn't make it into the DB. It's been so long since i've looked at the invoiceplane DB not sure if it's even stored on each line item. However in invoiceninja db i looked at the lines for an invoice showing a negative. The balance is correct for the invoice but the line items all have nothing for tax_name1 and tax_rate1.

@tkintenn
Copy link
Author

tkintenn commented Sep 3, 2019

here's an example:
Screen shot is from Invoiceplane, code is json from export.
"product_key": "24in HD LED Monitor", "notes": "DVI HDMI VGA 250 Nit\n#D20042", "cost": "134.85", "qty": "2.00", "tax_name1": "", "tax_rate1": 0, "invoice_item_type_id": 1, "discount": 0
Screenshot-2019-9-3

@turbo124
Copy link
Owner

turbo124 commented Sep 3, 2019

@tkintenn if it isn't pulling in the taxes there must be something in the db structure that I haven't taken into account... as mentioned above, if you can provide a sample set of your db dump, i can load it locally and figure out exactly where the issue is.

@tkintenn
Copy link
Author

tkintenn commented Sep 4, 2019

@turbo124
How much of the dump do you need? It looks like the json creates a client and then subsequent invoices?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants