Feature: is_mandatory Flag für Kostenpositionstypen
- Neue Spalte wp_kgvvm_cost_entries.is_mandatory (TINYINT, default 1) - Kostenposten können jetzt als 'verpflichtend' oder 'manuell/optional' gekennzeichnet werden - Validator: sanitize_cost_entry() und validate_cost_entry() aktualisiert - CostRepository.save(): is_mandatory wird gespeichert - Admin: Checkbox 'Verpflichtende Position' in der Kostenposten-Form hinzugefügt - Datenbank: ALTER TABLE durchgeführt für existierende Instanzen
This commit is contained in:
@@ -1373,6 +1373,16 @@ class Admin {
|
||||
<p class='kgvvm-help'><?php echo esc_html__( 'Betrag je ausgewählter Einheit, also pro Parzelle oder pro Mitglied.', KGVVM_TEXT_DOMAIN ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope='row'><?php echo esc_html__( 'Position', KGVVM_TEXT_DOMAIN ); ?></th>
|
||||
<td>
|
||||
<label>
|
||||
<input type='checkbox' name='is_mandatory' value='1' <?php checked( $cost ? (bool) $cost->is_mandatory : true, true ); ?> />
|
||||
<?php echo esc_html__( 'Verpflichtende Position', KGVVM_TEXT_DOMAIN ); ?>
|
||||
</label>
|
||||
<p class='kgvvm-help'><?php echo esc_html__( 'Wenn aktiviert: Diese Position wird automatisch in allen Abrechnungen berechnet. Wenn deaktiviert: Diese Position wird als manuelle/optionale Position behandelt.', KGVVM_TEXT_DOMAIN ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope='row'><label for='kgvvm-cost-note'><?php echo esc_html__( 'Bemerkung', KGVVM_TEXT_DOMAIN ); ?></label></th>
|
||||
<td><textarea name='note' id='kgvvm-cost-note' rows='4' class='large-text'><?php echo esc_textarea( $cost ? $cost->note : '' ); ?></textarea></td>
|
||||
|
||||
Reference in New Issue
Block a user