my $asofdate = shift;
return unless $asofdate;
- $asofdate = $::locale->parse_date_to_object(\%::myconfig, $asofdate);
+ $asofdate = $::locale->parse_date_to_object($asofdate);
my $form = $main::form;
my $dbh = $::form->get_standard_dbh;
# default.
my ($closedto) = selectfirst_array_query($form, $dbh, 'SELECT closedto FROM defaults');
if ($closedto) {
- $closedto = $::locale->parse_date_to_object(\%::myconfig, $closedto);
+ $closedto = $::locale->parse_date_to_object($closedto);
$closedto->subtract(years => 1) while ($asofdate - $closedto)->is_negative;
$closedto->add(days => 1);
};
my ($query, $startdate, $last_ob, $mindate);
- $query = qq|select max(transdate) from acc_trans where ob_transaction is true and transdate <= ?|;
+ $query = qq|select max(transdate) from acc_trans where ob_transaction is true and transdate <= ?|;
($last_ob) = selectrow_query($::form, $dbh, $query, $::locale->format_date(\%::myconfig, $asofdate));
- $last_ob = $::locale->parse_date_to_object(\%::myconfig, $last_ob) if $last_ob;
-
- $query = qq|select min(transdate) from acc_trans|;
+ $last_ob = $::locale->parse_date_to_object($last_ob) if $last_ob;
+
+ $query = qq|select min(transdate) from acc_trans|;
($mindate) = selectrow_query($::form, $dbh, $query);
- $mindate = $::locale->parse_date_to_object(\%::myconfig, $mindate);
+ $mindate = $::locale->parse_date_to_object($mindate);
# the default method is to use all transactions ($mindate)
return $::locale->format_date(\%::myconfig, $mindate);
};
-
-};
+
+};
sub balance_sheet {
$main::lxdebug->enter_sub();
$form->{period} = $form->{this_period} = conv_dateq($form->{asofdate});
}
- # get starting date for calculating balance
+ # get starting date for calculating balance
$form->{this_startdate} = get_balance_starting_date($form->{asofdate});
get_accounts($dbh, $last_period, $form->{this_startdate}, $form->{asofdate}, $form, \@categories);