If the customer does not appear in VIES, the safest option is to invoice with Spanish VAT until they sort out their registration.
Rather have this calculated for you?
kontora generates your tax forms box by box, tells you how much to set aside and reminds you before every deadline.