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

Billed Invoices - Buttons disappear from the invoice #467

Closed
mnorbeck opened this issue May 13, 2016 · 6 comments
Closed

Billed Invoices - Buttons disappear from the invoice #467

mnorbeck opened this issue May 13, 2016 · 6 comments
Labels
🐛bug issue/pull request that documents/fixes a bug in progress indicates that issue/pull request is currently being worked on

Comments

@mnorbeck
Copy link

Expected behavior:
Buttons to add payment, edit, delete are always there.

Actual behavior:
If you click on add payment, the buttons disappear.

Steps to reproduce:
on beta site
Billing > Invoices > click on the add payment button for an invoice. The buttons disappear when the dialog comes up. If you dismiss the dialog with cancel, the buttons are gone.

Screenshots (if applicable):

screen shot 2016-05-13 at 4 21 58 pm

OS and Browser:
OSX Chrome

@tangollama tangollama added 🐛bug issue/pull request that documents/fixes a bug Billing help wanted indicates that an issue is open for contributions labels May 19, 2016
@BrianHC
Copy link

BrianHC commented May 21, 2016

I'll take a look at this issue if nobody else has taken it already.

@tangollama
Copy link
Member

Marking in progress @BrianHC

@tangollama tangollama added in progress indicates that issue/pull request is currently being worked on and removed help wanted indicates that an issue is open for contributions labels May 21, 2016
@tangollama
Copy link
Member

@BrianHC any update on this?

@kaungst
Copy link

kaungst commented Jun 29, 2016

I have fixed the problem and am putting together a pull request.

EDIT Grammar and added @tangollama

@kaungst
Copy link

kaungst commented Jun 29, 2016

See #538 for the fix

@tangollama

@kaungst kaungst mentioned this issue Jul 7, 2016
@gnowoel
Copy link
Contributor

gnowoel commented Sep 18, 2016

This problem should only happen when an invoice's total cost is zero.

When clicking "Add Payment", a new payment object would be created and then recalculating of the balance would be triggered. Since the initial value of the amount field for the newly created payment object is zero, we've already paid up for the zero-cost invoice at the moment of clicking the button. The buttons disappear because they are only showing for the unpaid invoices.

Considering zero-cost invoices should be rare in real cases, so this bug should be relatively harmless. Anyway, I've tried to fix it in the following pull request. The idea is simple: I just count for the saved (not new) payment objects when calculating the balance.

I'm totally new to Ember, so please correct me if I'm outright wrong.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛bug issue/pull request that documents/fixes a bug in progress indicates that issue/pull request is currently being worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants