Skip to content
Snippets Groups Projects
Commit 1af61666 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Add contracts in project referrers

parent c4575c43
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,9 @@ Time=Time
ListProposalsAssociatedProject=Lists of the commercial proposals associated with the project
ListOrdersAssociatedProject=Lists of the orders associated with the project
ListInvoicesAssociatedProject=Lists of the invoices associated with the project
ListSupplierOrdersAssociatedProject=List of suppliers orders associated with the project
ListSupplierInvoicesAssociatedProject=List of suppliers invoices associated with the project
ListContractAssociatedProject=List of contracts associated with the project
ActivityOnProjectThisWeek=Activity on project this week
ActivityOnProjectThisMonth=Activity on project this month
ActivityOnProjectThisYear=Activity on project this year
......
......@@ -36,6 +36,7 @@ ListOrdersAssociatedProject=Liste des commandes associ
ListInvoicesAssociatedProject=Liste des factures associes au projet
ListSupplierOrdersAssociatedProject=Liste des commandes fournisseurs associes au projet
ListSupplierInvoicesAssociatedProject=Liste des factures fournisseur associes au projet
ListContractAssociatedProject=Liste des contrats associs au projet
ActivityOnProjectThisWeek=Activit sur les projets cette semaine
ActivityOnProjectThisMonth=Activit sur les projets ce mois
ActivityOnProjectThisYear=Activit sur les projets cette anne
......
......@@ -221,6 +221,7 @@ class Project extends CommonObject
if ($type == 'invoice') $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture WHERE fk_projet=".$this->id;
if ($type == 'order_supplier') $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande_fournisseur WHERE fk_projet=".$this->id;
if ($type == 'invoice_supplier') $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture_fourn WHERE fk_projet=".$this->id;
if ($type == 'contract') $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."contrat WHERE fk_projet=".$this->id;
if (! $sql) return -1;
dolibarr_syslog("Project::get_element_list sql=".$sql);
......
......@@ -27,10 +27,11 @@
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php");
require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.commande.class.php");
if ($conf->facture->enabled) require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
if ($conf->fournisseur->enabled) require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php");
if ($conf->fournisseur->enabled) require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.commande.class.php");
if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/project.lib.php");
$langs->load("projects");
......@@ -40,7 +41,7 @@ if ($conf->facture->enabled) $langs->load("bills");
if ($conf->commande->enabled) $langs->load("orders");
if ($conf->propal->enabled) $langs->load("propal");
// Scurit� acc�s client
// Security check
$projetid='';
if ($_GET["id"]) { $projetid=$_GET["id"]; }
......@@ -104,7 +105,12 @@ $listofreferent=array(
'invoice_supplier'=>array(
'title'=>"ListSupplierInvoicesAssociatedProject",
'class'=>'FactureFournisseur',
'test'=>$conf->fournisseur->enabled)
'test'=>$conf->fournisseur->enabled),
'contract'=>array(
'title'=>"ListContractAssociatedProject",
'class'=>'Contrat',
'test'=>$conf->contrat->enabled)
);
foreach ($listofreferent as $key => $value)
......@@ -142,8 +148,9 @@ foreach ($listofreferent as $key => $value)
print "</td>\n";
$date=$element->date;
if (empty($date)) $date=$element->datep;
if (empty($date)) $date=$element->date_contrat;
print '<td>'.dolibarr_print_date($date,'day').'</td>';
print '<td align="right">'.price($element->total_ht).'</td>';
print '<td align="right">'.(isset($element->total_ht)?price($element->total_ht):'&nbsp;').'</td>';
print '<td align="right">'.$element->getLibStatut(5).'</td>';
print '</tr>';
......@@ -192,7 +199,7 @@ foreach ($listofreferent as $key => $value)
}
}
// Juste pour viter bug IE qui rorganise mal div pr�c�dents si celui-ci absent
// Juste pour eviter bug IE qui reorganise mal div pr�c�dents si celui-ci absent
print '<div class="tabsAction">';
print '</div>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment