Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2024.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Jan 24, 2024
2 parents 1bd3e66 + 605a77a commit 4d9ab5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions tine20/Sales/Model/Document/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ abstract class Sales_Model_Document_Abstract extends Tinebase_Record_NewAbstract
self::LABEL => 'Division', // _('Division')
self::FILTER => Sales_Model_Document_DivisionFilter::class,
self::OPTIONS => [
self::MODEL_NAME => 'xxx',
self::MODEL_NAME => Sales_Model_Division::MODEL_NAME_PART,
],
'jsConfig' => [
'filtertype' => 'foreignrecord',
'linkType' => 'foreignId',
'foreignRecordClass' => 'xxx',
'foreignRecordClass' => Sales_Model_Division::class,
'multipleForeignRecords' => true,
'defaultOperator' => 'definedBy'
'defaultOperator' => 'equals'
],
],
],
Expand Down Expand Up @@ -444,11 +444,6 @@ public static function inheritModelConfigHook(array &$_definition)
)->_(static::$_documentNumberPrefix);
$_definition[self::FIELDS][self::FLD_DOCUMENT_NUMBER][self::CONFIG][Tinebase_Numberable::CONFIG_OVERRIDE] =
'Sales_Controller_' . static::MODEL_NAME_PART . '::documentNumberConfigOverride';

$_definition[self::FILTER_MODEL][Sales_Model_Debitor::FLD_DIVISION_ID][self::OPTIONS][self::MODEL_NAME] =
'Sales_Model_' . static::MODEL_NAME_PART;
$_definition[self::FILTER_MODEL][Sales_Model_Debitor::FLD_DIVISION_ID]['jsConfig']['foreignRecordClass'] =
'Sales_Model_' . static::MODEL_NAME_PART;
}

public function isBooked(): bool
Expand Down
2 changes: 1 addition & 1 deletion tine20/Sales/js/Document/AbstractEditDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Tine.Sales.Document_AbstractEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
position.set('sales_tax_rate', productTaxRate)
} else if (record.id !== 'taxable' && position.get('sales_tax_rate')) {
if (position.get('unit_price_type') === 'gross') {
position.set('unit_price', position.get('unit_price') - (position.get('sales_tax') || 0))
position.set('unit_price', position.get('unit_price') - (position.get('sales_tax')/position.get('quantity') || 0))
position.set('unit_price_type', 'net')
}
position.set('sales_tax_rate', 0)
Expand Down

0 comments on commit 4d9ab5d

Please sign in to comment.