added scheda cliente

This commit is contained in:
2026-10-15 10:20:41 +02:00
parent c3234e3160
commit abd09769f2
6 changed files with 2023 additions and 31 deletions
+14 -2
View File
@@ -933,6 +933,17 @@ if ($action === 'data') {
padding: 60px 20px;
color: var(--c-muted);
}
.sc-link {
color: #198754;
margin-left: 6px;
opacity: .75;
text-decoration: none;
}
.sc-link:hover {
opacity: 1;
}
</style>
</head>
@@ -964,6 +975,7 @@ if ($action === 'data') {
<div class="stats-tabs">
<a href="sales_orders_stats.php"><i class="fa-solid fa-list-check me-1"></i> Andamento ordini</a>
<a href="sales_orders_years.php" class="active"><i class="fa-solid fa-chart-column me-1"></i> Confronto anni</a>
<a href="sales_customer.php"><i class="fa-solid fa-address-card me-1"></i> Scheda cliente</a>
<?php if (userCan('sales.deliveries.view')) : ?>
<a href="sales_orders_deliveries.php"><i class="fa-solid fa-truck-fast me-1"></i> Consegne</a>
<?php endif; ?>
@@ -1774,7 +1786,7 @@ if ($action === 'data') {
title: 'Cliente',
data: null,
render: (c, type) => type === 'display' ?
`<div class="fw-semibold">${esc(c.name)}</div><div class="small text-muted">${esc(c.code)}</div>` : (type === 'export' ? `${c.name} (${c.code})` : `${c.name} ${c.code}`)
`<div class="fw-semibold">${esc(c.name)}</div><div class="small text-muted">${esc(c.code)}<a class="sc-link" href="sales_customer.php?c=${encodeURIComponent(c.code)}" title="Apri la scheda cliente" onclick="event.stopPropagation();"><i class="fa-solid fa-address-card"></i></a></div>` : (type === 'export' ? `${c.name} (${c.code})` : `${c.name} ${c.code}`)
}, {
title: 'Agente',
data: 'salesperson'
@@ -2178,7 +2190,7 @@ if ($action === 'data') {
title: 'Cliente',
data: null,
render: (c, type) => type === 'display' ?
`<div class="fw-semibold">${esc(c.name)}</div><div class="small text-muted">${esc(c.code)}</div>` : (type === 'export' ? `${c.name} (${c.code})` : `${c.name} ${c.code}`)
`<div class="fw-semibold">${esc(c.name)}</div><div class="small text-muted">${esc(c.code)}<a class="sc-link" href="sales_customer.php?c=${encodeURIComponent(c.code)}" title="Apri la scheda cliente" onclick="event.stopPropagation();"><i class="fa-solid fa-address-card"></i></a></div>` : (type === 'export' ? `${c.name} (${c.code})` : `${c.name} ${c.code}`)
}];
years.slice().reverse().forEach(y => columns.push({
title: `<span style="color:${yearColor(y)};">●</span> ${y}`,