Пример #1
0
 /**
  * Cancel invoice and register order cancellation
  *
  * @param Invoice|false $invoice
  * @param string $message
  */
 protected function cancelInvoiceAndRegisterCancellation($invoice, $message)
 {
     if ($invoice instanceof Invoice) {
         $invoice->cancel();
         $this->getOrder()->addRelatedObject($invoice);
     }
     $this->getOrder()->registerCancellation($message, false);
 }