Skip to content

Commit

Permalink
Merge branch 'pu/pm/SalesDocumentPositionCalPriceDefaultTax' into '20…
Browse files Browse the repository at this point in the history
…24.11'

tweak(Sales) DocumentPosition calculate price take default tax rate into account

See merge request tine20/tine20!6556
  • Loading branch information
paulmhh committed Feb 6, 2025
2 parents 8595a01 + 9b61797 commit 2b6bd57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tine20/Sales/Model/DocumentPosition/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,10 @@ public function computePrice(bool $onlyProductType = true): void
$discount = 0;
}

if (null === $this->{self::FLD_SALES_TAX_RATE}) {
$this->{self::FLD_SALES_TAX_RATE} = Tinebase_Config::getInstance()->{Tinebase_Config::SALES_TAX};
}

$total = is_null($this->{self::FLD_POSITION_PRICE}) ? null
: $this->{self::FLD_POSITION_PRICE} - $discount;

Expand Down

0 comments on commit 2b6bd57

Please sign in to comment.