Subversion Repositories wpShopGermany4

Rev

Rev 8241 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8241 Rev 8302
Line 31... Line 31...
31
 
31
 
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
	
-
 
37
	if ($this->getFrontendTaxView() === WPSG_NETTO) $taxdisplay = 'netto';
-
 
38
	else $taxdisplay = 'brutto';
-
 
39
 
36
 
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'))
Line 173... Line 170...
173
 
170
 
174
	$bTaxCol = false;
171
	$bTaxCol = false;
175
	if ($this->get_option('wpsg_showMwstAlways') === '1') $bTaxCol = true;
172
	if ($this->get_option('wpsg_showMwstAlways') === '1') $bTaxCol = true;
176
	else if (!$bNoTax) $bTaxCol = true;
173
	else if (!$bNoTax) $bTaxCol = true;
177
 
174
 
178
 
-
 
179
	if ($bNoTax) {
175
	if ($bNoTax) {
180
 
176
 
181
		$discount_value = $this->view['basket']['arCalculation']['sum']['discount_netto'];
177
		$discount_value = $this->view['basket']['arCalculation']['sum']['discount_netto'];
182
		$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_netto'];
178
		$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_netto'];
183
		$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_netto'];
179
		$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_netto'];
184
 
180
 
-
 
181
		$taxdisplay = 'netto';
-
 
182
 
185
	} else {
183
	} else {
186
 
184
 
187
		$discount_value = $this->view['basket']['arCalculation']['sum']['discount_brutto'];
185
		$discount_value = $this->view['basket']['arCalculation']['sum']['discount_brutto'];
188
		$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_brutto'];
186
		$shipping_cost = $this->view['basket']['arCalculation']['sum']['shipping_brutto'];
189
		$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_brutto'];
187
		$payment_cost = $this->view['basket']['arCalculation']['sum']['payment_brutto'];
190
 
188
 
-
 
189
		$taxdisplay = 'brutto';
-
 
190
 
191
	}
191
	}
192
				
192
				
193
	$summe = 0;
193
	$summe = 0;
194
	
194
	
195
	$bKopf = false; $pnr = 1; $offset = 0; $count = 0;
195
	$bKopf = false; $pnr = 1; $offset = 0; $count = 0;
Line 481... Line 481...
481
		$pdf->Cell( (($bTaxCol)?87:102), 8, wpsg_translate(__('Versandkosten "#1#"', 'wpsg'), $this->view['oOrder']->getShippingLabel()), 1, 0, 'L');
481
		$pdf->Cell( (($bTaxCol)?87:102), 8, wpsg_translate(__('Versandkosten "#1#"', 'wpsg'), $this->view['oOrder']->getShippingLabel()), 1, 0, 'L');
482
		
482
		
483
		if ($bTaxCol)
483
		if ($bTaxCol)
484
		{
484
		{
485
		
485
		
486
			if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $bNoTax) $mwst = wpsg_ff(0.00, '%');
486
			// if ($this->arShipping[$this->view['data']['type_shipping']]['mwst_null'] == '1' && $bNoTax) $mwst = wpsg_ff(0.00, '%');
-
 
487
			// {
-
 
488
			if ($bNoTax) 
-
 
489
			{
-
 
490
 
-
 
491
				$mwst = wpsg_ff(0.00, '%');
-
 
492
 
487
			else {
493
			} else {
-
 
494
				
-
 
495
				if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') {
488
				
496
				
489
				if ($this->view['basket']['arCalculation']['shipping'][0]['tax_key'] === '0') $mwst = _('anteilig');
497
					$mwst = _('anteilig');
-
 
498
 
490
				else {
499
				} else {
491
					
500
					
492
					$mwst = wpsg_ff($this->view['basket']['arCalculation']['shipping'][0]['tax'], '%');
501
					$mwst = wpsg_ff($this->view['basket']['arCalculation']['shipping'][0]['tax'], '%');
493
					$mwst = wpsg_ff($this->view['basket']['arCalculation']['tax'][$this->view['basket']['arCalculation']['shipping'][0]['tax_key']]['tax_value'], '%');
502
					$mwst = wpsg_ff($this->view['basket']['arCalculation']['tax'][$this->view['basket']['arCalculation']['shipping'][0]['tax_key']]['tax_value'], '%');
494
					
503
					
495
				}
504
				}
Line 526... Line 535...
526
		$pdf->Cell( (($bTaxCol)?87:102), 8, $this->arPayment[$this->view['data']['type_payment']]['name'], 1, 0, 'L');
535
		$pdf->Cell( (($bTaxCol)?87:102), 8, $this->arPayment[$this->view['data']['type_payment']]['name'], 1, 0, 'L');
527
		
536
		
528
		if ($bTaxCol)
537
		if ($bTaxCol)
529
		{
538
		{
530
		
539
		
531
			if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $bNoTax)
540
			// if ($this->arPayment[$this->view['data']['type_payment']]['mwst_null'] == '1' && $bNoTax)
-
 
541
			// {
-
 
542
			if ($bNoTax) 
532
			{
543
			{
533
 
544
 
534
				$mwst = wpsg_ff(0.00, '%');
545
				$mwst = wpsg_ff(0.00, '%');
535
 
546
 
536
			} else {
547
			} else {
Line 613... Line 624...
613
		$pdf->Text($prod_left, $prod_top + $offset, __("Ihre Umsatzsteuer-Identifikationsnummer:", "wpsg"));
624
		$pdf->Text($prod_left, $prod_top + $offset, __("Ihre Umsatzsteuer-Identifikationsnummer:", "wpsg"));
614
		$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
625
		$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
615
		$pdf->Cell(37, 8, $this->view['kunde']['ustidnr'], 0, 0, 'R');
626
		$pdf->Cell(37, 8, $this->view['kunde']['ustidnr'], 0, 0, 'R');
616
	}
627
	}
617
	
628
	
-
 
629
	$offset += 5; // Abstand zwischen Tabelle und Rabatt
-
 
630
 
-
 
631
	// Rabatt
-
 
632
	if ($discount_value > 0)
-
 
633
	{
-
 
634
		
-
 
635
		$offset += 5;
-
 
636
		$pdf->Text($prod_left + 80, $prod_top + $offset, __("Rabatt", "wpsg"));
-
 
637
		$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
-
 
638
		$pdf->Cell(37, 8, '-'.wpsg_ff($discount_value, $this->get_option('wpsg_currency')), 0, 0, 'R');
-
 
639
		
-
 
640
	}
-
 
641
 
618
	$offset += 10; // Abstand zwischen Tabelle und Auswertung
642
	$offset += 5; // Abstand zwischen Rabatt und Auswertung
619
 
643
 
620
	if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) )
644
	if ( ($this->get_option('wpsg_kleinunternehmer') == '1') || ($this->view['oCalculationOrder']->getTaxMode() === \wpsg\wpsg_calculation::TAXMODE_SMALLBUSINESS) )
621
	{
645
	{
622
		
646
		
623
		$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
647
		$pdf->Text($prod_left, $prod_top + $offset, __("Es ergibt sich folgender Gesamtbetrag", "wpsg").':');
624
		$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
648
		$pdf->Text($prod_left + 80, $prod_top + $offset, __("Summe", "wpsg"));
625
		$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
649
		$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
626
		$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');
650
		$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['brutto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
-
 
651
 
627
		if ( !$bNoTax || ($arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto']) ) $offset += 5;
652
		$offset += 5;
628
 
653
 
629
	} else {
654
	} else {
630
		
655
		
631
		if ($bNoTax)
656
		if ($bNoTax)
632
		{
657
		{
Line 678... Line 703...
678
			
703
			
679
			$pdf->Text($prod_left, $prod_top + $offset, __("Der Gesamtbetrag setzt sich wie folgt zusammen", "wpsg").':');
704
			$pdf->Text($prod_left, $prod_top + $offset, __("Der Gesamtbetrag setzt sich wie folgt zusammen", "wpsg").':');
680
			
705
			
681
			$pdf->Text($prod_left + 80, $prod_top + $offset, __("NETTOBETRAG", "wpsg"));
706
			$pdf->Text($prod_left + 80, $prod_top + $offset, __("NETTOBETRAG", "wpsg"));
682
			$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
707
			$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
683
			$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');
708
			$pdf->Cell(37, 8, wpsg_ff($this->view['basket']['arCalculation']['sum']['topay_netto'], $this->get_option('wpsg_currency')), 0, 0, 'R');
684
			
709
			
685
			if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
710
			if (sizeof($this->view['basket']['arCalculation']['tax']) >= 1)
686
			{
711
			{
687
 
712
 
688
				$mw_count = 0;
713
				$mw_count = 0;
Line 715... Line 740...
715
			}
740
			}
716
			
741
			
717
		}
742
		}
718
		
743
		
719
	}
744
	}
720
	
-
 
721
	// Rabatt
-
 
722
	if ($discount_value > 0)
-
 
723
	{
-
 
724
		
-
 
725
		$offset += 5;
-
 
726
		$pdf->Text($prod_left + 80, $prod_top + $offset, __("Rabatt", "wpsg"));
-
 
727
		$pdf->setXY($prod_left + 140, $prod_top + $offset - 5);
-
 
728
		$pdf->Cell(37, 8, '-'.wpsg_ff($discount_value, $this->get_option('wpsg_currency')), 0, 0, 'R');
-
 
729
		
-
 
730
	}
-
 
731
 
745
 
732
	// Wertgutschein
746
	// Wertgutschein
733
	if ( $arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto'] ) {
747
	if ( $arCalculation['sum']['topay_brutto'] != $arCalculation['sum']['brutto'] ) {
734
 
748
 
735
		if (!$bNoTax) {
749
		if (!$bNoTax) {