@@ -115,8 +115,7 @@ discard block |
||
| 115 | 115 | $cancelation_invoice = new org_openpsa_invoices_invoice_dba($this->invoice->cancelationInvoice); |
| 116 | 116 | $cancelation_invoice_link = $prefix . 'invoice/' . $cancelation_invoice->guid . '/'; |
| 117 | 117 | $cancelation_invoice_link = "<a href=\"" . $cancelation_invoice_link . "\">" . $this->l10n->get('invoice') . " " . $cancelation_invoice->get_label() . "</a>"; |
| 118 | - $entries[] = array |
|
| 119 | - ( |
|
| 118 | + $entries[] = array( |
|
| 120 | 119 | 'timestamp' => $cancelation_invoice->metadata->created, |
| 121 | 120 | 'message' => sprintf($this->l10n->get('invoice got canceled by %s'), $cancelation_invoice_link), |
| 122 | 121 | 'order' => 4 |
@@ -124,20 +123,18 @@ discard block |
||
| 124 | 123 | } |
| 125 | 124 | else if ($this->invoice->paid) |
| 126 | 125 | { |
| 127 | - $entries[] = array |
|
| 128 | - ( |
|
| 126 | + $entries[] = array( |
|
| 129 | 127 | 'timestamp' => $this->invoice->paid, |
| 130 | 128 | 'message' => sprintf($this->l10n->get('marked invoice %s paid'), ''), |
| 131 | 129 | 'order' => 3 |
| 132 | 130 | ); |
| 133 | 131 | } |
| 134 | - if ( $this->invoice->due |
|
| 135 | - && ( ( $this->invoice->due < time() |
|
| 132 | + if ($this->invoice->due |
|
| 133 | + && (($this->invoice->due < time() |
|
| 136 | 134 | && $this->invoice->paid == 0) |
| 137 | 135 | || $this->invoice->due < $this->invoice->paid)) |
| 138 | 136 | { |
| 139 | - $entries[] = array |
|
| 140 | - ( |
|
| 137 | + $entries[] = array( |
|
| 141 | 138 | 'timestamp' => $this->invoice->due, |
| 142 | 139 | 'message' => $this->l10n->get('overdue'), |
| 143 | 140 | 'order' => 2 |
@@ -148,8 +145,7 @@ discard block |
||
| 148 | 145 | { |
| 149 | 146 | if ($mail_time = $this->invoice->get_parameter('org.openpsa.invoices', 'sent_by_mail')) |
| 150 | 147 | { |
| 151 | - $entries[] = array |
|
| 152 | - ( |
|
| 148 | + $entries[] = array( |
|
| 153 | 149 | 'timestamp' => $mail_time, |
| 154 | 150 | 'message' => sprintf($this->l10n->get('marked invoice %s sent per mail'), ''), |
| 155 | 151 | 'order' => 1 |
@@ -157,16 +153,14 @@ discard block |
||
| 157 | 153 | } |
| 158 | 154 | else |
| 159 | 155 | { |
| 160 | - $entries[] = array |
|
| 161 | - ( |
|
| 156 | + $entries[] = array( |
|
| 162 | 157 | 'timestamp' => $this->invoice->sent, |
| 163 | 158 | 'message' => sprintf($this->l10n->get('marked invoice %s sent'), ''), |
| 164 | 159 | 'order' => 1 |
| 165 | 160 | ); |
| 166 | 161 | } |
| 167 | 162 | } |
| 168 | - $entries[] = array |
|
| 169 | - ( |
|
| 163 | + $entries[] = array( |
|
| 170 | 164 | 'timestamp' => $this->invoice->metadata->created, |
| 171 | 165 | 'message' => sprintf($this->l10n->get('invoice %s created'), ''), |
| 172 | 166 | 'order' => 0 |
@@ -183,8 +177,7 @@ discard block |
||
| 183 | 177 | |
| 184 | 178 | foreach ($rows as $row) |
| 185 | 179 | { |
| 186 | - $entries[] = array |
|
| 187 | - ( |
|
| 180 | + $entries[] = array( |
|
| 188 | 181 | 'timestamp' => strtotime((string) $row['created']), |
| 189 | 182 | 'message' => $row['title'] |
| 190 | 183 | ); |
@@ -121,8 +121,7 @@ discard block |
||
| 121 | 121 | 'message' => sprintf($this->l10n->get('invoice got canceled by %s'), $cancelation_invoice_link), |
| 122 | 122 | 'order' => 4 |
| 123 | 123 | ); |
| 124 | - } |
|
| 125 | - else if ($this->invoice->paid) |
|
| 124 | + } else if ($this->invoice->paid) |
|
| 126 | 125 | { |
| 127 | 126 | $entries[] = array |
| 128 | 127 | ( |
@@ -154,8 +153,7 @@ discard block |
||
| 154 | 153 | 'message' => sprintf($this->l10n->get('marked invoice %s sent per mail'), ''), |
| 155 | 154 | 'order' => 1 |
| 156 | 155 | ); |
| 157 | - } |
|
| 158 | - else |
|
| 156 | + } else |
|
| 159 | 157 | { |
| 160 | 158 | $entries[] = array |
| 161 | 159 | ( |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | // TODO: Warehouse management: create new order |
| 95 | - if ( $this->_deliverable->end < $next_cycle_start |
|
| 95 | + if ($this->_deliverable->end < $next_cycle_start |
|
| 96 | 96 | && $this->_deliverable->end != 0) |
| 97 | 97 | { |
| 98 | 98 | debug_add('Do not register next cycle, the contract ends before'); |
@@ -112,8 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | private function _create_at_entry($cycle_number, $start) |
| 114 | 114 | { |
| 115 | - $args = array |
|
| 116 | - ( |
|
| 115 | + $args = array( |
|
| 117 | 116 | 'deliverable' => $this->_deliverable->guid, |
| 118 | 117 | 'cycle' => $cycle_number, |
| 119 | 118 | ); |
@@ -344,7 +343,7 @@ discard block |
||
| 344 | 343 | { |
| 345 | 344 | //If previous cycle was run at the end of the month, the new one should be at the end of the month as well |
| 346 | 345 | $date = new DateTime(gmdate('Y-m-d', $time), new DateTimeZone('GMT')); |
| 347 | - if ( $date->format('t') == $date->format('j') |
|
| 346 | + if ($date->format('t') == $date->format('j') |
|
| 348 | 347 | && $new_date->format('t') != $new_date->format('j')) |
| 349 | 348 | { |
| 350 | 349 | $new_date->setDate((int) $new_date->format('Y'), (int) $new_date->format('m'), (int) $new_date->format('t')); |
@@ -415,11 +414,11 @@ discard block |
||
| 415 | 414 | break; |
| 416 | 415 | case 'q': |
| 417 | 416 | // Quarterly recurring subscription |
| 418 | - $identifier = ceil(((int)$date->format('n')) / 4) . 'Q' . $date->format('y'); |
|
| 417 | + $identifier = ceil(((int) $date->format('n')) / 4) . 'Q' . $date->format('y'); |
|
| 419 | 418 | break; |
| 420 | 419 | case 'hy': |
| 421 | 420 | // Half-yearly recurring subscription |
| 422 | - $identifier = ceil(((int)$date->format('n')) / 6) . '/' . $date->format('Y'); |
|
| 421 | + $identifier = ceil(((int) $date->format('n')) / 6) . '/' . $date->format('Y'); |
|
| 423 | 422 | break; |
| 424 | 423 | case 'y': |
| 425 | 424 | // Yearly recurring subscription |
@@ -78,8 +78,7 @@ discard block |
||
| 78 | 78 | if (org_openpsa_projects_workflow::complete($task, sprintf($this->_i18n->get_string('completed by subscription %s', 'org.openpsa.sales'), $cycle_number))) |
| 79 | 79 | { |
| 80 | 80 | $tasks_completed[] = $task; |
| 81 | - } |
|
| 82 | - else |
|
| 81 | + } else |
|
| 83 | 82 | { |
| 84 | 83 | $tasks_not_completed[] = $task; |
| 85 | 84 | } |
@@ -141,8 +140,7 @@ discard block |
||
| 141 | 140 | try |
| 142 | 141 | { |
| 143 | 142 | $owner = midcom_db_person::get_cached($salesproject->owner); |
| 144 | - } |
|
| 145 | - catch (midcom_error $e) |
|
| 143 | + } catch (midcom_error $e) |
|
| 146 | 144 | { |
| 147 | 145 | $e->log(); |
| 148 | 146 | return; |
@@ -152,8 +150,7 @@ discard block |
||
| 152 | 150 | if (is_null($next_run)) |
| 153 | 151 | { |
| 154 | 152 | $next_run_label = $l10n->get('no more cycles'); |
| 155 | - } |
|
| 156 | - else |
|
| 153 | + } else |
|
| 157 | 154 | { |
| 158 | 155 | $next_run_label = $l10n->get_formatter()->date($next_run); |
| 159 | 156 | } |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<tr class="&(data['class']);" id="task_<?php echo $data['task']->id;?>"> |
|
| 1 | +<tr class="&(data['class']);" id="task_<?php echo $data['task']->id; ?>"> |
|
| 2 | 2 | <td> |
| 3 | 3 | <input type="checkbox"<?php echo $data['disabled']; ?> name="org_openpsa_invoices_invoice_tasks[<?php echo $data['task']->id; ?>]" checked="checked" value="1" /> |
| 4 | 4 | </td> |
@@ -18,12 +18,12 @@ discard block |
||
| 18 | 18 | <?php echo $data['reported_hours']; ?> |
| 19 | 19 | </td> |
| 20 | 20 | <td class="numeric"> |
| 21 | - <input id="units_<?php echo $data['task']->id;?>" class="units" type="text"<?php echo $data['disabled']; ?> size="6" name="org_openpsa_invoices_invoice_tasks_units[<?php echo $data['task']->id; ?>]" value="<?php echo $data['invoiceable_units']; ?>" /> |
|
| 21 | + <input id="units_<?php echo $data['task']->id; ?>" class="units" type="text"<?php echo $data['disabled']; ?> size="6" name="org_openpsa_invoices_invoice_tasks_units[<?php echo $data['task']->id; ?>]" value="<?php echo $data['invoiceable_units']; ?>" /> |
|
| 22 | 22 | </td> |
| 23 | 23 | <td class="numeric"> |
| 24 | - <input id="price_per_unit_<?php echo $data['task']->id;?>" class="price_per_unit" type="text"<?php echo $data['disabled']; ?> size="6" name="org_openpsa_invoices_invoice_tasks_price[<?php echo $data['task']->id; ?>]" value="<?php echo $data['default_price']; ?>" /> |
|
| 24 | + <input id="price_per_unit_<?php echo $data['task']->id; ?>" class="price_per_unit" type="text"<?php echo $data['disabled']; ?> size="6" name="org_openpsa_invoices_invoice_tasks_price[<?php echo $data['task']->id; ?>]" value="<?php echo $data['default_price']; ?>" /> |
|
| 25 | 25 | </td> |
| 26 | - <td id="row_sum_<?php echo $data['task']->id;?>" class="numeric"> |
|
| 27 | - <?php echo $data['invoiceable_units'] * $data['default_price'];?> |
|
| 26 | + <td id="row_sum_<?php echo $data['task']->id; ?>" class="numeric"> |
|
| 27 | + <?php echo $data['invoiceable_units'] * $data['default_price']; ?> |
|
| 28 | 28 | </td> |
| 29 | 29 | </tr> |
| 30 | 30 | \ No newline at end of file |
@@ -7,8 +7,7 @@ |
||
| 7 | 7 | if ($data['projects_url']) |
| 8 | 8 | { |
| 9 | 9 | echo "<a href=\"{$data['projects_url']}task/{$data['task']->guid}/\">" . $data['task']->get_label() . "</a>\n"; |
| 10 | - } |
|
| 11 | - else |
|
| 10 | + } else |
|
| 12 | 11 | { |
| 13 | 12 | echo $data['task']->get_label(); |
| 14 | 13 | } |
@@ -243,13 +243,13 @@ |
||
| 243 | 243 | datatype: "local", |
| 244 | 244 | data: &(grid_id);_entries, |
| 245 | 245 | colNames: ['id', <?php |
| 246 | - echo '"index_date", "' . midcom::get()->i18n->get_string('date', 'org.openpsa.projects') . '",'; |
|
| 246 | + echo '"index_date", "' . midcom::get()->i18n->get_string('date', 'org.openpsa.projects') . '",'; |
|
| 247 | 247 | |
| 248 | - echo '"index_reporter", "' . midcom::get()->i18n->get_string('reporter', 'org.openpsa.projects') . '",'; |
|
| 249 | - echo '"' . midcom::get()->i18n->get_string('hours', 'org.openpsa.projects') . '",'; |
|
| 250 | - echo '"' . midcom::get()->i18n->get_string('description', 'org.openpsa.projects') . '",'; |
|
| 251 | - echo '"' . midcom::get()->i18n->get_string('approved', 'org.openpsa.projects') . '",'; |
|
| 252 | - echo '"' . midcom::get()->i18n->get_string('task', 'org.openpsa.projects') . '"'; |
|
| 248 | + echo '"index_reporter", "' . midcom::get()->i18n->get_string('reporter', 'org.openpsa.projects') . '",'; |
|
| 249 | + echo '"' . midcom::get()->i18n->get_string('hours', 'org.openpsa.projects') . '",'; |
|
| 250 | + echo '"' . midcom::get()->i18n->get_string('description', 'org.openpsa.projects') . '",'; |
|
| 251 | + echo '"' . midcom::get()->i18n->get_string('approved', 'org.openpsa.projects') . '",'; |
|
| 252 | + echo '"' . midcom::get()->i18n->get_string('task', 'org.openpsa.projects') . '"'; |
|
| 253 | 253 | ?>], |
| 254 | 254 | colModel:[ |
| 255 | 255 | {name:'id', index:'id', hidden:true, key:true}, |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | } |
| 73 | 73 | ?> |
| 74 | 74 | |
| 75 | - <div class="field"><div class="title"><?php echo $data['l10n_midcom']->get('description');?>: </div> |
|
| 75 | + <div class="field"><div class="title"><?php echo $data['l10n_midcom']->get('description'); ?>: </div> |
|
| 76 | 76 | <div class="description value">&(view['description']:h);</div></div> |
| 77 | 77 | |
| 78 | 78 | <?php |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | if ($cancelation_invoice_link) |
| 91 | 91 | { |
| 92 | 92 | echo "<div class=\"field\">"; |
| 93 | - echo "<div class=\"title\">" . $data['l10n']->get('canceled by') .":</div>"; |
|
| 93 | + echo "<div class=\"title\">" . $data['l10n']->get('canceled by') . ":</div>"; |
|
| 94 | 94 | echo "<div class=\"value\">" . $cancelation_invoice_link . "</a></div>"; |
| 95 | 95 | echo "</div>"; |
| 96 | 96 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $canceled_invoice_link = $prefix . 'invoice/' . $canceled_invoice->guid . '/'; |
| 102 | 102 | |
| 103 | 103 | echo "<div class=\"field\">"; |
| 104 | - echo "<div class=\"title\">" . $data['l10n']->get('cancelation invoice for') .":</div>"; |
|
| 104 | + echo "<div class=\"title\">" . $data['l10n']->get('cancelation invoice for') . ":</div>"; |
|
| 105 | 105 | echo "<div class=\"value\"><a href=\"" . $canceled_invoice_link . "\">" . $data['l10n']->get('invoice') . " " . $canceled_invoice->get_label() . "</a></div>"; |
| 106 | 106 | echo "</div>"; |
| 107 | 107 | } |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | $approved_text = $data['l10n']->get('not approved'); |
| 213 | 213 | $approved_img_src .= 'page-notapproved.png'; |
| 214 | 214 | } |
| 215 | - $approved_img = "<img src='{$approved_img_src}' alt='{$approved_text}' title='{$approved_text}' />"; |
|
| 215 | + $approved_img = "<img src='{$approved_img_src}' alt='{$approved_text}' title='{$approved_text}' />"; |
|
| 216 | 216 | |
| 217 | 217 | $row['id'] = $report->id; |
| 218 | 218 | $row['index_date'] = $report->date; |
@@ -243,9 +243,9 @@ discard block |
||
| 243 | 243 | datatype: "local", |
| 244 | 244 | data: &(grid_id);_entries, |
| 245 | 245 | colNames: ['id', <?php |
| 246 | - echo '"index_date", "' . midcom::get()->i18n->get_string('date', 'org.openpsa.projects') . '",'; |
|
| 246 | + echo '"index_date", "' . midcom::get()->i18n->get_string('date', 'org.openpsa.projects') . '",'; |
|
| 247 | 247 | |
| 248 | - echo '"index_reporter", "' . midcom::get()->i18n->get_string('reporter', 'org.openpsa.projects') . '",'; |
|
| 248 | + echo '"index_reporter", "' . midcom::get()->i18n->get_string('reporter', 'org.openpsa.projects') . '",'; |
|
| 249 | 249 | echo '"' . midcom::get()->i18n->get_string('hours', 'org.openpsa.projects') . '",'; |
| 250 | 250 | echo '"' . midcom::get()->i18n->get_string('description', 'org.openpsa.projects') . '",'; |
| 251 | 251 | echo '"' . midcom::get()->i18n->get_string('approved', 'org.openpsa.projects') . '",'; |
@@ -6,8 +6,7 @@ discard block |
||
| 6 | 6 | try |
| 7 | 7 | { |
| 8 | 8 | $customer = org_openpsa_contacts_group_dba::get_cached($invoice->customer); |
| 9 | -} |
|
| 10 | -catch (midcom_error $e) |
|
| 9 | +} catch (midcom_error $e) |
|
| 11 | 10 | { |
| 12 | 11 | $customer = false; |
| 13 | 12 | } |
@@ -193,8 +192,7 @@ discard block |
||
| 193 | 192 | { |
| 194 | 193 | $task = org_openpsa_projects_task_dba::get_cached($report->task); |
| 195 | 194 | $reporter = org_openpsa_contacts_person_dba::get_cached($report->person); |
| 196 | - } |
|
| 197 | - catch (midcom_error $e) |
|
| 195 | + } catch (midcom_error $e) |
|
| 198 | 196 | { |
| 199 | 197 | continue; |
| 200 | 198 | } |
@@ -206,8 +204,7 @@ discard block |
||
| 206 | 204 | { |
| 207 | 205 | $approved_text = $data['l10n']->get('approved'); |
| 208 | 206 | $approved_img_src .= 'page-approved.png'; |
| 209 | - } |
|
| 210 | - else |
|
| 207 | + } else |
|
| 211 | 208 | { |
| 212 | 209 | $approved_text = $data['l10n']->get('not approved'); |
| 213 | 210 | $approved_img_src .= 'page-notapproved.png'; |
@@ -16,8 +16,7 @@ |
||
| 16 | 16 | $classes .= ' normal'; |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | -$footer_data = array |
|
| 20 | -( |
|
| 19 | +$footer_data = array( |
|
| 21 | 20 | 'customer' => $data['l10n']->get('totals'), |
| 22 | 21 | 'sum' => $formatter->number($grid->get_provider()->get_column_total('index_sum')) |
| 23 | 22 | ); |
@@ -6,12 +6,10 @@ discard block |
||
| 6 | 6 | if ($data['list_type'] == 'overdue') |
| 7 | 7 | { |
| 8 | 8 | $classes .= ' bad'; |
| 9 | -} |
|
| 10 | -else if ($data['list_type'] == 'paid') |
|
| 9 | +} else if ($data['list_type'] == 'paid') |
|
| 11 | 10 | { |
| 12 | 11 | $classes .= ' good'; |
| 13 | -} |
|
| 14 | -else if ($data['list_type'] == 'open') |
|
| 12 | +} else if ($data['list_type'] == 'open') |
|
| 15 | 13 | { |
| 16 | 14 | $classes .= ' normal'; |
| 17 | 15 | } |
@@ -51,8 +49,7 @@ discard block |
||
| 51 | 49 | if ($data['list_type'] != 'paid') |
| 52 | 50 | { |
| 53 | 51 | $grid->set_column('action', $data['l10n']->get('next action'), 'width: 80, align: "center", title: false, sortable: false'); |
| 54 | -} |
|
| 55 | -else |
|
| 52 | +} else |
|
| 56 | 53 | { |
| 57 | 54 | $grid->set_column('paid', $data['l10n']->get('paid date'), 'width: 80, align: "right", formatter: "date"'); |
| 58 | 55 | } |
@@ -64,8 +64,7 @@ |
||
| 64 | 64 | $grid->set_column('paid', $data['l10n']->get('paid date'), 'width: 80, align: "right", formatter: "date"'); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | -$footer_data = array |
|
| 68 | -( |
|
| 67 | +$footer_data = array( |
|
| 69 | 68 | 'customer' => $data['l10n']->get('totals') |
| 70 | 69 | ); |
| 71 | 70 | |
@@ -7,8 +7,7 @@ discard block |
||
| 7 | 7 | if ($data['list_type'] == 'overdue') |
| 8 | 8 | { |
| 9 | 9 | $classes .= ' bad'; |
| 10 | -} |
|
| 11 | -else if ($data['list_type'] == 'paid') |
|
| 10 | +} else if ($data['list_type'] == 'paid') |
|
| 12 | 11 | { |
| 13 | 12 | $classes .= ' good'; |
| 14 | 13 | } |
@@ -58,8 +57,7 @@ discard block |
||
| 58 | 57 | if ($data['list_type'] != 'paid') |
| 59 | 58 | { |
| 60 | 59 | $grid->set_column('action', $data['l10n']->get('next action'), 'width: 80, align: "center"'); |
| 61 | -} |
|
| 62 | -else |
|
| 60 | +} else |
|
| 63 | 61 | { |
| 64 | 62 | $grid->set_column('paid', $data['l10n']->get('paid date'), 'width: 80, align: "right", formatter: "date"'); |
| 65 | 63 | } |
@@ -1,16 +1,14 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | $i18n = midcom::get()->i18n; |
| 3 | 3 | $grid = $data['grid']; |
| 4 | -$footer_data = array |
|
| 5 | -( |
|
| 4 | +$footer_data = array( |
|
| 6 | 5 | 'customer' => $data['l10n']->get('totals'), |
| 7 | 6 | 'sum' => $grid->get_provider()->get_column_total('sum') |
| 8 | 7 | ); |
| 9 | 8 | |
| 10 | 9 | $grid->set_option('loadonce', true) |
| 11 | 10 | ->set_option('grouping', true) |
| 12 | -->set_option('groupingView', array |
|
| 13 | -( |
|
| 11 | +->set_option('groupingView', array( |
|
| 14 | 12 | 'groupField' => array('month'), |
| 15 | 13 | 'groupColumnShow' => array(false), |
| 16 | 14 | 'groupText' => array('<strong>{0}</strong> ({1})'), |
@@ -63,8 +63,7 @@ |
||
| 63 | 63 | if ($item->id) |
| 64 | 64 | { |
| 65 | 65 | $stat = $item->update(); |
| 66 | - } |
|
| 67 | - else |
|
| 66 | + } else |
|
| 68 | 67 | { |
| 69 | 68 | $stat = $item->create(); |
| 70 | 69 | } |
@@ -55,8 +55,7 @@ discard block |
||
| 55 | 55 | { |
| 56 | 56 | $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($task->agreement); |
| 57 | 57 | $item->deliverable = $deliverable->id; |
| 58 | - } |
|
| 59 | - catch (midcom_error $e) |
|
| 58 | + } catch (midcom_error $e) |
|
| 60 | 59 | { |
| 61 | 60 | $e->log(); |
| 62 | 61 | } |
@@ -155,8 +154,7 @@ discard block |
||
| 155 | 154 | $customer = org_openpsa_contacts_group_dba::get_cached($customer_id); |
| 156 | 155 | $data['customer_label'] = $customer->official; |
| 157 | 156 | $data['disabled'] = ''; |
| 158 | - } |
|
| 159 | - catch (midcom_error $e) |
|
| 157 | + } catch (midcom_error $e) |
|
| 160 | 158 | { |
| 161 | 159 | $data['customer_label'] = $this->_l10n->get('no customer'); |
| 162 | 160 | $data['disabled'] = ' disabled="disabled"'; |
@@ -180,21 +178,18 @@ discard block |
||
| 180 | 178 | if ($deliverable->invoiceByActualUnits) |
| 181 | 179 | { |
| 182 | 180 | $data['invoiceable_units'] = $task->invoiceableHours; |
| 183 | - } |
|
| 184 | - else |
|
| 181 | + } else |
|
| 185 | 182 | { |
| 186 | 183 | $data['invoiceable_units'] = $task->plannedHours; |
| 187 | 184 | } |
| 188 | - } |
|
| 189 | - catch (midcom_error $e) |
|
| 185 | + } catch (midcom_error $e) |
|
| 190 | 186 | { |
| 191 | 187 | $e->log(); |
| 192 | 188 | if ($this->_config->get('default_hourly_price')) |
| 193 | 189 | { |
| 194 | 190 | $data['default_price'] = $this->_config->get('default_hourly_price'); |
| 195 | 191 | $data['invoiceable_units'] = $task->invoiceableHours; |
| 196 | - } |
|
| 197 | - else |
|
| 192 | + } else |
|
| 198 | 193 | { |
| 199 | 194 | $data['default_price'] = ''; |
| 200 | 195 | } |