| '.$langs->trans("DateDelivery").' | ';
print '';
- $form->select_date('','liv_');
+ $form->select_date('','liv_','','','',"addprop");
print ' |
';
- }
- else
- {
- print "| '.$langs->trans('PaymentConditions').' | ';
$form->select_conditions_paiements($soc->cond_reglement,'cond_reglement_id');
diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index c329b7778d9..4d9723f3ee0 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -107,6 +107,14 @@ if ($_POST['action'] == 'setecheance')
$result=$propal->set_echeance($user,mktime(12, 1, 1, $_POST['echmonth'], $_POST['echday'], $_POST['echyear']));
if ($result < 0) dolibarr_print_error($db,$propal->error);
}
+if ($_POST['action'] == 'setdate_livraison')
+{
+ $propal = new Propal($db);
+ $propal->fetch($_GET['propalid']);
+ $result=$propal->set_date_livraison($user,mktime(12, 1, 1, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year']));
+ if ($result < 0) dolibarr_print_error($db,$propal->error);
+}
+
if ($_POST['action'] == 'add')
{
@@ -531,9 +539,9 @@ if ($_GET['propalid'] > 0)
print ' | ';
if ($propal->brouillon && $_GET['action'] == 'editecheance')
{
- print '';
}
@@ -560,14 +568,18 @@ if ($_GET['propalid'] > 0)
print ' | ';
if ($_GET['action'] != 'editdate_livraison' && $propal->brouillon) print 'id.'">'.img_edit($langs->trans('SetDateLivraison'),1).' | ';
print '