39 lines
644 B
PHP
39 lines
644 B
PHP
<?php
|
|
|
|
namespace App\Repositories\Shop;
|
|
|
|
use App\Models\Shop\InvoicePayment;
|
|
use App\Traits\Model\Basic;
|
|
|
|
class InvoicePayments
|
|
{
|
|
use Basic;
|
|
|
|
public static function init()
|
|
{
|
|
return [
|
|
'payment_types' => self::paymentTypes(),
|
|
];
|
|
}
|
|
|
|
public static function getPaymentType($id)
|
|
{
|
|
return self::paymentTypes()[$id] ?? false;
|
|
}
|
|
|
|
public static function paymentTypes()
|
|
{
|
|
return [
|
|
'',
|
|
'CB',
|
|
'CHEQUE',
|
|
'VIREMENT',
|
|
];
|
|
}
|
|
|
|
public static function getModel()
|
|
{
|
|
return InvoicePayment::query();
|
|
}
|
|
}
|