Fixed $domain_id in invoice update function