Revision c2796317
Von Bernd Bleßmann vor mehr als 11 Jahren hinzugefügt
SL/VK.pm | ||
---|---|---|
52 | 52 |
|
53 | 53 |
my $query = |
54 | 54 |
qq|SELECT ct.id as customerid, ct.name as customername,ct.customernumber,ct.country,ar.invnumber,ar.id,ar.transdate,p.partnumber,pg.partsgroup,i.parts_id,i.qty,i.price_factor,i.discount,i.description as description,i.lastcost,i.sellprice,i.fxsellprice,i.marge_total,i.marge_percent,i.unit,b.description as business,e.name as employee,e2.name as salesman, to_char(ar.transdate,'Month') as month, to_char(ar.transdate, 'YYYYMM') as nummonth, p.unit as parts_unit, p.weight | . |
55 |
qq|FROM invoice i | .
|
|
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) | . |
58 | 58 |
qq|LEFT JOIN partsgroup pg on (p.partsgroup_id = pg.id) | . |
... | ... | |
157 | 157 |
push(@values, $form->{"project_id"}, $form->{"project_id"}); |
158 | 158 |
} |
159 | 159 |
if ($form->{business_id}) { |
160 |
$where .= qq| AND ct.business_id = ? |;
|
|
160 |
$where .= qq| AND ct.business_id = ? |; |
|
161 | 161 |
push(@values, $form->{"business_id"}); |
162 | 162 |
} |
163 | 163 |
|
... | ... | |
179 | 179 |
$where .= qq| AND ($cvar_where_ic)|; |
180 | 180 |
push @values, @cvar_values_ic; |
181 | 181 |
} |
182 |
|
|
182 |
|
|
183 | 183 |
$query .= " WHERE $where ORDER BY $sortorder "; # LIMIT 5000"; |
184 | 184 |
|
185 | 185 |
my @result = selectall_hashref_query($form, $dbh, $query, @values); |
Auch abrufbar als: Unified diff
Kosmetik: Leerzeichen am Zeilenende weg.