2018-07-18 11:35:27 -04:00
|
|
|
<?php declare(strict_types=1);
|
2017-11-30 15:06:13 -05:00
|
|
|
|
2018-02-14 16:42:39 -05:00
|
|
|
namespace App\Entity;
|
2017-11-30 15:06:13 -05:00
|
|
|
|
|
|
|
trait PurchasePriceTrait
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Set purchasePrice
|
|
|
|
*
|
|
|
|
* @param string $purchasePrice
|
|
|
|
*/
|
2018-01-03 16:41:56 -05:00
|
|
|
public function setPurchasePrice($purchasePrice): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->purchasePrice = $purchasePrice;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get purchasePrice
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getPurchasePrice()
|
|
|
|
{
|
|
|
|
if (empty($this->purchasePrice)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this->purchasePrice;
|
|
|
|
}
|
|
|
|
}
|