Add navigation bar on supplier orders
This commit is contained in:
parent
4606095b1e
commit
23eb5d2c2d
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
@ -93,14 +93,18 @@ llxHeader('',$langs->trans("OrderCard"),"CommandeFournisseur");
|
|||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
|
||||||
|
$now=gmmktime();
|
||||||
|
|
||||||
$id = $_GET['id'];
|
$id = $_GET['id'];
|
||||||
if ($id > 0)
|
$ref= $_GET['ref'];
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
//if ($mesg) print $mesg.'<br>';
|
//if ($mesg) print $mesg.'<br>';
|
||||||
|
|
||||||
$commande = new CommandeFournisseur($db);
|
$commande = new CommandeFournisseur($db);
|
||||||
if ( $commande->fetch($_GET['id']) >= 0)
|
|
||||||
|
$result=$commande->fetch($_GET['id'],$_GET['ref']);
|
||||||
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($commande->socid);
|
$soc->fetch($commande->socid);
|
||||||
@ -118,47 +122,47 @@ if ($id > 0)
|
|||||||
* Commande
|
* Commande
|
||||||
*/
|
*/
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td colspan="5">'.$commande->ref.'</td>';
|
print '<td colspan="2">';
|
||||||
|
print $html->showrefnav($commande,'ref','',1,'ref','ref');
|
||||||
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Fournisseur
|
// Fournisseur
|
||||||
print '<tr><td width="20%">'.$langs->trans("Supplier")."</td>";
|
print '<tr><td>'.$langs->trans("Supplier")."</td>";
|
||||||
print '<td colspan="5">';
|
print '<td colspan="2">'.$soc->getNomUrl(1,'supplier').'</td>';
|
||||||
print '<b><a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$soc->id.'">';
|
|
||||||
print img_object($langs->trans("ShowSupplier"),'company').' '.$soc->nom.'</a></b></td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("Status").'</td>';
|
print '<td>'.$langs->trans("Status").'</td>';
|
||||||
print '<td width="50%" colspan="5">';
|
print '<td colspan="2">';
|
||||||
print $commande->getLibStatut(4);
|
print $commande->getLibStatut(4);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
|
// Date
|
||||||
if ($commande->methode_commande_id > 0)
|
if ($commande->methode_commande_id > 0)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Date").'</td><td colspan="2">';
|
print '<tr><td>'.$langs->trans("Date").'</td><td colspan="2">';
|
||||||
|
|
||||||
if ($commande->date_commande)
|
if ($commande->date_commande)
|
||||||
{
|
{
|
||||||
print dolibarr_print_date($commande->date_commande,"dayhourtext")."\n";
|
print dolibarr_print_date($commande->date_commande,"dayhourtext")."\n";
|
||||||
}
|
}
|
||||||
|
print "</td></tr>";
|
||||||
|
|
||||||
print '</td><td width="50%" colspan="3">';
|
|
||||||
if ($commande->methode_commande)
|
if ($commande->methode_commande)
|
||||||
{
|
{
|
||||||
print $langs->trans("Method")." : " .$commande->methode_commande;
|
print '<tr><td>'.$langs->trans("Method").'</td><td colspan="2">'.$commande->methode_commande.'</td></tr>';
|
||||||
}
|
}
|
||||||
print "</td></tr>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auteur
|
// Auteur
|
||||||
print '<tr><td>'.$langs->trans("AuthorRequest").'</td>';
|
print '<tr><td>'.$langs->trans("AuthorRequest").'</td>';
|
||||||
print '<td colspan="2">'.$author->getNomUrl(1).'</td>';
|
print '<td colspan="2">'.$author->getNomUrl(1).'</td>';
|
||||||
print '<td colspan="3" width="50%">';
|
print '</tr>';
|
||||||
print " </td></tr>";
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
if ($mesg) print $mesg;
|
if ($mesg) print $mesg;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
|
||||||
* Copyright (C) 2005 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
@ -71,12 +71,14 @@ $pagenext = $page + 1;
|
|||||||
|
|
||||||
|
|
||||||
$commande = new CommandeFournisseur($db);
|
$commande = new CommandeFournisseur($db);
|
||||||
if ($commande->fetch($id) < 0)
|
if ($commande->fetch($_GET['id'],$_GET['ref']) < 0)
|
||||||
{
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -114,16 +116,25 @@ if ($action=='delete')
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Affichage
|
* View
|
||||||
*/
|
*/
|
||||||
if ($id > 0)
|
|
||||||
|
$html = new Form($db);
|
||||||
|
|
||||||
|
$id = $_GET['id'];
|
||||||
|
$ref= $_GET['ref'];
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$upload_dir = $conf->fournisseur->commande->dir_output.'/'.sanitizeFileName($commande->ref);
|
$upload_dir = $conf->fournisseur->commande->dir_output.'/'.sanitizeFileName($commande->ref);
|
||||||
|
|
||||||
$societe = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$societe->fetch($commande->socid);
|
$soc->fetch($commande->socid);
|
||||||
|
|
||||||
|
$author = new User($db);
|
||||||
|
$author->id = $commande->user_author_id;
|
||||||
|
$author->fetch();
|
||||||
|
|
||||||
$head = ordersupplier_prepare_head($commande);
|
$head = ordersupplier_prepare_head($commande);
|
||||||
|
|
||||||
@ -142,20 +153,49 @@ if ($id > 0)
|
|||||||
print '<table class="border"width="100%">';
|
print '<table class="border"width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">'.$commande->ref.'</td></tr>';
|
print '<tr><td width="35%">'.$langs->trans("Ref").'</td>';
|
||||||
|
print '<td colspan="2">';
|
||||||
|
print $html->showrefnav($commande,'ref','',1,'ref','ref');
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('Supplier').'</td><td colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
|
// Fournisseur
|
||||||
|
print '<tr><td>'.$langs->trans("Supplier")."</td>";
|
||||||
|
print '<td colspan="2">'.$soc->getNomUrl(1,'supplier').'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("Status").'</td>';
|
print '<td>'.$langs->trans("Status").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="2">';
|
||||||
print $commande->getLibStatut(4);
|
print $commande->getLibStatut(4);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
|
// Date
|
||||||
|
if ($commande->methode_commande_id > 0)
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Date").'</td><td colspan="2">';
|
||||||
|
if ($commande->date_commande)
|
||||||
|
{
|
||||||
|
print dolibarr_print_date($commande->date_commande,"dayhourtext")."\n";
|
||||||
|
}
|
||||||
|
print "</td></tr>";
|
||||||
|
|
||||||
|
if ($commande->methode_commande)
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Method").'</td><td colspan="2">'.$commande->methode_commande.'</td></tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auteur
|
||||||
|
print '<tr><td>'.$langs->trans("AuthorRequest").'</td>';
|
||||||
|
print '<td colspan="2">'.$author->getNomUrl(1).'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.sizeof($filearray).'</td></tr>';
|
print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.sizeof($filearray).'</td></tr>';
|
||||||
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>';
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
print "</div>\n";
|
print "</div>\n";
|
||||||
|
|
||||||
if ($mesg) { print $mesg."<br>"; }
|
if ($mesg) { print $mesg."<br>"; }
|
||||||
|
|||||||
@ -595,14 +595,14 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Fournisseur
|
// Fournisseur
|
||||||
print '<tr><td width="20%">'.$langs->trans("Supplier")."</td>";
|
print '<tr><td>'.$langs->trans("Supplier")."</td>";
|
||||||
print '<td colspan="2">'.$soc->getNomUrl(1,'supplier').'</td>';
|
print '<td colspan="2">'.$soc->getNomUrl(1,'supplier').'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("Status").'</td>';
|
print '<td>'.$langs->trans("Status").'</td>';
|
||||||
print '<td width="50%" colspan="2">';
|
print '<td colspan="2">';
|
||||||
print $commande->getLibStatut(4);
|
print $commande->getLibStatut(4);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -36,18 +36,23 @@ $langs->load('stocks');
|
|||||||
if (!$user->rights->fournisseur->commande->lire) accessforbidden();
|
if (!$user->rights->fournisseur->commande->lire) accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
/* *************************************************************************** */
|
/*
|
||||||
/* */
|
* View
|
||||||
/* Mode vue */
|
*/
|
||||||
/* */
|
|
||||||
/* *************************************************************************** */
|
|
||||||
|
|
||||||
if ($_GET["id"] > 0)
|
$html = new Form($db);
|
||||||
|
|
||||||
|
$now=gmmktime();
|
||||||
|
|
||||||
|
$id = $_GET['id'];
|
||||||
|
$ref= $_GET['ref'];
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$commande = new CommandeFournisseur($db);
|
$commande = new CommandeFournisseur($db);
|
||||||
|
|
||||||
if ( $commande->fetch($_GET["id"]) >= 0)
|
$result=$commande->fetch($_GET["id"],$_GET['ref']);
|
||||||
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
$soc->fetch($commande->socid);
|
$soc->fetch($commande->socid);
|
||||||
|
|
||||||
@ -55,10 +60,7 @@ if ($_GET["id"] > 0)
|
|||||||
$author->id = $commande->user_author_id;
|
$author->id = $commande->user_author_id;
|
||||||
$author->fetch();
|
$author->fetch();
|
||||||
|
|
||||||
$addons[0][0] = DOL_URL_ROOT.'/fourn/fiche.php?socid='.$soc->id;
|
llxHeader('',$langs->trans("History"),"CommandeFournisseur");
|
||||||
$addons[0][1] = $soc->nom;
|
|
||||||
|
|
||||||
llxHeader('',$langs->trans("History"),"CommandeFournisseur",$addons);
|
|
||||||
|
|
||||||
$head = ordersupplier_prepare_head($commande);
|
$head = ordersupplier_prepare_head($commande);
|
||||||
|
|
||||||
@ -74,26 +76,43 @@ if ($_GET["id"] > 0)
|
|||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td colspan="3">'.$commande->ref.'</td>';
|
print '<td colspan="2">';
|
||||||
|
print $html->showrefnav($commande,'ref','',1,'ref','ref');
|
||||||
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Fournisseur
|
// Fournisseur
|
||||||
print '<tr><td width="20%">'.$langs->trans("Supplier")."</td>";
|
print '<tr><td>'.$langs->trans("Supplier")."</td>";
|
||||||
print '<td colspan="3">';
|
print '<td colspan="2">'.$soc->getNomUrl(1,'supplier').'</td>';
|
||||||
print '<b><a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$soc->id.'">'.img_object($langs->trans("ShowSupplier"),'company').' '.$soc->nom.'</a></b></td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td><td colspan="3">';
|
// Statut
|
||||||
|
print '<tr>';
|
||||||
|
print '<td>'.$langs->trans("Status").'</td>';
|
||||||
|
print '<td colspan="2">';
|
||||||
print $commande->getLibStatut(4);
|
print $commande->getLibStatut(4);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
|
// Date
|
||||||
if ($commande->methode_commande_id > 0)
|
if ($commande->methode_commande_id > 0)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Date").'</td>';
|
print '<tr><td>'.$langs->trans("Date").'</td><td colspan="2">';
|
||||||
print '<td colspan="2">'.dolibarr_print_date($commande->date_commande,"dayhourtext")."</td>\n";
|
if ($commande->date_commande)
|
||||||
print '<td width="50%"> ';
|
{
|
||||||
print "</td></tr>";
|
print dolibarr_print_date($commande->date_commande,"dayhourtext")."\n";
|
||||||
}
|
}
|
||||||
|
print "</td></tr>";
|
||||||
|
|
||||||
|
if ($commande->methode_commande)
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Method").'</td><td colspan="2">'.$commande->methode_commande.'</td></tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Auteur
|
||||||
|
print '<tr><td>'.$langs->trans("AuthorRequest").'</td>';
|
||||||
|
print '<td colspan="2">'.$author->getNomUrl(1).'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
print "<br>";
|
print "<br>";
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -53,6 +53,9 @@ if ($_POST["action"] == 'updatenote' && $user->rights->fournisseur->commande->cr
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
llxHeader('',$langs->trans("OrderCard"),"CommandeFournisseur");
|
llxHeader('',$langs->trans("OrderCard"),"CommandeFournisseur");
|
||||||
|
|
||||||
@ -64,10 +67,15 @@ $html = new Form($db);
|
|||||||
/* */
|
/* */
|
||||||
/* *************************************************************************** */
|
/* *************************************************************************** */
|
||||||
|
|
||||||
if ($_GET["id"] > 0)
|
$now=gmmktime();
|
||||||
|
|
||||||
|
$id = $_GET['id'];
|
||||||
|
$ref= $_GET['ref'];
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$commande = new CommandeFournisseur($db);
|
$commande = new CommandeFournisseur($db);
|
||||||
if ( $commande->fetch($_GET["id"]) >= 0)
|
$result=$commande->fetch($_GET["id"],$_GET['ref']);
|
||||||
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($commande->socid);
|
$soc->fetch($commande->socid);
|
||||||
@ -92,41 +100,46 @@ if ($_GET["id"] > 0)
|
|||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td colspan="3">'.$commande->ref.'</td>';
|
print '<td colspan="2">';
|
||||||
|
print $html->showrefnav($commande,'ref','',1,'ref','ref');
|
||||||
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Fournisseur
|
// Fournisseur
|
||||||
print '<tr><td width="20%">'.$langs->trans("Supplier").'</td>';
|
print '<tr><td>'.$langs->trans("Supplier")."</td>";
|
||||||
print '<td colspan="3">';
|
print '<td colspan="2">'.$soc->getNomUrl(1,'supplier').'</td>';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$soc->id.'">'.img_object($langs->trans("ShowSupplier"),'company').' '.$soc->nom.'</a></td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Statut
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans("Status").'</td>';
|
print '<td>'.$langs->trans("Status").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="2">';
|
||||||
print $commande->getLibStatut(4);
|
print $commande->getLibStatut(4);
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
|
// Date
|
||||||
if ($commande->methode_commande_id > 0)
|
if ($commande->methode_commande_id > 0)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Date").'</td>';
|
print '<tr><td>'.$langs->trans("Date").'</td><td colspan="2">';
|
||||||
print '<td colspan="2">';
|
|
||||||
|
|
||||||
if ($commande->date_commande)
|
if ($commande->date_commande)
|
||||||
{
|
{
|
||||||
print dolibarr_print_date($commande->date_commande,'dayhourtext')."\n";
|
print dolibarr_print_date($commande->date_commande,"dayhourtext")."\n";
|
||||||
}
|
|
||||||
|
|
||||||
print ' </td><td width="50%">';
|
|
||||||
if ($commande->methode_commande)
|
|
||||||
{
|
|
||||||
print "Méthode : " .$commande->methode_commande;
|
|
||||||
}
|
}
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
|
if ($commande->methode_commande)
|
||||||
|
{
|
||||||
|
print '<tr><td>'.$langs->trans("Method").'</td><td colspan="2">'.$commande->methode_commande.'</td></tr>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Auteur
|
||||||
|
print '<tr><td>'.$langs->trans("AuthorRequest").'</td>';
|
||||||
|
print '<td colspan="2">'.$author->getNomUrl(1).'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("NotePublic").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="2">';
|
||||||
if ($user->rights->fournisseur->commande->creer) print '<textarea cols="90" rows="'.ROWS_4.'" name="note_public">';
|
if ($user->rights->fournisseur->commande->creer) print '<textarea cols="90" rows="'.ROWS_4.'" name="note_public">';
|
||||||
print nl2br($commande->note_public);
|
print nl2br($commande->note_public);
|
||||||
if ($user->rights->fournisseur->commande->creer) print '</textarea>';
|
if ($user->rights->fournisseur->commande->creer) print '</textarea>';
|
||||||
@ -135,7 +148,7 @@ if ($_GET["id"] > 0)
|
|||||||
if (! $user->societe_id)
|
if (! $user->societe_id)
|
||||||
{
|
{
|
||||||
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("NotePrivate").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="2">';
|
||||||
if ($user->rights->fournisseur->commande->creer) print '<textarea cols="90" rows="'.ROWS_6.'" name="note">';
|
if ($user->rights->fournisseur->commande->creer) print '<textarea cols="90" rows="'.ROWS_6.'" name="note">';
|
||||||
print nl2br($commande->note);
|
print nl2br($commande->note);
|
||||||
if ($user->rights->fournisseur->commande->creer) print '</textarea>';
|
if ($user->rights->fournisseur->commande->creer) print '</textarea>';
|
||||||
@ -144,10 +157,12 @@ if ($_GET["id"] > 0)
|
|||||||
|
|
||||||
if ($user->rights->fournisseur->commande->creer)
|
if ($user->rights->fournisseur->commande->creer)
|
||||||
{
|
{
|
||||||
print '<tr><td colspan="4" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>';
|
print '<tr><td colspan="3" align="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table></form>";
|
print "</table></form>";
|
||||||
|
|
||||||
|
print "</div>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
\file htdocs/fourn/commande/pre.inc.php
|
\file htdocs/fourn/commande/pre.inc.php
|
||||||
\ingroup compta
|
\ingroup compta
|
||||||
\brief Fichier gestionnaire du menu commandes fournisseurs
|
\brief Fichier gestionnaire du menu commandes fournisseurs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../../main.inc.php");
|
require("../../main.inc.php");
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
@ -39,10 +39,8 @@ function llxHeader($head = "", $title = "", $help_url='', $addons='')
|
|||||||
{
|
{
|
||||||
global $user, $langs;
|
global $user, $langs;
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
/*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
top_menu($head, $title);
|
top_menu($head, $title);
|
||||||
|
|
||||||
$menu = new Menu();
|
$menu = new Menu();
|
||||||
@ -51,22 +49,22 @@ function llxHeader($head = "", $title = "", $help_url='', $addons='')
|
|||||||
{
|
{
|
||||||
$menu->add($addons[0][0], $addons[0][1]);
|
$menu->add($addons[0][0], $addons[0][1]);
|
||||||
}
|
}
|
||||||
if ($user->societe_id == 0 && $user->rights->societe->lire)
|
if ($user->societe_id == 0 && $user->rights->societe->lire)
|
||||||
{
|
{
|
||||||
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
|
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
|
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
if ($user->rights->fournisseur->facture->lire)
|
if ($user->rights->fournisseur->facture->lire)
|
||||||
{
|
{
|
||||||
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
|
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
|
||||||
}
|
}
|
||||||
if ($user->rights->fournisseur->commande->lire)
|
if ($user->rights->fournisseur->commande->lire)
|
||||||
{
|
{
|
||||||
$menu->add(DOL_URL_ROOT."/fourn/commande/", $langs->trans("Orders"));
|
$menu->add(DOL_URL_ROOT."/fourn/commande/", $langs->trans("Orders"));
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/fourn/commande/liste.php", $langs->trans("List"));
|
$menu->add_submenu(DOL_URL_ROOT."/fourn/commande/liste.php", $langs->trans("List"));
|
||||||
}
|
}
|
||||||
|
|
||||||
left_menu($menu->liste,$help_url);
|
left_menu($menu->liste,$help_url);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user