{{-- Partial สำหรับ 1 ชุด (Quotation + Invoice) ในหน้า my_document_quick_add รับตัวแปร: $index : ลำดับชุด (0,1,2,...) หรือ '__INDEX__' สำหรับ template ที่ใช้ clone ด้วย JS $bulkSet : array ['quotation_draft_id'=>, 'invoice_draft_id'=>, 'quotation'=>[...], 'invoice'=>[...]] หรือ null $banks : รายชื่อธนาคารสำหรับ dropdown หมายเหตุ: ฟอร์มนี้ตั้งใจให้กรอกข้อมูลได้ครบเทียบเท่าหน้า quotation_getedit / invoice_getedit (Quantity Mode, รายการย่อยพร้อมจำนวน+ยอดเงิน, ส่วนลด+ยอดสุทธิ, Sync Project Name, แทรกข้อความมาตรฐาน ฯลฯ) เพียงแต่ยุบมาไว้ในการ์ดเดียว 2 ฝั่ง (Quotation / Invoice) แล้วตั้งชื่อฟิลด์ตามที่ MyDocumentController::my_document_quick_add_store คาดหวังไว้ --}} @php $q = $bulkSet['quotation'] ?? []; $iv = $bulkSet['invoice'] ?? []; $qSubServices = $q['sub_services'] ?? []; $ivSubServices = $iv['sub_services'] ?? []; $qSubAmounts = $q['sub_amounts'] ?? []; $ivSubAmounts = $iv['sub_amounts'] ?? []; $qSubQtys = $q['sub_qtys'] ?? []; $ivSubQtys = $iv['sub_qtys'] ?? []; $qUseQty = $q['use_qty'] ?? 0; $ivUseQty = $iv['use_qty'] ?? 0; $qMainQty = $q['main_qty'] ?? 1; $ivMainQty = $iv['main_qty'] ?? 1; @endphp
ชุดที่ {{ is_numeric($index) ? $index + 1 : '' }}
@if(!empty($bulkSet))
ข้อมูลด้านล่างเติมมาจากการสแกน AI อัตโนมัติ กรุณาตรวจทานความถูกต้องก่อนบันทึก (ยอดเงินของรายการย่อยและโหมด Quantity ต้องกรอก/เปิดเองหลังสแกน)
@endif
{{-- ================= QUOTATION SIDE ================= --}}
Quotation
@if(count($qSubServices) > 0) @foreach($qSubServices as $sIndex => $item)
@endforeach @else
@endif
Discount
(0.00)
NET TOTAL: 0.00
{{-- ================= INVOICE SIDE ================= --}}
Invoice
@if(count($ivSubServices) > 0) @foreach($ivSubServices as $sIndex => $item)
@endforeach @else
@endif
Discount
(0.00)
NET TOTAL: 0.00