ipd_id ?? 0) > 0); ?>
Medical Invoice No. inv_med_code ?? ('M' . date('ym') . str_pad(substr((string) ((int)($invoice->id ?? 0)), -7, 7), 7, '0', STR_PAD_LEFT))) ?>
ipd_id ?? 0) > 0): ?>
Invoice is finalized. Edit actions are locked.
Name : inv_name ?? '-') ?> / P Code : patient_code ?? '-') ?> / ipd_id ?? 0) > 0): ?> IPD ID : ipd_id ?? 0))) ?> / Invoice No. : inv_med_code ?? ('M' . date('ym') . str_pad(substr((string) ((int)($invoice->id ?? 0)), -7, 7), 7, '0', STR_PAD_LEFT))) ?> / Date : inv_date) ? date('d/m/Y', strtotime((string)$invoice->inv_date)) : '-') ?>
item_code ?? ''); if ($codeKey !== '') { $itemCodeCounts[$codeKey] = ($itemCodeCounts[$codeKey] ?? 0) + 1; } } } ?> $item): ?> sale_return ?? 0) === 1) || ((float) ($item->amount ?? 0) < 0) || ((float) ($item->tamount ?? 0) < 0) || ((float) ($item->twdisc_amount ?? 0) < 0); if ($isReturnRow) { $rowStyle = 'background:orange;'; } $expiryDays = 1000; if (!empty($item->expiry)) { $expiryTs = strtotime((string) $item->expiry); if ($expiryTs !== false) { $expiryDays = (int) floor(($expiryTs - strtotime(date('Y-m-d'))) / 86400); } } if ($expiryDays < 90) { $rowStyle = 'color:red;'; } $sQty = (float) ($item->s_qty ?? 0); if ($sQty < 6) { $rowStyle = 'color:red;'; } $itemCode = (string) ($item->item_code ?? ''); if ($itemCode !== '' && (int) ($itemCodeCounts[$itemCode] ?? 0) > 1) { $itemNameStyle = 'color:green;'; } ?> > >item_Name ?? '-') ?>
# Item Name Batch No Exp. Rate S.Qty. Qty Disc. Amount Action
batch_no ?? '-') ?> expiry) ? date('Y-m-d', strtotime((string)$item->expiry)) : '-') ?> price ?? 0), 2)) ?> qty ?? 0), 0, '.', '')) ?> sale_return ?? 0) === 0): ?>
qty ?? 0), 2)) ?>
disc_amount ?? 0), 2)) ?> tamount ?? 0), 2)) ?>
Locked
No items in invoice.
Gross Total gross ?? 0), 2)) ?>
Net Total net ?? 0), 2)) ?>
Product Search

Item Batch Exp. S.Qty Rate Add
item_name ?? '-') ?> batch_no ?? '-') ?> expiry_date ?? '-') ?> current_qty ?? 0) ?> selling_unit_rate ?? 0), 2)) ?>
No stock items found for search.
Sale Medicine
patient_id) && !empty($oldInvoices)): ?>
id ?? 0); ?> _items)): ?> _items as $n => $oldItem): ?>
# inv_med_code ?? ('M' . date('ym') . str_pad(substr((string) $oldInvId, -7, 7), 7, '0', STR_PAD_LEFT))) ?> inv_date) ? date('Y-m-d', strtotime((string)$old->inv_date)) : '-') ?> Show Bill
# Item Bat. Exp.Dt Qty R.Qty
item_Name ?? '-') ?> batch_no ?? '-') ?> expiry) ? date('m-Y', strtotime((string)$oldItem->expiry)) : '-') ?> qty ?? 0), 0)) ?> id)): ?>
-
No item rows.
patient_id)): ?>
No old invoices for this patient.
Walk-in invoice. Previous patient history is unavailable.