Add warr_tnv to the Battery entity. Add the tnv warranty to the add/edit forms. Add means to save/display the tnv warranty data in the forms. #203
This commit is contained in:
parent
2a469dd469
commit
be8ceb7e29
3 changed files with 29 additions and 0 deletions
|
|
@ -119,6 +119,7 @@ class BatteryController extends BaseController
|
|||
$row['sell_price'] = $orow[0]->getSellingPrice();
|
||||
$row['warr_private'] = $orow[0]->getWarrantyPrivate();
|
||||
$row['warr_commercial'] = $orow[0]->getWarrantyCommercial();
|
||||
$row['warr_tnv'] = $orow[0]->getWarrantyTnv();
|
||||
$row['res_capacity'] = $orow[0]->getReserveCapacity();
|
||||
$row['length'] = $orow[0]->getLength();
|
||||
$row['width'] = $orow[0]->getWidth();
|
||||
|
|
@ -181,6 +182,7 @@ class BatteryController extends BaseController
|
|||
->setSAPCode($req->request->get('sap_code'))
|
||||
->setWarrantyPrivate($req->request->get('warr_private'))
|
||||
->setWarrantyCommercial($req->request->get('warr_commercial'))
|
||||
->setWarrantyTnv($req->request->get('warr_tnv'))
|
||||
->setReserveCapacity($req->request->get('res_capacity'))
|
||||
->setLength($req->request->get('length'))
|
||||
->setWidth($req->request->get('width'))
|
||||
|
|
@ -303,6 +305,7 @@ class BatteryController extends BaseController
|
|||
->setSAPCode($req->request->get('sap_code'))
|
||||
->setWarrantyPrivate($req->request->get('warr_private'))
|
||||
->setWarrantyCommercial($req->request->get('warr_commercial'))
|
||||
->setWarrantyTnv($req->request->get('warr_tnv'))
|
||||
->setReserveCapacity($req->request->get('res_capacity'))
|
||||
->setLength($req->request->get('length'))
|
||||
->setWidth($req->request->get('width'))
|
||||
|
|
|
|||
|
|
@ -85,6 +85,13 @@ class Battery
|
|||
*/
|
||||
protected $warr_commercial;
|
||||
|
||||
// warranty tnv
|
||||
/**
|
||||
* @ORM\Column(type="smallint")
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
protected $warr_tnv;
|
||||
|
||||
// reserve capacity
|
||||
/**
|
||||
* @ORM\Column(type="smallint")
|
||||
|
|
@ -248,6 +255,17 @@ class Battery
|
|||
return $this->warr_commercial;
|
||||
}
|
||||
|
||||
public function setWarrantyTnv($warr_tnv)
|
||||
{
|
||||
$this->warr_tnv = $warr_tnv;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getWarrantyTnv()
|
||||
{
|
||||
return $this->warr_tnv;
|
||||
}
|
||||
|
||||
public function setReserveCapacity($res_capacity)
|
||||
{
|
||||
$this->res_capacity = $res_capacity;
|
||||
|
|
|
|||
|
|
@ -157,6 +157,14 @@
|
|||
<div class="form-control-feedback hide" data-field="warr_commercial"></div>
|
||||
<span class="m-form__help">In months</span>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<label data-field="warr_tnv">
|
||||
TNV
|
||||
</label>
|
||||
<input type="number" name="warr_tnv" class="form-control m-input" value="{{ obj.getWarrantyTnv }}">
|
||||
<div class="form-control-feedback hide" data-field="warr_tnv"></div>
|
||||
<span class="m-form__help">In months</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="m-form__seperator m-form__seperator--dashed"></div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue