summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorJean-Luc Beer <noreply@maennchen1.de>2025-02-14 15:28:43 +0000
committerJean-Luc Beer <noreply@maennchen1.de>2025-02-14 15:28:43 +0000
commitf75d526dd5eefcabeec4459ac50414661e7cf047 (patch)
treed40fa3b227b8c92d624b0d304bfac3c27b3e3773 /views
parent58231bf8e12d78bfc448f1ddca44617de917557e (diff)
: E-Rechnung Beschreibungen in Konfiguration4.4.11
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8483 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views')
-rw-r--r--views/mods/mod_rechnungen/settings_edit.phtml50
1 files changed, 30 insertions, 20 deletions
diff --git a/views/mods/mod_rechnungen/settings_edit.phtml b/views/mods/mod_rechnungen/settings_edit.phtml
index c2579de..60d5695 100644
--- a/views/mods/mod_rechnungen/settings_edit.phtml
+++ b/views/mods/mod_rechnungen/settings_edit.phtml
@@ -5,6 +5,21 @@
*/
use horstoeko\zugferd\ZugferdProfiles;
+
+ $ArrZugferdProfile = [
+ 0 => __('Keine E-Rechnungsdaten erzeugen', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_MINIMUM => __('EN16931 Minimum', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_BASIC => __('EN16931 Basic', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_BASICWL => __('EN16931 Basic WL', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_EN16931 => __('EN16931 Comfort', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_EXTENDED => __('EN16931 Extended', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG => __('EN16931 XRechnung 1', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2 => __('EN16931 XRechnung 2', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_1 => __('EN16931 XRechnung 2.1', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_2 => __('EN16931 XRechnung 2.2', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_3 => __('EN16931 XRechnung 2.3', 'wpsg'),
+ 100 + ZugferdProfiles::PROFILE_XRECHNUNG_3 => __('EN16931 XRechnung 3', 'wpsg'),
+ ]
?>
@@ -184,40 +199,35 @@
</div>
<div id="tab3" role="tabpanel" class="tab-pane" >
- <?php echo wpsg_drawForm_Select('wpsg_mod_rechnungen_einvoice', __('E-Rechnung', 'wpsg'), [
- 0 => __('Keine E-Rechnungsdaten erzeugen', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_MINIMUM => __('EN16931 Minimum', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_BASIC => __('EN16931 Basic', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_BASICWL => __('EN16931 Basic WL', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_EN16931 => __('EN16931 Comfort', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_EXTENDED => __('EN16931 Extended', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG => __('EN16931 XRechnung 1', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2 => __('EN16931 XRechnung 2', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_1 => __('EN16931 XRechnung 2.1', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_2 => __('EN16931 XRechnung 2.2', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_3 => __('EN16931 XRechnung 2.3', 'wpsg'),
- 100 + ZugferdProfiles::PROFILE_XRECHNUNG_3 => __('EN16931 XRechnung 3', 'wpsg'),
- ], $this->get_option('wpsg_mod_rechnungen_einvoice'), ['help' => 'wpsg_mod_rechnungen_einvoice']); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_rechnungen_einvoice', __('E-Rechnung', 'wpsg'), $ArrZugferdProfile, $this->get_option('wpsg_mod_rechnungen_einvoice'), ['help' => 'wpsg_mod_rechnungen_einvoice']); ?>
<p style="line-height:normal; margin-bottom:1rem; margin-top:1rem; display:none; font-style:italic;" id="wpsg_mod_rechnungen_einvoice_description"><?php echo __('Die Platzhalter können bei den Formatfeldern und dem Dateinamen verwendet werden. Der Platzhalter %nr% sollte dabei immer Verwendung finden.', 'wpsg'); ?></p>
-
+ <?php
+
+ array_walk($ArrZugferdProfile, function(&$v, $k) {
+
+ $v = [ 'description' => ZugferdProfiles::PROFILEDEF[$k - 100]['description']??null ];
+
+ });
+
+ ?>
<script>
- const eInvoiceProfileDev = <?php echo json_encode(ZugferdProfiles::PROFILEDEF); ?>;
+ const eInvoiceProfileDev = <?php echo json_encode($ArrZugferdProfile); ?>;
const el_wpsg_mod_rechnungen_einvoice_description = document.getElementById('wpsg_mod_rechnungen_einvoice_description');
document.getElementById('wpsg_mod_rechnungen_einvoice').addEventListener('change', ev => {
- if (eInvoiceProfileDev[ev.target.value] !== undefined) {
+ if (eInvoiceProfileDev[ev.target.value] !== null) {
el_wpsg_mod_rechnungen_einvoice_description.innerText = eInvoiceProfileDev[ev.target.value].description;
el_wpsg_mod_rechnungen_einvoice_description.style.display = 'block';
-
+
} else {
el_wpsg_mod_rechnungen_einvoice_description.style.display = 'hidden';
-
- }
+
+ }
});