@php
if($invoice->size == '58mm' || $invoice->size == '80mm'){;
$checkboxes = [
'active_logo_height_width' => 'db.Active Logo Height Width',
'show_ref_number' => 'db.Show Reference No',
'active_generat_settings' => 'db.Auto Generate Numbering Type',
'active_date_format' => 'db.Active Date Format',
'show_warehouse_info' => 'db.Show Warehouse Info',
'show_description' => 'db.Show Description',
'show_paid_info' => 'db.Show Paid Info',
'hide_total_due' => 'db.Hide Total Due',
'show_in_words' => 'db.Show Amount In Words',
'show_biller_info' => 'db.Served By',
'show_footer_text' => 'db.Show Footer Text',
'show_barcode' => 'db.Show Barcode',
'show_qr_code' => 'db.Show QR Code',
'show_vat_registration_number' => 'db.Show Vat Registration Number',
'show_sale_note' => 'db.Show Sale Note',
];
}else{
$checkboxes = [
'active_logo_height_width' => 'db.Active Logo Height Width',
'show_ref_number' => 'db.Show Reference No',
'active_generat_settings' => 'db.Auto Generate Numbering Type',
'active_date_format' => 'db.Active Date Format',
'show_warehouse_info' => 'db.Show Warehouse Info',
'show_bill_to_info' => 'db.Show Bill To Info',
'show_biller_info' => 'db.Served By',
'show_payment_note' => 'db.Show Payment Note',
'hide_total_due' => 'db.Hide Total Due',
'show_in_words' => 'db.Show Amount In Words',
'show_footer_text' => 'db.Show Footer Text',
'show_barcode' => 'db.Show Barcode',
'show_qr_code' => 'db.Show QR Code',
'active_primary_color' => 'db.Active Primary Color',
'show_vat_registration_number' => 'db.Show Vat Registration Number',
'show_sale_note' => 'db.Show Sale Note',
];
}
// Decode JSON if it's stored as string in DB
$show_column = old('show_column', $invoice->show_column ?? []);
if (is_string($show_column)) {
$show_column = json_decode($show_column, true);
}
@endphp
@foreach ($checkboxes as $field => $label)
@endforeach