Beispiel #1
0
 /**
  * @param Order $order
  * @return QrCode|null
  * @throws \ErrorException
  */
 public function renderQRCodeForOrder(Order $order)
 {
     if (!$order->loaded()) {
         throw new \ErrorException("Invalid order");
     }
     $df = RUtils::dt();
     $date = new \DateTime($order->created_at);
     $purpose = "Оплата по счету №" . $order->uid . " от " . $df->ruStrFTime(['format' => 'j F Y', 'monthInflected' => true, 'date' => $date]);
     return $this->renderQRCode($this->generateStringForQRCode($order->amount, $purpose));
 }
Beispiel #2
0
<?php

$numeral = \App\Utils\RUtils::numeral();
$df = \App\Utils\RUtils::dt();
$items = $order->orderItems->with('product')->find_all()->as_array();
$receiptDate = new \DateTime($order->created_at);
?>
<style type="text/css">
    body {
        font-size: 0.3cm;
        line-height: 1.15em;
    }

    body .print {
        color: #000000;
    }

    table td {
        padding: 0.06cm;
        border: 1pt solid #000000;
    }

    table td:first-child,
    table th:first-child {
        border-left: 1pt solid #000000;
    }

    h1,
    h2 {
        text-transform: none;
        border-bottom: 1pt solid #000000;