@@ -45,7 +45,7 @@ |
||
45 | 45 | echo "<form action=\"{$data['expenses_url']}\" method='post'><div>"; |
46 | 46 | $current_user = midcom::get()->auth->user->get_storage(); |
47 | 47 | echo "<input type=\"hidden\" name=\"person[]\" value=\"{$current_user->id}\" />"; |
48 | - echo "<input type=\"submit\" value=\"".sprintf($data['l10n']->get('see all %s hours'), round($total_hours, 2))."\" />"; |
|
48 | + echo "<input type=\"submit\" value=\"" . sprintf($data['l10n']->get('see all %s hours'), round($total_hours, 2)) . "\" />"; |
|
49 | 49 | echo "</div></form>"; |
50 | 50 | } else { |
51 | 51 | echo "<p><a href=\"{$data['expenses_url']}\">" . midcom::get()->i18n->get_string('report hours', 'org.openpsa.expenses') . "</a></p>\n"; |
@@ -19,7 +19,8 @@ |
||
19 | 19 | $customer_html = '<a href="' . $contacts_url . '/group/' . $customer->guid . '/">' . $customer_html . "</a>\n"; |
20 | 20 | } |
21 | 21 | echo $customer_html; |
22 | - } catch (midcom_error $e) { |
|
22 | + } |
|
23 | + catch (midcom_error $e) { |
|
23 | 24 | } |
24 | 25 | |
25 | 26 | if ($project->manager) { |
@@ -6,7 +6,8 @@ |
||
6 | 6 | foreach ($data['prospects'] as $prospect) { |
7 | 7 | try { |
8 | 8 | $person = org_openpsa_contacts_person_dba::get_cached($prospect->person); |
9 | - } catch (midcom_error $e) { |
|
9 | + } |
|
10 | + catch (midcom_error $e) { |
|
10 | 11 | continue; |
11 | 12 | } ?> |
12 | 13 | <person> |
@@ -69,10 +69,10 @@ |
||
69 | 69 | echo " <td class=\"numeric\"><span title=\"" . $data['l10n']->get('ongoing') . "\">{$task_count['ongoing']}</span></td>\n"; |
70 | 70 | echo " <td class=\"numeric\"><span title=\"" . $data['l10n']->get('on_hold') . "\">{$task_count['on_hold']}</span></td>\n"; |
71 | 71 | echo " <td class=\"numeric\"><span title=\"" . $data['l10n']->get('closed') . "\">{$task_count['closed']}</span></td>\n"; |
72 | - echo " <td class=\"numeric\"> " ; |
|
73 | - echo " <span title=\"" . $data['l10n']->get('reported') . "\">" . round($hours['reportedHours'], 2) . "</span>"; |
|
72 | + echo " <td class=\"numeric\"> "; |
|
73 | + echo " <span title=\"" . $data['l10n']->get('reported') . "\">" . round($hours['reportedHours'], 2) . "</span>"; |
|
74 | 74 | if ($hours['plannedHours'] > 0) { |
75 | - echo " / <span title=\"" . $data['l10n']->get('planned hours') . "\">" . round($hours['plannedHours'], 2) . "</span>"; |
|
75 | + echo " / <span title=\"" . $data['l10n']->get('planned hours') . "\">" . round($hours['plannedHours'], 2) . "</span>"; |
|
76 | 76 | } |
77 | 77 | echo " </td>\n"; |
78 | 78 |
@@ -31,7 +31,8 @@ |
||
31 | 31 | try { |
32 | 32 | $customer = new org_openpsa_contacts_group_dba($customer); |
33 | 33 | $customer_title = $customer->official; |
34 | - } catch (midcom_error $e) { |
|
34 | + } |
|
35 | + catch (midcom_error $e) { |
|
35 | 36 | $customer_title = $data['l10n']->get('no customer'); |
36 | 37 | } |
37 | 38 |
@@ -14,7 +14,7 @@ |
||
14 | 14 | echo "\n<li class=\"separator\"></li>"; |
15 | 15 | echo "\n<li class=\"page splitter\">...</li>"; |
16 | 16 | } |
17 | - if ( $i > 0 |
|
17 | + if ($i > 0 |
|
18 | 18 | && $i < $total_links) { |
19 | 19 | echo "\n<li class=\"separator\"></li>"; |
20 | 20 | } |
@@ -82,25 +82,25 @@ discard block |
||
82 | 82 | <tr> |
83 | 83 | <td class="title"><?php echo $data['l10n']->get('cost'); ?></td> |
84 | 84 | <?php |
85 | - if ($data['deliverable']->costType == '%') { |
|
86 | - ?> |
|
85 | + if ($data['deliverable']->costType == '%') { |
|
86 | + ?> |
|
87 | 87 | <td class="numeric"><?php echo $view['costPerUnit']; ?> %</td> |
88 | 88 | <td class="numeric"> </td> |
89 | 89 | <td class="numeric"> </td> |
90 | 90 | <?php |
91 | - } else { |
|
92 | - ?> |
|
91 | + } else { |
|
92 | + ?> |
|
93 | 93 | <td class="numeric"><?php echo $formatter->number($data['deliverable']->costPerUnit); ?></td> |
94 | 94 | <td class="numeric"><?php echo $view['plannedUnits']; ?></td> |
95 | 95 | <td class="numeric"><?php echo $view['units']; ?></td> |
96 | 96 | <?php |
97 | - } ?> |
|
97 | + } ?> |
|
98 | 98 | <td class="numeric"><?php echo $formatter->number($data['deliverable']->cost); ?></td> |
99 | 99 | </tr> |
100 | 100 | </tbody> |
101 | 101 | </table> |
102 | 102 | <?php if ($data['deliverable']->invoiceByActualUnits) { |
103 | - ?> |
|
103 | + ?> |
|
104 | 104 | <ul> |
105 | 105 | <li><?php echo $data['l10n']->get('invoice by actual units'); ?></li> |
106 | 106 | <?php |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } ?> |
110 | 110 | </ul> |
111 | 111 | <?php |
112 | - } ?> |
|
112 | + } ?> |
|
113 | 113 | </div> |
114 | 114 | </div> |
115 | 115 | <?php |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | $state = $data['deliverable']->get_state(); |
4 | 4 | $formatter = $data['l10n']->get_formatter(); |
5 | 5 | $per_unit = $data['l10n']->get('per unit'); |
6 | -if ( $data['product'] |
|
6 | +if ($data['product'] |
|
7 | 7 | && $unit_option = org_openpsa_products_viewer::get_unit_option($data['product']->unit)) { |
8 | 8 | $per_unit = sprintf($data['l10n']->get('per %s'), $unit_option); |
9 | 9 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | <div class="wide"> |
130 | 130 | <?php |
131 | 131 | $tabs = []; |
132 | - if ( $data['invoices_url'] |
|
132 | + if ($data['invoices_url'] |
|
133 | 133 | && $data['deliverable']->invoiced > 0) { |
134 | 134 | $tabs[] = [ |
135 | 135 | 'url' => $data['invoices_url'] . "list/deliverable/{$data['deliverable']->guid}/", |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | ]; |
138 | 138 | } |
139 | 139 | |
140 | - if ( $data['projects_url'] |
|
140 | + if ($data['projects_url'] |
|
141 | 141 | && $data['deliverable']->state >= org_openpsa_sales_salesproject_deliverable_dba::STATE_ORDERED |
142 | 142 | && $data['product'] |
143 | 143 | && $data['product']->orgOpenpsaObtype == org_openpsa_products_product_dba::TYPE_SERVICE) { |
@@ -130,25 +130,25 @@ discard block |
||
130 | 130 | <tr> |
131 | 131 | <td class="title"><?php echo $data['l10n']->get('cost'); ?></td> |
132 | 132 | <?php |
133 | - if ($data['deliverable']->costType == '%') { |
|
134 | - ?> |
|
133 | + if ($data['deliverable']->costType == '%') { |
|
134 | + ?> |
|
135 | 135 | <td class="numeric"><?php echo $view['costPerUnit']; ?> %</td> |
136 | 136 | <td class="numeric"> </td> |
137 | 137 | <td class="numeric"> </td> |
138 | 138 | <?php |
139 | - } else { |
|
140 | - ?> |
|
139 | + } else { |
|
140 | + ?> |
|
141 | 141 | <td class="numeric"><?php echo $formatter->number($data['deliverable']->costPerUnit); ?></td> |
142 | 142 | <td class="numeric"><?php echo $view['plannedUnits']; ?></td> |
143 | 143 | <td class="numeric"><?php echo $view['units']; ?></td> |
144 | 144 | <?php |
145 | - } ?> |
|
145 | + } ?> |
|
146 | 146 | <td class="numeric"><?php echo $formatter->number($data['deliverable']->cost); ?></td> |
147 | 147 | </tr> |
148 | 148 | </tbody> |
149 | 149 | </table> |
150 | 150 | <?php if ($data['deliverable']->invoiceByActualUnits) { |
151 | - ?> |
|
151 | + ?> |
|
152 | 152 | <ul> |
153 | 153 | <li><?php echo $data['l10n']->get('invoice by actual units'); ?></li> |
154 | 154 | <?php |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } ?> |
158 | 158 | </ul> |
159 | 159 | <?php |
160 | - } ?> |
|
160 | + } ?> |
|
161 | 161 | </div> |
162 | 162 | </div> |
163 | 163 | <div class="field"> |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | $state = $data['deliverable']->get_state(); |
4 | 4 | $formatter = $data['l10n']->get_formatter(); |
5 | 5 | $per_unit = $data['l10n']->get('per unit'); |
6 | -if ( $data['product'] |
|
6 | +if ($data['product'] |
|
7 | 7 | && $unit_option = org_openpsa_products_viewer::get_unit_option($data['product']->unit)) { |
8 | 8 | $per_unit = sprintf($data['l10n']->get('per %s'), $unit_option); |
9 | 9 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | <div class="wide"> |
130 | 130 | <?php |
131 | 131 | $tabs = []; |
132 | - if ( $data['invoices_url'] |
|
132 | + if ($data['invoices_url'] |
|
133 | 133 | && $data['deliverable']->invoiced > 0) { |
134 | 134 | $tabs[] = [ |
135 | 135 | 'url' => $data['invoices_url'] . "list/deliverable/{$data['deliverable']->guid}/", |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | ]; |
138 | 138 | } |
139 | 139 | |
140 | - if ( $data['projects_url'] |
|
140 | + if ($data['projects_url'] |
|
141 | 141 | && $data['deliverable']->state >= org_openpsa_sales_salesproject_deliverable_dba::STATE_ORDERED |
142 | 142 | && $data['product'] |
143 | 143 | && $data['product']->orgOpenpsaObtype == org_openpsa_products_product_dba::TYPE_SERVICE) { |
@@ -144,7 +144,7 @@ |
||
144 | 144 | fields: { |
145 | 145 | index_title: '<?php echo $data['l10n']->get('title'); ?>', |
146 | 146 | <?php |
147 | - if ($data['mode'] != 'customer') { |
|
147 | + if ($data['mode'] != 'customer') { |
|
148 | 148 | ?> |
149 | 149 | index_customer: '<?php echo $data['l10n']->get('customer'); ?>', |
150 | 150 | <?php |
@@ -35,7 +35,8 @@ discard block |
||
35 | 35 | if ($data['contacts_url']) { |
36 | 36 | $row['customer'] = "<a href=\"{$data['contacts_url']}group/{$customer->guid}/\">{$label}</a>"; |
37 | 37 | } |
38 | - } catch (midcom_error $e) { |
|
38 | + } |
|
39 | + catch (midcom_error $e) { |
|
39 | 40 | $e->log(); |
40 | 41 | } |
41 | 42 | } |
@@ -51,7 +52,8 @@ discard block |
||
51 | 52 | if ($data['contacts_url']) { |
52 | 53 | $row['customerContact'] = "<a href=\"{$data['contacts_url']}person/{$customer->guid}/\">{$label}</a>"; |
53 | 54 | } |
54 | - } catch (midcom_error $e) { |
|
55 | + } |
|
56 | + catch (midcom_error $e) { |
|
55 | 57 | $e->log(); |
56 | 58 | } |
57 | 59 | } |
@@ -63,7 +65,8 @@ discard block |
||
63 | 65 | $owner_widget = org_openpsa_widgets_contact::get($salesproject->owner); |
64 | 66 | $row['index_owner'] = $owner->rname; |
65 | 67 | $row['owner'] = $owner_widget->show_inline(); |
66 | - } catch (midcom_error $e) { |
|
68 | + } |
|
69 | + catch (midcom_error $e) { |
|
67 | 70 | $row['index_owner'] = ''; |
68 | 71 | $row['owner'] = ''; |
69 | 72 | } |
@@ -17,7 +17,8 @@ |
||
17 | 17 | try { |
18 | 18 | $group = org_openpsa_products_product_group_dba::get_cached($product['productGroup']); |
19 | 19 | $desc .= $group->title . ', '; |
20 | - } catch (midcom_error $e) { |
|
20 | + } |
|
21 | + catch (midcom_error $e) { |
|
21 | 22 | $e->log(); |
22 | 23 | } |
23 | 24 | if ($product['delivery'] == org_openpsa_products_product_dba::DELIVERY_SINGLE) { |