Merge pull request #707 from simnandez/3.3
Fix: Localtax2 for Spain must be based into buyer
This commit is contained in:
commit
0f576181be
10
ChangeLog
10
ChangeLog
@ -3,6 +3,16 @@ English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 3.3.1 compared to 3.3 *****
|
||||
|
||||
- Fix: [ bug #733 ] Mass emailing tools do not support <style HTML tag
|
||||
- Fix: Package for launchpad
|
||||
- Fix: [ bug #736 ] Missing column in llx_c_chargesociales
|
||||
- Fix: Localtax2 for Spain must be based into buyer
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 3.3 compared to 3.2.3 *****
|
||||
For users:
|
||||
- New: Add holiday module, to declare and follow holidays of your employees.
|
||||
|
||||
@ -2687,10 +2687,10 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
|
||||
dol_syslog("get_localtax tva=".$tva." local=".$local." thirdparty_buyer id=".(is_object($thirdparty_buyer)?$thirdparty_buyer->id:'')." thirdparty_seller id=".$thirdparty_seller->id);
|
||||
|
||||
// Some test to guess with no need to make database access
|
||||
if ($mysoc->country_code == 'ES') // For spain and localtaxes 1, tax is qualified if buyer use local taxe
|
||||
if ($mysoc->country_code == 'ES') // For spain localtaxes 1 and 2, tax is qualified if buyer use local taxe
|
||||
{
|
||||
if ($local == 1 && ! $thirdparty_buyer->localtax1_assuj) return 0;
|
||||
if ($local == 2 && ! $thirdparty_seller->localtax2_assuj) return 0;
|
||||
if ($local == 2 && ! $thirdparty_buyer->localtax2_assuj) return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user