Revision 19edca65
Von Waldemar Toews vor fast 11 Jahren hinzugefügt
SL/CP.pm | ||
---|---|---|
147 | 147 |
|
148 | 148 |
my $buysell = $form->{vc} eq 'customer' ? "buy" : "sell"; |
149 | 149 |
my $arap = $form->{arap} eq "ar" ? "ar" : "ap"; |
150 |
|
|
151 |
my $whereinvoice = $form->{invnumber} ? qq| AND a.invnumber = '| . $form->{invnumber} . qq|' | : undef; |
|
150 | 152 |
|
151 | 153 |
my $query = |
152 | 154 |
qq|SELECT a.id, a.invnumber, a.transdate, a.amount, a.paid, cu.name AS curr | . |
153 | 155 |
qq|FROM $arap a | . |
154 | 156 |
qq|LEFT JOIN currencies cu ON (cu.id=a.currency_id)| . |
155 | 157 |
qq|WHERE (a.${vc}_id = ?) AND cu.name = ? AND NOT (a.amount = a.paid)| . |
158 |
$whereinvoice . |
|
156 | 159 |
qq|ORDER BY a.id|; |
160 |
|
|
157 | 161 |
my $sth = prepare_execute_query($form, $dbh, $query, |
158 | 162 |
conv_i($form->{"${vc}_id"}), |
159 | 163 |
"$form->{currency}"); |
Auch abrufbar als: Unified diff
Zahlungseingang: Filter für Rechnungsnummer angepasst.
Behebt #2098