Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0

Conflicts:
	htdocs/comm/action/index.php
	htdocs/core/lib/functions.lib.php
This commit is contained in:
Laurent Destailleur 2018-07-24 19:22:00 +02:00
commit 20f178fdfe
4 changed files with 15 additions and 15 deletions

View File

@ -1260,7 +1260,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
$ymd=sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day); $ymd=sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day);
$colorindexused[$user->id] = 0; // Color index for current user (user->id) is always 0 $colorindexused[$user->id] = 0; // Color index for current user (user->id) is always 0
$nextindextouse=count($colorindexused); // At first run this is 0, so first user has 0, next 1, ... $nextindextouse=is_array($colorindexused)?count($colorindexused):0; // At first run this is 0, so fist user has 0, next 1, ...
//var_dump($colorindexused); //var_dump($colorindexused);
foreach ($eventarray as $daykey => $notused) foreach ($eventarray as $daykey => $notused)

View File

@ -3292,21 +3292,21 @@ class Form
if ($resql && $this->db->num_rows($resql) > 0) { if ($resql && $this->db->num_rows($resql) > 0) {
// Last seen cycle // Last seen cycle
$ref = 0; $ref = 0;
while ($res = $this->db->fetch_array($resql, MYSQL_NUM)) { while ($obj = $this->db->fetch_object($resql)){
//Same company ? //Same company ?
if ($socid == $res[5]) { if ($socid == $obj->fk_soc) {
//Same cycle ? //Same cycle ?
if ($res[2] != $ref) { if ($obj->situation_cycle_ref != $ref) {
// Just seen this cycle // Just seen this cycle
$ref = $res[2]; $ref = $obj->situation_cycle_ref;
//not final ? //not final ?
if ($res[4] != 1) { if ($obj->situation_final != 1) {
//Not prov? //Not prov?
if (substr($res[1], 1, 4) != 'PROV') { if (substr($obj->facnumber, 1, 4) != 'PROV') {
if ($selected == $res[0]) { if ($selected == $obj->situation_final) {
$opt .= '<option value="' . $res[0] . '" selected>' . $res[1] . '</option>'; $opt .= '<option value="' . $obj->rowid . '" selected>' . $obj->facnumber . '</option>';
} else { } else {
$opt .= '<option value="' . $res[0] . '">' . $res[1] . '</option>'; $opt .= '<option value="' . $obj->rowid . '">' . $obj->facnumber . '</option>';
} }
} }
} }

View File

@ -481,10 +481,10 @@ function GETPOST($paramname, $check='none', $method=0, $filter=null, $options=nu
elseif ($reg[1] == 'MONTH') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['mon']; } elseif ($reg[1] == 'MONTH') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['mon']; }
elseif ($reg[1] == 'YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['year']; } elseif ($reg[1] == 'YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['year']; }
elseif ($reg[1] == 'PREVIOUS_DAY') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_prev_day($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['day']; } elseif ($reg[1] == 'PREVIOUS_DAY') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_prev_day($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['day']; }
elseif ($reg[1] == 'PREVIOUS_MONTH') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_prev_month($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['month']; } elseif ($reg[1] == 'PREVIOUS_MONTH') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_prev_month($tmp['mon'], $tmp['year']); $newout = $tmp2['month']; }
elseif ($reg[1] == 'PREVIOUS_YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = ($tmp['year'] - 1); } elseif ($reg[1] == 'PREVIOUS_YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = ($tmp['year'] - 1); }
elseif ($reg[1] == 'NEXT_DAY') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['day']; } elseif ($reg[1] == 'NEXT_DAY') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['day']; }
elseif ($reg[1] == 'NEXT_MONTH') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_next_month($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['month']; } elseif ($reg[1] == 'NEXT_MONTH') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_next_month($tmp['mon'], $tmp['year']); $newout = $tmp2['month']; }
elseif ($reg[1] == 'NEXT_YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = ($tmp['year'] + 1); } elseif ($reg[1] == 'NEXT_YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = ($tmp['year'] + 1); }
elseif ($reg[1] == 'MYCOMPANY_COUNTRY_ID' || $reg[1] == 'MYCOUNTRY_ID' || $reg[1] == 'MYCOUNTRYID') elseif ($reg[1] == 'MYCOMPANY_COUNTRY_ID' || $reg[1] == 'MYCOUNTRY_ID' || $reg[1] == 'MYCOUNTRYID')
{ {
@ -5621,9 +5621,9 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob
$tmp=dol_getdate(dol_now(), true); $tmp=dol_getdate(dol_now(), true);
$tmp2=dol_get_prev_day($tmp['mday'], $tmp['mon'], $tmp['year']); $tmp2=dol_get_prev_day($tmp['mday'], $tmp['mon'], $tmp['year']);
$tmp3=dol_get_prev_month($tmp['mday'], $tmp['mon'], $tmp['year']); $tmp3=dol_get_prev_month($tmp['mon'], $tmp['year']);
$tmp4=dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']); $tmp4=dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']);
$tmp5=dol_get_next_month($tmp['mday'], $tmp['mon'], $tmp['year']); $tmp5=dol_get_next_month($tmp['mon'], $tmp['year']);
$substitutionarray=array_merge($substitutionarray, array( $substitutionarray=array_merge($substitutionarray, array(
'__DAY__' => (string) $tmp['mday'], '__DAY__' => (string) $tmp['mday'],

View File

@ -504,7 +504,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
if ($object->lines[$i]->remise_percent) if ($object->lines[$i]->remise_percent)
{ {
$remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails); $remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails);
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $remise_percent."%", 0, 'R'); $pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $remise_percent, 0, 'R');
} }
// Total HT line // Total HT line