Resolve "Warranty Activation" #1077

Merged
korina.cordero merged 9 commits from 227-warranty-activation into master 2019-07-18 05:09:25 +00:00
2 changed files with 26 additions and 0 deletions
Showing only changes of commit baf7b51f14 - Show all commits

View file

@ -121,12 +121,19 @@ class Warranty
*/
protected $claim_from;
// warranty activated
/**
* @ORM\Column(type="boolean")
*/
protected $flag_activated;
public function __construct()
{
$this->date_create = new DateTime();
$this->warranty_class = WarrantyClass::WTY_PRIVATE;
$this->status = WarrantyStatus::ACTIVE;
$this->date_claim = null;
$this->flag_activated = false;
}
public function getID()
@ -348,4 +355,15 @@ class Warranty
{
return $this->claim_from;
}
public function setActivated($flag_activated = true)
{
$this->flag_activated = $flag_activated;
return this;
}
public function isActivated()
{
return $this->flag_activated;
}
}

View file

@ -197,6 +197,7 @@
<th>Expiry Date</th>
<th>Serial</th>
<th>Battery</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@ -210,6 +211,13 @@
<td>{{ result.getDateExpire|default("")|date('d M Y') }}</td>
<td>{{ result.getSerial|default("") }}</td>
<td>{{ result.getSAPBattery.getID|default("") }}</td>
<td>
{% if result.isActivated == true %}
Activated
{% else %}
Not Activated
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>