fix(WEB): 수주 등록/수정 옵션 필드 저장 및 담당자 표시 문제 해결
- FormRequest에 options 필드 validation 추가 (StoreOrderRequest, UpdateOrderRequest) - shipping_cost_code, receiver, receiver_contact, shipping_address 등 - OrderService.show()에서 client 로드 시 manager_name 필드 추가 - 수주확정/생산지시 되돌리기 기능 추가 (revertOrderConfirmation, revertProductionOrder) - 견적 calculation_inputs 포함하여 로드 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -65,6 +65,7 @@ class Order extends Model
|
||||
'memo',
|
||||
'remarks',
|
||||
'note',
|
||||
'options',
|
||||
// 감사
|
||||
'created_by',
|
||||
'updated_by',
|
||||
@@ -80,6 +81,7 @@ class Order extends Model
|
||||
'discount_amount' => 'decimal:2',
|
||||
'received_at' => 'datetime',
|
||||
'delivery_date' => 'date',
|
||||
'options' => 'array',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
'deleted_at' => 'datetime',
|
||||
|
||||
@@ -33,6 +33,9 @@ class OrderItem extends Model
|
||||
'item_code',
|
||||
'item_name',
|
||||
'specification',
|
||||
// 제품-부품 매핑용 코드
|
||||
'floor_code',
|
||||
'symbol_code',
|
||||
'unit',
|
||||
// 수량/금액
|
||||
'quantity',
|
||||
@@ -153,8 +156,9 @@ public function recalculateAmounts(): self
|
||||
* 견적 품목에서 수주 품목 생성
|
||||
*
|
||||
* @param int $serialIndex 품목 순번 (1부터 시작)
|
||||
* @param array $productMapping 제품 매핑 정보 ['floor_code' => '10', 'symbol_code' => 'F1']
|
||||
*/
|
||||
public static function createFromQuoteItem(QuoteItem $quoteItem, int $orderId, int $serialIndex = 1): self
|
||||
public static function createFromQuoteItem(QuoteItem $quoteItem, int $orderId, int $serialIndex = 1, array $productMapping = []): self
|
||||
{
|
||||
$qty = $quoteItem->calculated_quantity ?? 1;
|
||||
$supplyAmount = $quoteItem->unit_price * $qty;
|
||||
@@ -170,6 +174,9 @@ public static function createFromQuoteItem(QuoteItem $quoteItem, int $orderId, i
|
||||
'item_code' => $quoteItem->item_code,
|
||||
'item_name' => $quoteItem->item_name,
|
||||
'specification' => $quoteItem->specification,
|
||||
// 제품-부품 매핑 코드
|
||||
'floor_code' => $productMapping['floor_code'] ?? null,
|
||||
'symbol_code' => $productMapping['symbol_code'] ?? null,
|
||||
'unit' => $quoteItem->unit ?? 'EA',
|
||||
'quantity' => $qty,
|
||||
'unit_price' => $quoteItem->unit_price,
|
||||
|
||||
Reference in New Issue
Block a user