feat: add legacy PDF generation support and invoice discount fields

This commit is contained in:
I-Fun
2026-04-07 07:49:35 +07:00
parent 737ba24293
commit 0e6726b0a6
13 changed files with 710 additions and 45 deletions

View File

@@ -9,12 +9,13 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
class InvoiceItem extends Model
{
protected $fillable = ['invoice_id', 'description', 'quantity', 'unit_price', 'total', 'is_taxable'];
protected $fillable = ['invoice_id', 'description', 'quantity', 'unit_price', 'total', 'is_taxable', 'is_discountable'];
protected $casts = [
'unit_price' => 'decimal:2',
'total' => 'decimal:2',
'is_taxable' => 'boolean',
'unit_price' => 'decimal:2',
'total' => 'decimal:2',
'is_taxable' => 'boolean',
'is_discountable' => 'boolean',
];
public function invoice(): BelongsTo