summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/admin/form/text.phtml21
-rw-r--r--views/admin/form/textarea.phtml10
-rw-r--r--views/css/admin.css3
-rw-r--r--views/js/editable.js43
-rw-r--r--views/mods/mod_export/profil.phtml2
-rw-r--r--views/mods/mod_ordervars/ov_list.phtml220
-rw-r--r--views/mods/mod_rechnungen/order_view.phtml399
-rw-r--r--views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml121
-rw-r--r--views/order/orderlog.phtml32
-rw-r--r--views/order/view.phtml596
-rw-r--r--views/order/view_customerdata.phtml112
-rw-r--r--views/order/view_dev.phtml32
-rw-r--r--views/order/view_general.phtml32
-rw-r--r--views/order/view_orderdata.phtml144
-rw-r--r--views/order/view_orderlog.phtml28
-rw-r--r--views/order/view_shippay.phtml31
-rw-r--r--views/produkt/addedit.phtml2
17 files changed, 869 insertions, 959 deletions
diff --git a/views/admin/form/text.phtml b/views/admin/form/text.phtml
index a9eb9fd..450c2ea 100644
--- a/views/admin/form/text.phtml
+++ b/views/admin/form/text.phtml
@@ -6,9 +6,9 @@
<div class="wpsg_field_wrap">
<?php if (wpsg_isTrue($this->view['field_config']['noP'])) { ?>
- <?php echo $this->view['field_value']; ?>
+ <span <?php echo ((wpsg_isSizedString($this->view['field_id']))?' id="'.$this->view['field_id'].'" ':''); ?>><?php echo $this->view['field_value']; ?></span>
<?php } else { ?>
- <p class="form-control-static" style="padding-left:0px;"><?php echo $this->view['field_value']; ?></p>
+ <p <?php echo ((wpsg_isSizedString($this->view['field_id']))?' id="'.$this->view['field_id'].'" ':''); ?> class="form-control-static" style="padding-left:0px;"><?php echo $this->view['field_value']; ?></p>
<?php } ?>
<?php if (wpsg_isSizedString($this->view['field_config']['help'])) { ?>
@@ -16,5 +16,22 @@
<?php } ?>
</div>
</div>
+
+ <?php if (isset($this->view['field_config']['inlineEdit']) && $this->view['field_config']['inlineEdit']) { ?>
+ <script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#<?php echo $this->view['field_id']; ?>').wspg_editable('<?php echo $this->view['field_config']['inlineEdit_url']; ?>', {
+ <?php if (wpsg_isSizedString($this->view['field_config']['inlineEdit_type'])) { ?>
+ 'type': '<?php echo $this->view['field_config']['inlineEdit_type']; ?>',
+ 'placement': 'bottom'
+ <?php } ?>
+ } );
+
+ } );
+
+ /* ]]> */</script>
+ <?php } ?>
</div> \ No newline at end of file
diff --git a/views/admin/form/textarea.phtml b/views/admin/form/textarea.phtml
index fabe0de..d016766 100644
--- a/views/admin/form/textarea.phtml
+++ b/views/admin/form/textarea.phtml
@@ -1,8 +1,14 @@
<div class="form-group form-group-sm form-textarea <?php echo ((wpsg_isSizedString($this->view['field_config']['help']))?'has-feedback':''); ?>">
+ <?php if (!isset($this->view['field_config']['noLabel']) || $this->view['field_config']['noLabel'] != true) { ?>
<label class="col-sm-6 control-label" for="<?php echo $this->view['field_id']; ?>"><?php echo $this->view['field_label']; ?></label>
-
- <div class="col-sm-6">
+ <?php } ?>
+
+ <?php if (isset($this->view['field_config']['noLabel']) && $this->view['field_config']['noLabel'] == true) { ?>
+ <div class="col-sm-12">
+ <?php } else { ?>
+ <div class="col-sm-6">
+ <?php } ?>
<div class="wpsg_field_wrap">
diff --git a/views/css/admin.css b/views/css/admin.css
index 0cefd82..139d3c2 100644
--- a/views/css/admin.css
+++ b/views/css/admin.css
@@ -132,6 +132,9 @@
.wpsg_order .col_nr .glyphicon.admincomment { color:red; }
.wpsg_order .wpsg-order-tab { padding-top:15px; padding-bottom:15px; }
+#wpsg-bs.wpsg_order_view .editableform textarea { height:150px;}
+.wpsg_order_view .wpsg_cell_gesamtpreis { text-align:right; }
+
/* Modulverwaltung */
.wpsg_admin_submenu .list-group-item.modul_akt { color:#3c763d; font-weight:bold; }
.wpsg_admin_submenu .list-group-item.modul_akt .glyphicon { position:absolute; right:5px; top:5px; color:#3c763d; }
diff --git a/views/js/editable.js b/views/js/editable.js
index 280730b..c9ccda8 100644
--- a/views/js/editable.js
+++ b/views/js/editable.js
@@ -25,11 +25,46 @@
if (typeof options.type == "string") opt['type'] = options.type;
- if (options.type == 'string' && typeof options.data == "string") {
-
+ if (options.type == "select" && typeof options.data == "string")
+ {
+
+ // Normale Übergabe eines JSON Strings
+ opt.source = jQuery.parseJSON(options.data);
+ opt.type = 'select';
+
+ }
+ else if (options.type == 'multiarray')
+ {
+
+ var ar = [];
+ var arData = jQuery.parseJSON(options.data);
+
+ for (var i in arData)
+ {
+
+ objData = { 'text': arData[i].name, 'children': [] };
+
+ for (var j in arData[i]['fields'])
+ {
+
+ objData['children'].push( { 'value': j, 'text': arData[i]['fields'][j] } );
+
+ }
+
+ ar.push(objData);
+
+ }
+
+ opt.source = ar;
+ opt.type = 'select';
+
+ }
+ else if (options.type == 'string' && typeof options.data == "string")
+ {
+
var ar = [];
var arData = jQuery.parseJSON(options.data);
-
+
for (var i in arData)
{
@@ -48,7 +83,7 @@
}
else
{
-
+
opt.display = function(value, sourceData) {
jQuery(this).html(sourceData);
diff --git a/views/mods/mod_export/profil.phtml b/views/mods/mod_export/profil.phtml
index 0d525b1..c07daed 100644
--- a/views/mods/mod_export/profil.phtml
+++ b/views/mods/mod_export/profil.phtml
@@ -258,7 +258,7 @@
},
submit: '<?php echo __('Speichern', 'wpsg'); ?>',
data: '<?php echo json_encode($this->view['fields']); ?>',
- type: 'select',
+ type: 'multiarray',
placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
diff --git a/views/mods/mod_ordervars/ov_list.phtml b/views/mods/mod_ordervars/ov_list.phtml
index 8ce1830..1cd4655 100644
--- a/views/mods/mod_ordervars/ov_list.phtml
+++ b/views/mods/mod_ordervars/ov_list.phtml
@@ -6,114 +6,118 @@
?>
<?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
-<table class="wpsg_ov_table">
- <tr>
- <th><?php echo __('ID', 'wpsg'); ?></th>
- <th class="wpsg_label"><?php echo __('Name', 'wpsg'); ?></th>
- <th class="wpsg_typ"><?php echo __('Typ', 'wpsg'); ?></th>
- <th class="wpsg_pflicht"><?php echo __('Pflicht', 'wpsg'); ?></th>
- <th class="wpsg_delcol"></th>
- </tr>
+<table class="wpsg_ov_table table table-body-striped">
+ <thead>
+ <tr>
+ <th><?php echo __('ID', 'wpsg'); ?></th>
+ <th class="wpsg_label"><?php echo __('Name', 'wpsg'); ?></th>
+ <th class="wpsg_typ"><?php echo __('Typ', 'wpsg'); ?></th>
+ <th class="wpsg_pflicht"><?php echo __('Pflicht', 'wpsg'); ?></th>
+ <th class="wpsg_delcol"></th>
+ </tr>
+ </thead>
<?php $i = 0; foreach ($this->view['data'] as $ov) { $i ++; ?>
- <tr class="wpsg_table wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>" id="ov_<?php echo $ov['id']; ?>">
- <td class="wpsg_id"><?php echo $ov['id']; ?></td>
- <td id="wpsg_ov_name_<?php echo $ov['id']; ?>" class="wpsg_label wpsg_editable"><?php echo wpsg_hspc(__($ov['name'], 'wpsg')); ?></td>
- <td id="wpsg_ov_typ_<?php echo $ov['id']; ?>" class="wpsg_typ wpsg_editable"><?php echo $this->mod->arTypen[$ov['typ']]; ?></td>
- <td class="wpsg_pflicht"><input type="checkbox" <?php echo (($ov['pflicht'] == '1')?'checked="checked"':''); ?> id="wpsg_ov_pflicht_<?php echo $ov['id']; ?>" /></td>
- <td class="wpsg_delcol">
-
- <a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Bestellvariable löschen', 'wpsg'); ?>" onclick="return wpsg_removeOV(<?php echo $ov['id']; ?>);"></a>
-
- <script type="text/javascript">
-
- jQuery('#wpsg_ov_name_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
- submitdata: {
- field: 'name',
- ov_id: '<?php echo $ov['id']; ?>'
- },
- submit: '<?php echo __('Speichern', 'wpsg'); ?>',
- placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
- indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
- tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
- });
-
- jQuery('#wpsg_ov_pflicht_<?php echo $ov['id']; ?>').bind('change', function() {
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=inlinedit',
- data: {
- field: 'pflicht',
- ov_id: '<?php echo $ov['id']; ?>',
- value: ((jQuery(this).attr("checked") == "checked")?'1':'0')
- }
- } );
-
- } );
-
- jQuery('#wpsg_ov_typ_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
- submitdata: {
- field: 'typ',
- ov_id: '<?php echo $ov['id']; ?>'
- },
- submit: '<?php echo __('Speichern', 'wpsg'); ?>',
- data: '<?php echo json_encode($this->mod->arTypen); ?>',
- type: 'select',
- placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
- indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
- tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
- callback: function(el) {
- if (el == '<?php echo __('Auswahl', 'wpsg'); ?>')
- {
- jQuery('#wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>').show();
- }
- else
- {
- jQuery('#wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>').hide();
- }
- }
- });
-
- function wpsg_removeOV(id)
- {
- jQuery.ajax({
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=del',
- data: {
- ov_id: id
- },
- success: function(data){
- if (data == 1)
- {
- location.reload();
- }
- }
- });
- }
-
- </script>
-
- </td>
- </tr>
- <tr class="wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>" id="wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>" style="<?php echo (($ov['typ'] != '1')?'display:none;':''); ?>">
- <td class="wpsg_id"></td>
- <td class="wpsg_select" colspan="4">
- <?php echo __('Auswahl', 'wpsg'); ?>:
- <span class="wpsg_editable" id="wpsg_ov_auswahl_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['auswahl']); ?></span>
- <script type="text/javascript">
-
- jQuery('#wpsg_ov_auswahl_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
- submitdata: {
- field: 'auswahl',
- ov_id: '<?php echo $ov['id']; ?>'
- },
- submit: '<?php echo __('Speichern', 'wpsg'); ?>',
- placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
- indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
- tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
- });
-
- </script>
- </td>
- </tr>
+ <tbody id="ov_<?php echo $ov['id']; ?>">
+ <tr class="wpsg_table wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td class="wpsg_id"><?php echo $ov['id']; ?></td>
+ <td><span id="wpsg_ov_name_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc(__($ov['name'], 'wpsg')); ?></span></td>
+ <td><span id="wpsg_ov_typ_<?php echo $ov['id']; ?>"><?php echo $this->mod->arTypen[$ov['typ']]; ?></span></td>
+ <td class="wpsg_pflicht"><input type="checkbox" <?php echo (($ov['pflicht'] == '1')?'checked="checked"':''); ?> id="wpsg_ov_pflicht_<?php echo $ov['id']; ?>" /></td>
+ <td class="wpsg_delcol">
+
+ <a class="wpsg_icon wpsg_icon_remove" href="#" title="<?php echo __('Bestellvariable löschen', 'wpsg'); ?>" onclick="return wpsg_removeOV(<?php echo $ov['id']; ?>);"></a>
+
+ <script type="text/javascript">
+
+ jQuery('#wpsg_ov_name_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'name',
+ ov_id: '<?php echo $ov['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ jQuery('#wpsg_ov_pflicht_<?php echo $ov['id']; ?>').bind('change', function() {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=inlinedit',
+ data: {
+ field: 'pflicht',
+ ov_id: '<?php echo $ov['id']; ?>',
+ value: ((jQuery(this).attr("checked") == "checked")?'1':'0')
+ }
+ } );
+
+ } );
+
+ jQuery('#wpsg_ov_typ_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'typ',
+ ov_id: '<?php echo $ov['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ data: '<?php echo json_encode($this->mod->arTypen); ?>',
+ type: 'select',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ callback: function(el) {
+ if (el == '<?php echo __('Auswahl', 'wpsg'); ?>')
+ {
+ jQuery('#wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>').show();
+ }
+ else
+ {
+ jQuery('#wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>').hide();
+ }
+ }
+ });
+
+ function wpsg_removeOV(id)
+ {
+ jQuery.ajax({
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&noheader=1&do=del',
+ data: {
+ ov_id: id
+ },
+ success: function(data){
+ if (data == 1)
+ {
+ location.reload();
+ }
+ }
+ });
+ }
+
+ </script>
+
+ </td>
+ </tr>
+ <tr class="wpsg_tablerow <?php echo (($i % 2 == 0)?'odd':'even'); ?>" id="wpsg_ov_auswahlrow_<?php echo $ov['id']; ?>" style="<?php echo (($ov['typ'] != '1')?'display:none;':''); ?>">
+ <td class="wpsg_id"></td>
+ <td class="wpsg_select" colspan="4">
+ <?php echo __('Auswahl', 'wpsg'); ?>:
+ <span class="wpsg_editable" id="wpsg_ov_auswahl_<?php echo $ov['id']; ?>"><?php echo wpsg_hspc($ov['auswahl']); ?></span>
+ <script type="text/javascript">
+
+ jQuery('#wpsg_ov_auswahl_<?php echo $ov['id']; ?>').wspg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ordervars&do=inlinedit&noheader=1', {
+ submitdata: {
+ field: 'auswahl',
+ ov_id: '<?php echo $ov['id']; ?>'
+ },
+ submit: '<?php echo __('Speichern', 'wpsg'); ?>',
+ placeholder: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>',
+ indicator: '<?php echo __('Speicher ...', 'wpsg'); ?>',
+ tooltip: '<?php echo __('Zum Bearbeiten anklicken ...', 'wpsg'); ?>'
+ });
+
+ </script>
+ </td>
+ </tr>
+ </tbody>
<?php } ?>
</table>
<p class="wpsg_hinweis"><?php echo __('Die Reihenfolge lässt sich mittels Drag&Drop verändern.', 'wpsg'); ?>
@@ -124,7 +128,7 @@
jQuery('.wpsg_ov_table').sortable( {
helper: wpsg_Tablefix,
- items: 'tr.wpsg_tablerow',
+ items: 'tbody',
handler: '.wpsg_id',
update: function(event, ui) {
diff --git a/views/mods/mod_rechnungen/order_view.phtml b/views/mods/mod_rechnungen/order_view.phtml
index 9551099..3b68a39 100644
--- a/views/mods/mod_rechnungen/order_view.phtml
+++ b/views/mods/mod_rechnungen/order_view.phtml
@@ -74,205 +74,200 @@
</script>
-<div class="postbox" id="wpsg_rechnungen">
- <h3 class="wpsg_handlediv">
- <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
- <span><?php echo __('Rechnungen', 'wpsg'); ?></span>
- </h3>
- <div class="inside">
-
- <?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) == 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_storno']) == 0) { ?>
- <p><?php echo __('Bisher keine Rechnungen geschrieben.', 'wpsg'); ?></p>
- <?php } else { ?>
- <table>
- <?php foreach ($this->view['mod_rechnungen']['arRechnungen_gesamt'] as $r) { ?>
- <tr>
- <td>#<?php echo (($r['rnr'] != '')?$r['rnr']:$r['gnr']); ?>
-
- <?php if ($r['storno'] == "0000-00-00 00:00:00") { ?>
- <?php if ($r['gnr'] != "") { ?>
- <?php echo wpsg_translate(__('Rechnungskorrektur vom #1#', 'wpsg'), date("d.m.Y", $r['ts_datum'])); ?>
- <?php } else { ?>
- <?php echo wpsg_translate(__('Rechnung geschrieben am #1#', 'wpsg'), date("d.m.Y", $r['ts_datum'])); ?>
- <?php } ?>
- <?php } else { ?>
- <?php echo wpsg_translate(__("Rechnung storniert am #1#", "wpsg"), date("d.m.Y", $r['ts_storno'])); ?>
- <?php } ?>
-
- </td>
- <td style="text-align:right;">
-
- <?php
-
- if ($r['rnr'] != "")
- {
- $rfile = $this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'], true)).'R'.$r['rnr'].'.pdf';
- }
- else if ($r['gnr'] != "")
- {
- $rfile = $this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'], true)).'G'.$r['gnr'].'.pdf';
- }
-
- ?>
-
- <a target="_blank" onclick="if (!confirm('<?php echo __('Sind Sie sicher, dass Sie eine Kopie dieser Rechnung/Rechnungskorrektur erneut an den Kunden senden möchten?', 'wpsg'); ?>')) return false;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id=<?php echo $this->view['data']['id']; ?>&r_id=<?php echo $r['id']; ?>&do=copy"><?php echo __("Kopie senden", "wpsg"); ?></a>&nbsp;
- <a target="_blank" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_rechnungen&do=getRechnung&edit_id=<?php echo $this->view['data']['id']; ?>&r_id=<?php echo $r['id']; ?>"><?php echo __("Ansehen", "wpsg"); ?></a>
-
- </td>
- </tr>
- <?php } ?>
- </table>
- <br />
- <?php } ?>
-
- <?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) > 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_gesamt']) != sizeof($this->view['mod_rechnungen']['arRechnungen_storno'])) { ?>
- <fieldset style="border:1px solid #999999; width:100%;">
- <legend style="margin-left:7px; margin-right:10px;"><?php echo __("Bestellstorno: Rechnungskorrektur erstellen", "wpsg"); ?></legend>
- <div style="padding:10px;">
- <form id="storno_form" target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno">
-
- <input type="hidden" name="send" value="1" />
-
- <label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '0');" type="radio" value="0" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift0" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnung komplett stornieren und keine Rechnungskorrektur erstellen.", "wpsg"); ?></label><br />
- <label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '1');" type="radio" value="1" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift1" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnungskorrektur erstellen.", "wpsg"); ?></label><br />
- <label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '2');" type="radio" value="2" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift2" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnungskorrektur erstellen und an Kunden senden.", "wpsg"); ?></label><br />
-
- <div id="wpsg_mod_rechnungen_fee_layer" style="display:none;">
- <?php echo wpsg_drawForm_Input('wpsg_mod_rechnungen_fee', __('Gebühr für Rechnungskorrektur', 'wpsg'), ''); ?>
- </div>
-
- <div class="wpsg_clear"></div><br />
-
- <input onclick="return wpsg_mod_rechnungen_storno();" id="wpsg_rechnungen_stornobutton" class="button" type="submit" name="form_submit" value="<?php echo __("Stornieren", "wpsg"); ?>" style="float:right;" />
- <input id="wpsg_mod_rechnungen_stornopreview" class="button" type="submit" name="form_submit_preview" value="<?php echo __('Vorschau', 'wpsg'); ?>" style="float:right; margin-right:10px;" />
-
- <script type="text/javascript">
-
- jQuery(document).ready(function() {
-
- jQuery("[name=wpsg_rechnungen_gutschrift]").filter("[value=" + jQuery.cookie("wpsg_rechnungen_stornoradio") + "]").attr("checked","checked");
-
- jQuery("#wpsg_rechnungen_stornobutton").bind("click", function() {
-
- if (jQuery("#wpsg_rechnungen_gutschrift1").attr("checked") || jQuery("#wpsg_rechnungen_gutschrift2").attr("checked"))
- {
-
- //jQuery("#storno_form").attr("action", "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno");
- jQuery("#storno_form").attr("target", "_blank");
-
- window.setTimeout(function() {
- location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>";
- }, 1500);
-
- }
- else
- {
-
- //jQuery("#storno_form").attr("action", "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno");
- jQuery("#storno_form").attr("target", "");
-
- }
-
- });
-
- });
-
- </script>
-
- </form>
- <div class="wpsg_hinweis"><?php echo __("Eine neue Rechnung kann erst geschrieben werden wenn alle bestehenden Rechnungen zu dieser Bestellung storniert wurden.", "wpsg"); ?></div>
- <div class="wpsg_clear"></div>
- </div>
- </fieldset>
- <?php } else { ?>
-
- <fieldset style="border:1px solid #999999; width:100%;">
- <legend style="margin-left:10px; margin-right:10px;"><?php echo __("Neue Rechnung", "wpsg"); ?></legend>
- <div style="padding:5px;">
-
- <form target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_rechnungen&cmd=rechnung&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>">
-
- <input type="hidden" name="send" value="1" />
-
- <label style="height:25px; width:240px; float:left; margin-top:10px;">
- <input onchange="if (this.checked) jQuery('#wpsg_rechnungen_email').show(); else jQuery('#wpsg_rechnungen_email').hide();" type="checkbox" checked="checked" value="1" name="wpsg_rechnungen_sendmail" />
- &nbsp;<?php echo __("E-Mail an Kunden senden.", "wpsg"); ?>
- </label>
- <input type="text" style="display:block; width:300px; float:right;" id="wpsg_rechnungen_email" name="wpsg_rechnungen_email" value="<?php echo wpsg_hspc($this->view['data']['email']); ?>" />
- <div style="clear:both; width:100%; height:5px;"></div>
-
- <label style="height:25px; width:240px; float:left;">
- <input checked="checked" onchange="if (this.checked) jQuery('#wpsg_rechnungen_faelligkeitsdatum').show(); else jQuery('#wpsg_rechnungen_faelligkeitsdatum').hide();" type="checkbox" value="1" name="wpsg_rechnungen_faelligkeit" />
- &nbsp;<?php echo __("Fälligkeit anzeigen.", "wpsg"); ?>
- </label>
- <input type="text" style="display:block; width:300px; float:right;" id="wpsg_rechnungen_faelligkeitsdatum" name="wpsg_rechnungen_faelligkeitsdatum" value="<?php echo date("d.m.Y", time() + ($this->get_option("wpsg_rechnungen_faelligkeit") * 86400)); ?>" />
- <div style="clear:both; width:100%; height:5px;"></div>
-
- <label style="height:25px; width:220px; float:left;">
- <input checked="checked" onchange="if (this.checked) jQuery('#wpsg_rechnungen_status').show(); else jQuery('#wpsg_rechnungen_status').hide();" type="checkbox" value="1" name="wpsg_rechnungen_status" />
- &nbsp;<?php echo __("Neuer Status:", "wpsg"); ?>
- </label>
- <select style="width:300px; float:right;" id="wpsg_rechnungen_status_neu" name="wpsg_rechnungen_status_neu">
- <?php foreach ($this->arStatus as $k => $v) { ?>
- <option value="<?php echo $k; ?>" <?php echo (($k == 110)?'selected="selected"':''); ?>><?php echo $v; ?></option>
- <?php } ?>
- </select>
- <div style="clear:both; width:100%; height:5px;"></div>
-
- <label style="height:25px; width:240px; float:left;">
- <input <?php echo (($this->get_option("wpsg_rechnungen_url_std") === "1")?'checked="checked"':''); ?> type="checkbox" value="1" name="wpsg_rechnungen_url" />
- &nbsp;<?php echo __("URL Benachrichtigung", "wpsg"); ?>
- </label>
- <div style="clear:both; width:100%; height:5px;"></div>
-
- <label style="height:25px; width:240px; float:left; padding-left:22px;">
- <?php echo __("Rechnungsdatum", "wpsg"); ?>:
- </label>
- <input style="display:block;float:right; width:300px;" type="text" name="wpsg_rechnungen_datum" value="<?php echo date("d.m.Y", time()); ?>" />
- <div style="clear:both; width:100%; height:5px;"></div>
-
- <label for="wpsg_rechnungen_fusstext" style="height:25px; width:220px; padding-left:22px; float:left">
- <?php echo __("Fußtext", "wpsg"); ?>
- </label>
-
- <?php
-
- $wpsg_rechnungen_footer = $this->get_option("wpsg_rechnungen_footer");
- if (!is_array($wpsg_rechnungen_footer)) $wpsg_rechnungen_footer = unserialize($this->get_option("wpsg_rechnungen_footer"));
- if (!is_array($wpsg_rechnungen_footer)) $wpsg_rechnungen_footer = Array();
-
- ?>
-
- <?php if (sizeof($wpsg_rechnungen_footer) > 0) { ?>
- <select style="width:300px; float:right;" id="wpsg_rechnungen_select" onchange="jQuery('#wpsg_rechnungen_fusstext').val(this.value);">
- <?php foreach ($wpsg_rechnungen_footer as $k => $v) { ?>
- <option value="<?php echo wpsg_hspc($v[1]); ?>"><?php echo wpsg_hspc($v[0]); ?></option>
- <?php } ?>
- </select>
- <?php } ?>
-
- <div style="clear:both; width:100%; height:5px;"></div>
- <div style="padding-left:25px;"><input style="width:100%;" type="text" name="wpsg_rechnungen_fusstext" id="wpsg_rechnungen_fusstext" value="" /></div>
- <div style="clear:both; width:100%; height:15px;"></div>
-
- <script type="text/javascript">
-
- jQuery(document).ready(function() {
- jQuery('#wpsg_rechnungen_fusstext').val(jQuery("#wpsg_rechnungen_select").val());
- });
-
- </script>
-
- <input class="button" style="float:right;" onclick="window.setTimeout(function() { location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>'; }, 1000);" name="wpsg_rechnungen_write" type="submit" value="<?php echo __("Rechnung schreiben", "wpsg"); ?>" />
- <input class="button" style="float:right; margin-right:10px;" name="wpsg_rechnungen_preview" type="submit" value="<?php echo __("Vorschau", "wpsg"); ?>" />
-
- <div style="clear:both; width:100%; height:5px;"></div>
-
- </form>
- </div>
- </fieldset>
-
- <?php } ?>
-
- </div>
-</div> \ No newline at end of file
+<?php echo wpsg_drawForm_AdminboxStart(__('Rechnungen', 'wpsg')); ?>
+
+ <?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) == 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_storno']) == 0) { ?>
+ <p><?php echo __('Bisher keine Rechnungen geschrieben.', 'wpsg'); ?></p>
+ <?php } else { ?>
+ <table>
+ <?php foreach ($this->view['mod_rechnungen']['arRechnungen_gesamt'] as $r) { ?>
+ <tr>
+ <td>#<?php echo (($r['rnr'] != '')?$r['rnr']:$r['gnr']); ?>
+
+ <?php if ($r['storno'] == "0000-00-00 00:00:00") { ?>
+ <?php if ($r['gnr'] != "") { ?>
+ <?php echo wpsg_translate(__('Rechnungskorrektur vom #1#', 'wpsg'), date("d.m.Y", $r['ts_datum'])); ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('Rechnung geschrieben am #1#', 'wpsg'), date("d.m.Y", $r['ts_datum'])); ?>
+ <?php } ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__("Rechnung storniert am #1#", "wpsg"), date("d.m.Y", $r['ts_storno'])); ?>
+ <?php } ?>
+
+ </td>
+ <td style="text-align:right;">
+
+ <?php
+
+ if ($r['rnr'] != "")
+ {
+ $rfile = $this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'], true)).'R'.$r['rnr'].'.pdf';
+ }
+ else if ($r['gnr'] != "")
+ {
+ $rfile = $this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'], true)).'G'.$r['gnr'].'.pdf';
+ }
+
+ ?>
+
+ <a target="_blank" onclick="if (!confirm('<?php echo __('Sind Sie sicher, dass Sie eine Kopie dieser Rechnung/Rechnungskorrektur erneut an den Kunden senden möchten?', 'wpsg'); ?>')) return false;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id=<?php echo $this->view['data']['id']; ?>&r_id=<?php echo $r['id']; ?>&do=copy"><?php echo __("Kopie senden", "wpsg"); ?></a>&nbsp;
+ <a target="_blank" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&noheader=1&mod=wpsg_mod_rechnungen&do=getRechnung&edit_id=<?php echo $this->view['data']['id']; ?>&r_id=<?php echo $r['id']; ?>"><?php echo __("Ansehen", "wpsg"); ?></a>
+
+ </td>
+ </tr>
+ <?php } ?>
+ </table>
+ <br />
+ <?php } ?>
+
+ <?php if (sizeof($this->view['mod_rechnungen']['arRechnungen']) > 0 && sizeof($this->view['mod_rechnungen']['arRechnungen_gesamt']) != sizeof($this->view['mod_rechnungen']['arRechnungen_storno'])) { ?>
+ <fieldset style="border:1px solid #999999; width:100%;">
+ <legend style="margin-left:7px; margin-right:10px;"><?php echo __("Bestellstorno: Rechnungskorrektur erstellen", "wpsg"); ?></legend>
+ <div style="padding:10px;">
+ <form id="storno_form" target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno">
+
+ <input type="hidden" name="send" value="1" />
+
+ <label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '0');" type="radio" value="0" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift0" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnung komplett stornieren und keine Rechnungskorrektur erstellen.", "wpsg"); ?></label><br />
+ <label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '1');" type="radio" value="1" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift1" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnungskorrektur erstellen.", "wpsg"); ?></label><br />
+ <label><input onclick="jQuery.cookie('wpsg_rechnungen_stornoradio', '2');" type="radio" value="2" class="wpsg_rechnungen_gutschrift" id="wpsg_rechnungen_gutschrift2" name="wpsg_rechnungen_gutschrift" />&nbsp;<?php echo __("Rechnungskorrektur erstellen und an Kunden senden.", "wpsg"); ?></label><br />
+
+ <div id="wpsg_mod_rechnungen_fee_layer" style="display:none;">
+ <?php echo wpsg_drawForm_Input('wpsg_mod_rechnungen_fee', __('Gebühr für Rechnungskorrektur', 'wpsg'), ''); ?>
+ </div>
+
+ <div class="wpsg_clear"></div><br />
+
+ <input onclick="return wpsg_mod_rechnungen_storno();" id="wpsg_rechnungen_stornobutton" class="button" type="submit" name="form_submit" value="<?php echo __("Stornieren", "wpsg"); ?>" style="float:right;" />
+ <input id="wpsg_mod_rechnungen_stornopreview" class="button" type="submit" name="form_submit_preview" value="<?php echo __('Vorschau', 'wpsg'); ?>" style="float:right; margin-right:10px;" />
+
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+
+ jQuery("[name=wpsg_rechnungen_gutschrift]").filter("[value=" + jQuery.cookie("wpsg_rechnungen_stornoradio") + "]").attr("checked","checked");
+
+ jQuery("#wpsg_rechnungen_stornobutton").bind("click", function() {
+
+ if (jQuery("#wpsg_rechnungen_gutschrift1").attr("checked") || jQuery("#wpsg_rechnungen_gutschrift2").attr("checked"))
+ {
+
+ //jQuery("#storno_form").attr("action", "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno");
+ jQuery("#storno_form").attr("target", "_blank");
+
+ window.setTimeout(function() {
+ location.href = "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>";
+ }, 1500);
+
+ }
+ else
+ {
+
+ //jQuery("#storno_form").attr("action", "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_rechnungen&edit_id=<?php echo $this->view['data']['id']; ?>&do=storno");
+ jQuery("#storno_form").attr("target", "");
+
+ }
+
+ });
+
+ });
+
+ </script>
+
+ </form>
+ <div class="wpsg_hinweis"><?php echo __("Eine neue Rechnung kann erst geschrieben werden wenn alle bestehenden Rechnungen zu dieser Bestellung storniert wurden.", "wpsg"); ?></div>
+ <div class="wpsg_clear"></div>
+ </div>
+ </fieldset>
+ <?php } else { ?>
+
+ <fieldset>
+ <legend><?php echo __("Neue Rechnung", "wpsg"); ?></legend>
+
+ <div>
+
+ <form target="_blank" method="post" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_rechnungen&cmd=rechnung&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>">
+
+ <input type="hidden" name="send" value="1" />
+
+ <label style="height:25px; width:240px; float:left; margin-top:10px;">
+ <input onchange="if (this.checked) jQuery('#wpsg_rechnungen_email').show(); else jQuery('#wpsg_rechnungen_email').hide();" type="checkbox" checked="checked" value="1" name="wpsg_rechnungen_sendmail" />
+ &nbsp;<?php echo __("E-Mail an Kunden senden.", "wpsg"); ?>
+ </label>
+ <input type="text" style="display:block; width:300px; float:right;" id="wpsg_rechnungen_email" name="wpsg_rechnungen_email" value="<?php echo wpsg_hspc($this->view['data']['email']); ?>" />
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ <label style="height:25px; width:240px; float:left;">
+ <input checked="checked" onchange="if (this.checked) jQuery('#wpsg_rechnungen_faelligkeitsdatum').show(); else jQuery('#wpsg_rechnungen_faelligkeitsdatum').hide();" type="checkbox" value="1" name="wpsg_rechnungen_faelligkeit" />
+ &nbsp;<?php echo __("Fälligkeit anzeigen.", "wpsg"); ?>
+ </label>
+ <input type="text" style="display:block; width:300px; float:right;" id="wpsg_rechnungen_faelligkeitsdatum" name="wpsg_rechnungen_faelligkeitsdatum" value="<?php echo date("d.m.Y", time() + ($this->get_option("wpsg_rechnungen_faelligkeit") * 86400)); ?>" />
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ <label style="height:25px; width:220px; float:left;">
+ <input checked="checked" onchange="if (this.checked) jQuery('#wpsg_rechnungen_status').show(); else jQuery('#wpsg_rechnungen_status').hide();" type="checkbox" value="1" name="wpsg_rechnungen_status" />
+ &nbsp;<?php echo __("Neuer Status:", "wpsg"); ?>
+ </label>
+ <select style="width:300px; float:right;" id="wpsg_rechnungen_status_neu" name="wpsg_rechnungen_status_neu">
+ <?php foreach ($this->arStatus as $k => $v) { ?>
+ <option value="<?php echo $k; ?>" <?php echo (($k == 110)?'selected="selected"':''); ?>><?php echo $v; ?></option>
+ <?php } ?>
+ </select>
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ <label style="height:25px; width:240px; float:left;">
+ <input <?php echo (($this->get_option("wpsg_rechnungen_url_std") === "1")?'checked="checked"':''); ?> type="checkbox" value="1" name="wpsg_rechnungen_url" />
+ &nbsp;<?php echo __("URL Benachrichtigung", "wpsg"); ?>
+ </label>
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ <label style="height:25px; width:240px; float:left; padding-left:22px;">
+ <?php echo __("Rechnungsdatum", "wpsg"); ?>:
+ </label>
+ <input style="display:block;float:right; width:300px;" type="text" name="wpsg_rechnungen_datum" value="<?php echo date("d.m.Y", time()); ?>" />
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ <label for="wpsg_rechnungen_fusstext" style="height:25px; width:220px; padding-left:22px; float:left">
+ <?php echo __("Fußtext", "wpsg"); ?>
+ </label>
+
+ <?php
+
+ $wpsg_rechnungen_footer = $this->get_option("wpsg_rechnungen_footer");
+ if (!is_array($wpsg_rechnungen_footer)) $wpsg_rechnungen_footer = unserialize($this->get_option("wpsg_rechnungen_footer"));
+ if (!is_array($wpsg_rechnungen_footer)) $wpsg_rechnungen_footer = Array();
+
+ ?>
+
+ <?php if (sizeof($wpsg_rechnungen_footer) > 0) { ?>
+ <select style="width:300px; float:right;" id="wpsg_rechnungen_select" onchange="jQuery('#wpsg_rechnungen_fusstext').val(this.value);">
+ <?php foreach ($wpsg_rechnungen_footer as $k => $v) { ?>
+ <option value="<?php echo wpsg_hspc($v[1]); ?>"><?php echo wpsg_hspc($v[0]); ?></option>
+ <?php } ?>
+ </select>
+ <?php } ?>
+
+ <div style="clear:both; width:100%; height:5px;"></div>
+ <div style="padding-left:25px;"><input style="width:100%;" type="text" name="wpsg_rechnungen_fusstext" id="wpsg_rechnungen_fusstext" value="" /></div>
+ <div style="clear:both; width:100%; height:15px;"></div>
+
+ <script type="text/javascript">
+
+ jQuery(document).ready(function() {
+ jQuery('#wpsg_rechnungen_fusstext').val(jQuery("#wpsg_rechnungen_select").val());
+ });
+
+ </script>
+
+ <input class="button" style="float:right;" onclick="window.setTimeout(function() { location.href = '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>'; }, 1000);" name="wpsg_rechnungen_write" type="submit" value="<?php echo __("Rechnung schreiben", "wpsg"); ?>" />
+ <input class="button" style="float:right; margin-right:10px;" name="wpsg_rechnungen_preview" type="submit" value="<?php echo __("Vorschau", "wpsg"); ?>" />
+
+ <div style="clear:both; width:100%; height:5px;"></div>
+
+ </form>
+ </div>
+ </fieldset>
+
+ <?php } ?>
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?> \ No newline at end of file
diff --git a/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml b/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml
index 6301aba..ff3723c 100644
--- a/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml
+++ b/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml
@@ -8,70 +8,75 @@
<script type="text/javascript">/* <![CDATA[ */
- function wpsg_editShippingAdress()
+ function wpsg_saveShippingAdress()
{
- jQuery('#wpsg_ShippingDialog').dialog( {
- 'dialogClass': 'wp-dialog',
- 'modal': true,
- 'width': 600,
- 'title': '<?php echo __('Lieferanschrift ändern', 'wpsg'); ?>',
- 'autoOpen': true,
- 'closeOnEscape': true,
- 'buttons': {
- "<?php echo __('Speichern', 'wpsg'); ?>": function() {
-
- jQuery('#wpsg_backend_loading').show();
- jQuery(this).dialog('close');
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_shippingadress&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1',
- data: {
- form_data: jQuery('#wpsg_ShippingDialog input, #wpsg_ShippingDialog select').serialize()
- },
- success: function(data) {
-
- location.href = location.href;
-
- }
- } );
-
- }
- }
- } );
+ jQuery('#wpsg_backend_loading').show();
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_shippingadress&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1',
+ data: {
+ form_data: jQuery('#shipping_dialog_content input, #shipping_dialog_content select').serialize()
+ },
+ success: function(data) {
+
+ location.href = location.href;
+
+ }
+ } );
return false;
- }
+ } // function wpsg_saveShippingAdress()
/* ]]> */</script>
-<div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <?php echo __('Lieferadresse', 'wpsg'); ?>:
- <a style="float:none; display:inline-block;" onclick="return wpsg_editShippingAdress();" class="wpsg_icon wpsg_icon_edit" href="#" title="<?php echo __('Rechnungsanschrift ändern', 'wpsg'); ?>"></a>
- </div>
- <div class="wpsg_form_right">
- <p>
- <?php if (trim($this->view['wpsg_mod_shippingadress']['shipping_firma']) != '') { ?>
- <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_firma']); ?><br />
- <?php } ?>
- <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_title']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_vname']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_name']); ?><br />
- <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_strasse']); ?><br />
- <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_plz']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_ort']); ?> <?php echo wpsg_hspc($this->view['shipping_country']['kuerzel']); ?><br />
- </p>
- </div>
-
- <div id="wpsg_ShippingDialog" class="wpsg_dialog" style="display:none;">
- <?php echo wpsg_drawForm_Input('dialog_shipping_firma', __('Firma', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_firma']); ?>
- <?php echo wpsg_drawForm_Select('dialog_shipping_title', __('Anschrift', 'wpsg'), $this->view['arTitles'], $this->view['wpsg_mod_shippingadress']['shipping_title'], array('noIndex' => true)); ?>
- <?php echo wpsg_drawForm_Input('dialog_shipping_vname', __('Vorname', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_vname']); ?>
- <?php echo wpsg_drawForm_Input('dialog_shipping_name', __('Name', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_name']); ?>
- <?php echo wpsg_drawForm_Input('dialog_shipping_strasse', __('Straße', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_strasse']); ?>
- <?php echo wpsg_drawForm_Input('dialog_shipping_plz', __('Postleitzahl', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_plz']); ?>
- <?php echo wpsg_drawForm_Input('dialog_shipping_ort', __('Ort', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_ort']); ?>
- <?php echo wpsg_drawForm_Select('dialog_shipping_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['wpsg_mod_shippingadress']['shipping_land']); ?>
- </div>
-
+<div class="modal fade" tabindex="-1" role="dialog" id="wpsg_customer_shipping_edit">
+ <div class="modal-dialog" role="document">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+ <h4 class="modal-title"><?php echo __('Lieferanschrift beatbeiten', 'wpsg'); ?></h4>
+ </div>
+ <div class="modal-body">
+
+ <div id="shipping_dialog_content">
+ <?php echo wpsg_drawForm_Input('dialog_shipping_firma', __('Firma', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_firma']); ?>
+ <?php echo wpsg_drawForm_Select('dialog_shipping_title', __('Anschrift', 'wpsg'), $this->view['arTitles'], $this->view['wpsg_mod_shippingadress']['shipping_title'], array('noIndex' => true)); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_vname', __('Vorname', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_vname']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_name', __('Name', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_name']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_strasse', __('Straße', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_strasse']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_plz', __('Postleitzahl', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_plz']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_ort', __('Ort', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_ort']); ?>
+ <?php echo wpsg_drawForm_Select('dialog_shipping_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['wpsg_mod_shippingadress']['shipping_land']); ?>
+ </div>
+
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Schließen', 'wpsg'); ?></button>
+ <button type="button" class="btn btn-primary" onclick="return wpsg_saveShippingAdress();"><?php echo __('Speichern', 'wpsg'); ?></button>
+ </div>
+ </div>
+ </div>
</div>
-<div class="wpsg_clear"></div>
+
+<?php echo wpsg_drawForm_TextStart(); ?>
+
+ <?php if (trim($this->view['wpsg_mod_shippingadress']['shipping_firma']) != '') { ?>
+ <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_firma']); ?><br />
+ <?php } ?>
+ <?php
+
+ if (wpsg_isSizedString($this->view['wpsg_mod_shippingadress']['shipping_title']) && $this->view['wpsg_mod_shippingadress']['shipping_title'] != '-1')
+ echo $this->view['arTitles'][$this->view['wpsg_mod_shippingadress']['shipping_title']];
+
+ ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_vname']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_name']); ?><br />
+ <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_strasse']); ?><br />
+ <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_plz']); ?> <?php echo wpsg_hspc($this->view['wpsg_mod_shippingadress']['shipping_ort']); ?> <?php echo wpsg_hspc($this->view['shipping_country']['kuerzel']); ?><br />
+
+ <a style="position: absolute; right:25px; top:10px; display:inline-block;" data-toggle="modal" data-target="#wpsg_customer_shipping_edit" href="#" title="<?php echo __('Rechnungsanschrift ändern', 'wpsg'); ?>">
+ <span class="glyphicon glyphicon-pencil"></span>
+ </a>
+
+<?php echo wpsg_drawForm_TextEnd(__('Lieferadresse', 'wpsg')); ?>
+
diff --git a/views/order/orderlog.phtml b/views/order/orderlog.phtml
deleted file mode 100644
index df51721..0000000
--- a/views/order/orderlog.phtml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-
- /**
- * Template für das Bestell Log
- */
-
-?>
-<?php if (is_array($this->view['log']) && sizeof($this->view['log']) > 0) { ?>
-<table class="wpsg_orderlog">
- <tr>
- <th class="col_date"><?php echo __('Datum', 'wpsg'); ?></th>
- <th class="col_title"><?php echo __('Titel', 'wpsg'); ?></th>
- <th class="col_aktion"></th>
- </tr>
- <?php foreach ($this->view['log'] as $l) { ?>
- <tr>
- <td class="col_date"><?php echo date('d.m.Y H:i:s', strtotime($l['cdate'])); ?></td>
- <td class="col_title"><?php echo $l['title']; ?></td>
- <td class="col_aktion">
- <a href="#" onclick="jQuery('#wpsg_mailtext_<?php echo $l['id']; ?>').toggle(); return false"><?php echo __('Anzeigen/Verbergen', 'wpsg'); ?></a>
- </td>
- </tr>
- <tr id="wpsg_mailtext_<?php echo $l['id']; ?>" style="display:none;">
- <td colspan="3" class="col_mailtext">
- <textarea readonly="readonly"><?php echo wpsg_xss($l['mailtext']); ?></textarea>
- </td>
- </tr>
- <?php } ?>
-</table>
-<?php } else { ?>
-<?php echo __('Noch keine Einträge', 'wpsg'); ?>
-<?php } ?> \ No newline at end of file
diff --git a/views/order/view.phtml b/views/order/view.phtml
index b96f42b..3275360 100644
--- a/views/order/view.phtml
+++ b/views/order/view.phtml
@@ -5,575 +5,73 @@
*/
?>
-<script type="text/javascript">/* <![CDATA[ */
+<div class="wpsg_order_view" id="wpsg-bs">
- function wpsg_editInvoiceAdress()
- {
+ <nav class="navbar navbar-default">
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
+ </div>
+ <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+ <ul class="nav navbar-nav">
+ <li role="presentation" class="<?php echo ((!isset($_REQUEST['action']))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order"><?php echo __("Bestellübersicht", "wpsg"); ?></a></li>
+ <li role="presentation" class="wpsg_showhide_filter active"><a href="#" onclick="return false;"><?php echo __("Bestellansicht", "wpsg"); ?></a></li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+
+ </ul>
+ </div>
+ </div>
+
+ </nav>
- jQuery('#wpsg_InvoiceDialog').dialog( {
- 'dialogClass': 'wp-dialog',
- 'modal': true,
- 'width': 600,
- 'title': '<?php echo __('Anschrift ändern (Kundendaten)', 'wpsg'); ?>',
- 'autoOpen': true,
- 'closeOnEscape': true,
- 'buttons': {
- "<?php echo __('Speichern', 'wpsg'); ?>": function() {
+ <?php echo $this->writeBackendMessage(); ?>
- jQuery('#wpsg_backend_loading').show();
- jQuery(this).dialog('close');
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=saveInvoiceAdress&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1',
- data: {
- form_data: jQuery('#wpsg_InvoiceDialog input, #wpsg_InvoiceDialog select').serialize()
- },
- success: function(data) {
-
- location.href = location.href;
-
- }
- } );
-
- }
- }
- } );
+ <div class="wpsg_admin_submenu">
- return false;
-
- }
-
- function wpsg_reloadOrderLog()
- {
+ <div class="list-group" id="wpsg_order_view_tabs">
+ <span class="list-group-head list-group-item"><?php echo wpsg_translate(__('Bestellung ID:#1#', 'wpsg'), $this->view['data']['id']); ?></span>
- jQuery('#wpsg_orderlog_content').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
-
- jQuery.ajax( {
- url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=orderLog&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1',
- success: function(data) {
- jQuery('#wpsg_orderlog_content').html(data);
- }
- } );
-
- return false;
-
- } // function wpsg_reloadOrderLog()
+ <?php $i = 0; foreach ($this->view['arSubAction'] as $k => $v) { $i ++; ?>
+ <a class="list-group-item <?php echo ((wpsg_getStr($_COOKIE['wpsg_order_view_tab'], 'general') == $k)?'active':''); ?>" wpsg-data-target="<?php echo $k; ?>" href="#"><?php echo $v['title']; ?></a>
+ <?php } ?>
+ </div>
- jQuery(document).ready(function() {
+ <br />
- jQuery('body').append('<div id="wpsg_backend_loading" style="display:none;"><div class="wpsg_inner"><?php echo __('Bestellung wird aktualisiert.', 'wpsg'); ?><br /><br /><img src="<?php echo $this->getRessourceURL('gfx/ajax-loader.gif'); ?>" alt="" /></div></div>');
-
- jQuery("#normal-sortables, #side-sortables").sortable({
- connectWith: ".meta-box-sortables",
- placeholder: 'wpsg_placeholder',
- dropOnEmpty: true,
- cursor: 'move',
- grid: [50, 20],
- items: ".postbox",
- handle: '.wpsg_handlediv',
- forceHelperSize: true,
- forcePlaceholderSize: true,
- opacity: 0.8,
- stop: function(e,ui) {
+ </div>
- var ser = jQuery("#normal-sortables").sortable("serialize");
- ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
+ <div class="wpsg_admin_content form-horizontal">
- jQuery.cookie('wpsg_order_view_normal', ser);
+ <?php $i = 0; foreach ($this->view['arSubAction'] as $k => $v) { $i ++; ?>
+ <div id="tab<?php echo $k; ?>" style="display:<?php echo ((wpsg_getStr($_COOKIE['wpsg_order_view_tab'], 'general') == $k)?'block':'none'); ?>;" class="wpsg_order_view_tab_content">
- var ser = jQuery("#side-sortables").sortable("serialize");
- ser = ser.replace(/\&wpsg\[\]\=/g, ',').replace(/wpsg\[\]\=/g, '');
+ <?php echo $v['content']; ?>
- jQuery.cookie('wpsg_order_view_side', ser);
-
- },
- receive: function(e, ui) {
- }
- });
-
- if (jQuery.cookie('wpsg_order_view_normal') != null)
- {
+ </div>
+ <?php } ?>
- var divs = jQuery.cookie('wpsg_order_view_normal').split(',').reverse();
+ </div>
- for (index in divs)
- {
+</div>
- jQuery('#normal-sortables').prepend(jQuery('#wpsg_' + divs[index]));
-
- }
-
- }
-
- if (jQuery.cookie('wpsg_order_view_side') != null)
- {
+<script type="text/javascript">/* <![CDATA[ */
- var divs = jQuery.cookie('wpsg_order_view_side').split(',').reverse();
-
- for (index in divs)
- {
+ jQuery(document).ready(function() {
- jQuery('#side-sortables').prepend(jQuery('#wpsg_' + divs[index]));
-
- }
-
- }
-
- jQuery('.wpsg_handlediv').bind('click', function() {
- jQuery(this).next().toggle();
+ jQuery('#wpsg_order_view_tabs a.list-group-item').bind('click', function() {
- var arClose = new Array();
- jQuery('.wpsg_order_view .postbox .inside:hidden').each(function() {
- arClose.push(jQuery(this).parent().attr("id"));
- } );
+ jQuery('#wpsg_order_view_tabs a').removeClass('active');
+ jQuery('.wpsg_order_view_tab_content').hide();
- jQuery.cookie('wpsg_order_closed', arClose.join(','));
-
- } );
+ jQuery(this).addClass('active');
+ jQuery('#tab' + jQuery(this).attr('wpsg-data-target')).show();
- if (jQuery.cookie('wpsg_order_closed') != null)
- {
+ jQuery.cookie('wpsg_order_view_tab', jQuery(this).attr('wpsg-data-target'));
+ jQuery(this).blur();
- var arClose = jQuery.cookie('wpsg_order_closed').split(',');
+ } );
- for (index in arClose)
- {
+ } );
- if (arClose[index].length > 0) jQuery('#' + arClose[index] + ' .inside').hide();
-
- }
-
- }
-
- } );
-
/* ]]> */</script>
-
-<div class="wrap columns-2 wpsg_order_view">
- <div class="icon32 icon32-posts-post" id="icon-edit"><br /></div>
- <h2>
- <?php echo wpsg_translate(__('Bestellung #1#', 'wpsg'), $this->view['data']['onr']); ?>
- </h2>
- <br />
- <?php echo $this->writeBackendMessage(); ?>
-
- <div id="postbox" class="metabox-holder has-right-sidebar">
-
- <div id="side-info-column" class="inner-sidebar" style="width:386px;">
- <div id="side-sortables" class="meta-box-sortables meta-box-sortables ui-sortable" style="width:380px;">
-
- <div id="wpsg_ranschrift" class="postbox">
- <h3 class="wpsg_handlediv">
- <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
- <span><?php echo __('Kundendaten', 'wpsg'); ?></span>
- </h3>
- <div class="inside">
-
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <?php echo __('Kundennummer', 'wpsg'); ?>:
- </div>
- <div class="wpsg_form_right">
- <p>
- <?php echo wpsg_hspc($this->view['data']['knr']); ?>
- <?php if ($this->hasMod('wpsg_mod_kundenverwaltung')) { ?>
- [&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $this->view['data']['k_id']; ?>"><?php echo __('Zum Kunden', 'wpsg'); ?></a>&nbsp;]</a>
- <?php } ?>
- </p>
- </div>
- </div>
- <div class="wpsg_clear"></div>
-
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <?php echo __('Anschrift', 'wpsg'); ?>:
- <a style="float:none; display:inline-block;" onclick="return wpsg_editInvoiceAdress();" class="wpsg_icon wpsg_icon_edit" href="#" title="<?php echo __('Rechnungsanschrift ändern', 'wpsg'); ?>"></a>
- </div>
- <div class="wpsg_form_right">
- <p>
- <?php if (trim($this->view['data']['firma']) != '') { ?>
- <?php echo wpsg_hspc($this->view['data']['firma']); ?><br />
- <?php } ?>
- <?php echo (($this->view['data']['title'] != '' && $this->view['data']['title'] != '-1')?wpsg_hspc($this->view['data']['title']).' ':''); ?><?php echo wpsg_hspc($this->view['data']['vname']); ?> <?php echo wpsg_hspc($this->view['data']['name']); ?><br />
- <?php echo wpsg_hspc($this->view['data']['strasse']); ?><br />
- <?php echo wpsg_hspc($this->view['data']['plz']); ?> <?php echo wpsg_hspc($this->view['data']['ort']); ?> <?php echo wpsg_hspc($this->view['country']['kuerzel']); ?><br />
- </p>
- </div>
- </div>
- <div class="wpsg_clear"></div>
-
- <div id="wpsg_InvoiceDialog" class="wpsg_dialog" style="display:none;">
- <?php echo wpsg_drawForm_Input('dialog_firma', __('Firma', 'wpsg'), $this->view['data']['firma']); ?>
- <?php echo wpsg_drawForm_Select('dialog_title', __('Anschrift', 'wpsg'), $this->view['arTitles'], $this->view['data']['title'], array('noIndex' => true)); ?>
- <?php echo wpsg_drawForm_Input('dialog_vname', __('Vorname', 'wpsg'), $this->view['data']['vname']); ?>
- <?php echo wpsg_drawForm_Input('dialog_name', __('Name', 'wpsg'), $this->view['data']['name']); ?>
- <?php echo wpsg_drawForm_Input('dialog_strasse', __('Straße', 'wpsg'), $this->view['data']['strasse']); ?>
- <?php echo wpsg_drawForm_Input('dialog_plz', __('Postleitzahl', 'wpsg'), $this->view['data']['plz']); ?>
- <?php echo wpsg_drawForm_Input('dialog_ort', __('Ort', 'wpsg'), $this->view['data']['ort']); ?>
- <?php echo wpsg_drawForm_Select('dialog_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['data']['land']); ?>
- <br />
- <?php echo wpsg_drawForm_Checkbox('dialog_shipping', __('Auch Lieferanschrift anpassen', 'wpsg'), false); ?>
- </div>
-
- <?php if (strtotime($this->view['data']['geb']) > 0) { ?>
- <?php echo wpsg_drawForm_Input('', __('Geburtsdatum', 'wpsg'), wpsg_fromDate($this->view['data']['geb']), array('text' => true)); ?>
- <?php } ?>
-
- <?php if (strlen($this->view['data']['fax']) > 0) { ?>
- <?php echo wpsg_drawForm_Input('', __('Fax', 'wpsg'), $this->view['data']['fax'], array('text' => true)); ?>
- <?php } ?>
-
- <?php if (strlen($this->view['data']['tel']) > 0) { ?>
- <?php echo wpsg_drawForm_Input('', __('Telefon', 'wpsg'), $this->view['data']['tel'], array('text' => true)); ?>
- <?php } ?>
-
- <?php if (strlen($this->view['data']['ustidnr']) > 0) { ?>
- <?php echo wpsg_drawForm_Input('', __('UStIdNr.', 'wpsg'), $this->view['data']['ustidnr'], array('text' => true)); ?>
- <?php } ?>
-
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <?php echo __('E-Mail', 'wpsg'); ?>:
- </div>
- <div class="wpsg_form_right">
- <p>
- <a href="mailto:<?php echo $this->view['data']['email']; ?>"><?php echo $this->view['data']['email']; ?></a>
- </p>
- </div>
- </div>
- <div class="wpsg_clear"></div>
-
- <?php $this->callMods('wpsg_order_view_customerdata', array(&$this->view['data']['id'])); ?>
-
- </div>
- </div>
-
- <div id="wpsg_shippayment" class="postbox">
- <h3 class="wpsg_handlediv">
- <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
- <span><?php echo __('Versand- und Zahlungsart', 'wpsg'); ?></span>
- </h3>
- <div class="inside">
-
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <?php echo __('Versandart', 'wpsg'); ?>:
- </div>
- <div class="wpsg_form_right">
- <p>
- <?php echo wpsg_hspc($this->view['oOrder']->getShippingLabel()); ?>
- <?php if (isset($this->view['basket']['sum']['preis_shipping']) && $this->view['basket']['sum']['preis_shipping'] > 0) { ?>
- (<?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?>)
- <?php } ?>
- </p>
- </div>
- </div>
- <div class="wpsg_clear"></div>
-
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <?php echo __('Zahlungsart', 'wpsg'); ?>:
- </div>
- <div class="wpsg_form_right">
- <p>
-
- <?php echo __($this->view['arPayment'][$this->view['data']['type_payment']]['name'], 'wpsg'); ?>
- <?php if (isset($this->view['basket']['sum']['preis_payment']) && $this->view['basket']['sum']['preis_payment'] > 0) { ?>
- (<?php echo wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); ?>)
- <?php } ?>
-
- </p>
- </div>
- </div>
- <div class="wpsg_clear"></div>
- <?php $this->callMods('order_view_afterpayment', array(&$this->view['data']['id'])); ?>
-
- </div>
- </div>
-
- <?php if (trim($this->view['data']['order_comment']) != '') { ?>
- <div id="wpsg_comment" class="postbox">
- <h3 class="wpsg_handlediv">
- <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
- <span><?php echo __('Bestellkommentar (Kunde)', 'wpsg'); ?></span>
- </h3>
- <div class="inside">
- <?php echo wpsg_hspc($this->view['data']['order_comment']); ?>
- </div>
- </div>
- <?php } ?>
-
- <div id="wpsg_admincomment" class="postbox">
- <h3 class="wpsg_handlediv">
- <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
- <span><?php echo __('Bestellkommentar (Admin)', 'wpsg'); ?></span>
- </h3>
- <div class="inside">
- <form action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&noheader=1&action=setAdminComment&edit_id=<?php echo $this->view['data']['id']; ?>" method="post">
- <textarea class="wpsg_order_admincomment" name="wpsg_order_admincomment"><?php echo wpsg_hspc($this->view['data']['admincomment']); ?></textarea>
- <input class="button wpsg_order_admincomment_submit" type="submit" value="<?php echo __('Senden', 'wpsg'); ?>" name="admincomment_submit" />
- </form>
- </div>
- </div>
-
- <?php $this->callMods('order_view_sidebar', array(&$this->view['data']['id'])); ?>
-
- </div>
- </div>
-
- <div id="post-body">
- <div id="normal-sortables" class="meta-box-sortables" style="margin-right:400px;">
- <div class="postbox" id="wpsg_generally">
- <h3 class="wpsg_handlediv">
- <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
- <span><?php echo __('Allgemein', 'wpsg'); ?></span>
- </h3>
- <div class="inside wpsg_order_top">
-
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <?php echo __('Bestellnummer', 'wpsg'); ?>:
- </div>
- <div class="wpsg_form_right">
- <p>
- <?php echo wpsg_hspc($this->view['data']['onr']); ?> [<?php echo wpsg_hspc($this->arStatus[$this->view['data']['status']]); ?>]
- </p>
- </div>
- </div>
- <div class="wpsg_clear"></div>
-
- <?php if (wpsg_isSizedString($this->view['data']['language']) && $this->view['data']['language'] != $this->getCurrentLanguage()) { $arLang = $this->getStoreLanguages(); $lang = $arLang[$this->view['data']['language']]; ?>
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <?php echo __('Sprache', 'wpsg'); ?>:
- </div>
- <div class="wpsg_form_right">
- <p>
- <img src="<?php echo $this->getFlagURL().$lang['flag']; ?>" alt="<?php echo wpsg_translate(__('Produkt für Sprache #1# bearbeiten.', 'wpsg'), $lang['name']); ?>" />
- <?php echo $lang['name']; ?>
- </p>
- </div>
- </div>
- <div class="wpsg_clear"></div>
- <?php } ?>
-
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <?php echo __('Bestelleingang', 'wpsg'); ?>:
- </div>
- <div class="wpsg_form_right">
- <p>
- <?php echo date('d.m.Y H:i:s', strtotime($this->view['data']['cdate'])); ?>
- </p>
- </div>
- </div>
- <div class="wpsg_clear"></div>
-
- <form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;action=switchStatus&amp;edit_id=<?php echo $this->view['data']['id']; ?>&amp;noheader=1" enctype="multipart/form-data">
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <?php echo __('Statusänderung', 'wpsg'); ?>:
- </div>
- <div class="wpsg_form_right">
- <select id="wpsg_order_view_status" name="status" style="float:left;">
- <?php foreach ($this->arStatus as $k => $v) { ?>
- <option value="<?php echo wpsg_hspc($k); ?>" <?php echo (($k == $this->view['data']['status'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($v); ?></option>
- <?php } ?>
- </select>
- &nbsp;<input style="width:auto;" type="submit" class="button wpsg_button" id="wpsg_order_view_status_submit" name="wpsg_statusaenderung" value="<?php echo __('Status ändern', 'wpsg'); ?>" />
- <div class="wpsg_clear"></div>
- <label style="line-height:250%;">
- <input style="width:auto;" type="checkbox" value="1" name="sendMail" /> <?php echo __('Kunde informieren', 'wpsg'); ?>
- </label>
- </div>
- </div>
- <div class="wpsg_clear"></div>
- <?php $this->callMods('order_view_switchStatus', array(&$this->view['data']['id'])); ?>
- </form>
-
- <?php if (wpsg_isSizedInt($this->get_option('wpsg_debugModus'))) { ?>
- <div class="wpsg_form_field">
- <div class="wpsg_form_left">
- <span class="wpsg_developer"><?php echo __('Entwickler Optionen', 'wpsg'); ?>:</span>
- </div>
- <div class="wpsg_form_right">
- <span class="wpsg_developer">
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_customermail&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Kundenmail simulieren (An Shop Betreiber)', 'wpsg'); ?></a><br />
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_adminmail&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Adminmail simulieren', 'wpsg'); ?></a><br />
- <a href="<?php echo $this->getDoneURL($this->view['data']['id']); ?>"><?php echo __('Bestellabschlußseite', 'wpsg'); ?></a><br />
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_urlbuy&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('URL Benachrichtigung (Kauf) auslösen', 'wpsg'); ?></a><br />
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_urlpay&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('URL Benachrichtigung (Bezahlung) auslösen', 'wpsg'); ?></a><br />
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&edit_id=<?php echo $this->view['data']['id']; ?>&debugBasket=1"><?php echo __('Warenkorbdaten anzeigen', 'wpsg'); ?></a><br />
- <?php if (wpsg_isSizedInt($_REQUEST['debugBasket'])) { ?>
- <?php wpsg_debug($this->view['basket']); ?>
- <?php } ?>
- </span>
- </div>
- </div>
- <div class="wpsg_clear"></div>
- <?php } ?>
-
- </div>
- </div>
-
- <div class="postbox" id="wpsg_orderdata">
- <h3 class="wpsg_handlediv">
- <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
- <span><?php echo __('Bestelldaten', 'wpsg'); ?></span>
- </h3>
- <div class="inside">
- <table class="wpsg_produkte">
- <tr class="wpsg_kopf">
- <th class="wpsg_cell_name"><?php echo __('Produktname', 'wpsg'); ?></th>
- <th class="wpsg_cell_preis"><?php echo __('Einzelpreis', 'wpsg'); ?></th>
- <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
- <th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
- <?php } ?>
- <th class="wpsg_cell_menge"><?php echo __("Anzahl", "wpsg"); ?></th>
- <th class="wpsg_cell_gesamtpreis"><?php echo __("Gesamtpreis", "wpsg"); ?></th>
- </tr>
- <?php $i = 0; foreach ($this->view['basket']['produkte'] as $produkt_key => $p) { $i ++; ?>
- <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
- <td class="wpsg_cell_name">
- <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id=<?php echo $this->getProduktID($p['id']); ?>" title="<?php echo __('Zum Produkt', 'wpsg'); ?>">
- <?php echo wpsg_hspc($this->getProductName($this->getProduktID($p['id']))); ?>
- </a>
- </td>
- <td class="wpsg_cell_preis"><?php echo wpsg_ff($p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
- <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
- <td class="wpsg_cell_mwst"><?php echo wpsg_ff($p['mwst_value']); ?> %</td>
- <?php } ?>
- <td class="wpsg_cell_menge"><?php echo wpsg_hspc($p['menge']); ?></td>
- <td class="wpsg_cell_gesamtpreis"><?php echo wpsg_ff($p['menge'] * $p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
- </tr>
- <?php if (wpsg_isSizedArray($p['order_allowedshipping'])) { ?>
- <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
- <td class="wpsg_cell_name">
- <?php echo __('Mögliche Versandarten', 'wpsg'); ?>:
- </td>
- <td class="wpsg_cell_gesamtpreis" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?4:3); ?>">
- <?php $j = 0; foreach ($p['order_allowedshipping'] as $shipping) { $j ++; ?>
- <?php echo $this->getShippingName($shipping); ?><?php if ($j < sizeof($p['order_allowedshipping'])) { ?>, <?php } ?>
- <?php } ?>
- </td>
- </tr>
- <?php } ?>
- <?php $this->callMods('order_view_row', array(&$p, $i)); ?>
- <?php } ?>
- <?php if (isset($this->view['basket']['gs'])) { ?>
- <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?> wpsg_gutschein">
- <td class="wpsg_cell_name"><?php echo __('Gutschein', 'wpsg'); ?> <?php echo ($this->view['basket']['gs']['code'] != '')? '('.$this->view['basket']['gs']['code'].')':'' ?></td>
- <td class="wpsg_cell_preis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
- <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
- <td class="wpsg_cell_mwst"><?php echo __('anteilig', 'wpsg'); ?></td>
- <?php } ?>
- <td class="wpsg_cell_menge">1</td>
- <td class="wpsg_cell_gesamtpreis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
- </tr>
- <?php } ?>
- <?php if (isset($this->view['basket']['sum']['preis_rabatt']) && $this->view['basket']['sum']['preis_rabatt'] > 0) { ?>
- <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?> wpsg_row_rabatt">
- <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_rabatt_label">
- <?php echo __('Abzüglich Rabatt', 'wpsg'); ?>
- </td>
- <td class="wpsg_cell_rabatt_value">
- <?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?>
- </td>
- </tr>
- <?php } ?>
- <tr class="wpsg_row_summe">
- <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
- <?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
- <?php echo wpsg_translate(__('Summe (zzgl. #1#)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
- <?php } else { ?>
- <?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
- <?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
- <?php } else { ?>
- <?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
- <?php } ?>
- <?php } ?>
- </td>
- <td class="wpsg_cell_summe_value">
- <?php echo wpsg_ff($this->view['basket']['sum']['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
- </td>
- </tr>
- <?php if ($this->view['basket']['sum']['preis_shipping'] != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
- <tr class="wpsg_row_shipping">
- <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_shipping_label">
- <a href="<?php echo $this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN); ?>" target="_blank"><?php echo __('Versandkosten', 'wpsg'); ?></a>
- </td>
- <td class="wpsg_cell_shipping_value">
- <?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
- </td>
- </tr>
- <?php } ?>
- <?php if ($this->view['basket']['sum']['preis_payment'] != 0 || $this->get_option('wpsg_hideemptypayment') != '1') { ?>
- <tr class="wpsg_row_payment">
- <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_payment_label">
- <?php echo __('Zahlungsart', 'wpsg'); ?>
- </td>
- <td class="wpsg_cell_payment_value">
- <?php echo wpsg_ff($this->view['basket']['sum']['preis_payment']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
- </td>
- </tr>
- <?php } ?>
- <?php if ($this->get_option('wpsg_preisangaben') == '1' && $this->get_option('wpsg_kleinunternehmer') != '1') { ?>
- <?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
- <tr class="wpsg_row_mwst">
- <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
- <?php echo wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
- </td>
- <td class="wpsg_cell_mwst_value">
- <?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
- </td>
- </tr>
- <?php } ?>
- <?php } ?>
- <tr class="wpsg_row_gesamt">
- <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_gesamt_label">
- <?php echo __('Gesamtpreis', 'wpsg'); ?>
- </td>
- <td class="wpsg_cell_gesamt_value">
- <?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
- </td>
- </tr>
- <?php if ($this->get_option('wpsg_kleinunternehmer') == '1' || $this->get_option('wpsg_preisangaben') != '1') { ?>
- <?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
- <tr class="wpsg_row_mwst">
- <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
- <?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
- <?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
- <?php } else { ?>
- <?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
- <?php } ?>
- </td>
- <td class="wpsg_cell_mwst_value">
- <?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
- </td>
- </tr>
- <?php } ?>
- <?php } ?>
- </table>
-
- </div>
- </div>
-
- <?php $this->callMods('order_view_content', array($this->view['data']['id'])); ?>
-
- <div class="postbox" id="wpsg_orderlog">
- <h3 class="wpsg_handlediv">
- <span title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>" class="handlediv"><br /></span>
- <span><?php echo __('Bestellprotokoll', 'wpsg'); ?></span>
- </h3>
- <div class="inside" id="wpsg_orderlog_content">
- <?php echo $this->view['orderLog']; ?>
- </div>
- </div>
-
- </div>
-
- </div>
-
- </div>
-
-</div> \ No newline at end of file
diff --git a/views/order/view_customerdata.phtml b/views/order/view_customerdata.phtml
new file mode 100644
index 0000000..97ba056
--- /dev/null
+++ b/views/order/view_customerdata.phtml
@@ -0,0 +1,112 @@
+<?php
+
+ /**
+ * User: Daschmi (daschmi@daschmi.de)
+ * Date: 07.08.2016
+ * Time: 10:40
+ */
+
+?>
+
+<div class="modal fade" tabindex="-1" role="dialog" id="wpsg_customer_edit">
+ <div class="modal-dialog" role="document">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+ <h4 class="modal-title"><?php echo __('Kundendaten beatbeiten', 'wpsg'); ?></h4>
+ </div>
+ <div class="modal-body">
+
+ <?php echo wpsg_drawForm_Input('dialog_firma', __('Firma', 'wpsg'), $this->view['data']['firma']); ?>
+ <?php echo wpsg_drawForm_Select('dialog_title', __('Anschrift', 'wpsg'), $this->view['arTitles'], $this->view['data']['title'], array('noIndex' => true)); ?>
+ <?php echo wpsg_drawForm_Input('dialog_vname', __('Vorname', 'wpsg'), $this->view['data']['vname']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_name', __('Name', 'wpsg'), $this->view['data']['name']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_strasse', __('Straße', 'wpsg'), $this->view['data']['strasse']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_plz', __('Postleitzahl', 'wpsg'), $this->view['data']['plz']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_ort', __('Ort', 'wpsg'), $this->view['data']['ort']); ?>
+ <?php echo wpsg_drawForm_Select('dialog_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['data']['land']); ?>
+
+ <br />
+
+ <?php echo wpsg_drawForm_Checkbox('dialog_shipping', __('Auch Lieferanschrift anpassen', 'wpsg'), false); ?>
+
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Schließen', 'wpsg'); ?></button>
+ <button type="button" class="btn btn-primary" onclick="return wpsg_saveInvoiceAdress();"><?php echo __('Speichern', 'wpsg'); ?></button>
+ </div>
+ </div>
+ </div>
+</div>
+
+<?php echo wpsg_drawForm_AdminboxStart(__('Kundendaten', 'wpsg')); ?>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <?php echo $this->view['oOrder']->getCustomer()->getNr(); ?>
+ <?php if ($this->hasMod('wpsg_mod_kundenverwaltung')) { ?>
+ [&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Customer&action=edit&edit_id=<?php echo $this->view['data']['k_id']; ?>"><?php echo __('Zum Kunden', 'wpsg'); ?></a>&nbsp;]</a>
+ <?php } ?>
+ <?php echo wpsg_drawForm_TextEnd(__('Kundennummer:', 'wpsg')); ?>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <?php if (trim($this->view['data']['firma']) != '') { ?>
+ <?php echo wpsg_hspc($this->view['data']['firma']); ?><br />
+ <?php } ?>
+ <?php echo (($this->view['data']['title'] != '' && $this->view['data']['title'] != '-1')?wpsg_hspc($this->view['arTitles'][$this->view['data']['title']]).' ':''); ?><?php echo wpsg_hspc($this->view['data']['vname']); ?> <?php echo wpsg_hspc($this->view['data']['name']); ?><br />
+ <?php echo wpsg_hspc($this->view['data']['strasse']); ?><br />
+ <?php echo wpsg_hspc($this->view['data']['plz']); ?> <?php echo wpsg_hspc($this->view['data']['ort']); ?> <?php echo wpsg_hspc($this->view['country']['kuerzel']); ?><br />
+
+ <a style="position: absolute; right:25px; top:10px; display:inline-block;" data-toggle="modal" data-target="#wpsg_customer_edit" href="#" title="<?php echo __('Rechnungsanschrift ändern', 'wpsg'); ?>">
+ <span class="glyphicon glyphicon-pencil"></span>
+ </a>
+
+ <?php echo wpsg_drawForm_TextEnd(__('Anschrift:', 'wpsg')); ?>
+
+ <?php if (strtotime($this->view['data']['geb']) > 0) { ?>
+ <?php echo wpsg_drawForm_Input('', __('Geburtsdatum', 'wpsg'), wpsg_fromDate($this->view['data']['geb']), array('text' => true)); ?>
+ <?php } ?>
+
+ <?php if (strlen($this->view['data']['fax']) > 0) { ?>
+ <?php echo wpsg_drawForm_Input('', __('Fax', 'wpsg'), $this->view['data']['fax'], array('text' => true)); ?>
+ <?php } ?>
+
+ <?php if (strlen($this->view['data']['tel']) > 0) { ?>
+ <?php echo wpsg_drawForm_Input('', __('Telefon', 'wpsg'), $this->view['data']['tel'], array('text' => true)); ?>
+ <?php } ?>
+
+ <?php if (strlen($this->view['data']['ustidnr']) > 0) { ?>
+ <?php echo wpsg_drawForm_Input('', __('UStIdNr.', 'wpsg'), $this->view['data']['ustidnr'], array('text' => true)); ?>
+ <?php } ?>
+
+ <?php $this->callMods('wpsg_order_view_customerdata', array(&$this->view['data']['id'])); ?>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <a href="mailto:<?php echo $this->view['data']['email']; ?>"><?php echo $this->view['data']['email']; ?></a>
+ <?php echo wpsg_drawForm_TextEnd(__('E-Mail:', 'wpsg')); ?>
+
+ <script type="text/javascript">/* <![CDATA[ */
+
+ function wpsg_saveInvoiceAdress()
+ {
+
+ jQuery('#wpsg_backend_loading').show();
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=saveInvoiceAdress&edit_id=<?php echo $this->view['data']['id']; ?>&noheader=1',
+ data: {
+ form_data: jQuery('#wpsg_customer_edit input, #wpsg_customer_edit select').serialize()
+ },
+ success: function(data) {
+
+ location.href = location.href;
+
+ }
+ } );
+
+ return false;
+
+ }
+
+ /* ]]> */</script>
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
diff --git a/views/order/view_dev.phtml b/views/order/view_dev.phtml
new file mode 100644
index 0000000..5fc864c
--- /dev/null
+++ b/views/order/view_dev.phtml
@@ -0,0 +1,32 @@
+<?php
+
+ /**
+ * User: Daschmi (daschmi@daschmi.de)
+ * Date: 07.08.2016
+ * Time: 10:51
+ */
+
+?>
+
+<?php echo wpsg_drawForm_AdminboxStart(__('Entwickleroptionen', 'wpsg')); ?>
+
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_customermail&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Kundenmail simulieren (An Shop Betreiber)', 'wpsg'); ?></a><br />
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_adminmail&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('Adminmail simulieren', 'wpsg'); ?></a><br />
+ <a href="<?php echo $this->getDoneURL($this->view['data']['id']); ?>"><?php echo __('Bestellabschlußseite', 'wpsg'); ?></a><br />
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_urlbuy&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('URL Benachrichtigung (Kauf) auslösen', 'wpsg'); ?></a><br />
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&wpsg_action=debug_urlpay&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>"><?php echo __('URL Benachrichtigung (Bezahlung) auslösen', 'wpsg'); ?></a><br />
+
+ <br />
+
+ <div class="panel panel-default">
+ <div class="panel-heading" data-toggle="collapse" href="#collapse_basket" style="cursor:pointer;">
+ <h4 class="panel-title"><?php echo __('Warenkorbdaten', 'wpsg'); ?></h4>
+ </div>
+ <div id="collapse_basket" class="panel-collapse collapse">
+ <div class="panel-body">
+ <pre><?php wpsg_debug($this->view['basket']); ?></pre>
+ </div>
+ </div>
+ </div>
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?> \ No newline at end of file
diff --git a/views/order/view_general.phtml b/views/order/view_general.phtml
new file mode 100644
index 0000000..750dc88
--- /dev/null
+++ b/views/order/view_general.phtml
@@ -0,0 +1,32 @@
+<?php
+
+ /**
+ * User: Daschmi (daschmi@daschmi.de)
+ * Date: 06.08.2016
+ * Time: 11:22
+ */
+
+?>
+<?php echo wpsg_drawForm_AdminboxStart(__('Allgemein', 'wpsg')); ?>
+
+ <?php echo wpsg_drawForm_Text(__('Bestellnummer', 'wpsg'), $this->view['oOrder']->getNr().' ['.$this->view['oOrder']->getStateLabel().']'); ?>
+ <?php echo wpsg_drawForm_Text(__('Bestelldatum', 'wpsg'), wpsg_formatTimestamp($this->view['oOrder']->cdate)); ?>
+ <?php echo wpsg_drawForm_Text(__('Bestellwert', 'wpsg'), wpsg_ff($this->view['oOrder']->getAmount(), $this->get_option('wpsg_currency'))); ?>
+ <?php echo wpsg_drawForm_Text(__('Bestellkommentar (Admin)', 'wpsg'), $this->view['data']['admincomment'], 'wpsg_order_admincomment', array('inlineEdit' => true, 'inlineEdit_type' => 'textarea', 'inlineEdit_url' => WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&noheader=1&action=setAdminComment&edit_id='.$this->view['data']['id'])); ?>
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
+
+<?php echo wpsg_drawForm_AdminboxStart(__('Statusänderung', 'wpsg')); ?>
+<form method="POST" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;action=switchStatus&amp;edit_id=<?php echo $this->view['data']['id']; ?>&amp;noheader=1" enctype="multipart/form-data">
+
+ <?php echo wpsg_drawForm_Select('status', __('Neuer Status', 'wpsg'), $this->arStatus, $this->view['data']['status']); ?>
+ <?php echo wpsg_drawForm_Checkbox('sendMail', __('Kunden informieren', 'wpsg'), 0); ?>
+
+ <br />
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <input type="submit" class="button" value="<?php echo __('Status ändern', 'wpsg'); ?>" />
+ <?php echo wpsg_drawForm_TextEnd(); ?>
+
+</form>
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
diff --git a/views/order/view_orderdata.phtml b/views/order/view_orderdata.phtml
new file mode 100644
index 0000000..0ea8f1a
--- /dev/null
+++ b/views/order/view_orderdata.phtml
@@ -0,0 +1,144 @@
+<?php
+
+ /**
+ * User: Daschmi (daschmi@dsachmi.de)
+ * Date: 06.08.2016
+ * Time: 13:45
+ */
+
+?>
+
+<?php echo wpsg_drawForm_AdminboxStart(__('Bestelldaten', 'wpsg')); ?>
+ <table class="wpsg_produkte table">
+ <tr class="wpsg_kopf">
+ <th class="wpsg_cell_name"><?php echo __('Produktname', 'wpsg'); ?></th>
+ <th class="wpsg_cell_preis"><?php echo __('Einzelpreis', 'wpsg'); ?></th>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <th class="wpsg_cell_mwst"><?php echo __("MwSt.", "wpsg"); ?></th>
+ <?php } ?>
+ <th class="wpsg_cell_menge"><?php echo __("Anzahl", "wpsg"); ?></th>
+ <th class="wpsg_cell_gesamtpreis"><?php echo __("Gesamtpreis", "wpsg"); ?></th>
+ </tr>
+ <?php $i = 0; foreach ($this->view['basket']['produkte'] as $produkt_key => $p) { $i ++; ?>
+ <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td class="wpsg_cell_name">
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id=<?php echo $this->getProduktID($p['id']); ?>" title="<?php echo __('Zum Produkt', 'wpsg'); ?>">
+ <?php echo wpsg_hspc($this->getProductName($this->getProduktID($p['id']))); ?>
+ </a>
+ </td>
+ <td class="wpsg_cell_preis"><?php echo wpsg_ff($p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td class="wpsg_cell_mwst"><?php echo wpsg_ff($p['mwst_value']); ?> %</td>
+ <?php } ?>
+ <td class="wpsg_cell_menge"><?php echo wpsg_hspc($p['menge']); ?></td>
+ <td class="wpsg_cell_gesamtpreis"><?php echo wpsg_ff($p['menge'] * $p['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
+ </tr>
+ <?php if (wpsg_isSizedArray($p['order_allowedshipping'])) { ?>
+ <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
+ <td class="wpsg_cell_name">
+ <?php echo __('Mögliche Versandarten', 'wpsg'); ?>:
+ </td>
+ <td class="wpsg_cell_gesamtpreis" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?4:3); ?>">
+ <?php $j = 0; foreach ($p['order_allowedshipping'] as $shipping) { $j ++; ?>
+ <?php echo $this->getShippingName($shipping); ?><?php if ($j < sizeof($p['order_allowedshipping'])) { ?>, <?php } ?>
+ <?php } ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php $this->callMods('order_view_row', array(&$p, $i)); ?>
+ <?php } ?>
+ <?php if (isset($this->view['basket']['gs'])) { ?>
+ <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?> wpsg_gutschein">
+ <td class="wpsg_cell_name"><?php echo __('Gutschein', 'wpsg'); ?> <?php echo ($this->view['basket']['gs']['code'] != '')? '('.$this->view['basket']['gs']['code'].')':'' ?></td>
+ <td class="wpsg_cell_preis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
+ <?php if (sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td class="wpsg_cell_mwst"><?php echo __('anteilig', 'wpsg'); ?></td>
+ <?php } ?>
+ <td class="wpsg_cell_menge">1</td>
+ <td class="wpsg_cell_gesamtpreis"><?php echo '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency')); ?></td>
+ </tr>
+ <?php } ?>
+ <?php if (isset($this->view['basket']['sum']['preis_rabatt']) && $this->view['basket']['sum']['preis_rabatt'] > 0) { ?>
+ <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?> wpsg_row_rabatt">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_rabatt_label">
+ <?php echo __('Abzüglich Rabatt', 'wpsg'); ?>
+ </td>
+ <td class="wpsg_cell_rabatt_value wpsg_cell_gesamtpreis">
+ <?php echo '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <tr class="wpsg_row_summe">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
+ <?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
+ <?php echo wpsg_translate(__('Summe (zzgl. #1#)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } else { ?>
+ <?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+ <?php echo wpsg_translate(__('Summe (zzgl. #1#, zzgl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('Summe (zzgl. #1#, inkl. MwSt.)', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'" target="_blank">'.__('Versandkosten', 'wpsg').'</a>'); ?>
+ <?php } ?>
+ <?php } ?>
+ </td>
+ <td class="wpsg_cell_summe_value wpsg_cell_gesamtpreis">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php if ($this->view['basket']['sum']['preis_shipping'] != 0 || $this->get_option('wpsg_hideemptyshipping') != '1') { ?>
+ <tr class="wpsg_row_shipping">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_shipping_label">
+ <a href="<?php echo $this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN); ?>" target="_blank"><?php echo __('Versandkosten', 'wpsg'); ?></a>
+ </td>
+ <td class="wpsg_cell_shipping_value wpsg_cell_gesamtpreis">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_shipping']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php if ($this->view['basket']['sum']['preis_payment'] != 0 || $this->get_option('wpsg_hideemptypayment') != '1') { ?>
+ <tr class="wpsg_row_payment">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_payment_label">
+ <?php echo __('Zahlungsart', 'wpsg'); ?>
+ </td>
+ <td class="wpsg_cell_payment_value wpsg_cell_gesamtpreis">
+ <?php echo wpsg_ff($this->view['basket']['sum']['preis_payment']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php if ($this->get_option('wpsg_preisangaben') == '1' && $this->get_option('wpsg_kleinunternehmer') != '1') { ?>
+ <?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
+ <tr class="wpsg_row_mwst">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
+ <?php echo wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
+ </td>
+ <td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
+ <?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php } ?>
+ <tr class="wpsg_row_gesamt">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_gesamt_label">
+ <?php echo __('Gesamtpreis', 'wpsg'); ?>
+ </td>
+ <td class="wpsg_cell_gesamt_value wpsg_cell_gesamtpreis">
+ <strong><?php echo wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?></strong>
+ </td>
+ </tr>
+ <?php if ($this->get_option('wpsg_kleinunternehmer') == '1' || $this->get_option('wpsg_preisangaben') != '1') { ?>
+ <?php foreach ($this->view['basket']['mwst'] as $mwst_id => $mwst) { ?>
+ <tr class="wpsg_row_mwst">
+ <td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
+ <?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
+ <?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $mwst['name']); ?>
+ <?php } ?>
+ </td>
+ <td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
+ <?php echo wpsg_ff($mwst['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+ <?php } ?>
+ <?php } ?>
+ </table>
+<?php echo wpsg_drawForm_AdminboxEnd(); ?> \ No newline at end of file
diff --git a/views/order/view_orderlog.phtml b/views/order/view_orderlog.phtml
new file mode 100644
index 0000000..79cd65d
--- /dev/null
+++ b/views/order/view_orderlog.phtml
@@ -0,0 +1,28 @@
+<?php
+
+ /**
+ * User: Daschmi (daschmi@daschmi.de)
+ * Date: 06.08.2016
+ * Time: 11:24
+ */
+
+?>
+
+<?php echo wpsg_drawForm_AdminboxStart(__('Bestellprotokoll', 'wpsg')); ?>
+<div class="panel-group">
+ <?php foreach ($this->view['oOrder']->getLog() as $k => $ol) { ?>
+ <div class="panel panel-default">
+ <div class="panel-heading" data-toggle="collapse" href="#collapse<?php echo $k; ?>" style="cursor:pointer;">
+ <h4 class="panel-title" style="float:right;"><?php echo wpsg_formatTimestamp($ol['cdate']); ?></h4>
+ <h4 class="panel-title"><?php echo $ol['title']; ?></h4>
+ </div>
+ <div id="collapse<?php echo $k; ?>" class="panel-collapse collapse">
+ <div class="panel-body">
+ <pre><?php echo $ol['mailtext']; ?></pre>
+ </div>
+ </div>
+ </div>
+ <?php } ?>
+</div>
+<?php echo wpsg_drawForm_AdminboxEnd(); ?>
+
diff --git a/views/order/view_shippay.phtml b/views/order/view_shippay.phtml
new file mode 100644
index 0000000..50c1388
--- /dev/null
+++ b/views/order/view_shippay.phtml
@@ -0,0 +1,31 @@
+<?php
+
+ /**
+ * User: Daschmi (daschmi@daschmi.de)
+ * Date: 07.08.2016
+ * Time: 10:52
+ */
+
+?>
+
+<?php echo wpsg_drawForm_AdminboxStart(__('Versand- und Zahlungsart', 'wpsg')); ?>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <?php echo wpsg_hspc($this->view['oOrder']->getShippingLabel()); ?>
+ <?php $shippingCost = $this->view['oOrder']->getShippingAmount($this->getBackendTaxview()); ?>
+ <?php if ($shippingCost > 0) { ?>
+ (<?php echo wpsg_ff($shippingCost, $this->get_option('wpsg_currency')); ?>)
+ <?php } ?>
+ <?php echo wpsg_drawForm_TextEnd(__('Versandart:', 'wpsg')); ?>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+ <?php echo wpsg_hspc($this->view['oOrder']->getPaymentLabel()); ?>
+ <?php $paymentCost = $this->view['oOrder']->getPaymentAmount($this->getBackendTaxview()); ?>
+ <?php if ($paymentCost > 0) { ?>
+ (<?php echo wpsg_ff($paymentCost, $this->get_option('wpsg_currency')); ?>)
+ <?php } ?>
+ <?php echo wpsg_drawForm_TextEnd(__('Zahlungsart:', 'wpsg')); ?>
+
+ <?php $this->callMods('order_view_afterpayment', array(&$this->view['data']['id'])); ?>
+
+<?php echo wpsg_drawForm_AdminboxEnd(); ?> \ No newline at end of file
diff --git a/views/produkt/addedit.phtml b/views/produkt/addedit.phtml
index 22c4495..1758b6e 100644
--- a/views/produkt/addedit.phtml
+++ b/views/produkt/addedit.phtml
@@ -32,7 +32,7 @@
<div class="list-group" id="wpsg_product_tabs">
<?php if (wpsg_isSizedInt($this->view['data']['id'])) { ?>
- <span class="list-group-head list-group-item"><?php echo wpsg_translate(__('Produkt ID:#1#: <span style="float:right;"><a href="#2#" title="Produkt im Frontend ansehen" target="_blank"><span class="glyphicon glyphicon-new-window"></span></a></span>', 'wpsg'), $this->view['data']['id'], $this->view['oProduct']->getProductURL()); ?></span>
+ <span class="list-group-head list-group-item"><?php echo wpsg_translate(__('Produkt ID:#1# <span style="float:right;"><a href="#2#" title="Produkt im Frontend ansehen" target="_blank"><span class="glyphicon glyphicon-new-window"></span></a></span>', 'wpsg'), $this->view['data']['id'], $this->view['oProduct']->getProductURL()); ?></span>
<?php } else { ?>
<span class="list-group-head list-group-item"><?php echo __('Neues Produkt', 'wpsg'); ?></span>
<?php } ?>