Commit edf70e4b8108e75b09096b98c94124330bb87be9
1 parent
245d24a2
Order fix
Showing
1 changed file
with
13 additions
and
3 deletions
Show diff stats
views/order/print.php
@@ -214,9 +214,19 @@ echo DetailView::widget([ | @@ -214,9 +214,19 @@ echo DetailView::widget([ | ||
214 | 'value' => $order->amount_imposed?:null, | 214 | 'value' => $order->amount_imposed?:null, |
215 | ], | 215 | ], |
216 | [ | 216 | [ |
217 | - 'attribute' => 'shipping_by', | ||
218 | - 'value' => $order->shipping_by?:null, | ||
219 | - ], | 217 | + 'attribute' => 'shipping_by', |
218 | + 'value' => $order->shipping_by?(function() use($order) { | ||
219 | + switch ($order->shipping_by) { | ||
220 | + case 1: | ||
221 | + return 'Отправитель'; | ||
222 | + break; | ||
223 | + case 2: | ||
224 | + return 'Получатель'; | ||
225 | + break; | ||
226 | + } | ||
227 | + return null; | ||
228 | + })():null, | ||
229 | + ], | ||
220 | ], | 230 | ], |
221 | ]); | 231 | ]); |
222 | ?> | 232 | ?> |