Revisit the credit story for HA parent
See original GitHub issueIn the HA (Hierarchical Account) model, when a child delegates its payment to its parent, the parent must first build a summary invoice (one for all its dependent children on any given day). Today this is built by adding a new PARENT_SUMMARY
invoice item for each child and the amount is the child invoice amount.
This model therefore includes any credit that child may have on the parent summary invoice , and this probably does not make sense as we don’t want to use a given child’s credit at the parent level by default.
The proposal is the following:
- Credits are not by default visible at the parent level
- We have a new api which allow to move a given child credit to the parent level (to support the use case when for instance a child cancels his subscription and is left with some ‘recognizable credit’.
Issue Analytics
- State:
- Created 7 years ago
- Comments:26 (26 by maintainers)
Top Results From Across the Web
Parent Stories - Economic Security Project
For families like Christina's, Alice's, Amber's, and Lori's, the expanded Child Tax Credit is more than a check — it has helped them...
Read more >YOUR MONEY-When your aging parents need a ... - Reuters
Martha Nurenberg knew her 86-year-old father, Paul, had a problem when he was almost taken in by a letter promising untold riches if...
Read more >Henrietta Lacks: science must right a historical wrong - Nature
The cell line originated from tissue taken from a woman named Henrietta Lacks — and Johnson's mother was a Lacks.
Read more >8 Steps for Parents Helping Children Build Good Credit - CNBC
7. Have them report all possible forms of credit. It can be tough for a young adult to establish credit, since 15% of...
Read more >The Aura is Radical Revisited - Amazon.com
It is a love story between father and son that ends tragically. It takes on many current issues in spousal and family relationships....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@maguero I would suggest a test-driven approach here (write scenario for each case) and see what happens with current implementation. I’d like @pierre to also review those use cases (he is off until the end of the week). After that, you can submit a proposal on what is the best course of action to modify the code (i think you are on the track track:we probably need new dedicated methods in
InvoiceCalculatorUtils
but this is probably not enough to achieve the result.Ah ah, you even had a comment 😉
So proposal is to add an
ADJ
item on theCOMMITTED
invoice (symetric to what happens to child invoice)Yes
You should have all the info you need to create the new
ItemAdjInvoiceItem
item (you have access to child account parent account and child invoice) on the parent invoice. However, when you create theItemAdjInvoiceItem
, make sure thelinkedItemId
points to theSUMMARY
item for the child invoice (similar to what happens on the child invoice). Does that answer your question?