@@ -293,7 +293,8 @@ |
||
293 | 293 | try { |
294 | 294 | $agreement = new org_openpsa_sales_salesproject_deliverable_dba($this->get_agreement()); |
295 | 295 | $agreement->update_units(); |
296 | - } catch (midcom_error $e) {} |
|
296 | + } |
|
297 | + catch (midcom_error $e) {} |
|
297 | 298 | } |
298 | 299 | |
299 | 300 | /** |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | { |
79 | 79 | $this->calculate_price(false); |
80 | 80 | |
81 | - if ( $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
81 | + if ($this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
82 | 82 | && $this->continuous) { |
83 | 83 | $this->end = 0; |
84 | 84 | } elseif ($this->end < $this->start) { |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $calculator->run($this); |
167 | 167 | $cost = $calculator->get_cost(); |
168 | 168 | $price = $calculator->get_price(); |
169 | - if ( $price != $this->price |
|
169 | + if ($price != $this->price |
|
170 | 170 | || $cost != $this->cost) { |
171 | 171 | $this->price = $price; |
172 | 172 | $this->cost = $cost; |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $units = $hours['invoiceable']; |
207 | 207 | $uninvoiceableUnits = $hours['reported'] - ($hours['invoiceable'] + $hours['invoiced']); |
208 | 208 | |
209 | - if ( $units != $this->units |
|
209 | + if ($units != $this->units |
|
210 | 210 | || $uninvoiceableUnits != $this->uninvoiceableUnits) { |
211 | 211 | debug_add("agreement values have changed, setting units to " . $units . ", uninvoiceable: " . $uninvoiceableUnits); |
212 | 212 | $this->units = $units; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | |
261 | 261 | public function invoice() : bool |
262 | 262 | { |
263 | - if ( $this->state >= self::STATE_INVOICED |
|
263 | + if ($this->state >= self::STATE_INVOICED |
|
264 | 264 | || $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION) { |
265 | 265 | return false; |
266 | 266 | } |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | midcom::get()->uimessages->add(midcom::get()->i18n->get_string('org.openpsa.sales', 'org.openpsa.sales'), sprintf(midcom::get()->i18n->get_string('marked deliverable "%s" delivered', 'org.openpsa.sales'), $this->title)); |
364 | 364 | |
365 | 365 | // Check if we need to create task or ship goods |
366 | - if ( $update_deliveries |
|
366 | + if ($update_deliveries |
|
367 | 367 | && $product->orgOpenpsaObtype === org_openpsa_products_product_dba::TYPE_SERVICE) { |
368 | 368 | // Change status of tasks connected to the deliverable |
369 | 369 | $qb = org_openpsa_projects_task_dba::new_query_builder(); |