Customer Name
Existing Customer
Select Staff
·
----
@forelse($staffs as $staff)
{{ $staff->name }}
{{ $staff->staff_id }}
@empty
No Active Staff Found
@endforelse
Bill 1
0
items
| # |
Item |
Code |
Price |
QTY |
GST |
Amount |
Action |
No items yet
Search and add items from the left panel
Bill Details
Sub Total₹ 0.00
GST₹
0.00
Discount
- ₹ 0.00
Charge
+ ₹ 0.00
TOTAL
₹ 0.00
{{-- --}}
Done
Two copies will print together: Customer Bill (with pricing & tax) and
Duplicate Bill (product/packing details only).
| # |
Date & Time |
Bill |
Items |
Amount |
Actions |
| No held bills yet. |
Are you sure you want to delete this held bill?
@php
$editProducts = $order->details
->map(function ($detail) {
/*
* Original entered quantity unit_value-ல் உள்ளது.
*
* Example:
* quantity = 2
* unit_value = 2.2
*
* Edit page-ல் 2.2 காட்ட வேண்டும்.
*/
$storedQty = (float) ($detail->unit_value ?? ($detail->quantity ?? 1));
$price = (float) ($detail->price ?? 0);
$rowTotal = (float) ($detail->row_total ?? 0);
if ($rowTotal <= 0) {
$rowTotal = $storedQty * $price;
}
return [
'product_id' => $detail->product_id ?? 0,
'code' => $detail->product_code ?? '-',
'name' => $detail->product_name ?? 'Item',
'mrp' => (float) ($detail->mrp ?? $price),
'price' => $price,
// DB unit_value 2.2 → edit input 2.2
'qty' => $storedQty,
'tax' => (float) ($detail->tax ?? 0),
'tax_mode' => $detail->tax_mode ?? 'include',
'unit' => $detail->unit ?? 'pcs',
'unit_value' => $storedQty,
'row_total' => $rowTotal,
];
})
->values();
$editOrderData = [
'id' => $order->id,
'order_id' => $order->order_id,
'user_id' => $order->user_id,
'customer_name' => $order->customer_name,
'customer_phone' => $order->customer_phone,
'staff_id' => $order->staff_id,
'subtotal' => (float) $order->subtotal,
'gst' => (float) ($order->gst ?? 0),
'discount' => (float) ($order->discount ?? 0),
'charge' => (float) ($order->charge ?? 0),
'total' => (float) $order->total,
'payment_mode' => $order->payment_mode ?? 'cash',
'status' => $order->status ?? 'completed',
'products' => $editProducts,
];
@endphp