/**
* Adds the VAT below the company name on the estimates and invoices via a hook
* that was added in version 1.1.4 of Sprout Invoices.
*/
function si_maybe_add_vat_to_docs() {
$client_id = 0;
$doc_id = get_the_id();
if ( get_post_type( $doc_id ) == SI_Invoice::POST_TYPE ) {
$client_id = si_get_invoice_client_id();
}
if ( get_post_type( $doc_id ) == SI_Estimate::POST_TYPE ) {
$client_id = si_get_estimate_client_id();
}
if ( $client_id ) {
$client = SI_Client::get_instance( $client_id );
printf( self::__('<em>VAT: %s</em>'), self::get_vat( $client ) );
}
}
add_action( 'si_document_client_addy', 'si_maybe_add_vat_to_docs' );
If you're not running the latest version of Sprout Invoices or you don't like the location of the meta in the example above you can create a custom template and add the VAT yourself.
The function to get the value si_get_client_vat.
The function to echo the value si_client_vat.