New: Ajout page admin pour purger les fichiers de documents
New: Quelques améliorations mineures sur expéditions Trad: Un peu plus de traduction sur expéditions
This commit is contained in:
parent
496e780434
commit
1d5b45e5e1
@ -570,6 +570,6 @@ if (window.parent.frames[1]) {
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
llxFooter();
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -23,8 +23,8 @@
|
|||||||
\file htdocs/admin/tools/dolibarr_import.php
|
\file htdocs/admin/tools/dolibarr_import.php
|
||||||
\brief Page import de la base
|
\brief Page import de la base
|
||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
include_once $dolibarr_main_document_root."/lib/databases/".$conf->db->type.".lib.php";
|
include_once $dolibarr_main_document_root."/lib/databases/".$conf->db->type.".lib.php";
|
||||||
|
|
||||||
@ -36,16 +36,16 @@ if (! $user->admin)
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("Restore"),'','setup');
|
print_fiche_titre($langs->trans("Restore"),'','setup');
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print $langs->trans("DatabaseName").' : <b>'.$dolibarr_main_db_name.'</b><br>';
|
print $langs->trans("DatabaseName").' : <b>'.$dolibarr_main_db_name.'</b><br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
print $langs->trans("FeatureNotYetAvailable");
|
print $langs->trans("FeatureNotYetAvailable");
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -196,5 +196,5 @@ print '<br>';
|
|||||||
|
|
||||||
$time_end = time();
|
$time_end = time();
|
||||||
|
|
||||||
llxFooter();
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -52,6 +52,7 @@ print "<br>";
|
|||||||
if ($message) print $message.'<br>';
|
if ($message) print $message.'<br>';
|
||||||
|
|
||||||
|
|
||||||
|
print $langs->trans("SystemToolsAreaDesc").'<br>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -41,6 +41,7 @@ function llxHeader($head = "", $urlp = "")
|
|||||||
$menu->add(DOL_URL_ROOT."/admin/tools/index.php", "SystemTools");
|
$menu->add(DOL_URL_ROOT."/admin/tools/index.php", "SystemTools");
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/admin/tools/dolibarr_export.php", $langs->trans("Backup"));
|
$menu->add_submenu(DOL_URL_ROOT."/admin/tools/dolibarr_export.php", $langs->trans("Backup"));
|
||||||
$menu->add_submenu(DOL_URL_ROOT."/admin/tools/dolibarr_import.php", $langs->trans("Restore"));
|
$menu->add_submenu(DOL_URL_ROOT."/admin/tools/dolibarr_import.php", $langs->trans("Restore"));
|
||||||
|
$menu->add_submenu(DOL_URL_ROOT."/admin/tools/purge.php", $langs->trans("Purge"));
|
||||||
|
|
||||||
left_menu($menu->liste);
|
left_menu($menu->liste);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,20 +50,16 @@ class Expedition extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function Expedition($DB)
|
function Expedition($DB)
|
||||||
{
|
{
|
||||||
$this->db = $DB;
|
global $langs;
|
||||||
$this->lignes = array();
|
|
||||||
|
|
||||||
$this->sources[0] = "Proposition commerciale";
|
$this->db = $DB;
|
||||||
$this->sources[1] = "Internet";
|
$this->lignes = array();
|
||||||
$this->sources[2] = "Courrier";
|
|
||||||
$this->sources[3] = "Téléphone";
|
$this->statuts[-1] = $langs->trans("Canceled");
|
||||||
$this->sources[4] = "Fax";
|
$this->statuts[0] = $langs->trans("Draft");
|
||||||
|
$this->statuts[1] = $langs->trans("Validated");
|
||||||
$this->statuts[-1] = "Annulée";
|
|
||||||
$this->statuts[0] = "Brouillon";
|
$this->products = array();
|
||||||
$this->statuts[1] = "Validée";
|
|
||||||
|
|
||||||
$this->products = array();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -729,6 +725,10 @@ class Expedition extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\class ExpeditionLigne
|
||||||
|
\brief Classe de gestion des lignes de bons d'expedition
|
||||||
|
*/
|
||||||
class ExpeditionLigne
|
class ExpeditionLigne
|
||||||
{
|
{
|
||||||
var $db;
|
var $db;
|
||||||
@ -743,7 +743,8 @@ class ExpeditionLigne
|
|||||||
var $libelle; // Label produit
|
var $libelle; // Label produit
|
||||||
var $product_desc; // Description produit
|
var $product_desc; // Description produit
|
||||||
var $ref;
|
var $ref;
|
||||||
|
|
||||||
|
|
||||||
function ExpeditionLigne($DB)
|
function ExpeditionLigne($DB)
|
||||||
{
|
{
|
||||||
$this->db=$DB;
|
$this->db=$DB;
|
||||||
|
|||||||
@ -48,7 +48,7 @@ if (!$user->rights->expedition->lire)
|
|||||||
|
|
||||||
|
|
||||||
// Sécurité accés client
|
// Sécurité accés client
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$action = '';
|
$action = '';
|
||||||
$socid = $user->societe_id;
|
$socid = $user->societe_id;
|
||||||
@ -59,20 +59,20 @@ if ($user->societe_id > 0)
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($_POST["action"] == 'add')
|
if ($_POST["action"] == 'add')
|
||||||
{
|
{
|
||||||
// \todo Mettre id entrepot sur ligne detail expedition et non sur fiche expedition
|
// \todo Mettre id entrepot sur ligne detail expedition et non sur fiche expedition
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
// Creation de l'objet expedition
|
// Creation de l'objet expedition
|
||||||
$expedition = new Expedition($db);
|
$expedition = new Expedition($db);
|
||||||
|
|
||||||
$expedition->date_expedition = time();
|
$expedition->date_expedition = time();
|
||||||
$expedition->note = $_POST["note"];
|
$expedition->note = $_POST["note"];
|
||||||
$expedition->commande_id = $_POST["commande_id"];
|
$expedition->commande_id = $_POST["commande_id"];
|
||||||
$expedition->entrepot_id = $_POST["entrepot_id"];
|
$expedition->entrepot_id = $_POST["entrepot_id"];
|
||||||
|
|
||||||
// On boucle sur chaque ligne de commande pour compléter objet expedition
|
// On boucle sur chaque ligne de commande pour compléter objet expedition
|
||||||
// avec qté à livrer
|
// avec qté à livrer
|
||||||
$commande = new Commande($db);
|
$commande = new Commande($db);
|
||||||
@ -87,7 +87,7 @@ if ($_POST["action"] == 'add')
|
|||||||
$expedition->addline($_POST[$idl],$_POST[$qty]);
|
$expedition->addline($_POST[$idl],$_POST[$qty]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret=$expedition->create($user);
|
$ret=$expedition->create($user);
|
||||||
if ($ret > 0)
|
if ($ret > 0)
|
||||||
{
|
{
|
||||||
@ -125,7 +125,7 @@ if ($_POST["action"] == 'confirm_valid' && $_POST["confirm"] == 'yes' && $user->
|
|||||||
|
|
||||||
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
||||||
{
|
{
|
||||||
if ($user->rights->expedition->supprimer )
|
if ($user->rights->expedition->supprimer )
|
||||||
{
|
{
|
||||||
$expedition = new Expedition($db);
|
$expedition = new Expedition($db);
|
||||||
$expedition->fetch($_GET["id"]);
|
$expedition->fetch($_GET["id"]);
|
||||||
@ -158,7 +158,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
|||||||
{
|
{
|
||||||
dolibarr_print_error($db,$result);
|
dolibarr_print_error($db,$result);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ $html = new Form($db);
|
|||||||
* Mode creation
|
* Mode creation
|
||||||
*
|
*
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
if ($_GET["action"] == 'create')
|
if ($_GET["action"] == 'create')
|
||||||
{
|
{
|
||||||
|
|
||||||
print_titre($langs->trans("CreateASending"));
|
print_titre($langs->trans("CreateASending"));
|
||||||
@ -382,11 +382,11 @@ if ($_GET["action"] == 'create')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$db->error();
|
$this->error=$db->error();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
$html->select_array('warehouse'.$i,$array,'',1,0,0);
|
$html->select_array('warehouse'.$i,$array,'',1,0,0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -418,62 +418,62 @@ if ($_GET["action"] == 'create')
|
|||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* *************************************************************************** */
|
/* *************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Mode vue et edition */
|
/* Mode vue et edition */
|
||||||
/* */
|
/* */
|
||||||
/* *************************************************************************** */
|
/* *************************************************************************** */
|
||||||
{
|
{
|
||||||
if ($_GET["id"] > 0)
|
if ($_GET["id"] > 0)
|
||||||
{
|
{
|
||||||
$expedition = New Expedition($db);
|
$expedition = New Expedition($db);
|
||||||
$result = $expedition->fetch($_GET["id"]);
|
$result = $expedition->fetch($_GET["id"]);
|
||||||
|
|
||||||
if ($expedition->id > 0)
|
if ($expedition->id > 0)
|
||||||
{
|
{
|
||||||
$author = new User($db);
|
$author = new User($db);
|
||||||
$author->id = $expedition->user_author_id;
|
$author->id = $expedition->user_author_id;
|
||||||
$author->fetch();
|
$author->fetch();
|
||||||
|
|
||||||
$commande = New Commande($db);
|
$commande = New Commande($db);
|
||||||
$commande->fetch($expedition->commande_id);
|
$commande->fetch($expedition->commande_id);
|
||||||
|
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($commande->socid);
|
$soc->fetch($commande->socid);
|
||||||
|
|
||||||
$h=0;
|
$h=0;
|
||||||
$head[$h][0] = DOL_URL_ROOT."/expedition/fiche.php?id=".$expedition->id;
|
$head[$h][0] = DOL_URL_ROOT."/expedition/fiche.php?id=".$expedition->id;
|
||||||
$head[$h][1] = $langs->trans("SendingCard");
|
$head[$h][1] = $langs->trans("SendingCard");
|
||||||
$hselected = $h;
|
$hselected = $h;
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
if ($conf->livraison->enabled && $expedition->livraison_id)
|
if ($conf->livraison->enabled && $expedition->livraison_id)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT."/livraison/fiche.php?id=".$expedition->livraison_id;
|
$head[$h][0] = DOL_URL_ROOT."/livraison/fiche.php?id=".$expedition->livraison_id;
|
||||||
$head[$h][1] = $langs->trans("DeliveryCard");
|
$head[$h][1] = $langs->trans("DeliveryCard");
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
dolibarr_fiche_head($head, $hselected, $langs->trans("Sending"));
|
dolibarr_fiche_head($head, $hselected, $langs->trans("Sending"));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation de la suppression
|
* Confirmation de la suppression
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if ($_GET["action"] == 'delete')
|
if ($_GET["action"] == 'delete')
|
||||||
{
|
{
|
||||||
$html->form_confirm("fiche.php?id=$expedition->id","Supprimer l'expedition","Etes-vous sûr de vouloir supprimer cette expedition ?","confirm_delete");
|
$html->form_confirm("fiche.php?id=$expedition->id",$langs->trans("DeleteSending"),"Etes-vous sûr de vouloir supprimer cette expedition ?","confirm_delete");
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation de la validation
|
* Confirmation de la validation
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if ($_GET["action"] == 'valid')
|
if ($_GET["action"] == 'valid')
|
||||||
{
|
{
|
||||||
$html->form_confirm("fiche.php?id=$expedition->id","Valider l'expédition","Etes-vous sûr de vouloir valider cette expédition ?","confirm_valid");
|
$html->form_confirm("fiche.php?id=$expedition->id",$langs->trans("ValidateSending"),"Etes-vous sûr de vouloir valider cette expédition ?","confirm_valid");
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@ -482,10 +482,10 @@ else
|
|||||||
*/
|
*/
|
||||||
if ($_GET["action"] == 'annuler')
|
if ($_GET["action"] == 'annuler')
|
||||||
{
|
{
|
||||||
$html->form_confirm("fiche.php?id=$expedition->id",$langs->trans("Cancel"),"Etes-vous sûr de vouloir annuler cette commande ?","confirm_cancel");
|
$html->form_confirm("fiche.php?id=$expedition->id",$langs->trans("CancelSending"),"Etes-vous sûr de vouloir annuler cette commande ?","confirm_cancel");
|
||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Commande
|
* Commande
|
||||||
*/
|
*/
|
||||||
@ -494,67 +494,57 @@ else
|
|||||||
print '<form action="fiche.php?id='.$expedition->id.'" method="post">';
|
print '<form action="fiche.php?id='.$expedition->id.'" method="post">';
|
||||||
print '<input type="hidden" name="action" value="setremise">';
|
print '<input type="hidden" name="action" value="setremise">';
|
||||||
}
|
}
|
||||||
|
|
||||||
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="3">'.$expedition->ref.'</td></tr>';
|
print '<td colspan="3">'.$expedition->ref.'</td></tr>';
|
||||||
|
|
||||||
// Client
|
// Client
|
||||||
print '<tr><td width="20%">'.$langs->trans("Customer").'</td>';
|
print '<tr><td width="20%">'.$langs->trans("Customer").'</td>';
|
||||||
print '<td colspan="3">'.$soc->getNomUrl(1).'</td>';
|
print '<td colspan="3">'.$soc->getNomUrl(1).'</td>';
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
// Commande liée
|
// Commande liée
|
||||||
print '<tr><td>'.$langs->trans("RefOrder").'</td>';
|
print '<tr><td>'.$langs->trans("RefOrder").'</td>';
|
||||||
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/expedition/commande.php?id='.$commande->id.'">'.img_object($langs->trans("ShowOrder"),'order').' '.$commande->ref."</a></td>\n";
|
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/expedition/commande.php?id='.$commande->id.'">'.img_object($langs->trans("ShowOrder"),'order').' '.$commande->ref."</a></td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Commande liée
|
// Commande liée
|
||||||
print '<tr><td>'.$langs->trans("RefCustomerOrderShort").'</td>';
|
print '<tr><td>'.$langs->trans("RefCustomerOrderShort").'</td>';
|
||||||
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/expedition/commande.php?id='.$commande->id.'">'.$commande->ref_client."</a></td>\n";
|
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/expedition/commande.php?id='.$commande->id.'">'.$commande->ref_client."</a></td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
print '<tr><td>'.$langs->trans("Date").'</td>';
|
print '<tr><td>'.$langs->trans("Date").'</td>';
|
||||||
print '<td colspan="3">'.dolibarr_print_date($expedition->date,"%A %d %B %Y")."</td>\n";
|
print '<td colspan="3">'.dolibarr_print_date($expedition->date,"%A %d %B %Y")."</td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
print '<tr><td>'.$langs->trans("Status").'</td>';
|
print '<tr><td>'.$langs->trans("Status").'</td>';
|
||||||
print '<td colspan="3">'.$expedition->getLibStatut(4)."</td>\n";
|
print '<td colspan="3">'.$expedition->getLibStatut(4)."</td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
if (!$conf->expedition->enabled && $conf->stock->enabled)
|
|
||||||
{
|
|
||||||
// Entrepot
|
|
||||||
$entrepot = new Entrepot($db);
|
|
||||||
$entrepot->fetch($expedition->entrepot_id);
|
|
||||||
print '<tr><td width="20%">'.$langs->trans("Warehouse").'</td>';
|
|
||||||
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/product/stock/fiche.php?id='.$entrepot->id.'">'.$entrepot->libelle.'</a></td>';
|
|
||||||
print '</tr>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lignes produits
|
* Lignes produits
|
||||||
*/
|
*/
|
||||||
echo '<br><table class="noborder" width="100%">';
|
echo '<br><table class="noborder" width="100%">';
|
||||||
|
|
||||||
$sql = "SELECT cd.fk_product, cd.description, cd.rowid, cd.qty as qty_commande,";
|
$sql = "SELECT cd.fk_product, cd.description, cd.rowid, cd.qty as qty_commande,";
|
||||||
$sql .= " e.fk_statut, ed.qty as qty_livre";
|
$sql .= " e.fk_statut, ed.qty as qty_livre";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."commandedet as cd , ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."expedition as e";
|
$sql .= " FROM ".MAIN_DB_PREFIX."commandedet as cd , ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."expedition as e";
|
||||||
$sql .= " WHERE e.rowid = ".$expedition->id." AND e.rowid = ed.fk_expedition AND cd.rowid = ed.fk_commande_ligne";
|
$sql .= " WHERE e.rowid = ".$expedition->id." AND e.rowid = ed.fk_expedition AND cd.rowid = ed.fk_commande_ligne";
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num_prod = $db->num_rows($resql);
|
$num_prod = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Products").'</td>';
|
print '<td>'.$langs->trans("Products").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("QtyOrdered").'</td>';
|
print '<td align="center">'.$langs->trans("QtyOrdered").'</td>';
|
||||||
@ -566,20 +556,24 @@ else
|
|||||||
{
|
{
|
||||||
print '<td align="center">'.$langs->trans("QtyShipped").'</td>';
|
print '<td align="center">'.$langs->trans("QtyShipped").'</td>';
|
||||||
}
|
}
|
||||||
|
if ($conf->stock->enabled)
|
||||||
|
{
|
||||||
|
print '<td align="left">'.$langs->trans("WarehouseSource").'</td>';
|
||||||
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
while ($i < $num_prod)
|
while ($i < $num_prod)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
if ($objp->fk_product > 0)
|
if ($objp->fk_product > 0)
|
||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
$product->fetch($objp->fk_product);
|
$product->fetch($objp->fk_product);
|
||||||
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.'</a> - '.$product->libelle;
|
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.'</a> - '.$product->libelle;
|
||||||
if ($objp->description) print '<br>'.nl2br($objp->description);
|
if ($objp->description) print '<br>'.nl2br($objp->description);
|
||||||
@ -587,13 +581,26 @@ else
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<td>".stripslashes(nl2br($objp->description))."</td>\n";
|
print "<td>".nl2br($objp->description)."</td>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Qte commandé
|
||||||
print '<td align="center">'.$objp->qty_commande.'</td>';
|
print '<td align="center">'.$objp->qty_commande.'</td>';
|
||||||
|
|
||||||
|
// Qte a expedier ou expedier
|
||||||
print '<td align="center">'.$objp->qty_livre.'</td>';
|
print '<td align="center">'.$objp->qty_livre.'</td>';
|
||||||
|
|
||||||
|
// Entrepot source
|
||||||
|
if ($conf->stock->enabled)
|
||||||
|
{
|
||||||
|
$entrepot = new Entrepot($db);
|
||||||
|
$entrepot->fetch($expedition->entrepot_id);
|
||||||
|
print '<td align="left">'.$entrepot->getNomUrl(1).'</td>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
}
|
}
|
||||||
@ -603,63 +610,66 @@ else
|
|||||||
{
|
{
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
print "\n</div>\n";
|
print "\n</div>\n";
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Boutons actions
|
* Boutons actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($user->societe_id == 0)
|
if ($user->societe_id == 0)
|
||||||
{
|
{
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($expedition->statut == 0 && $user->rights->expedition->valider && $num_prod > 0)
|
if (! eregi('^(valid|delete)',$_REQUEST["action"]))
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="fiche.php?id='.$expedition->id.'&action=valid">'.$langs->trans("Validate").'</a>';
|
if ($expedition->statut == 0 && $user->rights->expedition->valider && $num_prod > 0)
|
||||||
}
|
{
|
||||||
|
print '<a class="butAction" href="fiche.php?id='.$expedition->id.'&action=valid">'.$langs->trans("Validate").'</a>';
|
||||||
if ($conf->livraison->enabled && $expedition->statut == 1 && $user->rights->expedition->livraison->creer && !$expedition->livraison_id)
|
}
|
||||||
{
|
|
||||||
print '<a class="butAction" href="fiche.php?id='.$expedition->id.'&action=create_delivery">'.$langs->trans("DeliveryOrder").'</a>';
|
if ($conf->livraison->enabled && $expedition->statut == 1 && $user->rights->expedition->livraison->creer && !$expedition->livraison_id)
|
||||||
}
|
{
|
||||||
|
print '<a class="butAction" href="fiche.php?id='.$expedition->id.'&action=create_delivery">'.$langs->trans("DeliveryOrder").'</a>';
|
||||||
if ($user->rights->expedition->lire && ($expedition->statut > 0))
|
}
|
||||||
{
|
|
||||||
print '<a class="butAction" href="fiche.php?id='.$expedition->id.'&action=builddoc">'.$langs->trans('BuildPDF').'</a>';
|
if ($user->rights->expedition->lire && ($expedition->statut > 0))
|
||||||
}
|
{
|
||||||
|
print '<a class="butAction" href="fiche.php?id='.$expedition->id.'&action=builddoc">'.$langs->trans('BuildPDF').'</a>';
|
||||||
if ($expedition->brouillon && $user->rights->expedition->supprimer)
|
}
|
||||||
{
|
|
||||||
print '<a class="butActionDelete" href="fiche.php?id='.$expedition->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
if ($expedition->brouillon && $user->rights->expedition->supprimer)
|
||||||
}
|
{
|
||||||
|
print '<a class="butActionDelete" href="fiche.php?id='.$expedition->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
print "<table width=\"100%\" cellspacing=2><tr><td width=\"50%\" valign=\"top\">";
|
print "<table width=\"100%\" cellspacing=2><tr><td width=\"50%\" valign=\"top\">";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Documents générés
|
* Documents générés
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$expeditionref = sanitize_string($expedition->ref);
|
$expeditionref = sanitize_string($expedition->ref);
|
||||||
$filedir = $conf->expedition->dir_output . "/" .$expeditionref;
|
$filedir = $conf->expedition->dir_output . "/" .$expeditionref;
|
||||||
|
|
||||||
$urlsource = $_SERVER["PHP_SELF"]."?id=".$expedition->id;
|
$urlsource = $_SERVER["PHP_SELF"]."?id=".$expedition->id;
|
||||||
|
|
||||||
$genallowed=$user->rights->expedition->lire && ($expedition->statut > 0);
|
$genallowed=$user->rights->expedition->lire && ($expedition->statut > 0);
|
||||||
$delallowed=$user->rights->expedition->supprimer;
|
$delallowed=$user->rights->expedition->supprimer;
|
||||||
//$genallowed=1;
|
//$genallowed=1;
|
||||||
//$delallowed=0;
|
//$delallowed=0;
|
||||||
|
|
||||||
$somethingshown=$html->show_documents('expedition',$expeditionref,$filedir,$urlsource,$genallowed,$delallowed,$expedition->modelpdf);
|
$somethingshown=$html->show_documents('expedition',$expeditionref,$filedir,$urlsource,$genallowed,$delallowed,$expedition->modelpdf);
|
||||||
if ($genallowed && ! $somethingshown) $somethingshown=1;
|
if ($genallowed && ! $somethingshown) $somethingshown=1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Autres expeditions
|
* Autres expeditions
|
||||||
*/
|
*/
|
||||||
@ -673,17 +683,17 @@ else
|
|||||||
$sql .= " AND cd.rowid = ed.fk_commande_ligne";
|
$sql .= " AND cd.rowid = ed.fk_commande_ligne";
|
||||||
$sql .= " AND ed.fk_expedition = e.rowid";
|
$sql .= " AND ed.fk_expedition = e.rowid";
|
||||||
$sql .= " ORDER BY cd.fk_product";
|
$sql .= " ORDER BY cd.fk_product";
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
if ($num)
|
if ($num)
|
||||||
{
|
{
|
||||||
if ($somethingshown) print '<br>';
|
if ($somethingshown) print '<br>';
|
||||||
|
|
||||||
print_titre($langs->trans("OtherSendingsForSameOrder"));
|
print_titre($langs->trans("OtherSendingsForSameOrder"));
|
||||||
print '<table class="liste" width="100%">';
|
print '<table class="liste" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -692,7 +702,7 @@ else
|
|||||||
print '<td align="center">'.$langs->trans("Qty").'</td>';
|
print '<td align="center">'.$langs->trans("Qty").'</td>';
|
||||||
print '<td align="center">'.$langs->trans("Date").'</td>';
|
print '<td align="center">'.$langs->trans("Date").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
@ -704,7 +714,7 @@ else
|
|||||||
{
|
{
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
$product->fetch($objp->fk_product);
|
$product->fetch($objp->fk_product);
|
||||||
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.'</a> - '.dolibarr_trunc($product->libelle,20);
|
print '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">'.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.'</a> - '.dolibarr_trunc($product->libelle,20);
|
||||||
if ($objp->description) print nl2br(dolibarr_trunc($objp->description,24));
|
if ($objp->description) print nl2br(dolibarr_trunc($objp->description,24));
|
||||||
@ -719,7 +729,7 @@ else
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
}
|
}
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
@ -727,14 +737,14 @@ else
|
|||||||
else {
|
else {
|
||||||
dolibarr_print_error($db);
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print '</td><td valign="top" width="50%">';
|
print '</td><td valign="top" width="50%">';
|
||||||
|
|
||||||
// Rien a droite
|
// Rien a droite
|
||||||
|
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1563,11 +1563,14 @@ class Form
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
foreach ($formquestion as $key => $input)
|
if (is_array($formquestion))
|
||||||
{
|
{
|
||||||
if ($input['type'] == 'hidden') print '<input type="hidden" name="'.$input['name'].'" value="'.$input['value'].'">';
|
foreach ($formquestion as $key => $input)
|
||||||
|
{
|
||||||
|
if ($input['type'] == 'hidden') print '<input type="hidden" name="'.$input['name'].'" value="'.$input['value'].'">';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -147,6 +147,7 @@ class MenuLeft {
|
|||||||
$newmenu->add(DOL_URL_ROOT."/admin/tools/index.php?leftmenu=admintools", $langs->trans("SystemTools"));
|
$newmenu->add(DOL_URL_ROOT."/admin/tools/index.php?leftmenu=admintools", $langs->trans("SystemTools"));
|
||||||
if ($leftmenu=="admintools") $newmenu->add_submenu(DOL_URL_ROOT."/admin/tools/dolibarr_export.php", $langs->trans("Backup"),1);
|
if ($leftmenu=="admintools") $newmenu->add_submenu(DOL_URL_ROOT."/admin/tools/dolibarr_export.php", $langs->trans("Backup"),1);
|
||||||
if ($leftmenu=="admintools") $newmenu->add_submenu(DOL_URL_ROOT."/admin/tools/dolibarr_import.php", $langs->trans("Restore"),1);
|
if ($leftmenu=="admintools") $newmenu->add_submenu(DOL_URL_ROOT."/admin/tools/dolibarr_import.php", $langs->trans("Restore"),1);
|
||||||
|
if ($leftmenu=="admintools") $newmenu->add_submenu(DOL_URL_ROOT."/admin/tools/purge.php", $langs->trans("Purge"),1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
|
|||||||
@ -47,6 +47,13 @@ System=System
|
|||||||
SystemInfo=System informations
|
SystemInfo=System informations
|
||||||
SystemTools=System tools
|
SystemTools=System tools
|
||||||
SystemToolsArea=System tools area
|
SystemToolsArea=System tools area
|
||||||
|
SystemToolsAreaDesc=This area provides administration features. Use menu to choose feature you're looking for.
|
||||||
|
PurgeAreaDesc=This page allow you to delete all files built or stored by Dolibarr (temporary files or all files in <b>%s</b> directory). Using this feature is not necessary. It is provided for users whose Dolibarr is hosted by a provider that does not offer permissions to delete files built by the web server.
|
||||||
|
PurgeDeleteTemporaryFiles=Delete all temporary files (no risk to loose data)
|
||||||
|
PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory <b>%s</b>. Temporary files but also files attached to elements (third parties, invoices, ...) will be deleted.
|
||||||
|
PurgeRunNow=Run purge now
|
||||||
|
PurgeNothingToDelete=no directory to delete.
|
||||||
|
PurgeNDirectoriesDeleted=<b>%s</b> files or directories deleted.
|
||||||
NewBackup=New backup
|
NewBackup=New backup
|
||||||
Backup=Backup
|
Backup=Backup
|
||||||
Restore=Restore
|
Restore=Restore
|
||||||
|
|||||||
@ -25,7 +25,7 @@ SendingsForSameOrder=Sendings for this order
|
|||||||
SendingsAndReceivingForSameOrder=Sendings and receivings for this order
|
SendingsAndReceivingForSameOrder=Sendings and receivings for this order
|
||||||
SendingsToValidate=Sending to validate
|
SendingsToValidate=Sending to validate
|
||||||
StatusSendingDraft=Draft
|
StatusSendingDraft=Draft
|
||||||
StatusSendingValidated=Validated (products to ship or already received)
|
StatusSendingValidated=Validated (products to ship or already shipped)
|
||||||
StatusSendingDraftShort=Draft
|
StatusSendingDraftShort=Draft
|
||||||
StatusSendingValidatedShort=Validated
|
StatusSendingValidatedShort=Validated
|
||||||
SendingSheet=Sending sheet
|
SendingSheet=Sending sheet
|
||||||
@ -5,6 +5,11 @@ NewWarehouse=New warehouse / Stock area
|
|||||||
MenuNewWarehouse=New warehouse
|
MenuNewWarehouse=New warehouse
|
||||||
WarehouseOpened=Warehouse opened
|
WarehouseOpened=Warehouse opened
|
||||||
WarehouseClosed=Warehouse closed
|
WarehouseClosed=Warehouse closed
|
||||||
|
WarehouseSource=Source warehouse
|
||||||
|
WarehouseTarget=Target warehouse
|
||||||
|
ValidateSending=Delete sending
|
||||||
|
CancelSending=Cancel sending
|
||||||
|
DeleteSending=Delete sending
|
||||||
Stock=Stock
|
Stock=Stock
|
||||||
Stocks=Stocks
|
Stocks=Stocks
|
||||||
Movement=Movement
|
Movement=Movement
|
||||||
|
|||||||
@ -25,7 +25,7 @@ SendingsForSameOrder=Exp
|
|||||||
SendingsAndReceivingForSameOrder=Expéditions et réceptions pour cette commande
|
SendingsAndReceivingForSameOrder=Expéditions et réceptions pour cette commande
|
||||||
SendingsToValidate=Expéditions à valider
|
SendingsToValidate=Expéditions à valider
|
||||||
StatusSendingDraft=Brouillon
|
StatusSendingDraft=Brouillon
|
||||||
StatusSendingValidated=Validée (produits à envoyer ou reçus)
|
StatusSendingValidated=Validée (produits à envoyer ou envoyés)
|
||||||
StatusSendingDraftShort=Brouillon
|
StatusSendingDraftShort=Brouillon
|
||||||
StatusSendingValidatedShort=Validée
|
StatusSendingValidatedShort=Validée
|
||||||
SendingSheet=Bordereau d'expédition
|
SendingSheet=Bordereau d'expédition
|
||||||
|
|||||||
@ -47,6 +47,13 @@ System=Syst
|
|||||||
SystemInfo=Infos Système
|
SystemInfo=Infos Système
|
||||||
SystemTools=Outils Système
|
SystemTools=Outils Système
|
||||||
SystemToolsArea=Espace outils systèmes
|
SystemToolsArea=Espace outils systèmes
|
||||||
|
SystemToolsAreaDesc=Cet espace offre des fonctions d'administration diverses. Utilisez le menu pour choisir la fonctionalité recherchée.
|
||||||
|
PurgeAreaDesc=Cette page vous permet d'effacer tous les fichiers construits ou stockés par Dolibarr (fichiers temporaires ou tous les fichiers du répertoire <b>%s</b>). L'utilisation de cette fonction n'est pas nécessaire. Elle est fourni pour les utilisateurs qui héberge Dolibarr chez un hébergeur qui n'offre pas les permissions de supprimer les fichiers sauvegardés par le serveur Web.
|
||||||
|
PurgeDeleteTemporaryFiles=Effacer tous les fichiers temporaires (pas de risque de perte de données)
|
||||||
|
PurgeDeleteAllFilesInDocumentsDir=Effacer tous les fichiers du répertoire <b>%s</b>. Les fichiers temporaires mais aussi les fichiers joints aux éléments (tiers, factures, ...) seront effacées.
|
||||||
|
PurgeRunNow=Lancer la purge maintenant
|
||||||
|
PurgeNothingToDelete=Aucun répertoire à supprimer.
|
||||||
|
PurgeNDirectoriesDeleted=<b>%s</b> fichiers ou répertoires supprimés.
|
||||||
NewBackup=Nouvelle sauvegarde
|
NewBackup=Nouvelle sauvegarde
|
||||||
Backup=Sauvegarde
|
Backup=Sauvegarde
|
||||||
Restore=Restauration
|
Restore=Restauration
|
||||||
|
|||||||
@ -25,7 +25,7 @@ SendingsForSameOrder=Exp
|
|||||||
SendingsAndReceivingForSameOrder=Expéditions et réceptions pour cette commande
|
SendingsAndReceivingForSameOrder=Expéditions et réceptions pour cette commande
|
||||||
SendingsToValidate=Expéditions à valider
|
SendingsToValidate=Expéditions à valider
|
||||||
StatusSendingDraft=Brouillon
|
StatusSendingDraft=Brouillon
|
||||||
StatusSendingValidated=Validée (produits à envoyer ou reçus)
|
StatusSendingValidated=Validée (produits à envoyer ou envoyés)
|
||||||
StatusSendingDraftShort=Brouillon
|
StatusSendingDraftShort=Brouillon
|
||||||
StatusSendingValidatedShort=Validée
|
StatusSendingValidatedShort=Validée
|
||||||
SendingSheet=Bordereau d'expédition
|
SendingSheet=Bordereau d'expédition
|
||||||
@ -5,6 +5,11 @@ NewWarehouse=Nouvel entrep
|
|||||||
MenuNewWarehouse=Nouvel entrepôt
|
MenuNewWarehouse=Nouvel entrepôt
|
||||||
WarehouseOpened=Entrepôt ouvert
|
WarehouseOpened=Entrepôt ouvert
|
||||||
WarehouseClosed=Entrepôt fermé
|
WarehouseClosed=Entrepôt fermé
|
||||||
|
WarehouseSource=Entrepôt source
|
||||||
|
WarehouseTarget=Entrepôt cible
|
||||||
|
ValidateSending=Valider expédition
|
||||||
|
CancelSending=Annuler expédition
|
||||||
|
DeleteSending=Supprimer expédition
|
||||||
Stock=Stock
|
Stock=Stock
|
||||||
Stocks=Stocks
|
Stocks=Stocks
|
||||||
Movement=Mouvement
|
Movement=Mouvement
|
||||||
|
|||||||
@ -1613,12 +1613,49 @@ function dol_delete_file($file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Effacement d'un répertoire
|
\brief Effacement d'un répertoire
|
||||||
\param file Répertoire a effacer
|
\param file Répertoire a effacer
|
||||||
*/
|
*/
|
||||||
function dol_delete_dir($dir)
|
function dol_delete_dir($dir)
|
||||||
{
|
{
|
||||||
return rmdir($dir);
|
return rmdir($dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Effacement d'un répertoire et son arborescence
|
||||||
|
\param file Répertoire a effacer
|
||||||
|
\return int Nombre de fichier+repértoires supprimés
|
||||||
|
*/
|
||||||
|
function dol_delete_dir_recursive($dir)
|
||||||
|
{
|
||||||
|
$count=0;
|
||||||
|
|
||||||
|
if ($handle = opendir("$dir"))
|
||||||
|
{
|
||||||
|
while (false !== ($item = readdir($handle)))
|
||||||
|
{
|
||||||
|
if ($item != "." && $item != "..")
|
||||||
|
{
|
||||||
|
if (is_dir("$dir/$item"))
|
||||||
|
{
|
||||||
|
dol_delete_dir_recursive("$dir/$item");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unlink("$dir/$item");
|
||||||
|
$count++;
|
||||||
|
//echo " removing $dir/$item<br>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
rmdir($dir);
|
||||||
|
$count++;
|
||||||
|
//echo "removing $dir<br>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
//echo "return=".$count;
|
||||||
|
return $count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1984,22 +2021,29 @@ function dolibarr_dir_list($path, $types="all", $recursive=0, $filter="", $exclu
|
|||||||
|
|
||||||
// Check if file is qualified
|
// Check if file is qualified
|
||||||
if (eregi('^\.',$file)) $qualified=0;
|
if (eregi('^\.',$file)) $qualified=0;
|
||||||
if ($filter && ! eregi($filter,$file)) $qualified=0;
|
|
||||||
if ($excludefilter && eregi($excludefilter,$file)) $qualified=0;
|
if ($excludefilter && eregi($excludefilter,$file)) $qualified=0;
|
||||||
|
|
||||||
|
// print "path=$path file=$file<br>\n";
|
||||||
|
|
||||||
if ($qualified)
|
if ($qualified)
|
||||||
{
|
{
|
||||||
// Check whether this is a file or directory and whether we're interested in that type
|
// Check whether this is a file or directory and whether we're interested in that type
|
||||||
if ((is_dir($path."/".$file)) && (($types=="directories") || ($types=="all")))
|
if ((is_dir($path."/".$file)) && (($types=="directories") || ($types=="all")))
|
||||||
{
|
{
|
||||||
// Add file into file_list array
|
// Add entry into file_list array
|
||||||
if ($sortcriteria == 'date') $filedate=filemtime($path."/".$file);
|
if ($sortcriteria == 'date') $filedate=filemtime($path."/".$file);
|
||||||
if ($sortcriteria == 'size') $filesize=filesize($path."/".$file);
|
if ($sortcriteria == 'size') $filesize=filesize($path."/".$file);
|
||||||
$file_list[] = array(
|
|
||||||
"name" => $file,
|
if (! $filter || eregi($filter,$path.'/'.$file))
|
||||||
"date" => $filedate,
|
{
|
||||||
"size" => $filesize
|
$file_list[] = array(
|
||||||
);
|
"name" => $file,
|
||||||
|
"fullname" => $path.'/'.$file,
|
||||||
|
"date" => $filedate,
|
||||||
|
"size" => $filesize
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// if we're in a directory and we want recursive behavior, call this function again
|
// if we're in a directory and we want recursive behavior, call this function again
|
||||||
if ($recursive)
|
if ($recursive)
|
||||||
{
|
{
|
||||||
@ -2011,11 +2055,15 @@ function dolibarr_dir_list($path, $types="all", $recursive=0, $filter="", $exclu
|
|||||||
// Add file into file_list array
|
// Add file into file_list array
|
||||||
if ($sortcriteria == 'date') $filedate=filemtime($path."/".$file);
|
if ($sortcriteria == 'date') $filedate=filemtime($path."/".$file);
|
||||||
if ($sortcriteria == 'size') $filesize=filesize($path."/".$file);
|
if ($sortcriteria == 'size') $filesize=filesize($path."/".$file);
|
||||||
$file_list[] = array(
|
if (! $filter || eregi($filter,$path.'/'.$file))
|
||||||
"name" => $file,
|
{
|
||||||
"date" => $filedate,
|
$file_list[] = array(
|
||||||
"size" => $filesize
|
"name" => $file,
|
||||||
);
|
"fullname" => $path.'/'.$file,
|
||||||
|
"date" => $filedate,
|
||||||
|
"size" => $filesize
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,8 +30,9 @@
|
|||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/livraison/mods/modules_livraison.php");
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/expedition/expedition.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/expedition/expedition.class.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/livraison/livraison.class.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/livraison/mods/modules_livraison.php");
|
||||||
if ($conf->stock->enabled) require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
|
if ($conf->stock->enabled) require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
|
||||||
|
|
||||||
$langs->load("sendings");
|
$langs->load("sendings");
|
||||||
@ -347,7 +348,7 @@ else
|
|||||||
{
|
{
|
||||||
if ($_GET["id"] > 0)
|
if ($_GET["id"] > 0)
|
||||||
{
|
{
|
||||||
$livraison = New Livraison($db);
|
$livraison = new Livraison($db);
|
||||||
$result = $livraison->fetch($_GET["id"]);
|
$result = $livraison->fetch($_GET["id"]);
|
||||||
|
|
||||||
if ( $livraison->id > 0)
|
if ( $livraison->id > 0)
|
||||||
@ -435,6 +436,11 @@ else
|
|||||||
print '<td colspan="3">'.dolibarr_print_date($livraison->date_creation,'%A %d %B %Y')."</td>\n";
|
print '<td colspan="3">'.dolibarr_print_date($livraison->date_creation,'%A %d %B %Y')."</td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Statut
|
||||||
|
print '<tr><td>'.$langs->trans("Status").'</td>';
|
||||||
|
print '<td colspan="3">'.$livraison->getLibStatut(4)."</td>\n";
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
if (!$conf->expedition->enabled && $conf->stock->enabled)
|
if (!$conf->expedition->enabled && $conf->stock->enabled)
|
||||||
{
|
{
|
||||||
// Entrepot
|
// Entrepot
|
||||||
@ -519,25 +525,28 @@ else
|
|||||||
{
|
{
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($livraison->statut == 0 && $user->rights->expedition->livraison->valider && $num_prod > 0)
|
if (! eregi('^(valid|delete)',$_REQUEST["action"]))
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="fiche.php?id='.$livraison->id.'&action=valid">'.$langs->trans("Validate").'</a>';
|
if ($livraison->statut == 0 && $user->rights->expedition->livraison->valider && $num_prod > 0)
|
||||||
}
|
{
|
||||||
|
print '<a class="butAction" href="fiche.php?id='.$livraison->id.'&action=valid">'.$langs->trans("Validate").'</a>';
|
||||||
print '<a class="butAction" href="fiche.php?id='.$livraison->id.'&action=builddoc">'.$langs->trans('BuildPDF').'</a>';
|
}
|
||||||
|
|
||||||
if ($livraison->brouillon && $user->rights->expedition->livraison->supprimer)
|
print '<a class="butAction" href="fiche.php?id='.$livraison->id.'&action=builddoc">'.$langs->trans('BuildPDF').'</a>';
|
||||||
{
|
|
||||||
if ($conf->expedition->enabled)
|
if ($livraison->brouillon && $user->rights->expedition->livraison->supprimer)
|
||||||
{
|
{
|
||||||
print '<a class="butActionDelete" href="fiche.php?id='.$livraison->id.'&expid='.$livraison->expedition_id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
if ($conf->expedition->enabled)
|
||||||
}
|
{
|
||||||
else
|
print '<a class="butActionDelete" href="fiche.php?id='.$livraison->id.'&expid='.$livraison->expedition_id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
||||||
{
|
}
|
||||||
print '<a class="butActionDelete" href="fiche.php?id='.$livraison->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
else
|
||||||
}
|
{
|
||||||
}
|
print '<a class="butActionDelete" href="fiche.php?id='.$livraison->id.'&action=delete">'.$langs->trans("Delete").'</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user