Openfoodnetwork: Invoices display incorrect information about payments if order has been edited

Created on 10 Apr 2020  路  15Comments  路  Source: openfoodfoundation/openfoodnetwork

Description

Changes to an order that has been paid for result in incorrect information on the invoice - it either shows 'paid' or 'unpaid' and does not reflect payments that have been made

I have an order for $26 and the payment has been collected
image.png

The invoice correctly shows PAID
image.png

I remove an item, leaving the order $8 in credit as shown on the Payments tab
image.png

Orders now shows me Credit Owed (albeit not the amount, see #5173)
image.png

But if I regenerate the Invoice it still just shows as PAID
image.png

I add items to the order so that there is a BALANCE DUE
image.png

and now the new Invoice just shows NOT PAID and doesn't recognise that any payment has been made
image.png

I think there is a very simple (papercut?) way to resolve this . . see below

Expected Behavior

Changes to the order are reflected in correct payment information on a newly generated Invoice

  1. Payment Summary box should include the Payment State of the Order, not just Paid or Not Paid
  2. If the order has a Balance Due, the right hand side of the blue box should say 'Balance Due ($xx)'
  3. If the order is in Credit, the right hand side of the blue box should say 'Credit ($xxx)'

  4. Payment history on this order should be included on the invoice. This can just be included under the Payment Summary, with a title 'Payment History' and then just show the information from the payments tab

image

I think this information could replace what is currently there as it will be more up-to-date and informative. The only thing that would be lost is the descriptive text in the payment method. We could include that in the table of payment information if we thought necessary? @tschumilas @RachL @lin-d-hop ?

Actual Behaviour

Invoices generated after an order has been changed are totally unhelpful and uninformative re. additional payments required or credits

Steps to Reproduce

  1. Create an order and capture the payment
  2. Generate invoice
  3. Amend the order in a way that puts it in balance owing or credit owed
  4. Generate invoice - see incorrect information

Workaround

No workaround, the invoice is just wrong. The only thing we can tell people is to create an invoice outside OFN

Severity

S3 - we've lived a long time with this and pushed people out of ofn for invoicing, but with our current influx this is something we have been hit with many times this week.

For the simplicity of the fix perhaps S2 - if invoicing is considered a critical feature

Possible Fix

As above

NB. Couldn't decide whether this was a bug or a papercut so just went with bug as in invoices simply displaying incorrect information

AU bug-s3

All 15 comments

I dont think we should abuse our definition of bug with things like this.

Anyway, adding existing info to some pages and the invoice should be papercut size yes :+1:

This is only for the invoice template that Australia uses . . which may also be used be others . .

confused - this was added as a papercut a month back - so YEA!!!!! what do you mean its only for the invoice template that Aus uses - can we add it to all OFN invoice templates?

Yep I agree it would be good to update all templates here.

I'm cleaning up to push a PR - here's a preview to validate this is what we need, @kirstenalarsen , @RachL, @tschumilas :

Screen Shot 2020-07-01 at 10 46 35 am

EDIT: I'm tempted to put the Amount column after the Payment Method column, as the right aligned cells would then be bunched together on the right, and would be easier to scan below the balance due summary & invoice total.

hello @mbudm will this be available on the other template as well? I believe we shouldn't add the description of the payment method. Some hubs are writing a novel within it 馃榿 It might break the size of the table.

Re: the amount, I would suggest putting the amount at the far right to align all amounts on the page. Thoughts?

Yep I'm happy with your suggestion @RachL - agree just the name of the payment method (no description) is good, and agree with order Payment Status, Amount so all the amounts are aligned

Thanks @mbudm !

Great - thanks. Oh and also @kirstenalarsen and @RachL it appears this code is reused in when 'send invoice' - I assume we want to change that UI too?

@mbudm yes I think it is best to have it everywhere. You do confirm this will end up on all invoice templates?

Thanks @RachL - actually I figured it out now, the invoice that is sent uses the same view as when you print the invoice.
Screen Shot 2020-07-07 at 7 41 56 pm

However the confirmation email uses a different view but renders the same partial. This is because the confrim email renders the payment partial as part of the email, not as an attached pdf.
Screen Shot 2020-07-07 at 7 41 47 pm

So we will change both of these

You do confirm this will end up on all invoice templates?

@RachL I think I got them all now - it would be great if you could take a look at the screenshots in the PR #5712

@mbudm Thanks I think we are good to go 馃挭

An Aus customer has alerted us to the fact that Payment Method Description information has been dropped off invoices. This Enterprise used this field to provide How to Pay information, which was then displayed at the bottom of the invoice. It used to look like this:
Screen Shot 2020-11-09 at 12 46 36 PM

I can see from the discussion above that it was agreed to leave the Payment Method Description out of the table (as some enterprises include lengthy content). However as a result, this information fell off the invoice completely.

As many Enterprises use the Payment Method Description field for How to Pay information on Invoices, removing this information has left a gap in the invoice / payment process that doesn't really have a workaround, other than to manually create another contact with the customer (ie. an email) to confirm payment information.

@kirstenalarsen @mbudm @mkllnk does this warrant a new issue, or is it appropriate to re-open this one to work through a resolution?

@emilyjeanrogers would be better to open a new issue. This will need some design input. We cannot just add the payment method description within the table, it will really make the table look bad in some cases... Thanks!

New issue opened https://github.com/openfoodfoundation/openfoodnetwork/issues/6359

Note that there also an existing issue #5209 which looks at creating a formal 'How to Pay' process within OFN. If this went ahead, it would address one of the common use cases for the Payment Description Field (displaying How to Pay information in Invoices). There may be other uses cases though.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kristinalim picture kristinalim  路  3Comments

lin-d-hop picture lin-d-hop  路  3Comments

Matt-Yorkley picture Matt-Yorkley  路  3Comments

filipefurtad0 picture filipefurtad0  路  3Comments

filipefurtad0 picture filipefurtad0  路  3Comments