- 등록/수정 모달에 매출/매입 라디오버튼 (기본값: 매출) - 통계 카드에 매출/매입 건수 표시 - 필터 바에 매출/매입 필터 버튼 - 테이블에 매출/매입 뱃지 표시 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42 lines
774 B
PHP
42 lines
774 B
PHP
<?php
|
|
|
|
namespace App\Models\Finance;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class TradingPartner extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'trading_partners';
|
|
|
|
protected $fillable = [
|
|
'tenant_id',
|
|
'name',
|
|
'trade_type',
|
|
'type',
|
|
'category',
|
|
'biz_no',
|
|
'ceo',
|
|
'bank_account',
|
|
'contact',
|
|
'email',
|
|
'address',
|
|
'manager',
|
|
'manager_phone',
|
|
'status',
|
|
'memo',
|
|
];
|
|
|
|
public function scopeActive($query)
|
|
{
|
|
return $query->where('status', 'active');
|
|
}
|
|
|
|
public function scopeForTenant($query, $tenantId)
|
|
{
|
|
return $query->where('tenant_id', $tenantId);
|
|
}
|
|
}
|