diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 942625ff01b..aa86de08317 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -40,8 +40,8 @@ $user->getrights('propale'); if (!$user->rights->propale->lire) accessforbidden(); -if ($conf->projet->enabled) require_once '../project.class.php'; -if ($conf->commande->enabled) require_once '../commande/commande.class.php'; +if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/project.class.php'); +if ($conf->commande->enabled) require_once('../commande/commande.class.php'); require_once('./propal_model_pdf.class.php'); require_once('../propal.class.php'); require_once('../actioncomm.class.php'); diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index fb5ad9ce077..8df3da018b8 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -41,9 +41,9 @@ $user->getrights('expedition'); if (!$user->rights->commande->lire) accessforbidden(); -require_once DOL_DOCUMENT_ROOT."/project.class.php"; -require_once DOL_DOCUMENT_ROOT."/propal.class.php"; -require_once DOL_DOCUMENT_ROOT."/commande/commande.class.php"; +require_once(DOL_DOCUMENT_ROOT."/project.class.php"); +require_once(DOL_DOCUMENT_ROOT."/propal.class.php"); +require_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); /* * Sécurité accés client diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index a912d27451c..e14162d824d 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -40,8 +40,8 @@ $user->getrights('facture'); if (! $user->rights->commande->lire) accessforbidden(); -require_once DOL_DOCUMENT_ROOT."/project.class.php"; -require_once DOL_DOCUMENT_ROOT."/propal.class.php"; +require_once(DOL_DOCUMENT_ROOT."/project.class.php"); +require_once(DOL_DOCUMENT_ROOT."/propal.class.php"); /* @@ -117,50 +117,50 @@ if ($_GET["id"] > 0) dolibarr_fiche_head($head, $hselected, $langs->trans("Order").": $commande->ref"); - /* - * Commande - */ - print ''; - print '"; - print ''; - print '"; - - print ""; - print ''; - print ''; - - print ''; - print "\n"; - $nbrow=6; - if ($conf->projet->enabled) $nbrow++; - print ''; - - print ''; - print "\n"; - print ''; - + /* + * Commande + */ + print '
'.$langs->trans("Ref")."'.$commande->ref.''.$langs->trans("Source").' : ' . $commande->sources[$commande->source] ; - if ($commande->source == 0) - { - /* Propale */ - $propal = new Propal($db); - $propal->fetch($commande->propale_id); - print ' -> '.$propal->ref.''; - } - print "
".$langs->trans("Customer")."'; - print ''.$soc->nom.'
'.$langs->trans("Status").'".$commande->statuts[$commande->statut]."'.$langs->trans("Note").' :
'; - if ($commande->brouillon == 1 && $user->rights->commande->creer) - { - print '
'; - print ''; - print '
'; - print '
'; - print '
'; - } - else - { - print nl2br($commande->note); - } - print '
'.$langs->trans("Date").'".dolibarr_print_date($commande->date,"%A %d %B %Y")."
'; + print '"; + print ''; + print '"; + + print ""; + print ''; + print ''; + + print ''; + print "\n"; + $nbrow=6; + if ($conf->projet->enabled) $nbrow++; + print ''; + + print ''; + print "\n"; + print ''; + // Projet if ($conf->projet->enabled) { @@ -181,11 +181,11 @@ if ($_GET["id"] > 0) $html->form_project($_SERVER["PHP_SELF"]."?id=$commande->id",$commande->fk_soc,$commande->projetid,"none"); } print ""; - } else { - print ''; - } + } else { + print ''; + } - // Lignes de 3 colonnes + // Lignes de 3 colonnes print ''; print ''; print ''; @@ -226,12 +226,12 @@ if ($_GET["id"] > 0) print ''; print "\n"; } - - $var=true; + + $var=true; while ($i < $num) { $objp = $db->fetch_object($result); - + $var=!$var; print ""; if ($objp->fk_product > 0) @@ -271,7 +271,7 @@ if ($_GET["id"] > 0) /* - * Boutons actions + * Boutons actions */ if (! $user->societe_id && ! $commande->facturee) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 409b6a1e33f..1a4b623cefd 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -44,10 +44,10 @@ $warning_delay=31*24*60*60; // Delai affichage warning retard (si retard paiemen require_once "../facture.class.php"; require_once "../paiement.class.php"; -if ($conf->projet->enabled) require_once "../project.class.php"; -if ($conf->propal->enabled) require_once "../propal.class.php"; -if ($conf->contrat->enabled) require_once "../contrat/contrat.class.php"; -if ($conf->commande->enabled) require_once "../commande/commande.class.php"; +if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/project.class.php"); +if ($conf->propal->enabled) require_once("../propal.class.php"); +if ($conf->contrat->enabled) require_once("../contrat/contrat.class.php"); +if ($conf->commande->enabled) require_once("../commande/commande.class.php"); require_once DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php"; diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 857cb6b7eba..809cf0d314d 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -30,8 +30,8 @@ require("./pre.inc.php"); -require("./facture-rec.class.php"); -require("../../project.class.php"); +require_once("./facture-rec.class.php"); +require_once(DOL_DOCUMENT_ROOT."/project.class.php"); $user->getrights('facture'); diff --git a/htdocs/compta/propal.php b/htdocs/compta/propal.php index 6f81cdcec0e..f0ae5355f90 100644 --- a/htdocs/compta/propal.php +++ b/htdocs/compta/propal.php @@ -34,8 +34,8 @@ $user->getrights('propale'); if (!$user->rights->propale->lire) accessforbidden(); -if ($conf->projet->enabled) require_once '../project.class.php'; -if ($conf->commande->enabled) require_once '../commande/commande.class.php'; +if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT.'/project.class.php'); +if ($conf->commande->enabled) require_once('../commande/commande.class.php'); require_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php"); require_once("../propal.class.php"); //require_once("../actioncomm.class.php"); diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 78caa2ab608..d2dd382cb70 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -29,8 +29,8 @@ */ require("./pre.inc.php"); -if ($conf->projet->enabled) require_once("../project.class.php"); -if ($conf->propal->enabled) require_once("../propal.class.php"); +if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/project.class.php"); +if ($conf->propal->enabled) require_once("../propal.class.php"); if ($conf->contrat->enabled) require_once (DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); $langs->load("contracts"); diff --git a/htdocs/contrat/ligne.php b/htdocs/contrat/ligne.php index 348ca7e1ad4..01edfa17a6f 100644 --- a/htdocs/contrat/ligne.php +++ b/htdocs/contrat/ligne.php @@ -28,8 +28,8 @@ */ require("./pre.inc.php"); -if ($conf->projet->enabled) require_once("../project.class.php"); -if ($conf->propal->enabled) require_once("../propal.class.php"); +if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/project.class.php"); +if ($conf->propal->enabled) require_once("../propal.class.php"); if ($conf->contrat->enabled) require_once (DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); $langs->load("contracts"); diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index ce415ab468f..cc57ce211b8 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -33,7 +33,7 @@ $user->getrights('expedition'); if (!$user->rights->commande->lire) accessforbidden(); -require("../project.class.php"); +require_once(DOL_DOCUMENT_ROOT."/project.class.php"); require("../propal.class.php"); require("../product/stock/entrepot.class.php"); diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 4d5b3c17162..5ff697054da 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -29,7 +29,7 @@ require("./pre.inc.php"); require("./fichinter.class.php"); -require("../project.class.php"); +require_once(DOL_DOCUMENT_ROOT."/project.class.php"); /* * Sécurité accés client diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 0cd77aa63bd..705091a0f7e 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -33,8 +33,8 @@ require("./pre.inc.php"); if (!$user->rights->fournisseur->commande->lire) accessforbidden(); -require_once DOL_DOCUMENT_ROOT."/project.class.php"; -require_once DOL_DOCUMENT_ROOT."/propal.class.php"; +require_once(DOL_DOCUMENT_ROOT."/project.class.php"); +require_once(DOL_DOCUMENT_ROOT."/propal.class.php"); /* * Sécurité accés client diff --git a/htdocs/projet/pre.inc.php b/htdocs/projet/pre.inc.php index 9a84b3afecf..48368be5bf8 100644 --- a/htdocs/projet/pre.inc.php +++ b/htdocs/projet/pre.inc.php @@ -29,7 +29,7 @@ */ require ("../main.inc.php"); -require(DOL_DOCUMENT_ROOT."/project.class.php"); +require_once(DOL_DOCUMENT_ROOT."/project.class.php"); $langs->load("projects"); $langs->load("companies"); diff --git a/htdocs/soc.php b/htdocs/soc.php index 2ef3c23f5f7..e63e2ae8dd7 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -654,7 +654,7 @@ else if ($conf->projet->enabled && $user->rights->projet->creer) { $langs->load("projects"); - print ''.$langs->trans("AddProject").''; + print ''.$langs->trans("AddProject").''; } if ($user->rights->societe->creer)
'.$langs->trans("Ref")."'.$commande->ref.''.$langs->trans("Source").' : ' . $commande->sources[$commande->source] ; + if ($commande->source == 0) + { + /* Propale */ + $propal = new Propal($db); + $propal->fetch($commande->propale_id); + print ' -> '.$propal->ref.''; + } + print "
".$langs->trans("Customer")."'; + print ''.$soc->nom.'
'.$langs->trans("Status").'".$commande->statuts[$commande->statut]."'.$langs->trans("Note").' :
'; + if ($commande->brouillon == 1 && $user->rights->commande->creer) + { + print '
'; + print ''; + print '
'; + print '
'; + print '
'; + } + else + { + print nl2br($commande->note); + } + print '
'.$langs->trans("Date").'".dolibarr_print_date($commande->date,"%A %d %B %Y")."
    
'.$langs->trans("AmountHT").''.price($commande->total_ht).''.$langs->trans("Currency".$conf->monnaie).'