<?php

	/**
	 * Text E-Mail Template für die Daten der Anfrage
	 * wird von adminmail.phtml und customermail.phtml verwendet
	 */

?><?php if (sizeof($this->view['requestlist']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { $prod_col = 25; } else { $prod_col = 35; } ?>

<?php echo wpsg_pad_right(__('Pos', 'wpsg'), 5); ?>
<?php echo wpsg_pad_right(__('Produkt', 'wpsg'), $prod_col); ?>
<?php echo wpsg_pad_left(__('Stückpreis', 'wpsg').' ', 15); ?>
<?php if (sizeof($this->view['requestlist']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
<?php echo wpsg_pad_left(__('MwSt.', 'wpsg').' ', 10); ?>
<?php } ?>
<?php echo wpsg_pad_right(__('Anzahl', 'wpsg'), 6); ?>
<?php echo wpsg_pad_left(__('Summe', 'wpsg'), 15); ?> 
----------------------------------------------------------------------------
<?php $i = 0; foreach ((array)$this->view['requestlist']['products'] as $product_index => $request_product) { $i ++; ?>
<?php echo wpsg_pad_right($i.'.', 5); ?>
<?php echo wpsg_pad_right(((wpsg_isSizedString($request_product['product_data']['detailname']))?$request_product['product_data']['detailname']:$request_product['product_data']['name']), $prod_col); ?>
<?php echo wpsg_pad_left(wpsg_ff($request_product['price'], $this->get_option('wpsg_currency')).' ', 15); ?>
<?php if (sizeof($this->view['requestlist']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1') { ?>
<?php echo wpsg_pad_left(wpsg_ff($request_product['product_data']['mwst_value'], '%').' ', 10); ?>
<?php } ?>
<?php echo wpsg_pad_left($request_product['amount'], 6); ?>
<?php echo wpsg_pad_left(wpsg_ff($request_product['price'] * $request_product['amount'], $this->get_option('wpsg_currency')), 15); ?> 
<?php /* Variantenanzeige im Produkt BEGIN */ ?>
<?php if ($this->hasMod('wpsg_mod_varianten') && $this->callMod('wpsg_mod_varianten', 'isVariantsProductKey', array($request_product['product_key']))) { ?>
<?php echo wpsg_pad_right(' ', 5); ?>
<?php echo __('Variante', 'wpsg'); ?>: <?php echo wpsg_hspc($request_product['variantenInfo']['key']); ?> 
<?php } ?>
<?php /* Variantenanzeige im Produkt ENDE */ ?>
<?php /* Gewichtsanzeige im Produkt BEGIN */ ?>
<?php if ($this->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($this->get_option('wpsg_mod_weight_showRequestPageProduct'))) { ?>

<?php echo wpsg_pad_right(' ', 5); ?>
<?php echo __('Gewicht', 'wpsg'); ?>: <?php echo wpsg_ff($request_product['product_data']['weight'], $this->get_option('wpsg_mod_weight_unit')); ?> 
<?php } ?>
<?php /* Gewichtsanzeige im Produkt ENDE */ ?>
<?php /* Produktvariablen BEGIN */ ?>
<?php if ($this->hasMod('wpsg_mod_productvars') && wpsg_isSizedInt($this->get_option('wpsg_mod_request_productvars')) && wpsg_isSizedArray($request_product['pv'])) { ?>
<?php foreach ($request_product['product_data']['pv'] as $pv) { ?>
<?php echo wpsg_pad_right(' ', 5); ?>
<?php echo wpsg_hspc($pv['name']); ?>: <?php if ($pv['typ'] === '3') { ?>
<?php if (wpsg_isSizedInt($request_product['pv'][$pv['id']])) { ?><?php echo __('Ja', 'wpsg'); ?><?php } else { ?><?php echo __('Nein', 'wpsg'); ?><?php } ?>
<?php } else { ?>
<?php echo $request_product['pv'][$pv['id']]; ?>
<?php } ?> 
<?php } ?>
<?php } ?>
<?php /* Produktvariablen ENDE */ ?>
<?php } ?>
 
<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
<?php echo wpsg_pad_right(__('Gesamtpreis (Netto)', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['price_netto'], $this->get_option('wpsg_currency')), 46); ?> 
<?php foreach ((array)$this->view['requestlist']['tax'] as $tax_key => $tax) { ?>
<?php echo wpsg_pad_right(wpsg_translate(__('zuzüglich MwSt. (#1#)', 'wpsg').':', $tax['name']), 45); ?><?php echo wpsg_pad_left(wpsg_ff($tax['tax_calc_value'], $this->get_option('wpsg_currency')), 31); ?> 
<?php } ?>
<?php echo wpsg_pad_right(__('Gesamtpreis (Brutto)', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['price_brutto'], $this->get_option('wpsg_currency')), 46); ?> 
<?php } else { ?>
<?php echo wpsg_pad_right(__('Gesamtpreis (Brutto)', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['price_brutto'], $this->get_option('wpsg_currency')), 46); ?> 
<?php foreach ((array)$this->view['requestlist']['tax'] as $tax_key => $tax) { ?>
<?php echo wpsg_pad_right(wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg').':', $tax['name']), 45); ?><?php echo wpsg_pad_left(wpsg_ff($tax['tax_calc_value'], $this->get_option('wpsg_currency')), 31); ?> 
<?php } ?>
<?php echo wpsg_pad_right(__('Gesamtpreis (Netto)', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['price_netto'], $this->get_option('wpsg_currency')), 46); ?> 
<?php } ?>
<?php /* Gewichtsanzeige BEGIN */ ?>
<?php if ($this->hasMod('wpsg_mod_weight') && wpsg_isSizedInt($this->get_option('wpsg_mod_weight_showRequestPage'))) { ?>
 
<?php echo wpsg_pad_right(__('Gesamtgewicht', 'wpsg').': ', 26 + $prod_col); ?><?php echo wpsg_pad_left(wpsg_ff($this->view['requestlist']['sum']['weight'], $this->get_option('wpsg_mod_weight_unit')), 15); ?>  
<?php } ?> 
<?php /* Gewichtsanzeige ENDE */ ?>
<?php /* Bestellvariablen BEGIN */ ?>
<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_ordervars')) && wpsg_isSizedArray($this->view['orderVars'])) { ?>
<?php echo __('Zusätzliche Angaben', 'wpsg'); ?>: 
 
<?php foreach ($this->view['orderVars'] as $ov_index => $ov) { ?>
<?php echo wpsg_pad_right(wpsg_hspc($ov['name']).': ', 30); ?><?php if ($ov['typ'] === '3') { ?>
<?php if (wpsg_isSizedInt($this->view['requestlist']['ov'][$ov['id']])) { ?><?php echo wpsg_pad_left(__('Ja', 'wpsg'), 46); ?><?php } else { ?><?php echo wpsg_pad_left(__('Nein', 'wpsg'), 46); ?><?php } ?>
<?php } else { ?>
<?php echo wpsg_pad_left($this->view['requestlist']['ov'][$ov['id']], 46); ?>
<?php } ?> 
<?php } ?>
<?php } ?>
<?php /* Bestellvariablen ENDE */ ?>


<?php if (wpsg_isSizedString($this->view['requestlist']['customer']['comment'])) { ?>
<?php echo __('Kommentar', 'wpsg'); ?>:
<?php echo wpsg_getStr($this->view['requestlist']['customer']['comment']); ?> 
<?php }?>
<?php echo __('Kontaktdaten', 'wpsg'); ?>:
  
<?php echo wpsg_pad_right(__('Firma', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['firma']), 46); ?> 
<?php echo wpsg_pad_right(__('Anrede', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['title']), 46); ?> 
<?php echo wpsg_pad_right(__('Vorname', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['vname']), 46); ?> 
<?php echo wpsg_pad_right(__('Name', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['name']), 46); ?> 
<?php echo wpsg_pad_right(__('E-Mail', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['email']), 46); ?> 
<?php echo wpsg_pad_right(__('Fax', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['fax']), 46); ?> 
<?php echo wpsg_pad_right(__('Tel.', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['tel']), 46); ?> 
<?php echo wpsg_pad_right(__('Strasse', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['strasse']), 46); ?>  
<?php echo wpsg_pad_right(__('PLZ', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['plz']), 46); ?> 
<?php echo wpsg_pad_right(__('Ort', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['ort']), 46); ?> 
<?php echo wpsg_pad_right(__('UStIdNr.', 'wpsg').': ', 30); ?><?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['ustidnr']), 46); ?>  
<?php /* Automatische Einbindung der benutzerdefinierten Felder BEGIN */ ?>
<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_request_customerdata'))) { ?>
<?php foreach ((array)$this->view['pflicht']['custom'] as $c_id => $c) { if ($c['show'] != '2') { ?>
<?php echo wpsg_pad_right(__($c['name'], 'wpsg').': ', 30); ?><?php if ($c['typ'] == '2') { ?>
<?php if (wpsg_isSizedInt($this->view['requestlist']['customer']['custom'][$c_id])) { ?><?php echo wpsg_pad_left(__('Ja', 'wpsg'), 46); ?><?php } else { ?><?php echo wpsg_pad_left(__('Nein', 'wpsg'), 46); ?><?php } ?>
<?php } else { ?>
<?php echo wpsg_pad_left(wpsg_getStr($this->view['requestlist']['customer']['custom'][$c_id]), 46); ?>
<?php } ?> 
<?php } } ?>
<?php } ?>
<?php /* Automatische Einbindung der benutzerdefinierten Kundenfelder ENDE */ ?>