Completed
Pull Request — master (#4)
by
unknown
05:09
created
system/modules/Money/models/Transfer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,16 +48,16 @@
 block discarded – undo
48 48
             ],
49 49
             'name' => 'Переводы',
50 50
             'cols' => [
51
-                'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled','date_create'
51
+                'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled', 'date_create'
52 52
             ],
53 53
             'actions' => [
54 54
                 'Money\CancelTransfer', 'Money\CompleteTransfer'
55 55
             ],
56 56
             'sortable' => [
57
-                'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled','date_create'
57
+                'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled', 'date_create'
58 58
             ],
59 59
             'filters' => [
60
-                'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled','date_create'
60
+                'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled', 'date_create'
61 61
             ]
62 62
         ]
63 63
     ];
Please login to merge, or discard this patch.
system/modules/Money/Money.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             if (empty($blocks[$block->wallet->currency_id])) {
103 103
                 $blocks[$block->wallet->currency_id] = $block->amount;
104 104
             } else {
105
-                $blocks[$block->wallet->currency_id]+= $block->amount;
105
+                $blocks[$block->wallet->currency_id] += $block->amount;
106 106
             }
107 107
         }
108 108
         return $blocks;
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $rootUser = $rootUser ? $rootUser : \Users\User::$cur;
169 169
         $reward = \Money\Reward::get($reward_id);
170 170
         $reward->checkBlocked();
171
-        $reward_count = \Money\Reward\Recive::getCount([ 'where' => [ 'reward_id', $reward_id]]);
171
+        $reward_count = \Money\Reward\Recive::getCount(['where' => ['reward_id', $reward_id]]);
172 172
         if ($reward_count >= $reward->quantity && $reward->quantity)
173 173
             return false;
174 174
         $types = $this->getSnippets('rewardType');
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                 $recives = \Money\Reward\Recive::getList(['where' => [['user_id', $user->id], ['reward_id', $reward->id]]]);
190 190
                 $amount = 0;
191 191
                 foreach ($recives as $recive) {
192
-                    $amount+=$recive->amount;
192
+                    $amount += $recive->amount;
193 193
                 }
194 194
                 if ($amount >= $reward->peruser) {
195 195
                     continue;
Please login to merge, or discard this patch.
system/modules/Money/objects/Sums.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,21 +61,21 @@
 block discarded – undo
61 61
             if ($first) {
62 62
                 $first = false;
63 63
             } else {
64
-                $string.= '<br />';
64
+                $string .= '<br />';
65 65
             }
66
-            $string.= '<span style="white-space:nowrap;">';
67
-            $string.= number_format($sum, 2, '.', ' ');
66
+            $string .= '<span style="white-space:nowrap;">';
67
+            $string .= number_format($sum, 2, '.', ' ');
68 68
             if (\App::$cur->money) {
69 69
                 $currency = \Money\Currency::get($currency_id);
70 70
                 if ($currency) {
71
-                    $string.= ' ' . $currency->acronym();
71
+                    $string .= ' ' . $currency->acronym();
72 72
                 } else {
73
-                    $string.= ' руб.';
73
+                    $string .= ' руб.';
74 74
                 }
75 75
             } else {
76
-                $string.= ' руб.';
76
+                $string .= ' руб.';
77 77
             }
78
-            $string.= '</span>';
78
+            $string .= '</span>';
79 79
         }
80 80
         return $string;
81 81
     }
Please login to merge, or discard this patch.
system/modules/Ecommerce/models/Cart.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@
 block discarded – undo
282 282
                 $groups[$stage->group] = $stage;
283 283
             }
284 284
         }
285
-        $discounts = Cart\Discount::getList(['where'=>['cart_id',$this->id]]);
285
+        $discounts = Cart\Discount::getList(['where'=>['cart_id', $this->id]]);
286 286
         foreach ($discounts as $discount) {
287 287
             if (!isset($groups[$discount->group]) && $discount->auto) {
288 288
                 $discount->delete();
Please login to merge, or discard this patch.
system/modules/Ecommerce/models/Item/Type.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         'manager' => [
44 44
             'map' => [
45 45
                 ['name', 'code'],
46
-                ['delivery', 'electronic','discount']
46
+                ['delivery', 'electronic', 'discount']
47 47
             ]
48 48
         ]
49 49
     ];
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/cart/payType.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -2,24 +2,24 @@
 block discarded – undo
2 2
   <div class="col-md-4">
3 3
     <ul class="nav nav-pills nav-stacked">
4 4
       <?php
5
-      $hiddenId = Tools::randomString();
6
-      foreach ($payTypes as $payType) {
7
-          if ((!empty($_POST['payType']) && $_POST['payType'] == $payType->id) || ($cart->payType && $payType->id == $cart->payType->id)) {
8
-              $checked = 'checked';
9
-          } else {
10
-              $checked = '';
11
-          }
12
-          echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
13
-          echo $payType->name;
14
-          echo '</a></li>';
15
-      }
16
-      $form->input('hidden', "payType", '', [
17
-          'value' => $cart->paytype_id,
18
-          'attributes' => [
19
-              'id' => $hiddenId
20
-          ],
21
-      ]);
22
-      ?>
5
+        $hiddenId = Tools::randomString();
6
+        foreach ($payTypes as $payType) {
7
+            if ((!empty($_POST['payType']) && $_POST['payType'] == $payType->id) || ($cart->payType && $payType->id == $cart->payType->id)) {
8
+                $checked = 'checked';
9
+            } else {
10
+                $checked = '';
11
+            }
12
+            echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
13
+            echo $payType->name;
14
+            echo '</a></li>';
15
+        }
16
+        $form->input('hidden', "payType", '', [
17
+            'value' => $cart->paytype_id,
18
+            'attributes' => [
19
+                'id' => $hiddenId
20
+            ],
21
+        ]);
22
+        ?>
23 23
     </ul>
24 24
   </div>
25 25
   <div class="col-md-8">
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/cart/delivery.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -2,24 +2,24 @@
 block discarded – undo
2 2
   <div class="col-md-4">
3 3
     <ul class="nav nav-pills nav-stacked">
4 4
       <?php
5
-      $hiddenId = Tools::randomString();
6
-      foreach ($deliverys as $delivery) {
7
-          if ((!empty($_POST['delivery']) && $_POST['delivery'] == $delivery->id) || ($cart->delivery && $delivery->id == $cart->delivery->id)) {
8
-              $checked = 'checked';
9
-          } else {
10
-              $checked = '';
11
-          }
12
-          echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $delivery->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
13
-          echo $delivery->name;
14
-          echo '</a></li>';
15
-      }
16
-      $form->input('hidden', "delivery", '', [
17
-          'value' => $cart->delivery_id,
18
-          'attributes' => [
19
-              'id' => $hiddenId
20
-          ],
21
-      ]);
22
-      ?>
5
+        $hiddenId = Tools::randomString();
6
+        foreach ($deliverys as $delivery) {
7
+            if ((!empty($_POST['delivery']) && $_POST['delivery'] == $delivery->id) || ($cart->delivery && $delivery->id == $cart->delivery->id)) {
8
+                $checked = 'checked';
9
+            } else {
10
+                $checked = '';
11
+            }
12
+            echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $delivery->id . '\';inji.Ecommerce.Cart.calcSum();return false;">';
13
+            echo $delivery->name;
14
+            echo '</a></li>';
15
+        }
16
+        $form->input('hidden', "delivery", '', [
17
+            'value' => $cart->delivery_id,
18
+            'attributes' => [
19
+                'id' => $hiddenId
20
+            ],
21
+        ]);
22
+        ?>
23 23
     </ul>
24 24
   </div>
25 25
   <div class="col-md-8">
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     if ($cart->delivery) {
28 28
         echo "<h4>Информация о доставке</h4>";
29 29
         if ($cart->delivery->price_text || $cart->delivery->price) {
30
-            echo "<div>Стоимость доставки: <b>" . ($cart->delivery->price_text ? $cart->delivery->price_text : ( $cart->delivery->price . ' ' . ($cart->delivery->currency ? $cart->delivery->currency->acronym() : 'руб.') )) . '</b></div>';
30
+            echo "<div>Стоимость доставки: <b>" . ($cart->delivery->price_text ? $cart->delivery->price_text : ($cart->delivery->price . ' ' . ($cart->delivery->currency ? $cart->delivery->currency->acronym() : 'руб.'))) . '</b></div>';
31 31
         }
32 32
         if ((float) $cart->delivery->max_cart_price) {
33 33
             echo '<div>При заказе товаров на сумму от ' . $cart->delivery->max_cart_price . ' руб - бесплатно</div>';
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@
 block discarded – undo
39 39
                 $form->input($field->type, "deliveryFields[{$field->id}]", $field->name, ['required' => $field->required]);
40 40
             }
41 41
         }
42
-    }
43
-    else {
42
+    } else {
44 43
         echo "<h4>Выберите способ доставки</h4>";
45 44
     }
46 45
     ?>
Please login to merge, or discard this patch.