From 6b9bc293077d882b9ec6141aa64043d496af7f93 Mon Sep 17 00:00:00 2001 From: karl Date: Fri, 13 Jan 2023 10:21:13 +0000 Subject: - Code eingerückt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8189 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/mods/mod_rechnungen/invoice_pdf.phtml | 103 +++++++--------------------- 1 file changed, 23 insertions(+), 80 deletions(-) (limited to 'views') diff --git a/views/mods/mod_rechnungen/invoice_pdf.phtml b/views/mods/mod_rechnungen/invoice_pdf.phtml index fad5443..c0b7836 100644 --- a/views/mods/mod_rechnungen/invoice_pdf.phtml +++ b/views/mods/mod_rechnungen/invoice_pdf.phtml @@ -6,7 +6,6 @@ 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; @@ -36,12 +35,7 @@ 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') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) ) unset($this->view['basket']['mwst']); if (!function_exists('AddRechnungPage')) { @@ -112,8 +106,8 @@ $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); @@ -182,12 +176,9 @@ 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; - } + || ($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; @@ -250,28 +241,11 @@ $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') $pdf->Cell(10, 8, $product->getNr(), 0, 0, 'C'); + else $pdf->Cell(10, 8, $pnr.".", 0, 0, 'C'); - 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); - - } + 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); $produktBeschreibung = trim(strip_tags($product->getShortDescription())); @@ -324,10 +298,7 @@ } $produkt_text_cell_width = 102; - if ($bTaxCol) - { - $produkt_text_cell_width = 87; - } + if ($bTaxCol) $produkt_text_cell_width = 87; $produkt_text_width = $pdf->GetStringWidth($produkt_text); //$produkt_text_cell_width = (($this->arMwSt == "-1")?87:102); @@ -343,22 +314,15 @@ if ($bTaxCol) { $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'); // BUG + $pdf->Cell(15, 8, (($bNoTax)?'0.00 %':wpsg_ff($this->view['basket']['arCalculation']['tax'][$p['tax_key']]['tax_value'], '%')), 0, 0, 'C'); } $pdf->setXY($prod_left + 112, $prod_top + $offset); $pdf->Cell(15, 8, $p['amount'], 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 ) || $bNoTax ) $preis_single = $p['netto_calculated_single']; + else $preis_single = $p['brutto_calculated_single']; $pdf->setXY($prod_left + 127, $prod_top + $offset); $pdf->Cell(25, 8, wpsg_ff($preis_single, $this->get_option('wpsg_currency')), 0, 0, 'R'); @@ -449,12 +413,7 @@ $pdf->Rect($prod_left + 10, $prod_top + $offset, (($bTaxCol)?87:102), $height); - if ($bTaxCol) - { - - $pdf->Rect($prod_left + 97, $prod_top + $offset, 15, $height); - - } + if ($bTaxCol) $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); @@ -465,11 +424,8 @@ $pnr ++; $count ++; - if ($bNoTax) { - $price = $p['netto']; - } else { - $price = $p['brutto']; - } + if ($bNoTax) $price = $p['netto']; + else $price = $p['brutto']; $summe += $price * $p['amount']; @@ -536,18 +492,11 @@ if ($bTaxCol) { - 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' && $bNoTax) $mwst = wpsg_ff(0.00, '%'); + else { - if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') { - - $mwst = _('anteilig'); - - } 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'], '%'); @@ -644,14 +593,8 @@ if ($bTaxCol) { - if ($bNoTax) - { - $mwst = wpsg_ff(0.00, '%'); - } - else - { - $mwst = wpsg_ff($this->view['storno_fee_tax_value'], '%'); - } + if ($bNoTax) $mwst = wpsg_ff(0.00, '%'); + 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'); -- cgit v1.2.3