@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | { |
69 | 69 | $this->calculate_price(false); |
70 | 70 | |
71 | - if ( $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
71 | + if ($this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
72 | 72 | && $this->continuous) { |
73 | 73 | $this->end = 0; |
74 | 74 | } elseif ($this->end < $this->start) { |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $calculator->run($this); |
130 | 130 | $cost = $calculator->get_cost(); |
131 | 131 | $price = $calculator->get_price(); |
132 | - if ( $price != $this->price |
|
132 | + if ($price != $this->price |
|
133 | 133 | || $cost != $this->cost) { |
134 | 134 | $this->price = $price; |
135 | 135 | $this->cost = $cost; |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $units = $hours['invoiceable']; |
170 | 170 | $uninvoiceableUnits = $hours['reported'] - ($hours['invoiceable'] + $hours['invoiced']); |
171 | 171 | |
172 | - if ( $units != $this->units |
|
172 | + if ($units != $this->units |
|
173 | 173 | || $uninvoiceableUnits != $this->uninvoiceableUnits) { |
174 | 174 | debug_add("agreement values have changed, setting units to " . $units . ", uninvoiceable: " . $uninvoiceableUnits); |
175 | 175 | $this->units = $units; |
@@ -221,11 +221,11 @@ discard block |
||
221 | 221 | break; |
222 | 222 | case 'q': |
223 | 223 | // Quarterly recurring subscription |
224 | - $identifier = ceil(((int)$date->format('n')) / 3) . 'Q' . $date->format('y'); |
|
224 | + $identifier = ceil(((int) $date->format('n')) / 3) . 'Q' . $date->format('y'); |
|
225 | 225 | break; |
226 | 226 | case 'hy': |
227 | 227 | // Half-yearly recurring subscription |
228 | - $identifier = ceil(((int)$date->format('n')) / 6) . '/' . $date->format('Y'); |
|
228 | + $identifier = ceil(((int) $date->format('n')) / 6) . '/' . $date->format('Y'); |
|
229 | 229 | break; |
230 | 230 | case 'y': |
231 | 231 | // Yearly recurring subscription |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | |
254 | 254 | public function invoice() : bool |
255 | 255 | { |
256 | - if ( $this->state >= self::STATE_INVOICED |
|
256 | + if ($this->state >= self::STATE_INVOICED |
|
257 | 257 | || $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION) { |
258 | 258 | return false; |
259 | 259 | } |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | 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)); |
357 | 357 | |
358 | 358 | // Check if we need to create task or ship goods |
359 | - if ( $update_deliveries |
|
359 | + if ($update_deliveries |
|
360 | 360 | && $product->orgOpenpsaObtype === org_openpsa_products_product_dba::TYPE_SERVICE) { |
361 | 361 | // Change status of tasks connected to the deliverable |
362 | 362 | $qb = org_openpsa_projects_task_dba::new_query_builder(); |