Merge remote-tracking branch 'origin/3.9' into develop
Conflicts: htdocs/comm/propal.php
This commit is contained in:
commit
e7072185ab
@ -568,15 +568,6 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
// Reopen proposal
|
||||
else if ($action == 'confirm_reopen' && $user->rights->propal->cloturer && ! GETPOST('cancel'))
|
||||
{
|
||||
// prevent browser refresh from reopening proposal several times
|
||||
if ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED) {
|
||||
$object->reopen($user, 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Close proposal
|
||||
else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST('cancel'))
|
||||
{
|
||||
@ -597,17 +588,6 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
// Classify billed
|
||||
else if ($action == 'classifybilled' && $user->rights->propal->cloturer)
|
||||
{
|
||||
$result=$object->cloture($user, 4, '');
|
||||
if ($result < 0)
|
||||
{
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
// Reopen proposal
|
||||
else if ($action == 'confirm_reopen' && $user->rights->propal->cloturer && ! GETPOST('cancel'))
|
||||
{
|
||||
@ -623,20 +603,6 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
// Close proposal
|
||||
else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST('cancel'))
|
||||
{
|
||||
if (! GETPOST('statut')) {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors');
|
||||
$action = 'statut';
|
||||
} else {
|
||||
// prevent browser refresh from closing proposal several times
|
||||
if ($object->statut == Propal::STATUS_VALIDATED) {
|
||||
$object->cloture($user, GETPOST('statut'), GETPOST('note'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
|
||||
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2011 Dimitri Mouillard <dmouillard@teclib.com>
|
||||
* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -140,6 +141,7 @@ class ExpenseReport extends CommonObject
|
||||
$sql.= ",paid";
|
||||
$sql.= ",note_public";
|
||||
$sql.= ",note_private";
|
||||
$sql.= ",entity";
|
||||
$sql.= ") VALUES(";
|
||||
$sql.= "'(PROV)'";
|
||||
$sql.= ", ".$this->total_ht;
|
||||
@ -156,6 +158,7 @@ class ExpenseReport extends CommonObject
|
||||
$sql.= ", 0";
|
||||
$sql.= ", ".($this->note_public?"'".$this->db->escape($this->note_public)."'":"null");
|
||||
$sql.= ", ".($this->note_private?"'".$this->db->escape($this->note_private)."'":"null");
|
||||
$sql.= ", ".$conf->entity;
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG);
|
||||
|
||||
@ -381,6 +381,7 @@ if ($id > 0 || ! empty($ref))
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON l.fk_product=p.rowid";
|
||||
$sql.= " WHERE l.fk_commande = ".$commande->id;
|
||||
if(empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql.= " AND l.product_type = 0";
|
||||
$sql.= " GROUP BY p.ref, p.label, p.tobatch, l.rowid, l.fk_product, l.subprice, l.remise_percent"; // Calculation of amount dispatched is done per fk_product so we must group by fk_product
|
||||
$sql.= " ORDER BY p.ref, p.label";
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2012-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012-2016 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* 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
|
||||
@ -117,7 +118,7 @@ class Holiday extends CommonObject
|
||||
*/
|
||||
function create($user, $notrigger=0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $conf;
|
||||
$error=0;
|
||||
|
||||
$now=dol_now();
|
||||
@ -137,7 +138,8 @@ class Holiday extends CommonObject
|
||||
$sql.= "statut,";
|
||||
$sql.= "fk_validator,";
|
||||
$sql.= "fk_type,";
|
||||
$sql.= "fk_user_create";
|
||||
$sql.= "fk_user_create,";
|
||||
$sql.= "entity";
|
||||
$sql.= ") VALUES (";
|
||||
$sql.= "'".$this->fk_user."',";
|
||||
$sql.= " '".$this->db->idate($now)."',";
|
||||
@ -148,7 +150,8 @@ class Holiday extends CommonObject
|
||||
$sql.= " '1',";
|
||||
$sql.= " '".$this->fk_validator."',";
|
||||
$sql.= " '".$this->fk_type."',";
|
||||
$sql.= " ".$user->id;
|
||||
$sql.= " ".$user->id.",";
|
||||
$sql.= " ".$conf->entity;
|
||||
$sql.= ")";
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@ -236,7 +236,8 @@ if ($object->id)
|
||||
|
||||
if (! empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) // For backward compatiblity, we scan also old dirs
|
||||
{
|
||||
$filearray = dol_dir_list($upload_dirold, "files", 0, '', '\.meta$', 'name', SORT_ASC, 1);
|
||||
|
||||
$filearray = array_merge($filearray,dol_dir_list($upload_dirold, "files", 0, '', '\.meta$', 'name', SORT_ASC, 1));
|
||||
}
|
||||
|
||||
// For each file build select list with PDF extention
|
||||
|
||||
@ -64,6 +64,7 @@ $extrafields = new ExtraFields($db);
|
||||
// fetch optionals attributes and labels
|
||||
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
$hookmanager->initHooks(array('groupcard','globalcard'));
|
||||
|
||||
/**
|
||||
* Action remove group
|
||||
|
||||
Loading…
Reference in New Issue
Block a user