Add service type to invoice criteria #29
This commit is contained in:
parent
2de5344288
commit
13adca3721
1 changed files with 14 additions and 0 deletions
|
|
@ -7,17 +7,31 @@ use App\Entity\Promo;
|
|||
|
||||
class InvoiceCriteria
|
||||
{
|
||||
protected $stype;
|
||||
protected $batteries;
|
||||
protected $promos;
|
||||
protected $trade_in;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->stype = 0;
|
||||
$this->batteries = [];
|
||||
$this->promos = [];
|
||||
$this->trade_ins = [];
|
||||
}
|
||||
|
||||
public function setServiceType($stype)
|
||||
{
|
||||
// TODO: validate service type
|
||||
$this->$stype = $stype;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getServiceType()
|
||||
{
|
||||
return $this->stype;
|
||||
}
|
||||
|
||||
public function addBattery(Battery $battery, $qty = 1)
|
||||
{
|
||||
for ($i = 0; $i < $qty; $i++)
|
||||
|
|
|
|||
Loading…
Reference in a new issue