Tax excpetion texts
This commit is contained in:
@@ -14,12 +14,14 @@ use App\Scopes\CommonModel;
|
||||
* @property string $name
|
||||
* @property string $invoice_text
|
||||
* @property bool $requires_note
|
||||
* @property int $sort_order
|
||||
*/
|
||||
class TaxExemptionReason extends CommonModel
|
||||
{
|
||||
public const string SMALL_BUSINESS = 'small_business';
|
||||
public const string EDUCATION = 'education';
|
||||
public const string YOUTH_WELFARE = 'youth_welfare';
|
||||
public const string USTG_19 = 'ustg_19';
|
||||
public const string USTG_4_24 = 'ustg_4_24';
|
||||
public const string USTG_4_25A = 'ustg_4_25a';
|
||||
public const string USTG_4_22A = 'ustg_4_22a';
|
||||
public const string CUSTOM = 'custom';
|
||||
|
||||
protected $table = 'tax_exemption_reasons';
|
||||
@@ -32,10 +34,12 @@ class TaxExemptionReason extends CommonModel
|
||||
'name',
|
||||
'invoice_text',
|
||||
'requires_note',
|
||||
'sort_order',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'requires_note' => 'boolean',
|
||||
'sort_order' => 'integer',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -55,7 +59,7 @@ class TaxExemptionReason extends CommonModel
|
||||
*/
|
||||
public static function options(): array
|
||||
{
|
||||
return self::all()
|
||||
return self::orderBy('sort_order')->get()
|
||||
->map(static fn (self $reason): array => [
|
||||
'value' => $reason->slug,
|
||||
'label' => $reason->name,
|
||||
|
||||
Reference in New Issue
Block a user