Fix: add date delivery planned

This commit is contained in:
Regis Houssin 2010-03-13 16:23:43 +00:00
parent ed19e89531
commit 8ce5c5b66e
3 changed files with 15 additions and 3 deletions

View File

@ -703,6 +703,11 @@ else
print '<tr><td>'.$langs->trans("Date").'</td>';
print '<td colspan="3">'.dol_print_date($expedition->date,"daytext")."</td>\n";
print '</tr>';
// Date delivery planned
print '<tr><td>'.$langs->trans("DateDeliveryPlanned").'</td>';
print '<td colspan="3">'.dol_print_date($expedition->date_delivery,'daytext')."</td>\n";
print '</tr>';
// Delivery address
if (($origin == 'commande' && $conf->global->COMMANDE_ADD_DELIVERY_ADDRESS)

View File

@ -271,11 +271,11 @@ if ($_GET["action"] == 'create')
* Lignes de commandes
*
*/
echo '<br><table class="noborder" width="100%">';
print '<br><table class="noborder" width="100%">';
$lignes = $commande->fetch_lines(1);
/* Lecture des livraisons deje effectuees */
// Lecture des livraisons deja effectuees
$commande->livraison_array();
$num = sizeof($commande->lignes);
@ -471,7 +471,12 @@ else
// Date
print '<tr><td>'.$langs->trans("Date").'</td>';
print '<td colspan="3">'.dol_print_date($delivery->date_creation,'dayhourtext')."</td>\n";
print '<td colspan="3">'.dol_print_date($delivery->date_creation,'daytext')."</td>\n";
print '</tr>';
// Date delivery planned
print '<tr><td>'.$langs->trans("DateDeliveryPlanned").'</td>';
print '<td colspan="3">'.dol_print_date($delivery->date_delivery,'daytext')."</td>\n";
print '</tr>';
// Statut

View File

@ -101,6 +101,7 @@ class Livraison extends CommonObject
$sql.= ", ref_customer";
$sql.= ", date_creation";
$sql.= ", fk_user_author";
$sql.= ", date_delivery";
$sql.= ", fk_adresse_livraison";
$sql.= ") VALUES (";
$sql.= "'(PROV)'";
@ -109,6 +110,7 @@ class Livraison extends CommonObject
$sql.= ", '".$this->ref_customer."'";
$sql.= ", ".$this->db->idate(mktime());
$sql.= ", ".$user->id;
$sql.= ", ".$this->db->idate($this->date_delivery);
$sql.= ", ".($this->fk_delivery_address > 0 ? $this->fk_delivery_address : "null");
$sql.= ")";