my $query =
qq|SELECT a.id, a.invnumber, a.transdate, a.duedate, a.amount, a.paid, | .
qq| a.ordnumber, v.name, a.invoice, a.netamount, a.datepaid, a.notes, | .
- qq| a.globalproject_id, a.storno, a.storno_id, | .
+ qq| a.globalproject_id, a.storno, a.storno_id, a.direct_debit, | .
qq| pr.projectnumber AS globalprojectnumber, | .
qq| e.name AS employee, | .
qq| v.vendornumber, v.country, v.ustid, | .
my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC';
my $sortorder = join(', ', map { "$_ $sortdir" } @a);
- if (grep({ $_ eq $form->{sort} } qw(transdate id invnumber ordnumber name netamount tax amount paid datepaid due duedate notes employee transaction_description))) {
+ if (grep({ $_ eq $form->{sort} } qw(transdate id invnumber ordnumber name netamount tax amount paid datepaid due duedate notes employee transaction_description direct_debit))) {
$sortorder = $form->{sort} . " $sortdir";
}
my @columns =
qw(transdate id type invnumber ordnumber name netamount tax amount paid datepaid
due duedate transaction_description notes employee globalprojectnumber
- vendornumber country ustid taxzone payment_terms charts);
+ vendornumber country ustid taxzone payment_terms charts direct_debit);
my @hidden_variables = map { "l_${_}" } @columns;
push @hidden_variables, "l_subtotal", qw(open closed vendor invnumber ordnumber transaction_description notes project_id transdatefrom transdateto department);
'taxzone' => { 'text' => $locale->text('Steuersatz'), },
'payment_terms' => { 'text' => $locale->text('Payment Terms'), },
'charts' => { 'text' => $locale->text('Buchungskonto'), },
+ 'direct_debit' => { 'text' => $locale->text('direct debit'), },
);
- foreach my $name (qw(id transdate duedate invnumber ordnumber name datepaid employee shippingpoint shipvia transaction_description)) {
+ foreach my $name (qw(id transdate duedate invnumber ordnumber name datepaid employee shippingpoint shipvia transaction_description direct_debit)) {
my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir};
$column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir";
}
: $locale->text("AP Transaction (abbreviation)");
}
+ $ap->{direct_debit} = $ap->{direct_debit} ? $::locale->text('yes') : $::locale->text('no');
+
my $row = { };
foreach my $column (@columns) {
<td nowrap>[% 'Payment Terms' | $T8 %]</td>
<td align=right><input name="l_charts" class=checkbox type=checkbox value=Y></td>
<td nowrap>[% 'Buchungskonto' | $T8 %]</td>
+ <td align=right><input name="l_direct_debit" id="l_direct_debit" class=checkbox type=checkbox value=Y></td>
+ <td nowrap>[% 'direct debit' | $T8 %]</td>
</tr>
<tr>
<td colspan=4 align=left><b>[% 'Vendor' | $T8 %] </td>