@@ -103,12 +103,12 @@ |
||
| 103 | 103 | if (!empty($guid)) { |
| 104 | 104 | //pass the urls & titles for the tabs |
| 105 | 105 | $tabdata[] = [ |
| 106 | - 'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/', |
|
| 107 | - 'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'), |
|
| 106 | + 'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/', |
|
| 107 | + 'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'), |
|
| 108 | 108 | ]; |
| 109 | 109 | $tabdata[] = [ |
| 110 | - 'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/', |
|
| 111 | - 'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'), |
|
| 110 | + 'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/', |
|
| 111 | + 'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'), |
|
| 112 | 112 | ]; |
| 113 | 113 | } |
| 114 | 114 | |
@@ -5,29 +5,29 @@ |
||
| 5 | 5 | ?> |
| 6 | 6 | <div class="area org_openpsa_helper_box"><h3><?php echo $data['l10n']->get('offers'); ?></h3> |
| 7 | 7 | <ul><?php |
| 8 | - foreach ($data['offers'] as $offer) { |
|
| 9 | - echo '<li><span class="org_openpsa_helpers_fileinfo">'; |
|
| 10 | - $attachment = $offer->get_file(); |
|
| 11 | - $delete_link = $data['router']->generate('delete_offer', ['guid' => $offer->guid]); |
|
| 12 | - $edit_link = $data['router']->generate('edit_offer', ['guid' => $offer->guid]); |
|
| 8 | + foreach ($data['offers'] as $offer) { |
|
| 9 | + echo '<li><span class="org_openpsa_helpers_fileinfo">'; |
|
| 10 | + $attachment = $offer->get_file(); |
|
| 11 | + $delete_link = $data['router']->generate('delete_offer', ['guid' => $offer->guid]); |
|
| 12 | + $edit_link = $data['router']->generate('edit_offer', ['guid' => $offer->guid]); |
|
| 13 | 13 | |
| 14 | - if (!empty($attachment)) { |
|
| 15 | - $url = midcom_db_attachment::get_url($attachment); |
|
| 16 | - echo '<a href="' . $url . '" class="icon"><i class="fa fa-file-text-o"></i></a>'; |
|
| 17 | - } |
|
| 18 | - echo '<span class="info">'; |
|
| 19 | - echo '<span class="filename">' . $offer->get_label(); |
|
| 20 | - echo ' <a class="actions" href="' . $delete_link . '"><i class="fa fa-trash" title="' . $data['l10n_midcom']->get('delete') . '"></i></a>'; |
|
| 21 | - echo ' <a class="actions" ' . $wf->render_attributes() . ' href="' . $edit_link . '"><i class="fa fa-pencil" title="' . $data['l10n_midcom']->get('edit') . '"></i></a>'; |
|
| 22 | - echo "</span>\n"; |
|
| 23 | - if (!empty($attachment)) { |
|
| 24 | - echo ' <span class="date">' . $formatter->datetime($attachment->metadata->revised) . '</span> '; |
|
| 25 | - $person_card = org_openpsa_widgets_contact::get($attachment->metadata->revisor); |
|
| 26 | - echo $person_card->show_inline(); |
|
| 27 | - } |
|
| 28 | - echo "</span></span></li>\n"; |
|
| 29 | - } |
|
| 30 | - ?> |
|
| 14 | + if (!empty($attachment)) { |
|
| 15 | + $url = midcom_db_attachment::get_url($attachment); |
|
| 16 | + echo '<a href="' . $url . '" class="icon"><i class="fa fa-file-text-o"></i></a>'; |
|
| 17 | + } |
|
| 18 | + echo '<span class="info">'; |
|
| 19 | + echo '<span class="filename">' . $offer->get_label(); |
|
| 20 | + echo ' <a class="actions" href="' . $delete_link . '"><i class="fa fa-trash" title="' . $data['l10n_midcom']->get('delete') . '"></i></a>'; |
|
| 21 | + echo ' <a class="actions" ' . $wf->render_attributes() . ' href="' . $edit_link . '"><i class="fa fa-pencil" title="' . $data['l10n_midcom']->get('edit') . '"></i></a>'; |
|
| 22 | + echo "</span>\n"; |
|
| 23 | + if (!empty($attachment)) { |
|
| 24 | + echo ' <span class="date">' . $formatter->datetime($attachment->metadata->revised) . '</span> '; |
|
| 25 | + $person_card = org_openpsa_widgets_contact::get($attachment->metadata->revisor); |
|
| 26 | + echo $person_card->show_inline(); |
|
| 27 | + } |
|
| 28 | + echo "</span></span></li>\n"; |
|
| 29 | + } |
|
| 30 | + ?> |
|
| 31 | 31 | </ul> |
| 32 | 32 | </div> |
| 33 | 33 | <?php } ?> |
| 34 | 34 | \ No newline at end of file |
@@ -71,30 +71,30 @@ |
||
| 71 | 71 | <tr> |
| 72 | 72 | <td class="title"><?php echo $data['l10n']->get('cost'); ?></td> |
| 73 | 73 | <?php |
| 74 | - if ($data['deliverable']->costType == '%') { |
|
| 75 | - ?> |
|
| 74 | + if ($data['deliverable']->costType == '%') { |
|
| 75 | + ?> |
|
| 76 | 76 | <td class="numeric"><?php echo $view['costPerUnit']; ?> %</td> |
| 77 | 77 | <td class="numeric"> </td> |
| 78 | 78 | <td class="numeric"> </td> |
| 79 | 79 | <?php |
| 80 | - } else { |
|
| 81 | - ?> |
|
| 80 | + } else { |
|
| 81 | + ?> |
|
| 82 | 82 | <td class="numeric"><?php echo $formatter->number($data['deliverable']->costPerUnit); ?></td> |
| 83 | 83 | <td class="numeric"><?php echo $view['plannedUnits']; ?></td> |
| 84 | 84 | <td class="numeric"><?php echo $view['units']; ?></td> |
| 85 | 85 | <?php |
| 86 | - } ?> |
|
| 86 | + } ?> |
|
| 87 | 87 | <td class="numeric"><?php echo $formatter->number($data['deliverable']->cost); ?></td> |
| 88 | 88 | </tr> |
| 89 | 89 | </tbody> |
| 90 | 90 | </table> |
| 91 | 91 | <?php if ($data['deliverable']->invoiceByActualUnits) { |
| 92 | - ?> |
|
| 92 | + ?> |
|
| 93 | 93 | <ul> |
| 94 | 94 | <li><?php echo $data['l10n']->get('invoice by actual units'); ?></li> |
| 95 | 95 | </ul> |
| 96 | 96 | <?php |
| 97 | - } ?> |
|
| 97 | + } ?> |
|
| 98 | 98 | </div> |
| 99 | 99 | </div> |
| 100 | 100 | <?php |
@@ -80,30 +80,30 @@ |
||
| 80 | 80 | <tr> |
| 81 | 81 | <td class="title"><?php echo $data['l10n']->get('cost'); ?></td> |
| 82 | 82 | <?php |
| 83 | - if ($data['deliverable']->costType == '%') { |
|
| 84 | - ?> |
|
| 83 | + if ($data['deliverable']->costType == '%') { |
|
| 84 | + ?> |
|
| 85 | 85 | <td class="numeric"><?php echo $view['costPerUnit']; ?> %</td> |
| 86 | 86 | <td class="numeric"> </td> |
| 87 | 87 | <td class="numeric"> </td> |
| 88 | 88 | <?php |
| 89 | - } else { |
|
| 90 | - ?> |
|
| 89 | + } else { |
|
| 90 | + ?> |
|
| 91 | 91 | <td class="numeric"><?php echo $formatter->number($data['deliverable']->costPerUnit); ?></td> |
| 92 | 92 | <td class="numeric"><?php echo $view['plannedUnits']; ?></td> |
| 93 | 93 | <td class="numeric"><?php echo $view['units']; ?></td> |
| 94 | 94 | <?php |
| 95 | - } ?> |
|
| 95 | + } ?> |
|
| 96 | 96 | <td class="numeric"><?php echo $formatter->number($data['deliverable']->cost); ?></td> |
| 97 | 97 | </tr> |
| 98 | 98 | </tbody> |
| 99 | 99 | </table> |
| 100 | 100 | <?php if ($data['deliverable']->invoiceByActualUnits) { |
| 101 | - ?> |
|
| 101 | + ?> |
|
| 102 | 102 | <ul> |
| 103 | 103 | <li><?php echo $data['l10n']->get('invoice by actual units'); ?></li> |
| 104 | 104 | </ul> |
| 105 | 105 | <?php |
| 106 | - } ?> |
|
| 106 | + } ?> |
|
| 107 | 107 | </div> |
| 108 | 108 | </div> |
| 109 | 109 | <div class="field"> |
@@ -138,7 +138,7 @@ |
||
| 138 | 138 | created: '<?php echo $data['l10n']->get('created'); ?>', |
| 139 | 139 | index_title: '<?php echo $data['l10n']->get('title'); ?>', |
| 140 | 140 | <?php |
| 141 | - if ($data['mode'] != 'customer') { |
|
| 141 | + if ($data['mode'] != 'customer') { |
|
| 142 | 142 | ?> |
| 143 | 143 | index_customer: '<?php echo $data['l10n']->get('customer'); ?>', |
| 144 | 144 | <?php |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | ?> |
| 13 | 13 | <(content)> |
| 14 | 14 | <?php |
| 15 | - midcom::get()->uimessages->show(); |
|
| 16 | - ?> |
|
| 15 | + midcom::get()->uimessages->show(); |
|
| 16 | + ?> |
|
| 17 | 17 | </body> |
| 18 | 18 | </html> |
@@ -105,12 +105,12 @@ |
||
| 105 | 105 | return $status; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - /** |
|
| 109 | - * Get the object of a revision |
|
| 110 | - * |
|
| 111 | - * @param string $revision identifier of revision wanted |
|
| 112 | - * @return array array representation of the object |
|
| 113 | - */ |
|
| 108 | + /** |
|
| 109 | + * Get the object of a revision |
|
| 110 | + * |
|
| 111 | + * @param string $revision identifier of revision wanted |
|
| 112 | + * @return array array representation of the object |
|
| 113 | + */ |
|
| 114 | 114 | public function get_revision($revision) : array |
| 115 | 115 | { |
| 116 | 116 | if (empty($this->_guid)) { |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | public static function get_by_object(org_openpsa_invoices_interfaces_customer $object) : self |
| 62 | 62 | { |
| 63 | 63 | if ( !($bd = self::get_billing_data(org_openpsa_contacts_group_dba::class, $object->customer)) |
| 64 | - // check if the customerContact is set and has invoice_data |
|
| 64 | + // check if the customerContact is set and has invoice_data |
|
| 65 | 65 | && !($bd = self::get_billing_data(org_openpsa_contacts_person_dba::class, $object->customerContact))) { |
| 66 | 66 | $bd = new self(); |
| 67 | 67 | $due = midcom_baseclasses_components_configuration::get('org.openpsa.invoices', 'config')->get('default_due_days'); |
@@ -40,31 +40,31 @@ |
||
| 40 | 40 | return $output; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * @param midcom_core_dbaobject $object The object we're working on |
|
| 45 | - * @param string $field The schema field name |
|
| 46 | - * @return midcom_db_attachment[] List of attachments, indexed by identifier |
|
| 47 | - */ |
|
| 48 | - public static function get_dm2_attachments($object, $field) : array |
|
| 49 | - { |
|
| 50 | - $attachments = []; |
|
| 51 | - $identifiers = explode(',', $object->get_parameter('midcom.helper.datamanager2.type.blobs', 'guids_' . $field)); |
|
| 52 | - if (empty($identifiers)) { |
|
| 53 | - return $attachments; |
|
| 54 | - } |
|
| 55 | - foreach ($identifiers as $identifier) { |
|
| 56 | - $parts = explode(':', $identifier); |
|
| 57 | - if (count($parts) != 2) { |
|
| 58 | - continue; |
|
| 59 | - } |
|
| 60 | - $guid = $parts[1]; |
|
| 61 | - try { |
|
| 62 | - $attachments[$parts[0]] = midcom_db_attachment::get_cached($guid); |
|
| 63 | - } catch (midcom_error $e) { |
|
| 64 | - $e->log(); |
|
| 65 | - } |
|
| 66 | - } |
|
| 43 | + /** |
|
| 44 | + * @param midcom_core_dbaobject $object The object we're working on |
|
| 45 | + * @param string $field The schema field name |
|
| 46 | + * @return midcom_db_attachment[] List of attachments, indexed by identifier |
|
| 47 | + */ |
|
| 48 | + public static function get_dm2_attachments($object, $field) : array |
|
| 49 | + { |
|
| 50 | + $attachments = []; |
|
| 51 | + $identifiers = explode(',', $object->get_parameter('midcom.helper.datamanager2.type.blobs', 'guids_' . $field)); |
|
| 52 | + if (empty($identifiers)) { |
|
| 53 | + return $attachments; |
|
| 54 | + } |
|
| 55 | + foreach ($identifiers as $identifier) { |
|
| 56 | + $parts = explode(':', $identifier); |
|
| 57 | + if (count($parts) != 2) { |
|
| 58 | + continue; |
|
| 59 | + } |
|
| 60 | + $guid = $parts[1]; |
|
| 61 | + try { |
|
| 62 | + $attachments[$parts[0]] = midcom_db_attachment::get_cached($guid); |
|
| 63 | + } catch (midcom_error $e) { |
|
| 64 | + $e->log(); |
|
| 65 | + } |
|
| 66 | + } |
|
| 67 | 67 | |
| 68 | - return $attachments; |
|
| 69 | - } |
|
| 68 | + return $attachments; |
|
| 69 | + } |
|
| 70 | 70 | } |