Revision db3dfa92
Von Sven Schöling vor etwa 7 Jahren hinzugefügt
SL/AR.pm | ||
---|---|---|
599 | 599 |
push @values, like($form->{parts_description}); |
600 | 600 |
} |
601 | 601 |
|
602 |
if ($form->{show_marked_as_closed}) { |
|
603 |
$query .= ' |
|
604 |
LEFT JOIN ( |
|
605 |
SELECT SUM(acc_trans.amount) AS amount, trans_id |
|
606 |
FROM acc_trans |
|
607 |
LEFT JOIN chart ON chart.id = chart_id |
|
608 |
WHERE chart.link ILIKE ? |
|
609 |
GROUP BY trans_id |
|
610 |
) AS paid_difference ON (paid_difference.trans_id = a.id) |
|
611 |
'; |
|
612 |
unshift @values, '%AR_paid%'; |
|
613 |
$where .= ' AND COALESCE(paid_difference.amount, 0) + a.paid != 0'; |
|
614 |
} |
|
615 |
|
|
602 | 616 |
my ($cvar_where, @cvar_values) = CVar->build_filter_query('module' => 'CT', |
603 | 617 |
'trans_id_field' => 'c.id', |
604 | 618 |
'filter' => $form, |
Auch abrufbar als: Unified diff
Rechnungen: Nach »als geschlossen markiert« suchen