Add contracts in project referrers
This commit is contained in:
parent
c4575c4302
commit
1af616666d
@ -34,6 +34,9 @@ Time=Time
|
|||||||
ListProposalsAssociatedProject=Lists of the commercial proposals associated with the project
|
ListProposalsAssociatedProject=Lists of the commercial proposals associated with the project
|
||||||
ListOrdersAssociatedProject=Lists of the orders associated with the project
|
ListOrdersAssociatedProject=Lists of the orders associated with the project
|
||||||
ListInvoicesAssociatedProject=Lists of the invoices 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
|
ActivityOnProjectThisWeek=Activity on project this week
|
||||||
ActivityOnProjectThisMonth=Activity on project this month
|
ActivityOnProjectThisMonth=Activity on project this month
|
||||||
ActivityOnProjectThisYear=Activity on project this year
|
ActivityOnProjectThisYear=Activity on project this year
|
||||||
|
|||||||
@ -36,6 +36,7 @@ ListOrdersAssociatedProject=Liste des commandes associ
|
|||||||
ListInvoicesAssociatedProject=Liste des factures associées au projet
|
ListInvoicesAssociatedProject=Liste des factures associées au projet
|
||||||
ListSupplierOrdersAssociatedProject=Liste des commandes fournisseurs associées au projet
|
ListSupplierOrdersAssociatedProject=Liste des commandes fournisseurs associées au projet
|
||||||
ListSupplierInvoicesAssociatedProject=Liste des factures fournisseur associées au projet
|
ListSupplierInvoicesAssociatedProject=Liste des factures fournisseur associées au projet
|
||||||
|
ListContractAssociatedProject=Liste des contrats associés au projet
|
||||||
ActivityOnProjectThisWeek=Activité sur les projets cette semaine
|
ActivityOnProjectThisWeek=Activité sur les projets cette semaine
|
||||||
ActivityOnProjectThisMonth=Activité sur les projets ce mois
|
ActivityOnProjectThisMonth=Activité sur les projets ce mois
|
||||||
ActivityOnProjectThisYear=Activité sur les projets cette année
|
ActivityOnProjectThisYear=Activité sur les projets cette année
|
||||||
|
|||||||
@ -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 == '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 == '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 == '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;
|
if (! $sql) return -1;
|
||||||
|
|
||||||
dolibarr_syslog("Project::get_element_list sql=".$sql);
|
dolibarr_syslog("Project::get_element_list sql=".$sql);
|
||||||
|
|||||||
@ -27,10 +27,11 @@
|
|||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
|
if ($conf->facture->enabled) require_once(DOL_DOCUMENT_ROOT."/facture.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
|
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php");
|
if ($conf->fournisseur->enabled) require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.commande.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");
|
require_once(DOL_DOCUMENT_ROOT."/lib/project.lib.php");
|
||||||
|
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
@ -40,7 +41,7 @@ if ($conf->facture->enabled) $langs->load("bills");
|
|||||||
if ($conf->commande->enabled) $langs->load("orders");
|
if ($conf->commande->enabled) $langs->load("orders");
|
||||||
if ($conf->propal->enabled) $langs->load("propal");
|
if ($conf->propal->enabled) $langs->load("propal");
|
||||||
|
|
||||||
// S<EFBFBD>curit<EFBFBD> acc<63>s client
|
// Security check
|
||||||
$projetid='';
|
$projetid='';
|
||||||
if ($_GET["id"]) { $projetid=$_GET["id"]; }
|
if ($_GET["id"]) { $projetid=$_GET["id"]; }
|
||||||
|
|
||||||
@ -104,7 +105,12 @@ $listofreferent=array(
|
|||||||
'invoice_supplier'=>array(
|
'invoice_supplier'=>array(
|
||||||
'title'=>"ListSupplierInvoicesAssociatedProject",
|
'title'=>"ListSupplierInvoicesAssociatedProject",
|
||||||
'class'=>'FactureFournisseur',
|
'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)
|
foreach ($listofreferent as $key => $value)
|
||||||
@ -142,8 +148,9 @@ foreach ($listofreferent as $key => $value)
|
|||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
$date=$element->date;
|
$date=$element->date;
|
||||||
if (empty($date)) $date=$element->datep;
|
if (empty($date)) $date=$element->datep;
|
||||||
|
if (empty($date)) $date=$element->date_contrat;
|
||||||
print '<td>'.dolibarr_print_date($date,'day').'</td>';
|
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):' ').'</td>';
|
||||||
print '<td align="right">'.$element->getLibStatut(5).'</td>';
|
print '<td align="right">'.$element->getLibStatut(5).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -192,7 +199,7 @@ foreach ($listofreferent as $key => $value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Juste pour <EFBFBD>viter bug IE qui r<>organise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
// Juste pour eviter bug IE qui reorganise mal div pr<70>c<EFBFBD>dents si celui-ci absent
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user