Converted invoice should not show up in client portal when in DRAFT state

Following situation: A quote is sent to a client and he receives the link in the e-mail. Clicks on it and is able to see the quote in the Client Portal.
After the client accepts the quote, the quote is converted into an invoice. In InvoiceNinja the status of the invoice is DRAFT. That’s good for this particular workflow, as my customer needs to approve the invoice.

(Note: A related thread is Automatically send invoice after customer accepts quote but this is another scenario).

However when the client clicks around in the client portal and checks out the “Invoices” tab, the client is now able to see the converted invoice.

Is there a way to hide the converted invoice while in state DRAFT (invoice_status 1) and only show the invoice when the invoice was officially sent to the client (invoice_status 2)? In which file could I adjust the relevant query?

Hi,

Are you using v4 or v5?

That’s the v4. (4.5.19 to be precise)

It could be a bug. As a possible workaround it may help if you disable auto-convert in the workflow settings on Settings > Invoice Settings and then manually convert the invoice.

OK this is weird. I’m not able to reproduce this with a new quote.
In the client portal, I am able to view the invoice through Quotes -> click on the accepted quote. At the top the client has the option to download or view the invoice for this quote.

But even if I click on view invoice, the invoice doesn’t appear in the invoices tab -> which is correct and expected.

So as for now I have no idea how the customer was able to change the status of the invoice as “viewed” in Invoiceninja.

Not sure I understand… If they approved the quote then they’d see the invoice which marks it as viewed?

Try to outline the workflow here:

  1. Quote is generated and sent to client
  2. Client opens link in e-mail and sees the quote
  3. Client click on accept quote button
  4. Quote is converted into invoice -> status of the invoice is DRAFT in Admin UI
  5. Invoice does not show up in client portal (-> good, expected this)

So far so good. I just confirmed this with a new quote.

But two days ago a tester was somehow able to change the status of the invoice, even though the tester has no access to the Admin UI and therefore the invoice was not sent to the client. The invoice however then appeared in the client portal under the Invoices tab. And that’s what I expected to be a bug (same as your first answer) and posted here in the forums, however cannot reproduce it.

I guess we can keep it like this. If it happens again (meaning unsent invoices/invoices in DRAFT state show up in client portal), I will investigate further and report back here.

Assuming the workflow settings are left to their default values when a client converts the quote they should immediately see it. If you’re logged in as an admin it won’t mark it as viewed but if a client does it it will.

OK now I see. I was using the same browser as logged in into the Admin UI.
Used another browser (without existing session) to simulate the client. As soon as I viewed the invoice in the client portal (via quote link, then View Invoice button), the invoice changed the status to “viewed” in Admin UI.

However and most importantly the invoice doesn’t show up under the Invoices tab in the client portal (so far) which is what I expected -> the invoice(s) should only show up once sent to the client.

So all good for me this way :slight_smile: