Simplify configuration interface - Remove unnecessary fields
Configuration Interface Simplification: - Removed 'Libellé compte financier' (Account Label) field - Removed 'Taux TVA' (VAT Rate) field - Simplified form to focus on essential PCG account mapping only Enhanced User Experience: - Cleaner, more focused interface - Reduced complexity for users - Streamlined configuration process - Better visual layout with fewer columns Technical Updates: - Updated form headers to remove unnecessary columns - Simplified form submission handling - Removed unused variables (vat_rates) - Updated current configuration display - Cleaned up form field generation Configuration Focus: - Users only need to select PCG account codes - Account labels and VAT rates are not needed for basic mapping - Interface now shows: CA3 Line, Line Label, Description, PCG Accounts, Account Code - Current configuration shows: CA3 Line, Account Code, Status The configuration page is now simpler and more focused on the essential PCG account mapping!
This commit is contained in:
parent
d32433c2b6
commit
734a74c5f3
@ -38,11 +38,9 @@ if ($action == 'update_mappings') {
|
||||
|
||||
foreach ($ca3_definitions as $line => $definition) {
|
||||
$account_code = GETPOST('account_code_' . $line, 'alpha');
|
||||
$account_label = GETPOST('account_label_' . $line, 'alpha');
|
||||
$vat_rate = GETPOST('vat_rate_' . $line, 'alpha');
|
||||
|
||||
if (!empty($account_code)) {
|
||||
$config->updateAccountMapping($line, $account_code, $account_label, $vat_rate);
|
||||
$config->updateAccountMapping($line, $account_code, '', '');
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +56,6 @@ foreach ($mappings as $mapping) {
|
||||
|
||||
// Get available accounting accounts
|
||||
$accounts = $config->getAccountingAccounts();
|
||||
$vat_rates = $config->getVATRates();
|
||||
$ca3_definitions = $config->getCA3LineDefinitions();
|
||||
$section_headers = $config->getCA3SectionHeaders();
|
||||
|
||||
@ -110,8 +107,6 @@ foreach ($lines_by_section as $section_code => $lines) {
|
||||
print '<th>' . $langs->trans("Description") . '</th>';
|
||||
print '<th>' . $langs->trans("PCGAccounts") . '</th>';
|
||||
print '<th>' . $langs->trans("AccountCode") . '</th>';
|
||||
print '<th>' . $langs->trans("AccountLabel") . '</th>';
|
||||
print '<th>' . $langs->trans("VATRate") . '</th>';
|
||||
print '</tr>';
|
||||
|
||||
foreach ($lines as $line => $definition) {
|
||||
@ -131,15 +126,6 @@ foreach ($lines_by_section as $section_code => $lines) {
|
||||
}
|
||||
print '</select>';
|
||||
print '</td>';
|
||||
print '<td><input type="text" name="account_label_' . $line . '" value="' . (isset($mapping['account_label']) ? $mapping['account_label'] : '') . '" class="flat" size="30"></td>';
|
||||
print '<td>';
|
||||
print '<select name="vat_rate_' . $line . '" class="flat">';
|
||||
foreach ($vat_rates as $rate => $label) {
|
||||
$selected = (isset($mapping['vat_rate']) && $mapping['vat_rate'] == $rate) ? 'selected' : '';
|
||||
print '<option value="' . $rate . '" ' . $selected . '>' . $label . '</option>';
|
||||
}
|
||||
print '</select>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -182,8 +168,6 @@ if (empty($mappings)) {
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th>' . $langs->trans("CA3Line") . '</th>';
|
||||
print '<th>' . $langs->trans("AccountCode") . '</th>';
|
||||
print '<th>' . $langs->trans("AccountLabel") . '</th>';
|
||||
print '<th>' . $langs->trans("VATRate") . '</th>';
|
||||
print '<th>' . $langs->trans("Status") . '</th>';
|
||||
print '</tr>';
|
||||
|
||||
@ -191,8 +175,6 @@ if (empty($mappings)) {
|
||||
print '<tr>';
|
||||
print '<td><strong>' . $mapping['ca3_line'] . '</strong></td>';
|
||||
print '<td>' . $mapping['account_code'] . '</td>';
|
||||
print '<td>' . $mapping['account_label'] . '</td>';
|
||||
print '<td>' . $mapping['vat_rate'] . '%</td>';
|
||||
print '<td>' . ($mapping['is_active'] ? $langs->trans("Active") : $langs->trans("Inactive")) . '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user