Revision 1c77d03f
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
| SL/LiquidityProjection.pm | ||
|---|---|---|
|
LEFT JOIN buchungsgruppen bg ON (p.buchungsgruppen_id = bg.id)
|
||
|
LEFT JOIN partsgroup pg ON (p.partsgroup_id = pg.id)
|
||
|
LEFT JOIN employee e ON (COALESCE(oe.salesman_id, oe.employee_id) = e.id)
|
||
|
WHERE (oe.customer_id IS NOT NULL)
|
||
|
AND NOT COALESCE(oe.quotation, FALSE)
|
||
|
WHERE oe.record_type = 'sales_order'
|
||
|
AND NOT COALESCE(oe.closed, FALSE)
|
||
|
AND (oe.id NOT IN (SELECT oe_id FROM periodic_invoices_configs WHERE periodicity <> 'o'))
|
||
|
SQL
|
||
| ... | ... | |
|
}
|
||
|
|
||
|
my @where = (
|
||
|
'!customer_id' => undef,
|
||
|
or => [ quotation => undef, quotation => 0, ],
|
||
|
record_type => 'sales_order',
|
||
|
or => [ closed => undef, closed => 0, ],
|
||
|
);
|
||
|
push @where, (reqdate => { ge => $params{after}->clone }) if $params{after};
|
||
Auch abrufbar als: Unified diff
Angebotsflag/Intakeflag aus Datenbankzugriffen entfernt