Files
sam-manage/app/Models/Finance/TradingPartner.php
김보곤 416eea4401 feat:거래처 매출/매입 구분 라디오버튼 추가
- 등록/수정 모달에 매출/매입 라디오버튼 (기본값: 매출)
- 통계 카드에 매출/매입 건수 표시
- 필터 바에 매출/매입 필터 버튼
- 테이블에 매출/매입 뱃지 표시

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 11:27:40 +09:00

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);
}
}