@@ -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> |
@@ -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 |
@@ -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; ?> |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | $year = new Year($kernel); |
| 60 | 60 | $year->loadActiveYear(); |
| 61 | - $accounts = $account->getList('finance'); |
|
| 61 | + $accounts = $account->getList('finance'); |
|
| 62 | 62 | ?> |
| 63 | 63 | <select id="state_account" name="state_account_id"> |
| 64 | 64 | <option value=""><?php e(t('Choose')); ?></option> |
@@ -90,6 +90,6 @@ discard block |
||
| 90 | 90 | <input type="submit" value="<?php e(t('State')); ?>" /> |
| 91 | 91 | <a href="<?php e(url('../')); ?>"><?php e(t('Cancel')); ?></a> |
| 92 | 92 | </div> |
| 93 | - <?php endif; ?> |
|
| 93 | + <?php endif; ?> |
|
| 94 | 94 | </form> |
| 95 | 95 | <?php endif; ?> |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | $year = new Year($context->getKernel()); |
| 58 | 58 | $year->loadActiveYear(); |
| 59 | - $accounts = $account->getList('operating'); |
|
| 59 | + $accounts = $account->getList('operating'); |
|
| 60 | 60 | ?> |
| 61 | 61 | <select id="state_account" name="state_account_id"> |
| 62 | 62 | <option value=""><?php e(t('Choose')); ?>...</option> |
@@ -86,6 +86,6 @@ discard block |
||
| 86 | 86 | <input type="submit" value="<?php e(t('State')); ?>" /> |
| 87 | 87 | <a href="<?php e(url('../')); ?>"><?php e(t('Cancel')); ?></a> |
| 88 | 88 | </div> |
| 89 | - <?php endif; ?> |
|
| 89 | + <?php endif; ?> |
|
| 90 | 90 | </form> |
| 91 | 91 | <?php endif; ?> |
| 92 | 92 | \ No newline at end of file |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | <tbody> |
| 109 | 109 | <?php foreach ($value['debet_account'] as $key => $line) { ?> |
| 110 | 110 | <tr> |
| 111 | - <td><?php e($key+1); ?></td> |
|
| 111 | + <td><?php e($key + 1); ?></td> |
|
| 112 | 112 | <td><?php e($procurement->get('description')); ?> - <input type="text" name="debet_account[<?php e($key); ?>][text]" value="<?php e($line["text"]); ?>" /></td> |
| 113 | 113 | <td><input type="text" name="debet_account[<?php e($key); ?>][amount]" value="<?php e($line["amount"]); ?>" size="8" /> <?php e('('.t('excl. vat').')'); ?></td> |
| 114 | 114 | <td> |
@@ -138,9 +138,9 @@ discard block |
||
| 138 | 138 | <?php if ($procurement->get('vat') > 0) : ?> |
| 139 | 139 | <tr> |
| 140 | 140 | <td> </td> |
| 141 | - <td><?php e($procurement->get('description'). ' - '.t('vat')); ?></td> |
|
| 141 | + <td><?php e($procurement->get('description').' - '.t('vat')); ?></td> |
|
| 142 | 142 | <td><?php e($procurement->get('dk_vat')); ?></td> |
| 143 | - <td><?php e($vat_account->get('number') . ' ' . $vat_account->get('name')); ?></td> |
|
| 143 | + <td><?php e($vat_account->get('number').' '.$vat_account->get('name')); ?></td> |
|
| 144 | 144 | <td> </td> |
| 145 | 145 | </tr> |
| 146 | 146 | <?php endif; ?> |
@@ -51,7 +51,7 @@ discard block |
||
| 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 |
||
| 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; ?> |
@@ -56,26 +56,26 @@ discard block |
||
| 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 |
||
| 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, |