@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | { |
| 82 | 82 | $this->calculate_price(false); |
| 83 | 83 | |
| 84 | - if ( $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
| 84 | + if ($this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
| 85 | 85 | && $this->continuous) { |
| 86 | 86 | $this->end = 0; |
| 87 | 87 | } elseif ($this->end < $this->start) { |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $calculator->run($this); |
| 170 | 170 | $cost = $calculator->get_cost(); |
| 171 | 171 | $price = $calculator->get_price(); |
| 172 | - if ( $price != $this->price |
|
| 172 | + if ($price != $this->price |
|
| 173 | 173 | || $cost != $this->cost) { |
| 174 | 174 | $this->price = $price; |
| 175 | 175 | $this->cost = $cost; |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $units = $agreement_hours['invoiceable']; |
| 217 | 217 | $uninvoiceableUnits = $agreement_hours['reported'] - ($agreement_hours['invoiceable'] + $agreement_hours['invoiced']); |
| 218 | 218 | |
| 219 | - if ( $units != $this->units |
|
| 219 | + if ($units != $this->units |
|
| 220 | 220 | || $uninvoiceableUnits != $this->uninvoiceableUnits) { |
| 221 | 221 | debug_add("agreement values have changed, setting units to " . $units . ", uninvoiceable: " . $uninvoiceableUnits); |
| 222 | 222 | $this->units = $units; |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | |
| 271 | 271 | public function invoice() : bool |
| 272 | 272 | { |
| 273 | - if ( $this->state >= self::STATE_INVOICED |
|
| 273 | + if ($this->state >= self::STATE_INVOICED |
|
| 274 | 274 | || $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION) { |
| 275 | 275 | return false; |
| 276 | 276 | } |