Zum Inhalt springen

Vorlage:BookingsTotal: Unterschied zwischen den Versionen

Aus WeihnachtsRechnungen
Keine Bearbeitungszusammenfassung
 
Keine Bearbeitungszusammenfassung
Markierung: Zurückgesetzt
Zeile 12: Zeile 12:
     {{#if:  
     {{#if:  
       {{#cargo_query: tables=bookings | fields=COUNT(*)
       {{#cargo_query: tables=bookings | fields=COUNT(*)
         | where={{#if:{{{pick|}}} | {{{pick}}} AND }} itemtype="Einnahme" | no html }}
         | where=1=1 {{#if:{{{pick|}}} | {{{pick}}} AND }} itemtype="Einnahme" | no html }}
       | {{CleanNumber|{{#cargo_query: tables=bookings | fields=COUNT(*)
       | {{CleanNumber|{{#cargo_query: tables=bookings | fields=COUNT(*)
           | where={{#if:{{{pick|}}} | {{{pick}}} AND }} itemtype="Einnahme" | no html }}  }}
           | where=1=1 {{#if:{{{pick|}}} | {{{pick}}} AND }} itemtype="Einnahme" | no html }}  }}
       | 0  }}   
       | 0  }}   
   }}<!--
   }}<!--
Zeile 20: Zeile 20:
     {{#if:  
     {{#if:  
       {{#cargo_query: tables=bookings | fields=COUNT(*)
       {{#cargo_query: tables=bookings | fields=COUNT(*)
         | where={{#if:{{{pick|}}} | {{{pick}}} AND }} itemtype="Ausgabe" | no html }}
         | where=1=1 {{#if:{{{pick|}}} | {{{pick}}} AND }} itemtype="Ausgabe" | no html }}
       | {{CleanNumber|{{#cargo_query: tables=bookings | fields=COUNT(*)
       | {{CleanNumber|{{#cargo_query: tables=bookings | fields=COUNT(*)
           | where={{#if:{{{pick|}}} | {{{pick}}} AND }} itemtype="Ausgabe" | no html }}  }}
           | where=1=1 {{#if:{{{pick|}}} | {{{pick}}} AND }} itemtype="Ausgabe" | no html }}  }}
       | 0  }}   
       | 0  }}   
   }}<noinclude><!--
   }}<noinclude><!--
Zeile 62: Zeile 62:
         |fields=COUNT(*), Count(department), Count(purpose),  
         |fields=COUNT(*), Count(department), Count(purpose),  
         count(person__full), round(Sum(valDenar)/240,1)
         count(person__full), round(Sum(valDenar)/240,1)
         |where={{#if:{{{pick|}}} | {{{pick}}} AND }} itemtype = "Ausgabe"
         |where=1=1 {{#if:{{{pick|}}} | {{{pick}}} AND }} itemtype = "Ausgabe"
         |format=template
         |format=template
         |template=QueryFormat SummeZeile in Tabelle}}
         |template=QueryFormat SummeZeile in Tabelle}}
Zeile 73: Zeile 73:
         |fields=COUNT(*), Count(department), Count(purpose),  
         |fields=COUNT(*), Count(department), Count(purpose),  
         count(person__full), round(Sum(valDenar)/240,1)
         count(person__full), round(Sum(valDenar)/240,1)
         |where={{{pick|}}}
         |where=1=1 {{{pick|}}}
         |format=template
         |format=template
         |template=QueryFormat SummeZeile in Tabelle}}
         |template=QueryFormat SummeZeile in Tabelle}}

Version vom 9. August 2026, 23:29 Uhr

Vorlage:BookingsTotal
   Aufzurufen mit {{BookingsTotal|pick=Auswahl}} 
                      Auswahl wie für das "Where" im SQL, resp. cargo_query. z.Bsp.: pick=pageNbr="001r"
                      falls nötig, kann in der Entwicklung ein Zusatz-Parameter "|Test" angehängt werden.
   
   - Liste mit getrennten Total-Zeilen für Einahmen und Ausgaben sofern in der Auswahl (pick) vorhanden 
     und einem Total, falls Ein- und Ausgaben vorhanden.
   - Liste aller Buchungen der Auswahl 
Auswahl der Buchungen: Keine Auswahl definiert / Alle
Test-Parameter: ohne
 Anzahl der in der Auswahl definierten Einnahme-Records: <divclass="error">Error1064:YouhaveanerrorinyourSQLsyntax;checkthemanualthatcorrespondstoyourMariaDBserverversionfortherightsyntaxtousenear'itemtype="Einnahme"ORDERBYCOUNT(*)LIMIT100'atline1

Function:CargoSQLQuery::run Query:SELECTCOUNT(*)FROM`cargo__bookings``bookings`WHERE1=1itemtype="Einnahme"ORDERBYCOUNT(*)LIMIT100

 Anzahl der in der Auswahl definierten Ausgabe-Records: <divclass="error">Error1064:YouhaveanerrorinyourSQLsyntax;checkthemanualthatcorrespondstoyourMariaDBserverversionfortherightsyntaxtousenear'itemtype="Ausgabe"ORDERBYCOUNT(*)LIMIT100'atline1

Function:CargoSQLQuery::run Query:SELECTCOUNT(*)FROM`cargo__bookings``bookings`WHERE1=1itemtype="Ausgabe"ORDERBYCOUNT(*)LIMIT100

Summen / Zähler für   BookingsTotal

Fehler im Ausdruck: Unerwarteter Operator <