Completed
Push — development ( 46a178...649374 )
by Bhanu
29:53 queued 20:03
created
app/Http/Controllers/Order/BaseInvoiceController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         $state_code = $user_state->state_code;
33 33
         if ($state_code == $origin_state) {//If user and origin state are same
34 34
             $taxClassId = TaxClass::where('name', 'Intra State GST')
35
-             ->pluck('id')->toArray(); //Get the class Id  of state
35
+                ->pluck('id')->toArray(); //Get the class Id  of state
36 36
             if ($taxClassId) {
37 37
                 $taxes = $cartController->getTaxByPriority($taxClassId);
38 38
                 $value = $cartController->getValueForSameState($productid, $c_gst, $s_gst, $taxClassId, $taxes);
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@  discard block
 block discarded – undo
28 28
         $i_gst = $user_state->i_gst;
29 29
         $ut_gst = $user_state->ut_gst;
30 30
         $state_code = $user_state->state_code;
31
-        if ($state_code == $origin_state) {//If user and origin state are same
31
+        if ($state_code == $origin_state) {
32
+//If user and origin state are same
32 33
             $taxClassId = TaxClass::where('name', 'Intra State GST')
33 34
              ->pluck('id')->toArray(); //Get the class Id  of state
34 35
             if ($taxClassId) {
@@ -37,7 +38,8 @@  discard block
 block discarded – undo
37 38
             } else {
38 39
                 $taxes = [0];
39 40
             }
40
-        } elseif ($state_code != $origin_state && $ut_gst == 'NULL') {//If user is from other state
41
+        } elseif ($state_code != $origin_state && $ut_gst == 'NULL') {
42
+//If user is from other state
41 43
             $taxClassId = TaxClass::where('name', 'Inter State GST')
42 44
             ->pluck('id')->toArray(); //Get the class Id  of state
43 45
             if ($taxClassId) {
@@ -46,7 +48,8 @@  discard block
 block discarded – undo
46 48
             } else {
47 49
                 $taxes = [0];
48 50
             }
49
-        } elseif ($state_code != $origin_state && $ut_gst != 'NULL') {//if user from Union Territory
51
+        } elseif ($state_code != $origin_state && $ut_gst != 'NULL') {
52
+//if user from Union Territory
50 53
             $taxClassId = TaxClass::where('name', 'Union Territory GST')
51 54
             ->pluck('id')->toArray(); //Get the class Id  of state
52 55
             if ($taxClassId) {
@@ -71,13 +74,15 @@  discard block
 block discarded – undo
71 74
         ->pluck('tax_classes_id')->first();
72 75
         $value = '';
73 76
         $rate = '';
74
-        if ($taxClassId) { //if state equals the user State
77
+        if ($taxClassId) {
78
+//if state equals the user State
75 79
             $taxes = $cartController->getTaxByPriority($taxClassId);
76 80
 
77 81
             // $taxes = $this->cartController::getTaxByPriority($taxClassId);
78 82
             $value = $cartController->getValueForOthers($productid, $taxClassId, $taxes);
79 83
             $rate = $value;
80
-        } else {//if Tax is selected for Any State Any Country
84
+        } else {
85
+//if Tax is selected for Any State Any Country
81 86
             $taxClassId = Tax::where('country', '')->where('state', 'Any State')->pluck('tax_classes_id')->first();
82 87
             if ($taxClassId) {
83 88
                 $taxes = $cartController->getTaxByPriority($taxClassId);
@@ -228,7 +233,8 @@  discard block
 block discarded – undo
228 233
     {
229 234
         $code = '';
230 235
         $codevalue = '';
231
-        if (\Session::has('code')) {//If coupon code is applied get it here from Session
236
+        if (\Session::has('code')) {
237
+//If coupon code is applied get it here from Session
232 238
             $code = \Session::get('code');
233 239
             $codevalue = \Session::get('codevalue');
234 240
         }
Please login to merge, or discard this patch.