Skip to content
Snippets Groups Projects
Commit 9560ec54 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0

Conflicts:
	htdocs/compta/facture/list.php
parents 2f77549d acf8874c
No related branches found
No related tags found
No related merge requests found
......@@ -761,12 +761,12 @@ $sql.=$hookmanager->resPrint;
if (! $sall)
{
$sql.= ' GROUP BY f.rowid, f.facnumber, ref_client, f.type, f.note_private, f.note_public, f.increment, fk_mode_reglement, f.total, f.tva, f.total_ttc,';
$sql.= ' GROUP BY f.rowid, f.facnumber, ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.total, f.tva, f.total_ttc,';
$sql.= ' f.datef, f.date_lim_reglement,';
$sql.= ' f.paye, f.fk_statut,';
$sql.= ' f.datec, f.tms,';
$sql.= ' s.rowid, s.nom, s.town, s.zip, s.fk_pays, s.code_client, s.client, typent.code';
$sql.= ' ,state.code_departement, state.nom';
$sql.= ' s.rowid, s.nom, s.town, s.zip, s.fk_pays, s.code_client, s.client, typent.code,';
$sql.= ' state.code_departement, state.nom';
foreach ($extrafields->attribute_label as $key => $val) //prevent error with sql_mode=only_full_group_by
{
......
......@@ -7,7 +7,7 @@
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014 Cédric GROSS <c.gross@kreiz-it.fr>
......@@ -3524,7 +3524,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
$vatratecleaned = $vatrate;
if (preg_match('/^(.*)\s*\((.*)\)$/', $vatrate, $reg)) // If vat is "xx (yy)"
{
$vatratecleaned = $reg[1];
$vatratecleaned = trim($reg[1]);
$vatratecode = $reg[2];
}
......@@ -3538,7 +3538,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
{
if ($local == 1)
{
if (! $mysoc->localtax1_assuj) return 0;
if (! $mysoc->localtax1_assuj || (string) $vatratecleaned == "0") return 0;
if ($thirdparty_seller->id == $mysoc->id)
{
if (! $thirdparty_buyer->localtax1_assuj) return 0;
......@@ -3551,7 +3551,7 @@ function get_localtax($vatrate, $local, $thirdparty_buyer="", $thirdparty_seller
if ($local == 2)
{
if (! $mysoc->localtax2_assuj) return 0;
if (! $mysoc->localtax2_assuj || (string) $vatratecleaned == "0") return 0;
if ($thirdparty_seller->id == $mysoc->id)
{
if (! $thirdparty_buyer->localtax2_assuj) return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment