• Hallo

    Den Firmenname auf der Rechnung abdrucken kann ich nun mit meinem Patch.

    Auf dem Zahlteil steht jedoch der Name der Person, statt der Firma.

    In qr_bill_generate(…) müsste zus?tzlich der Aufruf von setUltimateDebtor angepasst werden, richtig?

    Danke für ein kurzes Feedback.

    Bitte lasst auch wissen ob und in welcher Form Beitr?ge angenommen werden. Das Plugin kreiert nicht korrekte Rechnungen und niemand hier reagiert.

    Gruss
    Thomas

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter twhaas

    (@twhaas)

    Anbei ein patch zu Version 1.2.2

    
    Index: includes/gateway/class-wc-swiss-qr-bill-generate.php
    ===================================================================
    --- includes/gateway/class-wc-swiss-qr-bill-generate.php	(revision 2576923)
    +++ includes/gateway/class-wc-swiss-qr-bill-generate.php	(working copy)
    @@ -260,7 +260,7 @@
     
     			$qrBill->setUltimateDebtor(
     				QrBill\DataGroup\Element\StructuredAddress::createWithStreet(
    -					$order->get_formatted_billing_full_name(),
    +					$order->get_billing_company() ?: $order->get_formatted_billing_full_name(),
     					$order->get_billing_address_1(),
     					'',
     					$order->get_billing_postcode(),
    Index: includes/tcpdf/templates/parts/customer-address.php
    ===================================================================
    --- includes/tcpdf/templates/parts/customer-address.php	(revision 2576923)
    +++ includes/tcpdf/templates/parts/customer-address.php	(working copy)
    @@ -8,7 +8,14 @@
     </style>
     <table border="0">
         <tr>
    -        <td class="f-small"><b><?php echo $order->get_formatted_billing_full_name(); ?></b>
    +        <td class="f-small"><?php
    +		
    +		if ($order->get_billing_company()) {
    +			echo '<b>' . $order->get_billing_company() . '</b><br>' . $order->get_formatted_billing_full_name();
    +		} else {
    +			echo '<b>' . $order->get_formatted_billing_full_name() . '</b>';
    +		}
    +		?>
                 <br><?php echo $order->get_billing_address_1(); ?>
                 <?php echo $order->get_billing_address_2() ? '<br>' . $order->get_billing_address_2() : ''; ?>
                 <br><?php echo $order->get_billing_postcode() . ' ' . $order->get_billing_city(); ?>
    • This reply was modified 3 years, 7 months ago by twhaas.
    • This reply was modified 3 years, 7 months ago by twhaas.
    • This reply was modified 3 years, 7 months ago by twhaas.

    Hallo @twhaas vielen Dank! Wir werden das für den n?chsten Release berücksichtigen!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Firmenname auf Zahlteil’ is closed to new replies.