Revision 32e816b5
Von Bernd Bleßmann vor mehr als 9 Jahren hinzugefügt
SL/CT.pm | ||
---|---|---|
78 | 78 |
"discount" => "ct.discount", |
79 | 79 |
"insertdate" => "ct.itime", |
80 | 80 |
"salesman" => "e.name", |
81 |
"payment" => "pt.description" |
|
81 |
"payment" => "pt.description", |
|
82 |
"pricegroup" => "pg.pricegroup", |
|
82 | 83 |
); |
83 | 84 |
|
84 | 85 |
$form->{sort} ||= "name"; |
... | ... | |
213 | 214 |
push @values, $form->{addr_zipcode} . '%'; |
214 | 215 |
} |
215 | 216 |
|
217 |
my $pg_select = $form->{l_pricegroup} ? qq|, pg.pricegroup as pricegroup | : ''; |
|
218 |
my $pg_join = $form->{l_pricegroup} ? qq|LEFT JOIN pricegroup pg ON (ct.klass = pg.id) | : ''; |
|
216 | 219 |
my $query = |
217 | 220 |
qq|SELECT ct.*, ct.itime::DATE AS insertdate, b.description AS business, e.name as salesman, | . |
218 | 221 |
qq| pt.description as payment | . |
222 |
$pg_select . |
|
219 | 223 |
(qq|, NULL AS invnumber, NULL AS ordnumber, NULL AS quonumber, NULL AS invid, NULL AS module, NULL AS formtype, NULL AS closed | x!! $join_records) . |
220 | 224 |
qq|FROM $cv ct | . |
221 | 225 |
qq|LEFT JOIN business b ON (ct.business_id = b.id) | . |
222 | 226 |
qq|LEFT JOIN employee e ON (ct.salesman_id = e.id) | . |
223 | 227 |
qq|LEFT JOIN payment_terms pt ON (ct.payment_id = pt.id) | . |
228 |
$pg_join . |
|
224 | 229 |
qq|WHERE $where|; |
225 | 230 |
|
226 | 231 |
my @saved_values = @values; |
Auch abrufbar als: Unified diff
Preisgruppe bei Stammdaten->Berichte->Kunden anzeigen lassen können.
Conflicts: