fixed buyer in template

This commit is contained in:
2026-07-22 12:07:20 +02:00
parent 0277fb5262
commit df1ddce0a6
@@ -617,7 +617,11 @@ $apiSampleJson = $template['api_sample_json'] ?? '';
</td>
<td>
<strong><?php echo htmlspecialchars($fm['fixed_field_key']); ?></strong>
<strong><?php
$fixedFieldLabels = ['ClienteAnalisi' => 'Buyer'];
$fixedKey = $fm['fixed_field_key'];
echo htmlspecialchars($fixedFieldLabels[$fixedKey] ?? $fixedKey);
?></strong>
</td>
<td><?php echo htmlspecialchars($fm['data_type']); ?></td>
@@ -2192,6 +2196,10 @@ $apiSampleJson = $template['api_sample_json'] ?? '';
const tbody = document.querySelector('#fixedFieldsTable tbody');
if (!tbody) return;
const fixedFieldLabels = {
'ClienteAnalisi': 'Buyer'
};
const keysWithDropdown = [
'ClienteResponsabile',
'ClienteFornitore',
@@ -2223,7 +2231,7 @@ $apiSampleJson = $template['api_sample_json'] ?? '';
${parseInt(r.is_required) === 1 ? 'checked' : ''}>
</td>
<td><strong>${escapeHtml(r.fixed_field_key)}</strong></td>
<td><strong>${escapeHtml(fixedFieldLabels[r.fixed_field_key] || r.fixed_field_key)}</strong></td>
<td>${escapeHtml(r.data_type || '')}</td>