What invoice an expense is on?

Hi,

Time entries have “billed_on_invoice”, but there is not the equivalent available for expenses.

I see “rebilled_on_invoice_item” but that seems to be something different. Perhaps more of an internal link from expense to invoice line item, as opposed to an actual invoice?

Following the link that is under that attribute leads to a 404, which I think means this is actually more of a bug than a feature request?

Can we have a new “billed_on_invoice” that points to the actual invoice, and remove / fix the “rebilled_on_invoice_item” attribute

Thanks, Adam

Hi Adam,

Aha, you’re right, there’s an inconsistency between how we represent billed timeslips and rebilled expenses.

Yes, rebilled_on_invoice_item is an internal notion (under the hood, expenses and timeslips are related to invoice items, rather than directly to invoices).

For timeslips we’ve abstracted this intermediate model away, exposing the billed_on_invoice attribute, though we haven’t done the same for expenses.

We’re working on a patch to associate expenses directly with invoices, as per exising timeslip behaviour, and will update this thread once the API has been updated.

Sorry for the confusion and thanks for bringing this to our attention!

Cheers,
Dave J

Hi Adam,

Yesterday we released an update to the API to fix the bug you logged. For expenses that have been rebilled to an invoice, you’ll find a rebilled_on_invoice attribute. This provides a URL for the invoice resource.

As a note, we haven’t removed the (buggy) rebilled_on_invoice_item attribute yet. We’ll announce the attribute’s deprecation before removing it completely.

Thanks again for the bug report!
James