diff --git a/ChangeLog b/ChangeLog index f345f367327..98f9dc3614a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,6 +38,7 @@ For users: - New: Can filter on social contribution type in list. - New: Upload of joined files need create/modify permissions to work. - New: For admin users, show the SQL request in export build. +- New: Can modify proposal date if status is draft. - Fix: Partial payment on social contributions not shown on main page. - Fix: Handle correctly the comment in status changing of supplier orders. - Fix: Author, title and topic are correctly encoded in PDF. diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index a212e133799..b8891938522 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -127,9 +127,7 @@ if ($_REQUEST['action'] == 'confirm_delete' && $_REQUEST['confirm'] == 'yes') } } -/* - * Supprime une ligne produit AVEC OU SANS confirmation - */ +// Remove line if (($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE) || ($_GET['action'] == 'deleteline' && !$conf->global->PRODUIT_CONFIRM_DELETE_LINE)) { @@ -151,7 +149,7 @@ if (($_REQUEST['action'] == 'confirm_deleteline' && $_REQUEST['confirm'] == 'yes exit; } -// Validation de la propale +// Validation if ($_REQUEST['action'] == 'confirm_validate' && $_REQUEST['confirm'] == 'yes' && $user->rights->propale->valider) { $propal = new Propal($db); @@ -175,6 +173,13 @@ if ($_REQUEST['action'] == 'confirm_validate' && $_REQUEST['confirm'] == 'yes' & } } +if ($_POST['action'] == 'setdate') +{ + $propal = new Propal($db); + $propal->fetch($_GET['propalid']); + $result=$propal->set_date($user,dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear'])); + if ($result < 0) dol_print_error($db,$propal->error); +} if ($_POST['action'] == 'setecheance') { $propal = new Propal($db); @@ -1007,9 +1012,34 @@ if ($id > 0 || ! empty($ref)) if (! $absolute_discount && ! $absolute_creditnote) print $langs->trans("CompanyHasNoAbsoluteDiscount").'.'; print ''; - // Dates - print '
| '; + print $langs->trans('Date'); + print ' | '; + if ($_GET['action'] != 'editdate' && $propal->brouillon) print 'id.'">'.img_edit($langs->trans('SetDate'),1).' | '; + print '