diff --git a/tine20/Calendar/js/EventEditDialog.js b/tine20/Calendar/js/EventEditDialog.js index d76a01b106..70218874ea 100644 --- a/tine20/Calendar/js/EventEditDialog.js +++ b/tine20/Calendar/js/EventEditDialog.js @@ -138,7 +138,7 @@ Tine.Calendar.EventEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, { }, { flex: 1, xtype:'addressbookcontactpicker', - name: 'site', + name: 'event_site', userOnly: false, useAccountRecord: false, searchComboConfig: {useEditPlugin: false}, diff --git a/tine20/Calendar/js/Model.js b/tine20/Calendar/js/Model.js index 0c0257a1d9..a98773b6dc 100644 --- a/tine20/Calendar/js/Model.js +++ b/tine20/Calendar/js/Model.js @@ -31,7 +31,7 @@ Tine.Calendar.Model.Event = Tine.Tinebase.data.Record.create(Tine.Tinebase.Model { name: 'adr_lat' }, { name: 'location' }, { name: 'location_record' }, - { name: 'site' }, + { name: 'event_site' }, { name: 'organizer_type' }, { name: 'organizer' }, { name: 'organizer_email' }, diff --git a/tine20/Sales/Model/Document/Invoice.php b/tine20/Sales/Model/Document/Invoice.php index 3076b57e61..87b0b4af38 100644 --- a/tine20/Sales/Model/Document/Invoice.php +++ b/tine20/Sales/Model/Document/Invoice.php @@ -432,11 +432,13 @@ public function toUbl(): string } $lineCounter = 0; + $defaultRate = 19; /** @var Sales_Model_DocumentPosition_Invoice $position */ foreach ($this->{self::FLD_POSITIONS} as $position) { if (Sales_Model_DocumentPosition_Invoice::POS_TYPE_PRODUCT !== $position->{Sales_Model_DocumentPosition_Invoice::FLD_TYPE}) { continue; } + $defaultRate = $position->{Sales_Model_DocumentPosition_Invoice::FLD_SALES_TAX_RATE}; $ublInvoice->addToInvoiceLine((new \UBL21\Common\CommonAggregateComponents\InvoiceLine) ->setID(new \UBL21\Common\CommonBasicComponents\ID(++$lineCounter)) ->setUUID($position->getId() ? new \UBL21\Common\CommonBasicComponents\UUID($position->getId()) : null) @@ -495,6 +497,14 @@ public function toUbl(): string ); } + // fix 0 Eur line issue -> no tax rates set + if (empty($this->xprops(self::FLD_SALES_TAX_BY_RATE))) { + $this->xprops(self::FLD_SALES_TAX_BY_RATE)[] = [ + self::NET_SUM => 0, + self::TAX_SUM => 0, + self::TAX_RATE => $defaultRate, + ]; + } foreach ($this->xprops(self::FLD_SALES_TAX_BY_RATE) as $taxRate) { $taxTotal->addToTaxSubtotal((new \UBL21\Common\CommonAggregateComponents\TaxSubtotal) ->setTaxableAmount((new \UBL21\Common\CommonBasicComponents\TaxableAmount($taxRate[self::NET_SUM]))