feat: 수주 목록/상세 필드 개선

- OrderService: client relation에 manager_name 추가
- Order 모델: shipping_cost_label accessor 추가 (common_codes 조회)
- $appends에 shipping_cost_label 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-28 22:24:21 +09:00
parent 42deb60861
commit e9894fef61
2 changed files with 12 additions and 1 deletions

View File

@@ -149,6 +149,7 @@ class Order extends Model
*/
protected $appends = [
'delivery_method_label',
'shipping_cost_label',
];
/**
@@ -255,6 +256,16 @@ public function getDeliveryMethodLabelAttribute(): string
return CommonCode::getLabel('delivery_method', $this->delivery_method_code);
}
/**
* 운임비용 라벨 (common_codes 테이블에서 조회)
*/
public function getShippingCostLabelAttribute(): string
{
$shippingCostCode = $this->options['shipping_cost_code'] ?? null;
return $shippingCostCode ? CommonCode::getLabel('shipping_cost', $shippingCostCode) : '';
}
/**
* 수주확정 시 매출 생성 여부
*/