summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LedgerSMB/AA.pm4
-rw-r--r--LedgerSMB/Form.pm2
2 files changed, 4 insertions, 2 deletions
diff --git a/LedgerSMB/AA.pm b/LedgerSMB/AA.pm
index 3e112e11..0834d255 100644
--- a/LedgerSMB/AA.pm
+++ b/LedgerSMB/AA.pm
@@ -746,10 +746,12 @@ sub transactions {
$table = 'ap';
$buysell = 'sell';
}
+ $form->{db_dateformat} = $myconfig->{dateformat};
( $form->{transdatefrom}, $form->{transdateto} ) =
$form->from_to( $form->{year}, $form->{month}, $form->{interval} )
- if $form->{year} && $form->{month};
+ if (($form->{year} && $form->{month}) &&
+ (!$form->{transdatefrom} && !$form->{transdateto}));
my @paidargs = ();
if ( $form->{outstanding} ) {
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index ff0166a1..05a23165 100644
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -3408,7 +3408,7 @@ sub from_to {
$t[3] = substr( "0$t[3]", -2 );
$t[5] += 1900;
- ( $self->format_date($fromdate), $self->format_date("$t[5]-$t[4]-$t[3]") );
+ return ( $self->format_date($fromdate), $self->format_date("$t[5]-$t[4]-$t[3]") );
}
=item $form->audittrail($dbh, $myconfig, $audittrail);