mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
Buchhaltung Export verbindlichkeit rechnungsdatum + bugfix consistency
This commit is contained in:
parent
226a2dffdf
commit
e9cec0ce30
@ -471,7 +471,7 @@ class Exportbuchhaltung
|
|||||||
'kennzeichen_negativ' => 'S',
|
'kennzeichen_negativ' => 'S',
|
||||||
'field_belegnr' => 'b.rechnung',
|
'field_belegnr' => 'b.rechnung',
|
||||||
'field_name' => 'a.name',
|
'field_name' => 'a.name',
|
||||||
'field_date' => 'eingangsdatum',
|
'field_date' => 'rechnungsdatum',
|
||||||
'field_auftrag' => 'b.auftrag',
|
'field_auftrag' => 'b.auftrag',
|
||||||
'field_kontonummer' => 'a.lieferantennummer_buchhaltung',
|
'field_kontonummer' => 'a.lieferantennummer_buchhaltung',
|
||||||
'field_kundennummer' => 'a.lieferantennummer',
|
'field_kundennummer' => 'a.lieferantennummer',
|
||||||
@ -503,9 +503,9 @@ class Exportbuchhaltung
|
|||||||
".$typ['field_gegenkonto']." as gegenkonto,
|
".$typ['field_gegenkonto']." as gegenkonto,
|
||||||
p.waehrung as pos_waehrung
|
p.waehrung as pos_waehrung
|
||||||
FROM
|
FROM
|
||||||
|
".$typ['typ']." b
|
||||||
|
LEFT JOIN
|
||||||
".$typ['subtable']." p
|
".$typ['subtable']." p
|
||||||
INNER JOIN
|
|
||||||
".$typ['typ']." b
|
|
||||||
ON
|
ON
|
||||||
b.id = p.".$typ['typ']."
|
b.id = p.".$typ['typ']."
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
@ -514,11 +514,11 @@ class Exportbuchhaltung
|
|||||||
b.".$typ['field_date']." BETWEEN '".date_format($von,"Y-m-d")."' AND '".date_format($bis,"Y-m-d")."' AND (b.projekt=$projekt OR $projekt=0)".$typ['condition_where'];
|
b.".$typ['field_date']." BETWEEN '".date_format($von,"Y-m-d")."' AND '".date_format($bis,"Y-m-d")."' AND (b.projekt=$projekt OR $projekt=0)".$typ['condition_where'];
|
||||||
|
|
||||||
// Check consistency of positions
|
// Check consistency of positions
|
||||||
|
|
||||||
$sql_check = "SELECT *
|
$sql_check = "SELECT *
|
||||||
FROM
|
FROM
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
belegnr,
|
belegnr,
|
||||||
betrag_gesamt,
|
betrag_gesamt,
|
||||||
ROUND(SUM(betrag),2) AS betrag_summe
|
ROUND(SUM(betrag),2) AS betrag_summe
|
||||||
@ -527,8 +527,8 @@ class Exportbuchhaltung
|
|||||||
GROUP BY
|
GROUP BY
|
||||||
belegnr
|
belegnr
|
||||||
) summen
|
) summen
|
||||||
WHERE betrag_gesamt <> betrag_summe";
|
WHERE betrag_gesamt <> betrag_summe OR betrag_summe IS NULL";
|
||||||
|
|
||||||
$result = $this->app->DB->SelectArr($sql_check);
|
$result = $this->app->DB->SelectArr($sql_check);
|
||||||
if (!empty($result)) {
|
if (!empty($result)) {
|
||||||
$e = new ConsistencyException(ucfirst($typ['typ']),$result);
|
$e = new ConsistencyException(ucfirst($typ['typ']),$result);
|
||||||
|
Loading…
Reference in New Issue
Block a user