Update menambahkan active status pada export data

This commit is contained in:
mikael-zakaria 2025-09-12 14:47:13 +07:00
parent e9808fa470
commit 10c275ac2b
10 changed files with 4 additions and 6 deletions

View File

@ -473,13 +473,11 @@ class Products extends BaseController {
$where = 0;
$sql = "SELECT a2.accountname, p.statuspart, ps.productservicetext, p.productid, pc.productname, p.productnumber, pc.catalognumber, pt.texts as type_name, pc.manufacturer, s.sitename,
$sql = "SELECT a2.accountname, p.statuspart, ps.productservicetext, p.productid, pc.productname, p.productnumber, p.active, pc.catalognumber, pt.texts as type_name, pc.manufacturer, s.sitename,
z.zonename as city, z2.zonename as prov, p.installationdate, p.locationstartdate, p.locationenddate, p.warrantystartdate, p.warrantyenddate
FROM products p
left join productcatalog pc on pc.catalogid=p.catalogid
-- left join accoun pc2 on pc2.catalogid=p.accountid_productowner
left join producttype pt on pt.producttypeid=pc.producttypeid
left join productservice ps on ps.productserviceid=p.productserviceid
left join sites s on s.siteid=p.siteid

View File

@ -48,7 +48,7 @@
<th scope="col">End Date</th>
<th scope="col">Warranty Start</th>
<th scope="col">Warranty End</th>
<th scope="col">Active</th>
<th scope="col">Active Status</th>
</tr>
</thead>
<tbody>
@ -72,7 +72,7 @@
<td><?= htmlspecialchars($item['locationenddate'] ?? '') ?></td>
<td><?= htmlspecialchars($item['warrantystartdate'] ?? '') ?></td>
<td><?= htmlspecialchars($item['warrantyenddate'] ?? '') ?></td>
<td><?= htmlspecialchars($item['locationenddate'] == '' ? 'Yes' : 'No' ) ?></td>
<td><?= htmlspecialchars($item['active'] != 2 ? 'Yes' : 'No' ) ?></td>
</tr>
<?php endforeach; ?>
</tbody>

View File

@ -299,7 +299,7 @@ function exportToExcel() {
const producttypeid = $('#producttypeid').val();
const sitename = $('#sitename').val();
const url = `<?=base_url();?>/products/export?productaliasid=${encodeURIComponent(productaliasid)}&areaid=${encodeURIComponent(areaid)}&producttypeid=${encodeURIComponent(producttypeid)}&sitename=${encodeURIComponent(sitename)}`;
const url = `<?=base_url();?>products/export?productaliasid=${encodeURIComponent(productaliasid)}&areaid=${encodeURIComponent(areaid)}&producttypeid=${encodeURIComponent(producttypeid)}&sitename=${encodeURIComponent(sitename)}`;
window.open(url, '_blank');
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB