Completed
Branch master (6ed6e7)
by Lars
07:57
created
src/Intraface/modules/debtor/PaymentMethod/CashOnDelivery.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,6 +8,6 @@
 block discarded – undo
8 8
 
9 9
     function getIdentifier()
10 10
     {
11
-    	return 'CashOnDelivery';
11
+        return 'CashOnDelivery';
12 12
     }
13 13
 }
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/PaymentMethod.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function getTypes()
19 19
     {
20
-     	$types[0] = 'None';
20
+            $types[0] = 'None';
21 21
         $types[1] = 'BankTransfer';
22 22
         $types[2] = 'GiroPayment01';
23 23
         $types[3] = 'GiroPayment71';
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     {
87 87
         $payment_methods = array();
88 88
 
89
-   	    $methods = Doctrine::getTable('Intraface_modules_shop_PaymentMethods')->findByShopId($shop_id);
89
+            $methods = Doctrine::getTable('Intraface_modules_shop_PaymentMethods')->findByShopId($shop_id);
90 90
         foreach ($methods as $method) {
91 91
             $gateway = new Intraface_modules_debtor_PaymentMethod();
92 92
             $m = $gateway->getByKey($method->getPaymentMethodKey());
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/Collection.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
         $this->getGateway()->getDBQuery()->setUri($this->url(null, array('use_stored' => 'true')));
80 80
 
81 81
         $data = array(
82
-        	'posts' => $this->getGateway()->findAll(),
83
-        	'debtor' => $this->getGateway());
82
+            'posts' => $this->getGateway()->findAll(),
83
+            'debtor' => $this->getGateway());
84 84
 
85 85
 
86 86
         // @todo kan følgende ikke lige så godt hente fra $this->query()
@@ -101,17 +101,17 @@  discard block
 block discarded – undo
101 101
 
102 102
     function postForm()
103 103
     {
104
-    	$debtor = $this->getDebtor();
105
-    	$contact = new Contact($this->getKernel(), $_POST["contact_id"]);
106
-
107
-    	if (isset($_POST["contact_person_id"]) && $_POST["contact_person_id"] == "-1") {
108
-    		$contact_person = new ContactPerson($contact);
109
-    		$person["name"] = $_POST['contact_person_name'];
110
-    		$person["email"] = $_POST['contact_person_email'];
111
-    		$contact_person->save($person);
112
-    		$contact_person->load();
113
-    		$_POST["contact_person_id"] = $contact_person->get("id");
114
-    	}
104
+        $debtor = $this->getDebtor();
105
+        $contact = new Contact($this->getKernel(), $_POST["contact_id"]);
106
+
107
+        if (isset($_POST["contact_person_id"]) && $_POST["contact_person_id"] == "-1") {
108
+            $contact_person = new ContactPerson($contact);
109
+            $person["name"] = $_POST['contact_person_name'];
110
+            $person["email"] = $_POST['contact_person_email'];
111
+            $contact_person->save($person);
112
+            $contact_person->load();
113
+            $_POST["contact_person_id"] = $contact_person->get("id");
114
+        }
115 115
 
116 116
         if ($this->getKernel()->intranet->hasModuleAccess('currency') && !empty($_POST['currency_id'])) {
117 117
             $currency_module = $this->getKernel()->useModule('currency', false); // false = ignore user access
@@ -124,11 +124,11 @@  discard block
 block discarded – undo
124 124
             $_POST['currency'] = $currency;
125 125
         }
126 126
 
127
-    	if ($debtor->update($_POST)) {
128
-    	    return new k_SeeOther($this->url('../list/' . $debtor->get('id')));
129
-    	}
127
+        if ($debtor->update($_POST)) {
128
+            return new k_SeeOther($this->url('../list/' . $debtor->get('id')));
129
+        }
130 130
 
131
-    	return $this->render();
131
+        return $this->render();
132 132
     }
133 133
 
134 134
     function renderXls()
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/Index.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         } elseif ($this->getKernel()->user->hasModuleAccess("order")) {
26 26
             return new k_SeeOther($this->url('order/list', array('type' => 'order')));
27 27
         } elseif ($this->getKernel()->user->hasModuleAccess("quotation")) {
28
-	        return new k_SeeOther($this->url('quotation/list', array('type' => 'quotation')));
28
+            return new k_SeeOther($this->url('quotation/list', array('type' => 'quotation')));
29 29
         }
30 30
 
31 31
         $smarty = $this->template->create(dirname(__FILE__) . '/templates/index');
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/Reminders.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -93,32 +93,32 @@  discard block
 block discarded – undo
93 93
         $contact_id = $this->query('contact_id');
94 94
 
95 95
         if ($contact_id) {
96
-        	$contact = new Contact($this->getKernel(), $contact_id);
97
-        	$this->getGateway()->getDBQuery()->setFilter("contact_id", $contact->get("id"));
96
+            $contact = new Contact($this->getKernel(), $contact_id);
97
+            $this->getGateway()->getDBQuery()->setFilter("contact_id", $contact->get("id"));
98 98
         }
99 99
 
100 100
         if (isset($_GET["search"])) {
101
-        	if (isset($_GET["text"]) && $_GET["text"] != "") {
102
-        		$this->getGateway()->getDBQuery()->setFilter("text", $_GET["text"]);
103
-        	}
101
+            if (isset($_GET["text"]) && $_GET["text"] != "") {
102
+                $this->getGateway()->getDBQuery()->setFilter("text", $_GET["text"]);
103
+            }
104 104
 
105
-        	if (isset($_GET["from_date"]) && $_GET["from_date"] != "") {
106
-        		$this->getGateway()->getDBQuery()->setFilter("from_date", $_GET["from_date"]);
107
-        	}
105
+            if (isset($_GET["from_date"]) && $_GET["from_date"] != "") {
106
+                $this->getGateway()->getDBQuery()->setFilter("from_date", $_GET["from_date"]);
107
+            }
108 108
 
109
-        	if (isset($_GET["to_date"]) && $_GET["to_date"] != "") {
110
-        		$this->getGateway()->getDBQuery()->setFilter("to_date", $_GET["to_date"]);
111
-        	}
109
+            if (isset($_GET["to_date"]) && $_GET["to_date"] != "") {
110
+                $this->getGateway()->getDBQuery()->setFilter("to_date", $_GET["to_date"]);
111
+            }
112 112
 
113
-        	if (isset($_GET["status"])) {
114
-        		$this->getGateway()->getDBQuery()->setFilter("status", $_GET["status"]);
115
-        	}
113
+            if (isset($_GET["status"])) {
114
+                $this->getGateway()->getDBQuery()->setFilter("status", $_GET["status"]);
115
+            }
116 116
         } else {
117
-        	if ($this->getGateway()->getDBQuery()->checkFilter("contact_id")) {
117
+            if ($this->getGateway()->getDBQuery()->checkFilter("contact_id")) {
118 118
                 $this->getGateway()->getDBQuery()->setFilter("status", "-1");
119 119
             } else {
120
-        		$this->getGateway()->getDBQuery()->setFilter("status", "-2");
121
-        	}
120
+                $this->getGateway()->getDBQuery()->setFilter("status", "-2");
121
+            }
122 122
         }
123 123
 
124 124
         $this->getGateway()->getDBQuery()->usePaging("paging");
@@ -145,11 +145,11 @@  discard block
 block discarded – undo
145 145
         }
146 146
 
147 147
         if ($reminder->save($_POST)) {
148
-             if ($_POST['send_as'] == 'email') {
149
-                 return new k_SeeOther($this->url($reminder->get("id"), array('email', 'flare' => 'Reminder has been created')));
150
-             } else {
151
-                 return new k_SeeOther($this->url($reminder->get("id"), array('flare' => 'Reminder has been created')));
152
-             }
148
+                if ($_POST['send_as'] == 'email') {
149
+                    return new k_SeeOther($this->url($reminder->get("id"), array('email', 'flare' => 'Reminder has been created')));
150
+                } else {
151
+                    return new k_SeeOther($this->url($reminder->get("id"), array('flare' => 'Reminder has been created')));
152
+                }
153 153
         }
154 154
 
155 155
         $value = $_POST;
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/Create.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -31,17 +31,17 @@  discard block
 block discarded – undo
31 31
 
32 32
     function postForm()
33 33
     {
34
-    	$debtor = $this->getDebtor();
35
-    	$contact = new Contact($this->getKernel(), $this->body("contact_id"));
36
-
37
-    	if ($this->body("contact_person_id") == "-1") {
38
-    		$contact_person = new ContactPerson($contact);
39
-    		$person["name"] = $_POST['contact_person_name'];
40
-    		$person["email"] = $_POST['contact_person_email'];
41
-    		$contact_person->save($person);
42
-    		$contact_person->load();
43
-    		$_POST["contact_person_id"] = $contact_person->get("id");
44
-    	}
34
+        $debtor = $this->getDebtor();
35
+        $contact = new Contact($this->getKernel(), $this->body("contact_id"));
36
+
37
+        if ($this->body("contact_person_id") == "-1") {
38
+            $contact_person = new ContactPerson($contact);
39
+            $person["name"] = $_POST['contact_person_name'];
40
+            $person["email"] = $_POST['contact_person_email'];
41
+            $contact_person->save($person);
42
+            $contact_person->load();
43
+            $_POST["contact_person_id"] = $contact_person->get("id");
44
+        }
45 45
 
46 46
         if ($this->getKernel()->intranet->hasModuleAccess('currency') && $this->body('currency_id')) {
47 47
             $currency_module = $this->getKernel()->useModule('currency', false); // false = ignore user access
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
             $_POST['currency'] = $currency;
55 55
         }
56 56
 
57
-    	if ($debtor->update($_POST)) {
58
-    	    return new k_SeeOther($this->url('../' . $debtor->get('id')));
59
-    	}
57
+        if ($debtor->update($_POST)) {
58
+            return new k_SeeOther($this->url('../' . $debtor->get('id')));
59
+        }
60 60
 
61
-    	return $this->render();
61
+        return $this->render();
62 62
     }
63 63
 
64 64
     function getValues()
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/Payments.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@
 block discarded – undo
24 24
         $object = $this->getModel();
25 25
         $payment = $this->getPayment();
26 26
         if ($id = $payment->update($_POST)) {
27
-             if ($this->getKernel()->user->hasModuleAccess('accounting')) {
28
-                 return new k_SeeOther($this->url($id . '/state'));
29
-             } else {
30
-                 return new k_SeeOther($this->url('../'));
31
-             }
27
+                if ($this->getKernel()->user->hasModuleAccess('accounting')) {
28
+                    return new k_SeeOther($this->url($id . '/state'));
29
+                } else {
30
+                    return new k_SeeOther($this->url('../'));
31
+                }
32 32
         }
33 33
         return $this->render();
34 34
     }
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/Item.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
         $product_module = $this->getKernel()->useModule('product');
31 31
 
32 32
         if (isset($_GET['change_product'])) {
33
-        	$redirect = Intraface_Redirect::factory($this->getKernel(), 'go');
34
-        	$url = $redirect->setDestination(NET_SCHEME . NET_HOST . $this->url('selectproduct'), NET_SCHEME . NET_HOST . $this->url());
35
-        	$redirect->askParameter('product_id');
36
-        	return new k_SeeOther($url);
33
+            $redirect = Intraface_Redirect::factory($this->getKernel(), 'go');
34
+            $url = $redirect->setDestination(NET_SCHEME . NET_HOST . $this->url('selectproduct'), NET_SCHEME . NET_HOST . $this->url());
35
+            $redirect->askParameter('product_id');
36
+            return new k_SeeOther($url);
37 37
         }
38
-		/*
38
+        /*
39 39
         elseif (isset($_GET['return_redirect_id'])) {
40 40
         	$redirect = Intraface_Redirect::factory($this->getKernel(), 'return');
41 41
             $returned_values = unserialize($redirect->getParameter('product_id'));
@@ -65,15 +65,15 @@  discard block
 block discarded – undo
65 65
 
66 66
     function postForm()
67 67
     {
68
-       	$debtor = $this->context->getDebtor();
69
-       	$debtor->loadItem(intval($_POST["id"]));
68
+            $debtor = $this->context->getDebtor();
69
+            $debtor->loadItem(intval($_POST["id"]));
70 70
 
71
-       	if ($id = $debtor->item->save($_POST)) {
72
-       		return new k_SeeOther($this->url('../../'));
73
-       	} else {
74
-       		$values = $_POST;
75
-       	}
76
-       	return $this->render();
71
+            if ($id = $debtor->item->save($_POST)) {
72
+                return new k_SeeOther($this->url('../../'));
73
+            } else {
74
+                $values = $_POST;
75
+            }
76
+            return $this->render();
77 77
     }
78 78
 
79 79
     function addItem($returned_values)
Please login to merge, or discard this patch.
src/Intraface/modules/shop/BasketEvaluation.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
  */
24 24
 class Intraface_modules_shop_BasketEvaluation extends Intraface_Standard
25 25
 {
26
-     public $error;
27
-     private $db;
28
-     private $intranet;
29
-     private $shop;
30
-     private $id;
31
-     private $values;
32
-     private $settings;
26
+        public $error;
27
+        private $db;
28
+        private $intranet;
29
+        private $shop;
30
+        private $id;
31
+        private $values;
32
+        private $settings;
33 33
 
34 34
     /**
35 35
      * Constructor
@@ -147,15 +147,15 @@  discard block
 block discarded – undo
147 147
         }
148 148
 
149 149
         $sql = "running_index = ".$this->db->quote($input['running_index'], 'integer').", " .
150
-                 "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", " .
151
-                 "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", " .
152
-                 "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", " .
153
-                 "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", " .
154
-                 "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", " .
155
-                 "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", " .
156
-                 "action_value = ".$this->db->quote($input['action_value'], 'text').", " .
157
-                 "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", " .
158
-                 "action_unit_key = ".$this->db->quote($input['action_unit_key'], 'integer');
150
+                    "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", " .
151
+                    "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", " .
152
+                    "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", " .
153
+                    "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", " .
154
+                    "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", " .
155
+                    "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", " .
156
+                    "action_value = ".$this->db->quote($input['action_value'], 'text').", " .
157
+                    "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", " .
158
+                    "action_unit_key = ".$this->db->quote($input['action_unit_key'], 'integer');
159 159
 
160 160
         if ($this->id != 0) {
161 161
             $result = $this->db->exec("UPDATE webshop_basket_evaluation SET ".$sql." WHERE intranet_id = ".$this->db->quote($this->intranet->getId(), 'integer')." AND id = ".$this->db->quote($this->id, 'integer')  . " AND shop_id = ".$this->db->quote($this->shop->getId(), 'integer'));
Please login to merge, or discard this patch.