New bug with Billable Expenses

Some previous bugs with Billable Expenses were fixed. When testing, I discovered at least one still exists. This may or may not be related to a previous bug. The bug manifests when following this sequence:

  1. Create a billable expense, such as with a purchase invoice. Status of the expense shows as Uninvoiced.
  2. Invoice the billable expense from the Customers tab. Status changes to Invoiced. Invoice number is automatically filled in on the source transaction.
  3. Delete the resulting sales invoice (such as when there are unrelated mistakes, or you decide to include other billable expenses or time on the invoice).

After step #3, the status of the expense still shows as Invoiced in the Billable Expenses tab:

But no sales invoice exists:

Screen Shot 2019-12-16 at 1.38.14 PM

Meanwhile, the source transaction shows a UUID for the invoice. This field was originally left at the default Uninvoiced, because no sales invoice had yet been created. It changed automatically to the sales invoice reference when the sales invoice was created from Customer. Now, it is incomprehensible:

Screen Shot 2019-12-16 at 1.39.47 PM

and the Customers tab shows no uninvoiced balance for the customer, so a new sales invoice cannot be generated to replace the cancelled one:

Screen Shot 2019-12-16 at 1.42.13 PM

The only recovery path seems to be to revisit the source transaction and delete the UUID in the Invoice field.

I think the best way to prevent this is to make it so invoice cannot be deleted unless billable expenses are unlinked first. It’s really the same concept as customer not being able to be deleted if it has linked invoices etc.

1 Like

Fixed in the latest version (19.11.93)