@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | public function _on_creating() : bool |
| 27 | 27 | { |
| 28 | - if ( $this->invoice |
|
| 28 | + if ($this->invoice |
|
| 29 | 29 | && $this->position == 0) { |
| 30 | 30 | $invoice = org_openpsa_invoices_invoice_dba::get_cached($this->invoice); |
| 31 | 31 | $this->position = count($invoice->get_invoice_items()) + 1; |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | } catch (midcom_error) { |
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | - if ( $url == '' |
|
| 78 | + if ($url == '' |
|
| 79 | 79 | && $sales_url) { |
| 80 | 80 | try { |
| 81 | 81 | $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($this->deliverable); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $invoice = new org_openpsa_invoices_invoice_dba($this->invoice); |
| 98 | 98 | $old_sum = $invoice->sum; |
| 99 | 99 | self::update_invoice($invoice); |
| 100 | - if ( $old_sum != $invoice->sum |
|
| 100 | + if ($old_sum != $invoice->sum |
|
| 101 | 101 | && !empty($this->deliverable)) { |
| 102 | 102 | $deliverable = new org_openpsa_sales_salesproject_deliverable_dba($this->deliverable); |
| 103 | 103 | self::update_deliverable($deliverable); |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | if ($invoiced != $deliverable->invoiced) { |
| 137 | 137 | $deliverable->invoiced = $invoiced; |
| 138 | - if ( $deliverable->orgOpenpsaObtype !== org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
| 138 | + if ($deliverable->orgOpenpsaObtype !== org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
| 139 | 139 | && $deliverable->state < org_openpsa_sales_salesproject_deliverable_dba::STATE_INVOICED) { |
| 140 | 140 | $deliverable->state = org_openpsa_sales_salesproject_deliverable_dba::STATE_INVOICED; |
| 141 | 141 | } |