• Resolved typomaniac

    (@typomaniac)


    Hey,

    is there any change that i can remove the additional vat note which is written in parentheses behind the total amount? This is what i get:

    Zwischensumme
    19,90 €
    Lieferung
    3,39 €
    via Versandkostenpauschale
    Gesamt
    23,29 € (inkl. 3,72 € Mwst.)
    inkl. 19% MwSt.
    3,72 €

    i need to remove the part behind 23,29. My tax consultant says that this may lead to issues because the vat is declared twice!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Same here! Hope to see a solution to this, been digging in the woocommerce core for hours to find out what controls this. IT also shows up in the order emails.

    Plugin Contributor Ewout

    (@pomegranate)

    Hi! I think this is added by WooCommerce German Market, that last line is not a standard WooCommerce line (which ads the tax string to the “Gesamt” line). You can remove it from the PDF totals with this code snippet:

    
    add_filter( 'wpo_wcpdf_woocommerce_totals', 'wpo_wcpdf_woocommerce_totals_remove_incl_tax', 10, 3 );
    function wpo_wcpdf_woocommerce_totals_remove_incl_tax( $totals, $order, $template_type ) {
    	// strip (includes %s) string from order total
    	if (isset($totals['order_total'])) {
    		// get includes string from WC
    		$includes_string = __( '(includes %s)', 'woocommerce' );
    		// find position in order total
    		$position = strpos( $totals['order_total']['value'], substr($includes_string, 0, 4 ) );
    		if ($position !== false) {
    			$totals['order_total']['value'] = substr($totals['order_total']['value'], 0, $position );
    		}
    	}
    	return $totals;
    }
    

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

    This will not affect the email totals though.

    Ewout

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove double VAT (behind total)’ is closed to new replies.