Completed
Pull Request — master (#26)
by Lars
10:03
created
src/Intraface/Filehandler/Controller/Crop.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -73,14 +73,14 @@
 block discarded – undo
73 73
             '&y2=' . ($params['crop_offset_y'] + $params['crop_height']));
74 74
 
75 75
         $data = array('translation' => $translation,
76
-                      'type' => $type,
77
-                      'filemanager' => $filemanager,
78
-                      'img_height' => $img_height,
79
-                      'img_width' => $img_width,
80
-                      'editor_img_height' => $editor_img_height,
81
-                      'editor_img_width' => $editor_img_width,
82
-                      'editor_img_uri' => $editor_img_uri,
83
-                      'unlock_ratio' => $unlock_ratio);
76
+                        'type' => $type,
77
+                        'filemanager' => $filemanager,
78
+                        'img_height' => $img_height,
79
+                        'img_width' => $img_width,
80
+                        'editor_img_height' => $editor_img_height,
81
+                        'editor_img_width' => $editor_img_width,
82
+                        'editor_img_uri' => $editor_img_uri,
83
+                        'unlock_ratio' => $unlock_ratio);
84 84
 
85 85
         $tpl = $this->template->create(dirname(__FILE__) . '/../templates/crop');
86 86
         return $tpl->render($this, $data);
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -26,15 +26,15 @@  discard block
 block discarded – undo
26 26
         $editor_img_height = $instance->get('height');
27 27
         $editor_img_width = $instance->get('width');
28 28
 
29
-        $size_ratio = $editor_img_width / $img_width;
29
+        $size_ratio = $editor_img_width/$img_width;
30 30
 
31 31
         $instance = $filemanager->getInstance($instance_type);
32 32
         $type = $instance->get('instance_properties');
33 33
 
34 34
         $params = unserialize($instance->get('crop_parameter'));
35 35
 
36
-        $editor_min_width = $type['max_width'] * $size_ratio;
37
-        $editor_min_height = $type['max_height'] * $size_ratio;
36
+        $editor_min_width = $type['max_width']*$size_ratio;
37
+        $editor_min_height = $type['max_height']*$size_ratio;
38 38
 
39 39
         if ($editor_min_width > $editor_img_width) {
40 40
             $editor_min_width = $editor_img_width;
@@ -57,20 +57,20 @@  discard block
 block discarded – undo
57 57
         // make sure that it is with a . and not ,
58 58
         $size_ratio = str_replace(',', '.', $size_ratio);
59 59
 
60
-        $this->document->setTitle('Crop image: ' . $filemanager->get('file_name'));
60
+        $this->document->setTitle('Crop image: '.$filemanager->get('file_name'));
61 61
         $this->document->addScript('filehandler/cropper/lib/prototype.js');
62 62
         $this->document->addScript('filehandler/cropper/lib/scriptaculous.js');
63 63
         $this->document->addScript('filehandler/cropper/cropper.js');
64 64
         // @todo HACK only way I can get the link to be correct with a comma
65 65
         $this->document->addScript('filehandler/crop_image.js.php'.
66
-            '?size_ratio=' . $size_ratio .
67
-            '&max_width=' . round($editor_min_width) .
68
-            '&max_height=' . round($editor_min_height) .
69
-            '&unlock_ratio=' . $unlock_ratio .
70
-            '&x1=' . $params['crop_offset_x'] .
71
-            '&y1=' . $params['crop_offset_y'] .
72
-            '&x2=' . ($params['crop_offset_x'] + $params['crop_width']) .
73
-            '&y2=' . ($params['crop_offset_y'] + $params['crop_height']));
66
+            '?size_ratio='.$size_ratio.
67
+            '&max_width='.round($editor_min_width).
68
+            '&max_height='.round($editor_min_height).
69
+            '&unlock_ratio='.$unlock_ratio.
70
+            '&x1='.$params['crop_offset_x'].
71
+            '&y1='.$params['crop_offset_y'].
72
+            '&x2='.($params['crop_offset_x'] + $params['crop_width']).
73
+            '&y2='.($params['crop_offset_y'] + $params['crop_height']));
74 74
 
75 75
         $data = array('translation' => $translation,
76 76
                       'type' => $type,
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                       'editor_img_uri' => $editor_img_uri,
83 83
                       'unlock_ratio' => $unlock_ratio);
84 84
 
85
-        $tpl = $this->template->create(dirname(__FILE__) . '/../templates/crop');
85
+        $tpl = $this->template->create(dirname(__FILE__).'/../templates/crop');
86 86
         return $tpl->render($this, $data);
87 87
     }
88 88
 
Please login to merge, or discard this patch.
src/Intraface/Filehandler/Controller/CKEditor.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -148,10 +148,10 @@
 block discarded – undo
148 148
         $this->document->setTitle('Files');
149 149
 
150 150
         $data = array('filemanager' => $filemanager,
151
-                      'multiple_choice' => $multiple_choice,
152
-                      //'receive_redirect' => $receive_redirect,
153
-                      'files' => $files,
154
-                      'selected_files' =>  $selected_files
151
+                        'multiple_choice' => $multiple_choice,
152
+                        //'receive_redirect' => $receive_redirect,
153
+                        'files' => $files,
154
+                        'selected_files' =>  $selected_files
155 155
         );
156 156
 
157 157
         $tpl = $this->template->create(dirname(__FILE__) . '/../templates/ckeditor');
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -103,18 +103,18 @@  discard block
 block discarded – undo
103 103
                     $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y")." 00:00");
104 104
                     break;
105 105
                 case 2:
106
-                    $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y", time()-60*60*24)." 00:00");
107
-                    $filemanager->getDBQuery()->setFilter("uploaded_to_date", date("d-m-Y", time()-60*60*24)." 23:59");
106
+                    $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y", time() - 60*60*24)." 00:00");
107
+                    $filemanager->getDBQuery()->setFilter("uploaded_to_date", date("d-m-Y", time() - 60*60*24)." 23:59");
108 108
                     break;
109 109
                 case 3:
110
-                    $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y", time()-60*60*24*7)." 00:00");
110
+                    $filemanager->getDBQuery()->setFilter("uploaded_from_date", date("d-m-Y", time() - 60*60*24*7)." 00:00");
111 111
                     break;
112 112
                 case 4:
113 113
                     $filemanager->getDBQuery()->setFilter("edited_from_date", date("d-m-Y")." 00:00");
114 114
                     break;
115 115
                 case 5:
116
-                    $filemanager->getDBQuery()->setFilter("edited_from_date", date("d-m-Y", time()-60*60*24)." 00:00");
117
-                    $filemanager->getDBQuery()->setFilter("edited_to_date", date("d-m-Y", time()-60*60*24)." 23:59");
116
+                    $filemanager->getDBQuery()->setFilter("edited_from_date", date("d-m-Y", time() - 60*60*24)." 00:00");
117
+                    $filemanager->getDBQuery()->setFilter("edited_to_date", date("d-m-Y", time() - 60*60*24)." 23:59");
118 118
                     break;
119 119
                 default:
120 120
                     // Probaly 0, so nothing happens
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                       'selected_files' =>  $selected_files
155 155
         );
156 156
 
157
-        $tpl = $this->template->create(dirname(__FILE__) . '/../templates/ckeditor');
157
+        $tpl = $this->template->create(dirname(__FILE__).'/../templates/ckeditor');
158 158
         return new k_HtmlResponse($tpl->render($this, $data));
159 159
     }
160 160
 
Please login to merge, or discard this patch.
src/Intraface/shared/email/Signature.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
                 break;
84 84
             case 1:
85 85
             default:
86
-                return "--\n" . $this->getUser()->getAddress()->get('name') . "\n" . $this->getIntranet()->get('name');
86
+                return "--\n".$this->getUser()->getAddress()->get('name')."\n".$this->getIntranet()->get('name');
87 87
                 break;
88 88
             case 2:
89 89
                 return $this->getSetting()->get('user', 'email.custom_signature');
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Visitor/OIOXML.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 
40 40
     private function start()
41 41
     {
42
-        $this->output .= '<?xml version="1.0" encoding="iso-8859-1"?>' . "\n";
43
-        $this->output .= '<Invoice xmlns="http://rep.oio.dk/ubl/xml/schemas/0p71/pie/" xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/" xmlns:main="http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://rep.oio.dk/ubl/xml/schemas/0p71/pie/ http://rep.oio.dk/ubl/xml/schemas/0p71/pie/pieStrict.xsd">' . "\n";
42
+        $this->output .= '<?xml version="1.0" encoding="iso-8859-1"?>'."\n";
43
+        $this->output .= '<Invoice xmlns="http://rep.oio.dk/ubl/xml/schemas/0p71/pie/" xmlns:com="http://rep.oio.dk/ubl/xml/schemas/0p71/common/" xmlns:main="http://rep.oio.dk/ubl/xml/schemas/0p71/maindoc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://rep.oio.dk/ubl/xml/schemas/0p71/pie/ http://rep.oio.dk/ubl/xml/schemas/0p71/pie/pieStrict.xsd">'."\n";
44 44
     }
45 45
 
46 46
     private function end()
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function output($debtor)
52 52
     {
53 53
         $this->start();
54
-        $this->output .= '<com:ID>'.$debtor->get('id').'</com:ID>' . "\n";
54
+        $this->output .= '<com:ID>'.$debtor->get('id').'</com:ID>'."\n";
55 55
         $this->output .= '<com:IssueDate>'.$debtor->get('date_due').'</com:IssueDate>';
56 56
         $this->output .= '<com:TypeCode>PIE</com:TypeCode>';
57 57
         $this->output .= '<main:InvoiceCurrencyCode>DKK</main:InvoiceCurrencyCode>';
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/templates/collection.tpl.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
     <?php else : ?>
49 49
         <?php if (isset($variation) && isset($product)) : ?>
50 50
             <?php $module_product = $context->getKernel()->useModule('product'); ?>
51
-            <li><a href="<?php e(url($module_product->getPath().$product->get('id').'/variation/'.$variation->getId()));  ?>"><?php e(t('Show product')); ?></a></li>
51
+            <li><a href="<?php e(url($module_product->getPath().$product->get('id').'/variation/'.$variation->getId())); ?>"><?php e(t('Show product')); ?></a></li>
52 52
         <?php elseif (isset($product)) : ?>
53 53
             <?php $module_product = $context->getKernel()->useModule('product'); ?>
54
-           <li><a href="<?php e(url($module_product->getPath().$product->get('id')));  ?>"><?php e(t('Show product')); ?></a></li>
54
+           <li><a href="<?php e(url($module_product->getPath().$product->get('id'))); ?>"><?php e(t('Show product')); ?></a></li>
55 55
         <?php endif; ?>
56 56
         <li><a href="<?php e(url(null, array('create'))); ?>"><?php e(t('Create')); ?></a></li>
57 57
     <?php endif; ?>
58
-    <li><a class="excel" href="<?php e(url(null . '.xls', array('use_stored' => 'true'))); ?>"><?php e(t('Excel')); ?></a> (<a href="<?php e(url(null . '.xls', array('use_stored' => 'true', 'simple' => 'true'))); ?>"><?php e(t('Simple')); ?></a>)</li>
58
+    <li><a class="excel" href="<?php e(url(null.'.xls', array('use_stored' => 'true'))); ?>"><?php e(t('Excel')); ?></a> (<a href="<?php e(url(null.'.xls', array('use_stored' => 'true', 'simple' => 'true'))); ?>"><?php e(t('Simple')); ?></a>)</li>
59 59
 </ul>
60 60
 
61 61
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
             <tr id="i<?php e($post["id"]); ?>">
205 205
                 <td><?php e($post["number"]); ?></td>
206 206
                 <td class="number"><?php e($post['contact']['number']); ?></td>
207
-                <td><a href="<?php // e($contact_module->getPath()); ?><?php e(url('../../../contact/' . $post["contact_id"])); ?>"><?php e($post["name"]); ?></a></td>
207
+                <td><a href="<?php // e($contact_module->getPath()); ?><?php e(url('../../../contact/'.$post["contact_id"])); ?>"><?php e($post["name"]); ?></a></td>
208 208
                 <td><a href="<?php e(url($post["id"])); ?>"><?php ($post["description"] != "") ? e($post["description"]) : e("[Ingen beskrivelse]"); ?></a></td>
209 209
                 <td class="amount"><?php e(number_format($post["total"], 2, ",", ".")); ?> &nbsp; </td>
210 210
 
Please login to merge, or discard this patch.
Braces   +20 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,8 +24,11 @@  discard block
 block discarded – undo
24 24
         $module_administration = $context->getKernel()->useModule('administration');
25 25
         ?>
26 26
         <a href="<?php e(url('../../../administration/intranet', array('edit'))); ?>"><?php e(t('Fill in address')); ?></a>.
27
-    <?php else : ?>
28
-        <?php e(t('You do not have access to edit the address information. Please ask your administrator to do that.')); ?>
27
+    <?php else {
28
+    : ?>
29
+        <?php e(t('You do not have access to edit the address information. Please ask your administrator to do that.'));
30
+}
31
+?>
29 32
         <?php e(strtolower(t($debtor->getType()))); ?>.
30 33
     <?php endif; ?>
31 34
     </p>
@@ -35,19 +38,28 @@  discard block
 block discarded – undo
35 38
         <p>
36 39
             <?php e(t('You have not created any. Credit notes are created from invoices.')); ?>
37 40
         </p>
38
-            <?php else : ?>
41
+            <?php else {
42
+    : ?>
39 43
 
40
-        <p><?php e(t('None has been created yet')); ?>. <a href="<?php e(url(null, array('create'))); ?>"><?php e(t('Create '.$context->getType())); ?></a>.</p>
44
+        <p><?php e(t('None has been created yet'));
45
+}
46
+?>. <a href="<?php e(url(null, array('create'))); ?>"><?php e(t('Create '.$context->getType())); ?></a>.</p>
41 47
 
42 48
     <?php endif; ?>
43
-<?php else : ?>
49
+<?php else {
50
+    : ?>
44 51
 
45 52
 <ul class="options">
46 53
     <?php if (!empty($contact) and is_object($contact) and $debtor->getType() != "credit_note") : ?>
47
-        <li><a href="<?php e(url(null, array('create', 'contact_id' => $contact->get("id")))); ?>"><?php e(t('Create')); ?></a></li>
48
-    <?php else : ?>
54
+        <li><a href="<?php e(url(null, array('create', 'contact_id' => $contact->get("id"))));
55
+}
56
+?>"><?php e(t('Create')); ?></a></li>
57
+    <?php else {
58
+    : ?>
49 59
         <?php if (isset($variation) && isset($product)) : ?>
50
-            <?php $module_product = $context->getKernel()->useModule('product'); ?>
60
+            <?php $module_product = $context->getKernel()->useModule('product');
61
+}
62
+?>
51 63
             <li><a href="<?php e(url($module_product->getPath().$product->get('id').'/variation/'.$variation->getId()));  ?>"><?php e(t('Show product')); ?></a></li>
52 64
         <?php elseif (isset($product)) : ?>
53 65
             <?php $module_product = $context->getKernel()->useModule('product'); ?>
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/templates/reminders.tpl.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 <?php if ($contact_id) : ?>
10 10
     <ul class="options">
11 11
         <li><a href="<?php e(url(null, array('create', 'contact_id' => $contact_id))); ?>"><?php e(t('Create')); ?></a></li>
12
-        <li><a href="<?php e(url('../../contact/' . $contact_id)); ?>"><?php e(t('Go to contact')); ?></a>
12
+        <li><a href="<?php e(url('../../contact/'.$contact_id)); ?>"><?php e(t('Go to contact')); ?></a>
13 13
     </ul>
14 14
 <?php endif; ?>
15 15
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             print(" class=\"fade\"");
80 80
 } ?>>
81 81
             <td class="number"><?php e($r["number"]); ?></td>
82
-            <td><a href="<?php e(url('../../contact/' . $r["contact_id"])); ?>"><?php e($r["name"]); ?></a></td>
82
+            <td><a href="<?php e(url('../../contact/'.$r["contact_id"])); ?>"><?php e($r["name"]); ?></a></td>
83 83
             <td><a href="<?php e(url($r["id"])); ?>"><?php (trim($r["description"] != "")) ? e($r["description"]) : e('['.t("No description").']'); ?></a></td>
84 84
             <td class="date">
85 85
                 <?php
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,10 +18,12 @@
 block discarded – undo
18 18
 
19 19
 <p>Der er ikke oprettet nogen rykkere endnu. Du har nok nogle gode kunder. Rykkere oprettes fra en faktura.</p>
20 20
 
21
-<?php else : ?>
21
+<?php else {
22
+    : ?>
22 23
 
23 24
 <?php
24 25
 echo $context->getReminder()->error->view();
26
+}
25 27
 ?>
26 28
 
27 29
 <?php
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/templates/show.tpl.php 2 patches
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
 <form method="post" action="<?php e(url()); ?>">
40 40
     <input type="hidden" name="id" value="<?php e($context->getDebtor()->get('id')); ?>" />
41
-    <?php if ($context->getDebtor()->contact->get('preferred_invoice') == 2 and  $context->getDebtor()->get('status') == 'created' and $context->isValidSender()) : ?>
41
+    <?php if ($context->getDebtor()->contact->get('preferred_invoice') == 2 and $context->getDebtor()->get('status') == 'created' and $context->isValidSender()) : ?>
42 42
         <input type="submit" value="<?php e(t('Send on email')); ?>" name="send_email" title="<?php e(t('Are you sure?')); ?>" />
43 43
     <?php elseif ($context->getDebtor()->contact->get('preferred_invoice') == 2 and $context->getDebtor()->get('status') == 'sent' and $context->isValidSender()) : ?>
44 44
         <input type="submit" value="<?php e(t('Resend on email')); ?>" name="send_email" title="<?php e(t('Are you sure?')); ?>" />
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                 <th><?php e(t($context->getDebtor()->get('type').' due date')); ?></th>
130 130
                 <td>
131 131
                     <?php e($context->getDebtor()->get("dk_due_date")); ?>
132
-                    <?php if ($context->getDebtor()->get('type')=='invoice' && count($context->getDebtor()->anyDue($context->getDebtor()->contact->get('id'))) > 0 && $context->getDebtor()->get("status") != 'executed') {
132
+                    <?php if ($context->getDebtor()->get('type') == 'invoice' && count($context->getDebtor()->anyDue($context->getDebtor()->contact->get('id'))) > 0 && $context->getDebtor()->get("status") != 'executed') {
133 133
                         echo '<a href="'.url('../../../reminders', array('create', 'contact_id' => intval($context->getDebtor()->contact->get('id')))).'">'.t('Create reminder').'</a>';
134 134
 } ?>
135 135
                 </td>
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                             <?php
143 143
                             switch ($context->getKernel()->getSetting()->get('intranet', 'debtor.sender')) {
144 144
                                 case 'user':
145
-                                    e($context->getKernel()->user->getAddress()->get('name'). ' <'.$context->getKernel()->user->getAddress()->get('email').'>');
145
+                                    e($context->getKernel()->user->getAddress()->get('name').' <'.$context->getKernel()->user->getAddress()->get('email').'>');
146 146
                                     break;
147 147
                                 case 'defined':
148 148
                                     e($context->getKernel()->getSetting()->get('intranet', 'debtor.sender.name').' <'.$context->getKernel()->getSetting()->get('intranet', 'debtor.sender.email').'>');
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                 <th><?php e(t('Where from')); ?></th>
190 190
                 <td>
191 191
                     <?php if (($context->getDebtor()->get('where_from') == 'quotation' || $context->getDebtor()->get('where_from') == 'order' || $context->getDebtor()->get('where_from') == 'invoice') && $context->getDebtor()->get("where_from_id") > 0) { ?>
192
-                        <a href="<?php e(url('../' . $context->getDebtor()->get("where_from_id"))); ?>"><?php e(t($context->getDebtor()->get("where_from"))); ?></a>
192
+                        <a href="<?php e(url('../'.$context->getDebtor()->get("where_from_id"))); ?>"><?php e(t($context->getDebtor()->get("where_from"))); ?></a>
193 193
                 <?php } else { ?>
194 194
                         <?php e(t($context->getDebtor()->get('where_from'))); ?>
195 195
                     <?php } ?>
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
             <?php if ($context->getDebtor()->get('where_to') and $context->getDebtor()->get('where_to_id')) : ?>
199 199
             <tr>
200 200
                 <th><?php e(t('Where to')); ?></th>
201
-                <td><a href="<?php e(url('../' . $context->getDebtor()->get('where_to_id'))); ?>"><?php e(t($context->getDebtor()->get('where_to'))); ?></a></td>
201
+                <td><a href="<?php e(url('../'.$context->getDebtor()->get('where_to_id'))); ?>"><?php e(t($context->getDebtor()->get('where_to'))); ?></a></td>
202 202
             </tr>
203 203
             <?php endif; ?>
204 204
             <?php if (($context->getDebtor()->get("type") == 'credit_note' || $context->getDebtor()->get("type") == 'invoice') and $context->getKernel()->user->hasModuleAccess('accounting')) : ?>
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
             </tr>
255 255
             <tr>
256 256
                 <th><?php e(t('Contact')); ?></th>
257
-                <td><a href="<?php //e($contact_module->getPath()); ?><?php e(url('../../../../contact/'. $context->getDebtor()->contact->get('id'))); ?>"><?php e($context->getDebtor()->contact->address->get("name")); ?></a></td>
257
+                <td><a href="<?php //e($contact_module->getPath()); ?><?php e(url('../../../../contact/'.$context->getDebtor()->contact->get('id'))); ?>"><?php e($context->getDebtor()->contact->address->get("name")); ?></a></td>
258 258
             </tr>
259 259
             <tr>
260 260
                 <th><?php e(t('Address')); ?></th>
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
                                 <?php
378 378
                                 if ($payment["type"] == "credit_note") {
379 379
                                     ?>
380
-                                    <a href="<?php e(url('../' . $payment["id"])); ?>"><?php e($payment["description"]); ?></a>
380
+                                    <a href="<?php e(url('../'.$payment["id"])); ?>"><?php e($payment["description"]); ?></a>
381 381
                                     <?php
382 382
                                 } else {
383 383
                                     e($payment['description']);
@@ -390,11 +390,11 @@  discard block
 block discarded – undo
390 390
                                     <?php if ($payment['is_stated']) : ?>
391 391
                                         <a href="<?php e(url('../../../../accounting/search', array('voucher_id' => $payment['voucher_id']))); ?>"><?php e(t('voucher')); ?></a>
392 392
                                     <?php elseif ($payment['type'] == 'credit_note') : ?>
393
-                                        <a href="<?php e(url('../' . $payment['id'] . '/state')); ?>"><?php e(t('state credit note')); ?></a>
393
+                                        <a href="<?php e(url('../'.$payment['id'].'/state')); ?>"><?php e(t('state credit note')); ?></a>
394 394
                                     <?php elseif ($payment['type'] == 'depreciation') : ?>
395
-                                        <a href="<?php e(url('../' . $context->getDebtor()->get('id') . '/depreciation/'.$payment['id'].'/state')); ?>"><?php e(t('state depreciation')); ?></a>
395
+                                        <a href="<?php e(url('../'.$context->getDebtor()->get('id').'/depreciation/'.$payment['id'].'/state')); ?>"><?php e(t('state depreciation')); ?></a>
396 396
                                     <?php else : ?>
397
-                                        <a href="<?php e(url('../' . $context->getDebtor()->get('id') . '/payment/' . $payment['id'] . '/state')); ?>"><?php e(t('state payment')); ?></a>
397
+                                        <a href="<?php e(url('../'.$context->getDebtor()->get('id').'/payment/'.$payment['id'].'/state')); ?>"><?php e(t('state payment')); ?></a>
398 398
                                     <?php endif; ?>
399 399
                                 </td>
400 400
                             <?php endif; ?>
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
                                         ?>
499 499
                                     <?php endif; ?>
500 500
                                     <?php if ($p['status'] == 'authorized') : ?>
501
-                                        <a href="<?php e(url('onlinepayment/' . $p['id'])); ?>" class="edit"><?php e(t('Edit payment')); ?></a>
501
+                                        <a href="<?php e(url('onlinepayment/'.$p['id'])); ?>" class="edit"><?php e(t('Edit payment')); ?></a>
502 502
                                     <?php endif; ?>
503 503
                                 </td>
504 504
                             </tr>
@@ -571,8 +571,8 @@  discard block
 block discarded – undo
571 571
                 $vat = 0;
572 572
             }
573 573
 
574
-            for ($i = 0, $max = count($items); $i<$max; $i++) {
575
-                $total += $items[$i]["quantity"] * $items[$i]["price"]->getAsIso(2);
574
+            for ($i = 0, $max = count($items); $i < $max; $i++) {
575
+                $total += $items[$i]["quantity"]*$items[$i]["price"]->getAsIso(2);
576 576
                 $vat = $items[$i]["vat"];
577 577
                 ?>
578 578
                 <tr id="i<?php e($items[$i]["id"]); ?>" <?php if (isset($_GET['item_id']) && $_GET['item_id'] == $items[$i]['id']) {
@@ -584,10 +584,10 @@  discard block
 block discarded – undo
584 584
                         if ($items[$i]["description"] != "") {
585 585
                             autohtml($items[$i]["description"]);
586 586
                             if ($context->getDebtor()->get("locked") == false) {
587
-                                echo '<br /> <a href="'.url('item/' . intval($items[$i]["id"]), array('edit')).'">'.t('Edit text').'</a>';
587
+                                echo '<br /> <a href="'.url('item/'.intval($items[$i]["id"]), array('edit')).'">'.t('Edit text').'</a>';
588 588
                             }
589 589
                         } elseif ($context->getDebtor()->get("locked") == false) {
590
-                            echo ' <a href="'.url('item/' . intval($items[$i]["id"]), array('edit')).'">'.t('Add text').'</a>';
590
+                            echo ' <a href="'.url('item/'.intval($items[$i]["id"]), array('edit')).'">'.t('Add text').'</a>';
591 591
                         }
592 592
 
593 593
                         ?>
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
                         <?php
608 608
                     }
609 609
                     ?>
610
-                    <?php $price = new Ilib_Variable_Float($items[$i]["quantity"] * $items[$i]["price"]->getAsIso(2)); ?>
610
+                    <?php $price = new Ilib_Variable_Float($items[$i]["quantity"]*$items[$i]["price"]->getAsIso(2)); ?>
611 611
                     <td class="amount"><?php e($price->getAsLocal('da_dk', 2)); ?></td>
612 612
                     <?php if ($context->getDebtor()->getCurrency()) : ?>
613 613
                         <?php
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
                             ?>
623 623
                             <a class="moveup" href="<?php e(url(null, array('action' => 'moveup', 'item_id' => $items[$i]["id"]))); ?>"><?php e(t('Up')); ?></a>
624 624
                             <a class="movedown" href="<?php e(url(null, array('action' => 'movedown', 'item_id' => $items[$i]["id"]))); ?>"><?php e(t('Down')); ?></a>
625
-                            <a class="edit" href="<?php e(url('item/' . $items[$i]["id"], array('edit'))); ?>"><?php e(t('Edit')); ?></a>
625
+                            <a class="edit" href="<?php e(url('item/'.$items[$i]["id"], array('edit'))); ?>"><?php e(t('Edit')); ?></a>
626 626
                             <a class="delete" title="Dette vil slette varen!" href="<?php e(url(null, array('action' => 'delete_item', 'item_id' => $items[$i]["id"]))); ?>"><?php e(t('Delete')); ?></a>
627 627
                             <?php
628 628
                         }
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
                 </tr>
632 632
                 <?php
633 633
 
634
-                if (($vat == 1 && isset($items[$i+1]["vat"]) && $items[$i+1]["vat"] == 0) || ($vat == 1 && $i+1 >= $max)) {
634
+                if (($vat == 1 && isset($items[$i + 1]["vat"]) && $items[$i + 1]["vat"] == 0) || ($vat == 1 && $i + 1 >= $max)) {
635 635
                     // Hvis der er moms p� nuv�rende produkt, men n�ste produkt ikke har moms, eller hvis vi har moms og det er sidste produkt
636 636
                     ?>
637 637
                     <tr>
@@ -640,16 +640,16 @@  discard block
 block discarded – undo
640 640
                         <td>&nbsp;</td>
641 641
                         <td>&nbsp;</td>
642 642
                         <td>&nbsp;</td>
643
-                        <td class="amount"><b><?php e(number_format($total * 0.25, 2, ",", ".")); ?></b></td>
643
+                        <td class="amount"><b><?php e(number_format($total*0.25, 2, ",", ".")); ?></b></td>
644 644
                         <?php if ($context->getDebtor()->getCurrency()) : ?>
645
-                            <td class="amount"><b><?php e(number_format($total_currency * 0.25, 2, ",", ".")); ?></b></td>
645
+                            <td class="amount"><b><?php e(number_format($total_currency*0.25, 2, ",", ".")); ?></b></td>
646 646
                             <?php $total_currency *= 1.25; ?>
647 647
                         <?php endif; ?>
648 648
 
649 649
                         <td>&nbsp;</td>
650 650
                     </tr>
651 651
                     <?php
652
-                    $total = $total * 1.25;
652
+                    $total = $total*1.25;
653 653
                 }
654 654
             }
655 655
             ?>
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
 } ?>>
715 715
             <td class="number"><?php e($reminder["number"]); ?></td>
716 716
             <td><a href="<?php e(url('../../../reminders', array('contact_id' => $reminder["contact_id"]))); ?>"><?php e($reminder["name"]); ?></a></td>
717
-            <td><a href="<?php e(url('../../../reminders/' . $reminder["id"])); ?>"><?php (trim($reminder["description"] != "")) ? e($reminder["description"]) : e('['.t("No description").']'); ?></a></td>
717
+            <td><a href="<?php e(url('../../../reminders/'.$reminder["id"])); ?>"><?php (trim($reminder["description"] != "")) ? e($reminder["description"]) : e('['.t("No description").']'); ?></a></td>
718 718
             <td class="date">
719 719
                 <?php
720 720
                 if ($reminder["status"] != "created") {
@@ -741,9 +741,9 @@  discard block
 block discarded – undo
741 741
                 <?php
742 742
                 if ($reminder["locked"] == 0) {
743 743
                     ?>
744
-                    <a class="edit" href="<?php e(url('../../../reminders/' . $reminder["id"], array('edit'))); ?>"><?php e(t('Edit')); ?></a>
744
+                    <a class="edit" href="<?php e(url('../../../reminders/'.$reminder["id"], array('edit'))); ?>"><?php e(t('Edit')); ?></a>
745 745
                     <?php if ($reminder["status"] == "created") : ?>
746
-                    <a class="delete" href="<?php e(url('../../../reminders/' . $reminder["id"], array('delete'))); ?>"><?php e(t('Delete')); ?></a>
746
+                    <a class="delete" href="<?php e(url('../../../reminders/'.$reminder["id"], array('delete'))); ?>"><?php e(t('Delete')); ?></a>
747 747
                     <?php endif; ?>
748 748
                     <?php
749 749
                 }
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -393,8 +393,11 @@  discard block
 block discarded – undo
393 393
                                         <a href="<?php e(url('../' . $payment['id'] . '/state')); ?>"><?php e(t('state credit note')); ?></a>
394 394
                                     <?php elseif ($payment['type'] == 'depreciation') : ?>
395 395
                                         <a href="<?php e(url('../' . $context->getDebtor()->get('id') . '/depreciation/'.$payment['id'].'/state')); ?>"><?php e(t('state depreciation')); ?></a>
396
-                                    <?php else : ?>
397
-                                        <a href="<?php e(url('../' . $context->getDebtor()->get('id') . '/payment/' . $payment['id'] . '/state')); ?>"><?php e(t('state payment')); ?></a>
396
+                                    <?php else {
397
+    : ?>
398
+                                        <a href="<?php e(url('../' . $context->getDebtor()->get('id') . '/payment/' . $payment['id'] . '/state'));
399
+}
400
+?>"><?php e(t('state payment')); ?></a>
398 401
                                     <?php endif; ?>
399 402
                                 </td>
400 403
                             <?php endif; ?>
@@ -526,9 +529,12 @@  discard block
 block discarded – undo
526 529
                 <div class="warning">
527 530
                     <?php e(t('An online payment should be present. However it has not been created from the shop. If you want to make it possible to pay online, you should create the order from your shop, edit it, and then return to this page and send the payment link to the customer')); ?>.
528 531
                 </div>
529
-            <?php else : ?>
532
+            <?php else {
533
+    : ?>
530 534
                 <div class="warning">
531
-                    <?php e(t('An onlinepayment should be present. You can supply a payment link from the shop. Supplying a link would make it possible to automatically writing an email to the contact with the payment link')); ?>.
535
+                    <?php e(t('An onlinepayment should be present. You can supply a payment link from the shop. Supplying a link would make it possible to automatically writing an email to the contact with the payment link'));
536
+}
537
+?>.
532 538
                 </div>
533 539
             <?php endif;
534 540
         }
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/templates/item-edit.tpl.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
     <input type="hidden" name="product_variation_detail_id" value="<?php  e($context->getDebtor()->item->get('product_variation_detail_id')); ?>" />
59 59
 
60 60
     <input type="submit" name="submit" value="<?php e(t('Save')); ?>" class="save" />
61
-    <a href="<?php e(url('../../'));  ?>"><?php e(t('Cancel')); ?></a>
61
+    <a href="<?php e(url('../../')); ?>"><?php e(t('Cancel')); ?></a>
62 62
 
63 63
 </div>
64 64
 </form>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,8 +25,10 @@
 block discarded – undo
25 25
     <div class="formrow">
26 26
         <label for="vat"><?php e(t('VAT')); ?></label><span id="vat"><?php if ($context->getDebtor()->item->getTaxPercent() > 0) :
27 27
             e(t('Yes'));
28
-else :
28
+else {
29
+    :
29 30
     e(t('No'));
31
+}
30 32
 endif; ?></span>
31 33
     </div>
32 34
 </fieldset>
Please login to merge, or discard this patch.
src/Intraface/modules/debtor/Controller/templates/reminder.tpl.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 }
15 15
             ?>
16 16
 
17
-                <li><a class="pdf" href="<?php e(url(null . '.pdf')); ?>" target="_blank"><?php e(t('Print pdf')); ?></a></li>
17
+                <li><a class="pdf" href="<?php e(url(null.'.pdf')); ?>" target="_blank"><?php e(t('Print pdf')); ?></a></li>
18 18
             <?php
19 19
             if ($reminder->get("send_as") == "email" and $reminder->get('status_key') < 1) {
20 20
                 ?>
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     <?php if ($context->query('flare')) : ?>
36 36
         <p class="message"><?php e($context->query('flare')); ?></p>
37
-    <?php endif;?>
37
+    <?php endif; ?>
38 38
 
39 39
     <form method="post" action="<?php e(url(null)); ?>">
40 40
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                 <?php
153 153
                 $contact_module = $context->getKernel()->getModule('contact');
154 154
                 ?>
155
-                <td><?php e($reminder->contact->get("number")); ?> <a href="<?php e(url('../../../contact/' . $reminder->contact->get('id'), array('edit'))); ?>" class="edit">Ret</a></td>
155
+                <td><?php e($reminder->contact->get("number")); ?> <a href="<?php e(url('../../../contact/'.$reminder->contact->get('id'), array('edit'))); ?>" class="edit">Ret</a></td>
156 156
             </tr>
157 157
             <tr>
158 158
                 <th><?php e(t('Contact')); ?></th>
@@ -283,9 +283,9 @@  discard block
 block discarded – undo
283 283
                                 <?php $module_accounting = $context->getKernel()->useModule('accounting'); ?>
284 284
                                 <a href="<?php e(url('../../../accounting/search', array('voucher_id' => $payments[$i]['voucher_id']))); ?>"><?php e(t('voucher')); ?></a>
285 285
                             <?php elseif ($payments[$i]['type'] == 'depreciation') : ?>
286
-                                <a href="<?php e(url('depreciation/' . $payments[$i]['id'] . '/state')); ?>"><?php e(t('state depreciation')); ?></a>
286
+                                <a href="<?php e(url('depreciation/'.$payments[$i]['id'].'/state')); ?>"><?php e(t('state depreciation')); ?></a>
287 287
                             <?php else : ?>
288
-                                <a href="<?php e(url('payment/' . $payments[$i]['id'] . '/state')); ?>"><?php e(t('state payment')); ?></a>
288
+                                <a href="<?php e(url('payment/'.$payments[$i]['id'].'/state')); ?>"><?php e(t('state payment')); ?></a>
289 289
                             <?php endif; ?>
290 290
                         </td>
291 291
                     <?php endif; ?>
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
                 ?>
346 346
                 <tr>
347 347
                     <td class="number"><?php e($items[$i]["number"]); ?></td>
348
-                    <td><a href="<?php e(url('../../invoice/list/' . intval($items[$i]['invoice_id']))); ?>"><?php e($items[$i]["description"]); ?></a></td>
348
+                    <td><a href="<?php e(url('../../invoice/list/'.intval($items[$i]['invoice_id']))); ?>"><?php e($items[$i]["description"]); ?></a></td>
349 349
                     <td class="date"><?php e($items[$i]["dk_due_date"]); ?></td>
350 350
                     <td class="amount"><?php e(number_format($items[$i]["arrears"], 2, ",", ".")); ?></td>
351 351
                 </tr>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -284,8 +284,11 @@
 block discarded – undo
284 284
                                 <a href="<?php e(url('../../../accounting/search', array('voucher_id' => $payments[$i]['voucher_id']))); ?>"><?php e(t('voucher')); ?></a>
285 285
                             <?php elseif ($payments[$i]['type'] == 'depreciation') : ?>
286 286
                                 <a href="<?php e(url('depreciation/' . $payments[$i]['id'] . '/state')); ?>"><?php e(t('state depreciation')); ?></a>
287
-                            <?php else : ?>
288
-                                <a href="<?php e(url('payment/' . $payments[$i]['id'] . '/state')); ?>"><?php e(t('state payment')); ?></a>
287
+                            <?php else {
288
+    : ?>
289
+                                <a href="<?php e(url('payment/' . $payments[$i]['id'] . '/state'));
290
+}
291
+?>"><?php e(t('state payment')); ?></a>
289 292
                             <?php endif; ?>
290 293
                         </td>
291 294
                     <?php endif; ?>
Please login to merge, or discard this patch.