diff options
Diffstat (limited to 'views/order')
| -rw-r--r-- | views/order/backendEdit/addProduct_product_selected.phtml | 38 | ||||
| -rw-r--r-- | views/order/product_table.phtml | 27 | ||||
| -rw-r--r-- | views/order/view.phtml | 8 | ||||
| -rw-r--r-- | views/order/view_customerdata.phtml | 10 | ||||
| -rw-r--r-- | views/order/view_orderdata.phtml | 30 |
5 files changed, 96 insertions, 17 deletions
diff --git a/views/order/backendEdit/addProduct_product_selected.phtml b/views/order/backendEdit/addProduct_product_selected.phtml index ba13724..93824bd 100644 --- a/views/order/backendEdit/addProduct_product_selected.phtml +++ b/views/order/backendEdit/addProduct_product_selected.phtml @@ -39,10 +39,18 @@ <div class="image"><?php echo wp_get_attachment_image($attachment_id, [100, 100]); ?></div>
<?php } ?>
- <?php echo wpsg_drawForm_Input('add_price', __('Produktpreis', 'wpsg').' '.(($this->getBackendTaxView() === WPSG_BRUTTO)?'(BRUTTO)':'(NETTO'), (($oOrderProduct !== false)?$oOrderProduct->getPrice($this->getBackendTaxView()):$oProduct->getPrice($this->getBackendTaxView()))); ?>
+ <?php echo wpsg_drawForm_Input('add_price', __('Produktpreis', 'wpsg').' '.(($this->getBackendTaxView() === WPSG_BRUTTO)?'(BRUTTO)':'(NETTO'), wpsg_ff((($oOrderProduct !== false)?$oOrderProduct->getPrice($this->getBackendTaxView()):$oProduct->getPrice($this->getBackendTaxView())), $this->get_option('wpsg_currency'))); ?>
<?php echo wpsg_drawForm_Input('add_amount', __('Menge', 'wpsg'), (($oOrderProduct !== false)?$oOrderProduct->getCount():'1')); ?>
-
- <?php if ($this->callMod('wpsg_mod_productvariants', 'isVariantsProduct', [$oProduct->id])) { $arVariants = $this->callMod('wpsg_mod_productvariants', 'getVariants', [$oProduct->id, true, true, true]); ?>
+ <?php echo wpsg_drawForm_Checkbox('add_eu',__('EU-Leistungsortregel anwenden', 'wpsg'),(($oOrderProduct !== false)?$oOrderProduct->euleistungsortregel:'1')) ?>
+
+ <?php if ($this->callMod('wpsg_mod_productvariants', 'isVariantsProduct', [$oProduct->id])) {
+
+ $arVariants = $this->callMod('wpsg_mod_productvariants', 'getVariants', [$oProduct->id, true, true, true]);
+
+ if ($oOrderProduct !== false) $arVariantenInfoArray = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', [$oOrderProduct->getProductKey()]);
+ else $arVariantenInfoArray = [];
+
+ ?>
<?php if (wpsg_isSizedArray($arVariants)) { ?>
@@ -55,11 +63,33 @@ ?>
- <?php echo wpsg_drawForm_Select('wpsg_vp['.$var_id.']', $var_data['name'], $arVariSelect,''); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_vp['.$var_id.']', $var_data['name'], $arVariSelect,$arVariantenInfoArray[$var_data['id']]['vari_id'], ['field_class' => 'varichange']); ?>
<?php } ?>
<?php } ?>
+
+ <script>
+
+ jQuery('.varichange').on('change', function() {
+
+ jQuery('#add_price').val('..');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=addProduct&do=updatePrice&noheader=1&product_id=<?php echo $oProduct->id; ?>',
+ data: {
+ form_data: jQuery('#wpsg_product_add_form').serialize()
+ },
+ success: function(data) {
+
+ jQuery('#add_price').val(data);
+
+ }
+ } );
+
+ } );
+
+ </script>
<?php } ?>
diff --git a/views/order/product_table.phtml b/views/order/product_table.phtml index 7ba1ea5..335d55b 100644 --- a/views/order/product_table.phtml +++ b/views/order/product_table.phtml @@ -3,7 +3,7 @@ /**
* Template für die Produkttabelle im Backend der Bestellverwaltung
*/
-
+
$arCalculation = $this->view['oCalculation']->getCalculationArray(true);
$arTax = $this->view['oCalculation']->getTaxLabelArray();
$arTaxShort = $this->view['oCalculation']->getTaxLabelArray(true);
@@ -15,16 +15,24 @@ if ($this->getBackendTaxView() === WPSG_NETTO) $display = 'netto';
else $display = 'brutto';
-
+
?>
<style>
.wpsg_row_small td { font-size:0.8em; }
#wpsg-bs .wpsg_row_small .wpsg-glyphlink-td > span { margin-top:0px; }
+ /*.wpsg_productrow_add td { border-top:0px !important; }*/
</style>
+<?php echo wpsg_drawForm_Select('tax_mode', __('Besteuerung'), [
+ \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS => __('Kleinunternehmerregelung'),
+ \wpsg\wpsg_calculation::TAXMODE_B2C => __('Endkundenbesteuerung'),
+ \wpsg\wpsg_calculation::TAXMODE_B2B => __('Firmenkundenbesteuerung')
+ ], $this->view['oCalculation']->getTaxMode(), ['onchange' => 'WPSG_BE.updateCalculation();']); ?>
+
+<br />
<table class="wpsg_produkte table">
<thead>
@@ -43,13 +51,21 @@ <tr><td colspan="<?php echo $this->view['colspan'] + 1; ?>" style="line-height:2px; height:2px; background-color:#999999; padding:0px;"></td></tr>
<?php $i = 0; foreach ($arCalculation['product'] as $p) { $i ++; $product_price = $p[$display]; ?>
<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
- <td class="wpsg_cell_name">
+ <td colspan="<?php echo $this->view['colspan'] + 1; ?>">
+
+ <?php if (wpsg_isTrue($p['eu'])) { ?>
+ <img src="<?php echo WPSG_URL; ?>views/gfx/eu.png" alt="<?php echo __('Produkt unterliegt der EU-Leistungsortregel', 'wpsg'); ?>" title="<?php echo __('Produkt unterliegt der EU-Leistungsortregel', 'wpsg'); ?>" height="14" />
+ <?php } ?>
+
<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id=<?php echo $p['product_id']; ?>" title="<?php echo __('Zum Produkt', 'wpsg'); ?>">
<?php echo wpsg_hspc($this->getProductName($p['product_id'])); ?>
</a>
<a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Produkt bearbeiten', 'wpsg'); ?>" onclick="return WPSG_BE_Product.editProduct(<?php echo $p['order_product_id']; ?>);"><span class="glyphicon glyphicon-pencil"></span></a>
- <a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Produkt löschen', 'wpsg'); ?>" onclick="return WPSG_BE_Product.remvoeProduct(<?php echo $p['order_product_id']; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
+ <a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Produkt löschen', 'wpsg'); ?>" onclick="return WPSG_BE_Product.removeProduct(<?php echo $p['order_product_id']; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
</td>
+ </tr>
+ <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?> wpsg_productrow_add">
+ <td class="wpsg_cell_name"></td>
<td class="wpsg_cell_preis"><?php echo wpsg_ff($product_price); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
<?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
<td class="wpsg_cell_mwst"><?php echo $arTaxShort[$p['tax_key']]; ?></td>
@@ -275,5 +291,4 @@ </tbody>
</table>
-
-<?php wpsg_debug($arCalculation); ?>
\ No newline at end of file +
\ No newline at end of file diff --git a/views/order/view.phtml b/views/order/view.phtml index df563f5..5908c22 100644 --- a/views/order/view.phtml +++ b/views/order/view.phtml @@ -103,6 +103,14 @@ <div class="wpsg_admin_content form-horizontal">
+ <?php if ($this->view['oCalculation']->restored) { ?>
+
+ <div id="restored_notice">
+ <strong>Die Berechnung dieser Bestellung wurde rekonstruiert, da zum Bestellzeitpunkt nicht alle Shop Einstellungen erfasst wurden. Bitte überprüfen sie die Berechnung und vergleichen diese ggf. mit dem Bestellprotokoll. </strong>
+ </div>
+
+ <?php } ?>
+
<?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">
diff --git a/views/order/view_customerdata.phtml b/views/order/view_customerdata.phtml index 0b89194..30cfad4 100644 --- a/views/order/view_customerdata.phtml +++ b/views/order/view_customerdata.phtml @@ -137,11 +137,11 @@ <?php echo wpsg_drawForm_Text(__('Telefon', 'wpsg'), $this->view['data']['tel'], array('text' => true)); ?>
<?php } ?>
<?php } ?>
- <?php if ($this->view['pflicht']['ustidnr'] != '2') { ?>
- <?php if (strlen($this->view['data']['ustidnr']) > 0) { ?>
- <?php echo wpsg_drawForm_Text(__('UStIdNr.', 'wpsg'), $this->view['data']['ustidnr'], array('text' => true)); ?>
- <?php } ?>
- <?php } ?>
+
+
+ <?php echo wpsg_drawForm_Text(__('UStIdNr.', 'wpsg'), $this->view['data']['ustidnr'], array('text' => true)); ?>
+ <br />
+
<?php $this->callMods('wpsg_order_view_customerdata', array(&$this->view['data']['id'])); ?>
<?php echo wpsg_drawForm_TextStart(); ?>
diff --git a/views/order/view_orderdata.phtml b/views/order/view_orderdata.phtml index 84c6dc2..69df736 100644 --- a/views/order/view_orderdata.phtml +++ b/views/order/view_orderdata.phtml @@ -17,6 +17,32 @@ <script type="text/javascript">
+ var WPSG_BE = {
+
+ updateCalculation: function() {
+
+ var tax_mode = jQuery('#tax_mode').val();
+
+ jQuery('#wpsg_product_table_wrap').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=view&subaction=updateCalculation&noheader=1&edit_id=<?php echo $_REQUEST['edit_id']; ?>',
+ data: {
+ tax_mode: tax_mode
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_product_table_wrap').html(data.product_table);
+
+ }
+ } );
+
+ return false;
+
+ }
+
+ };
+
var WPSG_BE_Pay_Ship = {
changeShippingPayment: function (id, oid) {
@@ -90,8 +116,8 @@ return false;
},
-
- remvoeProduct: function(order_product_id) {
+
+ removeProduct: function(order_product_id) {
jQuery('#wpsg_product_table_wrap').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
|
