update
This commit is contained in:
@@ -391,13 +391,13 @@
|
||||
<td>{{ entry.client.name }}</td>
|
||||
<td>{{ entry.pressure|floatformat:2 }}</td>
|
||||
<td>{{ entry.purity|floatformat:2 }}</td>
|
||||
<td>{{ entry.druckkorrektur|floatformat:3 }}</td>
|
||||
<td>{{ entry.constant_300|floatformat:3 }}</td>
|
||||
<td>{{ entry.korrig_druck|floatformat:6 }}</td>
|
||||
<td>{{ entry.nm3|floatformat:6 }}</td>
|
||||
<td>{{ entry.lhe|floatformat:6 }}</td>
|
||||
<td>{{ entry.lhe_zus|floatformat:3 }}</td>
|
||||
<td>{{ entry.lhe_ges|floatformat:6 }}</td>
|
||||
<td>{{ entry.druckkorrektur|floatformat:2 }}</td>
|
||||
<td>{{ entry.constant_300|floatformat:2 }}</td>
|
||||
<td>{{ entry.korrig_druck|floatformat:2 }}</td>
|
||||
<td>{{ entry.nm3|floatformat:2 }}</td>
|
||||
<td>{{ entry.lhe|floatformat:2 }}</td>
|
||||
<td>{{ entry.lhe_zus|floatformat:2 }}</td>
|
||||
<td>{{ entry.lhe_ges|floatformat:2 }}</td>
|
||||
<td>
|
||||
{% if entry.date %}
|
||||
{{ entry.date|date:"d.m.Y" }}
|
||||
@@ -468,8 +468,9 @@
|
||||
<!-- Auto-calculated Fields with Formulas -->
|
||||
<div class="input-with-label">
|
||||
<label for="add-constant-300">ges. Flasch. Inhalt:</label>
|
||||
<input type="number" id="add-constant-300" value="300.000" step="0.001" readonly class="readonly-field">
|
||||
<input type="number" id="add-constant-300" step="0.001" min="0">
|
||||
</div>
|
||||
<div class="formula-display">Editable value</div>
|
||||
<div class="formula-display">Formula: Fixed value (300)</div>
|
||||
|
||||
<div class="input-with-label">
|
||||
@@ -554,7 +555,7 @@
|
||||
<!-- Auto-calculated Fields with Formulas -->
|
||||
<div class="input-with-label">
|
||||
<label for="edit-constant-300">ges. Flasch. Inhalt:</label>
|
||||
<input type="number" id="edit-constant-300" value="300.000" step="0.001" readonly class="readonly-field">
|
||||
<input type="number" id="edit-constant-300" step="0.001" min="0">
|
||||
</div>
|
||||
<div class="formula-display">Formula: Fixed value (300)</div>
|
||||
|
||||
@@ -640,19 +641,19 @@
|
||||
|
||||
// Calculate Korrig. Druck
|
||||
const korrigDruck = pressure * druckkorrektur / ((pressure * druckkorrektur) / 2000 + 1);
|
||||
$(`#${prefix}-korrig-druck`).val(korrigDruck.toFixed(6));
|
||||
|
||||
// Calculate Nm³ - Updated to divide by 1000
|
||||
$(`#${prefix}-korrig-druck`).val(korrigDruck.toFixed(2));
|
||||
|
||||
// Calculate Nm³
|
||||
const nm3 = (gesFlaschInhalt * korrigDruck) / 1000;
|
||||
$(`#${prefix}-nm3`).val(nm3.toFixed(6));
|
||||
|
||||
$(`#${prefix}-nm3`).val(nm3.toFixed(2));
|
||||
|
||||
// Calculate L-He
|
||||
const lhe = nm3 * (1 - purity/100) / 0.75;
|
||||
$(`#${prefix}-lhe`).val(lhe.toFixed(6));
|
||||
|
||||
$(`#${prefix}-lhe`).val(lhe.toFixed(2));
|
||||
|
||||
// Calculate L-He ges.
|
||||
const lheGes = lheZus + lhe;
|
||||
$(`#${prefix}-lhe-ges`).val(lheGes.toFixed(6));
|
||||
$(`#${prefix}-lhe-ges`).val(lheGes.toFixed(2));
|
||||
}
|
||||
|
||||
// Institute change handler for add popup
|
||||
@@ -668,12 +669,13 @@
|
||||
});
|
||||
|
||||
// Add event listeners for calculation triggers in add popup
|
||||
$('#add-pressure, #add-purity, #add-druckkorrektur, #add-lhe-zus').on('input change', function() {
|
||||
$('#add-pressure, #add-purity, #add-druckkorrektur, #add-lhe-zus, #add-constant-300')
|
||||
.on('input change', function() {
|
||||
calculateDerivedValues('add');
|
||||
});
|
||||
|
||||
// Add event listeners for calculation triggers in edit popup
|
||||
$('#edit-pressure, #edit-purity, #edit-druckkorrektur, #edit-lhe-zus').on('input change', function() {
|
||||
$('#edit-pressure, #edit-purity, #edit-druckkorrektur, #edit-lhe-zus, #edit-constant-300')
|
||||
.on('input change', function() {
|
||||
calculateDerivedValues('edit');
|
||||
});
|
||||
|
||||
@@ -684,10 +686,10 @@
|
||||
$('#add-client-id').prop('disabled', true);
|
||||
$('#add-date').val('');
|
||||
$('#add-pressure').val('');
|
||||
$('#add-purity').val('');
|
||||
$('#add-purity').val('0.1');
|
||||
$('#add-druckkorrektur').val('1.0');
|
||||
$('#add-lhe-zus').val('0.0');
|
||||
$('#add-constant-300').val('300.000');
|
||||
$('#add-constant-300').val('604.00');
|
||||
$('#add-korrig-druck').val('');
|
||||
$('#add-nm3').val('');
|
||||
$('#add-lhe').val('');
|
||||
|
||||
Reference in New Issue
Block a user