Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3.8' into 3.9
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/contrat/list.php
	htdocs/fourn/ajax/getSupplierPrices.php
  • Loading branch information
eldy committed Jun 3, 2016
2 parents 609cc1d + b47db3e commit 085fa69
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion htdocs/commande/class/commandestats.class.php
Expand Up @@ -206,7 +206,7 @@ function getAllByProduct($year)

$sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg";
$sql.= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product";
//if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE ".$this->where;
$sql.= " AND c.rowid = tl.fk_commande AND tl.fk_product = product.rowid";
$sql.= " AND c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year,1,false))."' AND '".$this->db->idate(dol_get_last_day($year,12,false))."'";
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/facture.php
Expand Up @@ -1954,7 +1954,7 @@
$dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice); // Do not set 0 here (0 for a date is 1970)
}

$absolute_discount = $soc->getAvailableDiscounts();
if(!empty($soc->id)) $absolute_discount = $soc->getAvailableDiscounts();

if (! empty($conf->use_javascript_ajax))
{
Expand Down
2 changes: 1 addition & 1 deletion htdocs/contrat/list.php
Expand Up @@ -245,7 +245,7 @@
print '<input type="text" class="flat" size="3" name="search_contract" value="'.dol_escape_htmltag($search_contract).'">';
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" class="flat" size="6" name="search_ref_customer value="'.dol_escape_htmltag($search_ref_supplier).'">';
print '<input type="text" class="flat" size="6" name="search_ref_customer value="'.dol_escape_htmltag($search_ref_customer).'">';
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" class="flat" size="6" name="search_ref_supplier value="'.dol_escape_htmltag($search_ref_supplier).'">';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/modules/propale/doc/pdf_azur.modules.php
Expand Up @@ -710,7 +710,7 @@ function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hid
if (file_exists($infile) && is_readable($infile)) {
$pagecount = $pdf->setSourceFile($infile);
for($i = 1; $i <= $pagecount; $i ++) {
$tplIdx = $pdf->importPage(1);
$tplIdx = $pdf->importPage($i);
if ($tplIdx!==false) {
$s = $pdf->getTemplatesize($tplIdx);
$pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L');
Expand Down
8 changes: 5 additions & 3 deletions htdocs/fourn/ajax/getSupplierPrices.php
Expand Up @@ -89,9 +89,11 @@
}
}

// Add price for pmp
$price=$producttmp->pmp;
$prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency)); // For price field, we must use price2num(), for label or title, price()
if(!empty($conf->stock->enabled)) {
// Add price for pmp
$price=$producttmp->pmp;
$prices[] = array("id" => 'pmpprice', "price" => price2num($price), "label" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency), "title" => $langs->trans("PMPValueShort").': '.price($price,0,$langs,0,0,-1,$conf->currency)); // For price field, we must use price2num(), for label or title, price()
}
}

echo json_encode($prices);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/projet/tasks/time.php
Expand Up @@ -359,7 +359,7 @@
/*
* Form to add time spent
*/
if ($user->rights->projet->creer)
if ($user->rights->projet->lire)
{
print '<br>';

Expand Down
2 changes: 1 addition & 1 deletion htdocs/societe/soc.php
Expand Up @@ -1864,7 +1864,7 @@
/*
* View
*/
$res=$object->fetch_optionals($object->id,$extralabels);
if (!empty($object->id)) $res=$object->fetch_optionals($object->id,$extralabels);
//if ($res < 0) { dol_print_error($db); exit; }


Expand Down

0 comments on commit 085fa69

Please sign in to comment.