From edf70e4b8108e75b09096b98c94124330bb87be9 Mon Sep 17 00:00:00 2001 From: Yarik Date: Wed, 14 Jun 2017 17:07:02 +0300 Subject: [PATCH] Order fix --- views/order/print.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/views/order/print.php b/views/order/print.php index cf2c7fa..4c96eb5 100755 --- a/views/order/print.php +++ b/views/order/print.php @@ -214,9 +214,19 @@ echo DetailView::widget([ 'value' => $order->amount_imposed?:null, ], [ - 'attribute' => 'shipping_by', - 'value' => $order->shipping_by?:null, - ], + 'attribute' => 'shipping_by', + 'value' => $order->shipping_by?(function() use($order) { + switch ($order->shipping_by) { + case 1: + return 'Отправитель'; + break; + case 2: + return 'Получатель'; + break; + } + return null; + })():null, + ], ], ]); ?> -- libgit2 0.21.4