Default Behaviours

There are occasions where deleting an item must delete other items - eg. deleting a sale will delete it's payments.  This is known as cascade deleting - an object deleting it's child objects.  While we strive to err on the side of caution regarding what is deleted and when, some occurrences require a decision be made to remove data when an action occurs to preserve data integrity.  We strongly recommend reviewing the following document so that you are aware of what is deleted and when

  • The following items have cascade deletes:
    • Deleting a sale will delete it's associated sale rows, payments, and any refund expenses
    • Deleting a purchase will delete it's associated purchase rows, and any expenses
    • Deleting a sale row or purchase row will delete it's associated tax and discount rows
    • Deleting a tax class will delete all of it's tax rates
    • Deleting a credit will delete any payments created from it
    • Deleting a print rule set will delete it's print rules
    • Deleting a product will delete any of it's stock adjustments
    • Deleting a refund expense will delete any associated stock adjustments
    • Deleting a reversed payment or expense will delete any expense or payment created to refund it.
    • Deleting a payment for a credit will delete the credit created for that payment, and any used credit.  
  • When a tax rate, discount, product, contact etc is deleted, it will not be removed from any existing sales or purchases.  Sales and Purchases store full copies of the items comprising them so that removing them elsewhere will not affect existing data.

Additionally, some items are calculated and recalculated automatically

  • When reversing a payment for a credit, the associated credit and any used credit will also be reversed
  • Whenever a Sale, Purchase, Payment or Expense is saved, any associated Sale or Purchase has its completed status re-evaluated.  E.g - deleting a payment from a sale in the payments screen will result in that sale being marked as unpaid and incomplete.