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:
@@ -4,6 +4,7 @@
|
||||
|
||||
use App\Models\Items\Item;
|
||||
use App\Models\Production\WorkOrder;
|
||||
use App\Models\Products\CommonCode;
|
||||
use App\Models\Quote\Quote;
|
||||
use App\Models\Tenants\Sale;
|
||||
use App\Models\Tenants\Shipment;
|
||||
@@ -144,6 +145,13 @@ class Order extends Model
|
||||
'deleted_at' => 'datetime',
|
||||
];
|
||||
|
||||
/**
|
||||
* JSON 응답에 자동 포함할 accessor
|
||||
*/
|
||||
protected $appends = [
|
||||
'delivery_method_label',
|
||||
];
|
||||
|
||||
/**
|
||||
* 수주 상세 품목
|
||||
*/
|
||||
@@ -240,6 +248,14 @@ public function getSalesRecognitionLabelAttribute(): string
|
||||
return self::SALES_RECOGNITION_TYPES[$this->sales_recognition] ?? '출하완료 시';
|
||||
}
|
||||
|
||||
/**
|
||||
* 배송방식 라벨 (common_codes 테이블에서 조회)
|
||||
*/
|
||||
public function getDeliveryMethodLabelAttribute(): string
|
||||
{
|
||||
return CommonCode::getLabel('delivery_method', $this->delivery_method_code);
|
||||
}
|
||||
|
||||
/**
|
||||
* 수주확정 시 매출 생성 여부
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user