diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 7ac510525be..1cb00e3ba51 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -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; diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index 51744775d9f..40e177404f9 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -146,10 +146,10 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO if ($message) { $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; - if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); - $actionmsg = dol_concatdesc($actionmsg, $message); + if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); + $actionmsg = dol_concatdesc($actionmsg, $message); } } diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 77c7e17ffb5..4ffc31c9cab 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -748,10 +748,10 @@ if ($action == 'send' && ! GETPOST('cancel','alpha') && (empty($conf->global->MA $actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; if ($message) { - if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); - $actionmsg = dol_concatdesc($actionmsg, $message); + if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); + $actionmsg = dol_concatdesc($actionmsg, $message); } $actionmsg2=$langs->transnoentities("InterventionSentByEMail",$object->ref); } diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 396c9f96b01..e93b27ab6e9 100755 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -75,21 +75,21 @@ if (! is_object($conf)) dolibarr_install_syslog("upgrade2: conf file not initial * View */ -if (! $versionfrom && ! $versionto) -{ +if (! $versionfrom && ! $versionto) +{ print 'Error: Parameter versionfrom or versionto missing.'."\n"; print 'Upgrade must be ran from cmmand line with parameters or called from page install/index.php (like a first install) instead of page install/upgrade.php'."\n"; // Test if batch mode $sapi_type = php_sapi_name(); - $script_file = basename(__FILE__); + $script_file = basename(__FILE__); $path=dirname(__FILE__).'/'; if (substr($sapi_type, 0, 3) == 'cli') { print 'Syntax from command line: '.$script_file." x.y.z a.b.c\n"; - } - exit; -} - + } + exit; +} + pHeader('',"upgrade2",GETPOST('action'),'versionfrom='.$versionfrom.'&versionto='.$versionto); diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 3a02a78f9e8..09f0d507a39 100755 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -83,20 +83,20 @@ if (! is_object($conf)) dolibarr_install_syslog("upgrade2: conf file not initial * View */ -if (! $versionfrom && ! $versionto) -{ - print 'Error: Parameter versionfrom or versionto missing.'."\n"; - print 'Upgrade must be ran from cmmand line with parameters or called from page install/index.php (like a first install) instead of page install/upgrade.php'."\n"; - // Test if batch mode - $sapi_type = php_sapi_name(); - $script_file = basename(__FILE__); - $path=dirname(__FILE__).'/'; - if (substr($sapi_type, 0, 3) == 'cli') - { - print 'Syntax from command line: '.$script_file." x.y.z a.b.c\n"; - } - exit; -} +if (! $versionfrom && ! $versionto) +{ + print 'Error: Parameter versionfrom or versionto missing.'."\n"; + print 'Upgrade must be ran from cmmand line with parameters or called from page install/index.php (like a first install) instead of page install/upgrade.php'."\n"; + // Test if batch mode + $sapi_type = php_sapi_name(); + $script_file = basename(__FILE__); + $path=dirname(__FILE__).'/'; + if (substr($sapi_type, 0, 3) == 'cli') + { + print 'Syntax from command line: '.$script_file." x.y.z a.b.c\n"; + } + exit; +} pHeader('','etape5',GETPOST("action")?GETPOST("action"):'upgrade','versionfrom='.$versionfrom.'&versionto='.$versionto); diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index c1440d80245..b40b0f9fd4c 100644 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -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);