Subversion Repositories wpShopGermany4

Compare Revisions

Regard whitespace Rev HEAD → Rev 8112

/mods/mod_productgroups/show_2.phtml
File deleted
/js/dsimagezoom.min.js
File deleted
/produkttemplates/standard3.phtml
File deleted
\ No newline at end of file
/order/view_dev.phtml
32,24 → 32,6
</div>
</div>
 
<div class="panel panel-default">
<div class="panel-heading" data-toggle="collapse" href="#collapse_calculation" style="cursor:pointer;">
<h4 class="panel-title"><?php echo __('Kalkulation (live from Db)', 'wpsg'); ?></h4>
</div>
<div id="collapse_calculation" class="panel-collapse collapse">
<div class="panel-body">
<pre><?php
$oCalculaiton = \wpsg\wpsg_calculation::getOrderCalculation($_REQUEST['edit_id'], true);
$arCalculation = $oCalculaiton->getCalculationArray(true);
wpsg_debug($arCalculation);
?></pre>
</div>
</div>
</div>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
 
<?php echo wpsg_drawForm_AdminboxStart(__('Technische Einstellungen', 'wüsg')); ?>
/mods/mod_rechnungen/settings_edit.phtml
197,15 → 197,11
<?php echo wpsg_drawForm_Checkbox('wpsg_rechnungen_produktattribute', __('Produktattribute auf der Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_rechnungen_produktattribute'), array('help' => 'wpsg_rechnungen_produktattribute')); ?>
<?php }?>
<?php if ($this->hasMod('wpsg_mod_deliverynote') == '1') {?>
<?php echo wpsg_drawForm_Checkbox('wpsg_rechnungen_deliverynote', __('Lieferdatum auf der Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_rechnungen_deliverynote'), array('help' => 'wpsg_rechnungen_deliverynote')); ?>
<?php }?>
 
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_showgutschriftrechnung', __('Rechnungsnummer auf Rechnungskorrektur anzeigen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_showgutschriftrechnung'), array('help' => 'wpsg_mod_rechnungen_showgutschriftrechnung')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_showpv', __('Produktvariablen auf Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_showpv'), array('help' => 'wpsg_mod_rechnungen_showpv')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_showov', __('Bestellvariablen auf Rechnung anzeigen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_showov'), array('help' => 'wpsg_mod_rechnungen_showov')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_hideCountry', __('Land auf Rechnung verbergen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_hideCountry'), array('help' => 'wpsg_mod_rechnungen_hideCountry')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_customermail', __('Rechnung/PDF an Bestellbestätigungsmail anhängen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_customermail'), ['help' => 'wpsg_mod_rechnungen_customermail']); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_rechnungen_customermail', __('Mail an Bestellbestätigung anhängen', 'wpsg'), $this->get_option('wpsg_mod_rechnungen_customermail'), ['help' => 'wpsg_mod_rechnungen_customermail']); ?>
<?php echo wpsg_drawForm_Input('wpsg_rechnungen_start', __('Startnummer (Rechnungen)', 'wpsg'), $this->get_option('wpsg_rechnungen_start'), array('help' => 'wpsg_rechnungen_start')); ?>
<?php echo wpsg_drawForm_Input('wpsg_gutschrift_start', __('Startnummer (Rechnungskorrektur)', 'wpsg'), $this->get_option('wpsg_gutschrift_start'), array('help' => 'wpsg_gutschrift_start')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_rechnungen_gutschrifttax', __('Mehrwertsteuersatz für Bearbeitungsgebühr', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_rechnungen_gutschrifttax'), array('help' => 'wpsg_mod_rechnungen_gutschrifttax')); ?>
/produkt/index.phtml
313,8 → 313,6
$arTermDisplay = [];
 
if (is_array($post_terms)) {
foreach ($post_terms as $term) {
if (!in_array($term->slug, $arTermExclude)) {
327,8 → 325,6
}
 
}
asort($arTermDisplay);
echo implode(', ', $arTermDisplay);
/mods/mod_rechnungen/multi_invoice_pdf.phtml
9,7 → 9,7
require_once WPSG_PATH_LIB.'wpsg_fpdf.class.php';
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top, $rhead_left, $rhead_top, $sum_multi_offset, $pdf, $data;
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top, $rhead_left, $rhead_top, $sum_multi_offset, $pdf;
// Positionierung der Absenderadresszeile
$absender_left = 25;
34,16 → 34,10
// Anzahl an Produkten pro Seite
$prod_break = $this->get_option('wpsg_rechnungen_pdfperpage');
 
/*
$arCalculation = $this->view['basket']['arCalculation'];
$data = $this->view['multi_data']['orders'][0]['data'];
$sum = $this->view['multi_data']['orders'][0]['sum'];
*/
 
$arCalculation = array_values($this->view['multi_data']['order_data'])[0]['arCalculation'];
$data = $this->view['data'];
$sum = $arCalculation['sum'];
 
if ($this->getFrontendTaxView() === WPSG_NETTO) $taxdisplay = 'netto';
else $taxdisplay = 'brutto';
51,28 → 45,28
function AddRechnungPage($shop, $pdf) {
 
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top, $offset, $sum_multi_offset, $data;
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top, $offset, $sum_multi_offset;
$pdf->AddPage();
$sum_multi_offset = 0;
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.pdf")) {
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf")) {
$pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.pdf");
$pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf");
$tplidx = $pdf->importPage(1, '/MediaBox');
$pdf->useTemplate($tplidx, 0, 0, 210);
} else if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.jpg")) {
} else if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg")) {
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
}
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg"))
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg"))
{
list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg");
list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg");
// Umrechnung von Inch zu Pixel
$wPix = (25.4 * (int)$width) / 96;
99,7 → 93,7
if(isset($logo_pos) && $logo_pos === "right") { $abscissa = $rightPos; }
$pdf->SetAlpha($alpha);
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg", $abscissa, $ordinate, $wPix, $hPix);
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg", $abscissa, $ordinate, $wPix, $hPix);
$pdf->SetAlpha(1);
}
194,11 → 188,11
$rhead_count = 1;
$sum_multi_offset = 0;
// $orders = $this->view['multi_data']['orders'];
$orders = $this->view['multi_data']['orders'];
 
// noMwSt
$head_data = array_values($this->view['multi_data']['order_data'])[0];
if ( ($head_data['oCalculation']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B) && ($head_data['oOrder']->isInnerEu()) ) {
if ( ($head_data['oCalculation']->getTaxMode() === wpsg_calculation::TAXMODE_B2B) && ($head_data['oOrder']->isInnerEu()) ) {
$bNoTax = true;
} else {
$bNoTax = false;
244,6 → 238,8
$pdf->Text($rhead_left + 155, $rhead_top + $sum_multi_offset, __("Best. Nr.", "wpsg"));
$pdf->Text($rhead_left + 155, $rhead_top + $sum_multi_offset + 6, $oOrder->getNr());
 
$summe = 0;
 
$bKopf = false; $pnr = 1; $offset = 0; $count = 0;
foreach ($oOrder->getOrderProducts() as $oOrderProduct) {
384,7 → 380,7
* Produktbeschreibung anzeigen Ja/Nein
*/
$pBeschreibungHeight = 0;
if ($this->get_option("wpsg_rechnungen_pbeschreibung") == "1" && trim(strip_tags($oOrderProduct->getProduct()->getShortDescription())) != '') {
if ($this->get_option("wpsg_rechnungen_pbeschreibung") == "1" && trim(strip_tags($oOrderProduct->getShortDescription())) != '') {
$produktBeschreibung = nl2br($produktBeschreibung);
preg_match_all('/\<br \/\>/', $produktBeschreibung, $treffer);
473,6 → 469,8
$pnr ++;
$count ++;
 
$summe += $p['price'] * $p['menge'];
if ($pdf->getY() > 220 || ($count >= $prod_break && sizeof($oOrder->getOrderProducts()) > ($pnr - 1))) {
AddRechnungPage($this, $pdf);
787,6 → 785,19
$pdf->setXY($prod_left + 140, $prod_top + $offset + 10 - 5);
$pdf->Cell(37, 8, wpsg_ff($arCalculation['sum']['netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
// if (sizeof($arCalculation['tax']) >= 1) {
// foreach ($arCalculation['tax'] as $k => $mw) {
// if ($k === 0) continue;
// $offset += 5;
// $pdf->Text($prod_left + 80, $prod_top + $offset + 10, __("MwSt. ", "wpsg").wpsg_ff($mw['tax_value'], '%'));
// $pdf->setXY($prod_left + 140, $prod_top + $offset + 10 - 5);
// $pdf->Cell(37, 8, wpsg_ff($mw['sum'], $this->get_option('wpsg_currency')), 0, 0, 'R');
// }
// }
if (sizeof($arCalculation['tax']) > 1) {
$offset += 5;
899,6 → 910,7
if ($this->view['preview']) {
 
//$pdf->Output($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array('multi')).$filename, 'F');
$pdf->Output();
exit;
/admin/kalkulation.phtml
44,7 → 44,6
<?php echo wpsg_drawForm_Checkbox('wpsg_hideemptyshipping', __('Versandkosten bei 0 ausblenden', 'wpsg'), $this->get_option('wpsg_hideemptyshipping'), array('help' => 'Preiskalkulation_wpsg_hideemptyshipping')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_hideemptypayment', __('Zahlungskosten bei 0 ausblenden', 'wpsg'), $this->get_option('wpsg_hideemptypayment'), array('help' => 'Preiskalkulation_wpsg_hideemptypayment')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_noroundamount', __('Vor Multiplikation mit Menge nicht runden', 'wpsg'), $this->get_option('wpsg_noroundamount'), ['help' => 'Preiskalkulation_wpsg_noroundamount']); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_deliverycountrytax', __('Mwst. gemäß Lieferland berechnen', 'wpsg'), $this->get_option('wpsg_deliverycountrytax'), ['help' => 'Preiskalkulation_wpsg_deliverycountrytax']); ?>
</div>
</div>
/produkttemplates/standard2.phtml
12,14 → 12,6
 
$oProduct = $this->view['oProduct'];
 
$var_info = [];
if ($this->callMod('wpsg_mod_productvariants', 'isVariantsProductKey', [$oProduct->getProductKey()])) {
$var_info = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', [$oProduct->getProductKey()]);
}
?>
 
<div class="wpsg_produkt_wrapper wpsg_produkt_wrapper2">
30,11 → 22,9
<div class="wpsg_produkt wpsg_product_name">
 
<?php if (!$this->titleDisplayed) { ?>
<h1 class="wpsg_producttitle"><?php echo $this->getProductName($this->view['data']['id']); ?></h1>
<?php if ($this->getProductName($this->view['data']['id']) !== $this->view['data']['detailname']) { ?>
<h2 class="wpsg_productdetailtitle"><?php echo $this->view['data']['detailname']; ?></h2>
<h1 itemprop="name" class="wpsg_producttitle"><?php echo $this->getProductName($this->view['data']['id']); ?></h1>
<h2 itemprop="detailname" class="wpsg_productdetailtitle"><?php echo $this->view['data']['detailname']; ?></h2>
<?php } ?>
<?php } ?>
 
<?php $this->callMods('product_top_afterheadline', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
 
44,11 → 34,6
 
<div itemscope itemtype="http://schema.org/Product" class="wpsg_produkt wpsg_produkt_<?php echo $this->view['data']['id']; ?>">
 
<meta itemprop="url" content="<?php echo $oProduct->getProductURL().'?test'; ?>" />
<meta itemprop="name" content="<?php echo wpsg_hspc($this->getProductName($this->view['data']['id'])); ?>" />
<meta itemprop="detailname" content="<?php echo wpsg_hspc($this->getProductName($this->view['data']['id']).' / '.rtrim(($var_info['key']??''), ' /')); ?>" />
<meta itemprop="sku" content="<?php echo wpsg_hspc($oProduct->getEAN()); ?>" />
<?php /* Block für die Produktbilder START */ ?>
<?php
/mods/mod_rechnungen/invoice_pdf.phtml
6,13 → 6,11
require_once WPSG_PATH_LIB.'FPDF_1.81/fpdf.php';
require_once WPSG_PATH_LIB.'FPDI_2.2.0/autoload.php';
require_once WPSG_PATH_LIB.'wpsg_fpdf.class.php';
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top;
 
/** @var \wpsg\wpsg_invoice|null $oInvoice */
$oInvoice = $this->view['oInvoice']??null;
 
// Positionierung der Absenderadresszeile
$absender_left = 25;
$absender_top = 50;
38,8 → 36,13
else $taxdisplay = 'brutto';
// Damit die Steuer bei der Kleinunternehmerregelung nicht angezeigt wird leer ich den Array sicherheitshalber
if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) ) unset($this->view['basket']['mwst']);
if ($this->get_option('wpsg_kleinunternehmer') == '1')
{
unset($this->view['basket']['mwst']);
}
if (!function_exists('AddRechnungPage'))
{
50,22 → 53,23
$pdf->AddPage();
 
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.pdf")) {
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf")) {
$pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.pdf");
$pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf");
$tplidx = $pdf->importPage(1, '/MediaBox');
$pdf->useTemplate($tplidx, 0, 0, 210);
} else if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.jpg")) {
} else if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg")) {
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
}
 
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg"))
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg"))
{
list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg");
list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg");
// Umrechnung von Inch zu Pixel
$wPix = (25.4 * (int)$width) / 96;
92,7 → 96,7
if(isset($logo_pos) && $logo_pos === "right") { $abscissa = $rightPos; }
$pdf->SetAlpha($alpha);
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg", $abscissa, $ordinate, $wPix, $hPix);
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg", $abscissa, $ordinate, $wPix, $hPix);
$pdf->SetAlpha(1);
}
99,19 → 103,19
// Absenderadresszeile (Wird in der Konfiguration hinterlegt)
$pdf->SetFont('Arial', '', 6);
$pdf->Text($absender_left, $absender_top, $shop->replaceUniversalPlatzhalter(__($shop->get_option("wpsg_rechnungen_adresszeile"), 'wpsg'), $shop->view['data']['id']??0));
$pdf->Text($absender_left, $absender_top, $shop->replaceUniversalPlatzhalter(__($shop->get_option("wpsg_rechnungen_adresszeile"), 'wpsg'), $shop->view['data']['id']));
if (wpsg_getStr($shop->view['kunde']['kuerzel']) != "") $shop->view['kunde']['kuerzel'] = $shop->view['kunde']['kuerzel'].'-';
// Adresse des Kunden
$pdf->SetFont('Arial', '', 12);
$pdf->Text($adress_left, $adress_top, $shop->view['kunde']['firma']??'');
$pdf->Text($adress_left, $adress_top + 5, ($shop->view['kunde']['vname']??'').' '.($shop->view['kunde']['name']??''));
$pdf->Text($adress_left, $adress_top + 10, ($shop->view['kunde']['strasse']??'').' '.($shop->view['kunde']['nr']??''));
$pdf->Text($adress_left, $adress_top + 15, ($shop->view['kunde']['plz']??'').' '.($shop->view['kunde']['ort']??''));
$pdf->Text($adress_left, $adress_top, $shop->view['kunde']['firma']);
$pdf->Text($adress_left, $adress_top + 5, $shop->view['kunde']['vname'].' '.$shop->view['kunde']['name']);
$pdf->Text($adress_left, $adress_top + 10, $shop->view['kunde']['strasse'].' '.wpsg_getStr($shop->view['kunde']['nr']));
$pdf->Text($adress_left, $adress_top + 15, $shop->view['kunde']['plz'].' '.$shop->view['kunde']['ort']);
if ($shop->get_option("wpsg_mod_rechnungen_hideCountry") == '0')
$pdf->Text($adress_left, $adress_top + 20, strtoupper($shop->view['oOrder']->getInvoiceCountryName()));
 
if ($shop->get_option("wpsg_mod_rechnungen_hideCountry") == '0') $pdf->Text($adress_left, $adress_top + 20, strtoupper($shop->view['oOrder']->getInvoiceCountryName()));
// Rechnungsdaten
$pdf->SetFont('Arial', 'B', 16);
$pdf->Text($rdata_left, $rdata_top, __('Rechnung', 'wpsg'));
123,7 → 127,7
{
$pdf->Text($rdata_left + 35, $rdata_top, __("Fällig am", "wpsg"));
$pdf->Text($rdata_left + 35, $rdata_top + 6, date("d.m.Y", strtotime($shop->view['faelligkeitdatum'])));
$pdf->Text($rdata_left + 35, $rdata_top + 6, $shop->view['faelligkeitdatum']);
}
142,7 → 146,7
$pdf->Text($rdata_left + 135, $rdata_top + 6, ((trim($shop->view['data']['onr']) != '')?$shop->view['data']['onr']:$shop->view['data']['id']));
$pdf->Text($rdata_left + 155, $rdata_top, __("Datum", "wpsg"));
$pdf->Text($rdata_left + 155, $rdata_top + 6, date("d.m.Y", strtotime($shop->view['rDatum'])));
$pdf->Text($rdata_left + 155, $rdata_top + 6, $shop->view['rDatum']);
if ($shop->view['oOrder']->isInnerEu())
{
178,45 → 182,11
$pdf->SetAutoPageBreak(true, 5);
AddRechnungPage($this, $pdf);
 
if ($this->get_option('wpsg_deliverycountrytax') === '1') {
$value = false;
$kl = $this->view['kunde']['land'];
if ( ($kl['mwst_a']) && ($kl['mwst_b']) && ($kl['mwst_c']) && ($kl['mwst_d']) == 0.0000 ) $value = true;
$deliverycountrytax = $value;
}
 
if (
( ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B) && ( $this->view['oOrder']->isInnerEu() || $deliverycountrytax ) )
||
( $this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS )
) $bNoTax = true;
else $bNoTax = false;
 
$bTaxCol = false;
if ($this->get_option('wpsg_showMwstAlways') === '1') $bTaxCol = true;
else if (!$bNoTax) $bTaxCol = true;
 
if ($bNoTax) {
 
$discount_value = $this->view['basket']['arCalculation']['sum']['discount_netto'];
$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_netto'];
$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_netto'];
 
} else {
 
$discount_value = $this->view['basket']['arCalculation']['sum']['discount_brutto'];
$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_brutto'];
$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_brutto'];
 
}
 
$summe = 0;
 
$bKopf = false; $pnr = 1; $offset = 0; $count = 0;
foreach ($this->view['basket']['arCalculation']['product'] as $p)
foreach ($this->view['basket']['produkte'] as $p)
{
$product = wpsg_product::getInstance($p['product_id']);
 
if (!$bKopf)
{
226,9 → 196,11
$pdf->Cell(10, 8, __("Nr.", "wpsg"), 1, 0, 'C');
$pdf->setXY($prod_left + 10, $prod_top);
$pdf->Cell( (($bTaxCol)?87:102), 8, "Name", 1, 0, 'L');
if(is_array($this->view['basket']['mwst'])) {
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, "Name", 1, 0, 'L');
}
 
if ($bTaxCol)
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$pdf->setXY($prod_left + 97, $prod_top);
253,18 → 225,35
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
if ($this->get_option('wpsg_mod_rechnungen_anr') == '1') $pdf->Cell(10, 8, $product->getNr(), 0, 0, 'C');
else $pdf->Cell(10, 8, $pnr.".", 0, 0, 'C');
if ($this->get_option('wpsg_mod_rechnungen_anr') == '1')
{
if ($this->get_option('wpsg_rechnungen_pdetailname') == '1') $produkt_text = $this->getProductName($this->getProduktID($p['product_id']), true);
else $produkt_text = $this->getProductName($this->getProduktID($p['product_id']), false);
$pdf->Cell(10, 8, $p['anr'], 0, 0, 'C');
 
$produktBeschreibung = trim(strip_tags($product->getShortDescription()));
}
else
{
$pdf->Cell(10, 8, $pnr.".", 0, 0, 'C');
}
if ($this->get_option('wpsg_rechnungen_pdetailname' == '1')) {
 
$produkt_text = $this->getProductName($this->getProduktID($p['id']), true);
 
} else {
 
$produkt_text = $this->getProductName($this->getProduktID($p['id']), false);
 
}
 
$produktBeschreibung = trim(strip_tags($p['beschreibung']));
if ($this->isOtherLang())
{
$trans_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($this->getProduktID($p['product_id']))."' AND `lang_code` = '".wpsg_q($this->getCurrentLanguageCode())."'");
$trans_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($this->getProduktID($p['id']))."' AND `lang_code` = '".wpsg_q($this->getCurrentLanguageCode())."'");
if (is_array($trans_db) && sizeof($trans_db) > 0)
{
304,13 → 293,16
if ($this->get_option('wpsg_mod_rechnungen_anr') === '2')
{
$anr = $this->getProductAnr($product->getProductKey());
$anr = $this->getProductAnr($p['productkey']);
$produkt_text .= "\r\n".wpsg_translate(__('Artikelnummer: #1#', 'wpsg'), $anr);
}
$produkt_text_cell_width = 102;
if ($bTaxCol) $produkt_text_cell_width = 87;
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$produkt_text_cell_width = 87;
}
$produkt_text_width = $pdf->GetStringWidth($produkt_text);
//$produkt_text_cell_width = (($this->arMwSt == "-1")?87:102);
323,30 → 315,37
//$height += 3 + 5 + $pdf->getY() - $height_y;
//$pdf->Cell((($this->arMwSt == "-1")?102:87), 8, $produkt_text, 0, 0, 'L');
if ($bTaxCol) {
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1') {
 
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, (($bNoTax)?'0.00 %':wpsg_ff($this->view['basket']['arCalculation']['tax'][$p['tax_key']]['tax_value'], '%')), 0, 0, 'C');
$pdf->Cell(15, 8, (($this->view['basket']['noMwSt'] == '1')?'0.00 %':wpsg_ff($p['mwst_value'], '%')), 0, 0, 'C');
 
}
$pdf->setXY($prod_left + 112, $prod_top + $offset);
$pdf->Cell(15, 8, $p['amount'], 0, 0, 'C');
$pdf->Cell(15, 8, $p['menge'], 0, 0, 'C');
if ( ( wpsg_ShopController::get_option('wpsg_preisangaben') == WPSG_NETTO ) || $bNoTax ) $preis_single = $p['netto_calculated_single'];
else $preis_single = $p['brutto_calculated_single'];
if (wpsg_ShopController::get_option('wpsg_preisangaben') == WPSG_NETTO) {
$preis = $p['preis_netto'];
} else {
$preis = $p['preis_brutto'];
}
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($preis_single, $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($preis, $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($preis_single * $p['amount'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($preis * $p['menge'], $this->get_option('wpsg_currency')), 0, 0, 'R');
/**
* Produktbeschreibung anzeigen Ja/Nein
*/
$pBeschreibungHeight = 0;
if ($this->get_option("wpsg_rechnungen_pbeschreibung") == "1" && trim(strip_tags($product->getShortDescription())) != '')
if ($this->get_option("wpsg_rechnungen_pbeschreibung") == "1" && trim(strip_tags($p['beschreibung'])) != '')
{
 
$produktBeschreibung = nl2br($produktBeschreibung);
373,12 → 372,11
if ($this->get_option('wpsg_rechnungen_produktattribute') == '1')
{
$attributeInfo = $this->callMod('wpsg_mod_produktattribute', 'getProductAttributeByProductId', array($this->getProduktId($p['product_id'])));
$attributeInfo = $this->callMod('wpsg_mod_produktattribute', 'getProductAttributeByProductId', array($this->getProduktId($p['id'])));
foreach ($attributeInfo as $pa)
{
if ($pa['value'] == "") $pa['value'] = "Keine Angabe";
$pa_text = $pa['name'].': '.$pa['value'];
$height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, $pa_text, 0, 'L', 0, $produkt_text_cell_width);
388,10 → 386,10
/**
* Variante ?
*/
if (preg_match('/pv_(.*)/', $p['product_key']))
if (preg_match('/pv_(.*)/', $p['productkey']))
{
$variInfo = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['product_key']));
$variInfo = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['productkey']));
$height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, wpsg_translate(__('Variante: #1#', 'wpsg'), $variInfo['key']), 0, 'L', 0, $produkt_text_cell_width);
399,7 → 397,7
}
if ($this->hasMod('wpsg_mod_deliverynote') && ($this->get_option('wpsg_rechnungen_deliverynote') == '1'))
if ($this->hasMod('wpsg_mod_deliverynote'))
{
$arDN_order = $this->callMod('wpsg_mod_deliverynote', 'loadDeliveryNotesFromOrder', array($this->view['data']['id']));
423,10 → 421,15
// Jetzt die Rahmen zeichnen
$pdf->Rect($prod_left, $prod_top + $offset, 10, $height);
$pdf->Rect($prod_left + 10, $prod_top + $offset, (($bTaxCol)?87:102), $height);
$pdf->Rect($prod_left + 10, $prod_top + $offset, ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), $height);
if ($bTaxCol) $pdf->Rect($prod_left + 97, $prod_top + $offset, 15, $height);
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$pdf->Rect($prod_left + 97, $prod_top + $offset, 15, $height);
}
$pdf->Rect($prod_left + 112, $prod_top + $offset, 15, $height);
$pdf->Rect($prod_left + 127, $prod_top + $offset, 25, $height);
$pdf->Rect($prod_left + 152, $prod_top + $offset, 25, $height);
436,12 → 439,9
$pnr ++;
$count ++;
if ($bNoTax) $price = $p['netto'];
else $price = $p['brutto'];
$summe += $p['price'] * $p['menge'];
 
$summe += $price * $p['amount'];
if ($pdf->getY() > 220 || ($count >= $prod_break && sizeof($this->view['basket']['arCalculation']['product']) > ($pnr - 1)))
if ($pdf->getY() > 220 || ($count >= $prod_break && sizeof($this->view['basket']['produkte']) > ($pnr - 1)))
{
AddRechnungPage($this, $pdf);
451,6 → 451,44
} // produkte
// Gutschein
/*
if ((isset($this->view['basket']['gs'])) && abs($this->view['basket']['gs_value']) > 0)
{
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $this->view['basket']['gs']['code']), 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$mwst = __('anteilig', 'wpsg');
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
}
$pdf->setXY($prod_left + 112, $prod_top + $offset);
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$gs_value_einzel = '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency'));
$gs_value_gesamt = '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency'));
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, $gs_value_einzel, 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, $gs_value_gesamt, 1, 0, 'R');
$offset += 8;
}
*/
if (wpsg_isSizedArray($this->view['basket']['arCalculation']['voucher'])) {
foreach ($this->view['basket']['arCalculation']['voucher'] as $v) {
460,9 → 498,9
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( (($bTaxCol)?87:102), 8, wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $v['code']), 1, 0, 'L');
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $v['code']), 1, 0, 'L');
if ($bTaxCol)
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$mwst = __('anteilig', 'wpsg');
491,7 → 529,7
}
 
// Versandkosten
if ( ($shipping_cost != '') && ($shipping_cost != 0) )
if ($this->view['basket']['sum']['preis_shipping'] != '' && $this->view['basket']['sum']['preis_shipping'] != 0)
{
$pdf->SetFont('Arial', '', 9);
499,17 → 537,26
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( (($bTaxCol)?87:102), 8, wpsg_translate(__('Versandkosten "#1#"', 'wpsg'), $this->view['oOrder']->getShippingLabel()), 1, 0, 'L');
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Versandkosten "#1#"', 'wpsg'), $this->view['oOrder']->getShippingLabel()), 1, 0, 'L');
if ($bTaxCol)
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
 
if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $bNoTax) $mwst = wpsg_ff(0.00, '%');
else {
if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $this->view['basket']['noMwSt'] == '1')
{
if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') $mwst = _('anteilig');
else {
$mwst = 0;
 
}
else
{
if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') {
$mwst = _('anteilig');
} else {
$mwst = wpsg_ff($this->view['basket']['arCalculation']['shipping'][0]['tax'], '%');
$mwst = wpsg_ff($this->view['basket']['arCalculation']['tax'][$this->view['basket']['arCalculation']['shipping'][0]['tax_key']]['tax_value'], '%');
526,17 → 573,58
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($shipping_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($shipping_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$offset += 8;
// Zusammengesetzte Versandarten darstellen
/*
if (wpsg_isSizedArray($this->view['basket']['shipping']['methods'])) {
foreach ($this->view['basket']['shipping']['methods'] as $shipping) {
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
$pdf->Cell(10, 8, '', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $this->getShippingName($shipping), 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
if ($this->view['basket']['shipping'][$shipping]['tax_rata'] == 1) { $mwst = __('Anteilig', 'wpsg'); }
else { $mwst = wpsg_ff($this->view['basket']['shipping'][$shipping]['mwst'], '%'); }
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
}
$pdf->setXY($prod_left + 112, $prod_top + $offset);
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_brutto'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_brutto'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$offset += 8;
}
}
*/
}
// Zahlungskosten
if ( ($payment_cost != '') && ($payment_cost != 0) )
if ($this->view['basket']['sum']['preis_payment'] != '' && $this->view['basket']['sum']['preis_payment'] != 0)
{
$pdf->SetFont('Arial', '', 9);
544,18 → 632,18
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( (($bTaxCol)?87:102), 8, $this->arPayment[$this->view['data']['type_payment']]['name'], 1, 0, 'L');
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $this->arPayment[$this->view['data']['type_payment']]['name'], 1, 0, 'L');
if ($bTaxCol)
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $bNoTax)
if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $this->view['basket']['noMwSt'] == '1')
{
$mwst = 0;
}
else
{
 
$mwst = wpsg_ff(0.00, '%');
 
} else {
if ($this->view['basket']['arCalculation']['payment'][0]['tax_key'] === '0') {
 
$mwst = _('anteilig');
578,10 → 666,10
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($payment_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($payment_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$offset += 8;
600,14 → 688,23
if (strpos($this->view['storno_fee'], '%') !== false) $label .= ' ('.wpsg_ff($this->view['storno_fee'], '%').')';
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( (($bTaxCol)?87:102), 8, $label, 1, 0, 'L');
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $label, 1, 0, 'L');
if ($bTaxCol)
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
if ($bNoTax) $mwst = wpsg_ff(0.00, '%');
else $mwst = wpsg_ff($this->view['storno_fee_tax_value'], '%');
if ($this->view['basket']['noMwSt'] == '1')
{
$mwst = 0;
}
else
{
$mwst = wpsg_ff($this->view['storno_fee_tax_value'], '%');
}
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
636,102 → 733,65
$pdf->Cell(37, 8, $this->view['kunde']['ustidnr'], 0, 0, 'R');
}
$offset += 10; // Abstand zwischen Tabelle und Auswertung
 
if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) )
$offset += 10;
if ($this->get_option('wpsg_kleinunternehmer'))
{
$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] + $this->view['basket']['arCalculation']['sum']['discount_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) $offset += 5;
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'] + $this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$offset += 5;
 
} else {
}
else
{
if ($bNoTax)
if ($this->view['basket']['noMwSt'] == '1')
{
$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("BRUTTOBETRAG", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] + $this->view['basket']['arCalculation']['sum']['discount_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
//if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) )
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto'] + $this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$offset += 5;
 
if ( !(($this->view['oOrder']->isInnerEu() || $deliverycountrytax) && ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B)) ) {
 
if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
{
 
$mw_count = 0;
foreach ($this->view['basket']['arCalculation']['tax'] as $mw)
{
 
if ( $mw['tax_value'] > 0 && $mw['sum'] > 0 ) {
 
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. ", "wpsg").wpsg_ff($mw['tax_value'], '%'));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($mw['sum'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff(0, $this->get_option('wpsg_currency')), 0, 0, 'R');
$mw_count++;
 
}
 
}
}
if ($mw_count >= 2)
else
{
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] - $this->view['basket']['arCalculation']['sum']['netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Text($prod_left, $prod_top + $offset, __("Der Gesamtbetrag setzt sich wie folgt zusammen", "wpsg"));
}
} else if ( !($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) $offset -= 5;
 
} else {
 
$pdf->Text($prod_left, $prod_top + $offset, __("Der Gesamtbetrag setzt sich wie folgt zusammen", "wpsg").':');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("NETTOBETRAG", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['netto'] + $this->view['basket']['arCalculation']['sum']['discount_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto'] + $this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
if (sizeof($this->view['basket']['mwst']) >= 1)
{
 
$mw_count = 0;
foreach ($this->view['basket']['arCalculation']['tax'] as $mw)
foreach ($this->view['basket']['mwst'] as $mw)
{
 
if ( $mw['tax_value'] > 0 && $mw['sum'] > 0) {
 
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. ", "wpsg").wpsg_ff($mw['tax_value'], '%'));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. ", "wpsg").wpsg_ff($mw['value'], '%'));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($mw['sum'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$mw_count++;
 
}
 
}
}
if ($mw_count >= 2)
if (sizeof($this->view['basket']['mwst']) > 1)
{
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] - $this->view['basket']['arCalculation']['sum']['netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'] - $this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
}
740,31 → 800,28
}
// Rabatt
if ($discount_value > 0)
if ($this->view['basket']['sum']['preis_rabatt'] > 0)
{
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Rabatt", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, '-'.wpsg_ff($discount_value, $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
}
 
// Wertgutschein
if ( $arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto'] ) {
if ($arCalculation['sum']['topay_brutto'] !== $arCalculation['sum']['brutto']) {
 
if (!$bNoTax) {
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("SUMME", "wpsg"));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Bruttobetrag", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->setFont('Arial', '', '9');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setFont('Arial', '', '9');
} else if (!($mw_count >= 2)) $offset -= 5;
 
foreach ($arCalculation['coupon'] as $c) {
$offset += 5;
790,29 → 847,25
} else {
$offset += 5;
$pdf->setFont('Arial', 'B', '9');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("GESAMTSUMME", "wpsg"));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("SUMME", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
 
/* Endbetrag wird fett ausgegeben */
$pdf->Cell(37, 8, wpsg_ff($arCalculation['sum']['topay_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setFont('Arial', 'B', '9');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setFont('Arial', '', '9');
}
if (($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) )
if ($this->get_option('wpsg_kleinunternehmer') == '1')
{
 
$offset += 3;
$pdf->setFont('Arial', '', '8');
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, '('.$this->get_option('wpsg_kleinunternehmer_text').')');
$offset += 8;
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset + 5, 5, $this->get_option('wpsg_kleinunternehmer_text'));
$offset += 15;
}
 
$offset += 5;
if ($this->hasMod('wpsg_mod_deliverynote') && ($this->get_option('wpsg_rechnungen_deliverynote') == '1'))
if ($this->hasMod('wpsg_mod_deliverynote'))
{
$arDN_order = $this->callMod('wpsg_mod_deliverynote', 'loadDeliveryNotesFromOrder', array($this->view['data']['id']));
822,33 → 875,35
if ($delivery_date !== false && sizeof($arDN_order) == 1)
{
$pdf->setFont('Arial', 'B', '9');
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, __('Lieferung:', 'wpsg'));
$pdf->setFont('Arial', '', '9');
$pdf->wpsg_MultiCell($prod_left + 16, $prod_top + $offset, 5, wpsg_translate(__('#1#', 'wpsg'), date('d.m.Y', $delivery_date)));
$offset += 8;
$offset += 10;
$pdf->wpsg_MultiCell($prod_left, $prod_top + $offset, 5, wpsg_translate(__('Lieferung: #1#', 'wpsg'), date('d.m.Y', $delivery_date)));
$offset += 5;
}
}
$offset += 5;
if ($this->view['fussText'] != "")
{
$pdf->setFont('Arial', '', '9');
//$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, utf8_encode($this->view['fussText']));
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $this->view['fussText']);
$offset += 8;
$pdf->SetFont('Arial', 'B', 9);
$offset += 10;
}
$offset += 10;
$shipping_adress = false;
 
$shipping_adress = false;
if ($this->hasMod('wpsg_mod_shippingadress') && $this->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array('k_id' => $this->view['data']['k_id'], 'o_id' => $this->view['data']['id']))) {
$pdf->setFont('Arial', 'B', 9);
$pdf->Text($prod_left, $prod_top + $offset, __("Lieferanschrift", "wpsg").":");
$offset += 2;
$offset += 5;
$pdf->setFont('Arial', '', 9);
864,6 → 919,7
$shipping_adress .= $this->view['data']['shipping_plz'].' '.$this->view['data']['shipping_ort']."\r\n";
$shipping_adress .= $this->view['data']['shipping_land']['name'];
$start = $pdf->getY();
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $shipping_adress, 0, 'L', 0, 100);
$offset += $pdf->getY() - $start;
872,15 → 928,13
}
$offset += 5;
// Bestellvariablen
if ($this->hasMod('wpsg_mod_ordervars') && $this->get_option('wpsg_mod_rechnungen_showov') == '1')
{
 
$pdf->SetFont('Arial', 'B', 9);
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset - 7, 5, __("Angaben während der Bestellung", "wpsg").":");
$pdf->SetFont('Arial', '', 9);
 
$bvars = @unserialize($this->view['data']['bvars']);
if (!is_array($bvars)) $bvars = array();
908,10 → 962,20
}
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset - 6, 5, $strBVars);
$pdf->SetFont('Arial', 'B', 9);
$pdf->Text($prod_left, $prod_top + $offset, __("Angaben während der Bestellung", "wpsg").":");
$pdf->SetFont('Arial', '', 9);
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $strBVars);
 
}
if (!file_exists($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id']))))
{
mkdir($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'])), 0777, true);
}
$this->callMods('wpsg_mod_rechnungen_pdf', array(&$pdf, &$this->view['data']['id'], &$this->view['preview'], &$this->view['invoice']));
$filename = $this->view['filename'].".pdf";
924,7 → 988,7
} else {
$pdf->Output($oInvoice->getFilePath(), 'F');
$pdf->Output($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'])).$filename, 'F');
// Hier wird der Dateiname an FPD übergeben. Er soll sich aus der Rechnungsnummer ergeben, auch wenn das Dokument über die ID gespeichert ist.
if ($this->view['output'] === true) $pdf->Output($this->view['filename_out'], 'I');
931,3 → 995,4
}
 
?>
/warenkorb/checkout.phtml
162,14 → 162,7
<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse:", "wpsg"); ?>
<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
</label>
<input
class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="email"
id="email"
name="wpsg[checkout][email]"
value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['email'])); ?>"
autocomplete="off"
/>
<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[checkout][email]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['email'])); ?>" />
</div>
<?php } ?>
179,14 → 172,7
<label for="email" class="wpsg_checkout"><?php echo __("E-Mail (Wiederholung:)", "wpsg"); ?>
<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
</label>
<input
class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="email"
id="email2"
name="wpsg[checkout][email2]"
value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['email2'])); ?>"
autocomplete="off"
/>
<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email2" name="wpsg[checkout][email2]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['email2'])); ?>" />
</div>
<?php } ?>
<?php } ?>
/mods/mod_rechnungen/order_view.phtml
34,14 → 34,7
<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
if ($r['o_id'] == '0') {
// Multirechnung
$r_o_ids = array_map('intval', explode(',', $r['o_ids']));
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id='.$r_o_ids[0].'&r_id='.$r['id'].'&do=copy', 'wpsg-mod_invoice-order_ajax-copy-'.$r_o_ids[0]);
} else {
// normale Rechnung
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id='.$this->view['data']['id'].'&r_id='.$r['id'].'&do=copy', 'wpsg-mod_invoice-order_ajax-copy-'.$this->view['data']['id']);
}
 
?>"><?php echo ' &nbsp;'.__("Kopie senden", "wpsg"); ?></a>&nbsp;
/mods/mod_rechnungen/accounting_pdf.phtml
10,9 → 10,6
global $absender_left, $absender_top, $adress_left, $adress_top, $rdata_left, $rdata_top;
 
/** @var wpsg\wpsg_invoice|null $oInvoice */
$oInvoice = $this->view['oInvoice'];
 
// Positionierung der Absenderadresszeile
$absender_left = 25;
$absender_top = 50;
38,8 → 35,13
else $taxdisplay = 'brutto';
 
// Damit die Steuer bei der Kleinunternehmerregelung nicht angezeigt wird leer ich den Array sicherheitshalber
if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) ) unset($this->view['basket']['mwst']);
if ($this->get_option('wpsg_kleinunternehmer') == '1')
{
unset($this->view['basket']['mwst']);
}
if (!function_exists('AddRechnungPage'))
{
50,24 → 52,24
$pdf->AddPage();
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.pdf"))
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf"))
{
$pagecount = $pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.pdf");
$pagecount = $pdf->setSourceFile($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.pdf");
$tplidx = $pdf->importPage(1, '/MediaBox');
$pdf->useTemplate($tplidx, 0, 0, 210);
}
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.jpg"))
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg"))
{
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_bp.jpg", 0, 0, 210, 297, 'jpg');
}
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg"))
if (file_exists($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg"))
{
list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg");
list($width, $height, $type, $attr) = getimagesize($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg");
//wpsg_debug($width.":".$height);
74,7 → 76,7
$wPix = (25.4 * $width) / 96;
$hPix = (25.4 * $height) / 96;
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getPaperPath', array())."wpsg_rechnungen_logo.jpg", 210 - $wPix, 0, $wPix, $hPix);
$pdf->image($shop->callMod('wpsg_mod_rechnungen', 'getFilePath', array(''))."wpsg_rechnungen_logo.jpg", 210 - $wPix, 0, $wPix, $hPix);
}
104,7 → 106,7
{
$pdf->Text($rdata_left + 35, $rdata_top, __("Fällig am", "wpsg"));
$pdf->Text($rdata_left + 35, $rdata_top + 6, date("d.m.Y", strtotime($shop->view['faelligkeitdatum'])));
$pdf->Text($rdata_left + 35, $rdata_top + 6, $shop->view['faelligkeitdatum']);
}
123,7 → 125,7
$pdf->Text($rdata_left + 135, $rdata_top + 6, ((trim($shop->view['data']['onr']) != '')?$shop->view['data']['onr']:$shop->view['data']['id']));
$pdf->Text($rdata_left + 155, $rdata_top, __("Datum", "wpsg"));
$pdf->Text($rdata_left + 155, $rdata_top + 6, date("d.m.Y", strtotime($shop->view['rDatum'])));
$pdf->Text($rdata_left + 155, $rdata_top + 6, $shop->view['rDatum']);
if ($shop->view['oOrder']->isInnerEu())
{
161,41 → 163,16
}
}
 
//wpsg_debug($this->view); die();
$pdf = new wpsg_fpdf();
$pdf->SetAutoPageBreak(true, 5);
AddRechnungPage($this, $pdf);
 
if ( ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B && $this->view['oOrder']->isInnerEu())
|| ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS)
) $bNoTax = true;
else $bNoTax = false;
 
$bTaxCol = false;
if ($this->get_option('wpsg_showMwstAlways') === '1') $bTaxCol = true;
else if (!$bNoTax) $bTaxCol = true;
 
 
if ($bNoTax) {
 
$discount_value = $this->view['basket']['arCalculation']['sum']['discount_netto'];
$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_netto'];
$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_netto'];
 
} else {
 
$discount_value = $this->view['basket']['arCalculation']['sum']['discount_brutto'];
$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_brutto'];
$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_brutto'];
 
}
$summe = 0;
$bKopf = false; $pnr = 1; $offset = 0; $count = 0;
foreach ($this->view['basket']['arCalculation']['product'] as $p)
foreach ($this->view['basket']['produkte'] as $p)
{
$product = wpsg_product::getInstance($p['product_id']);
if (!$bKopf)
{
205,9 → 182,9
$pdf->Cell(10, 8, __("Nr.", "wpsg"), 1, 0, 'C');
 
$pdf->setXY($prod_left + 10, $prod_top);
$pdf->Cell( (($bTaxCol)?87:102), 8, "Name", 1, 0, 'L');
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, "Name", 1, 0, 'L');
if ($bTaxCol)
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$pdf->setXY($prod_left + 97, $prod_top);
232,18 → 209,31
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
if ($this->get_option('wpsg_mod_rechnungen_anr') == '1') $pdf->Cell(10, 8, $product->getNr(), 0, 0, 'C');
else $pdf->Cell(10, 8, $pnr.".", 0, 0, 'C');
if ($this->get_option('wpsg_mod_rechnungen_anr') == '1')
{
 
if ($this->get_option('wpsg_rechnungen_pdetailname') == '1') $produkt_text = $this->getProductName($this->getProduktID($p['product_id']), true);
else $produkt_text = $this->getProductName($this->getProduktID($p['product_id']), false);
$pdf->Cell(10, 8, $p['anr'], 0, 0, 'C');
$produktBeschreibung = trim(strip_tags($product->getShortDescription()));
}
else
{
$pdf->Cell(10, 8, $pnr.".", 0, 0, 'C');
}
 
/* Wenn Detailname vorhanden, wird der Detailname auf Rechnung verwendet */
$produkt_text = $this->getProductName($this->getProduktID($p['id']), true);
/* Falls Detailname vorhanden, wird jetzt der Produktname verwendet */
/* $produkt_text = $this->getProductName($this->getProduktID($p['id']), false); */
$produktBeschreibung = trim(strip_tags($p['beschreibung']));
if ($this->isOtherLang())
{
$trans_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($this->getProduktID($p['product_id']))."' AND `lang_code` = '".wpsg_q($this->getCurrentLanguageCode())."'");
$trans_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_PRODUCTS."` WHERE `lang_parent` = '".wpsg_q($this->getProduktID($p['id']))."' AND `lang_code` = '".wpsg_q($this->getCurrentLanguageCode())."'");
if (is_array($trans_db) && sizeof($trans_db) > 0)
{
283,13 → 273,16
if ($this->get_option('wpsg_mod_rechnungen_anr') === '2')
{
 
$anr = $this->getProductAnr($product->getProductKey());
$anr = $this->getProductAnr($p['productkey']);
$produkt_text .= "\r\n".wpsg_translate(__('Artikelnummer: #1#', 'wpsg'), $anr);
 
}
 
$produkt_text_cell_width = 102;
if ($bTaxCol) $produkt_text_cell_width = 87;
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$produkt_text_cell_width = 87;
}
$produkt_text_width = $pdf->GetStringWidth($produkt_text);
//$produkt_text_cell_width = (($this->arMwSt == "-1")?87:102);
302,30 → 295,39
//$height += 3 + 5 + $pdf->getY() - $height_y;
//$pdf->Cell((($this->arMwSt == "-1")?102:87), 8, $produkt_text, 0, 0, 'L');
 
if ($bTaxCol) {
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, (($bNoTax)?'0.00 %':wpsg_ff($this->view['basket']['arCalculation']['tax'][$p['tax_key']]['tax_value'], '%')), 0, 0, 'C');
$pdf->Cell(15, 8, (($this->view['basket']['noMwSt'] == '1')?'0.00 %':wpsg_ff($p['mwst_value'], '%')), 0, 0, 'C');
}
$pdf->setXY($prod_left + 112, $prod_top + $offset);
$pdf->Cell(15, 8, $p['amount'], 0, 0, 'C');
$pdf->Cell(15, 8, $p['menge'], 0, 0, 'C');
if ( ( wpsg_ShopController::get_option('wpsg_preisangaben') == WPSG_NETTO ) || $bNoTax ) $preis_single = $p['netto_calculated_single'];
else $preis_single = $p['brutto_calculated_single'];
if (wpsg_ShopController::get_option('wpsg_preisangaben') == WPSG_NETTO)
{
$preis = $p['preis_netto'];
//TODO
}
else
{
$preis = $p['preis_brutto'];
}
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($preis_single, $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($preis, $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($preis_single * $p['amount'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($preis * $p['menge'], $this->get_option('wpsg_currency')), 0, 0, 'R');
 
/**
* Produktbeschreibung anzeigen Ja/Nein
*/
$pBeschreibungHeight = 0;
if ($this->get_option("wpsg_rechnungen_pbeschreibung") == "1" && trim(strip_tags($product->getShortDescription())) != '')
if ($this->get_option("wpsg_rechnungen_pbeschreibung") == "1" && trim(strip_tags($p['beschreibung'])) != '')
{
$produktBeschreibung = nl2br($produktBeschreibung);
352,12 → 354,11
if ($this->get_option('wpsg_rechnungen_produktattribute') == '1')
{
 
$attributeInfo = $this->callMod('wpsg_mod_produktattribute', 'getProductAttributeByProductId', array($this->getProduktId($p['product_id'])));
$attributeInfo = $this->callMod('wpsg_mod_produktattribute', 'getProductAttributeByProductId', array($this->getProduktId($p['id'])));
foreach ($attributeInfo as $pa)
{
 
if ($pa['value'] == "") $pa['value'] = "Keine Angabe";
$pa_text = $pa['name'].': '.$pa['value'];
$height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, $pa_text, 0, 'L', 0, $produkt_text_cell_width);
367,10 → 368,10
/**
* Variante ?
*/
if (preg_match('/pv_(.*)/', $p['product_key']))
if (preg_match('/pv_(.*)/', $p['productkey']))
{
$variInfo = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['product_key']));
$variInfo = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', array($p['productkey']));
 
$height += $pdf->wpsg_MultiCell($prod_left + 10, $prod_top + $height + $offset - 0.5, 5, wpsg_translate(__('Variante: #1#', 'wpsg'), $variInfo['key']), 0, 'L', 0, $produkt_text_cell_width);
378,7 → 379,7
}
if ($this->hasMod('wpsg_mod_deliverynote') && ($this->get_option('wpsg_rechnungen_deliverynote') == '1'))
if ($this->hasMod('wpsg_mod_deliverynote'))
{
$arDN_order = $this->callMod('wpsg_mod_deliverynote', 'loadDeliveryNotesFromOrder', array($this->view['data']['id']));
402,10 → 403,15
// Jetzt die Rahmen zeichnen
$pdf->Rect($prod_left, $prod_top + $offset, 10, $height);
$pdf->Rect($prod_left + 10, $prod_top + $offset, (($bTaxCol)?87:102), $height);
$pdf->Rect($prod_left + 10, $prod_top + $offset, ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), $height);
if ($bTaxCol) $pdf->Rect($prod_left + 97, $prod_top + $offset, 15, $height);
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$pdf->Rect($prod_left + 97, $prod_top + $offset, 15, $height);
}
$pdf->Rect($prod_left + 112, $prod_top + $offset, 15, $height);
$pdf->Rect($prod_left + 127, $prod_top + $offset, 25, $height);
$pdf->Rect($prod_left + 152, $prod_top + $offset, 25, $height);
415,12 → 421,9
$pnr ++;
$count ++;
if ($bNoTax) $price = $p['netto'];
else $price = $p['brutto'];
$summe += $p['price'] * $p['menge'];
 
$summe += $price * $p['amount'];
if ($pdf->getY() > 220 || ($count >= $prod_break && sizeof($this->view['basket']['arCalculation']['product']) > ($pnr - 1)))
if ($pdf->getY() > 220 || ($count >= $prod_break && sizeof($this->view['basket']['produkte']) > ($pnr - 1)))
{
AddRechnungPage($this, $pdf);
430,6 → 433,44
} // produkte
// Gutschein
/*
if ((isset($this->view['basket']['gs'])) && ($this->view['basket']['gs_value'] > 0))
{
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
 
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $this->view['basket']['gs']['code']), 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$mwst = __('anteilig', 'wpsg');
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
}
$pdf->setXY($prod_left + 112, $prod_top + $offset);
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$gs_value_einzel = '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency'));
$gs_value_gesamt = '-'.wpsg_ff($this->view['basket']['sum']['gs'], $this->get_option('wpsg_currency'));
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, $gs_value_einzel, 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, $gs_value_gesamt, 1, 0, 'R');
$offset += 8;
}
*/
if (wpsg_isSizedArray($this->view['basket']['arCalculation']['voucher'])) {
foreach ($this->view['basket']['arCalculation']['voucher'] as $v) {
439,9 → 480,9
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( (($bTaxCol)?87:102), 8, wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $v['code']), 1, 0, 'L');
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Gutschein (#1#)', 'wpsg'), $v['code']), 1, 0, 'L');
if ($bTaxCol)
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
$mwst = __('anteilig', 'wpsg');
470,7 → 511,7
}
// Versandkosten
if ( ($shipping_cost != '') && ($shipping_cost != 0) )
if ($this->view['basket']['sum']['preis_shipping'] != '' && $this->view['basket']['sum']['preis_shipping'] != 0)
{
$pdf->SetFont('Arial', '', 9);
478,17 → 519,26
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
 
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( (($bTaxCol)?87:102), 8, wpsg_translate(__('Versandkosten "#1#"', 'wpsg'), $this->view['oOrder']->getShippingLabel()), 1, 0, 'L');
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, wpsg_translate(__('Versandkosten "#1#"', 'wpsg'), $this->view['oOrder']->getShippingLabel()), 1, 0, 'L');
if ($bTaxCol)
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $bNoTax) $mwst = wpsg_ff(0.00, '%');
else {
if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $this->view['basket']['noMwSt'] == '1')
{
if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') $mwst = _('anteilig');
else {
$mwst = 0;
}
else
{
if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') {
$mwst = _('anteilig');
} else {
$mwst = wpsg_ff($this->view['basket']['arCalculation']['shipping'][0]['tax'], '%');
$mwst = wpsg_ff($this->view['basket']['arCalculation']['tax'][$this->view['basket']['arCalculation']['shipping'][0]['tax_key']]['tax_value'], '%');
505,17 → 555,58
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($shipping_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($shipping_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$offset += 8;
 
// Zusammengesetzte Versandarten darstellen
/*
if (wpsg_isSizedArray($this->view['basket']['shipping']['methods'])) {
foreach ($this->view['basket']['shipping']['methods'] as $shipping) {
$pdf->SetFont('Arial', '', 9);
$pdf->setXY($prod_left, $prod_top + $offset);
$pdf->Cell(10, 8, '', 1, 0, 'C'); $pnr ++;
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $this->getShippingName($shipping), 1, 0, 'L');
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
if ($this->view['basket']['shipping'][$shipping]['tax_rata'] == 1) { $mwst = __('Anteilig', 'wpsg'); }
else { $mwst = wpsg_ff($this->view['basket']['shipping'][$shipping]['mwst'], '%'); }
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
}
$pdf->setXY($prod_left + 112, $prod_top + $offset);
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_brutto'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['shipping'][$shipping]['preis_shipping_brutto'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$offset += 8;
}
}
*/
}
// Zahlungskosten
if ( ($payment_cost != '') && ($payment_cost != 0) )
if ($this->view['basket']['sum']['preis_payment'] != '' && $this->view['basket']['sum']['preis_payment'] != 0)
{
$pdf->SetFont('Arial', '', 9);
523,18 → 614,18
$pdf->Cell(10, 8, $pnr.'.', 1, 0, 'C'); $pnr ++;
 
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( (($bTaxCol)?87:102), 8, $this->arPayment[$this->view['data']['type_payment']]['name'], 1, 0, 'L');
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $this->arPayment[$this->view['data']['type_payment']]['name'], 1, 0, 'L');
if ($bTaxCol)
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $bNoTax)
if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $this->view['basket']['noMwSt'] == '1')
{
$mwst = 0;
}
else
{
 
$mwst = wpsg_ff(0.00, '%');
 
} else {
if ($this->view['basket']['arCalculation']['payment'][0]['tax_key'] === '0') {
$mwst = _('anteilig');
557,10 → 648,10
$pdf->Cell(15, 8, '1', 1, 0, 'C');
$pdf->setXY($prod_left + 127, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($payment_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->setXY($prod_left + 152, $prod_top + $offset);
$pdf->Cell(25, 8, wpsg_ff($payment_cost, $this->get_option('wpsg_currency')), 1, 0, 'R');
$pdf->Cell(25, 8, wpsg_ff($this->view['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')), 1, 0, 'R');
$offset += 8;
579,14 → 670,23
if (strpos($this->view['storno_fee'], '%') !== false) $label .= ' ('.wpsg_ff($this->view['storno_fee'], '%').')';
$pdf->setXY($prod_left + 10, $prod_top + $offset);
$pdf->Cell( (($bTaxCol)?87:102), 8, $label, 1, 0, 'L');
$pdf->Cell( ((sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')?87:102), 8, $label, 1, 0, 'L');
if ($bTaxCol)
if (sizeof($this->view['basket']['mwst']) >= 1 || $this->get_option('wpsg_showMwstAlways') == '1')
{
if ($bNoTax) $mwst = wpsg_ff(0.00, '%');
else $mwst = wpsg_ff($this->view['storno_fee_tax_value'], '%');
if ($this->view['basket']['noMwSt'] == '1')
{
$mwst = 0;
}
else
{
$mwst = wpsg_ff($this->view['storno_fee_tax_value'], '%');
}
$pdf->setXY($prod_left + 97, $prod_top + $offset);
$pdf->Cell(15, 8, $mwst, 1, 0, 'C');
615,102 → 715,65
$pdf->Cell(37, 8, $this->view['kunde']['ustidnr'], 0, 0, 'R');
}
$offset += 10; // Abstand zwischen Tabelle und Auswertung
 
if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) )
$offset += 10;
if ($this->get_option('wpsg_kleinunternehmer'))
{
$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] + $this->view['basket']['arCalculation']['sum']['discount_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) $offset += 5;
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'] + $this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$offset += 5;
 
} else {
}
else
{
if ($bNoTax)
if ($this->view['basket']['noMwSt'] == '1')
{
$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("BRUTTOBETRAG", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] + $this->view['basket']['arCalculation']['sum']['discount_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
//if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) )
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$offset += 5;
 
if ( !(($this->view['oOrder']->isInnerEu()) && ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B)) ) {
 
if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
{
 
$mw_count = 0;
foreach ($this->view['basket']['arCalculation']['tax'] as $mw)
{
 
if ( $mw['tax_value'] > 0 && $mw['sum'] > 0 ) {
 
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. ", "wpsg").wpsg_ff($mw['tax_value'], '%'));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($mw['sum'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff(0, $this->get_option('wpsg_currency')), 0, 0, 'R');
$mw_count++;
 
}
 
}
}
if ($mw_count >= 2)
else
{
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] - $this->view['basket']['arCalculation']['sum']['netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Text($prod_left, $prod_top + $offset, __("Der Gesamtbetrag setzt sich wie folgt zusammen", "wpsg"));
}
} else if ( !($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) $offset -= 5;
 
} else {
$pdf->Text($prod_left, $prod_top + $offset, __("Der Gesamtbetrag setzt sich wie folgt zusammen", "wpsg").':');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("NETTOBETRAG", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['netto'] + $this->view['basket']['arCalculation']['sum']['discount_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
if (sizeof($this->view['basket']['mwst']) >= 1)
{
 
$mw_count = 0;
foreach ($this->view['basket']['arCalculation']['tax'] as $mw)
foreach ($this->view['basket']['mwst'] as $mw)
{
 
if ( $mw['tax_value'] > 0 && $mw['sum'] > 0) {
 
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. ", "wpsg").wpsg_ff($mw['tax_value'], '%'));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. ", "wpsg").wpsg_ff($mw['value'], '%'));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($mw['sum'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$mw_count++;
 
}
 
}
}
if ($mw_count >= 2)
if (sizeof($this->view['basket']['mwst']) > 1)
{
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("MwSt. GESAMT", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'] - $this->view['basket']['arCalculation']['sum']['netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'] - $this->view['basket']['sum']['preis_gesamt_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
}
719,31 → 782,28
}
// Rabatt
if ($discount_value > 0)
if ($this->view['basket']['sum']['preis_rabatt'] > 0)
{
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Rabatt", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->Cell(37, 8, '-'.wpsg_ff($discount_value, $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, '-'.wpsg_ff($this->view['basket']['sum']['preis_rabatt'], $this->get_option('wpsg_currency')), 0, 0, 'R');
}
 
// Wertgutschein
if ( $arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto'] ) {
if ($arCalculation['sum']['topay_brutto'] !== $arCalculation['sum']['brutto']) {
 
if (!$bNoTax) {
$offset += 5;
$pdf->Text($prod_left + 80, $prod_top + $offset, __("SUMME", "wpsg"));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("Bruttobetrag", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
$pdf->setFont('Arial', '', '9');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setFont('Arial', '', '9');
} else if (!($mw_count >= 2)) $offset -= 5;
 
foreach ($arCalculation['coupon'] as $c) {
$offset += 5;
758,7 → 818,7
$offset += 5;
$pdf->setFont('Arial', 'B', '9');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("ZU ZAHLEN", "wpsg"));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("SUMME", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
/* Endbetrag wird fett ausgegeben */
769,29 → 829,28
} else {
 
$offset += 5;
$pdf->setFont('Arial', 'B', '9');
$pdf->Text($prod_left + 80, $prod_top + $offset, __("GESAMTSUMME", "wpsg"));
$pdf->Text($prod_left + 80, $prod_top + $offset, __("SUMME", "wpsg"));
$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
 
/* Endbetrag wird fett ausgegeben */
$pdf->Cell(37, 8, wpsg_ff($arCalculation['sum']['topay_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setFont('Arial', 'B', '9');
$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
$pdf->setFont('Arial', '', '9');
/* Endbetrag wird normal ausgegeben */
//$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['sum']['preis_gesamt_brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
}
if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) )
if ($this->get_option('wpsg_kleinunternehmer') == '1')
{
 
$offset += 3;
$pdf->setFont('Arial', '', '8');
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, '('.$this->get_option('wpsg_kleinunternehmer_text').')');
$offset += 8;
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset + 5, 5, $this->get_option('wpsg_kleinunternehmer_text'));
$offset += 15;
}
 
$offset += 5;
if ($this->hasMod('wpsg_mod_deliverynote') && ($this->get_option('wpsg_rechnungen_deliverynote') == '1'))
if ($this->hasMod('wpsg_mod_deliverynote'))
{
$arDN_order = $this->callMod('wpsg_mod_deliverynote', 'loadDeliveryNotesFromOrder', array($this->view['data']['id']));
801,33 → 860,36
if ($delivery_date !== false && sizeof($arDN_order) == 1)
{
$pdf->setFont('Arial', 'B', '9');
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, __('Lieferung:', 'wpsg'));
$pdf->setFont('Arial', '', '9');
$pdf->wpsg_MultiCell($prod_left + 16, $prod_top + $offset, 5, wpsg_translate(__('#1#', 'wpsg'), date('d.m.Y', $delivery_date)));
$offset += 8;
$offset += 10;
$pdf->wpsg_MultiCell($prod_left, $prod_top + $offset, 5, wpsg_translate(__('Lieferung: #1#', 'wpsg'), date('d.m.Y', $delivery_date)));
 
$offset += 5;
}
}
 
$offset += 5;
if ($this->view['fussText'] != "")
{
$pdf->setFont('Arial', '', '9');
//$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, utf8_encode($this->view['fussText']));
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $this->view['fussText']);
$offset += 8;
$pdf->SetFont('Arial', 'B', 9);
$offset += 10;
}
$offset += 10;
 
$shipping_adress = false;
if ($this->hasMod('wpsg_mod_shippingadress') && $this->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array('k_id' => $this->view['data']['k_id'], 'o_id' => $this->view['data']['id']))) {
if ($this->hasMod('wpsg_mod_shippingadress') && $this->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array('k_id' => $this->view['data']['k_id'], 'o_id' => $this->view['data']['id'])))
{
$pdf->setFont('Arial', 'B', 9);
$pdf->Text($prod_left, $prod_top + $offset, __("Lieferanschrift", "wpsg").":");
$offset += 2;
$offset += 5;
$pdf->setFont('Arial', '', 9);
837,12 → 899,13
$shipping_adress .= $this->view['data']['shipping_firma']."\r\n";
}
$shipping_adress .= $this->view['data']['shipping_vname'].' '.$this->view['data']['shipping_name']."\r\n";
$shipping_adress .= $this->view['data']['shipping_strasse'].' '.$this->view['data']['shipping_nr']."\r\n";
$shipping_adress .= $this->view['data']['shipping_strasse']."\r\n";
// $shipping_adress .= $this->view['data']['shipping_land']['kuerzel'].'-';
$shipping_adress .= $this->view['data']['shipping_plz'].' '.$this->view['data']['shipping_ort']."\r\n";
$shipping_adress .= $this->view['data']['shipping_land']['name'];
$start = $pdf->getY();
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $shipping_adress, 0, 'L', 0, 100);
$offset += $pdf->getY() - $start;
851,15 → 914,13
}
$offset += 5;
// Bestellvariablen
if ($this->hasMod('wpsg_mod_ordervars') && $this->get_option('wpsg_mod_rechnungen_showov') == '1')
{
 
$pdf->SetFont('Arial', 'B', 9);
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset - 7, 5, __("Angaben während der Bestellung", "wpsg").":");
$pdf->SetFont('Arial', '', 9);
 
$bvars = @unserialize($this->view['data']['bvars']);
if (!is_array($bvars)) $bvars = array();
887,10 → 948,20
}
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset - 6, 5, $strBVars);
$pdf->SetFont('Arial', 'B', 9);
$pdf->Text($prod_left, $prod_top + $offset, __("Angaben während der Bestellung", "wpsg").":");
$pdf->SetFont('Arial', '', 9);
$pdf->wpsg_MultiCell($prod_left - 1, $prod_top + $offset, 5, $strBVars);
 
}
 
if (!file_exists($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id']))))
{
mkdir($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'])), 0777, true);
}
$this->callMods('wpsg_mod_rechnungen_pdf', array(&$pdf, &$this->view['data']['id'], &$this->view['preview'], &$this->view['invoice']));
$filename = $this->view['filename'].".pdf";
903,7 → 974,7
} else {
$pdf->Output($oInvoice->getFilePath(), 'F');
$pdf->Output($this->callMod('wpsg_mod_rechnungen', 'getFilePath', array($this->view['data']['id'])).$filename, 'F');
// Hier wird der Dateiname an FPD übergeben. Er soll sich aus der Rechnungsnummer ergeben, auch wenn das Dokument über die ID gespeichert ist.
$pdf->Output($this->view['filename_out'], 'I');
910,4 → 981,3
}
 
?>
/mods/mod_kundenverwaltung/settings_edit.phtml
70,12 → 70,11
</div>
 
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_recaptcha_register', __('reCaptcha V2 für Registrierung', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_recaptcha_register'), array('help' => 'wpsg_mod_kundenverwaltung_recaptcha_register')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_recaptcha_register', __('reCaptcha V2 für Registrierung', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_recaptcha_register')); ?>
<div id="wpsg_mod_kundenverwaltung_register_recaptcha_layer" style="display:none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_kundenveraltung_recaptcha_key', __('Websiteschlüssel', 'wpsg'), $this->get_option('wpsg_mod_kundenveraltung_recaptcha_key')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_kundenveraltung_recaptcha_secretkey', __('Geheimer Schlüssel', 'wpsg'), $this->get_option('wpsg_mod_kundenveraltung_recaptcha_secretkey')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_kundenverwaltung_recaptcha_dsgvo_layer', __('DSGVO Layer für das Recaptcha', 'wpsg'), $this->get_option('wpsg_mod_kundenverwaltung_recaptcha_dsgvo_layer')); ?>
</div>
 
/mods/mod_kundenverwaltung/edit.phtml
224,7 → 224,7
 
var password = jQuery(this).val();
 
if (password.length < 8)
if (password.length < 6)
{
 
jQuery('#wpsg_pwd_length').removeClass('valid').addClass('invalid');
/mods/mod_kundenverwaltung/register.phtml
50,11 → 50,12
 
// Visualisierung der Passwortstärke
 
jQuery('input[type=password]').keyup(function(){
 
var password = jQuery(this).val();
if (password.length < 8) {
if (password.length < 6) {
jQuery('#wpsg_pwd_length').removeClass('valid').addClass('invalid');
 
104,8 → 105,10
}
 
 
jQuery('#wpsg_pwd_info').show();
 
 
jQuery(this).blur(function(){
 
jQuery('#wpsg_pwd_info').hide();
114,6 → 117,7
});
// Validierung Spam
<?php
if (isset($_GET["wpsg_spam_email"]) && $_GET["wpsg_spam_email"] != "") {
140,19 → 144,10
 
<div class="wpsg wpsg_checkout wpsg_register">
<style>
.placeholder { display: none !important; }
.m1_dsgvo_layer { position:relative; width:100%; height:100px; margin-bottom: 30px; }
.m1_dsgvo_layer > .placeholder_text { height:100px; font-size: small; position:relative; left:0; top:0; z-index:2; background-color:rgba(0, 0, 0, 0.75); display:flex; justify-content:center; align-items:center; color:#FFFFFF; flex-direction:column; padding:1rem; text-align:center; }
.m1_dsgvo_layer > .placeholder_text > button { color: rgba(0, 0, 0, 0.75); margin-top: 1rem;}
</style>
<?php echo $this->writeFrontendMessage(); ?>
<form id="form-step2" method="post" action="<?php echo $this->callMod('wpsg_mod_kundenverwaltung', 'getRegisterURL'); ?>">
 
<?php echo $this->writeFrontendMessage(); ?>
<h2><?php echo __('Registrierung', 'sto'); ?></h2>
<?php if ($this->view['pflicht']['firma'] != '2') { ?>
<div class="wpsg_checkoutblock">
<label for="wpsg_firma"><?php echo __("Firma", "wpsg"); ?>
198,13 → 193,7
<label for="email" class="wpsg_register"><?php echo __("E-Mail Adresse", "wpsg"); ?>
<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input
class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="email" id="email"
name="wpsg[register][email]"
value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['email'])); ?>"
autocomplete="off"
/>
<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[register][email]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['email'])); ?>" />
</div>
<?php } ?>
213,14 → 202,7
<label for="email2" class="wpsg_register"><?php echo __("E-Mail Adresse (Wiederholung)", "wpsg"); ?>
<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input
class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="email"
id="email2"
name="wpsg[register][email2]"
value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['register']['email2'])); ?>"
autocomplete="off"
/>
<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email2" name="wpsg[register][email2]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['register']['email2'])); ?>" />
</div>
<?php } ?>
228,14 → 210,7
<label for="pwd1" class="wpsg_register"><?php echo __("Passwort", "wpsg"); ?>
<?php if (wpsg_getStr($this->view['pflicht']['pwd1']) != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input
class="<?php echo ((wpsg_getStr($this->view['pflicht']['pwd1']) != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="password"
id="pwd1"
name="wpsg[register][register_pwd1]"
autocomplete="off"
value=""
/><span id="wpsg_checkoutblock_password_result"></span>
<input class="<?php echo ((wpsg_getStr($this->view['pflicht']['pwd1']) != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="pwd1" name="wpsg[register][register_pwd1]" value="" /><span id="wpsg_checkoutblock_password_result"></span>
</div>
<div class="wpsg_checkoutblock">
242,14 → 217,7
<label for="pwd2" class="wpsg_register"><?php echo __("Passwort (Wiederholung)", "wpsg"); ?>
<?php if (wpsg_getStr($this->view['pflicht']['pwd2']) != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input
class="<?php echo ((wpsg_getStr($this->view['pflicht']['pwd2']) != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="password"
id="pwd2"
name="wpsg[register][register_pwd2]"
value=""
autocomplete="off"
/>
<input class="<?php echo ((wpsg_getStr($this->view['pflicht']['pwd2']) != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="pwd2" name="wpsg[register][register_pwd2]" value="" />
</div>
<div id="wpsg_pwd_info">
323,7 → 291,7
<label for="plz" class="wpsg_register"><?php echo __("Postleitzahl", "wpsg"); ?>
<?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input class="<?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="plz" name="wpsg[register][plz]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['plz'])); ?>" />
<input class="wpsg_input_text <?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required]':''); ?> wpsg_register <?php echo ((in_array("plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="plz" name="wpsg[register][plz]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['data']['plz'])); ?>" />
</div>
<?php } ?>
388,23 → 356,9
 
<?php if ($this->get_option('wpsg_mod_kundenverwaltung_recaptcha_register') === '1') { ?>
<div class="wpsg_checkoutblock">
<label class="recaptcha_v2_checkout ">
 
<label>
<?php echo __('SPAM Schutz Abfrage'); ?> <span class="wpsg_required">*</span>:
 
<?php if ($this->get_option('wpsg_mod_kundenverwaltung_recaptcha_dsgvo_layer') != '1') { ?>
<div class="g-recaptcha" data-sitekey="<?php echo $this->get_option('wpsg_mod_kundenveraltung_recaptcha_key'); ?>"></div>
<?php } else { ?>
<div class="wpsg_recaptcha placeholder"> <!-- Platzhalter für das Google ReCAPTCHA --> </div>
<div class="m1_dsgvo_layer ">
<div class="placeholder_text">
<strong>Datenschutz ist uns wichtig!</strong>
Daher wird das Google ReCAPTCHA erst geladen, wenn sie der Verwendung des Drittanbieters "Google LLC" zustimmen durch den möglicherweise Cookies gesetzt werden.<br />
<button class="layer_link wpsg_required">Ich bin damit einverstanden.</button>
</div>
</div>
<?php } ?>
 
</label>
</div>
<div class="wpsg_clear"></div>
467,29 → 421,4
<div class="wpsg_clear"></div>
</form>
 
<script>
// DSGVO Layer Script
document.querySelector('.layer_link').addEventListener('click', function() {
 
const recaptcha = document.createElement("div");
const a = document.createAttribute("data-sitekey");
const b = document.createAttribute("style");
a.value = "<?php echo $this->get_option('wpsg_mod_kundenveraltung_recaptcha_key'); ?>";
b.value = "float: left !important;";
recaptcha.classList.add("g-recaptcha");
recaptcha.setAttributeNode(a);
recaptcha.setAttributeNode(b);
 
document.querySelector('.wpsg_recaptcha').appendChild(recaptcha);
(function(){var w=window,C='___grecaptcha_cfg',cfg=w[C]=w[C]||{},N='grecaptcha';var gr=w[N]=w[N]||{};gr.ready=gr.ready||function(f){(cfg['fns']=cfg['fns']||[]).push(f);};w['__recaptcha_api']='https://www.google.com/recaptcha/api2/';(cfg['render']=cfg['render']||[]).push('onload');w['__google_recaptcha_client']=true;var d=document,po=d.createElement('script');po.type='text/javascript';po.async=true;po.src='https://www.gstatic.com/recaptcha/releases/vP4jQKq0YJFzU6e21-BGy3GP/recaptcha__de.js';po.crossOrigin='anonymous';po.integrity='sha384-xxpEMChSTl1oMpSrXrILE1mQOlVQNv6OGibce0r0HX1HeHF72bSDheOIehafBC9Y';var e=d.querySelector('script[nonce]'),n=e&&(e['nonce']||e.getAttribute('nonce'));if(n){po.setAttribute('nonce',n);}var s=d.getElementsByTagName('script')[0];s.parentNode.insertBefore(po, s);})();
 
document.querySelector('.m1_dsgvo_layer').classList.add('placeholder');
document.querySelector('.wpsg_recaptcha').classList.remove('placeholder');
 
event.preventDefault();
 
});
</script>
 
</div>
/mods/mod_kundenverwaltung/order.phtml
22,27 → 22,15
<div class="wpsg_inner wpsg_order_<?php echo $order['id']; ?>">
<strong><?php echo __('Bestellstatus', 'wpsg'); ?>:</strong>&nbsp;
<?php echo $this->arStatus[$order['status']]; ?>
<?php if ($this->hasMod('wpsg_mod_rechnungen')) {
<?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
 
$arInvoice = \wpsg\wpsg_invoice::findByOrderId(intval($order['id']));
 
?>
 
<?php foreach ($arInvoice as $oInvoice) { ?>
 
<?php if ($oInvoice->isInvoice()) { ?>
 
<a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', [$oInvoice->getId()]); ?>"><?php echo wpsg_translate(__('Rechnung #1#', 'wpsg'), $oInvoice->getNr()); ?></a>
 
<?php } else if ($oInvoice->isStorno()) { ?>
 
<a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', [$oInvoice->getId()]); ?>"><?php echo wpsg_translate(__('Rechnungskorrektur #1#', 'wpsg'), $oInvoice->getNr()); ?></a>
 
<?php if ($r = $this->callMod('wpsg_mod_rechnungen', 'getOrderInvoice', array($order['id']))) { ?>
<a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', array($r['id'])); ?>"><?php echo wpsg_translate(__('Rechnung #1#', 'wpsg'), $r['rnr']); ?></a>
<?php } else if ($r = $this->callMod('wpsg_mod_rechnungen', 'getOrderCredit', array($order['id']))) { ?>
<a href="<?php echo $this->callMod('wpsg_mod_rechnungen', 'getFrontendLink', array($r['id'])); ?>"><?php echo wpsg_translate(__('Rechnungskorrektur #1#', 'wpsg'), $r['gnr']); ?></a>
<?php } ?>
 
<?php } ?>
 
<?php } ?>
<br />
<strong><?php echo __('Rechnungsbetrag', 'wpsg'); ?>:</strong> <?php echo wpsg_ff($order['price_gesamt'], $this->get_option('wpsg_currency')); ?><br />
<strong><?php echo __('Bestellte Produkte', 'wpsg'); ?>:</strong>
/mods/mod_kundenverwaltung/profil.phtml
50,7 → 50,7
 
var password = jQuery(this).val();
if (password.length < 8) {
if (password.length < 6) {
jQuery('#wpsg_pwd_length').removeClass('valid').addClass('invalid');
 
193,15 → 193,7
<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse", "wpsg"); ?>
<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input
class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?>
wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="email"
id="email"
name="wpsg[profil][email]"
value="<?php echo htmlspecialchars($this->view['data']['email']); ?>"
autocomplete="off"
/>
<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email" name="wpsg[profil][email]" value="<?php echo htmlspecialchars($this->view['data']['email']); ?>" />
</div>
<?php } ?>
210,15 → 202,7
<label for="email" class="wpsg_checkout"><?php echo __("E-Mail Adresse (Wiederholung)", "wpsg"); ?>
<?php if ($this->view['pflicht']['email'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input
class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?>
wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="email"
id="email2"
name="wpsg[profil][email2]"
value="<?php echo htmlspecialchars($this->view['data']['email2']); ?>"
autocomplete="off"
/>
<input class="wpsg_input_text <?php echo (($this->view['pflicht']['email'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="email" id="email2" name="wpsg[profil][email2]" value="<?php echo htmlspecialchars($this->view['data']['email2']); ?>" />
</div>
<?php } ?>
340,14 → 324,7
<label for="wpsg_mod_kundenverwaltung_pwd1"><?php echo __("Passwort", "wpsg"); ?>
<?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input
class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="password"
id="wpsg_mod_kundenverwaltung_pw1"
name="wpsg[mod_kundenverwaltung][register_pwd1]"
value=""
autocomplete="off"
/><span id="wpsg_mod_kundenverwaltung_password_result"></span>
<input class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd1", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_pw1" name="wpsg[mod_kundenverwaltung][register_pwd1]" value="" /><span id="wpsg_mod_kundenverwaltung_password_result"></span>
</div>
<div class="wpsg_checkoutblock">
354,14 → 331,7
<label for="wpsg_mod_kundenverwaltung_pwd2"><?php echo __("Passwort wiederholen", "wpsg"); ?>
<?php if ($this->get_option('wpsg_mod_kundenverwaltung_showCheckoutRegisterzwang') == '1') { ?><span class="wpsg_required">*</span><?php } ?>:
</label>
<input
class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="password"
id="wpsg_mod_kundenverwaltung_pwd2"
name="wpsg[mod_kundenverwaltung][register_pwd2]"
value=""
autocomplete="off"
/>
<input class="wpsg_checkout <?php echo ((in_array("mod_kundenverwaltung_pwd2", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_pwd2" name="wpsg[mod_kundenverwaltung][register_pwd2]" value="" />
</div>
<div id="wpsg_pwd_info">
/mods/mod_kundenverwaltung/login.phtml
18,25 → 18,12
<div class="wpsg_block wpsg_checkoutblock">
<label for="wpsg_mod_kundenverwaltung_email"><?php echo __("E-Mail Adresse", "wpsg"); ?>:</label>
<input
class="wpsg_checkout"
type="text"
autocomplete="off"
id="wpsg_mod_kundenverwaltung_email"
name="wpsg[mod_kundenverwaltung][email]"
value="<?php echo wpsg_getStr($this->view['wpsg_mod_kundenverwaltung']['email']); ?>" />
<input class="wpsg_checkout" type="text" id="wpsg_mod_kundenverwaltung_email" name="wpsg[mod_kundenverwaltung][email]" value="<?php echo wpsg_getStr($this->view['wpsg_mod_kundenverwaltung']['email']); ?>" />
</div>
<div class="wpsg_block wpsg_checkoutblock">
<label for="wpsg_mod_kundenverwaltung_password"><?php echo __("Passwort", "wpsg"); ?>:</label>
<input
class="wpsg_checkout"
type="password"
id="wpsg_mod_kundenverwaltung_password"
name="wpsg[mod_kundenverwaltung][password]"
value=""
autocomplete="off"
/>
<input class="wpsg_checkout" type="password" id="wpsg_mod_kundenverwaltung_password" name="wpsg[mod_kundenverwaltung][password]" value="" />
</div>
<br />
/mods/mod_kundenverwaltung/widget.phtml
31,22 → 31,9
<h2 class="widget-title widgettitle"><?php echo __('Login', 'wpsg'); ?></h2>
<input
type="text"
value="<?php echo __('E-Mail', 'wpsg'); ?>"
id="wpsg_mod_kundenverwaltung_widget_email"
name="wpsg[mod_kundenverwaltung][email]"
autocomplete="off"
/>
<input type="text" value="<?php echo __('E-Mail', 'wpsg'); ?>" id="wpsg_mod_kundenverwaltung_widget_email" name="wpsg[mod_kundenverwaltung][email]" />
<input type="password" value="<?php echo __('Passwort', 'wpsg'); ?>" id="wpsg_mod_kundenverwaltung_widget_passwort" name="wpsg[mod_kundenverwaltung][password]" />
<input
type="password"
value="<?php echo __('Passwort', 'wpsg'); ?>"
id="wpsg_mod_kundenverwaltung_widget_passwort"
name="wpsg[mod_kundenverwaltung][password]"
autocomplete="off"
/>
<br /><br />
<input type="submit" id="wpsg_mod_kundenverwaltung_widget_login" name="wpsg_mod_kundenverwaltung_login" value="<?php echo __('Anmelden', 'wpsg'); ?>" />
/mods/mod_kundenverwaltung/checkout_login.phtml
11,27 → 11,13
<div class="wpsg_checkoutblock">
<label for="wpsg_mod_kundenverwaltung_email"><?php echo __("E-Mail Adresse", "wpsg"); ?>:
</label>
<input
class="wpsg_checkout <?php echo ((in_array("wpsg_mod_kundenverwaltung_email", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="text"
id="wpsg_mod_kundenverwaltung_email"
name="wpsg[mod_kundenverwaltung][email]"
value=""
autocomplete="off"
/>
<input class="wpsg_checkout <?php echo ((in_array("wpsg_mod_kundenverwaltung_email", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_mod_kundenverwaltung_email" name="wpsg[mod_kundenverwaltung][email]" value="" />
</div>
<div class="wpsg_checkoutblock">
<label for="wpsg_mod_kundenverwaltung_password"><?php echo __("Passwort", "wpsg"); ?>:
</label>
<input
class="wpsg_checkout <?php echo ((in_array("wpsg_mod_kundenverwaltung_password", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="password"
id="wpsg_mod_kundenverwaltung_password"
name="wpsg[mod_kundenverwaltung][password]"
value=""
autocomplete="off"
/>
<input class="wpsg_checkout <?php echo ((in_array("wpsg_mod_kundenverwaltung_password", (array)$this->view['error']))?'wpsg_error':''); ?>" type="password" id="wpsg_mod_kundenverwaltung_password" name="wpsg[mod_kundenverwaltung][password]" value="" />
</div>
<br />
/mods/mod_abo/order_view_base.phtml
7,7 → 7,7
?>
<tr class="wpsg_<?php echo (($this->view['i'] == 0)?'odd':'even'); ?>">
<td ><?php echo __('Abo Verlängerungen', 'wpsg'); ?>:</td>
<td align="right" colspan="<?php echo ((sizeof($this->view['basket']['mwst'])??0 > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
<td align="right" colspan="<?php echo ((sizeof($this->view['basket']['mwst']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'4':'3'); ?>">
<?php if (wpsg_isSizedArray($this->view['wpsg_mod_abo']['rebuy'])) { ?>
<?php foreach ($this->view['wpsg_mod_abo']['rebuy'] as $k => $v) { ?>
<?php echo wpsg_translate(__('Mit Bestellung <a href="#1#">#2#</a> um #3# Tage verlängert.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$v['o_id'], $v['order']['onr'], $v['tage']); ?><br />
/mods/mod_productgroups/index.phtml
80,7 → 80,6
<table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
<thead>
<tr>
<th class="wpsg_pic_col"></th>
<th class="wpsg_order col_name" data-order="nr"><?php echo __("Name", 'wpsg'); ?></th>
<th class="wpsg_order col_template" data-order="template"><?php echo __("Template", 'wpsg'); ?></th>
<th class="wpsg_order col_products" data-order="products"><?php echo __("Produkte", 'wpsg'); ?></th>
87,21 → 86,10
</tr>
</thead>
<tbody>
<?php foreach ($this->view['arData'] as /** @var wpsg_productgroup */ $pg) { ?>
<?php foreach ($this->view['arData'] as $pg) { ?>
<tr>
<td class="wpsg_pic_col">
<?php if ($pg->getImage() > 0) { ?>
 
<?php echo \wp_get_attachment_image($pg->getImage(), [75, 75]); ?>
 
<?php } ?>
</td>
<td class="col_name">
<strong><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php
 
echo wpsg_admin_url('Productgroups', '', ['wpsg_mod_action' => 'edit', 'edit_id' => $pg->id]);
 
?>" class="row-title"><?php echo $pg->name; ?></a></strong>
<strong><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=edit&edit_id=<?php echo $pg->id; ?>" class="row-title"><?php echo $pg->name; ?></a></strong>
<div class="row-actions">
<span class="edit"><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php
/mods/mod_productgroups/list.phtml
22,10 → 22,9
<div class="wpsg_pgruppen_list_produkte">
<?php for ($i = 0; $i < $showP && $i < sizeof($g['produkte']); $i ++) { ?>
 
<?php
<?
 
if ($this->hasMod('wpsg_mod_stock')) $lagerbestand = $this->callMod('wpsg_mod_stock', 'getBestand', [$g['produkte'][$i]['id']]);
else $lagerbestand = 1;
$lagerbestand = $this->callMod('wpsg_mod_stock', 'getBestand', [$g['produkte'][$i]['id']]);
 
?>
 
/mods/mod_productgroups/add.phtml
4,15 → 4,6
* Template für das Anlegen/Bearbeiten einer Produktgruppe
*/
 
/** @var wpsg_productgroup|null $oProductgroup */
$oProductgroup = null;
 
if (intval($_REQUEST['edit_id']??0) > 0) {
 
$oProductgroup = wpsg_productgroup::getInstance(intval($_REQUEST['edit_id']));
 
}
 
?>
 
<div class="wpsg_productgroups" id="wpsg-bs">
70,78 → 61,6
<?php echo wpsg_drawForm_Select('template_file', __('Template', 'wpsg'), $this->view['templates'], $this->view['data']['template_file']); ?>
<?php echo wpsg_drawForm_Select('infopage', __('Info Seite', 'wpsg'), $this->view['pages'], $this->view['data']['infopage']); ?>
 
<div class="form-group form-group-sm ">
<label class="col-sm-6 control-label"><?php echo __('Produktgruppenbild', 'wpsg'); ?></label>
<div class="col-sm-6">
<div class="wpsg_field_wrap">
<div id="imageBox"><?php
 
if ($oProductgroup !== null) {
 
if ($oProductgroup->getImage() > 0) {
 
echo wp_get_attachment_image($oProductgroup->getImage(), 'full', false, [
'style' => 'max-width:100%; height:auto; margin-bottom:8px;'
]);
 
}
 
}
 
?></div>
 
<input value="Mediathek" class="button" type="button" style="text-align:center;" size="10" id="btnAddImgLink" />
<input type="hidden" name="image" value="<?php echo (($oProductgroup !== null)?$oProductgroup->getImage():0); ?>" id="image_input" />
 
<script>
 
let wpframe = undefined;
let imageBox = document.getElementById('imageBox');
let elImageInput = document.getElementById('image_input');
 
document.getElementById('btnAddImgLink').addEventListener('click', (event) => {
 
event.preventDefault();
 
if (wpframe !== undefined) { wpframe.open(); return; }
 
wpframe = wp.media.frames.file_frame = wp.media({
title: "<?php echo __('Auswählen oder Hochladen von Medien', 'wpsg'); ?>",
button: { text: "<?php echo __('Medien benutzen', 'wpsg'); ?>" },
multiple: false
});
 
wpframe.on('select', () => {
 
let attachments = wpframe.state().get('selection').map((attachment) => {
 
attachment.toJSON();
 
return attachment;
 
});
 
for (let i = 0; i < attachments.length; ++i) {
 
let attachment = attachments[i];
 
imageBox.innerHTML = '<img src="' + attachment.attributes.url + '" alt="" style="max-width:100%; margin-bottom:8px;"/>';
elImageInput.value = attachment.attributes.id;
 
}
 
});
 
wpframe.open();
 
});
 
</script>
</div>
</div>
<div class="clearfix wpsg_clear"></div>
</div>
 
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
 
</div>
/mods/mod_productgroups/settings_edit.phtml
6,10 → 6,6
 
?>
<?php echo wpsg_drawForm_Select('wpsg_productgroups_page', __('Produktgruppenübersichtsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_productgroups_page'), array('help' => 'wpsg_mod_productgroups_page')); ?>
<?php echo wpsg_drawForm_Select('wpsg_productgroups_page_layout', __('Layout der Übersichtsseite', 'wpsg'), [
'0' => 'Layout 1 (show.phtml)',
'1' => 'Layout 2 (show_2.phml)'
], $this->get_option('wpsg_productgroups_page_layout'), ['help' => 'wpsg_productgroups_page_layout']); ?>
<?php echo wpsg_drawForm_Select('wpsg_productgroups_order', __('Sortierung innerhalb der Gruppe', 'wpsg'), array(
'id' => __('Nach ID', 'wpsg'),
'alphabetisch' => __('Alphabetisch', 'wpsg'),
/mods/mod_deliverytime/product_bottom.phtml
18,18 → 18,14
 
<?php if ($days_between <= 1) { ?>
 
<div class="wpsg_mod_deliverytime wpsg_mod_deliverytime_product_bottom">
<span class="fa fa-calendar-minus-o"></span>
<span class="label label_deliverytime_product">Verfügbarkeit: </span>
<span class="label_deliverytime"><?php echo __('sofort Verfügbar', 'wpsg') ;?></span>
<div class="wpsg_mod_deliverytime_product_bottom">
<?php echo __('sofort Lieferbar', 'wpsg') ;?>
</div>
<?php } else { ?>
 
<div class="wpsg_mod_deliverytime wpsg_mod_deliverytime_product_bottom">
<span class="fa fa-calendar-minus-o"></span>
<span class="label label_deliverytime_product">Verfügbarkeit: </span>
<span class="label_deliverytime"><?php echo wpsg_translate(__('Lieferbar in #1# Tagen', 'wpsg'), $days_between); ?></span>
<div class="wpsg_mod_deliverytime_product_bottom">
<?php echo wpsg_translate(__('Lieferbar in #1# Tagen', 'wpsg'), $days_between); ?>
</div>
 
<?php } ?>
/mods/mod_productvariants/admin_edit.phtml
316,27 → 316,8
</div>
<?php } ?>
<?php if (wpsg_isSizedInt($this->view['product_id'])) { ?>
<div style="margin-top:0.25rem;">
<span>EAN:
<span title="<?php echo __('EAN der Produktvariation', 'wpsg'); ?>" class="wpsg_editable" id="productvariation_ean_<?php echo $vari['id']; ?>"><?php echo $vari['ean']??''; ?></span>
</span>
<script>
 
jQuery('#productvariation_ean_<?php echo $vari['id']; ?>').wpsg_editable('<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productvariants&subaction=admin_inlineEdit&noheader=1', {
submitdata: {
field: 'ean',
product_id: <?php echo $this->view['product_id']; ?>,
field_id: '<?php echo $vari['id']; ?>'
}
});
</script>
</div>
<?php } ?>
<script>
 
function wpsg_mod_downloadplus_setProducts(vari_id, active) {
 
jQuery.ajax( {
/mods/mod_deliverynote/deliverynote_pdf.phtml
169,7 → 169,6
$filename = $this->view['filename'].".pdf";
$bKopf = false; $pnr = 1; $offset = 0; $count = 0;
 
foreach ($this->view['data']['products'] as $p)
{
233,7 → 232,7
/* Wenn Detailname nicht vorhanden, wird der Name auf dem Lieferschein verwendet*/
$produkt_text = $this->getProductName($this->getProduktID($p['p_id']), false);
 
$produktBeschreibung = trim(strip_tags($product_data['beschreibung']));
$produktBeschreibung = trim(strip_tags($p['beschreibung']));
if ($this->isOtherLang())
{
/mods/mod_export/fields.phtml
36,11 → 36,14
</td>
<td class="wpsg_mod_export_col_field"><div class="wpsg_editable" id="field_typ_<?php echo $f_id; ?>"><?php
foreach ($this->view['fields'] as $fieldgroup) {
foreach ($this->view['fields'] as $fieldgroup)
{
foreach ($fieldgroup['fields'] as $field_key => $field) {
foreach ($fieldgroup['fields'] as $field_key => $field)
{
if ($field_key == $f['value_key']) {
if ($field_key == $f['value_key'])
{
echo $field;
71,16 → 74,6
</td>
</tr>
<tr id="staticformat_<?php echo $f_id; ?>" style="<?php echo (($f['value_key'] != 'general_static')?'display:none;':''); ?>" class="wpsg_mod_export_row2 wpsg_tablerow wpsg_mod_export_fieldrow_<?php echo $f_id; ?> <?php echo (($i % 2 == 0)?'odd':'even'); ?>">
<td class="wpsg_mod_export_col_format_user" colspan="4">
<?php echo __('Statischer Wert', 'wpsg'); ?>:
<div class="wpsg_editable" id="field_static_<?php echo $f_id; ?>"><?php echo wpsg_hspc(wpsg_getStr($f['static'])); ?></div>
</td>
<td></td>
</tr>
<tr id="userformatrow_<?php echo $f_id; ?>" style="<?php echo (($f['format'] != 700)?'display:none;':''); ?>" class="wpsg_mod_export_row2 wpsg_tablerow wpsg_mod_export_fieldrow_<?php echo $f_id; ?> <?php echo (($i % 2 == 0)?'odd':'even'); ?>">
<td class="wpsg_mod_export_col_format_user" colspan="4">
101,13 → 94,7
jQuery('#field_typ_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', {
'type': 'multiarray',
'data': '<?php echo addslashes(json_encode($this->view['fields'], JSON_UNESCAPED_SLASHES)); ?>',
'callback': function(response, newValue) {
if (newValue === 'general_static') jQuery('#staticformat_<?php echo $f_id; ?>').show();
else jQuery('#staticformat_<?php echo $f_id; ?>').hide();
}
'data': '<?php echo addslashes(json_encode($this->view['fields'], JSON_UNESCAPED_SLASHES)); ?>'
} );
jQuery('#field_format_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', {
123,8 → 110,6
jQuery('#field_userformat_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', { } );
jQuery('#field_static_<?php echo $f_id; ?>').wpsg_editable('<?php echo $inlineEdit_url; ?>', { } );
} );
/* ]]> */</script>
164,9 → 149,3
).disableSelection();
/* ]]> */</script>
 
<style>
 
.wpsg_mod_export_col_format { min-width:100px; }
</style>
/mods/mod_export/profil.phtml
89,33 → 89,10
<?php echo wpsg_drawForm_Text(__('Pfad', 'wpsg'), $this->view['profil']['cron_path'], 'cron_path', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
<?php echo wpsg_drawForm_Text(__('Letzte Ausführung', 'wpsg'), (($this->view['profil']['cron_lastrun'] == '0000-00-00')?__('Noch nie', 'wpsg'):wpsg_formatTimestamp($this->view['profil']['cron_lastrun'], true)), false, array('noP' => false)); ?>
<fieldset id="wpsg_mod_export_cron_url" style="display:<?php echo (($this->view['profil']['cron_interval'] !== wpsg_mod_export::CRON_ORDER)?'block':'none'); ?>;">
<?php echo wpsg_drawForm_Text(__('Cron URL', 'wpsg'), '<a href="'.site_url().'/?wpsg_cron=1">'.site_url().'/?wpsg_cron=1</a>', false, array('noP' => false)); ?>
</fieldset>
 
<?php echo wpsg_drawForm_Checkbox('wp_cron', __('Stündlich mit Wordpress Cron ausführen', 'wpsg'), ($this->view['profil']['wp_cron']??'0') === '1'); ?>
 
<script>
 
document.getElementById('wp_cron').addEventListener('change', (event) => {
 
jQuery.ajax({
url: '<?php echo $inlineEdit_url; ?>',
data: {
name: 'wp_cron',
value: ((event.target.checked === true)?'1':'0')
}
})
 
// console.log('<?php echo $inlineEdit_url; ?>');
 
});
 
</script>
 
<?php if ($this->view['profil']['export_type'] === wpsg_mod_export::TYPE_ORDER) { ?>
<fieldset id="wpsg_mod_export_orderfilter" style="display:<?php echo (($this->view['profil']['cron_interval'] !== wpsg_mod_export::CRON_ORDER)?'block':'none'); ?>;">
<fieldset id="wpsg_mod_export_orderfilter">
<legend><div class="col-sm-offset-6"><?php echo __('Bestellfilter', 'wpsg'); ?></div></legend>
128,7 → 105,7
<?php echo wpsg_drawForm_Text(__('Bestellstatus', 'wpsg'), $arOrderStatus[wpsg_getStr($this->view['profil']['orderfilter']['status'], '-1')], 'orderfilter_status', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_url' => $inlineEdit_url, 'inlineEdit_source' => $arOrderStatus)); ?>
<?php $arMonth = array('-1' => __('Alle', 'wpsg')); ?>
<?php for ($i = 1; $i <= 12; $i ++) { $arMonth[str_pad($i, 2, '0', STR_PAD_LEFT)] = wpsg_strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); } ?>
<?php for ($i = 1; $i <= 12; $i ++) { $arMonth[str_pad($i, 2, '0', STR_PAD_LEFT)] = strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); } ?>
<?php $arYearCdate = array('-1' => __('Alle', 'wpsg')); ?>
<?php foreach ($this->view['cdate_years'] as $y) { $arYearCdate[$y] = $y; } ?>
256,20 → 233,9
 
<script type="text/javascript">/* <![CDATA[ */
 
function switchCronType(response, newValue) {
function switchCronType(response, newValue)
{
if (parseInt(newValue) === parseInt("<?php echo wpsg_mod_export::CRON_ORDER; ?>")) {
jQuery('#wpsg_mod_export_cron_url').hide();
jQuery('#wpsg_mod_export_orderfilter').hide();
} else {
jQuery('#wpsg_mod_export_cron_url').show();
jQuery('#wpsg_mod_export_orderfilter').show();
}
if (newValue != "0") jQuery('.cron_interval_1').show();
else jQuery('.cron_interval_1').hide();
/order/product_table.phtml
303,19 → 303,14
<strong><?php echo wpsg_ff($arCalculation['sum']['brutto']); ?> <?php echo $this->get_option('wpsg_currency'); ?></strong>
</td>
</tr>
<?php foreach ($arCalculation['tax'] as $tax) { if ($tax['sum'] > 0 && $tax['key'] != '0') { ?>
<tr class="wpsg_row_mwst wpsg_row_small">
<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
<?php if ($this->get_option('wpsg_kleinunternehmer') == '1') { ?>
<tr class="wpsg_row_mwst wpsg_row_small">
<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis" colspan="<?php echo $this->view['colspan'] + 1; ?>">
<?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?>
</td>
</tr>
<?php } else { ?>
<?php foreach ($arCalculation['tax'] as $tax) { if ($tax['sum'] > 0 && $tax['key'] != '0') { ?>
<tr class="wpsg_row_mwst wpsg_row_small">
<td colspan="<?php echo $this->view['colspan']; ?>" class="wpsg_cell_mwst_label">
<?php echo wpsg_translate(__('darin enthaltene MwSt. (#1#)', 'wpsg'), $arTax[$tax['key']]); ?>
<?php } ?>
</td>
<td class="wpsg_cell_mwst_value wpsg_cell_gesamtpreis">
<?php echo wpsg_ff($tax['sum']); ?> <?php echo $this->get_option('wpsg_currency'); ?>
325,8 → 320,6
<?php } ?>
<?php } ?>
<?php // Wertgutscheine ?>
<?php if (wpsg_isSizedArray($arCalculation['coupon'])) { ?>
/order/view_general.phtml
34,11 → 34,8
<?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); ?>
 
<?php if ($this->hasMod('wpsg_mod_rechnungen')) {
 
$arInvoice = \wpsg\wpsg_invoice::findByOrderId($this->view['oOrder']->id);
 
if (sizeof($arInvoice) > 0) { ?>
<?php if ($this->hasMod('wpsg_mod_rechnungen')) { $db_invoice = $this->callMod('wpsg_mod_rechnungen', 'getOrderInvoice', [$this->view['oOrder']->id]); ?>
<?php if (wpsg_isSizedInt($db_invoice['id'])) { ?>
<script>
 
jQuery('#sendMail').on('click', function() {
/admin/versandzonen_list.phtml
4,23 → 4,6
* Template für die Liste der Versandzonen
*/
 
$arShipping = $this->arShippingAll;
$arShippingPreset = [
'0' => __('Kundenvoreinstellung', 'wpsg'),
'-1' => __('günstigste Versandart', 'wpsg'),
];
foreach ($arShipping as $s_key => $s) {
if (intval($s['deleted']) !== 1 && intval($s['active']) === 1) {
$arShippingPreset[$s_key] = $s['name'];
 
}
}
?>
<?php if (!is_array($this->view['data']) || sizeof($this->view['data']) <= 0) { ?>
<?php echo __('Bisher keine Versandzonen hinterlegt.', 'wpsg'); ?>
30,7 → 13,6
<tr>
<th class="col_name"><?php echo __('Bezeichnung', 'wpsg'); ?></th>
<th class="col_innereu"><?php echo __('Inner- gemeinschaftlich', 'wpsg'); ?></th>
<th class="col_shippingpreset"><?php echo __('Standardversandart', 'wpsg'); ?></th>
<th class="col_aktion"></th>
</tr>
</thead>
50,29 → 32,6
data-url="<?php echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', 'wpsg-admin-versandzonen-inline_edit-'.$vz['id'])); ?>"
<?php echo (($vz['innereu'] == '1')?'checked="checked"':''); ?> type="checkbox" value="1" name="innereu_<?php echo $vz['id']; ?>" id="innereu_<?php echo $vz['id']; ?>" />
</td>
<td class="col_shippingpreset">
<span id="vz_<?php echo $vz['id']; ?>_shippingpreset"><?php echo ($arShippingPreset[($vz['shippingpreset']??'')]??''); ?></span>
<script>
jQuery('#vz_<?php echo $vz['id']; ?>_shippingpreset').wpsg_editable('<?php
echo html_entity_decode(wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=vz&do=inlinedit&noheader=1', 'wpsg-admin-versandzonen-inline_edit-'.$vz['id']));
?>', {
submitdata: {
field: 'shippingpreset',
vz_id: '<?php echo $vz['id']; ?>'
},
data: <?php echo wpsg_prepare_for_inlineEdit($arShippingPreset); ?>,
type: 'select',
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>
<td class="col_aktion">
<a class="wpsg_icon_plzedit" href="#" title="<?php echo __('Versandzonen PLZ bearbeiten', 'wpsg'); ?>" onclick="return wpsg_editPLZ(<?php echo $vz['id']; ?>);">[ PLZ ]</a>
/produkttemplates/standard.phtml
37,7 → 37,6
 
<meta itemprop="name" content="<?php echo wpsg_hspc($this->getProductName($this->view['data']['id'])); ?>" />
<meta itemprop="sku" content="<?php echo wpsg_hspc($oProduct->getProductNr()); ?>" />
<meta itemprop="gtin13" content="<?php echo wpsg_hspc($oProduct->getEAN()); ?>" />
<meta itemprop="detailname" content="<?php echo wpsg_hspc($this->view['data']['detailname']); ?>" />
 
<?php /* Block für die Produktbilder START */ ?>
118,10 → 117,8
<?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>
 
<div class="wpsg_produkt_preishinweis">
 
<?php $fs = explode(',', $this->view['data']['allowedshipping']); ?>
<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { /* Frontend = NETTO Preise */ ?>
<?php if ($this->hasMod('wpsg_mod_freeshipping') && $this->get_option('wpsg_mod_freeshipping_aktiv') == '1' && (array_search('500', $fs) || array_search('', $fs))) { /* Versandkostenfrei aktiv */?>
<?php if ($this->hasMod('wpsg_mod_freeshipping') && $this->get_option('wpsg_mod_freeshipping_aktiv') == '1') { /* Versandkostenfrei aktiv */?>
<?php if ($this->get_option('wpsg_mod_freeshipping_minvalue') > 0) { ?>
<?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und <a href="#3#">ab #2# € versandkostenfrei</a>)', 'wpsg'),
137,7 → 134,7
<?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($this->view['data']['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
<?php }?>
<?php } else { /* Frontend = BRUTTO Preise */ ?>
<?php if ($this->hasMod('wpsg_mod_freeshipping') && $this->get_option('wpsg_mod_freeshipping_aktiv') == '1' && (array_search('500', $fs) || array_search('', $fs))) { /* Versandkostenfrei aktiv */ ?>
<?php if ($this->hasMod('wpsg_mod_freeshipping') && $this->get_option('wpsg_mod_freeshipping_aktiv') == '1') { /* Versandkostenfrei aktiv */ ?>
<?php if ($this->get_option('wpsg_mod_freeshipping_minvalue') > 0) { ?>
<?php echo wpsg_translate(__('(inkl. #1#% MwSt. und <a href="#3#">ab #2# € versandkostenfrei</a>)', 'wpsg'),
153,7 → 150,6
<?php echo wpsg_translate(__('(inkl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($this->view['data']['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
<?php }?>
<?php } ?>
</div>
 
<?php } ?>
/warenkorb/basket.phtml
237,7 → 237,7
<option <?php echo (($s['id'] == $this->view['basket']['checkout']['shipping'])?'selected="selected"':''); ?> value="<?php echo $s_id; ?>"><?php echo wpsg_hspc(__($s['name'], 'wpsg')); ?></option>
<?php } ?>
</select>
<?php } else if (!wpsg_isSizedArray($this->arShipping)) { ?>
<?php } else if (!wpsg_isSizedArray($this->arShipping) || !array_key_exists($this->view['basket']['checkout']['shipping'], $this->arShipping)) { ?>
<span><?php echo __('Keine Versandart möglich / Bitte manuell anfragen', 'wpsg'); ?></span>
<?php } else { ?>
<span><?php echo $this->arShipping[$this->view['basket']['checkout']['shipping']]['name']; ?></span>
245,7 → 245,7
<?php if ($this->get_option('wpsg_hideBasketCountrySelect') != '1') { ?>
<select name="set_land" id="set_land" class="wpsg_form_submit set_land">
<?php foreach ($this->view['arLander'] as $l_id => $l) { ?>
<option <?php echo (($l_id == $this->getFrontendShippingCountry(true))?'selected="selected"':''); ?> value="<?php echo $l_id; ?>"><?php echo wpsg_hspc(__($l, 'wpsg')); ?></option>
<option <?php echo (($l_id == $this->getFrontendCountry(true))?'selected="selected"':''); ?> value="<?php echo $l_id; ?>"><?php echo wpsg_hspc(__($l, 'wpsg')); ?></option>
<?php } ?>
</select>
<?php } else { ?>