27 lines
510 B
PHP
27 lines
510 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Concerns\BelongsToTenant;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Decimal casts expose exact decimal strings for monetary calculations.
|
|
*
|
|
* @property string $quantity
|
|
* @property string $tax_rate
|
|
*/
|
|
class RequisitionItem extends Model
|
|
{
|
|
use BelongsToTenant;
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['quantity' => 'decimal:3', 'tax_rate' => 'decimal:2'];
|
|
}
|
|
}
|