mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-14 20:17:14 +01:00
fibu_buchungen add date limit (firmendaten)
This commit is contained in:
parent
8bdedcb72f
commit
46f9e0728d
@ -117357,12 +117357,12 @@
|
||||
{
|
||||
"name": "fibu_objekte",
|
||||
"type": "VIEW",
|
||||
"Create": "CREATE VIEW `fibu_objekte` AS select `auftrag`.`datum` AS `datum`,'auftrag' AS `typ`,`auftrag`.`id` AS `id`,`auftrag`.`belegnr` AS `info` from `auftrag` where `auftrag`.`belegnr` <> '' union select `rechnung`.`datum` AS `datum`,'rechnung' AS `typ`,`rechnung`.`id` AS `id`,`rechnung`.`belegnr` AS `info` from `rechnung` where `rechnung`.`belegnr` <> '' union select `gutschrift`.`datum` AS `datum`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id`,`gutschrift`.`belegnr` AS `belegnr` from `gutschrift` where `gutschrift`.`belegnr` <> '' union select `verbindlichkeit`.`rechnungsdatum` AS `rechnungsdatum`,'verbindlichkeit' AS `verbindlichkeit`,`verbindlichkeit`.`id` AS `id`,`verbindlichkeit`.`belegnr` AS `belegnr` from `verbindlichkeit` where `verbindlichkeit`.`belegnr` <> '' union select `kontoauszuege`.`buchung` AS `buchung`,'kontoauszuege' AS `kontoauszuege`,`kontoauszuege`.`id` AS `id`,concat(`konten`.`kurzbezeichnung`,' - ',`kontoauszuege`.`buchungstext`) AS `buchungstext` from (`kontoauszuege` left join `konten` on(`konten`.`id` = `kontoauszuege`.`konto`)) union select '' AS `datum`,'kontorahmen' AS `'kontorahmen'`,`kontorahmen`.`id` AS `id`,`kontorahmen`.`beschriftung` AS `beschriftung` from `kontorahmen`"
|
||||
"Create": "CREATE VIEW `fibu_objekte` AS select `fo`.`datum` AS `datum`,`fo`.`typ` AS `typ`,`fo`.`id` AS `id`,`fo`.`info` AS `info` from (select `auftrag`.`datum` AS `datum`,'auftrag' AS `typ`,`auftrag`.`id` AS `id`,`auftrag`.`belegnr` AS `info` from `auftrag` where `auftrag`.`belegnr` <> '' union select `rechnung`.`datum` AS `datum`,'rechnung' AS `typ`,`rechnung`.`id` AS `id`,`rechnung`.`belegnr` AS `info` from `rechnung` where `rechnung`.`belegnr` <> '' union select `gutschrift`.`datum` AS `datum`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id`,`gutschrift`.`belegnr` AS `belegnr` from `gutschrift` where `gutschrift`.`belegnr` <> '' union select `verbindlichkeit`.`rechnungsdatum` AS `rechnungsdatum`,'verbindlichkeit' AS `verbindlichkeit`,`verbindlichkeit`.`id` AS `id`,`verbindlichkeit`.`rechnung` AS `belegnr` from `verbindlichkeit` where `verbindlichkeit`.`belegnr` <> '' union select `kontoauszuege`.`buchung` AS `buchung`,'kontoauszuege' AS `kontoauszuege`,`kontoauszuege`.`id` AS `id`,concat(`konten`.`kurzbezeichnung`,' - ',`kontoauszuege`.`buchungstext`) AS `buchungstext` from (`kontoauszuege` left join `konten` on(`konten`.`id` = `kontoauszuege`.`konto`)) union select '' AS `datum`,'kontorahmen' AS `'kontorahmen'`,`kontorahmen`.`id` AS `id`,`kontorahmen`.`beschriftung` AS `beschriftung` from `kontorahmen`) `fo` where `fo`.`datum` >= (select `firmendaten_werte`.`wert` from `firmendaten_werte` where `firmendaten_werte`.`name` = 'fibu_buchungen_startdatum') or `fo`.`datum` = ''"
|
||||
},
|
||||
{
|
||||
"name": "fibu_buchungen_alle",
|
||||
"type": "VIEW",
|
||||
"Create": "CREATE VIEW `fibu_buchungen_alle` AS select `fb`.`buchungsart` AS `buchungsart`,`fb`.`typ` AS `typ`,`fb`.`id` AS `id`,if(`fibu_objekte`.`datum` <> '',`fibu_objekte`.`datum`,`fb`.`datum`) AS `datum`,`fb`.`gegen_typ` AS `doc_typ`,`fb`.`gegen_id` AS `doc_id`,`fibu_objekte`.`info` AS `doc_belegnr`,`fb`.`soll` AS `betrag`,`fb`.`waehrung` AS `waehrung`,`fb`.`edit_module` AS `edit_module`,`fb`.`edit_id` AS `edit_id` from ((select 'umsatz' AS `buchungsart`,'rechnung' AS `typ`,`rechnung`.`id` AS `id`,-`rechnung`.`soll` AS `soll`,`rechnung`.`waehrung` AS `waehrung`,'rechnung' AS `gegen_typ`,`rechnung`.`id` AS `gegen_id`,`rechnung`.`datum` AS `datum`,'rechnung' AS `edit_module`,`rechnung`.`id` AS `edit_id` from `rechnung` where `rechnung`.`belegnr` <> '' union select 'umsatz' AS `umsatz`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id`,`gutschrift`.`soll` AS `soll`,`gutschrift`.`waehrung` AS `waehrung`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id`,`gutschrift`.`datum` AS `datum`,'gutschrift' AS `edit_module`,`gutschrift`.`id` AS `id` from `gutschrift` where `gutschrift`.`belegnr` <> '' union select 'abbuchung' AS `abbuchung`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id`,-`gutschrift`.`soll` AS `-``openxe``.``gutschrift``.``soll```,`gutschrift`.`waehrung` AS `waehrung`,'rechnung' AS `rechnung`,`gutschrift`.`rechnungid` AS `rechnungid`,`gutschrift`.`datum` AS `datum`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id` from `gutschrift` where `gutschrift`.`rechnungid` > 0 and `gutschrift`.`belegnr` <> '' union select 'abbuchung' AS `abbuchung`,'rechnung' AS `rechnung`,`gutschrift`.`rechnungid` AS `rechnungid`,`gutschrift`.`soll` AS `soll`,`gutschrift`.`waehrung` AS `waehrung`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id`,`gutschrift`.`datum` AS `datum`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id` from `gutschrift` where `gutschrift`.`rechnungid` > 0 and `gutschrift`.`belegnr` <> '' union select 'aufwand' AS `aufwand`,'verbindlichkeit' AS `verbindlichkeit`,`verbindlichkeit`.`id` AS `id`,`verbindlichkeit`.`betrag` AS `betrag`,`verbindlichkeit`.`waehrung` AS `waehrung`,'verbindlichkeit' AS `verbindlichkeit`,`verbindlichkeit`.`id` AS `id`,`verbindlichkeit`.`rechnungsdatum` AS `rechnungsdatum`,'verbindlichkeit' AS `verbindlichkeit`,`verbindlichkeit`.`id` AS `id` from `verbindlichkeit` where `verbindlichkeit`.`belegnr` <> '' union select 'zahlung' AS `zahlung`,'kontoauszuege' AS `kontoauszuege`,`kontoauszuege`.`id` AS `id`,`kontoauszuege`.`soll` AS `soll`,`kontoauszuege`.`waehrung` AS `waehrung`,'kontoauszuege' AS `kontoauszuege`,`kontoauszuege`.`id` AS `id`,`kontoauszuege`.`buchung` AS `buchung`,'kontoauszuege' AS `kontoauszuege`,`kontoauszuege`.`id` AS `id` from `kontoauszuege` where `kontoauszuege`.`importfehler` is null union select 'abbuchung' AS `abbuchung`,`fibu_buchungen`.`von_typ` AS `von_typ`,`fibu_buchungen`.`von_id` AS `von_id`,`fibu_buchungen`.`betrag` AS `betrag`,`fibu_buchungen`.`waehrung` AS `waehrung`,`fibu_buchungen`.`nach_typ` AS `nach_typ`,`fibu_buchungen`.`nach_id` AS `nach_id`,`fibu_buchungen`.`zeit` AS `zeit`,'fibu_buchungen' AS `fibu_buchungen`,`fibu_buchungen`.`id` AS `id` from `fibu_buchungen` union select 'zubuchung' AS `zubuchung`,`fibu_buchungen`.`nach_typ` AS `nach_typ`,`fibu_buchungen`.`nach_id` AS `nach_id`,-`fibu_buchungen`.`betrag` AS `-``openxe``.``fibu_buchungen``.``betrag```,`fibu_buchungen`.`waehrung` AS `waehrung`,`fibu_buchungen`.`von_typ` AS `von_typ`,`fibu_buchungen`.`von_id` AS `von_id`,`fibu_buchungen`.`zeit` AS `zeit`,'fibu_buchungen' AS `fibu_buchungen`,`fibu_buchungen`.`id` AS `id` from `fibu_buchungen`) `fb` left join `fibu_objekte` on(`fb`.`gegen_typ` = `fibu_objekte`.`typ` and `fb`.`gegen_id` = `fibu_objekte`.`id`))"
|
||||
"Create": "CREATE VIEW `fibu_buchungen_alle` AS select `fb`.`buchungsart` AS `buchungsart`,`fb`.`typ` AS `typ`,`fb`.`id` AS `id`,if(`fibu_objekte`.`datum` <> '',`fibu_objekte`.`datum`,`fb`.`datum`) AS `datum`,`fb`.`gegen_typ` AS `doc_typ`,`fb`.`gegen_id` AS `doc_id`,`fibu_objekte`.`info` AS `doc_belegnr`,`fb`.`soll` AS `betrag`,`fb`.`waehrung` AS `waehrung`,`fb`.`edit_module` AS `edit_module`,`fb`.`edit_id` AS `edit_id` from ((select 'umsatz' AS `buchungsart`,'rechnung' AS `typ`,`rechnung`.`id` AS `id`,-`rechnung`.`soll` AS `soll`,`rechnung`.`waehrung` AS `waehrung`,'rechnung' AS `gegen_typ`,`rechnung`.`id` AS `gegen_id`,`rechnung`.`datum` AS `datum`,'rechnung' AS `edit_module`,`rechnung`.`id` AS `edit_id` from `rechnung` where `rechnung`.`belegnr` <> '' union select 'umsatz' AS `umsatz`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id`,`gutschrift`.`soll` AS `soll`,`gutschrift`.`waehrung` AS `waehrung`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id`,`gutschrift`.`datum` AS `datum`,'gutschrift' AS `edit_module`,`gutschrift`.`id` AS `id` from `gutschrift` where `gutschrift`.`belegnr` <> '' union select 'abbuchung' AS `abbuchung`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id`,-`gutschrift`.`soll` AS `-``openxe``.``gutschrift``.``soll```,`gutschrift`.`waehrung` AS `waehrung`,'rechnung' AS `rechnung`,`gutschrift`.`rechnungid` AS `rechnungid`,`gutschrift`.`datum` AS `datum`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id` from `gutschrift` where `gutschrift`.`rechnungid` > 0 and `gutschrift`.`belegnr` <> '' union select 'abbuchung' AS `abbuchung`,'rechnung' AS `rechnung`,`gutschrift`.`rechnungid` AS `rechnungid`,`gutschrift`.`soll` AS `soll`,`gutschrift`.`waehrung` AS `waehrung`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id`,`gutschrift`.`datum` AS `datum`,'gutschrift' AS `gutschrift`,`gutschrift`.`id` AS `id` from `gutschrift` where `gutschrift`.`rechnungid` > 0 and `gutschrift`.`belegnr` <> '' union select 'aufwand' AS `aufwand`,'verbindlichkeit' AS `verbindlichkeit`,`verbindlichkeit`.`id` AS `id`,`verbindlichkeit`.`betrag` AS `betrag`,`verbindlichkeit`.`waehrung` AS `waehrung`,'verbindlichkeit' AS `verbindlichkeit`,`verbindlichkeit`.`id` AS `id`,`verbindlichkeit`.`rechnungsdatum` AS `rechnungsdatum`,'verbindlichkeit' AS `verbindlichkeit`,`verbindlichkeit`.`id` AS `id` from `verbindlichkeit` where `verbindlichkeit`.`belegnr` <> '' union select 'zahlung' AS `zahlung`,'kontoauszuege' AS `kontoauszuege`,`kontoauszuege`.`id` AS `id`,`kontoauszuege`.`soll` AS `soll`,`kontoauszuege`.`waehrung` AS `waehrung`,'kontoauszuege' AS `kontoauszuege`,`kontoauszuege`.`id` AS `id`,`kontoauszuege`.`buchung` AS `buchung`,'kontoauszuege' AS `kontoauszuege`,`kontoauszuege`.`id` AS `id` from `kontoauszuege` where `kontoauszuege`.`importfehler` is null union select 'abbuchung' AS `abbuchung`,`fibu_buchungen`.`von_typ` AS `von_typ`,`fibu_buchungen`.`von_id` AS `von_id`,`fibu_buchungen`.`betrag` AS `betrag`,`fibu_buchungen`.`waehrung` AS `waehrung`,`fibu_buchungen`.`nach_typ` AS `nach_typ`,`fibu_buchungen`.`nach_id` AS `nach_id`,`fibu_buchungen`.`zeit` AS `zeit`,'fibu_buchungen' AS `fibu_buchungen`,`fibu_buchungen`.`id` AS `id` from `fibu_buchungen` union select 'zubuchung' AS `zubuchung`,`fibu_buchungen`.`nach_typ` AS `nach_typ`,`fibu_buchungen`.`nach_id` AS `nach_id`,-`fibu_buchungen`.`betrag` AS `-``openxe``.``fibu_buchungen``.``betrag```,`fibu_buchungen`.`waehrung` AS `waehrung`,`fibu_buchungen`.`von_typ` AS `von_typ`,`fibu_buchungen`.`von_id` AS `von_id`,`fibu_buchungen`.`zeit` AS `zeit`,'fibu_buchungen' AS `fibu_buchungen`,`fibu_buchungen`.`id` AS `id` from `fibu_buchungen`) `fb` left join `fibu_objekte` on(`fb`.`gegen_typ` = `fibu_objekte`.`typ` and `fb`.`gegen_id` = `fibu_objekte`.`id`)) where `fb`.`datum` >= (select `firmendaten_werte`.`wert` from `firmendaten_werte` where `firmendaten_werte`.`name` = 'fibu_buchungen_startdatum') and `fibu_objekte`.`datum` >= (select `firmendaten_werte`.`wert` from `firmendaten_werte` where `firmendaten_werte`.`name` = 'fibu_buchungen_startdatum')"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1101,6 +1101,23 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row-height">
|
||||
<div class="col-xs-12 col-md-6 col-md-height">
|
||||
<div class="inside inside-full-height">
|
||||
<fieldset>
|
||||
<legend>{|Finanzbuchhaltung Einstellungen|}</legend>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="300">Buchungen erzeugen ab Datum:</td><td colspan="3"><input type="text" id= "fibu_buchungen_startdatum" name="fibu_buchungen_startdatum" size="10" value="[FIBU_BUCHUNGEN_STARTDATUM]"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<fieldset><legend>Finanzbuchhaltung Export Kontenrahmen - Weitere Kostenarten</legend>
|
||||
<table>
|
||||
|
@ -136,7 +136,7 @@ class Fibu_buchungen {
|
||||
$groupby = "GROUP BY typ";
|
||||
$orderby = "ORDER BY typ";
|
||||
|
||||
// echo($sql." WHERE ".$where." ".$groupby);
|
||||
//echo($sql." WHERE ".$where." ".$groupby);
|
||||
|
||||
break;
|
||||
|
||||
@ -463,6 +463,7 @@ class Fibu_buchungen {
|
||||
);
|
||||
|
||||
$sql = "SELECT
|
||||
salden.datum,
|
||||
salden.typ,
|
||||
salden.id,
|
||||
salden.info,
|
||||
@ -476,6 +477,7 @@ class Fibu_buchungen {
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
".$this->app->erp->FormatDate("fb.datum")." as datum,
|
||||
fb.typ,
|
||||
fb.id,
|
||||
fo.info,
|
||||
@ -494,7 +496,7 @@ class Fibu_buchungen {
|
||||
fb.waehrung
|
||||
) salden
|
||||
LEFT JOIN fibu_objekte fo ON
|
||||
salden.info LIKE CONCAT('%', fo.info, '%') AND salden.typ <> fo.typ
|
||||
salden.info LIKE CONCAT('%', fo.info, '%') AND salden.typ <> fo.typ AND fo.info <> ''
|
||||
WHERE
|
||||
salden.saldonum <> 0
|
||||
LIMIT 100
|
||||
@ -508,7 +510,7 @@ class Fibu_buchungen {
|
||||
|
||||
$et = new EasyTable($this->app);
|
||||
|
||||
$et->headings = array('Typ','Info','Betrag','Buchbetrag','Zuordnung');
|
||||
$et->headings = array('Datum','Typ','Info','Betrag','Buchbetrag','Zuordnung');
|
||||
|
||||
foreach ($items as $item) {
|
||||
|
||||
@ -538,6 +540,7 @@ class Fibu_buchungen {
|
||||
}
|
||||
|
||||
$row = array(
|
||||
$item['datum'],
|
||||
ucfirst($item['typ']),
|
||||
$item['objektlink'],
|
||||
$item['saldo'],
|
||||
|
@ -1043,7 +1043,7 @@ class Firmendaten {
|
||||
'arbeitsnachweis_header','arbeitsnachweis_footer','provisionsgutschrift_header','provisionsgutschrift_footer','proformarechnung_header','proformarechnung_footer','eu_lieferung_vermerk','export_lieferung_vermerk'
|
||||
,'wareneingang_kamera_waage','layout_iconbar','passwort','host','port','mailssl','signatur','email','absendername','bcc1','bcc2','bcc3'
|
||||
,'firmenfarbe','name','strasse','plz','ort','steuernummer','projekt','steuer_positionen_export','tabsnavigationfarbe','tabsnavigationfarbeschrift'
|
||||
,"buchhaltung_berater","buchhaltung_mandant","buchhaltung_wj_beginn","buchhaltung_sachkontenlaenge"
|
||||
,"buchhaltung_berater","buchhaltung_mandant","buchhaltung_wj_beginn","buchhaltung_sachkontenlaenge", "fibu_buchungen_startdatum"
|
||||
);
|
||||
|
||||
if(isset($sql2a)){
|
||||
@ -1379,6 +1379,10 @@ class Firmendaten {
|
||||
}
|
||||
$this->app->YUI->AutoComplete('steuersatz_normal','steuersatz',1);
|
||||
$this->app->YUI->AutoComplete('steuersatz_ermaessigt','steuersatz',1);
|
||||
|
||||
|
||||
$this->app->YUI->DatePicker('fibu_buchungen_startdatum');
|
||||
|
||||
$this->app->Tpl->Parse('PAGE','firmendaten.tpl');
|
||||
}
|
||||
|
||||
@ -1842,6 +1846,11 @@ class Firmendaten {
|
||||
if(!empty($data[0]['taxfromdoctypesettings'])) {
|
||||
$this->app->Tpl->Set('OPTIONTAXFROMDOCTYPESETTINGS', ' selected="selected" ');
|
||||
}
|
||||
|
||||
// Fibu
|
||||
$this->app->Tpl->Set('FIBU_BUCHUNGEN_STARTDATUM', $this->app->erp->ReplaceDatum(false,$data[0]['fibu_buchungen_startdatum'],false));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -2282,6 +2291,8 @@ class Firmendaten {
|
||||
$data['buchhaltung_wj_beginn'] = ($this->app->Secure->POST["buchhaltung_wj_beginn"]);
|
||||
$data['buchhaltung_sachkontenlaenge'] = ($this->app->Secure->POST["buchhaltung_sachkontenlaenge"]);
|
||||
|
||||
$data['fibu_buchungen_startdatum'] = $this->app->erp->ReplaceDatum(true,$this->app->Secure->POST["fibu_buchungen_startdatum"],false);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user