diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php
index 119f76b8ece..761e81b641c 100644
--- a/htdocs/comm/action/class/actioncomm.class.php
+++ b/htdocs/comm/action/class/actioncomm.class.php
@@ -277,6 +277,7 @@ class ActionComm extends CommonObject
$this->priority = $obj->priority;
$this->location = $obj->location;
+ $this->socid = $obj->fk_soc; // To have fetch_thirdparty method working
$this->societe->id = $obj->fk_soc;
$this->contact->id = $obj->fk_contact;
$this->fk_project = $obj->fk_project;
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 18aa95f5720..8634fffb47f 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -395,7 +395,7 @@ if ($_POST['action'] == 'addline' && $user->rights->commande->creer)
$prod->fetch($_POST['idprod']);
$tva_tx = get_default_tva($mysoc,$commande->client,$prod->tva_tx);
-
+
// multiprix
if ($conf->global->PRODUIT_MULTIPRICES && $commande->client->price_level)
{
@@ -437,11 +437,11 @@ if ($_POST['action'] == 'addline' && $user->rights->commande->creer)
$desc=$_POST['dp_desc'];
$type=$_POST["type"];
}
-
+
// Local Taxes
$localtax1_tx= get_localtax($tva_tx, 1, $commande->client);
$localtax2_tx= get_localtax($tva_tx, 2, $commande->client);
-
+
$desc=dol_htmlcleanlastbr($desc);
$info_bits=0;
@@ -1038,7 +1038,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer)
print '
';
// Reference
- print '| '.$langs->trans('Ref').' | '.$langs->trans("Draft").' |
';
+ print '| '.$langs->trans('Ref').' | '.$langs->trans("Draft").' |
';
// Reference client
print '| '.$langs->trans('RefCustomer').' | ';
@@ -1046,7 +1046,7 @@ if ($_GET['action'] == 'create' && $user->rights->commande->creer)
print ' |
';
// Client
- print '| '.$langs->trans('Customer').' | '.$soc->getNomUrl(1).' |
';
+ print '| '.$langs->trans('Customer').' | '.$soc->getNomUrl(1).' |
';
/*
* Contact de la commande
@@ -1601,6 +1601,7 @@ else
if ($_GET['action'] != 'classer') print ''.img_edit($langs->trans('SetProject')).' | ';
print '
';
print '';
+ //print "$commande->id, $commande->socid, $commande->fk_project";
if ($_GET['action'] == 'classer')
{
$html->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->fk_project, 'projectid');
diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php
index 31241c68302..6c7d4d2be64 100644
--- a/htdocs/compta/deplacement/class/deplacement.class.php
+++ b/htdocs/compta/deplacement/class/deplacement.class.php
@@ -305,7 +305,7 @@ class Deplacement extends CommonObject
$result='';
- $lien = '';
+ $lien = '';
$lienfin='';
$picto='trip';
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index d74b6bfa7f0..09a0c6bac49 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1802,6 +1802,7 @@ class Form
print '';
print '';
print '| ';
+ //print "$socid,$selected,$htmlname";
select_projects($socid,$selected,$htmlname);
print ' | ';
print ' | ';
diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php
index cdf5a63ea22..5a8050478f1 100644
--- a/htdocs/fourn/commande/fiche.php
+++ b/htdocs/fourn/commande/fiche.php
@@ -816,7 +816,6 @@ if ($id > 0 || ! empty($ref))
}
/*
* Confirmation de la desapprobation
- *
*/
if ($_GET['action'] == 'refuse')
{
@@ -907,12 +906,12 @@ if ($id > 0 || ! empty($ref))
}
}
- // Auteur
+ // Author
print ' | '.$langs->trans("AuthorRequest").' | ';
print ''.$author->getNomUrl(1).' | ';
print ' ';
- // Projet
+ // Project
if ($conf->projet->enabled)
{
$langs->load('projects');
@@ -923,6 +922,7 @@ if ($id > 0 || ! empty($ref))
if ($_GET['action'] != 'classer') print ''.img_edit($langs->trans('SetProject')).' | ';
print ' ';
print ' | ';
+ //print "$commande->id, $commande->socid, $commande->fk_project";
if ($_GET['action'] == 'classer')
{
$html->form_project($_SERVER['PHP_SELF'].'?id='.$commande->id, $commande->socid, $commande->fk_project, 'projectid');
diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php
index 960fa9935fe..d3422b90691 100644
--- a/htdocs/fourn/facture/fiche.php
+++ b/htdocs/fourn/facture/fiche.php
@@ -505,10 +505,10 @@ if ($_GET['action'] == 'create')
print '';
// Third party
- print '| '.$langs->trans('Company').' | ';
+ print ' | '.$langs->trans('Company').' | ';
print '';
- if ($_GET['socid'])
+ if ($_REQUEST['socid'] > 0)
{
print $societe->getNomUrl(1);
print '';
@@ -520,13 +520,15 @@ if ($_GET['action'] == 'create')
print ' | ';
print ''.$langs->trans('NotePublic').' | ';
- print '| '.$langs->trans('RefSupplier').' | | ';
+ // Ref supplier
+ print ' | '.$langs->trans('RefSupplier').' | | ';
print ' | ';
+ // Label
print '| '.$langs->trans('Label').' | | ';
// Date invoice
- print '| '.$langs->trans('DateInvoice').' | ';
+ print ' | | '.$langs->trans('DateInvoice').' | ';
$html->select_date($dateinvoice,'','','','',"add",1,1);
print ' | ';
@@ -598,7 +600,7 @@ else
print '';
- print '| '.$langs->trans('Company').' | ';
+ print ' | '.$langs->trans('Company').' | ';
print ''.$societe->getNomUrl(1).' | ';
print ''.$langs->trans('NotePublic').' | ';
print ' ';
@@ -612,14 +614,17 @@ else
print $fac->note;
print '';
- print '| '.$langs->trans('RefSupplier').' | ';
+ // Ref supplier
+ print ' | | '.$langs->trans('RefSupplier').' | ';
print ' | ';
print ' ';
+ // Label
print '| '.$langs->trans('Label').' | ';
print ' | ';
- print '| '.$langs->trans('DateInvoice').' | ';
+ // Date invoice
+ print ' | | '.$langs->trans('DateInvoice').' | ';
$html->select_date($fac->datep,'','','','',"update",1,1);
print ' | ';
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index bc5d49110f9..78058b02216 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -319,6 +319,7 @@ class Project extends CommonObject
if ($type == 'agenda') $sql = "SELECT id as rowid FROM ".MAIN_DB_PREFIX."actioncomm WHERE fk_project=".$this->id;
if (! $sql) return -1;
+ //print $sql;
dol_syslog("Project::get_element_list sql=".$sql);
$result=$this->db->query($sql);
if ($result)
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index 873b9672415..dbc54a9d50f 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2004-2009 Laurent Destailleur
+ * Copyright (C) 2004-2010 Laurent Destailleur
* Copyright (C) 2005-2010 Regis Houssin
*
* This program is free software; you can redistribute it and/or modify
@@ -118,7 +118,7 @@ print '';
/*
- * Factures
+ * Referers types
*/
$listofreferent=array(
@@ -180,8 +180,9 @@ foreach ($listofreferent as $key => $value)
print '';
print '';
- print '| '.$langs->trans("Ref").' | ';
- print ''.$langs->trans("Date").' | ';
+ print ''.$langs->trans("Ref").' | ';
+ print ''.$langs->trans("Date").' | ';
+ print ''.$langs->trans("ThirdParty").' | ';
if (empty($value['disableamount'])) print ''.$langs->trans("Amount").' | ';
print ''.$langs->trans("Status").' | ';
print ' ';
@@ -194,12 +195,14 @@ foreach ($listofreferent as $key => $value)
{
$element = new $classname($db);
$element->fetch($elementarray[$i]);
+ $element->fetch_client();
+ //print $classname;
$var=!$var;
print "";
// Ref
- print "| ";
+ print ' | ';
print $element->getNomUrl(1);
print " | \n";
@@ -207,9 +210,14 @@ foreach ($listofreferent as $key => $value)
$date=$element->date;
if (empty($date)) $date=$element->datep;
if (empty($date)) $date=$element->date_contrat;
- print ''.dol_print_date($date,'day').' | ';
+ print ''.dol_print_date($date,'day').' | ';
- // Amount
+ // Third party
+ print '';
+ if (is_object($element->client)) print $element->client->getNomUrl(1);
+ print ' | ';
+
+ // Amount
if (empty($value['disableamount'])) print ''.(isset($element->total_ht)?price($element->total_ht):' ').' | ';
// Status
@@ -220,7 +228,7 @@ foreach ($listofreferent as $key => $value)
$total = $total + $element->total_ht;
}
- print ' | '.$langs->trans("Number").': '.$i.' | ';
+ print ' | '.$langs->trans("Number").': '.$i.' | ';
if (empty($value['disableamount'])) print ''.$langs->trans("TotalHT").' : '.price($total).' | ';
print ' | ';
print ' ';
|