summaryrefslogtreecommitdiff
path: root/views/order/backendEdit/addVoucher.phtml
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2018-10-05 08:48:34 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2018-10-05 08:48:34 +0000
commit1f1c7b8f3123863dd2a667d880d68dfc08687ede (patch)
tree7ad9b2b3ea536d8c7367186d435b34a6594aec7a /views/order/backendEdit/addVoucher.phtml
parentd1fe4168aaa7a4f0fca3774c3fc3dac8c98d741d (diff)
- BE Verwaltung
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7179 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/order/backendEdit/addVoucher.phtml')
-rw-r--r--views/order/backendEdit/addVoucher.phtml66
1 files changed, 66 insertions, 0 deletions
diff --git a/views/order/backendEdit/addVoucher.phtml b/views/order/backendEdit/addVoucher.phtml
new file mode 100644
index 0000000..7b90086
--- /dev/null
+++ b/views/order/backendEdit/addVoucher.phtml
@@ -0,0 +1,66 @@
+<?php
+
+ /**
+ * User: Daschmi (daschmi@daschmi.de)
+ * Date: 05.10.2018
+ * Time: 08:24
+ */
+
+ namespace wpsg;
+
+ /** @var wpsg_calculation $oCalculation */
+ $oCalculation = $this->view['oCalculation'];
+
+ if ($this->getBackendTaxView() === WPSG_NETTO) $strBN = 'NETTO';
+ else $strBN = 'BRUTTO';
+
+ $arCalculation = $oCalculation->getCalculationArray();
+
+ $strVal = ((isset($arCalculation['voucher'][0]['set']))?$arCalculation['voucher'][0]['set']:0);
+
+ if (strpos($strVal, '%') !== false) $strVal = wpsg_ff(wpsg_tf($strVal), '%');
+ else $strVal = wpsg_ff(wpsg_tf($strVal), $this->get_option('wpsg_currency'));
+
+?>
+
+<form id="wpsg_be_voucher_form">
+
+ <div class="autocomplete_wrap">
+ <?php echo wpsg_drawForm_Input('be_voucher_search', __('Gutscheinsuche', 'wpsg'), ''); ?>
+ </div>
+
+ <br />
+
+ <?php echo wpsg_drawForm_Input('be_voucher_code', __('Code (Optional)', 'wpsg'), @$arCalculation['voucher'][0]['code']); ?>
+ <?php echo wpsg_drawForm_Input('be_voucher_id', __('Guschein ID (Optional)', 'wpsg'), @$arCalculation['voucher'][0]['id']); ?>
+ <?php echo wpsg_drawForm_Input('be_voucher_amount', wpsg_translate(__('Gutscheinwert in #1# (#2#) oder % ', 'wpsg'), $this->get_option('wpsg_currency'), $strBN), $strVal); ?>
+
+</form>
+
+<script>
+
+ jQuery('#wpsg_be_voucher_form').on('submit', function() { return false; } );
+ jQuery('#be_voucher_search').focus();
+
+ jQuery(document).ready(function() {
+
+ jQuery('#be_voucher_search').autocomplete( {
+ source: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=editVoucher&do=search&noheader=1&edit_id=<?php echo $_REQUEST['edit_id']; ?>',
+ minLength: 2,
+ appendTo: ".autocomplete_wrap",
+ select: function(event, ui) {
+
+ jQuery('#be_voucher_code').val(ui.item.code);
+ jQuery('#be_voucher_id').val(ui.item.id);
+ jQuery('#be_voucher_amount').val(ui.item.gs_value);
+
+ jQuery('#be_voucher_search').val('');
+
+ return false;
+
+ }
+ } );
+
+ } );
+
+</script>