Add Trade-in Lazada field for battery size. #546

This commit is contained in:
Korina Cordero 2021-03-18 03:25:49 +00:00 committed by Kendrick Chan
parent ae9d32d434
commit d4541a5fce
4 changed files with 32 additions and 2 deletions

View file

@ -129,7 +129,8 @@ class BatterySizeController extends Controller
$obj->setName($req->request->get('name'))
->setTIPriceMotolite($req->request->get('tip_motolite'))
->setTIPricePremium($req->request->get('tip_premium'))
->setTIPriceOther($req->request->get('tip_other'));
->setTIPriceOther($req->request->get('tip_other'))
->setTIPriceLazada($req->request->get('tip_lazada'));
}
public function addSubmit(Request $req, ValidatorInterface $validator)

View file

@ -51,12 +51,19 @@ class BatterySize
*/
protected $tip_other;
// lazada trade-in price
/**
* @ORM\Column(type="decimal", precision=7, scale=2)
*/
protected $tip_lazada;
public function __construct()
{
$this->batteries = new ArrayCollection();
$this->tip_motolite = 0;
$this->tip_premium = 0;
$this->tip_other = 0;
$this->tip_lazada = 0;
}
public function getID()
@ -130,4 +137,16 @@ class BatterySize
{
return $this->tip_other;
}
public function setTIPriceLazada($price)
{
$this->tip_lazada = $price;
return $this;
}
public function getTIPriceLazada()
{
return $this->tip_lazada;
}
}

View file

@ -70,7 +70,16 @@
<input type="text" name="tip_other" class="form-control m-input" value="{{ obj.getTIPriceOther }}">
<div class="form-control-feedback hide" data-field="tip_other"></div>
</div>
</div>
</div>
<div class="form-group m-form__group row no-border">
<label class="col-lg-3 col-form-label" data-field="tip_lazada">
{% trans %}battery_size_tradein_lazada{% endtrans %}
</label>
<div class="col-lg-9">
<input type="text" name="tip_lazada" class="form-control m-input" value="{{ obj.getTIPriceLazada }}">
<div class="form-control-feedback hide" data-field="tip_lazada"></div>
</div>
</div>
</div>
<div class="m-portlet__foot m-portlet__foot--fit">
<div class="m-form__actions m-form__actions--solid m-form__actions--right">

View file

@ -8,6 +8,7 @@ copyright: Motolite Res-Q
battery_size_tradein_brand: Trade-in Motolite
battery_size_tradein_premium: Trade-in Premium
battery_size_tradein_other: Trade-in Other
battery_size_tradein_lazada: Trade-in Lazada
add_cust_vehicle_battery_info: This vehicle is using a Motolite battery
jo_title_pdf: Motolite Res-Q Job Order
country_code_prefix: '+63'