fixed country client and parts column matrice

This commit is contained in:
2025-10-27 14:38:20 +01:00
parent 29e4b41874
commit 218fc14462
4 changed files with 127 additions and 80 deletions
+8 -4
View File
@@ -1084,7 +1084,7 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
clientData.forEach(client => {
const nome = client.Nominativo || "Nome non disponibile";
const id = client.IdCliente || "ID non disponibile";
const option = new Option(`${nome.trim()} (ID: ${id})`, id);
const option = new Option(`${nome.trim()} - ${client.CodiceNazioneFatturazione} (ID: ${id})`, id);
if (parseInt(id) === parseInt(<?php echo json_encode($default_idclient ?? 0); ?>)) {
option.selected = true;
}
@@ -1116,7 +1116,7 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
clientData.forEach(client => {
const nome = client.Nominativo || "Nome non disponibile";
const id = client.IdCliente || "ID non disponibile";
const option = new Option(`${nome.trim()} (ID: ${id})`, id);
const option = new Option(`${nome.trim()} - ${client.CodiceNazioneFatturazione} (ID: ${id})`, id);
if (String(id) === String(currentValue)) {
option.selected = true;
}
@@ -1347,7 +1347,9 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
clientData.forEach(client => {
const nome = client.Nominativo || "Nome non disponibile";
const id = client.IdCliente || "ID non disponibile";
const option = new Option(`${nome.trim()} (ID: ${id})`, id);
const codice = (client.CodiceNazioneFatturazione || '').trim();
const option = new Option(`${nome.trim()} - ${codice} (ID: ${id})`, id);
if (parseInt(id) === parseInt(<?php echo json_encode($default_idclient ?? 0); ?>)) {
option.selected = true;
}
@@ -1377,7 +1379,9 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
clientData.forEach(client => {
const nome = client.Nominativo || "Nome non disponibile";
const id = client.IdCliente || "ID non disponibile";
const option = new Option(`${nome.trim()} (ID: ${id})`, id);
const codice = (client.CodiceNazioneFatturazione || '').trim();
const option = new Option(`${nome.trim()} - ${codice} (ID: ${id})`, id);
if (String(id) === String(currentValue)) {
option.selected = true;
}