From e486bed6ea2a13e97cfc78a03f30c0999d92eb26 Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Sat, 20 Jul 2019 15:17:02 +0000 Subject: - Backup Wertgutscheine git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7486 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/order/backendEdit/addVoucher.phtml | 28 +++++++++-- views/order/product_table.phtml | 81 +++++++++++++++++++++++++++++--- views/order/view_orderdata.phtml | 8 ++-- 3 files changed, 103 insertions(+), 14 deletions(-) (limited to 'views/order') diff --git a/views/order/backendEdit/addVoucher.phtml b/views/order/backendEdit/addVoucher.phtml index 7b90086..88d8e2b 100644 --- a/views/order/backendEdit/addVoucher.phtml +++ b/views/order/backendEdit/addVoucher.phtml @@ -15,25 +15,45 @@ else $strBN = 'BRUTTO'; $arCalculation = $oCalculation->getCalculationArray(); + $voucher = [ + 'code' => '', + 'id' => 0, + 'set' => 0, + 'type' => 'voucher' + ]; - $strVal = ((isset($arCalculation['voucher'][0]['set']))?$arCalculation['voucher'][0]['set']:0); + // Voucher suchen + foreach (array_merge($arCalculation['voucher'], $arCalculation['coupon']) as $v) { + + if ($v['order_voucher_id'] == $_REQUEST['order_voucher_id']) { + + $voucher = $v; + + } + + } + + $strVal = ((isset($voucher['set']))?$voucher['set']:0); if (strpos($strVal, '%') !== false) $strVal = wpsg_ff(wpsg_tf($strVal), '%'); else $strVal = wpsg_ff(wpsg_tf($strVal), $this->get_option('wpsg_currency')); - + ?>
+ +

- - + + get_option('wpsg_currency'), $strBN), $strVal); ?> +
diff --git a/views/order/product_table.phtml b/views/order/product_table.phtml index 1f5d037..244ee56 100644 --- a/views/order/product_table.phtml +++ b/views/order/product_table.phtml @@ -98,8 +98,8 @@ - - + +
Code: @@ -109,7 +109,7 @@ - get_option('wpsg_currency')); ?> + get_option('wpsg_currency')); ?> @@ -121,11 +121,11 @@ 1 get_option('wpsg_currency'); + echo wpsg_ff($v[$display]); ?> get_option('wpsg_currency'); - if (strpos($arCalculation['voucher'][0]['set'], '%') !== false) { + if (strpos($v['set'], '%') !== false) { - echo '('.wpsg_ff(wpsg_tf($arCalculation['voucher'][0]['set']), '%').')'; + echo '('.wpsg_ff(wpsg_tf($v['set']), '%').')'; } @@ -314,6 +314,75 @@ + + + + + + + + + +
+ + + getBackendTaxView() === WPSG_BRUTTO) { ?> + + + + + + + +
+
+ Code: +
+ + + + + + get_option('wpsg_currency')); ?> + + + + + + 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?> + + + 1 + get_option('wpsg_currency'); + + if (strpos($c['set'], '%') !== false) { + + echo '('.wpsg_ff(wpsg_tf($c['set']), '%').')'; + + } + + ?> + + + + + + + + getBackendTaxView() === WPSG_BRUTTO) { ?> + + + + + + + get_option('wpsg_currency'); ?> + + + + diff --git a/views/order/view_orderdata.phtml b/views/order/view_orderdata.phtml index 69df736..5f63a8d 100644 --- a/views/order/view_orderdata.phtml +++ b/views/order/view_orderdata.phtml @@ -182,13 +182,13 @@ var WPSG_BE_Voucher = { - editVoucher: function() { + editVoucher: function(order_voucher_id) { jQuery('#wpsg_voucher_dialog .modal-body').html('<?php echo __('Bitte warten ...', 'wpsg'); ?>'); jQuery('#wpsg_voucher_dialog').modal( { } ).modal('show'); jQuery.ajax( { - url: 'wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editVoucher&edit_id=&noheader=1', + url: 'wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editVoucher&edit_id=&order_voucher_id=' + order_voucher_id + '&noheader=1', success: function(data) { jQuery('#wpsg_voucher_dialog .modal-body').html(data); @@ -200,12 +200,12 @@ }, - removeVoucher: function() { + removeVoucher: function(order_voucher_id) { jQuery('#wpsg_product_table_wrap').html('<?php echo __('Bitte warten ...', 'wpsg'); ?>'); jQuery.ajax( { - url: 'wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editVoucher&do=remove&edit_id=&noheader=1', + url: 'wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editVoucher&do=remove&edit_id=&order_voucher_id=' + order_voucher_id + '&noheader=1', success: function(data) { jQuery('#wpsg_product_table_wrap').html(data.product_table); -- cgit v1.2.3