Merge branch 'main' of github.com:PatrykHegenberg/Tagesabrechnung
* 'main' of github.com:PatrykHegenberg/Tagesabrechnung: added function to get last entry changed styling and deleted not needed node modules
This commit is contained in:
commit
e6ed33efb9
9 changed files with 2523 additions and 273 deletions
114
Eingabe.html
114
Eingabe.html
|
|
@ -1,114 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Test</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main>
|
||||
<div class="container template" id="Eingabe-template" data-tab="Eingabe">
|
||||
<h1>Eingabe Tagesdaten</h1>
|
||||
<p>Hier kannst du deine Daten für den heutigen Tag eingeben.</p>
|
||||
<div class="Eingaben">
|
||||
<div>
|
||||
<form class="BarGeld">
|
||||
<div class="formEntry">
|
||||
<label>Gesamtes Münzgeld:</label>
|
||||
<input type="text" pattern="\d+(\.\d{2})?" id="gesamtMuenzen" placeholder="" value="0.00">
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>5€ Scheine:</label>
|
||||
<input type="number" id="5Euro" value=0>
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>10€ Scheine:</label>
|
||||
<input type="number" id="10Euro" value=0>
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>20€ Scheine:</label>
|
||||
<input type="number" id="20Euro" value=0>
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>50€ Scheine:</label>
|
||||
<input type="number" id="50Euro" value=0>
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>100€ Scheine:</label>
|
||||
<input type="number" id="100Euro" value=0>
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>200€ Scheine:</label>
|
||||
<input type="number" id="200Euro" value=0>
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>Gesamtes Papiergeld:</label>
|
||||
<input type="text" pattern="\d+(\.\d{2})?" id="gesamtPapier" placeholder="" value="0.00">
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>Gesamtes Bargeld:</label>
|
||||
<input type="text" pattern="\d+(\.\d{2})?" id="gesamtBar" placeholder="" value="0.00">
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>Gesamtes Bargeld mit EC:</label>
|
||||
<input type="text" pattern="\d+(\.\d{2})?" id="gesamtBarEC" placeholder="" value="0.00">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div>
|
||||
<form class="EingabeSummen">
|
||||
<div class="formEntry">
|
||||
<label>Summe Rollengeld:</label>
|
||||
<input type="text" pattern="\d+(\.\d{2})?" id="Rollengeld" placeholder="" value="0.00">
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>Summe Kartenzahlung:</label>
|
||||
<input type="text" pattern="\d+(\.\d{2})?" id="Kartenzahlung" placeholder="" value="0.00">
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>zBon Kassenbericht:</label>
|
||||
<input type="text" pattern="\d+(\.\d{2})?" id="zBon-Bericht" placeholder="" value="0.00">
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>Sonderausgabe aus Kasse:</label>
|
||||
<input type="text" pattern="\d+(\.\d{2})?" id="Sonderausgabe" placeholder="" value="0.00">
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>Sondereingabe in Kasse:</label>
|
||||
<input type="text" pattern="\d+(\.\d{2})?" id="Sondereingabe" placeholder="" value="0.00">
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>Storno - zu viel:</label>
|
||||
<input type="text" pattern="\d+(\.\d{2})?" id="Storno-viel" placeholder="zu viel auf zBon"
|
||||
value="0.00">
|
||||
</div>
|
||||
<div class="formEntry">
|
||||
<label>Storno - zu wenig:</label>
|
||||
<input type="text" pattern="\d+(\.\d{2})?" id="Storno-wenig" placeholder="zu wenig auf zBon"
|
||||
value="0.00">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<form class="Ausgabe">
|
||||
<div class="formOut">
|
||||
<label>Papiergeld zurück in die Kasse</label>
|
||||
<input type="text" pattern="\d+(\.\d{2})?" id="zurueckKasse" value="0.00">
|
||||
</div>
|
||||
<div class="formOut">
|
||||
<label>Einzahlung auf Konto:</label>
|
||||
<input type="text" pattern="\d+(\.\d{2})?" id="aufKonto" value="0.00">
|
||||
</div>
|
||||
<div class="formOut">
|
||||
<label>Tagesbilanz vgl- Einnahme zu zBon</label>
|
||||
<input type="text" pattern="\d+(\.\d{2})?" id="tagesbilanz" value="0.00">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
<script src="renderer.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
BIN
abrechnung.db
BIN
abrechnung.db
Binary file not shown.
13
index.html
13
index.html
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<link rel="stylesheet" href="./style.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self';" />
|
||||
<title>Tagesabrechnung</title>
|
||||
|
|
@ -19,13 +19,16 @@
|
|||
<div class="menu">
|
||||
<button id="show-button" type="button">Zeige Einträge</button>
|
||||
<button id="in-button" type="button">Neuer Eintrag</button>
|
||||
<button id="print-button" type="button">Einträge drucken</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="Eingabe" class="screen modal">
|
||||
<h1>Eingabe Tagesdaten</h1>
|
||||
<div style="margin-top: 20px;">
|
||||
<button id="back-button" type="button">Zurück</button>
|
||||
<button id="save-button" type="button">Speichern</button>
|
||||
</div>
|
||||
<p>Hier kannst du deine Daten für den heutigen Tag eingeben.</p>
|
||||
<div class="Eingaben">
|
||||
<div>
|
||||
|
|
@ -121,18 +124,14 @@
|
|||
<input type="text" pattern="\d+(\.\d{2})?" id="tagesbilanz" value="0.00">
|
||||
</div>
|
||||
</form>
|
||||
<div style="margin-top: 20px;">
|
||||
<button id="back-button" type="button">Zurück</button>
|
||||
<button id="save-button" type="button">Speichern</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="Ausgaben" class="screen modal Ausgaben">
|
||||
<h1>Ausgabe</h1>
|
||||
<button id="back2-button" type="button">Zurück</button>
|
||||
<button id="print-button" type="button">Einträge drucken</button>
|
||||
<div id="anzeige">
|
||||
<table id="table" class="Ausgaben">
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
63
index1.html
63
index1.html
|
|
@ -1,63 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Tagesabrechnung</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootswatch/4.1.3/cyborg/bootstrap.min.css">
|
||||
<link rel="import" href="pages/main.html">
|
||||
<link rel="import" href="pages/settings.html">
|
||||
<link rel="import" href="pages/help.html">
|
||||
<style>
|
||||
.nav-pills>a.active {
|
||||
background-color: #f30bf3 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
.nav-pills>a:hover {
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
.nav-link-color {
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container my-4">
|
||||
<div class="row">
|
||||
<div class="col-2">
|
||||
<div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
|
||||
<a class="nav-link active" id="main-tab" data-toggle="pill" href="#main" role="tab" aria-controls="main" aria-selected="true">Main</a>
|
||||
<a class="nav-link" id="Anzeige-tab" data-toggle="pill" href="#Anzeige" role="tab" aria-controls="Anzeige" aria-selected="false">Anzeige</a>
|
||||
<a class="nav-link" id="Eingabe-tab" data-toggle="pill" href="#Eingabe" role="tab" aria-controls="Eingabe" aria-selected="false">Eingabe</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-10">
|
||||
<div class="tab-content" id="v-pills-tabContent">
|
||||
<div class="tab-pane fade show active" id="main" role="tabpanel" aria-labelledby="main-tab"></div>
|
||||
<div class="tab-pane fade" id="Eingabe" role="tabpanel" aria-labelledby="Eingabe-tab"></div>
|
||||
<div class="tab-pane fade" id="Anzeige" role="tabpanel" aria-labelledby="Anzeige-tab"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const links = document.querySelectorAll('link[rel="import"]');
|
||||
links.forEach((link) => {
|
||||
let template = link.import.querySelector('template');
|
||||
let clone = document.importNode(template.content, true);
|
||||
let target = clone.querySelector(".template").dataset.tab;
|
||||
document.getElementById(target).appendChild(clone);
|
||||
});
|
||||
|
||||
window.$ = window.jquery = require("jquery");
|
||||
window.popper = require("popper.js");
|
||||
require("bootstrap");
|
||||
require('./renderer.js')
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
2
main.js
2
main.js
|
|
@ -1,6 +1,6 @@
|
|||
const { app, BrowserWindow, ipcMain } = require('electron');
|
||||
require('electron-reloader')(module);
|
||||
const sqlite = require('sqlite-electron');
|
||||
//const sqlite = require('sqlite-electron');
|
||||
|
||||
const path = require('path');
|
||||
const sqlite3 = require('sqlite3');
|
||||
|
|
|
|||
2592
package-lock.json
generated
2592
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -15,8 +15,6 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@electron/rebuild": "^3.2.10",
|
||||
"electron-rebuild": "^3.2.9",
|
||||
"sqlite-electron": "^2.2.5",
|
||||
"sqlite3": "^5.1.4"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
const { contextBridge, ipcRenderer } = require("electron");
|
||||
|
||||
const rows = ipcRenderer.invoke('db-query', 'SELECT * FROM abrechnungen');
|
||||
console.log(rows);
|
||||
|
||||
contextBridge.exposeInMainWorld('api', {
|
||||
invoke: (channel, data) => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
let abrechnungen = window.api.invoke('db-query', "SELECT * FROM abrechnungen").then(function(res) {
|
||||
console.log(res);
|
||||
return res;
|
||||
})
|
||||
.catch(function(err) {
|
||||
|
|
@ -75,7 +74,7 @@ const Tagesbilanz = () => {
|
|||
const sonderIn = parseFloat(document.getElementById("Sondereingabe").value);
|
||||
const stornoWenig = parseFloat(document.getElementById("Storno-wenig").value);
|
||||
const stornoViel = parseFloat(document.getElementById("Storno-viel").value);
|
||||
|
||||
const last = lastEntry();
|
||||
const result = gesamtMitEc - zBonBericht + sonderOut - sonderIn - stornoWenig + stornoViel;
|
||||
document.getElementById("tagesbilanz").value = result.toFixed(2);
|
||||
}
|
||||
|
|
@ -128,4 +127,10 @@ const anzeige = () => {
|
|||
});
|
||||
}
|
||||
|
||||
const lastEntry = () => {
|
||||
const lastAbrechnung = window.api.invoke('db-query', "SELECT * FROM abrechnungen ORDER BY datum DESC Limit 1").then(function(res) {
|
||||
return res;
|
||||
});
|
||||
return lastAbrechnung;
|
||||
}
|
||||
createListeners();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue