phone as customerphone, fax as customerfax, ${ct}number,
"invnumber", "transdate",
(amount - COALESCE((SELECT sum(amount)*$ml FROM acc_trans WHERE chart_link ilike '%paid%' AND acc_trans.trans_id=${arap}.id AND acc_trans.transdate <= (date $todate)),0)) as "open", "amount",
- "duedate", invoice, ${arap}.id, date_part('days', now() - duedate) as overduedays,
+ "duedate", invoice, ${arap}.id, date_part('days', now() - duedate) as overduedays, datepaid,
(SELECT $buysell
FROM exchangerate
WHERE (${arap}.currency_id = exchangerate.currency_id)
my $report = SL::ReportGenerator->new(\%myconfig, $form);
- my @columns = qw(statement ct invnumber transdate duedate amount open);
-
+ my @columns = qw(statement ct invnumber transdate duedate amount open datepaid);
my %column_defs = (
'statement' => { raw_header_data => SL::Presenter::Tag::checkbox_tag("checkall", checkall => '[name^=statement_]'), 'visible' => $form->{ct} eq 'customer' ? 'HTML' : 0, align => "center" },
'ct' => { 'text' => $form->{ct} eq 'customer' ? $locale->text('Customer') : $locale->text('Vendor'), },
'duedate' => { 'text' => $locale->text('Due'), },
'amount' => { 'text' => $locale->text('Amount'), },
'open' => { 'text' => $locale->text('Open'), },
+ 'datepaid' => { 'text' => $locale->text('Date Paid'), visible => ($form->{reporttype} eq 'custom') },
);
my %column_alignment = ('statement' => 'center',