Skip to content

Commit

Permalink
vorkontierung
Browse files Browse the repository at this point in the history
  • Loading branch information
fdagner committed Jan 23, 2024
1 parent f811b11 commit 63d9454
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 17 deletions.
59 changes: 47 additions & 12 deletions buchen.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h2>T-Konto</h2>
<div style="padding-left:6px;border: 1px solid #ddd;padding: 4px;">
<video style="width:100%;margin: 0 auto;" poster="media/pic/screenshot1.png" controls>
<source src="media/video/t-konto.mp4" type="video/mp4">
Your bser does not support the video tag.
Your browser does not support the video tag.
</video>
</div>
</details>
Expand Down Expand Up @@ -162,7 +162,50 @@ <h2>Vorkontierung</h2>
Your bser does not support the video tag.
</video>
</div>
</details><br>🚧
</details>
<form id="vorkontierungForm" class="box">
<label for="anzahlZeilen">Anzahl der Zeilen (1-20):</label>
<input type="number" id="anzahlZeilenVorkontierung" name="anzahlZeilen" value="2" min="1" max="20" required>
<br><br>
<button type="button" onclick="generiereVorkontierung()"><svg xmlns="http://www.w3.org/2000/svg" fill="white"
height="16" width="16"
viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path
d="M105.1 202.6c7.7-21.8 20.2-42.3 37.8-59.8c62.5-62.5 163.8-62.5 226.3 0L386.3 160H352c-17.7 0-32 14.3-32 32s14.3 32 32 32H463.5c0 0 0 0 0 0h.4c17.7 0 32-14.3 32-32V80c0-17.7-14.3-32-32-32s-32 14.3-32 32v35.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5zM39 289.3c-5 1.5-9.8 4.2-13.7 8.2c-4 4-6.7 8.8-8.1 14c-.3 1.2-.6 2.5-.8 3.8c-.3 1.7-.4 3.4-.4 5.1V432c0 17.7 14.3 32 32 32s32-14.3 32-32V396.9l17.6 17.5 0 0c87.5 87.4 229.3 87.4 316.7 0c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.5 62.5-163.8 62.5-226.3 0l-.1-.1L125.6 352H160c17.7 0 32-14.3 32-32s-14.3-32-32-32H48.4c-1.6 0-3.2 .1-4.8 .3s-3.1 .5-4.6 1z" />
</svg> Vorlage für Vorkontierung erstellen</button>
</form><br>
<div id="vorkontierungButtonContainer" style="margin:0 auto;">
<div style="width:750px" contenteditable="true">
<div id="vorkontierungContainer" style="min-height: 50px;margin: 0 auto"></div>
</div>
<div class="exportButtons">
<button class="icon" type="button" onclick="vorkontierungHerunterladenAlsPNG()"><svg
xmlns="http://www.w3.org/2000/svg" height="16" width="16"
viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path
d="M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z" />
</svg></button>
<button class="icon" type="button" id="officeButtonVorkontierung"
data-clipboard-target="#vorkontierungContainer"><svg xmlns="http://www.w3.org/2000/svg" height="16"
width="12"
viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path
d="M48 448V64c0-8.8 7.2-16 16-16H224v80c0 17.7 14.3 32 32 32h80V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0H64zm55 241.1c-3.8-12.7-17.2-19.9-29.9-16.1s-19.9 17.2-16.1 29.9l48 160c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l25-83.4 25 83.4c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l48-160c3.8-12.7-3.4-26.1-16.1-29.9s-26.1 3.4-29.9 16.1l-25 83.4-25-83.4c-3-10.2-12.4-17.1-23-17.1s-19.9 7-23 17.1l-25 83.4-25-83.4z" />
</svg></button>
<button class="icon" type="button" onclick="vorkontierungHerunterladen()"><svg
xmlns="http://www.w3.org/2000/svg" height="16" width="12"
viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path
d="M64 464c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16H224v80c0 17.7 14.3 32 32 32h80V448c0 8.8-7.2 16-16 16H64zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V154.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0H64zm97 289c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L79 303c-9.4 9.4-9.4 24.6 0 33.9l48 48c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-31-31 31-31zM257 255c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l31 31-31 31c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l48-48c9.4-9.4 9.4-24.6 0-33.9l-48-48z" />
</svg></button>
<button class="icon" type="button" onclick="vorkontierungKopiereInZwischenablage()"><svg
xmlns="http://www.w3.org/2000/svg" height="16" width="20"
viewBox="0 0 640 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path
d="M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z" />
</svg></button>
</div><br>
</div>
</section>

<section id="geschaeftsfaelle" class="tabcontent">
Expand Down Expand Up @@ -455,16 +498,15 @@ <h2>Tools</h2>
<div id="radioOptionsContainer" style="text-align:left"></div>
</div>
<div id="dragContainer" ondragstart="handleDragStart(event)"
style="min-width:400px;word-wrap: break-word;display: none;">
{1:MULTICHOICE:~0500&nbsp;GR&nbsp;&nbsp;&nbsp;~0530&nbsp;BVG&nbsp;&nbsp;&nbsp;~0700&nbsp;MA&nbsp;&nbsp;&nbsp;~0840&nbsp;FP&nbsp;&nbsp;&nbsp;~0860&nbsp;BM&nbsp;&nbsp;&nbsp;~0870&nbsp;BGA&nbsp;&nbsp;&nbsp;~0890&nbsp;GWG&nbsp;&nbsp;&nbsp;~1500&nbsp;WP&nbsp;&nbsp;&nbsp;~2000&nbsp;R&nbsp;&nbsp;&nbsp;~2010&nbsp;F&nbsp;&nbsp;&nbsp;~2020&nbsp;H&nbsp;&nbsp;&nbsp;~2030&nbsp;B&nbsp;&nbsp;&nbsp;~2400&nbsp;FO&nbsp;&nbsp;&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p;~6022&nbsp;NH&nbsp;&nbsp;&nbsp;~6030&nbsp;AWB&nbsp;&nbsp;&nbsp;~6031&nbsp;BZKB&nbsp;&nbsp;&nbsp;~6032&nbsp;NB&nbsp;&nbsp;&nbsp;~6040&nbsp;AWVM&nbsp;&nbsp;&nbsp;~6140&nbsp;AFR&nbsp;&nbsp;&nbsp;~6160&nbsp;FRI&nbsp;&nbsp;&nbsp;~6200&nbsp;LG&nbsp;&nbsp;&nbsp;~6400&nbsp;AGASV&nbsp;&nbsp;&nbsp;~6520&nbsp;ABSA&nbsp;&nbsp;&nbsp;~6540&nbsp;ABGWG&nbsp;&nbsp;&nbsp;~6700&nbsp;AWMP&nbsp;&nbsp;&nbsp;~6730&nbsp;GEB&nbsp;&nbsp;&nbsp;~6750&nbsp;KGV&nbsp;&nbsp;&nbsp;~6760&nbsp;PROV&nbsp;&nbsp;&nbsp;~6770&nbsp;RBK&nbsp;&nbsp;&nbsp;~6800&nbsp;BMK&nbsp;&nbsp;&nbsp;~6820&nbsp;KOM&nbsp;&nbsp;&nbsp;~6850&nbsp;REK&nbsp;&nbsp;&nbsp;~6870&nbsp;WER&nbsp;&nbsp;&nbsp;~6900&nbsp;VBEI&nbsp;&nbsp;&nbsp;~6950&nbsp;ABFO&nbsp;&nbsp;&nbsp;~6990&nbsp;PFAW&nbsp;&nbsp;&nbsp;~7000&nbsp;GWST&nbsp;&nbsp;&nbsp;~7020&nbsp;GRST&nbsp;&nbsp;&nbsp;~7030&nbsp;KFZST&nbsp;&nbsp;&nbsp;~7460&nbsp;VAWP&nbsp;&nbsp;&nbsp;~7510&nbsp;ZAW&nbsp;&nbsp;&nbsp;~8010&nbsp;SKB&nbsp;&nbsp;&nbsp;~8020&nbsp;GUV}
</div>
style="min-width:400px;word-wrap: break-word;display: none;">{1:MULTICHOICE:~0500&nbsp;GR&nbsp;&nbsp;&nbsp;~0530&nbsp;BVG&nbsp;&nbsp;&nbsp;~0700&nbsp;MA&nbsp;&nbsp;&nbsp;~0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p;&nbsp;&nbsp;~7030&nbsp;KFZST&nbsp;&nbsp;&nbsp;~7460&nbsp;VAWP&nbsp;&nbsp;&nbsp;~7510&nbsp;ZAW&nbsp;&nbsp;&nbsp;~8010&nbsp;SKB&nbsp;&nbsp;&nbsp;~8020&nbsp;GUV}</div>
</details>
<aside>

</div>

<script src="js/t-konto.js"></script>
<script src="js/buchungssatz.js"></script>
<script src="js/vorkontierung.js"></script>
<script src="js/geschaeftsfaelle.js"></script>
<script src="js/inventar.js"></script>
<script src="js/moodle.js"></script>
Expand All @@ -473,13 +515,6 @@ <h2>Tools</h2>

</script>
<script>
// Hide or show the details element based on the active tab
let moodleDropdown = document.getElementById("moodleDropdown");
if (tabcontent === "t-konto" || cityName === "buchungssatz") {
moodleDropdown.style.display = "block";
} else {
moodleDropdown.style.display = "none";
}
// Get the element with id="defaultOpen" and click on it
document.getElementById("defaultOpen").click();
</script>
Expand Down
2 changes: 1 addition & 1 deletion bwl.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ <h2>Produklebenszyklus</h2>

<!-- Linie -->
<path id="chartLine" fill="none" stroke="#000" stroke-width="2" stroke-dasharray="5,5"
d="M0,300 C125,250 225,244, 325,135 C425,50 525,310 625,290" transform="translate(50,0)"></path>
d="M0,300 C125,250 225,244, 325,135 C425,50 525,150 625,290" transform="translate(50,0)"></path>

<!-- Text mit Rechtecken -->
<g font-size="14">
Expand Down
1 change: 1 addition & 0 deletions js/buchungssatz.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,6 @@ clipboardBuchungssatz.on('error', function (e) {
window.onload = function () {
generiereTKonto();
generiereBuchungssatz();
generiereVorkontierung();
generateRandomInventar()
};
13 changes: 9 additions & 4 deletions js/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ function openCity(evt, cityName) {
evt.currentTarget.className += " active";

// Hide or show the details element based on the active tab
var moodleDropdown = document.getElementById("moodleDropdown");
if (tabcontent === "t-konto" || cityName === "buchungssatz") {
moodleDropdown.style.display = "block";
let moodleDropdown = document.getElementById("moodleDropdown");

if (moodleDropdown) {
if (cityName === "t-konto" || cityName === "buchungssatz" || cityName === "vorkontierung") {
moodleDropdown.style.display = "block";
} else {
moodleDropdown.style.display = "none";
}
} else {
moodleDropdown.style.display = "none";
console.error("Das Element mit der ID 'moodleDropdown' wurde nicht gefunden.");
}

}
66 changes: 66 additions & 0 deletions js/vorkontierung.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
function generiereVorkontierung() {
const anzahlZeilenVorkontierung = document.getElementById('anzahlZeilenVorkontierung').value;
const vorkontierungContainer = document.getElementById('vorkontierungContainer');
const vorkontierungButtonContainer = document.getElementById('vorkontierungButtonContainer');

let vorkontierungHTML = '<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p><table style="font-family:courier;width:650px;border-collapse:collapse"><caption>Vorkontierung</caption><tbody><tr style="background-color:#ededed;font-weight: bold;white-space:nowrap;"><th>BA</th><th>Datum</th><th>Soll</th><th>Haben</th><th>BNR</th><th>Text</th><th>B/N</th><th>Betrag in €</th><th>UCo</th></tr>';

for (let i = 0; i < anzahlZeilenVorkontierung; i++) {
vorkontierungHTML += '<tr style="background-color:#fff;">';
vorkontierungHTML += '<td style="border: 1px solid #ccc;padding: .75rem">B</td><td style="border: 1px solid #ccc;padding: .75rem"></td><td style="border: 1px solid #ccc;padding: .75rem;min-width:90px;"></td><td style="border: 1px solid #ccc;padding: .75rem;min-width:90px;">Test</td><td style="border: 1px solid #ccc;padding: .75rem"></td><td style="border: 1px solid #ccc;padding: .75rem"></td><td style="border: 1px solid #ccc;padding: .75rem"></td><td style="border: 1px solid #ccc;padding: .75rem;width:120px;"></td><td style="border: 1px solid #ccc;padding: .75rem"></td>';
vorkontierungHTML += '</tr>';
}

vorkontierungHTML += '</tbody></table>';
vorkontierungContainer.innerHTML = vorkontierungHTML;

// Display the buttons after generation
vorkontierungButtonContainer.style.display = 'block';
}


function vorkontierungHerunterladen() {
const vorkontierungHTML = document.getElementById('vorkontierungContainer').innerHTML;
const blob = new Blob([vorkontierungHTML], { type: 'text/html' });
const a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.download = 'vorkontierung.html';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}

function vorkontierungKopiereInZwischenablage() {
const vorkontierungHTML = document.getElementById('vorkontierungContainer').innerHTML;
navigator.clipboard.writeText(vorkontierungHTML)
.then(() => alert('Code wurde in die Zwischenablage kopiert'))
.catch(err => console.error('Fehler beim Kopieren in die Zwischenablage:', err));
}

function vorkontierungHerunterladenAlsPNG() {
const vorkontierungContainer = document.getElementById('vorkontierungContainer');

html2canvas(vorkontierungContainer).then(canvas => {
const dataURL = canvas.toDataURL('image/png');
const a = document.createElement('a');
a.href = dataURL;
a.download = 'vorkontierung.png';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
});
}

let clipboardVorkontierung = new ClipboardJS('#officeButtonVorkontierung');

clipboardVorkontierung.on('success', function (e) {
console.log("Die Tabelle wurde in die Zwischenablage kopiert.");
alert("Die Tabelle wurde in die Zwischenablage kopiert.");
});

clipboardVorkontierung.on('error', function (e) {
console.error("Fehler beim Kopieren der Tabelle: ", e.action);
alert("Fehler beim Kopieren der Tabelle.");
});


0 comments on commit 63d9454

Please sign in to comment.