* Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2024 Frédéric France * Copyright (C) 2026 Eduard Wisch * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * \file steuer/steuerindex.php * \ingroup steuer * \brief EÜR Übersicht - Einnahmen-Überschuss-Rechnung für Deutschland */ // Load Dolibarr environment $res = 0; if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; } $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; } if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; } if (!$res && file_exists("../main.inc.php")) { $res = @include "../main.inc.php"; } if (!$res && file_exists("../../main.inc.php")) { $res = @include "../../main.inc.php"; } if (!$res && file_exists("../../../main.inc.php")) { $res = @include "../../../main.inc.php"; } if (!$res) { die("Include of main fails"); } require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; dol_include_once('/steuer/class/euer.class.php'); /** * @var Conf $conf * @var DoliDB $db * @var HookManager $hookmanager * @var Translate $langs * @var User $user */ // Load translation files required by the page $langs->loadLangs(array("steuer@steuer", "bills", "compta")); $action = GETPOST('action', 'aZ09'); $jahr = GETPOSTINT('jahr'); if (empty($jahr)) { $jahr = date('Y'); } $monat = GETPOSTINT('monat'); $now = dol_now(); // Security check $socid = GETPOSTINT('socid'); if (!empty($user->socid) && $user->socid > 0) { $action = ''; $socid = $user->socid; } /* * Actions */ // None /* * View */ $form = new Form($db); $formfile = new FormFile($db); $euer = new EUeR($db); // Berechne EÜR if ($monat > 0) { $euer->berechneAusDolibarr($jahr, $monat, $monat); $periode_text = $langs->trans("Month")." ".dol_print_date(mktime(0, 0, 0, $monat, 1, $jahr), '%B %Y'); } else { $euer->berechneAusDolibarr($jahr); $periode_text = $langs->trans("Year")." ".$jahr; } llxHeader("", $langs->trans("EUeRUebersicht"), '', '', 0, 0, '', '', '', 'mod-steuer page-index'); print load_fiche_titre($langs->trans("EUeRUebersicht")." - ".$periode_text, '', 'steuer.png@steuer'); // Filter-Formular print '
'; print ''; print '
'; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print '
'.$langs->trans("Period").''.$langs->trans("Year").''.$langs->trans("Month").'
'.$langs->trans("SelectPeriod").''; print ''; print ''; print ''; print ''; print ''; print '
'; print '
'; print '
'; print '
'; // Schnellzugriff-Links print '
'; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print '
'.$langs->trans("QuickAccess").'
'.$langs->trans("Buchungen").''.$langs->trans("NeueBuchung").''.$langs->trans("AnlageEUeR").''.$langs->trans("UStVA").'
'.$langs->trans("Gewerbesteuer").''.$langs->trans("WISOExport").''.$langs->trans("Kontenplan").'
'; print '
'; print '
'; print '
'; // EÜR Übersicht - Einnahmen print ''; print ''; print ''; print ''; print ''; if (!empty($euer->einnahmen)) { foreach ($euer->einnahmen as $key => $einnahme) { print ''; print ''; print ''; print ''; } } print ''; print ''; print ''; print ''; print '
'.$langs->trans("Einnahmen").''.$langs->trans("Amount").'
'.$einnahme['bezeichnung'].''.price($einnahme['netto'], 0, $langs, 1, 2, 2, 'EUR').'
'.$langs->trans("TotalEinnahmen").''.price($euer->summe_einnahmen, 0, $langs, 1, 2, 2, 'EUR').'
'; print '
'; // USt/VSt Übersicht print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; $zahllast = $euer->ust_summe - $euer->vst_summe; $color = $zahllast >= 0 ? '' : 'amountremaintopay'; print ''; print ''; print '
'.$langs->trans("UmsatzsteuerVorsteuer").'
'.$langs->trans("UmsatzsteuerGesamt").''.price($euer->ust_summe, 0, $langs, 1, 2, 2, 'EUR').'
'.$langs->trans("VorsteuerGesamt").''.price($euer->vst_summe, 0, $langs, 1, 2, 2, 'EUR').'
'.$langs->trans("Zahllast").''.price($zahllast, 0, $langs, 1, 2, 2, 'EUR').'
'; print '
'; // EÜR Übersicht - Ausgaben print ''; print ''; print ''; print ''; print ''; if (!empty($euer->ausgaben)) { foreach ($euer->ausgaben as $key => $ausgabe) { print ''; print ''; print ''; print ''; } } print ''; print ''; print ''; print ''; print '
'.$langs->trans("Ausgaben").''.$langs->trans("Amount").'
'.$ausgabe['bezeichnung'].''.price($ausgabe['netto'], 0, $langs, 1, 2, 2, 'EUR').'
'.$langs->trans("TotalAusgaben").''.price($euer->summe_ausgaben, 0, $langs, 1, 2, 2, 'EUR').'
'; print '
'; // Gewinn/Verlust Box print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; $color = $euer->gewinn >= 0 ? 'amountpaymentcomplete' : 'amountremaintopay'; print ''; print ''; print ''; print '
'.$langs->trans("ErgebnisEUeR").'
'.$langs->trans("Einnahmen").''.price($euer->summe_einnahmen, 0, $langs, 1, 2, 2, 'EUR').'
'.$langs->trans("Ausgaben").'- '.price($euer->summe_ausgaben, 0, $langs, 1, 2, 2, 'EUR').'
'.($euer->gewinn >= 0 ? $langs->trans("Gewinn") : $langs->trans("Verlust")).''.price($euer->gewinn, 0, $langs, 1, 2, 2, 'EUR').'
'; print '
'; print '
'; // End of page llxFooter(); $db->close();