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 14, 2024
2 parents a47c5d2 + 33cbe27 commit e7ba283
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
14 changes: 11 additions & 3 deletions tine20/Sales/Model/DocumentPosition/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,17 @@ protected function canCreatePartialFollowUp(): void
{
}

public function computePrice()
{ // AbstractMixin.computePrice Zeile 62ff
if (self::POS_TYPE_PRODUCT !== $this->{self::FLD_TYPE}) {
/**
* AbstractMixin.computePrice Zeile 62ff
*
* @param bool $onlyProductType
* @return void
*
* TODO not sure if we need the param & the "only product" check ...
*/
public function computePrice(bool $onlyProductType = true): void
{
if ($onlyProductType && self::POS_TYPE_PRODUCT !== $this->{self::FLD_TYPE}) {
return;
}
$this->{self::FLD_POSITION_PRICE} = is_null($this->{self::FLD_UNIT_PRICE}) || is_null($this->{self::FLD_QUANTITY}) ? null
Expand Down
10 changes: 7 additions & 3 deletions tine20/Sales/Model/DocumentPosition/Delivery.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,13 @@ public static function inheritModelConfigHook(array &$_definition)
*/
protected static $_configurationObject = NULL;

// no moneytary fields, no calc to do
public function computePrice()
/**
* no monetary fields, no calc to do
*
* @param bool $onlyProductType
* @return void
*/
public function computePrice(bool $onlyProductType = true): void
{
}
}

0 comments on commit e7ba283

Please sign in to comment.