• Resolved jordibrain

    (@jordibrain)


    We have some trouble with the PDF, So what we have is a 21% Tax rate when someone orders from the Netherlands.

    But when Someone with a company from Belgium is ordering products we Sell B2B, so they don’t need to pay tax if their Tax number is correct. So because they dont need to pay taxes their is no tax on their invoice. But now its get difficult for our admin because they want to see taxes on all our invoices. How can we change this that they don’t pay the tax in the front end but they see the tax on the invoice. Is this even possible?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @jordibrain,

    If I understood correctly, you want to display the VAT always, even when it’s zero, right?

    If so, please note that, by default, WooCommerce hides the tax when the value is zero (0). But you can override this behavior, displaying the taxes always, with this code snippet:

    add_filter( 'woocommerce_order_hide_zero_taxes', '__return_false' );

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    Thread Starter jordibrain

    (@jordibrain)

    thats correct, if we insert this does it work directly or only on new orders? because i dont see it on my previous order atm?

    Thread Starter jordibrain

    (@jordibrain)

    We added your code, but it still not working we still see only the price and no tax line for Belgium customers. For dutch customers yes we already saw them, but if there is no tax included when people checkout, then we dont see it on the pdf invoice, but this must be visible all the time also when its 0%. Can you please have a look again and see how we can fix this issue?

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Do you see 0% tax, for no tax orders, in the order details?

    Thread Starter jordibrain

    (@jordibrain)

    No we dont see any tax

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Thanks for checking this, @jordibrain.

    There is a slight difference between the zero tax (tax is equal to 0) and no tax orders, which seems to be your case: There is no tax info saved in the order.

    That said, you can display a zero tax row, within the total’s area, with this code snippet:

    /**
     * PDF Invoices & Packing Slips for WooCommerce:
     * Show a Tax row in totals' area, even if the order taxes are empty (blank or 0)
     */
     add_filter( 'wpo_wcpdf_woocommerce_totals', function( $totals, $order, $document_type ) {
    	if ( empty( $order->get_total_tax() ) ) {
    		$totals['tax']['label'] = __( 'Tax', 'woocommerce' );
    		$totals['tax']['value'] = wc_price( 0 );
    	}		
    	return $totals;
    }, 10, 3 );

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    Thread Starter jordibrain

    (@jordibrain)

    that dindt work out i get an error, so i guess there is something wrong in the code:

    De code-snippet die je probeert op te slaan veroorzaakt een fatale fout op regelnummer 10:syntax error, unexpected ‘}’

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Maybe do you tried to copy the code from the email notification? If so, please click in the following link to return to the www.ads-software.com forum, and copy the code directly from the code block: https://www.ads-software.com/support/topic/btw-verlegd/#post-16742499

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘BTW verlegd’ is closed to new replies.