Skip to content

Commit

Permalink
belege
Browse files Browse the repository at this point in the history
  • Loading branch information
fdagner committed Feb 12, 2024
1 parent ad13754 commit 93feaee
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 23 deletions.
9 changes: 4 additions & 5 deletions belege.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ <h3>Allgemeine Daten</h3>


</div><br>
<div id="rechnung1Container" style="border:1px solid #00000039;line-height:0.75;padding:0px;margin:0px;width:720px">
<div id="rechnung1Container" style="margin:0 auto;width:726px;text-align: center">
</div>
<br>
<div class="exportButtons">
Expand Down Expand Up @@ -361,7 +361,7 @@ <h3>Allgemeine Daten</h3>

</div>
<br>
<div id="kontoauszugContainer" style="border:0px solid #00000039;width:760px"></div><br>
<div id="kontoauszugContainer" style="text-align:center;margin:0 auto;width:765px"></div><br>
<div class="exportButtons">
<button class="icon" type="button" onclick="kontoauszugHerunterladenAlsPNG()"><svg
xmlns="http://www.w3.org/2000/svg" height="16" width="16"
Expand Down Expand Up @@ -483,8 +483,7 @@ <h3>Allgemeine Daten</h3>

</div>
<br>
<div id="quittungContainer"
style="border:1px solid #00000039;line-height:0.75;padding:0px;margin:0px;width:720px"></div><br>
<div id="quittungContainer" style="text-align:center;margin:0 auto;width:726px"></div><br>
<div class="exportButtons">
<button class="icon" type="button" onclick="quittungHerunterladenAlsPNG()"><svg
xmlns="http://www.w3.org/2000/svg" height="16" width="16"
Expand Down Expand Up @@ -612,7 +611,7 @@ <h3>Allgemeine Daten</h3>

</div>
<br>
<div id="kassenbonContainer" style="border:1px solid #00000039;line-height:0.75;text-align: center;margin:0 auto;width:50%;min-width:402px"></div><br>
<div id="kassenbonContainer" style="text-align: center;margin:0 auto;width:415px"></div><br>
<div class="exportButtons">
<button class="icon" type="button" onclick="kassenbonHerunterladenAlsPNG()"><svg
xmlns="http://www.w3.org/2000/svg" height="16" width="16"
Expand Down
21 changes: 14 additions & 7 deletions js/belege.js
Original file line number Diff line number Diff line change
Expand Up @@ -1442,16 +1442,23 @@ function kassenbonHerunterladen() {



function rechnungKopiereInZwischenablage() {
const rechnungHTML = document.getElementById('rechnung1Container').innerHTML.replace(/&nbsp;/g, ' ');;
navigator.clipboard.writeText(rechnungHTML)
.then(() => alert('Code wurde in die Zwischenablage kopiert'))
.catch(err => console.error('Fehler beim Kopieren in die Zwischenablage:', err));
}


function kopiereInZwischenablage(containerId) {
const containerHTML = document.getElementById(containerId).innerHTML.replace(/&nbsp;/g, ' ');
// SVG-Element aus dem Container abrufen
const containerSVG = document.getElementById(containerId).querySelector('svg');

// Kopie des SVG-Elements erstellen, um das Original nicht zu ändern
const clonedSVG = containerSVG.cloneNode(true);

// width und height Attribute entfernen
clonedSVG.removeAttribute('width');
clonedSVG.removeAttribute('height');

// HTML des modifizierten SVGs erhalten
const containerHTML = clonedSVG.outerHTML.replace(/&nbsp;/g, ' ');

// Text in die Zwischenablage kopieren
navigator.clipboard.writeText(containerHTML)
.then(() => alert('Code wurde in die Zwischenablage kopiert'))
.catch(err => console.error('Fehler beim Kopieren in die Zwischenablage:', err));
Expand Down
2 changes: 1 addition & 1 deletion templates/angebot1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion templates/angebot2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion templates/kassenbon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion templates/kontoauszug1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion templates/kontoauszug2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion templates/quittung1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion templates/template1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion templates/template2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion templates/template3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion templates/template4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion templates/template5.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 93feaee

Please sign in to comment.