code: public function onDelete(ResourceEventInterface $event)
      {
          $invoice = $this->getInvoiceFromEvent($event);
  
          $this->updateCustomerBalance($invoice);
  
          $sale = $this->getSaleFromInvoice($invoice);
  
          $sale->removeInvoice($invoice);
  
          $this->scheduleSaleContentChangeEvent($sale);
      }
docs: Delete event handler.
  
  @param ResourceEventInterface $event