Revision 29e70d36
Von Jan Büren vor mehr als 3 Jahren hinzugefügt
SL/RP.pm | ||
---|---|---|
832 | 832 |
if ($form->{fromdate} || $form->{todate}) { |
833 | 833 |
if ($form->{fromdate}) { |
834 | 834 |
$fromdate = conv_dateq($form->{fromdate}); |
835 |
my $fiscal_year_startdate = conv_dateq($self->get_balance_starting_date($form->{fromdate})); |
|
836 |
# my $date_trunc = "(select date_trunc('year', date $fromdate))"; |
|
835 | 837 |
$tofrom .= " AND (ac.transdate >= $fromdate)"; |
836 | 838 |
$subwhere .= " AND (ac.transdate >= $fromdate)"; |
837 |
$sumsubwhere .= " AND (ac.transdate >= (select date_trunc('year', date $fromdate))) ";
|
|
838 |
$saldosubwhere .= " AND (ac.transdate >= (select date_trunc('year', date $fromdate))) ";
|
|
839 |
$sumsubwhere .= " AND (ac.transdate >= $fiscal_year_startdate) ";
|
|
840 |
$saldosubwhere .= " AND (ac.transdate >= $fiscal_year_startdate) ";
|
|
839 | 841 |
$invwhere .= " AND (a.transdate >= $fromdate)"; |
840 |
$glsaldowhere .= " AND (ac.transdate >= (select date_trunc('year', date $fromdate))) ";
|
|
842 |
$glsaldowhere .= " AND (ac.transdate >= $fiscal_year_startdate) ";
|
|
841 | 843 |
$glwhere = " AND (ac.transdate >= $fromdate)"; |
842 |
$glsumwhere = " AND (ac.transdate >= (select date_trunc('year', date $fromdate))) ";
|
|
844 |
$glsumwhere = " AND (ac.transdate >= $fiscal_year_startdate) ";
|
|
843 | 845 |
} |
844 | 846 |
if ($form->{todate}) { |
845 | 847 |
$todate = conv_dateq($form->{todate}); |
Auch abrufbar als: Unified diff
Idee für redmine #117
SuSa->Auswahl freier Zeitraum. Fiscal Year anstatt date_trunc
für bessere Auswertungen bei abweichendem Wirtschaftsjahr