Merge remote-tracking branch 'origin/3.7' into develop
Conflicts: htdocs/compta/salaries/index.php htdocs/contact/class/contact.class.php htdocs/core/class/commonobject.class.php htdocs/core/lib/geturl.lib.php htdocs/core/lib/pdf.lib.php
This commit is contained in:
commit
c06abac49e
@ -191,17 +191,18 @@ if ($result)
|
||||
// Type
|
||||
print '<td>'.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.'</td>';
|
||||
// Amount
|
||||
print "<td align=\"right\">".price($obj->amount,0,$outputlangs,1,-1,-1,$conf->currency)."</td>";
|
||||
print "<td> </td>";
|
||||
print "<td align=\"right\">".price($obj->amount)."</td>";
|
||||
print "<td></td>";
|
||||
print "</tr>\n";
|
||||
|
||||
$total = $total + $obj->amount;
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
print '<tr class="liste_total"><td colspan="6" class="liste_total">'.$langs->trans("Total").'</td>';
|
||||
print '<td class="liste_total" align="right">'.price($total,0,$outputlangs,1,-1,-1,$conf->currency)."</td>";
|
||||
print "<td> </td></tr>";
|
||||
print "<td></td></tr>";
|
||||
|
||||
print "</table>";
|
||||
|
||||
|
||||
@ -516,9 +516,10 @@ class Contact extends CommonObject
|
||||
*/
|
||||
function fetch($id, $user=0, $ref_ext='')
|
||||
{
|
||||
dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR);
|
||||
global $langs;
|
||||
|
||||
dol_syslog(get_class($this)."::fetch id=".$id, LOG_DEBUG);
|
||||
|
||||
if (empty($id) && empty($ref_ext))
|
||||
{
|
||||
$this->error='BadParameter';
|
||||
@ -547,7 +548,6 @@ class Contact extends CommonObject
|
||||
if ($id) $sql.= " WHERE c.rowid = ". $id;
|
||||
elseif ($ref_ext) $sql .= " WHERE c.ref_ext = '".$this->db->escape($ref_ext)."'";
|
||||
|
||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
@ -2159,11 +2159,11 @@ abstract class CommonObject
|
||||
$sourcetype = (! empty($sourcetype) ? $sourcetype : $this->element);
|
||||
$targettype = (! empty($targettype) ? $targettype : $this->element);
|
||||
|
||||
if (empty($sourceid) && empty($targetid))
|
||||
/*if (empty($sourceid) && empty($targetid))
|
||||
{
|
||||
dol_syslog('Bad usage of function. No source nor target id defined (nor as parameter nor as object id)', LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
}*/
|
||||
|
||||
// Links between objects are stored in table element_element
|
||||
$sql = 'SELECT rowid, fk_source, sourcetype, fk_target, targettype';
|
||||
|
||||
@ -24,12 +24,12 @@
|
||||
/**
|
||||
* Function get content from an URL (use proxy if proxy defined)
|
||||
*
|
||||
* @param string $url URL to call.
|
||||
* @param string $postorget 'POST', 'GET', 'HEAD'
|
||||
* @param string $param Parameters of URL (x=value1&y=value2)
|
||||
* @param string $followlocation 1=Follow location, 0=Do not follow
|
||||
* @param array $addheaders Array of string to add into header. Example: array('Accept: application/xrds+xml', ....)
|
||||
* @return array Returns an associative array containing the response from the server array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...)
|
||||
* @param string $url URL to call.
|
||||
* @param string $postorget 'POST', 'GET', 'HEAD', 'PUT', 'PUTALREADYFORMATED', 'DELETE'
|
||||
* @param string $param Parameters of URL (x=value1&y=value2) or may be a formated content with PUTALREADYFORMATED
|
||||
* @param string $followlocation 1=Follow location, 0=Do not follow
|
||||
* @param array $addheaders Array of string to add into header. Example: ('Accept: application/xrds+xml', ....)
|
||||
* @return array Returns an associative array containing the response from the server array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...)
|
||||
*/
|
||||
function getURLContent($url,$postorget='GET',$param='',$followlocation=1,$addheaders=array())
|
||||
{
|
||||
@ -74,7 +74,18 @@ function getURLContent($url,$postorget='GET',$param='',$followlocation=1,$addhea
|
||||
else if ($postorget == 'PUT')
|
||||
{
|
||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // HTTP request is 'PUT'
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $param); // Setting param x=a&y=z as PUT fields
|
||||
if (! is_array($param)) parse_str($param, $array_param);
|
||||
else
|
||||
{
|
||||
dol_syslog("parameter param must be a string", LOG_WARNING);
|
||||
$array_param=$param;
|
||||
}
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($array_param)); // Setting param x=a&y=z as PUT fields
|
||||
}
|
||||
else if ($postorget == 'PUTALREADYFORMATED')
|
||||
{
|
||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // HTTP request is 'PUT'
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $param); // param = content of post, like a xml string
|
||||
}
|
||||
else if ($postorget == 'HEAD')
|
||||
{
|
||||
|
||||
@ -1707,7 +1707,7 @@ function pdf_getLinkedObjects($object,$outputlangs)
|
||||
foreach($objects as $elementobject)
|
||||
{
|
||||
$linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefOrder");
|
||||
$linkedobjects[$objecttype]['ref_value'] = $outputlangs->transnoentities($elementobject->ref) . ($elementobject->ref_client ? ' ('.$objects[$i]->ref_client.')' : '');
|
||||
$linkedobjects[$objecttype]['ref_value'] = $outputlangs->transnoentities($elementobject->ref) . ($elementobject->ref_client ? ' ('.$elementobject->ref_client.')' : '');
|
||||
$linkedobjects[$objecttype]['date_title'] = $outputlangs->transnoentities("OrderDate");
|
||||
$linkedobjects[$objecttype]['date_value'] = dol_print_date($elementobject->date,'day','',$outputlangs);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user