summaryrefslogtreecommitdiff
path: root/LedgerSMB/GL.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/GL.pm')
-rw-r--r--LedgerSMB/GL.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/LedgerSMB/GL.pm b/LedgerSMB/GL.pm
index 63201e69..9d30d604 100644
--- a/LedgerSMB/GL.pm
+++ b/LedgerSMB/GL.pm
@@ -272,9 +272,11 @@ sub all_transactions {
$apwhere .= " AND lower(ac.memo) LIKE $var";
}
- ( $form->{datefrom}, $form->{dateto} ) =
- $form->from_to( $form->{year}, $form->{month}, $form->{interval} )
- if $form->{year} && $form->{month};
+ if (!form->{datefrom} && !$form->{dateto}
+ && form->{year} && $form->{month}){
+ ( $form->{datefrom}, $form->{dateto} ) =
+ $form->from_to( $form->{year}, $form->{month}, $form->{interval} );
+ }
if ( $form->{datefrom} ) {
$glwhere .= " AND ac.transdate >= " . $dbh->quote( $form->{datefrom} );