Commit 6035d2b485121c765ff947c82443a34066373a5f
1 parent
41f0c492
Order body length
Showing
1 changed file
with
9 additions
and
7 deletions
Show diff stats
models/Order.php
... | ... | @@ -141,7 +141,10 @@ |
141 | 141 | 'required', |
142 | 142 | ], |
143 | 143 | [ |
144 | - [ 'comment' ], | |
144 | + [ | |
145 | + 'comment', | |
146 | + 'body', | |
147 | + ], | |
145 | 148 | 'string', |
146 | 149 | ], |
147 | 150 | [ |
... | ... | @@ -161,7 +164,6 @@ |
161 | 164 | 'deadline', |
162 | 165 | 'name', |
163 | 166 | 'numbercard', |
164 | - 'body', | |
165 | 167 | 'declaration', |
166 | 168 | 'stock', |
167 | 169 | 'consignment', |
... | ... | @@ -183,7 +185,7 @@ |
183 | 185 | public function afterFind() |
184 | 186 | { |
185 | 187 | parent::afterFind(); |
186 | - $this->deadline = !empty($this->deadline) ? date('d.m.Y', $this->deadline) : ''; | |
188 | + $this->deadline = !empty( $this->deadline ) ? date('d.m.Y', $this->deadline) : ''; | |
187 | 189 | |
188 | 190 | } |
189 | 191 | |
... | ... | @@ -200,7 +202,7 @@ |
200 | 202 | |
201 | 203 | protected function convertDate() |
202 | 204 | { |
203 | - if (!empty($this->deadline)) { | |
205 | + if (!empty( $this->deadline )) { | |
204 | 206 | $date = new \DateTime(); |
205 | 207 | $date->setTimestamp(strtotime($this->deadline)); |
206 | 208 | $date->format("d.m.Y"); |
... | ... | @@ -289,8 +291,8 @@ |
289 | 291 | */ |
290 | 292 | public function getDeliveryString() |
291 | 293 | { |
292 | - if (!empty($this->orderDelivery)) { | |
293 | - if (!empty($this->orderDelivery->parent)) { | |
294 | + if (!empty( $this->orderDelivery )) { | |
295 | + if (!empty( $this->orderDelivery->parent )) { | |
294 | 296 | return $this->orderDelivery->parent->lang->title . ': ' . $this->orderDelivery->lang->title; |
295 | 297 | } else { |
296 | 298 | return $this->orderDelivery->lang->title; |
... | ... | @@ -308,7 +310,7 @@ |
308 | 310 | */ |
309 | 311 | public function getWasted() |
310 | 312 | { |
311 | - if (empty($this->deadline)) { | |
313 | + if (empty( $this->deadline )) { | |
312 | 314 | return false; |
313 | 315 | } else { |
314 | 316 | return time() > strtotime($this->deadline); | ... | ... |