Revision 59ab5cb4
Von Bernd Bleßmann vor mehr als 9 Jahren hinzugefügt
SL/CT.pm | ||
---|---|---|
240 | 240 |
$query .= |
241 | 241 |
qq| UNION | . |
242 | 242 |
qq|SELECT ct.*, ct.itime::DATE AS insertdate, b.description AS business, e.name as salesman, | . |
243 |
qq| pt.description as payment, | . |
|
244 |
qq| a.invnumber, a.ordnumber, a.quonumber, a.id AS invid, | . |
|
243 |
qq| pt.description as payment | . |
|
244 |
$pg_select . |
|
245 |
qq|, a.invnumber, a.ordnumber, a.quonumber, a.id AS invid, | . |
|
245 | 246 |
qq| '$module' AS module, 'invoice' AS formtype, | . |
246 | 247 |
qq| (a.amount = a.paid) AS closed | . |
247 | 248 |
qq|FROM $cv ct | . |
... | ... | |
249 | 250 |
qq|LEFT JOIN business b ON (ct.business_id = b.id) | . |
250 | 251 |
qq|LEFT JOIN employee e ON (ct.salesman_id = e.id) | . |
251 | 252 |
qq|LEFT JOIN payment_terms pt ON (ct.payment_id = pt.id) | . |
253 |
$pg_join . |
|
252 | 254 |
qq|WHERE $where AND (a.invoice = '1')|; |
253 | 255 |
} |
254 | 256 |
|
... | ... | |
257 | 259 |
$query .= |
258 | 260 |
qq| UNION | . |
259 | 261 |
qq|SELECT ct.*, ct.itime::DATE AS insertdate, b.description AS business, e.name as salesman, | . |
260 |
qq| pt.description as payment, | . |
|
261 |
qq| ' ' AS invnumber, o.ordnumber, o.quonumber, o.id AS invid, | . |
|
262 |
qq| pt.description as payment | . |
|
263 |
$pg_select . |
|
264 |
qq|, ' ' AS invnumber, o.ordnumber, o.quonumber, o.id AS invid, | . |
|
262 | 265 |
qq| 'oe' AS module, 'order' AS formtype, o.closed | . |
263 | 266 |
qq|FROM $cv ct | . |
264 | 267 |
qq|JOIN oe o ON (o.${cv}_id = ct.id) | . |
265 | 268 |
qq|LEFT JOIN business b ON (ct.business_id = b.id) | . |
266 | 269 |
qq|LEFT JOIN employee e ON (ct.salesman_id = e.id) | . |
267 | 270 |
qq|LEFT JOIN payment_terms pt ON (ct.payment_id = pt.id) | . |
271 |
$pg_join . |
|
268 | 272 |
qq|WHERE $where AND (o.quotation = '0')|; |
269 | 273 |
} |
270 | 274 |
|
... | ... | |
273 | 277 |
$query .= |
274 | 278 |
qq| UNION | . |
275 | 279 |
qq|SELECT ct.*, ct.itime::DATE AS insertdate, b.description AS business, e.name as salesman, | . |
276 |
qq| pt.description as payment, | . |
|
277 |
qq| ' ' AS invnumber, o.ordnumber, o.quonumber, o.id AS invid, | . |
|
280 |
qq| pt.description as payment | . |
|
281 |
$pg_select . |
|
282 |
qq|, ' ' AS invnumber, o.ordnumber, o.quonumber, o.id AS invid, | . |
|
278 | 283 |
qq| 'oe' AS module, 'quotation' AS formtype, o.closed | . |
279 | 284 |
qq|FROM $cv ct | . |
280 | 285 |
qq|JOIN oe o ON (o.${cv}_id = ct.id) | . |
281 | 286 |
qq|LEFT JOIN business b ON (ct.business_id = b.id) | . |
282 | 287 |
qq|LEFT JOIN employee e ON (ct.salesman_id = e.id) | . |
283 | 288 |
qq|LEFT JOIN payment_terms pt ON (ct.payment_id = pt.id) | . |
289 |
$pg_join . |
|
284 | 290 |
qq|WHERE $where AND (o.quotation = '1')|; |
285 | 291 |
} |
286 | 292 |
} |
Auch abrufbar als: Unified diff
Kundenbericht: Fehler beim Anzeigen von Preisgruppen behoben.
Der Fehler trat auf, wenn Preisgruppen mit Belegen angezeigt werden sollten.
Bugfix zu: Preisgruppe bei Stammdaten->Berichte->Kunden anzeigen lassen können.