Skip to content
Code-Schnipsel Gruppen Projekte
Commit f2077356 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: price netto cleanup

Übergeordneter 96fab46d
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
......@@ -19,7 +19,7 @@ class Price
* Netto Price
* @var float
*/
protected $netto;
protected $price;
/**
* Price currency
......@@ -56,13 +56,13 @@ class Price
/**
* Price constructor.
*
* @param float|int|double|string $nettoPrice
* @param float|int|double|string $price
* @param QUI\ERP\Currency\Currency $Currency
* @param QUI\Users\User|boolean $User - optional, if no user, session user are used
*/
public function __construct($nettoPrice, QUI\ERP\Currency\Currency $Currency, $User = false)
public function __construct($price, QUI\ERP\Currency\Currency $Currency, $User = false)
{
$this->netto = $nettoPrice;
$this->price = $price;
$this->Currency = $Currency;
$this->User = $User;
......@@ -80,7 +80,7 @@ public function __construct($nettoPrice, QUI\ERP\Currency\Currency $Currency, $U
public function toArray()
{
return [
'price' => $this->getNetto(),
'price' => $this->value(),
'currency' => $this->getCurrency()->getCode(),
'display' => $this->getDisplayPrice(),
'startingprice' => $this->isStartingPrice()
......@@ -88,27 +88,13 @@ public function toArray()
}
/**
* Return the netto price
* Return the real price
*
* @return float
*/
public function getNetto()
{
return $this->validatePrice($this->netto);
}
/**
* Return the real price, brutto or netto
*
* @return float
* @todo must be implemented
*/
public function getPrice()
{
$netto = $this->getNetto();
$price = $this->validatePrice($netto);
return $price;
return $this->validatePrice($this->price);
}
/**
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren