It would be very cool to have a helper / API function to determine if an order is an RC order.

This is for example handy because you have to add a predefined text (German e.g. "Steuerschuldnerschaft des Leistungsempfängers") on invoices. So what you currently have to do is to find out, which vat is applied to the order in a heavy array construct. Then you can add the text, if it applies.

Is there a better way or a possibility for an extension to find this out more easily? I think many developers could benefit from.

Comments

Anybody’s picture

Status: Active » Closed (works as designed)

I finally found the solution myself, that works great!

The solution is already contained in the commerce_vat module.
Here's how to use:

$vat_rate = commerce_vat_order_rate($order);

This simple function returns "ec_ic_rc", if it's a reverse charge order! :)
GREAT!

I'll write a blog entry with more details on http://Julian.Pustkuchen.com about it soon.

Anybody’s picture