|
@@ -83,7 +83,7 @@ discard block |
|
|
block discarded – undo |
|
83
|
83
|
} |
|
84
|
84
|
|
|
85
|
85
|
if ($this->_config->get('sales_pdfbuilder_class')) { |
|
86
|
|
- if ( $this->_salesproject->can_do('midgard:update') |
|
|
86
|
+ if ($this->_salesproject->can_do('midgard:update') |
|
87
|
87
|
&& $this->is_pdf_creatable()) { |
|
88
|
88
|
$workflow = $this->get_workflow('datamanager'); |
|
89
|
89
|
$buttons[] = $workflow->get_button($this->router->generate('create_offer', ['guid' => $this->_salesproject->guid]), [ |
|
@@ -204,7 +204,7 @@ discard block |
|
|
block discarded – undo |
|
204
|
204
|
case 'ordered': |
|
205
|
205
|
if ($deliverable->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION) { |
|
206
|
206
|
$entries = $deliverable->get_at_entries(); |
|
207
|
|
- if ( $entries |
|
|
207
|
+ if ($entries |
|
208
|
208
|
&& $entries[0]->status == midcom_services_at_entry_dba::SCHEDULED |
|
209
|
209
|
&& midcom::get()->auth->can_user_do('midgard:create', class: org_openpsa_invoices_invoice_dba::class)) { |
|
210
|
210
|
return '<button class="run_cycle"><i class="fa fa-refresh"></i>' . $this->_l10n->get('generate now') . '</button>'; |
|
@@ -214,7 +214,7 @@ discard block |
|
|
block discarded – undo |
|
214
|
214
|
} |
|
215
|
215
|
break; |
|
216
|
216
|
case 'delivered': |
|
217
|
|
- if ( $deliverable->orgOpenpsaObtype != org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
|
217
|
+ if ($deliverable->orgOpenpsaObtype != org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION |
|
218
|
218
|
&& midcom::get()->auth->can_user_do('midgard:create', class: org_openpsa_invoices_invoice_dba::class)) { |
|
219
|
219
|
$client_class = $this->_config->get('calculator'); |
|
220
|
220
|
$client = new $client_class(); |
Please login to merge, or discard this patch.