Commit bfa66d3de2c600e73711ea49b116564a6eb5f5fb
1 parent
791b9ed5
delete customers
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
views/order/_form.php
| @@ -91,6 +91,7 @@ JS; | @@ -91,6 +91,7 @@ JS; | ||
| 91 | <?= $form->field($model, 'payment_id') | 91 | <?= $form->field($model, 'payment_id') |
| 92 | ->dropDownList($payments) ?> | 92 | ->dropDownList($payments) ?> |
| 93 | <?php | 93 | <?php |
| 94 | + $sum = 0; | ||
| 94 | if (!$model->isNewRecord) { | 95 | if (!$model->isNewRecord) { |
| 95 | ?> | 96 | ?> |
| 96 | <div class="order-product-container"> | 97 | <div class="order-product-container"> |
| @@ -114,7 +115,7 @@ JS; | @@ -114,7 +115,7 @@ JS; | ||
| 114 | </div> | 115 | </div> |
| 115 | 116 | ||
| 116 | <?php | 117 | <?php |
| 117 | - $sum = 0; | 118 | + |
| 118 | foreach ($model->orderProducts as $index => $orderProduct) { | 119 | foreach ($model->orderProducts as $index => $orderProduct) { |
| 119 | $sum += ($orderProduct->count * $orderProduct->price) | 120 | $sum += ($orderProduct->count * $orderProduct->price) |
| 120 | ?> | 121 | ?> |