code: public function onInsert(ResourceEventInterface $event)
      {
          $sale = $this->getSaleFromEvent($event);
  
          if ($this->handleInsert($sale)) {
              $this->persistenceHelper->persistAndRecompute($sale, false);
          }
      }
docs: Insert event handler.
  
  @param ResourceEventInterface $event
  
  @throws \Ekyna\Component\Commerce\Exception\CommerceExceptionInterface