FIX #37259 - Reverse Charge also for non-EEC countries (#37260)

See issue #37259:

Currently, reverse charge is only applied, if the supplier is based in the EEC.

At least for a German B2B customers, reverse charge has to get applied to any supplier outside of the home country.

The fix is non-invasive by providing a const ACCOUNTING_REVERSE_CHARGE_ALSO_NON_EEC to allow for a broader application of the already implemented RC rules.
This commit is contained in:
Joachim Kueter 2026-02-17 18:04:02 +01:00 committed by GitHub
parent 81ac910ede
commit deeb710d2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -297,7 +297,7 @@ if ($result) {
}
// VAT Reverse charge
if (($mysoc->country_code == 'FR' || getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) && $obj->vat_reverse_charge == 1 && in_array($obj->country_code, $country_code_in_EEC)) {
if (($mysoc->country_code == 'FR' || getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) && $obj->vat_reverse_charge == 1 && (in_array($obj->country_code, $country_code_in_EEC) || getDolGlobalString('ACCOUNTING_REVERSE_CHARGE_ALSO_NON_EEC'))) {
$rcvatdata = getTaxesFromId($obj->product_buy_vat . ($obj->product_buy_default_vat_code ? ' (' . $obj->product_buy_default_vat_code . ')' : ''), $mysoc, $mysoc, 0);
$rcc_compta_tva = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcctva);
$rcd_compta_tva = (!empty($vatdata['accountancy_code_vat_reverse_charge_debit']) ? $vatdata['accountancy_code_vat_reverse_charge_debit'] : $rcdtva);