ROUTES 89: Route::get('/invoice/{token}', [SellPosController::class, 'showInvoice']) 91: Route::get('/quote/{token}', [SellPosController::class, 'showInvoice']) 103: Route::get('service-staff-availability', [SellPosController::class, 'showServiceStaffAvailibility']); 355: Route::get('stock-transfers/print/{id}', [StockTransferController::class, 'printInvoice']); 377: Route::get('/sell-return/print/{id}', [SellReturnController::class, 'printInvoice']); 523: Route::get('/purchases/print/{id}', [PurchaseController::class, 'printInvoice']); 527: Route::get('/sells/{transaction_id}/print', [SellPosController::class, 'printInvoice'])->name('sell.printInvoice'); 533: Route::get('/sells/invoice-url/{id}', [SellPosController::class, 'showInvoiceUrl']); CONTROLLER 705: $receipt = ''; 730: $receipt = $this->receiptContent($business_id, $input['location_id'], $transaction->id, null, false, true, $invoice_layout_id); 733: $output = ['success' => 1, 'msg' => $msg, 'receipt' => $receipt]; 797: * Returns the content for the receipt 805: private function receiptContent( 825: if ($from_pos_screen && $location_details->print_receipt_on_invoice != 1) { 836: $receipt_printer_type = is_null($printer_type) ? $location_details->receipt_printer_type : $printer_type; 838: $receipt_details = $this->transactionUtil->getReceiptDetails($transaction_id, $location_id, $invoice_layout, $business_details, $location_details, $receipt_printer_type); 841: $receipt_details->restaurant_order_type = !empty($restaurant_transaction) 844: $receipt_details->customer_name = null; 845: $receipt_details->customer_mobile = null; 848: $receipt_customer = Contact::find($restaurant_transaction->contact_id); 850: if (!empty($receipt_customer)) { 851: $receipt_details->customer_name = !empty($receipt_customer->name) 852: ? $receipt_customer->name 853: : $receipt_customer->supplier_business_name; 854: $receipt_details->customer_mobile = $receipt_customer->mobile; 863: $receipt_details->currency = $currency_details; 866: $output['html_content'] = view('sale_pos.receipts.packing_slip', compact('receipt_details'))->render(); 872: $output['html_content'] = view('sale_pos.receipts.delivery_note', compact('receipt_details'))->render(); 877: $output['print_title'] = $receipt_details->invoice_no; 879: if ($receipt_printer_type == 'printer') { 882: $output['data'] = $receipt_details; 884: $layout = !empty($receipt_details->design) ? 'sale_pos.receipts.' . $receipt_details->design : 'sale_pos.receipts.classic'; 886: $output['html_content'] = view($layout, compact('receipt_details'))->render(); 898: public function show($id) 953: $location_printer_type = $business_location->receipt_printer_type; 1493: $receipt = $this->receiptContent($business_id, $input['location_id'], $transaction_before->id, null, false, true, $invoice_layout_id); 1496: $output = ['success' => 1, 'msg' => $msg, 'receipt' => $receipt]; 1658: $receipt = ''; 1666: // but it must return the standard POS receipt preview. 1672: $receipt = $this->receiptContent( 1685: $receipt = $this->receiptContent($business_id, $input['location_id'], $transaction->id, null, false, true, $invoice_layout_id); 1687: $receipt = ''; 1692: $receipt = $this->receiptContent($business_id, $input['location_id'], $transaction->id, null, false, true, $invoice_layout_id); 1694: $receipt = ''; 1698: $output = ['success' => 1, 'msg' => $msg, 'receipt' => $receipt]; 2128: public function printInvoice(Request $request, $transaction_id) 2149: $printer_type = $transaction->location->receipt_printer_type; 2156: $receipt = $this->receiptContent($business_id, $transaction->location_id, $transaction_id, $printer_type, $is_package_slip, false, $invoice_layout_id, $is_delivery_note); 2158: if (!empty($receipt)) { 2159: $output = ['success' => 1, 'receipt' => $receipt]; 2296: public function showInvoiceUrl($id) 2319: public function showInvoice($token) 2326: $receipt = $this->receiptContent($transaction->business_id, $transaction->location_id, $transaction->id, 'browser', false, false, $invoice_layout_id); 2336: ->with(compact('receipt', 'title', 'payment_link')); 2803: $receipt = $this->receiptContent($business_id, $transaction->location_id, $transaction->id); 2808: 'receipt' => $receipt, 3209: $receipt_contents = $this->transactionUtil->getPdfContentsForGivenTransaction($business_id, $id); 3210: $receipt_details = $receipt_contents['receipt_details']; 3211: $location_details = $receipt_contents['location_details']; 3215: if (!empty($receipt_details->is_export)) { 3220: $body = view('sale_pos.receipts.' . $blade_file) 3221: ->with(compact('receipt_details', 'location_details', 'is_email_attachment')) 3236: $mpdf->SetWatermarkText($receipt_details->business_name, 0.1); 3238: $mpdf->SetTitle('INVOICE-' . $receipt_details->invoice_no . '.pdf'); 3240: $mpdf->Output('INVOICE-' . $receipt_details->invoice_no . '.pdf', 'I'); 3254: $receipt_contents = $this->transactionUtil->getPdfContentsForGivenTransaction($business_id, $id); 3255: $receipt_details = $receipt_contents['receipt_details']; 3256: $location_details = $receipt_contents['location_details']; 3259: $body = view('sale_pos.receipts.download_quotation_pdf') 3260: ->with(compact('receipt_details', 'location_details', 'sub_status')) 3275: $mpdf->SetWatermarkText($receipt_details->business_name, 0.1); 3277: $mpdf->SetTitle($pdf_name . '-' . $receipt_details->invoice_no . '.pdf'); 3279: $mpdf->Output($pdf_name . '-' . $receipt_details->invoice_no . '.pdf', 'I'); 3293: $receipt_contents = $this->transactionUtil->getPdfContentsForGivenTransaction($business_id, $id); 3294: $receipt_details = $receipt_contents['receipt_details']; 3295: $location_details = $receipt_contents['location_details']; 3298: $body = view('sale_pos.receipts.download_packing_list_pdf') 3299: ->with(compact('receipt_details', 'location_details')) 3314: $mpdf->SetWatermarkText($receipt_details->business_name, 0.1); 3316: $mpdf->SetTitle('PACKINGSLIP-' . $receipt_details->invoice_no . '.pdf'); 3318: $mpdf->Output('PACKINGSLIP-' . $receipt_details->invoice_no . '.pdf', 'I'); 3321: public function showServiceStaffAvailibility() JS public/js/pos.js:10:// ZRX: Unpaid Invoice uses Suspend/Draft flow + receipt print public/js/pos.js:612: pos_print(result.receipt); public/js/pos.js:792: // ZRX: UNPAID INVOICE = exact Suspend/Draft flow + receipt print public/js/pos.js:991: pos_print(result.receipt); public/js/pos.js:1018: pos_print(result.receipt); public/js/pos.js:2636: 'receipt_printer_type', public/js/pos.js:2639: .data('receipt_printer_type') public/js/pos.js:2668: if ($('input#location_id').data('receipt_printer_type') == 'printer') { public/js/pos.js:2708:function pos_print(receipt) { public/js/pos.js:2710: if (receipt.print_type == 'printer') { public/js/pos.js:2712: content.type = 'print-receipt'; public/js/pos.js:2732: if (typeof receipt.print_title != 'undefined') { public/js/pos.js:2733: document.title = receipt.print_title; public/js/pos.js:2739: __print_receipt('receipt_section'); public/js/pos.js:2855: pos_print(result.receipt); resources/views/sale_pos/partials/show_invoice.blade.php:13: