37 lines
727 B
PHP
37 lines
727 B
PHP
<?php
|
|
|
|
namespace App\Invoice;
|
|
|
|
use App\InvoiceInterface;
|
|
|
|
class PostRecharged implements InvoiceInterface
|
|
{
|
|
public function check($settings, $criteria)
|
|
{
|
|
$type_id = $settings['service_type'];
|
|
if ($type_id == $criteria->getServiceType())
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
public function getTemplate()
|
|
{
|
|
}
|
|
|
|
public function getID()
|
|
{
|
|
return 'post_recharged';
|
|
}
|
|
|
|
public function getAmount($battery = null, $service_type_fees, $id)
|
|
{
|
|
if ($battery != null)
|
|
return $battery->getSellingPrice();
|
|
|
|
if (isset($service_type_fees[$id]))
|
|
return $service_type_fees[$id];
|
|
|
|
return 0;
|
|
}
|
|
}
|