Revision 7e4b86b1
Von G. Richardson vor mehr als 13 Jahren hinzugefügt
SL/VK.pm | ||
---|---|---|
51 | 51 |
my @values; |
52 | 52 |
|
53 | 53 |
my $query = |
54 |
qq|SELECT cus.name,ar.invnumber,ar.id,ar.transdate,p.partnumber,i.parts_id,i.qty,i.price_factor,i.discount,i.description,i.lastcost,i.sellprice,i.marge_total,i.marge_percent,i.unit | . |
|
54 |
qq|SELECT cus.name,cus.customernumber,ar.invnumber,ar.id,ar.transdate,p.partnumber,i.parts_id,i.qty,i.price_factor,i.discount,i.description,i.lastcost,i.sellprice,i.marge_total,i.marge_percent,i.unit | .
|
|
55 | 55 |
qq|FROM invoice i | . |
56 | 56 |
qq|join ar on (i.trans_id = ar.id) | . |
57 | 57 |
qq|join parts p on (i.parts_id = p.id) | . |
... | ... | |
71 | 71 |
$where .= " AND ar.customer_id = ?"; |
72 | 72 |
push(@values, $form->{customer_id}); |
73 | 73 |
}; |
74 |
if ($form->{customernumber}) { |
|
75 |
$where .= qq| AND cus.customernumber = ? |; |
|
76 |
push(@values, $form->{customernumber}); |
|
77 |
} |
|
74 | 78 |
if ($form->{partnumber}) { |
75 | 79 |
$where .= qq| AND (p.partnumber ILIKE ?)|; |
76 | 80 |
push(@values, '%' . $form->{partnumber} . '%'); |
Auch abrufbar als: Unified diff
VK Bericht um Filter nach Kundennummer erweitert
Kundennummer kann zusätzlich als Spalte ausgegeben werden.