FIX #13382 Note will be concat to private note
This commit is contained in:
parent
25b62646b6
commit
56d6c4691f
@ -117,6 +117,9 @@ if (!empty($conf->expedition->enabled) && $conf->global->WAREHOUSE_ASK_WAREHOUSE
|
|||||||
if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $object->warehouse_id = $user->fk_warehouse;
|
if (empty($object->warehouse_id) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $object->warehouse_id = $user->fk_warehouse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$error = 0;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1223,7 +1223,12 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
{
|
{
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur SET fk_statut = ".self::STATUS_ORDERSENT.", fk_input_method=".$methode.", date_commande='".$this->db->idate($date)."'";
|
$newnoteprivate = $this->note_private;
|
||||||
|
if ($comment) $newnoteprivate = dol_concatdesc($newnoteprivate, $langs->trans("Comment").': '.$comment);
|
||||||
|
|
||||||
|
$sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur";
|
||||||
|
$sql .= " SET fk_statut=".self::STATUS_ORDERSENT.", fk_input_method=".$methode.", date_commande='".$this->db->idate($date)."', ";
|
||||||
|
$sql .= " note_private='".$this->db->escape($newnoteprivate)."'";
|
||||||
$sql .= " WHERE rowid=".$this->id;
|
$sql .= " WHERE rowid=".$this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::commande", LOG_DEBUG);
|
dol_syslog(get_class($this)."::commande", LOG_DEBUG);
|
||||||
@ -1232,6 +1237,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$this->statut = self::STATUS_ORDERSENT;
|
$this->statut = self::STATUS_ORDERSENT;
|
||||||
$this->methode_commande_id = $methode;
|
$this->methode_commande_id = $methode;
|
||||||
$this->date_commande = $date;
|
$this->date_commande = $date;
|
||||||
|
$this->context = array('comments' => $comment);
|
||||||
|
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$result = $this->call_trigger('ORDER_SUPPLIER_SUBMIT', $user);
|
$result = $this->call_trigger('ORDER_SUPPLIER_SUBMIT', $user);
|
||||||
|
|||||||
@ -62,7 +62,6 @@ $id = GETPOST('id', 'int');
|
|||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$comclientid = GETPOST('comid', 'int');
|
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
$projectid = GETPOST('projectid', 'int');
|
$projectid = GETPOST('projectid', 'int');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
@ -917,7 +916,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
// Force mandatory order method
|
// Force mandatory order method
|
||||||
if ($action == 'commande') {
|
if ($action == 'commande') {
|
||||||
$methodecommande = GETPOST('methodecommande');
|
$methodecommande = GETPOST('methodecommande', 'int');
|
||||||
|
|
||||||
if ($methodecommande <= 0) {
|
if ($methodecommande <= 0) {
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("OrderMode")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("OrderMode")), null, 'errors');
|
||||||
@ -927,7 +926,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
if ($action == 'confirm_commande' && $confirm == 'yes' && $user->rights->fournisseur->commande->commander)
|
if ($action == 'confirm_commande' && $confirm == 'yes' && $user->rights->fournisseur->commande->commander)
|
||||||
{
|
{
|
||||||
$result = $object->commande($user, $_REQUEST["datecommande"], $_REQUEST["methode"], $_REQUEST['comment']);
|
$result = $object->commande($user, GETPOST("datecommande"), GETPOST("methode", 'int'), GETPOST('comment', 'alphanohtml'));
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user