Skip to content

Commit

Permalink
Merge branch '7.0' of github.com:Dolibarr/dolibarr into 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ATM-Nicolas committed Jul 16, 2018
2 parents de8fd3d + e920523 commit 9d60b0a
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion htdocs/comm/propal/class/propal.class.php
Expand Up @@ -3939,7 +3939,7 @@ function insert($notrigger=0)
$sql.= " ".price2num($this->localtax2_tx).",";
$sql.= " '".$this->db->escape($this->localtax1_type)."',";
$sql.= " '".$this->db->escape($this->localtax2_type)."',";
$sql.= " ".($this->subprice?price2num($this->subprice):"null").",";
$sql.= " ".(price2num($this->subprice)!==''?price2num($this->subprice):"null").",";
$sql.= " ".price2num($this->remise_percent).",";
$sql.= " ".(isset($this->info_bits)?"'".$this->db->escape($this->info_bits)."'":"null").",";
$sql.= " ".price2num($this->total_ht).",";
Expand Down
12 changes: 6 additions & 6 deletions htdocs/commande/class/commande.class.php
Expand Up @@ -4065,7 +4065,7 @@ function insert($user=null, $notrigger=0)
$sql.= ' '.(! empty($this->fk_product)?$this->fk_product:"null").',';
$sql.= " '".$this->db->escape($this->product_type)."',";
$sql.= " '".price2num($this->remise_percent)."',";
$sql.= " ".($this->subprice!=''?"'".price2num($this->subprice)."'":"null").",";
$sql.= " ".(price2num($this->subprice)!==''?price2num($this->subprice):"null").",";
$sql.= " ".($this->price!=''?"'".price2num($this->price)."'":"null").",";
$sql.= " '".price2num($this->remise)."',";
$sql.= ' '.(! empty($this->fk_remise_except)?$this->fk_remise_except:"null").',';
Expand All @@ -4074,11 +4074,11 @@ function insert($user=null, $notrigger=0)
$sql.= ' '.(! empty($this->fk_fournprice)?$this->fk_fournprice:"null").',';
$sql.= ' '.price2num($this->pa_ht).',';
$sql.= " '".$this->db->escape($this->info_bits)."',";
$sql.= " '".price2num($this->total_ht)."',";
$sql.= " '".price2num($this->total_tva)."',";
$sql.= " '".price2num($this->total_localtax1)."',";
$sql.= " '".price2num($this->total_localtax2)."',";
$sql.= " '".price2num($this->total_ttc)."',";
$sql.= " ".price2num($this->total_ht).",";
$sql.= " ".price2num($this->total_tva).",";
$sql.= " ".price2num($this->total_localtax1).",";
$sql.= " ".price2num($this->total_localtax2).",";
$sql.= " ".price2num($this->total_ttc).",";
$sql.= " ".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null").',';
$sql.= " ".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null").',';
$sql.= ' '.(!$this->fk_unit ? 'NULL' : $this->fk_unit);
Expand Down
8 changes: 7 additions & 1 deletion htdocs/core/tpl/extrafields_list_print_fields.tpl.php
Expand Up @@ -58,10 +58,16 @@
if (in_array($extrafields->attribute_type[$key], array('date', 'datetime', 'timestamp')))
{
$value = $db->jdate($obj->$tmpkey);
if (is_array($obj->array_options) && isset($obj->array_options[$tmpkey])){
$value = $db->jdate($obj->array_options[$tmpkey]);
}
}
else
{
$value = $obj->$tmpkey;
if (is_array($obj->array_options) && isset($obj->array_options[$tmpkey])){
$value = $obj->array_options[$tmpkey];
}
}
print $extrafields->showOutputField($key, $value, '');
print '</td>';
Expand All @@ -74,4 +80,4 @@
}
}
}
}
}
13 changes: 7 additions & 6 deletions htdocs/resource/list.php
@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2013-2014 Jean-François Ferry <jfefe@aternatik.fr>
*
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
Expand Down Expand Up @@ -237,34 +238,34 @@

if ($ret)
{
foreach ($object->lines as $resource)
foreach ($object->lines as $obj)
{
print '<tr class="oddeven">';

if (! empty($arrayfields['t.ref']['checked']))
{
print '<td>';
print $resource->getNomUrl(5);
print $obj->getNomUrl(5);
print '</td>';
if (! $i) $totalarray['nbfield']++;
}

if (! empty($arrayfields['ty.label']['checked']))
{
print '<td>';
print $resource->type_label;
print $obj->type_label;
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';

print '<td align="center">';
print '<a href="./card.php?action=edit&id='.$resource->id.'">';
print '<a href="./card.php?action=edit&id='.$obj->id.'">';
print img_edit();
print '</a>';
print '&nbsp;';
print '<a href="./card.php?action=delete&id='.$resource->id.'">';
print '<a href="./card.php?action=delete&id='.$obj->id.'">';
print img_delete();
print '</a>';
print '</td>';
Expand Down
3 changes: 2 additions & 1 deletion htdocs/user/class/user.class.php
Expand Up @@ -804,7 +804,8 @@ function getrights($moduletag='')
else
{
if(empty($this->rights->$module->$perms)) $this->nb_rights++;
$this->rights->$module->$perms = 1;
// if we have already define a subperm like this $this->rights->$module->level1->level2 with llx_user_rights, we don't want override level1 because the level2 can be not define on user group
if (!is_object($this->rights->$module->$perms)) $this->rights->$module->$perms = 1;
}

}
Expand Down

0 comments on commit 9d60b0a

Please sign in to comment.