added note to export
This commit is contained in:
parent
68c867a3f4
commit
eef9ae8d36
@ -35,12 +35,11 @@ try {
|
|||||||
|
|
||||||
// 🔹 STEP 1+2: Fetch Cliente ID + Schema ID
|
// 🔹 STEP 1+2: Fetch Cliente ID + Schema ID
|
||||||
$stmt = $pdo->prepare("
|
$stmt = $pdo->prepare("
|
||||||
SELECT et.idclient AS clienteId, et.idschema AS schemaId
|
SELECT idclient AS clienteId, idschema AS schemaId
|
||||||
FROM datadb as d
|
FROM datadb
|
||||||
INNER JOIN excel_templates as et ON d.templateid = et.id
|
WHERE iddatadb = :iddatadb
|
||||||
WHERE d.iddatadb = :iddatadb
|
LIMIT 1
|
||||||
LIMIT 1
|
");
|
||||||
");
|
|
||||||
$stmt->execute(['iddatadb' => $iddatadb]);
|
$stmt->execute(['iddatadb' => $iddatadb]);
|
||||||
$result = $stmt->fetch(PDO::FETCH_ASSOC);
|
$result = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
@ -51,11 +50,11 @@ try {
|
|||||||
$clienteId = (int) $result['clienteId'];
|
$clienteId = (int) $result['clienteId'];
|
||||||
$schemaId = (int) $result['schemaId'];
|
$schemaId = (int) $result['schemaId'];
|
||||||
|
|
||||||
// 🔹 STEP 3: Fetch Parts (including idmatrice)
|
// 🔹 STEP 3: Fetch Parts (including idmatrice and note)
|
||||||
$stmt = $pdo->prepare("
|
$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
|
FROM identification_parts
|
||||||
WHERE iddatadb = :iddatadb
|
WHERE iddatadb = :iddatadb
|
||||||
");
|
");
|
||||||
$stmt->execute(['iddatadb' => $iddatadb]);
|
$stmt->execute(['iddatadb' => $iddatadb]);
|
||||||
$parts = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
$parts = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||||
@ -135,7 +134,7 @@ try {
|
|||||||
"Matrice" => $matriceId,
|
"Matrice" => $matriceId,
|
||||||
"SottoMatrice" => null,
|
"SottoMatrice" => null,
|
||||||
"SchemaCustomField" => $schemaId,
|
"SchemaCustomField" => $schemaId,
|
||||||
"NoteWeb" => $part["part_description"] ?? ""
|
"NoteWeb" => $part["note"] ?? "" // Modificato da part_description a note
|
||||||
];
|
];
|
||||||
|
|
||||||
// Costruisci curl-like per questo campione
|
// Costruisci curl-like per questo campione
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user