feat(API): 부실채권, 재고, 입고 기능 개선

- BadDebt 컨트롤러/서비스 기능 확장
- StockService 재고 조회 로직 개선
- ProcessReceivingRequest 검증 규칙 수정
- Item, Order, CommonCode, Shipment 모델 업데이트
- TodayIssueObserverService 개선

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-23 21:32:23 +09:00
parent 5104a6641c
commit 09db0da43b
10 changed files with 282 additions and 73 deletions

View File

@@ -4,6 +4,7 @@
use App\Models\Orders\Order;
use App\Models\Production\WorkOrder;
use App\Models\Products\CommonCode;
use App\Traits\BelongsToTenant;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
@@ -77,6 +78,7 @@ class Shipment extends Model
*/
protected $appends = [
'order_info',
'delivery_method_label',
];
/**
@@ -172,11 +174,11 @@ public function getPriorityLabelAttribute(): string
}
/**
* 배송방식 라벨
* 배송방식 라벨 (common_codes 테이블에서 조회)
*/
public function getDeliveryMethodLabelAttribute(): string
{
return self::DELIVERY_METHODS[$this->delivery_method] ?? $this->delivery_method;
return CommonCode::getLabel('delivery_method', $this->delivery_method);
}
/**