Subversion Repositories wpShopGermany4

Rev

Rev 8280 | Rev 8371 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8280 Rev 8301
Line 32... Line 32...
32
	// Anzahl an Produkten pro Seite
32
	// Anzahl an Produkten pro Seite
33
	$prod_break					= $this->get_option('wpsg_rechnungen_pdfperpage');
33
	$prod_break					= $this->get_option('wpsg_rechnungen_pdfperpage');
34
	
34
	
35
	$arCalculation = $this->view['basket']['arCalculation'];
35
	$arCalculation = $this->view['basket']['arCalculation'];
36
	
36
	
37
	if ($this->getFrontendTaxView() === WPSG_NETTO) $taxdisplay = 'netto';
-
 
38
	else $taxdisplay = 'brutto';
-
 
39
	
-
 
40
	// Damit die Steuer bei der Kleinunternehmerregelung nicht angezeigt wird leer ich den Array sicherheitshalber
37
	// Damit die Steuer bei der Kleinunternehmerregelung nicht angezeigt wird leer ich den Array sicherheitshalber
41
	if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) ) unset($this->view['basket']['mwst']);
38
	if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) ) unset($this->view['basket']['mwst']);
42
	
39
	
43
	if (!function_exists('AddRechnungPage'))
40
	if (!function_exists('AddRechnungPage'))
44
	{
41
	{
Line 201... Line 198...
201
 
198
 
202
		$discount_value = abs($this->view['basket']['arCalculation']['sum']['discount_netto']);
199
		$discount_value = abs($this->view['basket']['arCalculation']['sum']['discount_netto']);
203
		$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_netto'];
200
		$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_netto'];
204
		$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_netto'];
201
		$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_netto'];
205
 
202
 
-
 
203
		$taxdisplay = 'netto';
-
 
204
 
206
	} else {
205
	} else {
207
 
206
 
208
		$discount_value = abs($this->view['basket']['arCalculation']['sum']['discount_brutto']);
207
		$discount_value = abs($this->view['basket']['arCalculation']['sum']['discount_brutto']);
209
		$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_brutto'];
208
		$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_brutto'];
210
		$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_brutto'];
209
		$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_brutto'];
211
 
210
 
-
 
211
		$taxdisplay = 'brutto';
-
 
212
 
212
	}
213
	}
213
 
214
 
214
	$summe = 0;
215
	$summe = 0;
215
 
216
 
216
	$bKopf = false; $pnr = 1; $offset = 0; $count = 0;
217
	$bKopf = false; $pnr = 1; $offset = 0; $count = 0;
Line 478... Line 479...
478
			$pdf->setXY($prod_left + 112, $prod_top + $offset);
479
			$pdf->setXY($prod_left + 112, $prod_top + $offset);
479
			$pdf->Cell(15, 8, '1', 1, 0, 'C');
480
			$pdf->Cell(15, 8, '1', 1, 0, 'C');
480
			
481
			
481
			$gs_value_einzel = wpsg_ff($v[$taxdisplay.'_single'], $this->get_option('wpsg_currency'));
482
			$gs_value_einzel = wpsg_ff($v[$taxdisplay.'_single'], $this->get_option('wpsg_currency'));
482
			$gs_value_gesamt = wpsg_ff($v[$taxdisplay], $this->get_option('wpsg_currency'));
483
			$gs_value_gesamt = wpsg_ff($v[$taxdisplay], $this->get_option('wpsg_currency'));
483
			
484
 
484
			$pdf->setXY($prod_left + 127, $prod_top + $offset);
485
			$pdf->setXY($prod_left + 127, $prod_top + $offset);
485
			$pdf->Cell(25, 8, $gs_value_einzel, 1, 0, 'R');
486
			$pdf->Cell(25, 8, $gs_value_einzel, 1, 0, 'R');
486
			
487
			
487
			$pdf->setXY($prod_left + 152, $prod_top + $offset);
488
			$pdf->setXY($prod_left + 152, $prod_top + $offset);
488
			$pdf->Cell(25, 8, $gs_value_gesamt, 1, 0, 'R');
489
			$pdf->Cell(25, 8, $gs_value_gesamt, 1, 0, 'R');
Line 505... Line 506...
505
		$pdf->Cell( (($bTaxCol)?87:102), 8, wpsg_translate(__('Versandkosten "#1#"', 'wpsg'), $this->view['oOrder']->getShippingLabel()), 1, 0, 'L');
506
		$pdf->Cell( (($bTaxCol)?87:102), 8, wpsg_translate(__('Versandkosten "#1#"', 'wpsg'), $this->view['oOrder']->getShippingLabel()), 1, 0, 'L');
506
		
507
		
507
		if ($bTaxCol)
508
		if ($bTaxCol)
508
		{
509
		{
509
 
510
 
510
			if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $bNoTax) $mwst = wpsg_ff(0.00, '%');
511
			// if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $bNoTax) 
-
 
512
			// {
-
 
513
			if ($bNoTax) 
-
 
514
			{
-
 
515
			
-
 
516
				$mwst = wpsg_ff(0.00, '%');
-
 
517
 
511
			else {
518
			} else {
512
				
519
				
513
				if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') $mwst = _('anteilig');
520
				if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') {
-
 
521
				
-
 
522
					$mwst = _('anteilig');
-
 
523
 
514
				else {
524
				} else {
515
 
525
 
516
					$mwst = wpsg_ff($this->view['basket']['arCalculation']['shipping'][0]['tax'], '%');
526
					$mwst = wpsg_ff($this->view['basket']['arCalculation']['shipping'][0]['tax'], '%');
517
					$mwst = wpsg_ff($this->view['basket']['arCalculation']['tax'][$this->view['basket']['arCalculation']['shipping'][0]['tax_key']]['tax_value'], '%');
527
					$mwst = wpsg_ff($this->view['basket']['arCalculation']['tax'][$this->view['basket']['arCalculation']['shipping'][0]['tax_key']]['tax_value'], '%');
518
					
528
					
519
				}
529
				}
Line 550... Line 560...
550
		$pdf->Cell( (($bTaxCol)?87:102), 8, $this->arPayment[$this->view['data']['type_payment']]['name'], 1, 0, 'L');
560
		$pdf->Cell( (($bTaxCol)?87:102), 8, $this->arPayment[$this->view['data']['type_payment']]['name'], 1, 0, 'L');
551
		
561
		
552
		if ($bTaxCol)
562
		if ($bTaxCol)
553
		{
563
		{
554
			
564
			
555
			if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $bNoTax)
565
			// if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $bNoTax)
-
 
566
			// {
-
 
567
			if ($bNoTax)
556
			{
568
			{
557
 
569
 
558
				$mwst = wpsg_ff(0.00, '%');
570
				$mwst = wpsg_ff(0.00, '%');
559
 
571
 
560
			} else {
572
			} else {
Line 637... Line 649...
637
		$pdf->Text($prod_left, $prod_top + $offset, __("Ihre Umsatzsteuer-Identifikationsnummer:", "wpsg"));
649
		$pdf->Text($prod_left, $prod_top + $offset, __("Ihre Umsatzsteuer-Identifikationsnummer:", "wpsg"));
638
		$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
650
		$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
639
		$pdf->Cell(37, 8, $this->view['kunde']['ustidnr'], 0, 0, 'R');
651
		$pdf->Cell(37, 8, $this->view['kunde']['ustidnr'], 0, 0, 'R');
640
	}
652
	}
641
	
653
	
-
 
654
	$offset += 5; // Abstand zwischen Tabelle und Rabatt
-
 
655
 
-
 
656
	// Rabatt
-
 
657
	if ($discount_value > 0)
-
 
658
	{
-
 
659
 
-
 
660
		$offset += 5;
-
 
661
		$pdf->Text($prod_left + 80, $prod_top + $offset, __("Rabatt", "wpsg"));
-
 
662
		$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
-
 
663
		$pdf->Cell(37, 8, '-'.wpsg_ff($discount_value, $this->get_option('wpsg_currency')), 0, 0, 'R');
-
 
664
		
-
 
665
	}
-
 
666
 
642
	$offset += 10; // Abstand zwischen Tabelle und Auswertung
667
	$offset += 5; // Abstand zwischen Rabatt und Auswertung
643
 
668
 
644
	if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) )
669
	if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) )
645
	{
670
	{
646
		
671
		
647
		$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
672
		$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
648
		$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
673
		$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
649
		$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
674
		$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
650
		$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');
675
		$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
651
		if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) $offset += 5;
676
		if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) $offset += 5;
652
 
677
 
653
	} else {
678
	} else {
654
		
679
		
655
		if ($bNoTax)
680
		if ($bNoTax)
656
		{
681
		{
657
			
682
 
658
			$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
683
			$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
659
			$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
684
			$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
660
			$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
685
			$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
661
			$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');
686
			$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
662
			//if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) 
-
 
663
			$offset += 5;
687
			$offset += 5;
664
 
688
 
665
			if ( !(($this->view['oOrder']->isInnerEu() || $deliverycountrytax) && ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B)) ) {
689
			if ( !(($this->view['oOrder']->isInnerEu() || $deliverycountrytax) && ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_B2B)) ) {
666
 
690
 
667
				if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
691
				if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
Line 702... Line 726...
702
 
726
 
703
			$pdf->Text($prod_left, $prod_top + $offset, __("Der Gesamtbetrag setzt sich wie folgt zusammen", "wpsg").':');
727
			$pdf->Text($prod_left, $prod_top + $offset, __("Der Gesamtbetrag setzt sich wie folgt zusammen", "wpsg").':');
704
			
728
			
705
			$pdf->Text($prod_left + 80, $prod_top + $offset, __("NETTOBETRAG", "wpsg"));
729
			$pdf->Text($prod_left + 80, $prod_top + $offset, __("NETTOBETRAG", "wpsg"));
706
			$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
730
			$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
707
			$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');
731
			$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['topay_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
708
			
732
			
709
			if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
733
			if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
710
			{
734
			{
711
 
735
 
712
				$mw_count = 0;
736
				$mw_count = 0;
Line 739... Line 763...
739
			}
763
			}
740
			
764
			
741
		}
765
		}
742
		
766
		
743
	}
767
	}
744
	
-
 
745
	// Rabatt
-
 
746
	if ($discount_value > 0)
-
 
747
	{
-
 
748
 
-
 
749
		$offset += 5;
-
 
750
		$pdf->Text($prod_left + 80, $prod_top + $offset, __("Rabatt", "wpsg"));
-
 
751
		$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
-
 
752
		$pdf->Cell(37, 8, '-'.wpsg_ff($discount_value, $this->get_option('wpsg_currency')), 0, 0, 'R');
-
 
753
		
-
 
754
	}
-
 
755
 
768
 
756
	// Wertgutschein
769
	// Wertgutschein
757
	if ( $arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto'] ) {
770
	if ( $arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto'] ) {
758
 
771
 
759
		if (!$bNoTax) {
772
		if (!$bNoTax) {