O3-5205: Throw an error if stock item or billable service cannot be found when setting a bill line item#56
O3-5205: Throw an error if stock item or billable service cannot be found when setting a bill line item#56NethmiRodrigo wants to merge 2 commits intomainfrom
Conversation
Shouldn't this be done on the service layer? |
|
Does the database layer have the corresponding foreign key requirements? |
@dkayiwa Yes, the database layer has foreign keys, but the column is nullable. So there is a bug where when the stock item or billable service cannot be found, a null value gets saved to the database, so an exception from the database layer never gets thrown. |
What if we set nullable to 'false'?? |
8102b68 to
5a00f2c
Compare
|
@wikumChamith needs to discuss this with @NethmiRodrigo and finalize. |
Currently, you could create a bill with line items where the
billableServiceor theitemis set to bogus values. This fix makes it so that an error is thrown if a billable service or stock item cannot be found with a given uuid