invoiceninja / invoiceninja

A source-available invoice, quote, project and time-tracking app built with Laravel
https://invoiceninja.com
Other
8.16k stars 2.27k forks source link

Needs a second subtotal line after global discount (more detailed than v4, but less confusing than v5?) #7393

Closed nekohayo closed 2 years ago

nekohayo commented 2 years ago

What version of Invoice Ninja are you running? ie v4.5.25 / v5.0.30 v4 (your paid SaaS version)

What environment are you running? InvoiceNinja's official SaaS version

Have you searched existing issues? Yes

Have you reported this to Slack/forum before posting? No

Describe the bug InvoiceNinja does not show the updated subtotal after global-per-invoice discounts are applied, making the resulting invoices hard to understand, or possibly illegal in various jurisdictions, even.

Steps To Reproduce

  1. Create an invoice with the main item being $2000
  2. At the top of the invoice's properties, set the discount to 50 percent

The results are:

Subtotal:           $2000
Discount:           $1000
Sales tax 1 at 5%:    $50
Sales tax 2 at 10%:  $100
Total:              $1150

That's problematic. Most people I've shown this to have been utterly confused by the absence of a real, net, post-discount subtotal before taxes. I'm suspecting this might be illegal in Canada or some of its provinces (or at it's gotta be illegal it at least some countries in the world!)

Expected behavior

Based on v4's invoice layout, this is what I would expect something like:

Gross subtotal:      $2000
Discount (50%):     -$1000
Net subtotal:        $1000
Sales tax 1 at 5%:     $50
Sales tax 2 at 10%:   $100
Total:               $1150

Additional context

I've also briefly attempted testing this on v5 on your public demo site, and somehow it's even more confusing while still not giving me the required information in the expected order:

Screenshot from 2022-04-25 22-44-35

I mean, what's this "Net" thing that comes before "Subtotal" and discount, yet is equal to the subtotal in all cases? Why isn't there one of them after the discount to indicate the discounted subtotal / net subtotal (or whatever you'd call the "total regular-priced amounts, minus global discount, before global sales taxes, before final total"? I don't get why you have net and subtotal up there if they are always equal, and to me it would feel much more natural if the order was, "Gross, discount, net, taxes, total"...

turbo124 commented 2 years ago

@nekohayo This functionality mirrors what we also do in version 4. I think this is the first time we have had this come up as an issue.

@hillelcoren thoughts?

nekohayo commented 2 years ago

To be clear, I'm using v4 on your SaaS on a day-to-day basis, I just went through the extra mile of testing the v5 demo to check if it was already fixed (and it doesn't seem to be, from what I can tell, hence this bug report)

hillelcoren commented 2 years ago

In v5 we've added the ability to configure the total/subtotal fields, they can be set on Settings > Invoice Design > Total Fields (it's the last tab). The app supports adding multiple subtotal fields.

turbo124 commented 2 years ago

@hillelcoren

Which "subtotal" would this relate to? ie subtotal - discount = ?

hillelcoren commented 2 years ago

I assumed the app would determine the subtotal value based on where it's located in the list?

turbo124 commented 2 years ago

@nekohayo

We'll use the variable $net_subtotal to hold the subtotal without the discount amount. This will be available in the next release.