- 부가세관리: 신고기간 1P/1C/2P/2C 형식, 세금구분(과세/영세/면세), 카드 공제분 매입 반영, 라벨 변경 - 매출관리: 작성일자/승인번호 라벨, 구분(과세/영세/면세) 추가 - 미지급금: 결제예정일/거래일자 라벨, 청구서번호 숨김, 매입세금계산서 발행여부 체크박스 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42 lines
832 B
PHP
42 lines
832 B
PHP
<?php
|
|
|
|
namespace App\Models\Finance;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Payable extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'payables';
|
|
|
|
protected $fillable = [
|
|
'tenant_id',
|
|
'vendor_name',
|
|
'invoice_no',
|
|
'issue_date',
|
|
'due_date',
|
|
'category',
|
|
'amount',
|
|
'paid_amount',
|
|
'status',
|
|
'description',
|
|
'memo',
|
|
'tax_invoice_issued',
|
|
];
|
|
|
|
protected $casts = [
|
|
'amount' => 'integer',
|
|
'paid_amount' => 'integer',
|
|
'issue_date' => 'date',
|
|
'due_date' => 'date',
|
|
'tax_invoice_issued' => 'boolean',
|
|
];
|
|
|
|
public function scopeForTenant($query, $tenantId)
|
|
{
|
|
return $query->where('tenant_id', $tenantId);
|
|
}
|
|
}
|