Add more debugging and fix form field for VAT refund threshold

This commit is contained in:
Frank Cools 2025-10-08 16:36:07 +02:00
parent 181e3d7d74
commit eeb7ae6948

View File

@ -89,6 +89,10 @@ if ($action == 'update_journal_config') {
// Handle VAT refund threshold configuration updates
if ($action == 'update_vat_refund_threshold') {
// Debug: Log all POST data
error_log("VAT Refund Threshold Debug - All POST data:");
error_log("POST data: " . print_r($_POST, true));
$threshold_config = array(
'refund_threshold' => GETPOST('vat_refund_threshold', 'float'),
'refund_threshold_enabled' => GETPOST('vat_refund_threshold_enabled', 'int')
@ -628,7 +632,7 @@ print '</div>';
print '<td><strong>' . $langs->trans("VATRefundThreshold") . '</strong></td>';
print '<td>';
print '<small>' . $langs->trans("VATRefundThresholdHelp") . '</small><br>';
print '<input type="number" name="vat_refund_threshold" value="' . $threshold_config['refund_threshold'] . '" step="0.01" min="0" class="minwidth200">';
print '<input type="number" name="vat_refund_threshold" id="vat_refund_threshold" value="' . $threshold_config['refund_threshold'] . '" step="0.01" min="0" class="minwidth200" required>';
print '</td>';
print '</tr>';