Resolve "Handle under warranty with invoice generator" #842

Merged
jankstudio merged 2 commits from 29-handle-under-warranty-with-invoice-generator into master 2018-02-27 17:43:49 +00:00
Showing only changes of commit 13adca3721 - Show all commits

View file

@ -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++)