@extends('admin.layouts.app') @section('title', 'SKU 수정') @section('page_title', 'SKU 수정') @section('page_desc', 'SKU(권종/가격)를 수정합니다.') @push('head') @endpush @section('content') @php $p = $sku ?? null; $qs = request()->only(['q','category_id','product_id','status','page']); $st = (string)old('status', (string)($p->status ?? 'active')); $pill = $st === 'active' ? 'pill--ok' : 'pill--bad'; $stText = $st === 'active' ? '노출' : '숨김'; $face = (int)old('face_value', (int)($p->face_value ?? 0)); $normal = (int)old('normal_price', (int)($p->normal_price ?? 0)); $rate = (string)old('discount_rate', (string)($p->discount_rate ?? '0.00')); $sale = (int)($p->sale_price ?? 0); @endphp
SKU 수정
#{{ (int)($p->id ?? 0) }}
← 목록
{{-- 요약 --}}
상태
● {{ $stText }}
현재 판매가
{{ number_format($sale) }} 원
재고방식
{{ (string)($p->stock_mode ?? '-') }}
생성
{{ $p->created_at ?? '-' }}
최근 수정
{{ $p->updated_at ?? '-' }}
상품 ID
{{ (int)($p->product_id ?? 0) }}
{{-- 수정 폼 --}}
@csrf @method('PUT') {{-- 저장 후 목록 복귀 시 같은 필터/페이지 유지용 --}} @foreach($qs as $k=>$v) @endforeach
상품 변경은 운영상 위험해서(재고/정산/장부 연계) 기본은 고정입니다. product_id={{ (int)($p->product_id ?? 0) }}
-
※ 저장 시 서버에서 계산되어 sale_price에 저장됩니다.
※ 권면가/정상가/할인율 기반으로 판매가가 계산됩니다.
목록
{{-- 삭제 폼 (중첩 form 금지) --}}
@csrf @method('DELETE') @foreach($qs as $k=>$v) @endforeach
@endsection