diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 6ce16e60dae..0b4ce0b51ac 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -1,9 +1,9 @@ - * Copyright (C) 2004 Laurent Destailleur - * Copyright (C) 2004 Sebastien Di Cintio - * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004 Sebastien Di Cintio + * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2004 Eric Seigne * * 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 @@ -24,10 +24,10 @@ */ /** - \file htdocs/admin/expedition.php - \ingroup expedition - \brief Page d'administration/configuration du module Expedition - \version $Revision$ + \file htdocs/admin/expedition.php + \ingroup expedition + \brief Page d'administration/configuration du module Expedition + \version $Revision$ */ require("./pre.inc.php"); @@ -37,80 +37,111 @@ $langs->load("sendings"); if (!$user->admin) accessforbidden(); +// positionne la variable pour le test d'affichage de l'icone +$expedition_addon_var_pdf = EXPEDITION_ADDON_PDF; +$expedition_default = EXPEDITION_ADDON; /* * Actions */ if ($_GET["action"] == 'set') { - $file = DOL_DOCUMENT_ROOT . '/expedition/mods/methode_expedition_'.$_GET["value"].'.modules.php'; + $file = DOL_DOCUMENT_ROOT . '/expedition/mods/methode_expedition_'.$_GET["value"].'.modules.php'; - $classname = 'methode_expedition_'.$_GET["value"]; - require_once($file); - - $obj = new $classname(); + $classname = 'methode_expedition_'.$_GET["value"]; + require_once($file); - // Mise a jour statut - $sql = "UPDATE ".MAIN_DB_PREFIX."expedition_methode set status='".$_GET["statut"]."'"; - $sql.= " WHERE rowid = ".$obj->id; - print "$sql"; - exit; + $obj = new $classname(); - Header("Location: expedition.php"); + // Mise a jour statut + $sql = "UPDATE ".MAIN_DB_PREFIX."expedition_methode set status='".$_GET["statut"]."'"; + $sql.= " WHERE rowid = ".$obj->id; + print "$sql"; + exit; + + Header("Location: expedition.php"); } if ($_GET["action"] == 'setpdf') { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'EXPEDITION_ADDON_PDF';"; - $db->query($sql); - $sql=''; - $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('EXPEDITION_ADDON_PDF','".$_GET["value"]."',0)"; - - if ($db->query($sql)) + $db->begin(); + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'EXPEDITION_ADDON_PDF';"; + $resql=$db->query($sql); + if ($resql) { - // la constante qui a été lue en avant du nouveau set - // on passe donc par une variable pour avoir un affichage cohérent - $expedition_addon_var_pdf = $value; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('EXPEDITION_ADDON_PDF','".$_GET["value"]."',0)"; + $resql=$db->query($sql); + if ($resql) + { + // la constante qui a été lue en avant du nouveau set + // on passe donc par une variable pour avoir un affichage cohérent + $expedition_addon_var_pdf = $value; + + $db->commit(); + + Header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else + { + $db->rollback(); + dolibarr_print_error($db); + } + } + else + { + $db->rollback(); + dolibarr_print_error($db); } - - Header("Location: expedition.php"); } - -llxHeader(); - -// positionne la variable pour le test d'affichage de l'icone -$expedition_addon_var_pdf = EXPEDITION_ADDON_PDF; -$expedition_default = EXPEDITION_DEFAULT; - - if ($_GET["action"] == 'setdef') { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'EXPEDITION_ADDON';"; - $db->query($sql); - $sql=''; - $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('EXPEDITION_ADDON','".$value."',0)"; - - if ($db->query($sql)) + $db->begin(); + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'EXPEDITION_ADDON';"; + $resql=$db->query($sql); + if ($resql) { - // la constante qui a été lue en avant du nouveau set - // on passe donc par une variable pour avoir un affichage cohérent - $expedition_default = $_GET["value"]; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES ('EXPEDITION_ADDON','".$_GET["value"]."',0)"; + $resql=$db->query($sql); + if ($resql) + { + // la constante qui a été lue en avant du nouveau set + // on passe donc par une variable pour avoir un affichage cohérent + $expedition_default = $_GET["value"]; + $db->commit(); + + Header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else + { + $db->rollback(); + dolibarr_print_error($db); + } + } + else + { + $db->rollback(); + dolibarr_print_error($db); } } + /* - * - * * */ +llxHeader(); + + $dir = DOL_DOCUMENT_ROOT."/expedition/mods/"; -/* - * Méthode de livraison - */ + +// Méthode de livraison print_titre($langs->trans("SendingsSetup")); @@ -118,80 +149,77 @@ print "
"; print_titre($langs->trans("SendingMethod")); -print ''; +print '
'; print ''; -print ''; +print ''; print ''; -print ''; +print ''; print "\n"; if(is_dir($dir)) { - $handle=opendir($dir); - - while (($file = readdir($handle))!==false) + $handle=opendir($dir); + $var=true; + + while (($file = readdir($handle))!==false) { - if (substr($file, strlen($file) -12) == '.modules.php' && substr($file,0,19) == 'methode_expedition_') - { - $name = substr($file, 19, strlen($file) - 31); - $classname = substr($file, 0, strlen($file) - 12); - - require_once($dir.$file); - - $obj = new $classname(); - - print ''; - } + $obj = new $classname(); + + $var=!$var; + print "'; + + // Default + print ''; + + print ''; + } } - closedir($handle); + closedir($handle); } else { - print "\n"; + print "\n"; } print '
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Active").''.$langs->trans("Default").''.$langs->trans("Default").'
'; - echo $obj->name; - print "\n"; - - print $obj->description; - - print ''; - + if (substr($file, strlen($file) -12) == '.modules.php' && substr($file,0,19) == 'methode_expedition_') + { + $name = substr($file, 19, strlen($file) - 31); + $classname = substr($file, 0, strlen($file) - 12); - print " "; - print "\n"; - print ''.$langs->trans("Activate").''; + require_once($dir.$file); - - print ''; - - if ($expedition_default == "$name") - { - print img_tick(); - } - else - { - print " "; - } - - print "\n"; - - print ''.$langs->trans("Activate").''; - - print '
"; + echo $obj->name; + print "\n"; + + print $obj->description; + + print ''; + + + print " "; + print "\n"; + print ''.$langs->trans("Activate").''; + + + print ''; + if ($expedition_default == "$name") + { + print img_tick(); + } + else + { + print ''.$langs->trans("Default").''; + } + print '
ERROR: $dir is not a directory !
ERROR: $dir is not a directory !
'; print '
'; -/* - * - * PDF - * - */ +// PDF print_titre($langs->trans("SendingsReceiptModel")); -print ''; +print '
'; print ''; -print ''; +print ''; print ''; print "\n"; @@ -201,54 +229,56 @@ $dir = DOL_DOCUMENT_ROOT."/expedition/mods/pdf/"; if(is_dir($dir)) { - $handle=opendir($dir); + $handle=opendir($dir); + $var=true; - while (($file = readdir($handle))!==false) + while (($file = readdir($handle))!==false) { - if (substr($file, strlen($file) -12) == '.modules.php' && substr($file,0,15) == 'pdf_expedition_') - { - $name = substr($file, 15, strlen($file) - 27); - $classname = substr($file, 0, strlen($file) - 12); - - print ''; - } + $var=!$var; + print "'; + } } - closedir($handle); + closedir($handle); } else { - print "\n"; + print "\n"; } print '
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Active").'
'; - echo "$name"; - print "\n"; - require_once($dir.$file); - $obj = new $classname(); - - print $obj->description; - + if (substr($file, strlen($file) -12) == '.modules.php' && substr($file,0,15) == 'pdf_expedition_') + { + $name = substr($file, 15, strlen($file) - 27); + $classname = substr($file, 0, strlen($file) - 12); - print ''; - - if ($expedition_addon_var_pdf == "$name") - { - print img_tick(); - } - else - { - print " "; - } - - print "\n"; - - print ''.$langs->trans("Activate").''; - - print '
"; + print $name; + print "\n"; + require_once($dir.$file); + $obj = new $classname(); + + print $obj->description; + + + print ''; + + if ($expedition_addon_var_pdf == "$name") + { + print img_tick(); + } + else + { + print " "; + } + + print "\n"; + + print ''.$langs->trans("Activate").''; + + print '
ERROR: $dir is not a directory !
ERROR: $dir is not a directory !
'; /* - * - * - */ +* +* +*/ $db->close(); diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index 477d5f36bcd..cdf79a2dd1f 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -161,5 +161,5 @@ print '
'; $db->close(); -llxFooter(); +llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index ae4e7554421..a801f83db37 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -165,7 +165,7 @@ if ($_GET["action"] == 'facturee') $commande->classer_facturee(); } -if ($_POST["action"] == 'confirm_valid' && $_POST["confirm"] == yes && $user->rights->commande->valider) +if ($_POST["action"] == 'confirm_valid' && $_POST["confirm"] == 'yes' && $user->rights->commande->valider) { $commande = new Commande($db); $commande->fetch($_GET["id"]); @@ -174,14 +174,14 @@ if ($_POST["action"] == 'confirm_valid' && $_POST["confirm"] == yes && $user->ri $result = $commande->valid($user); } -if ($_POST["action"] == 'confirm_cancel' && $_POST["confirm"] == yes && $user->rights->commande->valider) +if ($_POST["action"] == 'confirm_cancel' && $_POST["confirm"] == 'yes' && $user->rights->commande->valider) { $commande = new Commande($db); $commande->fetch($_GET["id"]); $result = $commande->cancel($user); } -if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == yes) +if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes') { if ($user->rights->commande->supprimer ) { @@ -744,40 +744,44 @@ else print ''; - if ($user->societe_id == 0 && $commande->statut < 3 && $_GET["action"] == '') - { - print '
'; - - if ($conf->expedition->enabled && $commande->statut > 0 && $commande->statut < 3 && $user->rights->expedition->creer) - { - print ''.$langs->trans("Send").''; - } - - - if ($commande->statut == 0) - { - if ($user->rights->commande->valider) - { - print ''.$langs->trans("Valid").''; - } - } - - if ($commande->statut == 0 && $user->rights->commande->supprimer) - { - print ''.$langs->trans("Delete").''; - } - - if ($commande->statut == 1) - { - $nb_expedition = $commande->nb_expedition(); - if ($user->rights->commande->valider && $nb_expedition == 0) - { - print ''.$langs->trans("Cancel").''; - } - } - print "
"; - } + /* + * Boutons actions + */ + if ($user->societe_id == 0 && $commande->statut < 3 && $_GET["action"] == '') + { + print '
'; + + if ($conf->expedition->enabled && $commande->statut > 0 && $commande->statut < 3 && $user->rights->expedition->creer) + { + print ''.$langs->trans("Send").''; + } + + + if ($commande->statut == 0) + { + if ($user->rights->commande->valider) + { + print ''.$langs->trans("Valid").''; + } + } + + if ($commande->statut == 0 && $user->rights->commande->supprimer) + { + print ''.$langs->trans("Delete").''; + } + + if ($commande->statut == 1) + { + $nb_expedition = $commande->nb_expedition(); + if ($user->rights->commande->valider && $nb_expedition == 0) + { + print ''.$langs->trans("Cancel").''; + } + } + + print "
"; + } print "
\n"; @@ -790,34 +794,34 @@ else $sql .= " FROM ".MAIN_DB_PREFIX."expedition as e"; $sql .= " WHERE e.fk_commande = ". $commande->id; - $result = $db->query($sql); - if ($result) - { - $num = $db->num_rows($result); - if ($num) - { - print_titre($langs->trans("Sendings")); - $i = 0; $total = 0; - print ''; - print "\n"; - - $var=True; - while ($i < $num) - { - $objp = $db->fetch_object($result); - $var=!$var; - print ""; - print ''; - print "\n"; - $i++; - } - print "
".$langs->trans("Sendings")."".$langs->trans("Date")."
'.img_object($langs->trans("ShowSending"),"sending").' '.$objp->ref.'".dolibarr_print_date($objp->de)."
"; - } - } - else - { - dolibarr_print_error($db); - } + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + if ($num) + { + print_titre($langs->trans("Sendings")); + $i = 0; $total = 0; + print ''; + print "\n"; + + $var=True; + while ($i < $num) + { + $objp = $db->fetch_object($result); + $var=!$var; + print ""; + print ''; + print "\n"; + $i++; + } + print "
".$langs->trans("Sendings")."".$langs->trans("Date")."
'.img_object($langs->trans("ShowSending"),"sending").' '.$objp->ref.'".dolibarr_print_date($objp->de)."
"; + } + } + else + { + dolibarr_print_error($db); + } print " "; /* @@ -881,6 +885,7 @@ else print "\n"; print ''; } + /* * Classe la commande dans un projet * TODO finir le look & feel très moche @@ -899,10 +904,6 @@ else print ''; } - /* - * - * - */ } else { diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index 917bcb838b1..ce415ab468f 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -18,13 +18,12 @@ * * $Id$ * $Source$ - * */ /** \file htdocs/expedition/commande.php - \ingroup expedition - \version $Revision$ + \ingroup expedition + \version $Revision$ */ require("./pre.inc.php"); @@ -32,33 +31,30 @@ require("./pre.inc.php"); $user->getrights('commande'); $user->getrights('expedition'); if (!$user->rights->commande->lire) - accessforbidden(); +accessforbidden(); require("../project.class.php"); require("../propal.class.php"); require("../product/stock/entrepot.class.php"); + +// Sécurité accés client +if ($user->societe_id > 0) +{ + $action = ''; + $socidp = $user->societe_id; +} + + /* - * Sécurité accés client + * Actions */ -if ($user->societe_id > 0) +if ($_POST["action"] == 'confirm_cloture' && $_POST["confirm"] == 'yes') { - $action = ''; - $socidp = $user->societe_id; -} -/* - * - */ - -if ($_POST["action"] == 'confirm_cloture' && $_POST["confirm"] == yes) -{ - $commande = new Commande($db); - $commande->fetch($_GET["id"]); - $result = $commande->cloture($user); + $commande = new Commande($db); + $commande->fetch($_GET["id"]); + $result = $commande->cloture($user); } -llxHeader('','Fiche commande',''); - -$html = new Form($db); /* *************************************************************************** */ /* */ @@ -66,333 +62,346 @@ $html = new Form($db); /* */ /* *************************************************************************** */ +llxHeader('','Fiche commande',''); + +$html = new Form($db); + + if ($_GET["id"] > 0) { - $commande = New Commande($db); - if ( $commande->fetch($_GET["id"]) > 0) - { - $commande->livraison_array(); - - $soc = new Societe($db); - $soc->fetch($commande->soc_id); - $author = new User($db); - $author->id = $commande->user_author_id; - $author->fetch(); + $commande = New Commande($db); + if ( $commande->fetch($_GET["id"]) > 0) + { + $commande->livraison_array(); - $h=0; + $soc = new Societe($db); + $soc->fetch($commande->soc_id); + $author = new User($db); + $author->id = $commande->user_author_id; + $author->fetch(); - if ($conf->commande->enabled && $user->rights->commande->lire) - { - $head[$h][0] = DOL_URL_ROOT.'/commande/fiche.php?id='.$commande->id; - $head[$h][1] = $langs->trans("OrderCard"); - $h++; + $h=0; + + if ($conf->commande->enabled && $user->rights->commande->lire) + { + $head[$h][0] = DOL_URL_ROOT.'/commande/fiche.php?id='.$commande->id; + $head[$h][1] = $langs->trans("OrderCard"); + $h++; } - - if ($conf->expedition->enabled && $user->rights->expedition->lire) - { - $head[$h][0] = DOL_URL_ROOT.'/expedition/commande.php?id='.$commande->id; - $head[$h][1] = $langs->trans("SendingCard"); - $hselected = $h; - $h++; - } - if ($conf->compta->enabled) - { - $head[$h][0] = DOL_URL_ROOT.'/compta/commande/fiche.php?id='.$commande->id; - $head[$h][1] = $langs->trans("ComptaCard"); - $h++; + if ($conf->expedition->enabled && $user->rights->expedition->lire) + { + $head[$h][0] = DOL_URL_ROOT.'/expedition/commande.php?id='.$commande->id; + $head[$h][1] = $langs->trans("SendingCard"); + $hselected = $h; + $h++; } - - dolibarr_fiche_head($head, $hselected, $soc->nom." / ".$langs->trans("Order")." : $commande->ref"); - /* - * Confirmation de la validation - * - */ - if ($_GET["action"] == 'cloture') - { - $html->form_confirm("commande.php?id=".$_GET["id"],"Clôturer la commande","Etes-vous sûr de vouloir clôturer cette commande ?","confirm_cloture"); - print "
"; - } - /* - * - */ - print ''; - print ''; - print ''; - - print '"; - - print ''; - print '\n"; + if ($conf->compta->enabled) + { + $head[$h][0] = DOL_URL_ROOT.'/compta/commande/fiche.php?id='.$commande->id; + $head[$h][1] = $langs->trans("ComptaCard"); + $h++; + } - print '"; - - if ($commande->note) - { - print ''; - print '"; - } - - print '
'.$langs->trans("Customer").''; - print ''.$soc->nom.''; - print $commande->statuts[$commande->statut]; - print "
'.$langs->trans("Date").''.strftime("%A %d %B %Y",$commande->date)."Source : ' . $commande->sources[$commande->source] ; - if ($commande->source == 0) - { - /* Propale */ - $propal = new Propal($db); - $propal->fetch($commande->propale_id); - print ' -> '.$propal->ref.''; - } - print "
Note
Note : '.nl2br($commande->note)."

'; - - /* - * Lignes de commandes - * - */ - echo ''; + dolibarr_fiche_head($head, $hselected, $soc->nom." / ".$langs->trans("Order")." : $commande->ref"); + /* + * Confirmation de la validation + * + */ + if ($_GET["action"] == 'cloture') + { + $html->form_confirm("commande.php?id=".$_GET["id"],"Clôturer la commande","Etes-vous sûr de vouloir clôturer cette commande ?","confirm_cloture"); + print "
"; + } - $sql = "SELECT l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice"; - $sql .= " FROM ".MAIN_DB_PREFIX."commandedet as l "; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON (p.rowid = l.fk_product)"; - $sql .= " WHERE l.fk_commande = ".$commande->id." AND p.fk_product_type <> 1 ORDER BY l.rowid"; - - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows(); - $i = 0; $total = 0; - - if ($num) - { - print ''; - print ''; - print ''; - print ''; - print ''; - if (defined("MAIN_MODULE_STOCK")) - { - print ''; - } - print "\n"; - } - $var=True; - $reste_a_livrer = array(); - while ($i < $num) - { - $objp = $db->fetch_object(); - print ""; - if ($objp->fk_product > 0) - { + print '
'.$langs->trans("Description").'Quan. CommandéeQuan. livréeReste à livrerStock
'; + print ''; + print ''; - $product = new Product($db); - $product->fetch($objp->fk_product); + print '"; - print ''; - } - else - { - print "\n"; - } + print ''; + print '\n"; - print ''; + print '"; - print ''; + if ($commande->note) + { + print ''; + print '"; + } - $reste_a_livrer[$objp->fk_product] = $objp->qty - $quantite_livree; - $reste_a_livrer_x = $objp->qty - $quantite_livree; - $reste_a_livrer_total = $reste_a_livrer_total + $reste_a_livrer_x; - print ''; - - if (defined("MAIN_MODULE_STOCK")) - { - if ($product->stock_reel < $reste_a_livrer_x) - { - print ''; - } - else - { - print ''; - } - } - print ""; - - $i++; - $var=!$var; - } - $db->free(); - print "
'.$langs->trans("Customer").''; + print ''.$soc->nom.''; + print $commande->statuts[$commande->statut]; + print "
'; - print ''.stripslashes(nl2br($objp->description)).'".stripslashes(nl2br($objp->description))."
'.$langs->trans("Date").''.strftime("%A %d %B %Y",$commande->date)."'.$objp->qty.'Source : ' . $commande->sources[$commande->source] ; + if ($commande->source == 0) + { + /* Propale */ + $propal = new Propal($db); + $propal->fetch($commande->propale_id); + print ' -> '.$propal->ref.''; + } + print "
'; - $quantite_livree = $commande->livraisons[$objp->fk_product]; - print $quantite_livree; - print '
'.$langs->trans("Note").'
'.nl2br($commande->note)."
'; - print $reste_a_livrer[$objp->fk_product]; - print ''.$product->stock_reel.''.$product->stock_reel.'
"; - } - else - { - dolibarr_print_error($db); - } - - /* - * - * - */ - if ($reste_a_livrer_total > 0 && $commande->brouillon == 0) - { - - print '
'; - print ''; - print ''; - print '
'; - - $entrepot = new Entrepot($db); - $langs->load("stocks"); - - print ''; - - print ''; - print ''; - /* - print ''; - print ''; - */ - print ''; - - print "
'.$langs->trans("NewSending").'
'.$langs->trans("Warehouse").''; - $html->select_array("entrepot_id",$entrepot->list_array()); - print '
Mode d\'expédition'; - $html->select_array("entrepot_id",$entrepot->list_array()); - print '
'; - if (sizeof($entrepot->list_array())) - { - - print ''; - } - else - { - print 'Aucun entrepôt définit, definissez en un'; - } - print '
"; - print "
\n"; - } - - - /* - * Alerte de seuil - * - */ - if ($reste_a_livrer_total > 0 && defined("MAIN_MODULE_STOCK")) - { - print '
'; - foreach ($reste_a_livrer as $key => $value) - { - if ($value > 0) - { - $sql = "SELECT e.label as entrepot, ps.reel, p.label "; - $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e, ".MAIN_DB_PREFIX."product_stock as ps, ".MAIN_DB_PREFIX."product as p"; - $sql .= " WHERE e.rowid = ps.fk_entrepot AND ps.fk_product = p.rowid AND ps.fk_product = $key"; - $sql .= " AND e.statut = 1 AND reel < $value"; - - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - - $var=True; - while ($i < $num) - { - $obja = $db->fetch_object($resql); - print ""; - print ''; - print "\n"; - $i++; - } - $db->free($resql); - } - } - } - print "
'.$obja->label.''.$obja->entrepot.'Stock : '.$obja->reel.'
"; - } - - print ''; + print '
'; /* - * - * + * Lignes de commandes + * + */ + echo ''; + + $sql = "SELECT l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice"; + $sql.= " FROM ".MAIN_DB_PREFIX."commandedet as l "; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON l.fk_product = p.rowid"; + $sql.= " WHERE l.fk_commande = ".$commande->id; + $sql.= " AND p.fk_product_type <> 1"; + $sql.= " ORDER BY l.rowid"; + + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; $total = 0; + + print ''; + print ''; + print ''; + print ''; + print ''; + if ($conf->stock->enabled) + { + print ''; + } + print "\n"; + + $var=true; + $reste_a_livrer = array(); + while ($i < $num) + { + $objp = $db->fetch_object(); + + $var=!$var; + print ""; + if ($objp->fk_product > 0) + { + + $product = new Product($db); + $product->fetch($objp->fk_product); + + print ''; + } + else + { + print "\n"; + } + + print ''; + + print ''; + + $reste_a_livrer[$objp->fk_product] = $objp->qty - $quantite_livree; + $reste_a_livrer_x = $objp->qty - $quantite_livree; + $reste_a_livrer_total = $reste_a_livrer_total + $reste_a_livrer_x; + print ''; + + if ($conf->stock->enabled) + { + if ($product->stock_reel < $reste_a_livrer_x) + { + print ''; + } + else + { + print ''; + } + } + print ""; + + $i++; + $var=!$var; + } + $db->free(); + print "
'.$langs->trans("Products").'Quan. CommandéeQuan. livréeReste à livrerStock
'; + print ''.stripslashes(nl2br($objp->description)).'".stripslashes(nl2br($objp->description))."'.$objp->qty.''; + $quantite_livree = $commande->livraisons[$objp->fk_product]; + print $quantite_livree; + print ''; + print $reste_a_livrer[$objp->fk_product]; + print ''.$product->stock_reel.''.$product->stock_reel.'
"; + + if (! $num) + { + print $langs->trans("None").'
'; + print '
'; + } + + } + else + { + dolibarr_print_error($db); + } + + /* + * + * + */ + if ($reste_a_livrer_total > 0 && $commande->brouillon == 0) + { + + print '
'; + print ''; + print ''; + print '
'; + + $entrepot = new Entrepot($db); + $langs->load("stocks"); + + print ''; + + print ''; + print ''; + /* + print ''; + print ''; + */ + + print "
'.$langs->trans("NewSending").'
'.$langs->trans("Warehouse").''; + $html->select_array("entrepot_id",$entrepot->list_array()); + if (sizeof($entrepot->list_array()) <= 0) + { + print '   Aucun entrepôt définit, definissez en un'; + } + print '
Mode d\'expédition'; + $html->select_array("entrepot_id",$entrepot->list_array()); + print '

"; + print "
\n"; + } + + + /* + * Alerte de seuil + */ + if ($reste_a_livrer_total > 0 && $conf->stock->enabled) + { + print '
'; + foreach ($reste_a_livrer as $key => $value) + { + if ($value > 0) + { + $sql = "SELECT e.label as entrepot, ps.reel, p.label "; + $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e, ".MAIN_DB_PREFIX."product_stock as ps, ".MAIN_DB_PREFIX."product as p"; + $sql .= " WHERE e.rowid = ps.fk_entrepot AND ps.fk_product = p.rowid AND ps.fk_product = $key"; + $sql .= " AND e.statut = 1 AND reel < $value"; + + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + + $var=True; + while ($i < $num) + { + $obja = $db->fetch_object($resql); + print ""; + print ''; + print "\n"; + $i++; + } + $db->free($resql); + } + else { + dolibarr_print_date($db); + } + + } + } + print "
'.$obja->label.''.$obja->entrepot.'Stock : '.$obja->reel.'
"; + } + + print ''; + + /* + * Boutons Actions */ if ($user->societe_id == 0) { print '
'; - if ($user->rights->expedition->valider && $reste_a_livrer_total == 0 && $commande->statut < 3) + + if ($user->rights->expedition->creer && $reste_a_livrer_total > 0 && $commande->brouillon == 0) + { + print ''.$langs->trans("CreateSending").''; + } + + if ($user->rights->commande->creer && $reste_a_livrer_total == 0 && $commande->statut < 3) { print ''.$langs->trans("Close").''; } - + print "
"; - + } - /* - * Déjà livré - * - * - */ - $sql = "SELECT cd.fk_product, cd.description, cd.rowid, cd.qty as qty_commande, ed.qty as qty_livre, e.ref, e.rowid as expedition_id"; - $sql .= " FROM ".MAIN_DB_PREFIX."commandedet as cd , ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."expedition as e"; - $sql .= " WHERE cd.fk_commande = ".$commande->id." AND cd.rowid = ed.fk_commande_ligne AND ed.fk_expedition = e.rowid"; - $sql .= " ORDER BY e.rowid DESC, cd.fk_product"; - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; $total = 0; - - if ($num) - { - print '
'; - print ''; - print ''; - print ''; - print ''; + /* + * Déjà livr + */ + $sql = "SELECT cd.fk_product, cd.description, cd.rowid, cd.qty as qty_commande, ed.qty as qty_livre, e.ref, e.rowid as expedition_id"; + $sql .= " FROM ".MAIN_DB_PREFIX."commandedet as cd , ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."expedition as e"; + $sql .= " WHERE cd.fk_commande = ".$commande->id." AND cd.rowid = ed.fk_commande_ligne AND ed.fk_expedition = e.rowid"; + $sql .= " ORDER BY e.rowid DESC, cd.fk_product"; + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; $total = 0; - print "\n"; - - $var=True; - while ($i < $num) - { - $objp = $db->fetch_object($resql); - print ""; - if ($objp->fk_product > 0) - { - print ''; - } - else - { - print "\n"; - } - print ''; - print ''; - $i++; - } + if ($num) + { + print '
'.$langs->trans("Description").'Quan. livréeExpédition
'; - print ''.stripslashes(nl2br($objp->description)).'".stripslashes(nl2br($objp->description))."'.$objp->qty_livre.''.$objp->ref.'
'; + print ''; + print ''; + print ''; + print ''; - print '
'.$langs->trans("Description").'Quan. livréeExpédition
'; - } - } + print "\n"; + + $var=True; + while ($i < $num) + { + $objp = $db->fetch_object($resql); + print ""; + if ($objp->fk_product > 0) + { + print ''; + print ''.stripslashes(nl2br($objp->description)).''; + } + else + { + print "".stripslashes(nl2br($objp->description))."\n"; + } + print ''.$objp->qty_livre.''; + print ''.$objp->ref.''; + $i++; + } + + print ''; + } + } + else { + dolibarr_print_date($db); + } } - else + else { - /* Commande non trouvée */ - print "Commande inexistante ou accés refusé"; + /* Commande non trouvée */ + print "Commande inexistante"; } -} +} $db->close(); -llxFooter("Dernière modification $Date$ révision $Revision$"); +llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/expedition/expedition.class.php b/htdocs/expedition/expedition.class.php index 055211eac15..d6bf50f6460 100644 --- a/htdocs/expedition/expedition.class.php +++ b/htdocs/expedition/expedition.class.php @@ -20,15 +20,15 @@ * */ -/*! - \file htdocs/expedition/expedition.class.php - \ingroup expedition - \brief Fichier de la classe de gestion des expeditions - \version $Revision$ +/** + \file htdocs/expedition/expedition.class.php + \ingroup expedition + \brief Fichier de la classe de gestion des expeditions + \version $Revision$ */ -/*! \class Expedition +/** \class Expedition \brief Classe de gestion des expeditions */ class Expedition @@ -58,88 +58,94 @@ class Expedition $this->products = array(); } + /** - * Créé - * - * + * \brief Créé expédition en base + * \param user Objet du user qui cré + * \return int <0 si erreur, id expédition créée si ok */ function create($user) { - require_once DOL_DOCUMENT_ROOT ."/product/stock/mouvementstock.class.php"; - $error = 0; - /* On positionne en mode brouillon la commande */ - $this->brouillon = 1; - + require_once DOL_DOCUMENT_ROOT ."/product/stock/mouvementstock.class.php"; + $error = 0; + /* On positionne en mode brouillon la commande */ + $this->brouillon = 1; + + $this->user = $user; + + $this->db->begin(); + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."expedition (date_creation, fk_user_author, date_expedition, fk_commande"; + if ($this->entrepot_id) $sql.= ", fk_entrepot"; + $sql.= ")"; + $sql.= " VALUES (now(), $user->id, ".$this->db->idate($this->date_expedition).",$this->commande_id"; + if ($this->entrepot_id) $sql.= ", $this->entrepot_id"; + $sql.= ")"; + + $resql=$this->db->query($sql); + if ($resql) + { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."expedition"); + + $sql = "UPDATE ".MAIN_DB_PREFIX."expedition SET ref='(PROV".$this->id.")' WHERE rowid=".$this->id; + if ($this->db->query($sql)) + { + + $this->commande = new Commande($this->db); + $this->commande->id = $this->commande_id; + $this->commande->fetch_lignes(); + + /* + * Insertion des produits dans la base + */ + for ($i = 0 ; $i < sizeof($this->lignes) ; $i++) + { + //TODO + if (! $this->create_line(0, $this->lignes[$i]->commande_ligne_id, $this->lignes[$i]->qty)) + { + $error++; + } + } - $this->user = $user; - $this->db->begin(); - - $sql = "INSERT INTO ".MAIN_DB_PREFIX."expedition (date_creation, fk_user_author, date_expedition, fk_commande, fk_entrepot) "; - $sql .= " VALUES (now(), $user->id, ".$this->db->idate($this->date_expedition).",$this->commande_id, $this->entrepot_id)"; - - if ( $this->db->query($sql) ) - { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."expedition"); - - /* - * - * - */ - - $sql = "UPDATE ".MAIN_DB_PREFIX."expedition SET ref='(PROV".$this->id.")' WHERE rowid=".$this->id; - if ($this->db->query($sql)) - { - - $this->commande = new Commande($this->db); - $this->commande->id = $this->commande_id; - $this->commande->fetch_lignes(); - - /* - * Insertion des produits dans la base - */ - for ($i = 0 ; $i < sizeof($this->lignes) ; $i++) - { - //TODO - if (! $this->create_line(0, $this->lignes[$i]->commande_ligne_id, $this->lignes[$i]->qty)) - { - $error++; - } - } - /* - * - * - */ - $sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_statut = 2 WHERE rowid=".$this->commande_id; - if (! $this->db->query($sql)) - { - $error++; - } - - - if ($error ==0) - { - $this->db->commit(); - } - else - { - $this->db->rollback(); - } - - return $this->id; - } - else - { - $error++; - return -1; - } - } - else - { - $error++; - print $this->db->error() . '
'.$sql; - return 0; - } + /* + * + */ + $sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_statut = 2 WHERE rowid=".$this->commande_id; + if (! $this->db->query($sql)) + { + $error++; + } + + if ($error==0) + { + $this->db->commit(); + return $this->id; + } + else + { + $error++; + $this->error=$this->db->error()." - sql=$sql"; + $this->db->rollback(); + return -3; + } + } + else + { + $error++; + $this->error=$this->db->error()." - sql=$sql"; + $this->db->rollback(); + return -2; + } + } + else + { + $error++; + $this->error=$this->db->error()." - sql=$sql"; + $this->db->rollback(); + return -1; + } } + /** * * @@ -215,58 +221,61 @@ class Expedition } /** - * Valide l'expedition - * - * + * \brief Valide l'expedition + * \param user Objet de l'utilisateur qui valide + * \return int */ - function valid($user) + function valid($user) { - require_once DOL_DOCUMENT_ROOT ."/product/stock/mouvementstock.class.php"; - - $result = 0; - if ($user->rights->expedition->valider) - { - $this->ref = "EXP".$this->id; - - $sql = "UPDATE ".MAIN_DB_PREFIX."expedition SET ref='".$this->ref."', fk_statut = 1, date_valid=now(), fk_user_valid=$user->id"; - $sql .= " WHERE rowid = $this->id AND fk_statut = 0 ;"; - - if ($this->db->query($sql) ) - { - $result = 1; - - /* - * Enregistrement d'un mouvement de stock - * pour chaque ligne produit de l'expedition - */ - - $sql = "SELECT cd.fk_product, ed.qty "; - $sql .= " FROM ".MAIN_DB_PREFIX."commandedet as cd , ".MAIN_DB_PREFIX."expeditiondet as ed"; - $sql .= " WHERE ed.fk_expedition = $this->id AND cd.rowid = ed.fk_commande_ligne "; - - if ($this->db->query($sql)) - { - $num = $this->db->num_rows(); - $i=0; - while($i < $num) - { - $mouvS = new MouvementStock($this->db); - $obj = $this->db->fetch_object(); - $mouvS->livraison($user, $obj->fk_product, $this->entrepot_id, $obj->qty, 0); - $i++; - } - } - - } - else - { - $result = -1; - print $this->db->error() . ' in ' . $sql; - } - } - return $result ; + require_once DOL_DOCUMENT_ROOT ."/product/stock/mouvementstock.class.php"; + + $result = 0; + if ($user->rights->expedition->valider) + { + $this->ref = "EXP".$this->id; + + $sql = "UPDATE ".MAIN_DB_PREFIX."expedition SET ref='".$this->ref."', fk_statut = 1, date_valid=now(), fk_user_valid=$user->id"; + $sql .= " WHERE rowid = $this->id AND fk_statut = 0 ;"; + + if ($this->db->query($sql) ) + { + $result = 1; + + // Si module stock géré et que expedition faite depuis un entrepot + if ($conf->stock->enabled && $this->entrepot_id) + { + /* + * Enregistrement d'un mouvement de stock pour chaque produit de l'expedition + */ + + $sql = "SELECT cd.fk_product, ed.qty "; + $sql .= " FROM ".MAIN_DB_PREFIX."commandedet as cd , ".MAIN_DB_PREFIX."expeditiondet as ed"; + $sql .= " WHERE ed.fk_expedition = $this->id AND cd.rowid = ed.fk_commande_ligne "; + + if ($this->db->query($sql)) + { + $num = $this->db->num_rows(); + $i=0; + while($i < $num) + { + $mouvS = new MouvementStock($this->db); + $obj = $this->db->fetch_object(); + $mouvS->livraison($user, $obj->fk_product, $this->entrepot_id, $obj->qty, 0); + $i++; + } + } + } + } + else + { + $result = -1; + $this->error=$this->db->error()." - sql=".$sql; + } + } + return $result ; } + /** * Ajoute un produit * diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 543b44f68c5..69a6ac586f6 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -21,11 +21,11 @@ * */ -/*! - \file htdocs/expedition/fiche.php - \ingroup expedition - \brief Fiche descriptive d'une expedition - \version $Revision$ +/** + \file htdocs/expedition/fiche.php + \ingroup expedition + \brief Fiche descriptive d'une expedition + \version $Revision$ */ require("./pre.inc.php"); @@ -37,53 +37,59 @@ if (!$user->rights->expedition->lire) require("../propal.class.php"); require("../product/stock/entrepot.class.php"); -/* - * Sécurité accés client - */ +// Sécurité accés client if ($user->societe_id > 0) { $action = ''; $socidp = $user->societe_id; } + + /* - * + * Actions */ if ($_POST["action"] == 'add') { - $expedition = new Expedition($db); - - $expedition->date_expedition = time(); - $expedition->note = $_POST["note"]; - $expedition->commande_id = $_POST["commande_id"]; - $expedition->entrepot_id = $_POST["entrepot_id"]; - - $commande = new Commande($db); - $commande->fetch($expedition->commande_id); - $commande->fetch_lignes(); - - for ($i = 0 ; $i < sizeof($commande->lignes) ; $i++) + $expedition = new Expedition($db); + + $expedition->date_expedition = time(); + $expedition->note = $_POST["note"]; + $expedition->commande_id = $_POST["commande_id"]; + $expedition->entrepot_id = $_POST["entrepot_id"]; + + $commande = new Commande($db); + $commande->fetch($expedition->commande_id); + $commande->fetch_lignes(); + + $db->begin(); + + for ($i = 0 ; $i < sizeof($commande->lignes) ; $i++) { - $qty = "qtyl".$i; - $idl = "idl".$i; - if ($_POST[$qty] > 0) - { - $expedition->addline($_POST[$idl],$_POST[$qty]); - } + $qty = "qtyl".$i; + $idl = "idl".$i; + if ($_POST[$qty] > 0) + { + $expedition->addline($_POST[$idl],$_POST[$qty]); + } + } + + $ret=$expedition->create($user); + if ($ret > 0) + { + $db->commit(); + Header("Location: fiche.php?id=".$expedition->id); + exit; + } + else + { + $db->rollback(); + $mesg='
'.$expedition->error.'
'; + $_GET["commande_id"]=$_POST["commande_id"]; + $_GET["action"]='create'; } - - $expedition->create($user); - - $id = $expedition->id; - - Header("Location:fiche.php?id=$id"); } -/* - * - */ - - if ($_POST["action"] == 'confirm_valid' && $_POST["confirm"] == 'yes' && $user->rights->expedition->valider) { $expedition = new Expedition($db); @@ -110,6 +116,7 @@ if ($_GET["action"] == 'pdf') $expedition->PdfWrite(); } + /* * */ @@ -120,18 +127,22 @@ $html = new Form($db); * * Mode creation * - * - ************************************************************************/ -if ($_POST["action"] == 'create') + *********************************************************************/ +if ($_GET["action"] == 'create') { llxHeader('','Fiche expedition','ch-expedition.html',$form_search); - print_titre("Créer une expédition"); + print_titre($langs->trans("CreateASending")); + if ($mesg) + { + print $mesg.'
'; + } + $commande = new Commande($db); $commande->livraison_array(); - if ( $commande->fetch($_POST["commande_id"])) + if ( $commande->fetch($_GET["commande_id"])) { $soc = new Societe($db); $soc->fetch($commande->soc_id); @@ -146,25 +157,25 @@ if ($_POST["action"] == 'create') print '
'; print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print '
Client
'; + print ''; print ''; print '"; - print ""; + print ""; print "\n"; - print '\n"; - print ''; + print ''; print ''; print "\n"; @@ -178,7 +189,7 @@ if ($_POST["action"] == 'create') * Lignes de commandes * */ - echo '
'.$langs->trans("Customer").''.$soc->nom.''; print "
Date
".$langs->trans("Date")."".strftime("%A %d %B %Y",$commande->date)."Commande : ' . $commande->ref ; + print ''.$langs->trans("Order").': ' . $commande->ref; print "
Entrepôt
'.$langs->trans("Warehouse").''; $ents = $entrepot->list_array(); - print $ents[$_POST["entrepot_id"]]; + print $ents[$_GET["entrepot_id"]]; print '".$langs->trans("Author")."$author->fullname
'; + echo '
'; $lignes = $commande->fetch_lignes(1); @@ -195,16 +206,17 @@ if ($_POST["action"] == 'create') print ''; print ''; print ''; - if (defined("MAIN_MODULE_STOCK")) + if ($conf->stock->enabled) { - print ''; + print ''; } print "\n"; } - $var=True; + $var=true; while ($i < $num) { $ligne = $commande->lignes[$i]; + $var=!$var; print "\n"; if ($ligne->product_id > 0) { @@ -216,7 +228,7 @@ if ($_POST["action"] == 'create') } else { - print "\n"; + print "\n"; } print ''; @@ -236,7 +248,7 @@ if ($_POST["action"] == 'create') $quantite_commandee = $ligne->qty; $quantite_a_livrer = $quantite_commandee - $quantite_livree; - if (defined("MAIN_MODULE_STOCK")) + if ($conf->stock->enabled) { $stock = $product->stock_entrepot[$_POST["entrepot_id"]]; @@ -267,13 +279,13 @@ if ($_POST["action"] == 'create') * */ - print ''; + print ''; print "
Quan. commandéeQuan. livréeQuan. à livrerStock'.$langs->trans("Stock").'
".nl2br($ligne->description)."".nl2br($ligne->description)."'.$ligne->qty.'

"; print '
'; } else { - print $db->error() . "
$sql";; + dolibarr_print_error($db); } } else @@ -283,6 +295,7 @@ else /* */ /* *************************************************************************** */ { + if ($_GET["id"] > 0) { $expedition = New Expedition($db); @@ -345,8 +358,8 @@ else print ''; } - print '
'; - print ''; + print '
Client
'; + print ''; print ''; @@ -354,17 +367,17 @@ else print ""; - print ""; + print ''; print '\n"; print ''; - print ""; + print ''; print "\n"; $entrepot = new Entrepot($db); $entrepot->fetch($expedition->entrepot_id); - print ''; + print ''; print "
'.$langs->trans("Customer").''; print ''.$soc->nom.'
Commande
'.$langs->trans("Order").''.$commande->ref."  
Date
'.$langs->trans("Date").'".strftime("%A %d %B %Y",$expedition->date)."Entrepôt'.$entrepot->libelle.'
'.$langs->trans("Warehouse").''.$entrepot->libelle.'
\n"; @@ -385,19 +398,20 @@ else { $num_prod = $db->num_rows($resql); $i = 0; - print ''; - print ''.$langs->trans("Description").''; + print ''.$langs->trans("Products").''; print 'Quan. commandée'; print 'Quan. livrée'; print "\n"; - $var=True; + $var=true; while ($i < $num_prod) { $objp = $db->fetch_object($resql); - print ""; + + $var=!$var; + print ""; if ($objp->fk_product > 0) { print ''; @@ -422,25 +436,28 @@ else dolibarr_print_error($db); } - print "\n"; + print "
\n"; + + print "\n\n"; + /* * */ $file = $expedition->pdf_filename; if (file_exists($file)) { - print '
'; + print_titre($langs->trans("Documents")); + print '
'; print ""; $b = ereg_replace($conf->expedition->dir_output."/","",$file); print ''; print ''; - print ''; + print ''; print "
".$langs->trans("Sending")." PDF'.basename($file).''.filesize($file). ' bytes'.strftime("%e %B %Y %H:%M:%S",filemtime($file)).'
'.dolibarr_print_date(filemtime($file),"%d %B %Y %H:%M:%S").'
"; } - print "\n\n"; /* * @@ -639,5 +656,5 @@ else $db->close(); -llxFooter("Dernière modification $Date$ révision $Revision$"); +llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/expedition/mods/pdf/pdf_expedition.class.php b/htdocs/expedition/mods/pdf/pdf_expedition.class.php index 866064e9f8e..14c1ba709a7 100644 --- a/htdocs/expedition/mods/pdf/pdf_expedition.class.php +++ b/htdocs/expedition/mods/pdf/pdf_expedition.class.php @@ -24,7 +24,7 @@ require_once DOL_DOCUMENT_ROOT.'/includes/fpdf/DolibarrPdfBarCode.class.php'; -Class ModelePdfExpedition extends DolibarrPdfBarCode +Class pdf_expedition extends DolibarrPdfBarCode { diff --git a/htdocs/expedition/mods/pdf/pdf_expedition_rouget.modules.php b/htdocs/expedition/mods/pdf/pdf_expedition_rouget.modules.php index d1859bf56ac..06eb4435394 100644 --- a/htdocs/expedition/mods/pdf/pdf_expedition_rouget.modules.php +++ b/htdocs/expedition/mods/pdf/pdf_expedition_rouget.modules.php @@ -24,7 +24,7 @@ require_once DOL_DOCUMENT_ROOT."/expedition/mods/pdf/pdf_expedition.class.php"; -Class pdf_expedition_rouget extends ModelePdfExpedition +Class pdf_expedition_rouget extends pdf_expedition { function pdf_expedition_rouget($db=0) diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index 404166fe0c4..fb495b797d6 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -9,4 +9,6 @@ SearchASending=Search a sending StatisticsOfSendings=Statistics of sendings NbOfSendings=Number of sendings SendingCard=Sending Card -NewSending=New sending \ No newline at end of file +NewSending=New sending +CreateASending=Create a sending +CreateSending=Create sending \ No newline at end of file diff --git a/htdocs/langs/fr_FR/sendings.lang b/htdocs/langs/fr_FR/sendings.lang index d3bdcfce0f2..7d9cd6ae608 100644 --- a/htdocs/langs/fr_FR/sendings.lang +++ b/htdocs/langs/fr_FR/sendings.lang @@ -10,3 +10,5 @@ StatisticsOfSendings=Statistiques des exp NbOfSendings=Nombre d'expéditions SendingCard=Fiche Expédition NewSending=Nouvelle expédition +CreateASending=Créer une expedition +CreateSending=Créer expedition