Skip to content

Commit

Permalink
Merge branch '2024.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Nov 25, 2024
2 parents 06355d3 + 18c184e commit fd7c6b9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tine20/Calendar/js/EventEditDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
2 changes: 1 addition & 1 deletion tine20/Calendar/js/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down
10 changes: 10 additions & 0 deletions tine20/Sales/Model/Document/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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]))
Expand Down

0 comments on commit fd7c6b9

Please sign in to comment.