diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index e2ddebd3050..b5487f074ff 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -1336,7 +1336,7 @@ else
{
if ($commande->statut > 0)
{
- print $langs->trans("CompanyHasAbsoluteDiscount",$absolute_discount,$langs->transnoentities("Currency".$conf->monnaie));
+ print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->monnaie));
}
else
{
@@ -1441,7 +1441,7 @@ else
print '
';
print '';
if ($_GET['action'] == 'editmode')
diff --git a/htdocs/commonobject.class.php b/htdocs/commonobject.class.php
index 8f97214cfab..7469857f555 100644
--- a/htdocs/commonobject.class.php
+++ b/htdocs/commonobject.class.php
@@ -398,6 +398,7 @@ class CommonObject
$address = new Societe($this->db);
$result=$address->fetch_adresse_livraison($deliveryaddressid);
$this->deliveryaddress = $address;
+ $this->adresse = $adresse;
return $result;
}
diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php
index 5ae94196edd..530626533aa 100644
--- a/htdocs/compta/commande/fiche.php
+++ b/htdocs/compta/commande/fiche.php
@@ -54,6 +54,14 @@ $result=restrictedArea($user,'commande',$comid,'');
* Actions
*/
+// Categorisation dans projet
+if ($_POST['action'] == 'classin')
+{
+ $commande = new Commande($db);
+ $commande->fetch($_GET['id']);
+ $commande->setProject($_POST['projetid']);
+}
+
if ($_GET["action"] == 'facturee')
{
$commande = new Commande($db);
@@ -316,7 +324,7 @@ if ($id > 0 || ! empty($ref))
print '';
print ' | ';
if ($_GET['action'] == 'classer')
diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php
index 3a4cd7167fe..74faa167050 100644
--- a/htdocs/expedition/commande.php
+++ b/htdocs/expedition/commande.php
@@ -58,6 +58,15 @@ $error = $user->load_entrepots();
/*
* Actions
*/
+
+// Categorisation dans projet
+if ($_POST['action'] == 'classin')
+{
+ $commande = new Commande($db);
+ $commande->fetch($_GET['id']);
+ $commande->setProject($_POST['projetid']);
+}
+
if ($_POST["action"] == 'confirm_cloture' && $_POST["confirm"] == 'yes')
{
$commande = new Commande($db);
@@ -306,7 +315,7 @@ if ($id > 0 || ! empty($ref))
$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->cond_reglement_id,'none');
}
print ' | ';
-
+
// Mode of payment
print '';
print '| ';
@@ -333,7 +342,7 @@ if ($id > 0 || ! empty($ref))
print '';
print ' | ';
if ($_GET['action'] == 'classer')
diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php
index 31cd37dcbbe..826a406bcf0 100644
--- a/htdocs/expedition/fiche.php
+++ b/htdocs/expedition/fiche.php
@@ -282,13 +282,13 @@ if ($_GET["action"] == 'create')
// Date
print " | | ".$langs->trans("Date")." | ";
print ''.dol_print_date($object->date,"day")." | \n";
-
+
// Delivery address
print '| '.$langs->trans('DeliveryAddress').' | ';
print '';
if (!empty($object->fk_delivery_address))
{
- $expedition->fetch_adresse_livraison($object->fk_delivery_address);
+ $object->fetch_adresse_livraison($object->fk_delivery_address);
print 'deliveryaddress->socid.'&id='.$expedition->deliveryaddress->id.'&action=edit&origin='.$origin.'&originid='.$origin_id.'>'.$expedition->deliveryaddress->label.'';
}
print ' | '."\n";
@@ -343,7 +343,7 @@ if ($_GET["action"] == 'create')
* Lignes de commandes
*
*/
- print '
';
+ print '
';
//$lignes = $object->fetch_lines(1);
$numAsked = sizeof($object->lignes);
@@ -647,7 +647,7 @@ else
print '| '.$langs->trans("Date").' | ';
print ''.dol_print_date($expedition->date,"daytext")." | \n";
print ' ';
-
+
// Delivery address
print '| '.$langs->trans('DeliveryAddress').' | ';
print '';
diff --git a/htdocs/livraison/livraison.class.php b/htdocs/livraison/livraison.class.php
index cf524c29b2f..355a831156d 100644
--- a/htdocs/livraison/livraison.class.php
+++ b/htdocs/livraison/livraison.class.php
@@ -627,19 +627,6 @@ class Livraison extends CommonObject
$this->$object->fetch($this->origin_id);
}
- /**
- *
- *
- */
-
- function fetch_adresse_livraison($id)
- {
- $idadresse = $id;
- $adresse = new Societe($this->db);
- $adresse->fetch_adresse_livraison($idadresse);
- $this->adresse = $adresse;
- }
-
/**
*
*
|
|