Completed
Branch master (6ed6e7)
by Lars
07:57
created
src/Intraface/modules/newsletter/Controller/List.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
         if ($name == 'subscribers') {
9 9
             return 'Intraface_modules_newsletter_Controller_Subscribers';
10 10
         } elseif ($name == 'letters') {
11
-        	return 'Intraface_modules_newsletter_Controller_Letters';
11
+            return 'Intraface_modules_newsletter_Controller_Letters';
12 12
         } elseif ($name == 'log') {
13 13
             return 'Intraface_modules_newsletter_Controller_Log';
14 14
         }
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     function DELETE()
45 45
     {
46
-    	return $this->getList()->delete();
46
+        return $this->getList()->delete();
47 47
     }
48 48
 
49 49
     function renderHtmlEdit()
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         $letter = new Newsletter($list);
29 29
         $letters = $letter->getList();
30 30
 
31
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/list');
31
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/list');
32 32
         return $smarty->render($this);
33 33
     }
34 34
     
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     function renderHtmlEdit()
50 50
     {
51
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/list-edit');
51
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/list-edit');
52 52
         return $smarty->render($this);
53 53
     }
54 54
 
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/Index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         if ($this->query('contact_id')) {
21 21
             $gateway = new Intraface_modules_newsletter_ListGateway($this->getKernel());
22 22
             $lists = $gateway->findByContactId($this->query('contact_id'));
23
-            $tpl = $this->template->create(dirname(__FILE__) . '/templates/contact-lists');
23
+            $tpl = $this->template->create(dirname(__FILE__).'/templates/contact-lists');
24 24
             return $tpl->render($this, array('lists' => $lists));
25 25
         }
26 26
 
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/Letters.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -38,15 +38,15 @@
 block discarded – undo
38 38
 
39 39
     function postForm()
40 40
     {
41
-    	$module = $this->getKernel()->module("newsletter");
41
+        $module = $this->getKernel()->module("newsletter");
42 42
         $letter = new Newsletter($this->getList());
43 43
 
44
-    	if ($id = $letter->save($_POST)) {
45
-    		return new k_SeeOther($this->url($id));
46
-    	} else {
47
-    		$value = $_POST;
48
-    	}
49
-    	return $this->render();
44
+        if ($id = $letter->save($_POST)) {
45
+            return new k_SeeOther($this->url($id));
46
+        } else {
47
+            $value = $_POST;
48
+        }
49
+        return $this->render();
50 50
     }
51 51
 
52 52
     function getKernel()
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $module = $this->getKernel()->module("newsletter");
26 26
 
27
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/letters');
27
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/letters');
28 28
         return $smarty->render($this);
29 29
     }
30 30
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     {
33 33
         $module = $this->getKernel()->module("newsletter");
34 34
 
35
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/letter-edit');
35
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/letter-edit');
36 36
         return $smarty->render($this);
37 37
     }
38 38
 
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/Subscribers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
 
89 89
         }*/
90 90
 
91
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/subscribers');
91
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/subscribers');
92 92
         return $smarty->render($this);
93 93
     }
94 94
 
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/Subscriber.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
         if ($this->query('remind') == 'true') {
7 7
             $subscriber = new NewsletterSubscriber($this->context->getList(), intval($this->name()));
8 8
             if (!$subscriber->sendOptInEmail()) {
9
-            	throw new Exception('Could not send the optin e-mail');
9
+                throw new Exception('Could not send the optin e-mail');
10 10
             }
11 11
             return new k_SeeOther($this->url(null, array('flare' => 'Reminder e-mail sent')));
12 12
         }
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/VatPeriod.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -279,7 +279,7 @@
 block discarded – undo
279 279
         $var['amount'] = abs(round($this->get('saldo_vat_in')));
280 280
 
281 281
         if (!$voucher->saveInDaybook($var, $skip_daybook)) {
282
-             $this->error->set('Systemet kunne ikke opdatere indgående moms');
282
+                $this->error->set('Systemet kunne ikke opdatere indgående moms');
283 283
         }
284 284
 
285 285
         if ($this->error->isError()){
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     public function __construct($year_object, $id = 0)
18 18
     {
19 19
         $this->year  = $year_object;
20
-        $this->id    = (int) $id;
20
+        $this->id    = (int)$id;
21 21
         $this->error = new Intraface_Error;
22 22
         if ($this->id > 0) {
23 23
             $this->load();
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     private function load()
28 28
     {
29 29
         $db = new DB_Sql;
30
-        $db->query("SELECT *, DATE_FORMAT(date_start, '%d-%m-%Y') AS date_start_dk, DATE_FORMAT(date_end, '%d-%m-%Y') AS date_end_dk FROM accounting_vat_period WHERE id = " . $this->id . " AND intranet_id = " . $this->year->kernel->intranet->get('id'));
30
+        $db->query("SELECT *, DATE_FORMAT(date_start, '%d-%m-%Y') AS date_start_dk, DATE_FORMAT(date_end, '%d-%m-%Y') AS date_end_dk FROM accounting_vat_period WHERE id = ".$this->id." AND intranet_id = ".$this->year->kernel->intranet->get('id'));
31 31
 
32 32
         if (!$db->nextRecord()) {
33 33
             return false;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function isStated()
52 52
     {
53 53
         $db = new DB_Sql;
54
-        $db->query("SELECT status FROM accounting_vat_period WHERE status = 2 AND id = " . $this->id . " AND intranet_id=" . $this->year->kernel->intranet->get('id'). " AND active = 1");
54
+        $db->query("SELECT status FROM accounting_vat_period WHERE status = 2 AND id = ".$this->id." AND intranet_id=".$this->year->kernel->intranet->get('id')." AND active = 1");
55 55
         if ($db->nextRecord()) {
56 56
             return $db->numRows();
57 57
         }
@@ -84,15 +84,15 @@  discard block
 block discarded – undo
84 84
             return 0;
85 85
         }
86 86
         $db = new DB_Sql;
87
-        if ($this->id == 0 OR $type=='insert') {
87
+        if ($this->id == 0 OR $type == 'insert') {
88 88
             $sql_type = "INSERT INTO ";
89 89
             $sql_end  = ", date_created = NOW()";
90 90
         } else {
91 91
             $sql_type = "UPDATE ";
92
-            $sql_end  = " WHERE id = " . $this->id;
92
+            $sql_end  = " WHERE id = ".$this->id;
93 93
         }
94 94
 
95
-        $sql = $sql_type . "accounting_vat_period SET user_id = ".$this->year->kernel->user->get('id').", label = '".$input['label']."', date_start = '".$input['date_start']."', date_end='".$input['date_end']."', date_updated=NOW(), intranet_id=".$this->year->kernel->intranet->get('id').", year_id=".$this->year->get('id')."" . $sql_end;
95
+        $sql = $sql_type."accounting_vat_period SET user_id = ".$this->year->kernel->user->get('id').", label = '".$input['label']."', date_start = '".$input['date_start']."', date_end='".$input['date_end']."', date_updated=NOW(), intranet_id=".$this->year->kernel->intranet->get('id').", year_id=".$this->year->get('id')."".$sql_end;
96 96
 
97 97
         $db->query($sql);
98 98
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     protected function setStated($voucher_id)
113 113
     {
114 114
         $db = new DB_Sql;
115
-        $db->query("UPDATE accounting_vat_period SET voucher_id = '".(int)$voucher_id."', status = 2 WHERE id = ".$this->id." AND intranet_id = " . $this->year->kernel->intranet->get('id') . " AND year_id=". $this->year->get('id'));
115
+        $db->query("UPDATE accounting_vat_period SET voucher_id = '".(int)$voucher_id."', status = 2 WHERE id = ".$this->id." AND intranet_id = ".$this->year->kernel->intranet->get('id')." AND year_id=".$this->year->get('id'));
116 116
         return true;
117 117
     }
118 118
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             $this->error->set('Du kan ikke slette en periode, der er bogf�rt');
127 127
             return false;
128 128
         }
129
-        $db->query("UPDATE accounting_vat_period SET active = 0, date_updated = NOW() WHERE id = " . $this->id . " AND intranet_id = " . $this->year->kernel->intranet->get('id'));
129
+        $db->query("UPDATE accounting_vat_period SET active = 0, date_updated = NOW() WHERE id = ".$this->id." AND intranet_id = ".$this->year->kernel->intranet->get('id'));
130 130
         return true;
131 131
     }
132 132
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
         // ganges med -1 for at få rigtigt fortegn til udregning
149 149
         $this->value['saldo_vat_out'] = $account_vat_in->get('saldo');
150
-        $saldo_total += -1 * $this->value['saldo_vat_out']; // total
150
+        $saldo_total += -1*$this->value['saldo_vat_out']; // total
151 151
 
152 152
         // Moms af varekøb i udlandet
153 153
         // Dette beløb er et udregnet beløb, som udregnes under bogføringen
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
         // ganges med -1 for at få rigtigt fortegn til udregning
159 159
         $this->value['saldo_vat_abroad'] = $account_vat_abroad->get('saldo');
160
-        $saldo_total += -1 * $this->value['saldo_vat_abroad'];
160
+        $saldo_total += -1*$this->value['saldo_vat_abroad'];
161 161
 
162 162
         // Købsmoms
163 163
         // Købsmomsen inkluderer også den udregnede moms af moms af varekøb i udlandet.
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
              $this->error->set('Systemet kunne ikke opdatere indgående moms');
283 283
         }
284 284
 
285
-        if ($this->error->isError()){
285
+        if ($this->error->isError()) {
286 286
             return false;
287 287
         }
288 288
 
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 
291 291
         $voucher_file = new VoucherFile($voucher);
292 292
         if (!$voucher_file->save(array(
293
-            'description' => 'Momsafregning ' . $this->get('date_start_dk') . ' til ' . $this->get('date_end_dk'),
293
+            'description' => 'Momsafregning '.$this->get('date_start_dk').' til '.$this->get('date_end_dk'),
294 294
             'belong_to' => 'vat',
295 295
             'belong_to_id' => $this->getId()))) {
296 296
             $this->error->merge($voucher_file->error->getMessage());
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/YearGateway.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     function findById($id, $load_active = true)
30 30
     {
31 31
         require_once dirname(__FILE__) . '/Year.php';
32
-    	return new Year($this->kernel, $id, $load_active);
32
+        return new Year($this->kernel, $id, $load_active);
33 33
     }
34 34
 
35 35
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
     function findById($id, $load_active = true)
30 30
     {
31
-        require_once dirname(__FILE__) . '/Year.php';
31
+        require_once dirname(__FILE__).'/Year.php';
32 32
     	return new Year($this->kernel, $id, $load_active);
33 33
     }
34 34
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $sql = "SELECT id FROM accounting_voucher
64 64
             WHERE intranet_id = ".$this->kernel->intranet->get('id')."
65
-            AND id = " . (int)$voucher_id . "
65
+            AND id = " . (int)$voucher_id."
66 66
             LIMIT 1";
67 67
 
68 68
         $db = new DB_Sql;
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/standardaccounts.php 1 patch
Spacing   +173 added lines, -173 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@  discard block
 block discarded – undo
13 13
 
14 14
 /**********************************************/
15 15
 
16
-$standardaccounts[$i]['number']	                 = '1000';
16
+$standardaccounts[$i]['number'] = '1000';
17 17
 $standardaccounts[$i]['name']			         = 'Indtægter';
18 18
 $standardaccounts[$i]['type_key']			     = '1';
19
-$standardaccounts[$i]['use_key']			     = '1';
20
-$standardaccounts[$i]['vat_key']	             = '0';
19
+$standardaccounts[$i]['use_key'] = '1';
20
+$standardaccounts[$i]['vat_key'] = '0';
21 21
 $standardaccounts[$i]['result_account_id_start'] = true;
22 22
 
23 23
 
@@ -25,27 +25,27 @@  discard block
 block discarded – undo
25 25
 
26 26
 $standardaccounts[$i]['number']	= '1110';
27 27
 $standardaccounts[$i]['name']			= 'Salg med moms';
28
-$standardaccounts[$i]['type_key']			= '2';
29
-$standardaccounts[$i]['use_key']			= '2';
30
-$standardaccounts[$i]['vat_key']	= '2';
28
+$standardaccounts[$i]['type_key'] = '2';
29
+$standardaccounts[$i]['use_key'] = '2';
30
+$standardaccounts[$i]['vat_key'] = '2';
31 31
 
32 32
 $i++;
33 33
 
34 34
 $standardaccounts[$i]['number']	= '1120';
35 35
 $standardaccounts[$i]['name']			= 'Salg uden moms';
36
-$standardaccounts[$i]['type_key']			= '2';
37
-$standardaccounts[$i]['use_key']			= '2';
38
-$standardaccounts[$i]['vat_key']	= '0';
36
+$standardaccounts[$i]['type_key'] = '2';
37
+$standardaccounts[$i]['use_key'] = '2';
38
+$standardaccounts[$i]['vat_key'] = '0';
39 39
 
40 40
 $i++;
41 41
 
42 42
 $standardaccounts[$i]['number']	= '1990';
43 43
 $standardaccounts[$i]['name']			= 'Nettoomsætning';
44
-$standardaccounts[$i]['type_key']			= '5';
45
-$standardaccounts[$i]['vat_key']	= '0';
46
-$standardaccounts[$i]['sum_from']	= '2';
47
-$standardaccounts[$i]['sum_to']	= '1989';
48
-$standardaccounts[$i]['use_key']			= '1';
44
+$standardaccounts[$i]['type_key'] = '5';
45
+$standardaccounts[$i]['vat_key'] = '0';
46
+$standardaccounts[$i]['sum_from'] = '2';
47
+$standardaccounts[$i]['sum_to'] = '1989';
48
+$standardaccounts[$i]['use_key'] = '1';
49 49
 
50 50
 $i++;
51 51
 
@@ -53,112 +53,112 @@  discard block
 block discarded – undo
53 53
 
54 54
 $standardaccounts[$i]['number']	= '2000';
55 55
 $standardaccounts[$i]['name']			= 'Udgifter';
56
-$standardaccounts[$i]['type_key']			= '1';
57
-$standardaccounts[$i]['use_key']			= '1';
58
-$standardaccounts[$i]['vat_key']	= '0';
56
+$standardaccounts[$i]['type_key'] = '1';
57
+$standardaccounts[$i]['use_key'] = '1';
58
+$standardaccounts[$i]['vat_key'] = '0';
59 59
 
60 60
 $i++;
61 61
 
62 62
 $standardaccounts[$i]['number']	= '2100';
63 63
 $standardaccounts[$i]['name']			= 'Vareforbrug fra varelager';
64
-$standardaccounts[$i]['type_key']			= '2';
65
-$standardaccounts[$i]['use_key']			= '3';
66
-$standardaccounts[$i]['vat_key']	= '0';
64
+$standardaccounts[$i]['type_key'] = '2';
65
+$standardaccounts[$i]['use_key'] = '3';
66
+$standardaccounts[$i]['vat_key'] = '0';
67 67
 
68 68
 $i++;
69 69
 
70 70
 $standardaccounts[$i]['number']	= '4100';
71 71
 $standardaccounts[$i]['name']			= 'EU-purchases';
72
-$standardaccounts[$i]['type_key']			= '2';
73
-$standardaccounts[$i]['use_key']			= '3';
74
-$standardaccounts[$i]['vat_key']	= '0';
75
-$standardaccounts[$i]['buy_eu']	= 1;
72
+$standardaccounts[$i]['type_key'] = '2';
73
+$standardaccounts[$i]['use_key'] = '3';
74
+$standardaccounts[$i]['vat_key'] = '0';
75
+$standardaccounts[$i]['buy_eu'] = 1;
76 76
 
77 77
 $i++;
78 78
 
79 79
 $standardaccounts[$i]['number']	= '4700';
80 80
 $standardaccounts[$i]['name']			= 'Varekøb uden for EU';
81 81
 $standardaccounts[$i]['type_key']			= '2';
82
-$standardaccounts[$i]['use_key']			= '3';
83
-$standardaccounts[$i]['vat_key']	= '0';
82
+$standardaccounts[$i]['use_key'] = '3';
83
+$standardaccounts[$i]['vat_key'] = '0';
84 84
 $standardaccounts[$i]['buy_abroad']	= 1;
85 85
 
86 86
 $i++;
87 87
 
88 88
 $standardaccounts[$i]['number']	= '4990';
89 89
 $standardaccounts[$i]['name']			= 'Dækningsbidrag';
90
-$standardaccounts[$i]['type_key']			= '5';
91
-$standardaccounts[$i]['vat_key']	= '0';
92
-$standardaccounts[$i]['sum_from']	= '1';
93
-$standardaccounts[$i]['sum_to']	= '4989';
94
-$standardaccounts[$i]['use_key']			= '1';
90
+$standardaccounts[$i]['type_key'] = '5';
91
+$standardaccounts[$i]['vat_key'] = '0';
92
+$standardaccounts[$i]['sum_from'] = '1';
93
+$standardaccounts[$i]['sum_to'] = '4989';
94
+$standardaccounts[$i]['use_key'] = '1';
95 95
 
96 96
 $i++;
97 97
 
98 98
 $standardaccounts[$i]['number']	= '7000';
99 99
 $standardaccounts[$i]['name']			= 'Kontorartikler';
100
-$standardaccounts[$i]['type_key']			= '2';
101
-$standardaccounts[$i]['vat_key']	= '1';
102
-$standardaccounts[$i]['use_key']			= '3';
100
+$standardaccounts[$i]['type_key'] = '2';
101
+$standardaccounts[$i]['vat_key'] = '1';
102
+$standardaccounts[$i]['use_key'] = '3';
103 103
 
104 104
 $i++;
105 105
 
106 106
 $standardaccounts[$i]['number']	= '7200';
107 107
 $standardaccounts[$i]['name']			= 'Porto';
108
-$standardaccounts[$i]['type_key']			= '2';
109
-$standardaccounts[$i]['use_key']			= '3';
110
-$standardaccounts[$i]['vat_key']	= '0';
108
+$standardaccounts[$i]['type_key'] = '2';
109
+$standardaccounts[$i]['use_key'] = '3';
110
+$standardaccounts[$i]['vat_key'] = '0';
111 111
 
112 112
 $i++;
113 113
 
114 114
 $standardaccounts[$i]['number']	= '7400';
115 115
 $standardaccounts[$i]['name']			= 'Småanskaffelser';
116
-$standardaccounts[$i]['type_key']			= '2';
117
-$standardaccounts[$i]['use_key']			= '3';
118
-$standardaccounts[$i]['vat_key']	= '1';
116
+$standardaccounts[$i]['type_key'] = '2';
117
+$standardaccounts[$i]['use_key'] = '3';
118
+$standardaccounts[$i]['vat_key'] = '1';
119 119
 
120 120
 $i++;
121 121
 
122 122
 $standardaccounts[$i]['number']	= '7600';
123 123
 $standardaccounts[$i]['name']			= 'Telefon';
124
-$standardaccounts[$i]['type_key']			= '2';
125
-$standardaccounts[$i]['use_key']			= '3';
126
-$standardaccounts[$i]['vat_key']	= '1';
124
+$standardaccounts[$i]['type_key'] = '2';
125
+$standardaccounts[$i]['use_key'] = '3';
126
+$standardaccounts[$i]['vat_key'] = '1';
127 127
 
128 128
 $i++;
129 129
 
130 130
 $standardaccounts[$i]['number']	= '7650';
131 131
 $standardaccounts[$i]['name']			= 'Internet og webhotel';
132
-$standardaccounts[$i]['type_key']			= '2';
133
-$standardaccounts[$i]['use_key']			= '3';
134
-$standardaccounts[$i]['vat_key']	= '1';
132
+$standardaccounts[$i]['type_key'] = '2';
133
+$standardaccounts[$i]['use_key'] = '3';
134
+$standardaccounts[$i]['vat_key'] = '1';
135 135
 
136 136
 $i++;
137 137
 
138 138
 $standardaccounts[$i]['number']	= '7800';
139 139
 $standardaccounts[$i]['name']			= 'Diverse incl. moms';
140
-$standardaccounts[$i]['type_key']			= '2';
141
-$standardaccounts[$i]['use_key']			= '3';
142
-$standardaccounts[$i]['vat_key']	= '1';
140
+$standardaccounts[$i]['type_key'] = '2';
141
+$standardaccounts[$i]['use_key'] = '3';
142
+$standardaccounts[$i]['vat_key'] = '1';
143 143
 
144 144
 $i++;
145 145
 
146 146
 $standardaccounts[$i]['number']	= '7900';
147 147
 $standardaccounts[$i]['name']			= 'Diverse excl. moms';
148
-$standardaccounts[$i]['type_key']			= '2';
149
-$standardaccounts[$i]['use_key']			= '3';
150
-$standardaccounts[$i]['vat_key']	= '0';
148
+$standardaccounts[$i]['type_key'] = '2';
149
+$standardaccounts[$i]['use_key'] = '3';
150
+$standardaccounts[$i]['vat_key'] = '0';
151 151
 
152 152
 $i++;
153 153
 
154 154
 
155 155
 $standardaccounts[$i]['number']	= '39990';
156 156
 $standardaccounts[$i]['name']			= 'Resultat før renter';
157
-$standardaccounts[$i]['type_key']			= '5';
158
-$standardaccounts[$i]['vat_key']	= '0';
159
-$standardaccounts[$i]['sum_from']	= '1';
160
-$standardaccounts[$i]['sum_to']	= '39989';
161
-$standardaccounts[$i]['use_key']			= '1';
157
+$standardaccounts[$i]['type_key'] = '5';
158
+$standardaccounts[$i]['vat_key'] = '0';
159
+$standardaccounts[$i]['sum_from'] = '1';
160
+$standardaccounts[$i]['sum_to'] = '39989';
161
+$standardaccounts[$i]['use_key'] = '1';
162 162
 
163 163
 $i++;
164 164
 
@@ -166,64 +166,64 @@  discard block
 block discarded – undo
166 166
 
167 167
 $standardaccounts[$i]['number']	= '40000';
168 168
 $standardaccounts[$i]['name']			= 'Finansieringsindtægter';
169
-$standardaccounts[$i]['type_key']			= '1';
170
-$standardaccounts[$i]['use_key']			= '1';
171
-$standardaccounts[$i]['vat_key']	= '0';
169
+$standardaccounts[$i]['type_key'] = '1';
170
+$standardaccounts[$i]['use_key'] = '1';
171
+$standardaccounts[$i]['vat_key'] = '0';
172 172
 
173 173
 
174 174
 $i++;
175 175
 
176 176
 $standardaccounts[$i]['number']	= '41000';
177 177
 $standardaccounts[$i]['name']			= 'Renteindtægter';
178
-$standardaccounts[$i]['type_key']			= '2';
179
-$standardaccounts[$i]['use_key']			= '1';
180
-$standardaccounts[$i]['vat_key']	= '0';
178
+$standardaccounts[$i]['type_key'] = '2';
179
+$standardaccounts[$i]['use_key'] = '1';
180
+$standardaccounts[$i]['vat_key'] = '0';
181 181
 
182 182
 $i++;
183 183
 
184 184
 $standardaccounts[$i]['number']	= '43000';
185 185
 $standardaccounts[$i]['name']			= 'Finansieringsudgifter';
186
-$standardaccounts[$i]['type_key']			= '1';
187
-$standardaccounts[$i]['use_key']			= '1';
188
-$standardaccounts[$i]['vat_key']	= '0';
186
+$standardaccounts[$i]['type_key'] = '1';
187
+$standardaccounts[$i]['use_key'] = '1';
188
+$standardaccounts[$i]['vat_key'] = '0';
189 189
 
190 190
 $i++;
191 191
 
192 192
 $standardaccounts[$i]['number']	= '43100';
193 193
 $standardaccounts[$i]['name']			= 'Renteudgifter';
194
-$standardaccounts[$i]['type_key']			= '2';
195
-$standardaccounts[$i]['use_key']			= '1';
196
-$standardaccounts[$i]['vat_key']	= '0';
194
+$standardaccounts[$i]['type_key'] = '2';
195
+$standardaccounts[$i]['use_key'] = '1';
196
+$standardaccounts[$i]['vat_key'] = '0';
197 197
 
198 198
 $i++;
199 199
 
200 200
 
201 201
 $standardaccounts[$i]['number']	= '43850';
202 202
 $standardaccounts[$i]['name']			= 'Bankgebyr';
203
-$standardaccounts[$i]['type_key']			= '2';
204
-$standardaccounts[$i]['use_key']			= '1';
205
-$standardaccounts[$i]['vat_key']	= '0';
203
+$standardaccounts[$i]['type_key'] = '2';
204
+$standardaccounts[$i]['use_key'] = '1';
205
+$standardaccounts[$i]['vat_key'] = '0';
206 206
 
207 207
 $i++;
208 208
 
209 209
 $standardaccounts[$i]['number']	= '43990';
210 210
 $standardaccounts[$i]['name']			= 'Finansieringsudgifter';
211
-$standardaccounts[$i]['type_key']			= '5';
212
-$standardaccounts[$i]['vat_key']	= '0';
213
-$standardaccounts[$i]['sum_from']	= '43000';
214
-$standardaccounts[$i]['sum_to']	= '43995';
215
-$standardaccounts[$i]['use_key']			= '1';
211
+$standardaccounts[$i]['type_key'] = '5';
212
+$standardaccounts[$i]['vat_key'] = '0';
213
+$standardaccounts[$i]['sum_from'] = '43000';
214
+$standardaccounts[$i]['sum_to'] = '43995';
215
+$standardaccounts[$i]['use_key'] = '1';
216 216
 
217 217
 $i++;
218 218
 
219 219
 $standardaccounts[$i]['number']	= '49990';
220 220
 $standardaccounts[$i]['name']			= 'Periodens resultat';
221
-$standardaccounts[$i]['type_key']			= '5';
222
-$standardaccounts[$i]['vat_key']	= '0';
223
-$standardaccounts[$i]['sum_from']	= '1';
224
-$standardaccounts[$i]['sum_to']	= '43989';
225
-$standardaccounts[$i]['use_key']			= '1';
226
-$standardaccounts[$i]['result_account_id_end']			= true;
221
+$standardaccounts[$i]['type_key'] = '5';
222
+$standardaccounts[$i]['vat_key'] = '0';
223
+$standardaccounts[$i]['sum_from'] = '1';
224
+$standardaccounts[$i]['sum_to'] = '43989';
225
+$standardaccounts[$i]['use_key'] = '1';
226
+$standardaccounts[$i]['result_account_id_end'] = true;
227 227
 
228 228
 
229 229
 $i++;
@@ -232,10 +232,10 @@  discard block
 block discarded – undo
232 232
 
233 233
 $standardaccounts[$i]['number']	= '50000';
234 234
 $standardaccounts[$i]['name']			= 'Balance';
235
-$standardaccounts[$i]['type_key']			= '1';
236
-$standardaccounts[$i]['vat_key']	= '0';
237
-$standardaccounts[$i]['use_key']			= '1';
238
-$standardaccounts[$i]['balance_account_id_start']			= true;
235
+$standardaccounts[$i]['type_key'] = '1';
236
+$standardaccounts[$i]['vat_key'] = '0';
237
+$standardaccounts[$i]['use_key'] = '1';
238
+$standardaccounts[$i]['balance_account_id_start'] = true;
239 239
 
240 240
 $i++;
241 241
 
@@ -243,99 +243,99 @@  discard block
 block discarded – undo
243 243
 
244 244
 $standardaccounts[$i]['number']	= '50010';
245 245
 $standardaccounts[$i]['name']			= 'Aktiver';
246
-$standardaccounts[$i]['type_key']			= '1';
247
-$standardaccounts[$i]['vat_key']	= '0';
248
-$standardaccounts[$i]['use_key']			= '1';
246
+$standardaccounts[$i]['type_key'] = '1';
247
+$standardaccounts[$i]['vat_key'] = '0';
248
+$standardaccounts[$i]['use_key'] = '1';
249 249
 
250 250
 $i++;
251 251
 
252 252
 
253 253
 $standardaccounts[$i]['number']	= '50800';
254 254
 $standardaccounts[$i]['name']			= 'Driftssmidler';
255
-$standardaccounts[$i]['type_key']			= '3';
256
-$standardaccounts[$i]['vat_key']	= '1';
257
-$standardaccounts[$i]['use_key']			= '1';
255
+$standardaccounts[$i]['type_key'] = '3';
256
+$standardaccounts[$i]['vat_key'] = '1';
257
+$standardaccounts[$i]['use_key'] = '1';
258 258
 
259 259
 $i++;
260 260
 
261 261
 $standardaccounts[$i]['number']	= '50810';
262 262
 $standardaccounts[$i]['name']			= 'Tilgang i årets løb';
263
-$standardaccounts[$i]['type_key']			= '3';
264
-$standardaccounts[$i]['vat_key']	= '1';
265
-$standardaccounts[$i]['use_key']			= '1';
263
+$standardaccounts[$i]['type_key'] = '3';
264
+$standardaccounts[$i]['vat_key'] = '1';
265
+$standardaccounts[$i]['use_key'] = '1';
266 266
 
267 267
 $i++;
268 268
 
269 269
 $standardaccounts[$i]['number']	= '50820';
270 270
 $standardaccounts[$i]['name']			= 'Afgang i året';
271
-$standardaccounts[$i]['type_key']			= '3';
272
-$standardaccounts[$i]['vat_key']	= '2';
273
-$standardaccounts[$i]['use_key']			= '1';
271
+$standardaccounts[$i]['type_key'] = '3';
272
+$standardaccounts[$i]['vat_key'] = '2';
273
+$standardaccounts[$i]['use_key'] = '1';
274 274
 
275 275
 $i++;
276 276
 
277 277
 $standardaccounts[$i]['number']	= '50830';
278 278
 $standardaccounts[$i]['name']			= 'Akkumulerede afskrivning på driftssmidler';
279
-$standardaccounts[$i]['type_key']			= '3';
280
-$standardaccounts[$i]['vat_key']	= '0';
281
-$standardaccounts[$i]['use_key']			= '1';
279
+$standardaccounts[$i]['type_key'] = '3';
280
+$standardaccounts[$i]['vat_key'] = '0';
281
+$standardaccounts[$i]['use_key'] = '1';
282 282
 
283 283
 $i++;
284 284
 
285 285
 
286 286
 $standardaccounts[$i]['number']	= '55100';
287 287
 $standardaccounts[$i]['name']			= 'Varelager';
288
-$standardaccounts[$i]['type_key']			= '3';
289
-$standardaccounts[$i]['vat_key']	= '1';
290
-$standardaccounts[$i]['use_key']			= '1';
288
+$standardaccounts[$i]['type_key'] = '3';
289
+$standardaccounts[$i]['vat_key'] = '1';
290
+$standardaccounts[$i]['use_key'] = '1';
291 291
 
292 292
 $i++;
293 293
 
294 294
 $standardaccounts[$i]['number']	= '56100';
295 295
 $standardaccounts[$i]['name']			= 'Debitor';
296
-$standardaccounts[$i]['type_key']			= '3';
297
-$standardaccounts[$i]['vat_key']	= '0';
296
+$standardaccounts[$i]['type_key'] = '3';
297
+$standardaccounts[$i]['vat_key'] = '0';
298 298
 $standardaccounts[$i]['use_key']			= '4';
299 299
 $standardaccounts[$i]['setting']			= 'debtor';
300
-$standardaccounts[$i]['balance_account']	= 1;
300
+$standardaccounts[$i]['balance_account'] = 1;
301 301
 
302 302
 $i++;
303 303
 
304 304
 $standardaccounts[$i]['number']	= '58000';
305 305
 $standardaccounts[$i]['name']			= 'Bank, folio';
306
-$standardaccounts[$i]['type_key']			= '3';
307
-$standardaccounts[$i]['vat_key']	= '0';
308
-$standardaccounts[$i]['use_key']			= '4';
309
-$standardaccounts[$i]['balance_account']			= 1;
306
+$standardaccounts[$i]['type_key'] = '3';
307
+$standardaccounts[$i]['vat_key'] = '0';
308
+$standardaccounts[$i]['use_key'] = '4';
309
+$standardaccounts[$i]['balance_account'] = 1;
310 310
 
311 311
 $i++;
312 312
 
313 313
 $standardaccounts[$i]['number']	= '58200';
314 314
 $standardaccounts[$i]['name']			= 'Kassen';
315
-$standardaccounts[$i]['type_key']			= '3';
316
-$standardaccounts[$i]['vat_key']	= '0';
317
-$standardaccounts[$i]['use_key']			= '4';
318
-$standardaccounts[$i]['balance_account']			= 1;
315
+$standardaccounts[$i]['type_key'] = '3';
316
+$standardaccounts[$i]['vat_key'] = '0';
317
+$standardaccounts[$i]['use_key'] = '4';
318
+$standardaccounts[$i]['balance_account'] = 1;
319 319
 
320 320
 $i++;
321 321
 
322 322
 $standardaccounts[$i]['number']	= '58990';
323 323
 $standardaccounts[$i]['name']			= 'Likvide beholdninger';
324
-$standardaccounts[$i]['type_key']			= '3';
325
-$standardaccounts[$i]['vat_key']	= '0';
326
-$standardaccounts[$i]['sum_from']	= '58000';
327
-$standardaccounts[$i]['sum_to']	= '58995';
328
-$standardaccounts[$i]['use_key']			= '1';
324
+$standardaccounts[$i]['type_key'] = '3';
325
+$standardaccounts[$i]['vat_key'] = '0';
326
+$standardaccounts[$i]['sum_from'] = '58000';
327
+$standardaccounts[$i]['sum_to'] = '58995';
328
+$standardaccounts[$i]['use_key'] = '1';
329 329
 
330 330
 $i++;
331 331
 
332 332
 $standardaccounts[$i]['number']	= '58995';
333 333
 $standardaccounts[$i]['name']			= 'Aktiver i alt';
334
-$standardaccounts[$i]['type_key']			= '5';
335
-$standardaccounts[$i]['vat_key']	= '0';
336
-$standardaccounts[$i]['sum_from']	= '50000';
337
-$standardaccounts[$i]['sum_to']	= '58995';
338
-$standardaccounts[$i]['use_key']			= '1';
334
+$standardaccounts[$i]['type_key'] = '5';
335
+$standardaccounts[$i]['vat_key'] = '0';
336
+$standardaccounts[$i]['sum_from'] = '50000';
337
+$standardaccounts[$i]['sum_to'] = '58995';
338
+$standardaccounts[$i]['use_key'] = '1';
339 339
 
340 340
 $i++;
341 341
 
@@ -344,25 +344,25 @@  discard block
 block discarded – undo
344 344
 
345 345
 $standardaccounts[$i]['number']	= '60000';
346 346
 $standardaccounts[$i]['name']			= 'Passiver';
347
-$standardaccounts[$i]['type_key']			= '1';
348
-$standardaccounts[$i]['vat_key']	= '0';
349
-$standardaccounts[$i]['use_key']			= '1';
347
+$standardaccounts[$i]['type_key'] = '1';
348
+$standardaccounts[$i]['vat_key'] = '0';
349
+$standardaccounts[$i]['use_key'] = '1';
350 350
 
351 351
 $i++;
352 352
 
353 353
 $standardaccounts[$i]['number']	= '60500';
354 354
 $standardaccounts[$i]['name']			= 'Kapitalkonto';
355
-$standardaccounts[$i]['type_key']			= '4';
356
-$standardaccounts[$i]['vat_key']	= '0';
357
-$standardaccounts[$i]['use_key']			= '1';
355
+$standardaccounts[$i]['type_key'] = '4';
356
+$standardaccounts[$i]['vat_key'] = '0';
357
+$standardaccounts[$i]['use_key'] = '1';
358 358
 $standardaccounts[$i]['capital_account'] = 1;
359 359
 
360 360
 $i++;
361 361
 
362 362
 $standardaccounts[$i]['number']	= '60800';
363 363
 $standardaccounts[$i]['name']			= 'Årets resultat';
364
-$standardaccounts[$i]['type_key']			= '4';
365
-$standardaccounts[$i]['vat_key']	= '0';
364
+$standardaccounts[$i]['type_key'] = '4';
365
+$standardaccounts[$i]['vat_key'] = '0';
366 366
 $standardaccounts[$i]['use_key']			= '1';
367 367
 $standardaccounts[$i]['setting']			= 'result';
368 368
 
@@ -370,26 +370,26 @@  discard block
 block discarded – undo
370 370
 
371 371
 $standardaccounts[$i]['number']	= '61000';
372 372
 $standardaccounts[$i]['name']			= 'Privatkonto';
373
-$standardaccounts[$i]['type_key']			= '4';
374
-$standardaccounts[$i]['vat_key']	= '0';
375
-$standardaccounts[$i]['use_key']			= '1';
373
+$standardaccounts[$i]['type_key'] = '4';
374
+$standardaccounts[$i]['vat_key'] = '0';
375
+$standardaccounts[$i]['use_key'] = '1';
376 376
 
377 377
 $i++;
378 378
 
379 379
 
380 380
 $standardaccounts[$i]['number']	= '63100';
381 381
 $standardaccounts[$i]['name']			= 'Kortfristet gæld';
382
-$standardaccounts[$i]['type_key']			= '4';
383
-$standardaccounts[$i]['vat_key']	= '0';
384
-$standardaccounts[$i]['use_key']			= '1';
382
+$standardaccounts[$i]['type_key'] = '4';
383
+$standardaccounts[$i]['vat_key'] = '0';
384
+$standardaccounts[$i]['use_key'] = '1';
385 385
 
386 386
 $i++;
387 387
 
388 388
 $standardaccounts[$i]['number']	= '65100';
389 389
 $standardaccounts[$i]['name']			= 'Langfristet gæld';
390
-$standardaccounts[$i]['type_key']			= '4';
391
-$standardaccounts[$i]['vat_key']	= '0';
392
-$standardaccounts[$i]['use_key']			= '1';
390
+$standardaccounts[$i]['type_key'] = '4';
391
+$standardaccounts[$i]['vat_key'] = '0';
392
+$standardaccounts[$i]['use_key'] = '1';
393 393
 
394 394
 $i++;
395 395
 
@@ -398,16 +398,16 @@  discard block
 block discarded – undo
398 398
 
399 399
 $standardaccounts[$i]['number']	= '66000';
400 400
 $standardaccounts[$i]['name']			= 'Momskonti';
401
-$standardaccounts[$i]['type_key']			= '1';
402
-$standardaccounts[$i]['vat_key']	= '0';
403
-$standardaccounts[$i]['use_key']			= '1';
401
+$standardaccounts[$i]['type_key'] = '1';
402
+$standardaccounts[$i]['vat_key'] = '0';
403
+$standardaccounts[$i]['use_key'] = '1';
404 404
 
405 405
 $i++;
406 406
 
407 407
 $standardaccounts[$i]['number']	= '66100';
408 408
 $standardaccounts[$i]['name']			= 'Moms, indgående, køb';
409
-$standardaccounts[$i]['type_key']			= '4';
410
-$standardaccounts[$i]['vat_key']	= '0';
409
+$standardaccounts[$i]['type_key'] = '4';
410
+$standardaccounts[$i]['vat_key'] = '0';
411 411
 $standardaccounts[$i]['use_key']			= '1';
412 412
 $standardaccounts[$i]['setting']			= 'vat_in';
413 413
 
@@ -415,8 +415,8 @@  discard block
 block discarded – undo
415 415
 
416 416
 $standardaccounts[$i]['number']	= '66150';
417 417
 $standardaccounts[$i]['name']			= 'Moms af varekøb i udlandet';
418
-$standardaccounts[$i]['type_key']			= '4';
419
-$standardaccounts[$i]['vat_key']	= '0';
418
+$standardaccounts[$i]['type_key'] = '4';
419
+$standardaccounts[$i]['vat_key'] = '0';
420 420
 $standardaccounts[$i]['use_key']			= '1';
421 421
 $standardaccounts[$i]['setting']			= 'vat_abroad';
422 422
 
@@ -424,8 +424,8 @@  discard block
 block discarded – undo
424 424
 
425 425
 $standardaccounts[$i]['number']	= '66200';
426 426
 $standardaccounts[$i]['name']			= 'Moms, udgående, salg';
427
-$standardaccounts[$i]['type_key']			= '4';
428
-$standardaccounts[$i]['vat_key']	= '0';
427
+$standardaccounts[$i]['type_key'] = '4';
428
+$standardaccounts[$i]['vat_key'] = '0';
429 429
 $standardaccounts[$i]['use_key']			= '1';
430 430
 $standardaccounts[$i]['setting']			= 'vat_out';
431 431
 
@@ -433,8 +433,8 @@  discard block
 block discarded – undo
433 433
 
434 434
 $standardaccounts[$i]['number']	= '66900';
435 435
 $standardaccounts[$i]['name']			= 'Moms, tilsvar';
436
-$standardaccounts[$i]['type_key']			= '4';
437
-$standardaccounts[$i]['vat_key']	= '0';
436
+$standardaccounts[$i]['type_key'] = '4';
437
+$standardaccounts[$i]['vat_key'] = '0';
438 438
 $standardaccounts[$i]['use_key']			= '1';
439 439
 $standardaccounts[$i]['setting']			= 'vat_balance';
440 440
 
@@ -442,42 +442,42 @@  discard block
 block discarded – undo
442 442
 
443 443
 $standardaccounts[$i]['number']	= '66990';
444 444
 $standardaccounts[$i]['name']			= 'Passiver i alt';
445
-$standardaccounts[$i]['type_key']			= '5';
446
-$standardaccounts[$i]['vat_key']	= '0';
447
-$standardaccounts[$i]['sum_from']	= '60000';
448
-$standardaccounts[$i]['sum_to']	= '70000';
449
-$standardaccounts[$i]['use_key']			= '1';
450
-$standardaccounts[$i]['balance_account_id_end']			= true;
445
+$standardaccounts[$i]['type_key'] = '5';
446
+$standardaccounts[$i]['vat_key'] = '0';
447
+$standardaccounts[$i]['sum_from'] = '60000';
448
+$standardaccounts[$i]['sum_to'] = '70000';
449
+$standardaccounts[$i]['use_key'] = '1';
450
+$standardaccounts[$i]['balance_account_id_end'] = true;
451 451
 
452 452
 
453 453
 $i++;
454 454
 
455 455
 $standardaccounts[$i]['number']	= '98000';
456 456
 $standardaccounts[$i]['name']			= 'Balancen i alt';
457
-$standardaccounts[$i]['type_key']			= '5';
458
-$standardaccounts[$i]['vat_key']	= '0';
459
-$standardaccounts[$i]['sum_from']	= '50000';
460
-$standardaccounts[$i]['sum_to']	= '97999';
461
-$standardaccounts[$i]['use_key']			= '1';
457
+$standardaccounts[$i]['type_key'] = '5';
458
+$standardaccounts[$i]['vat_key'] = '0';
459
+$standardaccounts[$i]['sum_from'] = '50000';
460
+$standardaccounts[$i]['sum_to'] = '97999';
461
+$standardaccounts[$i]['use_key'] = '1';
462 462
 
463 463
 
464 464
 $i++;
465 465
 
466 466
 $standardaccounts[$i]['number']	= '99000';
467 467
 $standardaccounts[$i]['name']			= 'Kontrol';
468
-$standardaccounts[$i]['type_key']			= '1';
469
-$standardaccounts[$i]['vat_key']	= '0';
470
-$standardaccounts[$i]['use_key']			= '1';
468
+$standardaccounts[$i]['type_key'] = '1';
469
+$standardaccounts[$i]['vat_key'] = '0';
470
+$standardaccounts[$i]['use_key'] = '1';
471 471
 
472 472
 
473 473
 $i++;
474 474
 
475 475
 $standardaccounts[$i]['number']	= '99990';
476 476
 $standardaccounts[$i]['name']			= 'Balancekontrol';
477
-$standardaccounts[$i]['type_key']			= '5';
478
-$standardaccounts[$i]['vat_key']	= '0';
479
-$standardaccounts[$i]['sum_from']	= '1';
480
-$standardaccounts[$i]['sum_to']	= '99990';
481
-$standardaccounts[$i]['use_key']			= '1';
477
+$standardaccounts[$i]['type_key'] = '5';
478
+$standardaccounts[$i]['vat_key'] = '0';
479
+$standardaccounts[$i]['sum_from'] = '1';
480
+$standardaccounts[$i]['sum_to'] = '99990';
481
+$standardaccounts[$i]['use_key'] = '1';
482 482
 
483 483
 $i++;
484 484
\ No newline at end of file
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/VatPeriodGateway.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
 
132 132
     function findFromId($id = 0)
133 133
     {
134
-    	require_once dirname(__FILE__) . '/VatPeriod.php';
134
+        require_once dirname(__FILE__) . '/VatPeriod.php';
135 135
         return new VatPeriod($this->year);
136 136
     }
137 137
 }
138 138
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
     public function __construct($year_object)
10 10
     {
11
-        $this->year  = $year_object;
11
+        $this->year = $year_object;
12 12
     }
13 13
 
14 14
     /**
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     public function getList()
20 20
     {
21 21
         $db = new DB_Sql;
22
-        $db->query("SELECT *, DATE_FORMAT(date_start, '%d-%m-%Y') AS date_start_dk, DATE_FORMAT(date_end, '%d-%m-%Y') AS date_end_dk FROM accounting_vat_period WHERE year_id = " . $this->year->get('id') . " AND intranet_id=" . $this->year->kernel->intranet->get('id') . " AND active = 1 ORDER BY date_start ASC");
22
+        $db->query("SELECT *, DATE_FORMAT(date_start, '%d-%m-%Y') AS date_start_dk, DATE_FORMAT(date_end, '%d-%m-%Y') AS date_end_dk FROM accounting_vat_period WHERE year_id = ".$this->year->get('id')." AND intranet_id=".$this->year->kernel->intranet->get('id')." AND active = 1 ORDER BY date_start ASC");
23 23
         $i   = 0;
24 24
         $vat = array();
25 25
         while ($db->nextRecord()) {
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function arePeriodsCreated()
42 42
     {
43 43
         $db = new DB_Sql;
44
-        $db->query("SELECT id FROM accounting_vat_period WHERE year_id = " . $this->year->get('id') . " AND intranet_id=" . $this->year->kernel->intranet->get('id'). " AND active=1");
44
+        $db->query("SELECT id FROM accounting_vat_period WHERE year_id = ".$this->year->get('id')." AND intranet_id=".$this->year->kernel->intranet->get('id')." AND active=1");
45 45
         return $db->numRows();
46 46
     }
47 47
 
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
         foreach ($periods['periods'] as $key=>$value) {
120 120
             $input = array(
121 121
                 'label'      => $value['name'],
122
-                'date_start' => $this->year->get('year') . '-' . $value['date_from'],
123
-                'date_end'   => $this->year->get('year') . '-' . $value['date_to'],
122
+                'date_start' => $this->year->get('year').'-'.$value['date_from'],
123
+                'date_end'   => $this->year->get('year').'-'.$value['date_to'],
124 124
             );
125 125
             $vatperiod = $this->findFromId();
126 126
             $vatperiod->save($input, 'insert');
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
     function findFromId($id = 0)
133 133
     {
134
-    	require_once dirname(__FILE__) . '/VatPeriod.php';
134
+    	require_once dirname(__FILE__).'/VatPeriod.php';
135 135
         return new VatPeriod($this->year);
136 136
     }
137 137
 }
138 138
\ No newline at end of file
Please login to merge, or discard this patch.