@@ -33,13 +33,13 @@ |
||
33 | 33 | <td><input type="checkbox" name="selected[]" value="<?php e($post['id']); ?>" /></td> |
34 | 34 | <td><?php e($post['date_dk']); ?></td> |
35 | 35 | <td><?php e($post['text']); ?></td> |
36 | - <td><a href="<?php e(url('../../accounts/' . $post['account_id'])); ?>"><?php e($post['account_name']); ?></a></td> |
|
36 | + <td><a href="<?php e(url('../../accounts/'.$post['account_id'])); ?>"><?php e($post['account_name']); ?></a></td> |
|
37 | 37 | <td class="amount"><?php e(amountToOutput($post['debet'])); ?></td> |
38 | 38 | <td class="amount"><?php e(amountToOutput($post['credit'])); ?></td> |
39 | 39 | <td class="options"> |
40 | 40 | <?php if ($post['stated'] == 0) : |
41 | 41 | $not_all_stated = true; ?> |
42 | - <a class="edit" href="<?php e(url('post/'. $post['id'], array('edit'))); ?>">Ret</a> |
|
42 | + <a class="edit" href="<?php e(url('post/'.$post['id'], array('edit'))); ?>">Ret</a> |
|
43 | 43 | <a class="delete" href="<?php e(url('post/'.$post['id'], array('delete'))); ?>">Slet</a> |
44 | 44 | <?php else : ?> |
45 | 45 | Bogført |
@@ -13,8 +13,11 @@ discard block |
||
13 | 13 | |
14 | 14 | <?php if (count($context->getPosts()) == 0) : ?> |
15 | 15 | <p class="warning">Der er ikke nogen poster på bilaget. <a href="<?php e(url('../post?create', array('voucher_id' => $context->getVoucher()->get('id')))); ?>">Indtast poster</a>.</p> |
16 | -<?php else : ?> |
|
17 | - <form action="<?php e(url(null)); ?>" method="post"> |
|
16 | +<?php else { |
|
17 | + : ?> |
|
18 | + <form action="<?php e(url(null)); |
|
19 | +} |
|
20 | +?>" method="post"> |
|
18 | 21 | <table> |
19 | 22 | <caption>Poster</caption> |
20 | 23 | <thead> |
@@ -41,9 +44,12 @@ discard block |
||
41 | 44 | $not_all_stated = true; ?> |
42 | 45 | <a class="edit" href="<?php e(url('post/'. $post['id'], array('edit'))); ?>">Ret</a> |
43 | 46 | <a class="delete" href="<?php e(url('post/'.$post['id'], array('delete'))); ?>">Slet</a> |
44 | - <?php else : ?> |
|
47 | + <?php else { |
|
48 | + : ?> |
|
45 | 49 | Bogført |
46 | - <?php endif; ?> |
|
50 | + <?php endif; |
|
51 | +} |
|
52 | +?> |
|
47 | 53 | </td> |
48 | 54 | </tr> |
49 | 55 |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <h1>Bilag</h1> |
2 | 2 | |
3 | 3 | <ul class="options"> |
4 | - <li><a class="excel" href="<?php e(url(null) . '.xls'); ?>" class="new">Poster som excel</a></li> |
|
4 | + <li><a class="excel" href="<?php e(url(null).'.xls'); ?>" class="new">Poster som excel</a></li> |
|
5 | 5 | </ul> |
6 | 6 | |
7 | 7 | <?php if (count($context->getPosts()) == 0) : ?> |
@@ -6,7 +6,8 @@ discard block |
||
6 | 6 | |
7 | 7 | <?php if (count($context->getPosts()) == 0) : ?> |
8 | 8 | <p>Der er ikke nogen bilag.</p> |
9 | -<?php else : ?> |
|
9 | +<?php else { |
|
10 | + : ?> |
|
10 | 11 | <table> |
11 | 12 | <caption>Bilag</caption> |
12 | 13 | <thead> |
@@ -18,7 +19,9 @@ discard block |
||
18 | 19 | </thead> |
19 | 20 | <?php foreach ($context->getPosts() as $post) : ?> |
20 | 21 | <tr> |
21 | - <td><a href="<?php e(url($post['id'])); ?>"><?php e($post['number']); ?></a></td> |
|
22 | + <td><a href="<?php e(url($post['id'])); |
|
23 | +} |
|
24 | +?>"><?php e($post['number']); ?></a></td> |
|
22 | 25 | <td><?php e($post['date_dk']); ?></td> |
23 | 26 | <td><?php e($post['text']); ?></td> |
24 | 27 | </tr> |
@@ -20,7 +20,7 @@ |
||
20 | 20 | <tbody> |
21 | 21 | <tr> |
22 | 22 | <td> |
23 | - <input tabindex="1" accesskey="1" name="date" type="text" size="7" value="<?php e($values['date']); ?>" /> |
|
23 | + <input tabindex="1" accesskey="1" name="date" type="text" size="7" value="<?php e($values['date']); ?>" /> |
|
24 | 24 | </td> |
25 | 25 | <td> |
26 | 26 | <input tabindex="2" name="voucher_number" id="voucher_number" type="text" size="5" value = "<?php e($values['voucher_number']); ?>" /> |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | <tbody> |
19 | 19 | <tr> |
20 | 20 | <td> |
21 | - <input tabindex="1" accesskey="1" name="date" id="date" type="text" size="7" value="<?php e($values['date']); ?>" /> |
|
21 | + <input tabindex="1" accesskey="1" name="date" id="date" type="text" size="7" value="<?php e($values['date']); ?>" /> |
|
22 | 22 | </td> |
23 | 23 | <td> |
24 | 24 | <input tabindex="2" name="voucher_number" id="voucher_number" type="text" size="5" value = "<?php e($values['voucher_number']); ?>" /> |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | <input tabindex="3" type="text" name="text" id="text" value="<?php e($values['text']); ?>" size="20" /> |
28 | 28 | </td> |
29 | 29 | <td> |
30 | - <input tabindex="4" type="text" name="debet_account_number" id="debet_account_number" value="<?php e($values['debet_account_number']); ?>" size="8" /> |
|
30 | + <input tabindex="4" type="text" name="debet_account_number" id="debet_account_number" value="<?php e($values['debet_account_number']); ?>" size="8" /> |
|
31 | 31 | <a href="<?php e($context->url('../account/popup')); ?>" id="debet_account_open">+</a> |
32 | 32 | <div id="debet_account_name"> </div> |
33 | 33 | </td> |
@@ -20,7 +20,7 @@ |
||
20 | 20 | <tbody> |
21 | 21 | <tr> |
22 | 22 | <td> |
23 | - <input tabindex="1" name="date" type="text" size="7" value="<?php e($values['date']); ?>" /> |
|
23 | + <input tabindex="1" name="date" type="text" size="7" value="<?php e($values['date']); ?>" /> |
|
24 | 24 | </td> |
25 | 25 | <td> |
26 | 26 | <input tabindex="2" name="voucher_number" id="voucher_number" type="text" size="5" value="<?php e($values['voucher_number']); ?>" /> |
@@ -16,15 +16,15 @@ |
||
16 | 16 | <?php foreach ($context->getPostsInDraft() as $p) : ?> |
17 | 17 | <tr> |
18 | 18 | <td><?php e($p['date_dk']); ?></td> |
19 | - <td><a href="<?php e(url('../voucher/' . $p['voucher_id'])); ?>"><?php e($p['voucher_number']); ?></a></td> |
|
19 | + <td><a href="<?php e(url('../voucher/'.$p['voucher_id'])); ?>"><?php e($p['voucher_number']); ?></a></td> |
|
20 | 20 | <td><?php e($p['text']); ?></td> |
21 | - <td><a href="<?php e(url('../account/' . $p['account_id'])); ?>"><?php e($p['account_number']); ?> <?php e($p['account_name']); ?></a></td> |
|
21 | + <td><a href="<?php e(url('../account/'.$p['account_id'])); ?>"><?php e($p['account_number']); ?> <?php e($p['account_name']); ?></a></td> |
|
22 | 22 | <td class="amount"><?php e(amountToOutput($p['debet'])); ?></td> |
23 | 23 | <td class="amount"><?php e(amountToOutput($p['credit'])); ?></td> |
24 | 24 | <td><?php if (!empty($p['reference'])) { |
25 | 25 | e($p['reference']); |
26 | 26 | } ?></td> |
27 | - <td><a href="<?php e(url('../voucher/' . $p['voucher_id'])); ?>"><?php e(t('See voucher')); ?></a></td> |
|
27 | + <td><a href="<?php e(url('../voucher/'.$p['voucher_id'])); ?>"><?php e(t('See voucher')); ?></a></td> |
|
28 | 28 | </tr> |
29 | 29 | <?php endforeach; ?> |
30 | 30 | </tbody> |
@@ -32,6 +32,9 @@ |
||
32 | 32 | |
33 | 33 | <?php if (round($context->getPost()->get('list_saldo'), 2) == 0.00) : // this is a hack - can be removed when the database uses mindste enhed ?> |
34 | 34 | <p class="advice"><a href="<?php e(url('state')); ?>">Bogfør posterne</a></p> |
35 | -<?php else : ?> |
|
36 | - <p class="error">Kassekladden stemmer ikke. Der er en difference på <?php e(amountToOutput($post->get('list_saldo'))); ?>.</p> |
|
35 | +<?php else { |
|
36 | + : ?> |
|
37 | + <p class="error">Kassekladden stemmer ikke. Der er en difference på <?php e(amountToOutput($post->get('list_saldo'))); |
|
38 | +} |
|
39 | +?>.</p> |
|
37 | 40 | <?php endif; ?> |
@@ -84,11 +84,11 @@ discard block |
||
84 | 84 | $vat = 0; |
85 | 85 | } |
86 | 86 | |
87 | - for ($i = 0, $max = count($items); $i<$max; $i++) { |
|
87 | + for ($i = 0, $max = count($items); $i < $max; $i++) { |
|
88 | 88 | $product = new Product($context->getKernel(), $items[$i]['product_id']); |
89 | 89 | $account = Account::factory($context->getYear(), $product->get('state_account_id')); |
90 | 90 | |
91 | - $total += $items[$i]["quantity"] * $items[$i]["price"]->getAsIso(2); |
|
91 | + $total += $items[$i]["quantity"]*$items[$i]["price"]->getAsIso(2); |
|
92 | 92 | $vat = $items[$i]["vat"]; |
93 | 93 | ?> |
94 | 94 | <tr> |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | <?php if (!$context->getModel()->isStated()) : |
100 | 100 | $year = new Year($context->getKernel()); |
101 | 101 | $year->loadActiveYear(); |
102 | - $accounts = $account->getList('sale'); |
|
102 | + $accounts = $account->getList('sale'); |
|
103 | 103 | ?> |
104 | 104 | <select id="state_account" name="state_account_id[<?php e($product->get('id')); ?>]"> |
105 | 105 | <option value=""><?php e(t('Choose')); ?></option> |
@@ -128,26 +128,26 @@ discard block |
||
128 | 128 | ?> |
129 | 129 | </select> |
130 | 130 | <?php else : ?> |
131 | - <?php e($account->get('number') . ' ' . $account->get('name')); ?> |
|
131 | + <?php e($account->get('number').' '.$account->get('name')); ?> |
|
132 | 132 | <?php endif; ?> |
133 | 133 | </td> |
134 | 134 | </tr> |
135 | 135 | <?php |
136 | - if ($vat == 1 && (!isset($items[$i+1]["vat"]) || $items[$i+1]["vat"] == 0)) { |
|
136 | + if ($vat == 1 && (!isset($items[$i + 1]["vat"]) || $items[$i + 1]["vat"] == 0)) { |
|
137 | 137 | ?> |
138 | 138 | <tr> |
139 | 139 | <td> </td> |
140 | 140 | <td><b>25% moms af <?php e(amountToOutput($total)); ?></b></td> |
141 | - <td><b><?php e(amountToOutput($total * 0.25, 2)); ?></b></td> |
|
141 | + <td><b><?php e(amountToOutput($total*0.25, 2)); ?></b></td> |
|
142 | 142 | <td> |
143 | 143 | <?php |
144 | 144 | $account = new Account($context->getYear(), $context->getYear()->getSetting('vat_out_account_id')); |
145 | - e($account->get('number') . ' ' . $account->get('name')); |
|
145 | + e($account->get('number').' '.$account->get('name')); |
|
146 | 146 | ?> |
147 | 147 | </td> |
148 | 148 | </tr> |
149 | 149 | <?php |
150 | - $total = $total * 1.25; |
|
150 | + $total = $total*1.25; |
|
151 | 151 | } |
152 | 152 | } |
153 | 153 | ?> |
@@ -158,6 +158,6 @@ discard block |
||
158 | 158 | <input type="submit" value="<?php e(t('State')); ?>" /> |
159 | 159 | <a href="<?php e(url('../')); ?>"><?php e(t('Cancel')); ?></a> |
160 | 160 | </div> |
161 | - <?php endif; ?> |
|
161 | + <?php endif; ?> |
|
162 | 162 | </form> |
163 | 163 | <?php endif; ?> |
164 | 164 | \ No newline at end of file |
@@ -12,11 +12,14 @@ discard block |
||
12 | 12 | <?php if (!$context->getYear()->readyForState($context->getModel()->get('this_date'))) : ?> |
13 | 13 | <?php echo $context->getYear()->error->view(); ?> |
14 | 14 | <p>Gå til <a href="<?php e($this->url('../../../../../accounting/')); ?>">regnskabet</a></p> |
15 | -<?php else : ?> |
|
15 | +<?php else { |
|
16 | + : ?> |
|
16 | 17 | |
17 | 18 | <p class="message">Når du bogfører en kreditnota vil beløbet bliver trukket fra debitorkontoen.</p> |
18 | 19 | |
19 | - <?php $context->getModel()->readyForState($context->getYear(), 'skip_check_products'); ?> |
|
20 | + <?php $context->getModel()->readyForState($context->getYear(), 'skip_check_products'); |
|
21 | +} |
|
22 | +?> |
|
20 | 23 | <?php echo $context->getModel()->error->view(); ?> |
21 | 24 | |
22 | 25 | <form action="<?php e(url()); ?>" method="post"> |
@@ -43,8 +46,11 @@ discard block |
||
43 | 46 | <td> |
44 | 47 | <?php if (!$context->getModel()->isStated()) : ?> |
45 | 48 | <input type="text" name="voucher_number" value="<?php e($context->getVoucher()->getMaxNumber() + 1); ?>" /> |
46 | - <?php else : ?> |
|
47 | - <a href="<?php e($accounting_module->getPath()); ?>voucher.php?id=<?php e($context->getModel()->get("voucher_id")); ?>">Se bilag</a> |
|
49 | + <?php else { |
|
50 | + : ?> |
|
51 | + <a href="<?php e($accounting_module->getPath()); |
|
52 | +} |
|
53 | +?>voucher.php?id=<?php e($context->getModel()->get("voucher_id")); ?>">Se bilag</a> |
|
48 | 54 | <?php endif; ?> |
49 | 55 | </td> |
50 | 56 | </tr> |
@@ -55,11 +61,14 @@ discard block |
||
55 | 61 | <?php e($context->getModel()->get("dk_date_stated")); ?> |
56 | 62 | </td> |
57 | 63 | </tr> |
58 | - <?php else : ?> |
|
64 | + <?php else { |
|
65 | + : ?> |
|
59 | 66 | <tr> |
60 | 67 | <th>Bogfør på dato</th> |
61 | 68 | <td> |
62 | - <input type="text" name="date_state" value="<?php e($context->getModel()->get("dk_this_date")); ?>" /> |
|
69 | + <input type="text" name="date_state" value="<?php e($context->getModel()->get("dk_this_date")); |
|
70 | +} |
|
71 | +?>" /> |
|
63 | 72 | </td> |
64 | 73 | </tr> |
65 | 74 | <?php endif; ?> |
@@ -127,8 +136,11 @@ discard block |
||
127 | 136 | endforeach; |
128 | 137 | ?> |
129 | 138 | </select> |
130 | - <?php else : ?> |
|
131 | - <?php e($account->get('number') . ' ' . $account->get('name')); ?> |
|
139 | + <?php else { |
|
140 | + : ?> |
|
141 | + <?php e($account->get('number') . ' ' . $account->get('name')); |
|
142 | +} |
|
143 | +?> |
|
132 | 144 | <?php endif; ?> |
133 | 145 | </td> |
134 | 146 | </tr> |
@@ -68,11 +68,11 @@ discard block |
||
68 | 68 | $vat = 0; |
69 | 69 | } |
70 | 70 | |
71 | - for ($i = 0, $max = count($items); $i<$max; $i++) { |
|
71 | + for ($i = 0, $max = count($items); $i < $max; $i++) { |
|
72 | 72 | $product = new Product($context->getKernel(), $items[$i]['product_id']); |
73 | 73 | $account = Account::factory($context->getYear(), $product->get('state_account_id')); |
74 | 74 | |
75 | - $total += $items[$i]["quantity"] * $items[$i]["price"]->getAsIso(2); |
|
75 | + $total += $items[$i]["quantity"]*$items[$i]["price"]->getAsIso(2); |
|
76 | 76 | $vat = $items[$i]["vat"]; |
77 | 77 | ?> |
78 | 78 | <tr> |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | <?php if (!$context->getModel()->isStated()) : |
84 | 84 | $year = new Year($context->getKernel()); |
85 | 85 | $context->getYear()->loadActiveYear(); |
86 | - $accounts = $account->getList('sale'); |
|
86 | + $accounts = $account->getList('sale'); |
|
87 | 87 | ?> |
88 | 88 | <select id="state_account" name="state_account_id[<?php e($product->get('id')); ?>]"> |
89 | 89 | <option value=""><?php e(t('Choose')); ?></option> |
@@ -112,26 +112,26 @@ discard block |
||
112 | 112 | ?> |
113 | 113 | </select> |
114 | 114 | <?php else : ?> |
115 | - <?php e($account->get('number') . ' ' . $account->get('name')); ?> |
|
115 | + <?php e($account->get('number').' '.$account->get('name')); ?> |
|
116 | 116 | <?php endif; ?> |
117 | 117 | </td> |
118 | 118 | </tr> |
119 | 119 | <?php |
120 | - if ($vat == 1 && (!isset($items[$i+1]["vat"]) || $items[$i+1]["vat"] == 0)) { |
|
120 | + if ($vat == 1 && (!isset($items[$i + 1]["vat"]) || $items[$i + 1]["vat"] == 0)) { |
|
121 | 121 | ?> |
122 | 122 | <tr> |
123 | 123 | <td> </td> |
124 | 124 | <td><b>25% moms af <?php e(amountToOutput($total)); ?></b></td> |
125 | - <td><b><?php e(amountToOutput($total * 0.25, 2)); ?></b></td> |
|
125 | + <td><b><?php e(amountToOutput($total*0.25, 2)); ?></b></td> |
|
126 | 126 | <td> |
127 | 127 | <?php |
128 | 128 | $account = new Account($context->getYear(), $context->getYear()->getSetting('vat_out_account_id')); |
129 | - e($account->get('number') . ' ' . $account->get('name')); |
|
129 | + e($account->get('number').' '.$account->get('name')); |
|
130 | 130 | ?> |
131 | 131 | </td> |
132 | 132 | </tr> |
133 | 133 | <?php |
134 | - $total = $total * 1.25; |
|
134 | + $total = $total*1.25; |
|
135 | 135 | } |
136 | 136 | } |
137 | 137 | ?> |
@@ -142,6 +142,6 @@ discard block |
||
142 | 142 | <input type="submit" value="<?php e(t('State')); ?>" /> |
143 | 143 | <a href="<?php e(url('../')); ?>"><?php e(t('Close')); ?></a> |
144 | 144 | </div> |
145 | - <?php endif; ?> |
|
145 | + <?php endif; ?> |
|
146 | 146 | </form> |
147 | 147 | <?php endif; ?> |
@@ -13,11 +13,14 @@ discard block |
||
13 | 13 | <?php if (!$context->getYear()->readyForState($context->getModel()->get('this_date'))) : ?> |
14 | 14 | <?php echo $context->getYear()->error->view(); ?> |
15 | 15 | <p>Gå til <a href="<?php e($this->url('../../../../../accounting/')); ?>">regnskabet</a></p> |
16 | -<?php else : ?> |
|
16 | +<?php else { |
|
17 | + : ?> |
|
17 | 18 | |
18 | 19 | <p class="message">Når du bogfører fakturaerne vil det skyldige beløb blive sat på debitorkontoen. Når kunden har betalt, skal betalingen bogføres for at overføre beløbet fra debitorkontoen til din indkomst konto (fx Bankkonto).</p> |
19 | 20 | |
20 | - <?php $context->getModel()->readyForState($context->getYear(), 'skip_check_products'); ?> |
|
21 | + <?php $context->getModel()->readyForState($context->getYear(), 'skip_check_products'); |
|
22 | +} |
|
23 | +?> |
|
21 | 24 | <?php echo $context->getModel()->error->view(); ?> |
22 | 25 | |
23 | 26 | <form action="<?php e(url()); ?>" method="post"> |
@@ -111,8 +114,11 @@ discard block |
||
111 | 114 | endforeach; |
112 | 115 | ?> |
113 | 116 | </select> |
114 | - <?php else : ?> |
|
115 | - <?php e($account->get('number') . ' ' . $account->get('name')); ?> |
|
117 | + <?php else { |
|
118 | + : ?> |
|
119 | + <?php e($account->get('number') . ' ' . $account->get('name')); |
|
120 | +} |
|
121 | +?> |
|
116 | 122 | <?php endif; ?> |
117 | 123 | </td> |
118 | 124 | </tr> |
@@ -8,9 +8,12 @@ |
||
8 | 8 | |
9 | 9 | <p><?php e(t('You have to create a year, you can state in')); ?>. <a href="<?php e(url(null, array('create'))); ?>"><?php e(t('Create year')); ?></a>.</p> |
10 | 10 | |
11 | -<?php else : ?> |
|
11 | +<?php else { |
|
12 | + : ?> |
|
12 | 13 | |
13 | -<form action="<?php e(url(null)); ?>" method="post"> |
|
14 | +<form action="<?php e(url(null)); |
|
15 | +} |
|
16 | +?>" method="post"> |
|
14 | 17 | <input type="hidden" name="_method" value="put" /> |
15 | 18 | |
16 | 19 | <p><?php e(t('You have to choose the year, you want the invoice stated in.')); ?> |