Ejemplo n.º 1
0
 /**
  * @param $orderId
  */
 public function actionNewInvoice($orderId)
 {
     $order = Order::findOne($orderId);
     $invoice = new Invoice(['order_id' => $order->id, 'due_amount' => $order->due_amount, 'due_datetime' => (new \DateTime('+10 days'))->format('Y-m-d H:i:s'), 'created' => new Expression('NOW()')]);
     $invoice->save();
     $this->redirect(['order/view', 'orderId' => $orderId]);
 }
Ejemplo n.º 2
0
 public function actionPay($orderId)
 {
     $order = Order::findOne($orderId);
     return $this->render('pay', ['order' => $order]);
 }