Merge remote-tracking branch 'origin/3.6' into 3.7

Conflicts:
	htdocs/compta/bank/treso.php
This commit is contained in:
Laurent Destailleur 2014-11-18 19:01:01 +01:00
commit 80e62697f0
2 changed files with 10 additions and 8 deletions

View File

@ -157,7 +157,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$sql.= " ORDER BY dlr ASC";
// Supplier invoices
$sql2= " SELECT 'invoice_supplier' as family, ff.rowid as objid, ff.ref_supplier as ref, (-1*ff.total_ttc) as total_ttc, ff.type, ff.date_lim_reglement as dlr,";
$sql2= " SELECT 'invoice_supplier' as family, ff.rowid as objid, ff.ref as ref, ff.ref_supplier as ref_supplier, (-1*ff.total_ttc) as total_ttc, ff.type, ff.date_lim_reglement as dlr,";
$sql2.= " s.rowid as socid, s.nom as name, s.fournisseur";
$sql2.= " FROM ".MAIN_DB_PREFIX."facture_fourn as ff";
$sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON ff.fk_soc = s.rowid";
@ -254,12 +254,13 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
if ($obj->family == 'invoice_supplier')
{
// TODO This code is to avoid to count suppliers credit note (ff.type = 2)
// Ajouter gestion des avoirs fournisseurs, champ
if (($obj->total_ttc < 0 && $obj->type != 2)
|| ($obj->total_ttc > 0 && $obj->type == 2))
$showline=1;
// Uncomment this line to avoid to count suppliers credit note (ff.type = 2)
//$showline=(($obj->total_ttc < 0 && $obj->type != 2) || ($obj->total_ttc > 0 && $obj->type == 2))
if ($showline)
{
$facturefournstatic->ref=$obj->ref;
$ref=$obj->ref;
$facturefournstatic->ref=$ref;
$facturefournstatic->id=$obj->objid;
$facturefournstatic->type=$obj->type;
$ref = $facturefournstatic->getNomUrl(1,'');
@ -298,7 +299,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
if ($paiement) $total_ttc = $obj->total_ttc - $paiement;
$solde += $total_ttc;
// We discard with a remain to pay to 0
// We discard lines with a remainder to pay to 0
if (price2num($total_ttc) != 0)
{
$var=!$var;

View File

@ -683,7 +683,8 @@ function hash_call($methodName,$nvpStr)
exit;*/
curl_setopt($ch, CURLOPT_URL, $API_Endpoint);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSLVERSION, 3); // Force SSLv3
//curl_setopt($ch, CURLOPT_SSLVERSION, 3); // Force SSLv3
curl_setopt($ch, CURLOPT_SSLVERSION, 1); // Force TLSv1
//turning off the server and peer verification(TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);