Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
767897595b
@ -1123,14 +1123,13 @@ class BookKeeping extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Load object in memory from the database
|
* Load object in memory from the database
|
||||||
*
|
*
|
||||||
* @param string $sortorder Sort Order
|
* @param string $sortorder Sort Order
|
||||||
* @param string $sortfield Sort field
|
* @param string $sortfield Sort field
|
||||||
* @param int $limit offset limit
|
* @param int $limit offset limit
|
||||||
* @param int $offset offset limit
|
* @param int $offset offset limit
|
||||||
* @param array $filter filter array
|
* @param array $filter filter array
|
||||||
* @param string $filtermode filter mode (AND or OR)
|
* @param string $filtermode filter mode (AND or OR)
|
||||||
*
|
* @return int <0 if KO, >0 if OK
|
||||||
* @return int <0 if KO, >0 if OK
|
|
||||||
*/
|
*/
|
||||||
public function fetchAllBalance($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND')
|
public function fetchAllBalance($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND')
|
||||||
{
|
{
|
||||||
@ -1151,7 +1150,7 @@ class BookKeeping extends CommonObject
|
|||||||
foreach ($filter as $key => $value) {
|
foreach ($filter as $key => $value) {
|
||||||
if ($key == 't.doc_date') {
|
if ($key == 't.doc_date') {
|
||||||
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
|
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
|
||||||
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
|
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=' || $key == 't.doc_date>' || $key == 't.doc_date<') {
|
||||||
$sqlwhere[] = $key."'".$this->db->idate($value)."'";
|
$sqlwhere[] = $key."'".$this->db->idate($value)."'";
|
||||||
} elseif ($key == 't.numero_compte>=' || $key == 't.numero_compte<=' || $key == 't.subledger_account>=' || $key == 't.subledger_account<=') {
|
} elseif ($key == 't.numero_compte>=' || $key == 't.numero_compte<=' || $key == 't.subledger_account>=' || $key == 't.subledger_account<=') {
|
||||||
$sqlwhere[] = $key."'".$this->db->escape($value)."'";
|
$sqlwhere[] = $key."'".$this->db->escape($value)."'";
|
||||||
|
|||||||
@ -267,12 +267,12 @@ if ($id > 0) {
|
|||||||
|
|
||||||
print '<tr class="oddeven '.$html_class.'">';
|
print '<tr class="oddeven '.$html_class.'">';
|
||||||
|
|
||||||
print "<td class=\"center\">";
|
$datedetail = dol_print_date($data['date'], 'dayhour');
|
||||||
if (!empty($data['fk_facture'])) {
|
if (!empty($data['fk_facture'])) {
|
||||||
print dol_print_date($data['date'], 'day');
|
$datedetail = dol_print_date($data['date'], 'day');
|
||||||
} elseif (!empty($data['fk_paiement'])) {
|
|
||||||
print dol_print_date($data['date'], 'dayhour');
|
|
||||||
}
|
}
|
||||||
|
print '<td class="center" title="'.dol_escape_htmltag($datedetail).'">';
|
||||||
|
print dol_print_date($data['date'], 'day');
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
print '<td>'.$data['link']."</td>\n";
|
print '<td>'.$data['link']."</td>\n";
|
||||||
|
|||||||
@ -854,11 +854,24 @@ class Project extends CommonObject
|
|||||||
$listoftables = array(
|
$listoftables = array(
|
||||||
'propal'=>'fk_projet', 'commande'=>'fk_projet', 'facture'=>'fk_projet',
|
'propal'=>'fk_projet', 'commande'=>'fk_projet', 'facture'=>'fk_projet',
|
||||||
'supplier_proposal'=>'fk_projet', 'commande_fournisseur'=>'fk_projet', 'facture_fourn'=>'fk_projet',
|
'supplier_proposal'=>'fk_projet', 'commande_fournisseur'=>'fk_projet', 'facture_fourn'=>'fk_projet',
|
||||||
'expensereport_det'=>'fk_projet', 'contrat'=>'fk_projet', 'fichinter'=>'fk_projet', 'don'=>'fk_projet',
|
'expensereport_det'=>'fk_projet', 'contrat'=>'fk_projet',
|
||||||
'actioncomm'=>'fk_project', 'mrp_mo'=>'fk_project', 'entrepot'=>'fk_project'
|
'fichinter'=>'fk_projet',
|
||||||
|
'don'=>array('field'=>'fk_projet', 'module'=>'don'),
|
||||||
|
'actioncomm'=>'fk_project',
|
||||||
|
'mrp_mo'=>'fk_project',
|
||||||
|
'entrepot'=>'fk_project'
|
||||||
);
|
);
|
||||||
foreach ($listoftables as $key => $value) {
|
foreach ($listoftables as $key => $value) {
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$key." SET ".$value." = NULL where ".$value." = ".((int) $this->id);
|
if (is_array($value)) {
|
||||||
|
if (!isModEnabled($value['module'])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$fieldname = $value['field'];
|
||||||
|
} else {
|
||||||
|
$fieldname = $value;
|
||||||
|
}
|
||||||
|
$sql = "UPDATE ".MAIN_DB_PREFIX.$key." SET ".$fieldname." = NULL where ".$fieldname." = ".((int) $this->id);
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$this->errors[] = $this->db->lasterror();
|
$this->errors[] = $this->db->lasterror();
|
||||||
|
|||||||
@ -215,14 +215,14 @@ if ($resql) {
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $grouptemp->getNomUrl(1);
|
print $grouptemp->getNomUrl(1);
|
||||||
if (!$obj->entity) {
|
if (isModEnabled('multicompany') && !$obj->entity) {
|
||||||
print img_picto($langs->trans("GlobalGroup"), 'redstar');
|
print img_picto($langs->trans("GlobalGroup"), 'redstar');
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
//multicompany
|
//multicompany
|
||||||
if (isModEnabled('multicompany') && is_object($mc) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1) {
|
if (isModEnabled('multicompany') && is_object($mc) && empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE) && $conf->entity == 1) {
|
||||||
$mc->getInfo($obj->entity);
|
$mc->getInfo($obj->entity);
|
||||||
print '<td class="center">'.$mc->label.'</td>';
|
print '<td class="center">'.dol_escape_htmltag($mc->label).'</td>';
|
||||||
}
|
}
|
||||||
print '<td class="center">'.$obj->nb.'</td>';
|
print '<td class="center">'.$obj->nb.'</td>';
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
|
|||||||
@ -3819,7 +3819,17 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties
|
|||||||
$pagestatus = $objectpage->status;
|
$pagestatus = $objectpage->status;
|
||||||
} else {
|
} else {
|
||||||
$type_container = 'page';
|
$type_container = 'page';
|
||||||
|
$pageurl = '';
|
||||||
|
$pagealiasalt = '';
|
||||||
|
$pagetitle = '';
|
||||||
|
$pagedescription = '';
|
||||||
|
$pageimage = '';
|
||||||
|
$pagekeywords = '';
|
||||||
|
$pagelang = '';
|
||||||
|
$pageallowedinframes = 0;
|
||||||
|
$pagehtmlheader = '';
|
||||||
$pagedatecreation = dol_now();
|
$pagedatecreation = dol_now();
|
||||||
|
$pagedatemodification = '';
|
||||||
$pageauthorid = $user->id;
|
$pageauthorid = $user->id;
|
||||||
$pageusermodifid = 0;
|
$pageusermodifid = 0;
|
||||||
$pageauthoralias = '';
|
$pageauthoralias = '';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user