question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Introduce DRAFT Invoice (required for Hierarchical Account design)

See original GitHub issue

Invoice will now have a enum status (DRAFT, COMMITTED).

Invoice DDL/DAO will need to be modified to reflect that new status. By default all invoices will be created in COMMITTED (current use case), with the exception of apis that:

  • insertExternalCharges
  • insertCredit

We need 2 new invoice apis to transition from DRAFT to COMMITTED. The invoice bus event will only be sent for invoices that are in COMMITTED status. When the transition from DRAFT to COMMITTED occurs, this will send an invoice bus event.

For safety payment module should be modified to disregard non COMMITTED invoices.

Adding a user credit or a user external charge on a COMMITTED invoice should fail.

Clients libraries need to be updated as well (java + ruby)

Tests:

Invoice unit tests Beatrix test to verify that a DRAFT invoice with a positive balance does not get handled by payment system, and then make the transition and check payment occurs.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
matias-aguero-hscommented, Jul 15, 2016

@sbrossie You’re right. The invoice balance is computed for all invoices status. Tests confirm that. Based on your description we have to change it and only compute balance for COMMITTED invoices, right? In that case we’ll also change test asserts.

0reactions
matias-aguero-hscommented, Jul 19, 2016
Read more comments on GitHub >

github_iconTop Results From Across the Web

Hierarchical Accounts Tutorial - Kill Bill Documentation
Let's first review what we have prior to introducing the HA feature: In the Kill Bill ... the summary invoice will transition from...
Read more >
Invoicing for Hierarchical Bill Units - Oracle Help Center
Learn how to use invoicing with hierarchical bill units in Oracle Communications Billing and Revenue Management (BRM).
Read more >
Account Hierarchy - Chargebee
Account hierarchy allows you to create an organizational structure of your customers by their line of business or geography or a chain of...
Read more >
10 Invoice Examples: What To Include + Best Practices
It's an accounts receivable best practice that you design an invoice that is both effective and personalized to your company.
Read more >
Invoice Design: 50 Examples To Inspire You - Canva
Invoices don't need to be boring. Here are 50 examples of awesome invoice designs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found