diff options
Diffstat (limited to 'views/order/product_table.phtml')
| -rw-r--r-- | views/order/product_table.phtml | 111 |
1 files changed, 56 insertions, 55 deletions
diff --git a/views/order/product_table.phtml b/views/order/product_table.phtml index a6732f4..e30270d 100644 --- a/views/order/product_table.phtml +++ b/views/order/product_table.phtml @@ -1,19 +1,5 @@ <?php
-
-/*
- $oC = new \wpsg\wpsg_calculation();
- $oC->setCountry(\wpsg_country::getInstance(1));
-
- $oC->addProduct('1', 0, '100', '1','c');
- //$oC->addProduct('1', 1, '100', '1','b');
- $oC->setShipping('1', '0', '0');
- $oC->setPayment('1', '0', 'c_1');
-
- $oC->addDiscount('10%','c_1');
-
- $ar = $oC->getCalculationArray();
-wpsg_debug($ar);*/
-
+
/**
* Template für die Produkttabelle im Backend der Bestellverwaltung
*/
@@ -21,7 +7,7 @@ wpsg_debug($ar);*/ $arCalculation = $this->view['oCalculation']->getCalculationArray($this->getBackendTaxView());
$arTax = $this->view['oCalculation']->getTaxLabelArray();
$arTaxShort = $this->view['oCalculation']->getTaxLabelArray(true);
-
+
$this->view['colspan'] = 3;
if ($this->get_option('wpsg_showMwstAlways') == '1' || sizeof($arCalculation['tax']) > 1) $this->view['colspan'] ++;
@@ -32,6 +18,7 @@ wpsg_debug($ar);*/ <style>
.wpsg_row_small td { font-size:0.8em; }
+ #wpsg-bs .wpsg_row_small .wpsg-glyphlink-td > span { margin-top:0px; }
</style>
@@ -77,37 +64,49 @@ wpsg_debug($ar);*/ <?php $this->callMods('order_view_row', array(&$p, $i)); ?>
<tr><td colspan="<?php echo $this->view['colspan'] + 1; ?>" style="line-height:2px; height:2px; background-color:#999999; padding:0px;"></td></tr>
<?php } ?>
- <?php /* $gs_id = 0;
- if ((isset($this->view['basket']['gs'])) && ($this->view['basket']['gs']['value'] > 0)) { ?>
- <tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?> wpsg_gutschein">
- <?php
- $gs_id = 0;
- if (array_key_exists('gs_id', $_REQUEST))
- {
- $gs_id = wpsg_getInt($_REQUEST['gs_id']);
- }
- else
- {
- $gs_id = wpsg_getInt($this->view['data']['gs_id']);
- }
- $o_id = $_REQUEST['edit_id'];
- $link1 = '<span id="gsname_'.$gs_id.'" class="editable editable-click" data-original-title="" title="">'.$this->view['basket']['gs']['code'].'</span>';
- $val = '-'.wpsg_ff($this->view['basket']['sum']['gs']);
- $link2 = '<span id="gsvalue_'.$gs_id.'" class="editable editable-click" data-original-title="" title="">'.$val.'</span>';
+
+ <?php /* Gutscheine */ ?>
+ <?php if (wpsg_isSizedArray($arCalculation['voucher'])) { ?>
- ?>
- <td class="wpsg_cell_name"><?php echo __('Gutschein', 'wpsg'); ?> <?php echo ($this->view['basket']['gs']['code'] != '')? '('.$link1.')':'' ?>
- <a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Gutschein löschen', 'wpsg'); ?>" onclick="return wpsg_removeVoucher(<?php echo $gs_id; ?>, <?php echo $o_id; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
- </td>
- <td class="wpsg_cell_preis"><?php echo $link2.' '.$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 foreach ($arCalculation['voucher'] as $v) { ?>
+
+ <tr class="wpsg_row_discount wpsg_row_small">
+ <td colspan="" class="wpsg_cell_mwst_label">
+
+ <div>
+ <?php echo __('Gutschein', 'wpsg'); ?>
+
+ <?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
+ <?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
+ <?php } ?>
+
+ <a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Gutschein bearbeiten', 'wpsg'); ?>" onclick="return WPSG_BE_Voucher.editVoucher();"><span class="glyphicon glyphicon-pencil"></span></a>
+ <a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Gutschein löschen', 'wpsg'); ?>" onclick="return WPSG_BE_Voucher.removeVoucher();"><span class="glyphicon glyphicon-trash"></span></a>
+ </div>
+ <div>
+ Code: <?php echo $v['code']; ?>
+ </div>
+
+ </td>
+ <td class="wpsg_cell_preis">
+ <?php echo wpsg_ff($v['set'], $this->get_option('wpsg_currency'), true); ?>
+ </td>
+ <?php if (sizeof($arCalculation['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
+ <td class="wpsg_cell_mwst"><?php echo $arTaxShort[$v['tax_key']]; ?></td>
+ <?php } ?>
+ <td>1</td>
+ <td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
+ <?php echo wpsg_ff($arCalculation['sum']['voucher_display']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
+ </td>
+ </tr>
+
+ <?php } ?>
+ <tr><td colspan="<?php echo $this->view['colspan'] + 1; ?>" style="line-height:2px; height:2px; background-color:#999999; padding:0px;"></td></tr>
+
+ <?php } ?>
+
<tr class="wpsg_row_summe">
<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_summe_label">
@@ -196,12 +195,16 @@ wpsg_debug($ar);*/ <?php foreach ($arCalculation['discount'] as $d) { ?>
<tr class="wpsg_row_discount wpsg_row_small">
<td colspan="" class="wpsg_cell_mwst_label">
- <?php echo __('Rabatt', 'wpsg'); ?>
- <?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
- <?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
- <?php } else { ?>
- <?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
- <?php } ?>
+ <?php echo __('Rabatt', 'wpsg'); ?>
+ <?php if ($this->getBackendTaxView() === WPSG_BRUTTO) { ?>
+ <?php echo __('(inkl. MwSt.)', 'wpsg'); ?>
+ <?php } else { ?>
+ <?php echo __('(zzgl. MwSt.)', 'wpsg'); ?>
+ <?php } ?>
+
+ <a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Rabatt bearbeiten', 'wpsg'); ?>" onclick="return WPSG_BE_Discount.editDiscount();"><span class="glyphicon glyphicon-pencil"></span></a>
+ <a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Rabatt löschen', 'wpsg'); ?>" onclick="return WPSG_BE_Discount.removeDiscount();"><span class="glyphicon glyphicon-trash"></span></a>
+
</td>
<td class="wpsg_cell_preis">
<?php echo wpsg_ff($d['set'], $this->get_option('wpsg_currency'), true); ?>
@@ -247,6 +250,4 @@ wpsg_debug($ar);*/ </tr>
<?php } } ?>
<?php } ?>
-</table>
-
-<?php wpsg_debug($arCalculation); ?>
\ No newline at end of file +</table>
\ No newline at end of file |
