added note to export

This commit is contained in:
Claudio 2025-10-10 11:31:49 +02:00
parent 68c867a3f4
commit eef9ae8d36

View File

@ -35,10 +35,9 @@ try {
// 🔹 STEP 1+2: Fetch Cliente ID + Schema ID
$stmt = $pdo->prepare("
SELECT et.idclient AS clienteId, et.idschema AS schemaId
FROM datadb as d
INNER JOIN excel_templates as et ON d.templateid = et.id
WHERE d.iddatadb = :iddatadb
SELECT idclient AS clienteId, idschema AS schemaId
FROM datadb
WHERE iddatadb = :iddatadb
LIMIT 1
");
$stmt->execute(['iddatadb' => $iddatadb]);
@ -51,9 +50,9 @@ try {
$clienteId = (int) $result['clienteId'];
$schemaId = (int) $result['schemaId'];
// 🔹 STEP 3: Fetch Parts (including idmatrice)
// 🔹 STEP 3: Fetch Parts (including idmatrice and note)
$stmt = $pdo->prepare("
SELECT part_number, part_description, material, color, mix, idmatrice
SELECT part_number, part_description, material, color, mix, idmatrice, note
FROM identification_parts
WHERE iddatadb = :iddatadb
");
@ -135,7 +134,7 @@ try {
"Matrice" => $matriceId,
"SottoMatrice" => null,
"SchemaCustomField" => $schemaId,
"NoteWeb" => $part["part_description"] ?? ""
"NoteWeb" => $part["note"] ?? "" // Modificato da part_description a note
];
// Costruisci curl-like per questo campione