Remove period name text and show only date range

UI Cleanup:
- Removed 'Custom Period' text since we don't use periods
- Period column now shows only the date range directly
- Cleaner, more direct display of declaration dates
- No unnecessary period terminology

The period column now shows just the date range without any period references.
This commit is contained in:
Frank Cools 2025-10-02 20:09:51 +02:00
parent cbf3e12876
commit 8ca44e5486

View File

@ -84,10 +84,9 @@ $sql = "SELECT d.*, p.period_name, p.start_date as period_start_date, p.end_date
$result = $db->query($sql);
if ($result) {
while ($obj = $db->fetch_object($result)) {
// Use declaration's own dates if period is not available
// Use declaration's own dates
$start_date = $obj->start_date ? $obj->start_date : $obj->period_start_date;
$end_date = $obj->end_date ? $obj->end_date : $obj->period_end_date;
$period_name = $obj->period_name ? $obj->period_name : 'Custom Period';
$declarations[] = array(
'rowid' => $obj->rowid,
@ -98,7 +97,6 @@ if ($result) {
'net_vat_due' => $obj->net_vat_due,
'vat_credit' => $obj->vat_credit,
'created_date' => $obj->created_date,
'period_name' => $period_name,
'start_date' => $start_date,
'end_date' => $end_date
);
@ -131,7 +129,7 @@ if (empty($declarations)) {
foreach ($declarations as $d) {
print '<tr>';
print '<td>' . $d['declaration_number'] . '</td>';
print '<td>' . $d['period_name'] . '<br><small>' . dol_print_date($d['start_date'], 'day') . ' - ' . dol_print_date($d['end_date'], 'day') . '</small></td>';
print '<td>' . dol_print_date($d['start_date'], 'day') . ' - ' . dol_print_date($d['end_date'], 'day') . '</td>';
print '<td>' . $langs->trans("Status" . ucfirst($d['status'])) . '</td>';
print '<td>' . price($d['net_vat_due']) . '</td>';
print '<td>';