Completed
Pull Request — master (#26)
by Lars
10:03
created
modules/accounting/Controller/templates/state/depreciation.tpl.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             <?php
52 52
             $account = new Account($context->getYear()); // $product->get('state_account_id')
53 53
 
54
-            $accounts =  $account->getList('operating');
54
+            $accounts = $account->getList('operating');
55 55
             ?>
56 56
             <select id="state_account" name="state_account_id">
57 57
                 <option value=""><?php e(t('Choose')); ?></option>
@@ -84,6 +84,6 @@  discard block
 block discarded – undo
84 84
             <input type="submit" value="<?php e(t('State')); ?>" />
85 85
             <a href="<?php e(url('../')); ?>"><?php e(t('Cancel')); ?></a>
86 86
         </div>
87
-    <?php endif;  ?>
87
+    <?php endif; ?>
88 88
     </form>
89 89
 <?php endif; ?>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,10 +9,12 @@
 block discarded – undo
9 9
     <p>Gå til <a href="<?php e($accounting_module->getPath().'years.php'); ?>">regnskabet</a></p>
10 10
 <?php elseif ($depreciation->isStated()) : ?>
11 11
     <p><?php e(t('the depreciation is alredy stated')); ?>. <a href="<?php e($accounting_module->getPath().'voucher/'.$depreciation->get('voucher_id')); ?>"><?php e(t('see the voucher')); ?></a>.</p>
12
-<?php else : ?>
12
+<?php else {
13
+    : ?>
13 14
     <?php
14 15
     // need to be executed to generate errors!
15 16
     $depreciation->readyForState();
17
+}
16 18
     echo $depreciation->error->view();
17 19
     ?>
18 20
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Daybook.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -56,26 +56,26 @@  discard block
 block discarded – undo
56 56
             $tpl = $this->template->create('Intraface/Controller/templates/message');
57 57
             return $tpl->render($this, array(
58 58
                 'type' => 'dependent',
59
-                'content' => 'Du skal først oprette nogle konti, inden du kan taste poster ind i regnskabet. Du kan oprette en standardkontoplan under <a href="' .  $this->url('../year/' . $this->getYear()->get('id')) . '">regnskabsåret</a>.'));
59
+                'content' => 'Du skal først oprette nogle konti, inden du kan taste poster ind i regnskabet. Du kan oprette en standardkontoplan under <a href="'.$this->url('../year/'.$this->getYear()->get('id')).'">regnskabsåret</a>.'));
60 60
         } elseif ($this->getYear()->get('vat') == 1 and !$this->getYear()->vatAccountIsSet()) {
61 61
             $tpl = $this->template->create('Intraface/Controller/templates/message');
62 62
             return $tpl->render($this, array(
63 63
                 'type' => 'dependent',
64
-                'content' => 'Du har ikke sat momskonti. <a href="' . $this->url('../settings') . '">Gå til indstillingerne</a>.'));
64
+                'content' => 'Du har ikke sat momskonti. <a href="'.$this->url('../settings').'">Gå til indstillingerne</a>.'));
65 65
         }
66 66
 
67 67
         // the view to use
68 68
         $available_views = array('expenses', 'income', 'debtor');
69 69
 
70 70
         if (in_array($this->query('view'), $available_views)) {
71
-            $view_tpl = $this->template->create(dirname(__FILE__) . '/templates/daybook/' . $this->query('view'));
71
+            $view_tpl = $this->template->create(dirname(__FILE__).'/templates/daybook/'.$this->query('view'));
72 72
         } else {
73
-            $view_tpl = $this->template->create(dirname(__FILE__) . '/templates/daybook/default');
73
+            $view_tpl = $this->template->create(dirname(__FILE__).'/templates/daybook/default');
74 74
         }
75 75
 
76 76
         // posts in draft
77 77
         if (count($this->getPostsInDraft()) > 0) {
78
-            $draft_tpl = $this->template->create(dirname(__FILE__) . '/templates/daybook/posts');
78
+            $draft_tpl = $this->template->create(dirname(__FILE__).'/templates/daybook/posts');
79 79
             $draft = $draft_tpl->render($this);
80 80
         } else {
81 81
             $draft = '<p>Der er ikke nogen poster i kassekladden.</p>';
@@ -83,24 +83,24 @@  discard block
 block discarded – undo
83 83
 
84 84
         // initial message
85 85
         if ($this->getKernel()->getSetting()->get('user', 'accounting.daybook.message') == 'view') {
86
-            $msg_tpl = $this->template->create(dirname(__FILE__) . '/templates/daybook/message');
86
+            $msg_tpl = $this->template->create(dirname(__FILE__).'/templates/daybook/message');
87 87
             $message = $msg_tpl->render($this);
88 88
         } else {
89 89
             $message = '';
90 90
         }
91 91
 
92 92
         // cheatsheet
93
-        if ($this->getKernel()->getSetting()->get('user', 'accounting.daybook_cheatsheet')== 'true') {
94
-            $cheat_tpl = $this->template->create(dirname(__FILE__) . '/templates/daybook/cheatsheet');
93
+        if ($this->getKernel()->getSetting()->get('user', 'accounting.daybook_cheatsheet') == 'true') {
94
+            $cheat_tpl = $this->template->create(dirname(__FILE__).'/templates/daybook/cheatsheet');
95 95
             $cheatsheet = $cheat_tpl->render($this);
96 96
         } else {
97 97
             $cheatsheet = '<ul class="options">
98
-    			<li><a href="' . $this->url(null, array('quickhelp' => 'true')) . '">Slå hurtighjælp til</a></li>
98
+    			<li><a href="' . $this->url(null, array('quickhelp' => 'true')).'">Slå hurtighjælp til</a></li>
99 99
     			</ul>';
100 100
         }
101 101
 
102 102
         // outputting the entire page
103
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/daybook');
103
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/daybook');
104 104
         return $tpl->render($this, array(
105 105
             'cheatsheet' => $cheatsheet,
106 106
             'message' => $message,
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Search.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             $gateway = new Intraface_modules_accounting_YearGateway($this->getKernel());
24 24
 
25 25
             if ($year = $gateway->findByVoucherId($this->query('voucher_id'))) {
26
-                return new k_SeeOther($this->url('../year/' . $year->get('id') . '/voucher/' . $this->query('voucher_id')));
26
+                return new k_SeeOther($this->url('../year/'.$year->get('id').'/voucher/'.$this->query('voucher_id')));
27 27
             }
28 28
             throw new k_PageNotFound();
29 29
         } elseif ($this->query('search')) {
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                         case 'bilag':
51 51
                             // fall through
52 52
                         case 'voucher':
53
-                            $this->db_sql->query("SELECT * FROM accounting_voucher WHERE number >= " . $search_real[0] . " AND number <= " . $search_real[1] . " AND intranet_id = " . $year->kernel->intranet->get('id') . " AND year_id = " . $year->get('id'));
53
+                            $this->db_sql->query("SELECT * FROM accounting_voucher WHERE number >= ".$search_real[0]." AND number <= ".$search_real[1]." AND intranet_id = ".$year->kernel->intranet->get('id')." AND year_id = ".$year->get('id'));
54 54
                             //$i++;
55 55
                             $posts = array();
56 56
                             while ($this->db_sql->nextRecord()) {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             }
68 68
         }
69 69
 
70
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/search');
70
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/search');
71 71
         return $tpl->render($this, array('error' => $error, 'posts' => $posts));
72 72
     }
73 73
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Account/Show.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         $this->document->setTitle('Account');
39 39
 
40
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/account/show');
40
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/account/show');
41 41
         return $smarty->render($this, array('posts' => $posts, 'saldo' => $saldo));
42 42
     }
43 43
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $this->document->addScript($this->url('accounting/edit_account.js'));
47 47
 
48
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/account/edit');
48
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/account/edit');
49 49
         return $smarty->render($this);
50 50
     }
51 51
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/State/Payment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
             'year' => $this->getYear(),
36 36
             'accounting_module' => $accounting_module);
37 37
 
38
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/state/payment');
38
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/state/payment');
39 39
         return $smarty->render($this, $data);
40 40
     }
41 41
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/State/Creditnote.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
             return new k_SeeOther($this->url('selectyear'));
37 37
         }
38 38
 
39
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/state/creditnote');
39
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/state/creditnote');
40 40
         return $smarty->render($this);
41 41
 
42 42
     }
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/State/Invoice.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
             return new k_SeeOther($this->url('selectyear'));
29 29
         }
30 30
 
31
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/state/invoice');
31
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/state/invoice');
32 32
         return $smarty->render($this);
33 33
     }
34 34
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/State/Depreciation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
             'object' => $this->getDebtor(),
31 31
             'year' => $this->getYear());
32 32
 
33
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/state/depreciation');
33
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/state/depreciation');
34 34
         return $smarty->render($this, $data);
35 35
     }
36 36
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Voucher/Show.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,13 +44,13 @@
 block discarded – undo
44 44
         $voucher_file = new VoucherFile($this->getVoucher());
45 45
         $voucher_files = $voucher_file->getList();
46 46
 
47
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/voucher/show');
47
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/voucher/show');
48 48
         return $smarty->render($this);
49 49
     }
50 50
 
51 51
     function renderHtmlEdit()
52 52
     {
53
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/voucher/edit');
53
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/voucher/edit');
54 54
         return $smarty->render($this);
55 55
     }
56 56
 
Please login to merge, or discard this patch.