I believe it’s important to clarify a key distinction between sites displaying tax-inclusive (TTC) prices and those displaying tax-exclusive (HT) prices.
1) For sites displaying tax-inclusive (TTC) prices:
The gross price (TTC) is entered including the local VAT rate (ex: 20% in France). When an intra-community B2B customer provides a valid VAT number, the VAT is simply removed (TTC price - local VAT), leaving the net price (HT). In this case, the shop owner’s margin is not impacted, as the net price (HT) remains constant.
However, for a B2C customer from another country (ex Belgium with 21% VAT), the gross price (TTC) must remain fixed, but the net price (HT) may vary depending on the VAT rate applied. This can slightly affect the margin, but this is required by law for B2C transactions to comply with EU Directive 2006/112/EC.
2) For sites displaying tax-exclusive (HT) prices:
The net price (HT) remains constant, and VAT is dynamically added based on the client’s location and VAT status. In this scenario, the shop owner’s margin is stable, as it is not affected by VAT rates.
This patch correctly adjusts the expected behavior by removing VAT for intra-community B2B sales with a valid VAT number, ensuring compliance with EU Directive. For B2C international sales, the margin variation is a consequence of the legal requirement to maintain a constant gross price (TTC).
I hope this explanation clarifies the distinction and why this behavior is necessary.
alumni → created an issue.
I need to precise that I have no problem with my others Lazy Builder.
public static function trustedCallbacks() {
return ['LoadData'];
}
public function LoadData($var) {
$data = $this->dataTakeTime();
$my_js_var = $data['specific_data'];
$build = ['#theme' => 'custom_template', '#data' => $data];
$build['#attached']['library'][] = 'my_module/my_library';
$build['#attached']['drupalSettings']['myJsVar'] = $my_js_var;
return $build;
}
//Partie DVF
$variables['dvf'] = [
'#create_placeholder' => TRUE,
'#lazy_builder' => [
Dvf::class.':LoadData',
[$points[0]['lat'], $points[0]['lon']],
],
];
Edit : Have prefix and suffix in the build render array generate an error too.
alumni → created an issue.