prepare($sql); $stmt->bind_param("i", $invoiceId); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows === 0) { die("Invoice not found"); } $invoice = $result->fetch_assoc(); // Get invoice items $sql = "SELECT * FROM challan_invoice_items WHERE invoice_id = ? ORDER BY id ASC"; $stmt = $conn->prepare($sql); $stmt->bind_param("i", $invoiceId); $stmt->execute(); $itemsResult = $stmt->get_result(); $items = []; while ($row = $itemsResult->fetch_assoc()) { $items[] = $row; } ?>
Pincode - Mob: |
Invoice No: |
Dated: |
|||
Delivery Note: |
Mode/Terms of Payment: |
||||
Consignee (Ship to): |
Buyer's Order No: |
Dated: |
|||
Reference No. & Date: |
Other References: |
||||
Buyer (Bill to): |
Dispatch Doc No: |
Delivery Note Date: |
|||
Dispatched through: |
Destination: |
Challan No | Challan Date | Vehicle No. | Weight (Kg) | Work Order No. | Rate | subTotal |
---|---|---|---|---|---|---|
Total |
Declaration: