Skip to content

Commit

Permalink
Merge pull request #48 from fdagner/bwr2
Browse files Browse the repository at this point in the history
bilanz7
  • Loading branch information
fdagner authored Feb 23, 2024
2 parents 5dda61d + 5864bf1 commit ce4bbd0
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 59 deletions.
102 changes: 51 additions & 51 deletions bilanz7.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,99 +28,99 @@ <h2>Bilanz 7</h2>
</div><br>
<div id="bilanz7Container" style="margin: 0 auto" contenteditable="true">

<table style="border-collapse: collapse;font-family:calibri;background-color:#fff;min-width:700px;">
<table style="border-collapse: collapse;font-family:calibri;background-color:#fff;min-width:700px;line-height:1;">
<tbody>
<tr style="background-color: #ccc;">
<th style="width:30%;text-align:left;padding-left:6px;">Aktiva</th>
<th colspan="2" style="text-indent:-20%;text-align:center;">Eröffnungsbilanz&nbsp;1. Januar</th>
<th style="width:20%;text-align:right;padding-right:6px">Passiva</th>
<th style="width:25%;text-align:left;padding-left:6px;">Aktiva</th>
<th colspan="2" style="text-align:center;">Eröffnungsbilanz&nbsp;1. Januar</th>
<th style="width:25%;text-align:right;padding-right:6px">Passiva</th>
</tr>
<tr style="border-top: 1px solid #AAAAAA;">
<td style="width:30%"><b>I. Anlagevermögen</b></td>
<td style="width:20%;text-align:right;padding-right: 4px;"></td>
<td style="width:30%;border-left: 1px solid #AAAAAA;padding-left: 6px;"><b>I. Eigenkapital</b></td>
<td style="width:20%;text-align:right;padding-right: 4px;" id="value-EK"></td>
<td style="width:25%"><b>I. Anlagevermögen</b></td>
<td style="width:25%;text-align:right;padding-right: 4px;"></td>
<td style="width:25%;border-left: 1px solid #AAAAAA;padding-left: 6px;"><b>I. Eigenkapital</b></td>
<td style="width:25%;text-align:right;padding-right: 4px;" id="value-EK"></td>
</tr>
<tr style="border-top: 1px solid #AAAAAA;">
<td style="width:30%">Grundstücke</td>
<td style="width:20%;text-align:right;padding-right: 4px;" id="value-GR"></td>
<td style="width:30%;border-left: 1px solid #AAAAAA;padding-left: 6px;"><b>II. Fremdkapital</b></td>
<td style="width:20%;text-align:right;padding-right: 4px;"></td>
<td style="width:25%">Grundstücke</td>
<td style="width:25%;text-align:right;padding-right: 4px;" id="value-GR"></td>
<td style="width:25%;border-left: 1px solid #AAAAAA;padding-left: 6px;"><b>II. Fremdkapital</b></td>
<td style="width:25%;text-align:right;padding-right: 4px;"></td>
</tr>
<tr style="border-top: 1px solid #AAAAAA;">
<td style="width:30%">Betriebs- und Verwaltungsgebäude</td>
<td style="width:20%;text-align:right;padding-right: 4px;" id="value-BVG"></td>
<td style="width:30%;border-left: 1px solid #AAAAAA;padding-left: 6px;">Langfristige Bankverbindlichkeiten
<td style="width:25%">Betriebs- und Verwaltungsgebäude</td>
<td style="width:25%;text-align:right;padding-right: 4px;" id="value-BVG"></td>
<td style="width:25%;border-left: 1px solid #AAAAAA;padding-left: 6px;">Langfristige Bankverbindlichkeiten
</td>
<td style="width:20%;text-align:right;padding-right: 4px;" id="value-LBKV"></td>
<td style="width:25%;text-align:right;padding-right: 4px;" id="value-LBKV"></td>
</tr>

<tr style="border-top: 1px solid #AAAAAA;">
<td style="width:30%">Maschinen und Anlagen</td>
<td style="width:20%;text-align:right;padding-right: 4px;" id="value-MA"></td>
<td style="width:30%;border-left: 1px solid #AAAAAA;padding-left: 6px;">Kurzfristige Bankverbindlichkeiten
<td style="width:25%">Maschinen und Anlagen</td>
<td style="width:25%;text-align:right;padding-right: 4px;" id="value-MA"></td>
<td style="width:25%;border-left: 1px solid #AAAAAA;padding-left: 6px;">Kurzfristige Bankverbindlichkeiten
</td>
<td style="width:20%;text-align:right;padding-right: 4px;" id="value-KBKV"></td>
<td style="width:25%;text-align:right;padding-right: 4px;" id="value-KBKV"></td>
</tr>

<tr style="border-top: 1px solid #AAAAAA;">
<td style="width:30%">Fuhrpark</td>
<td style="width:20%;text-align:right;padding-right: 4px;" id="value-FP"></td>
<td style="width:30%;border-left: 1px solid #AAAAAA;padding-left: 6px;">Verbindlichkeiten a. LL.
<td style="width:25%">Fuhrpark</td>
<td style="width:25%;text-align:right;padding-right: 4px;" id="value-FP"></td>
<td style="width:25%;border-left: 1px solid #AAAAAA;padding-left: 6px;">Verbindlichkeiten a. LL.
</td>
<td style="width:20%;text-align:right;padding-right: 4px;" id="value-VE"></td>
<td style="width:25%;text-align:right;padding-right: 4px;" id="value-VE"></td>
</tr>

<tr style="border-top: 1px solid #AAAAAA;">
<td style="width:30%">Büromaschinen</td>
<td style="width:20%;text-align:right;padding-right: 4px;" id="value-BM"></td>
<td style="width:30%;border-left: 1px solid #AAAAAA;padding-left: 6px;"></td>
<td style="width:20%;text-align:right;padding-right: 4px;"></td>
<td style="width:25%">Büromaschinen</td>
<td style="width:25%;text-align:right;padding-right: 4px;" id="value-BM"></td>
<td style="width:25%;border-left: 1px solid #AAAAAA;padding-left: 6px;"></td>
<td style="width:25%;text-align:right;padding-right: 4px;"></td>
</tr>

<tr style="border-top: 1px solid #AAAAAA;">
<td style="width:30%">Büromöbel- und Geschäftsausst.</td>
<td style="width:20%;text-align:right;padding-right: 4px;" id="value-BGA"></td>
<td style="width:30%;border-left: 1px solid #AAAAAA;padding-left: 6px;"></td>
<td style="width:20%;text-align:right;padding-right: 4px;"></td>
<td style="width:25%">Büromöbel- und Geschäftsausst.</td>
<td style="width:25%;text-align:right;padding-right: 4px;" id="value-BGA"></td>
<td style="width:25%;border-left: 1px solid #AAAAAA;padding-left: 6px;"></td>
<td style="width:25%;text-align:right;padding-right: 4px;"></td>
</tr>
<tr style="border-top: 1px solid #AAAAAA;">
<td style="width:30%"><b>II. Umlaufvermögen</b></td>
<td style="width:20%;text-align:right;padding-right: 4px;"></td>
<td style="width:30%;border-left: 1px solid #AAAAAA;padding-left: 6px;"></td>
<td style="width:20%;text-align:right;padding-right: 4px;"></td>
<td style="width:25%"><b>II. Umlaufvermögen</b></td>
<td style="width:25%;text-align:right;padding-right: 4px;"></td>
<td style="width:25%;border-left: 1px solid #AAAAAA;padding-left: 6px;"></td>
<td style="width:25%;text-align:right;padding-right: 4px;"></td>
</tr>

<tr style="border-top: 1px solid #AAAAAA;">
<td style="width:30%">Vorräte</td>
<td style="width:20%;text-align:right;padding-right: 4px;" id="value-VORR"></td>
<td style="width:30%;border-left: 1px solid #AAAAAA;padding-left: 6px;"></td>
<td style="width:20%;text-align:right;padding-right: 4px;"></td>
<td style="width:25%">Vorräte</td>
<td style="width:25%;text-align:right;padding-right: 4px;" id="value-VORR"></td>
<td style="width:25%;border-left: 1px solid #AAAAAA;padding-left: 6px;"></td>
<td style="width:25%;text-align:right;padding-right: 4px;"></td>
</tr>

<tr style="border-top: 1px solid #AAAAAA;">
<td style="width:30%">Forderungen an Kunden</td>
<td style="width:20%;text-align:right;padding-right: 4px;" id="value-FO"></td>
<td style="width:30%;border-left: 1px solid #AAAAAA;padding-left: 6px;"></td>
<td style="width:20%;text-align:right;padding-right: 4px;"></td>
<td style="width:25%">Forderungen an Kunden</td>
<td style="width:25%;text-align:right;padding-right: 4px;" id="value-FO"></td>
<td style="width:25%;border-left: 1px solid #AAAAAA;padding-left: 6px;"></td>
<td style="width:25%;text-align:right;padding-right: 4px;"></td>
</tr>

<tr style="border-top: 1px solid #AAAAAA;">
<td style="width:30%">Bank</td>
<td style="width:20%;text-align:right;padding-right: 4px;" id="value-BK"></td>
<td style="width:30%;border-left: 1px solid #AAAAAA;padding-left: 6px;"></td>
<td style="width:25%">Bank</td>
<td style="width:25%;text-align:right;padding-right: 4px;" id="value-BK"></td>
<td style="width:25%;border-left: 1px solid #AAAAAA;padding-left: 6px;"></td>
<td style="text-align:right;"></td>
</tr>

<tr style="border-top: 1px solid #AAAAAA;">
<td style="width:30%">Kasse</td>
<td style="width:25%">Kasse</td>
<td style="text-align:right;padding-right: 2px;" id="value-KA"></td>
<td style="width:30%;border-left: 1px solid #AAAAAA;padding-left: 6px;"></td>
<td style="width:20%;text-align:right;padding-right: 4px;"></td>
<td style="width:25%;border-left: 1px solid #AAAAAA;padding-left: 6px;"></td>
<td style="width:25%;text-align:right;padding-right: 4px;"></td>
</tr>

<tr style="border-bottom: 6px double #AAAAAA;border-top: 2px solid #AAAAAA;">
<td style="width:30%"></td>
<td style="width:25%"></td>
<td style="text-align:right;padding-right: 2px;font-weight:bold" id="value-AVUV"></td>
<td style="border-left: 1px solid #AAAAAA;padding-left: 6px;padding-right: 4px;"></td>
<td style="text-align:right;padding-right: 4px;font-weight:bold" id="value-AVUV2"></td>
Expand Down
18 changes: 10 additions & 8 deletions js/bilanz7.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
function generateRandomBilanz7() {
const valueRanges = {
"value-GR": { min: 1500000, max: 1000000 },
"value-BVG": { min: 2500000, max: 5000000 },
"value-GR": { min: 200000, max: 550000 },
"value-BVG": { min: 500000, max: 2000000 },
"value-MA": { min: 10000, max: 200000 },
"value-FP": { min: 10000, max: 80000 },
"value-FP": { min: 10000, max: 100000 },
"value-BM": { min: 5000, max: 20000 },
"value-BGA": { min: 20000, max: 200000 },
"value-BGA": { min: 10000, max: 50000 },
"value-VORR": { min: 20000, max: 100000 },
"value-FO": { min: 2000, max: 500000 },
"value-FO": { min: 2000, max: 300000 },
"value-BK": { min: 40000, max: 400000 },
"value-KA": { min: 500, max: 5000 },
"value-LBKV": { min: 50000, max: 4500000 },
"value-KA": { min: 5000, max: 15000 },
"value-LBKV": { min: 50000, max: 200000 },
"value-KBKV": { min: 5000, max: 50000 },
"value-VE": { min: 5000, max: 50000 },
};


function getRandomValueInRange(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
const randomValue = Math.ceil(Math.random() * (max - min + 1)) + min;
return Math.ceil(randomValue / 5000) * 5000;
}


function formatCurrency(value) {
return value.toLocaleString('de-DE', { style: 'currency', currency: 'EUR' });
}
Expand Down

0 comments on commit ce4bbd0

Please sign in to comment.