$row) { $ex_col_max_len[0] = max($ex_col_max_len[0], mb_strlen((string) ($index + 1))); $cl = ($row['client_name'] ?? '') . (! empty($row['short_name']) ? ' (' . $row['short_name'] . ')' : ''); $ex_col_max_len[1] = max($ex_col_max_len[1], mb_strlen($cl)); $ex_col_max_len[2] = max($ex_col_max_len[2], mb_strlen((string) ($row['policy_no'] ?? ''))); $ex_col_max_len[3] = max($ex_col_max_len[3], mb_strlen((string) ($row['description'] ?? ''))); $ex_col_max_len[4] = max($ex_col_max_len[4], mb_strlen((string) ($row['approved_by_name'] ?? ''))); $ex_col_max_len[5] = max($ex_col_max_len[5], mb_strlen(number_format((float) ($row['amount'] ?? 0), 2))); $ed = ! empty($row['expense_date']) ? date('d-m-Y', strtotime((string) $row['expense_date'])) : ''; $ex_col_max_len[6] = max($ex_col_max_len[6], mb_strlen($ed)); $ex_col_max_len[7] = max($ex_col_max_len[7], 4); } $ex_col_min_px = [48, 140, 120, 160, 120, 96, 110, 72]; $ex_col_max_px = [64, 360, 280, 400, 240, 140, 140, 88]; $ex_col_width_px = nhance_dt_column_widths_px($ex_header_labels, $ex_col_max_len, $ex_col_min_px, $ex_col_max_px); ?>
| S.No | Client | Policy No | Description | Approved By | Amount | Expense Date | Action |
|---|---|---|---|---|---|---|---|
| = $index + 1; ?> | = esc($row['client_name'] ?? ''); ?> = ! empty($row['short_name']) ? ' (' . esc($row['short_name']) . ')' : ''; ?> | = esc($row['policy_no'] ?? ''); ?> | = esc($row['description'] ?? ''); ?> | = esc($row['approved_by_name'] ?? ''); ?> | = number_format((float) ($row['amount'] ?? 0), 2); ?> | = date('d/m/Y', strtotime($row['expense_date'])); ?> |