EU VAT hell - how to add VAT when multiple payment processors are used?

Discussion in 'Payments processing' started by tomfra, Dec 5, 2007.

  1. alianschiavoncini

    alianschiavoncini New Member

    Joined:
    Jul 4, 2018
    Messages:
    4
    @caesar you are right, there is a built in Vat ID field. It's useful but the field it is printed on the left column under the PDF invoice number and data while it must be under the customer address on the right column. Moreover the validation is not a real validation because the seller it's not sure to get the right customer vat code... I means it would be great also to improve the validation through the official European VIES (http://ec.europa.eu/taxation_customs/vies/). Other online store like istockphoto.com has this feature.
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    2,295
    Yes, we use this service to validate:
    http://ec.europa.eu/taxation_customs/vies/services/checkVatService

    Here is code to move this vat id to right column:
    http://www.amember.com/docs/Site.php_file
    Code:
    Am_Di::getInstance()->hook->add(Am_Event::PDF_INVOICE_COL_LEFT, function (Am_Event $e) {
        $col = $e->getCol();
        $col->remove('taxId');
    });
    
    Am_Di::getInstance()->hook->add(Am_Event::PDF_INVOICE_COL_RIGHT, function (Am_Event $e) {
        $col = $e->getCol();
        $user = $e->getInvoice()->getUser();
        if($user->tax_id) {
            $col->add("EU VAT ID: {$user->tax_id}", 'taxId');
        }
    });
    
    Also I agree with you. We move it to right column by default in next release.

    Best Regards.

Share This Page