Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing entries on parent summary invoice #1922

Open
Rxbsxn opened this issue Sep 5, 2023 · 2 comments
Open

Missing entries on parent summary invoice #1922

Rxbsxn opened this issue Sep 5, 2023 · 2 comments

Comments

@Rxbsxn
Copy link

Rxbsxn commented Sep 5, 2023

Hey dear Kill Bill team

I notice a strange behaviour while generating the invoices manually. For some reason, parent invoice which is summary invoice is not containing all the children invoices.

My case:
We have two level-depth hierarchy, Parent - Children.
We generate invoices with target date set to 1st of August
We use Kill Bill API to generate the invoices by calling POST request to /invoices endpoint.

	for idx, account_id in enumerate(list(dict.values())): 
		r = requests.post(f'{url_path}/1.0/kb/invoices?accountId={account_id}&targetDate={target_date}', headers=headers) # Call API to generate the invoices with target date set to 1st of August
		print(r.status_code) # 100% of 201 here (invoices are created)
		if isinstance(idx, int):
			print(f"{idx + 1} out {len(list(dict.values()))} invoice done")

By running this script, we generate the invoices for all children in our Tenant.

Once the invoices are generated, Kill Bill automatically generates a DRAFT invoice on parent level for all parents - The number of children entries on the summary invoice is correct (Parent 1 has 9 children, 9 children are on the generated parent invoice, etc)

When we try to generate the invoice for the next month (the invoicing pipeline has passed I see second invoice on each child) - so it's 1st of September, the parent invoices are not generated or miss children entries in the summary:

Parent 1
image
Parent 2
image

Parent 1 :: First Invoice (generated automatically after adding invoices for 1st of August)
image

Parent 1 :: Second Invoice (generated automatically after adding invoices for 1st of September)
image

Please let me know if you know what may be the reason behind such behaviour, thanks a lot! ❤️

@Rxbsxn Rxbsxn closed this as completed Sep 5, 2023
@Rxbsxn Rxbsxn reopened this Sep 6, 2023
@Rxbsxn
Copy link
Author

Rxbsxn commented Sep 6, 2023

Hey, I had to reopen this issue - first I thought that my problem could be solved by the release 0.24.4 but it's not the case

@shaun-forgie
Copy link

Hi there...have you checked the underlying subscriptions that these invoices relate to are setup properly? If the underlying billing plans expire or enter a phase with no charges in them it then they will not generate any billiable entries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants