Bugfix lager wert calculation of prices added geloescht != 1 and date range
This commit is contained in:
parent
5638f18770
commit
ecd86d120a
|
|
@ -451,7 +451,7 @@ class Lager extends GenLager {
|
||||||
FROM
|
FROM
|
||||||
einkaufspreise minek
|
einkaufspreise minek
|
||||||
WHERE
|
WHERE
|
||||||
einkaufspreise.artikel = minek.artikel AND DATE(
|
einkaufspreise.geloescht != 1 AND einkaufspreise.artikel = minek.artikel AND DATE(
|
||||||
REPLACE
|
REPLACE
|
||||||
(
|
(
|
||||||
COALESCE(gueltig_bis, '9999-12-31'),
|
COALESCE(gueltig_bis, '9999-12-31'),
|
||||||
|
|
@ -482,7 +482,17 @@ class Lager extends GenLager {
|
||||||
)
|
)
|
||||||
) >= DATE('".$datum."')
|
) >= DATE('".$datum."')
|
||||||
)
|
)
|
||||||
|
) AND DATE(
|
||||||
|
REPLACE
|
||||||
|
(
|
||||||
|
COALESCE(
|
||||||
|
einkaufspreise.gueltig_bis,
|
||||||
|
'9999-12-31'
|
||||||
|
),
|
||||||
|
'0000-00-00',
|
||||||
|
'9999-12-31'
|
||||||
)
|
)
|
||||||
|
) >= DATE('".$datum."')
|
||||||
GROUP BY
|
GROUP BY
|
||||||
artikel,
|
artikel,
|
||||||
waehrung
|
waehrung
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue