@component('pdf.components.style') @endcomponent @php $i = 0; @endphp @foreach($orders as $orderData) @php $order = $orderData['order']; $change_due = $orderData['change_due']; $payment = $orderData['payment']; $paymentRefund = $orderData['paymentRefund']; $return_payment = $orderData['return_payment']; $is_credit_line = $orderData['is_credit_line']; $credit_line_balance_due = $orderData['credit_line_balance_due']; $itemize = $orderData['itemize']; $is_warehouse = $orderData['is_warehouse']; $warehouse = $orderData['warehouse']; $company_logo = $orderData['company_logo']; $company = $orderData['company']; $name = $orderData['name']; $balance_due_install = $orderData['balance_due_install']; $balance_due_warranty = $orderData['balance_due_warranty']; $balance_due_haul = $orderData['balance_due_haul']; $balance_due = $orderData['balance_due']; @endphp @component('pdf.components.header', [ 'company_logo' => $company_logo, 'sales_person' => [ 'name' => $order->sales_person->fullname, 'email' => $order->sales_person->email, 'phone_number' => $order->sales_person->show_phone_invoice == 1 ? $order->sales_person->phone_number : null, 'extension_number' => $order->sales_person->extension_number ], 'store' => [ 'name' => $order->store->store_name, 'format_store_name' => $order->store->format_store_name, 'address' => $order->store->store_address, 'phone_number' => $order->store->store_phone_number ], 'order_no' => $order->order_no, 'order_date' => $order->order_date . ' ' . $order->order_time, 'total' => $order->total ]) @endcomponent @if(!$itemize) @component('pdf.components.information_section', [ // 'sales_person' => ['name' => $order->sales_person->fullname, 'email' => $order->sales_person->email], 'billing' => [ 'company_name' => $order->company_name, 'builders_code' => $order->builders_code, 'name' => $order->bill_name, 'email' => $order->bill_email, 'address' => $order->formatted_billing_address ? $order->formatted_billing_address['formatted']:$order->bill_address, 'phone_number' => $order->bill_phone_number, 'home_number' => $order->bill_home_number, 'alternative_number' => $order->bill_alternative_number == null?"":$order->bill_alternative_number, ], 'shipping' => [ 'company_name' => $order->ship_company_name, 'builders_code' => $order->ship_builders_code, 'name' => $order->ship_name, 'email' => $order->ship_email, 'address' => $order->formatted_shipping_address ? $order->formatted_shipping_address['formatted']:$order->ship_address, 'phone_number' => $order->ship_phone_number, 'home_number' => $order->ship_home_number, 'alternative_number' => $order->ship_alternative_number == null?"":$order->ship_alternative_number ] ]) @endcomponent @endif @php $component = "product"; $footer = "footer"; if($itemize == "true" || $itemize){ $component = "product_itemize"; $footer = "footer_itemize"; } @endphp @component('pdf.components.'.$component, [ 'order_detail' => $order->order_detail, 'order' => $order, 'type' => 'order', 'without_model_number' => false, 'company' => $company, 'name' => $name ]) @endcomponent @if($name !== "order-without-price") @endif
@component('pdf.components.notes', ['notes' => $order->notes, 'delivery_notes' => $order->delivery_notes]) @endcomponent @component('pdf.components.'.$footer, [ 'order' => $order, 'order_detail' => $order->order_detail, 'type' => 'order', 'change_due' => $change_due, 'return_payment' => $return_payment, 'is_credit_line' => $is_credit_line, 'credit_line_balance_due' => $credit_line_balance_due, 'name' => $name, "balance_due_install" => $balance_due_install, "balance_due_warranty" => $balance_due_warranty, 'balance_due_haul' => $balance_due_haul, 'balance_due' => $balance_due ]) @endcomponent
{{-- @component('pdf.components.footer', [ 'order' => $order, 'order_detail' => $order->order_detail, 'type' => 'order', 'change_due' => $change_due ]) @endcomponent @component('pdf.components.notes', ['notes' => $order->notes, 'delivery_notes' => $order->delivery_notes]) @endcomponent --}} @component('pdf.components.order_return', [ 'order' => $order ]) @endcomponent @component('pdf.components.page', ['order_no' => $order->order_no, 'order' => $order, 'type' => 'INVOICE_BATCH', 'payment' => $payment, 'is_warehouse' => $is_warehouse, 'warehouse' => $warehouse, 'company' => $company, 'notes' => $order->notes, 'delivery_notes' => $order->delivery_notes]) @endcomponent @php $i++; @endphp @if($i < count($orders))
@endif @endforeach