Add navigation on order pages
This commit is contained in:
parent
4e01c23974
commit
f31fd284a7
@ -17,117 +17,117 @@
|
|||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/boutique/commande/commande.class.php
|
\file htdocs/boutique/commande/commande.class.php
|
||||||
\ingroup osc
|
\ingroup osc
|
||||||
\brief Fichier de la classe des commandes OSC
|
\brief Fichier de la classe des commandes OSC
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/core/address.class.php");
|
require_once(DOL_DOCUMENT_ROOT ."/core/address.class.php");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\class Commande
|
\class Commande
|
||||||
\brief Classe permettant la gestion des commandes OSC
|
\brief Classe permettant la gestion des commandes OSC
|
||||||
*/
|
*/
|
||||||
class Commande
|
class Commande
|
||||||
{
|
{
|
||||||
var $db ;
|
var $db ;
|
||||||
|
|
||||||
var $id ;
|
var $id ;
|
||||||
var $nom;
|
var $nom;
|
||||||
|
|
||||||
function Commande($DB, $id=0) {
|
function Commande($DB, $id=0) {
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
$this->id = $id ;
|
$this->id = $id ;
|
||||||
|
|
||||||
$this->billing_adr = new Address();
|
$this->billing_adr = new Address();
|
||||||
$this->delivry_adr = new Address();
|
$this->delivry_adr = new Address();
|
||||||
|
|
||||||
$this->total_ot_subtotal = 0;
|
$this->total_ot_subtotal = 0;
|
||||||
$this->total_ot_shipping = 0;
|
$this->total_ot_shipping = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
function fetch ($id) {
|
|
||||||
|
|
||||||
$sql = "SELECT orders_id, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, last_modified, ".$this->db->pdate("date_purchased") . " as date_purchased, orders_status, orders_date_finished, currency, currency_value";
|
/**
|
||||||
|
* \brief Get object and lines from database
|
||||||
|
* \param rowid id of object to load
|
||||||
$sql .= " FROM ".OSC_DB_NAME.".".OSC_DB_TABLE_PREFIX."orders WHERE orders_id = $id";
|
* \param ref Ref of order
|
||||||
|
* \return int >0 si ok, <0 si ko
|
||||||
$result = $this->db->query($sql) ;
|
|
||||||
|
|
||||||
if ( $result )
|
|
||||||
{
|
|
||||||
$array = $this->db->fetch_array();
|
|
||||||
|
|
||||||
$this->id = $array["orders_id"];
|
|
||||||
$this->client_id = stripslashes($array["customers_id"]);
|
|
||||||
$this->client_name = stripslashes($array["customers_name"]);
|
|
||||||
|
|
||||||
$this->payment_method = stripslashes($array["payment_method"]);
|
|
||||||
|
|
||||||
$this->date = dolibarr_print_date($array["date_purchased"],'dayhour');
|
|
||||||
|
|
||||||
$this->delivery_adr->name = stripslashes($array["delivery_name"]);
|
|
||||||
$this->delivery_adr->street = stripslashes($array["delivery_street_address"]);
|
|
||||||
$this->delivery_adr->cp = stripslashes($array["delivery_postcode"]);
|
|
||||||
$this->delivery_adr->city = stripslashes($array["delivery_city"]);
|
|
||||||
$this->delivery_adr->country = stripslashes($array["delivery_country"]);
|
|
||||||
|
|
||||||
$this->billing_adr->name = stripslashes($array["billing_name"]);
|
|
||||||
$this->billing_adr->street = stripslashes($array["billing_street_address"]);
|
|
||||||
$this->billing_adr->cp = stripslashes($array["billing_postcode"]);
|
|
||||||
$this->billing_adr->city = stripslashes($array["billing_city"]);
|
|
||||||
$this->billing_adr->country = stripslashes($array["billing_country"]);
|
|
||||||
|
|
||||||
$this->db->free();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Totaux
|
|
||||||
*/
|
*/
|
||||||
$sql = "SELECT value, class ";
|
function fetch ($id,$ref='')
|
||||||
$sql .= " FROM ".OSC_DB_NAME.".".OSC_DB_TABLE_PREFIX."orders_total WHERE orders_id = $id";
|
{
|
||||||
|
$sql = "SELECT orders_id, customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, last_modified, ".$this->db->pdate("date_purchased") . " as date_purchased, orders_status, orders_date_finished, currency, currency_value";
|
||||||
|
$sql.= " FROM ".OSC_DB_NAME.".".OSC_DB_TABLE_PREFIX."orders";
|
||||||
|
$sql.= " WHERE orders_id = ".$id;
|
||||||
|
|
||||||
$result = $this->db->query($sql) ;
|
$result = $this->db->query($sql) ;
|
||||||
|
|
||||||
if ( $result )
|
if ( $result )
|
||||||
|
{
|
||||||
|
$array = $this->db->fetch_array();
|
||||||
|
|
||||||
|
$this->id = $array["orders_id"];
|
||||||
|
$this->client_id = stripslashes($array["customers_id"]);
|
||||||
|
$this->client_name = stripslashes($array["customers_name"]);
|
||||||
|
|
||||||
|
$this->payment_method = stripslashes($array["payment_method"]);
|
||||||
|
|
||||||
|
$this->date = dolibarr_print_date($array["date_purchased"],'dayhour');
|
||||||
|
|
||||||
|
$this->delivery_adr->name = stripslashes($array["delivery_name"]);
|
||||||
|
$this->delivery_adr->street = stripslashes($array["delivery_street_address"]);
|
||||||
|
$this->delivery_adr->cp = stripslashes($array["delivery_postcode"]);
|
||||||
|
$this->delivery_adr->city = stripslashes($array["delivery_city"]);
|
||||||
|
$this->delivery_adr->country = stripslashes($array["delivery_country"]);
|
||||||
|
|
||||||
|
$this->billing_adr->name = stripslashes($array["billing_name"]);
|
||||||
|
$this->billing_adr->street = stripslashes($array["billing_street_address"]);
|
||||||
|
$this->billing_adr->cp = stripslashes($array["billing_postcode"]);
|
||||||
|
$this->billing_adr->city = stripslashes($array["billing_city"]);
|
||||||
|
$this->billing_adr->country = stripslashes($array["billing_country"]);
|
||||||
|
|
||||||
|
$this->db->free();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Totaux
|
||||||
|
*/
|
||||||
|
$sql = "SELECT value, class ";
|
||||||
|
$sql .= " FROM ".OSC_DB_NAME.".".OSC_DB_TABLE_PREFIX."orders_total WHERE orders_id = $id";
|
||||||
|
|
||||||
|
$result = $this->db->query($sql) ;
|
||||||
|
|
||||||
|
if ( $result )
|
||||||
{
|
{
|
||||||
$num = $this->db->num_rows();
|
$num = $this->db->num_rows();
|
||||||
|
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$array = $this->db->fetch_array($i);
|
$array = $this->db->fetch_array($i);
|
||||||
if ($array["class"] == 'ot_total')
|
if ($array["class"] == 'ot_total')
|
||||||
{
|
{
|
||||||
$this->total_ot_total = $array["value"];
|
$this->total_ot_total = $array["value"];
|
||||||
}
|
}
|
||||||
if ($array["class"] == 'ot_shipping')
|
if ($array["class"] == 'ot_shipping')
|
||||||
{
|
{
|
||||||
$this->total_ot_shipping = $array["value"];
|
$this->total_ot_shipping = $array["value"];
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $this->db->error();
|
print $this->db->error();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $this->db->error();
|
print $this->db->error();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -207,7 +207,7 @@ class Commande extends CommonObject
|
|||||||
function valid($user)
|
function valid($user)
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
// Protection
|
// Protection
|
||||||
@ -303,7 +303,7 @@ class Commande extends CommonObject
|
|||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($error == 0)
|
if ($error == 0)
|
||||||
{
|
{
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
@ -344,7 +344,7 @@ class Commande extends CommonObject
|
|||||||
$this->error='Permission denied';
|
$this->error='Permission denied';
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_statut = 0";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."commande SET fk_statut = 0";
|
||||||
@ -379,7 +379,7 @@ class Commande extends CommonObject
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->statut=0;
|
$this->statut=0;
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
@ -435,7 +435,7 @@ class Commande extends CommonObject
|
|||||||
if ($user->rights->commande->valider)
|
if ($user->rights->commande->valider)
|
||||||
{
|
{
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET fk_statut = -1';
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande SET fk_statut = -1';
|
||||||
$sql .= " WHERE rowid = $this->id AND fk_statut = 1 ;";
|
$sql .= " WHERE rowid = $this->id AND fk_statut = 1 ;";
|
||||||
|
|
||||||
@ -448,7 +448,7 @@ class Commande extends CommonObject
|
|||||||
// We increment stock of product (and sub-products)
|
// We increment stock of product (and sub-products)
|
||||||
$entrepot_id = "1"; //Todo: ajouter possibilite de choisir l'entrepot
|
$entrepot_id = "1"; //Todo: ajouter possibilite de choisir l'entrepot
|
||||||
$result=$mouvP->reception($user, $this->lignes[$i]->fk_product, $entrepot_id, $this->lignes[$i]->qty);
|
$result=$mouvP->reception($user, $this->lignes[$i]->fk_product, $entrepot_id, $this->lignes[$i]->qty);
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
@ -461,7 +461,7 @@ class Commande extends CommonObject
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -816,10 +816,12 @@ class Commande extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Load an order from database
|
* \brief Get object and lines from database
|
||||||
* \param rowid id de la commande a recuperer
|
* \param rowid id of object to load
|
||||||
|
* \param ref Ref of invoice
|
||||||
|
* \return int >0 if OK, <0 if KO
|
||||||
*/
|
*/
|
||||||
function fetch($id)
|
function fetch($id,$ref='')
|
||||||
{
|
{
|
||||||
$sql = 'SELECT c.rowid, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_statut';
|
$sql = 'SELECT c.rowid, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_statut';
|
||||||
$sql.= ', c.amount_ht, c.total_ht, c.total_ttc, c.tva as total_tva, c.fk_cond_reglement, c.fk_mode_reglement';
|
$sql.= ', c.amount_ht, c.total_ht, c.total_ttc, c.tva as total_tva, c.fk_cond_reglement, c.fk_mode_reglement';
|
||||||
@ -834,89 +836,89 @@ class Commande extends CommonObject
|
|||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'cond_reglement as cr ON (c.fk_cond_reglement = cr.rowid)';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'cond_reglement as cr ON (c.fk_cond_reglement = cr.rowid)';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON (c.fk_mode_reglement = p.id)';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON (c.fk_mode_reglement = p.id)';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'co_pr as cp ON (cp.fk_commande = c.rowid)';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'co_pr as cp ON (cp.fk_commande = c.rowid)';
|
||||||
$sql.= ' WHERE c.rowid = '.$id;
|
if ($ref) $sql.= " WHERE c.ref='".$ref."'";
|
||||||
|
else $sql.= " WHERE c.rowid=".$id;
|
||||||
|
|
||||||
dolibarr_syslog("Commande::fetch sql=$sql");
|
dolibarr_syslog("Commande::fetch sql=$sql");
|
||||||
|
|
||||||
$result = $this->db->query($sql) ;
|
$result = $this->db->query($sql) ;
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($result);
|
$obj = $this->db->fetch_object($result);
|
||||||
if ($obj)
|
if ($obj)
|
||||||
{
|
{
|
||||||
$this->id = $obj->rowid;
|
$this->id = $obj->rowid;
|
||||||
$this->ref = $obj->ref;
|
$this->ref = $obj->ref;
|
||||||
$this->ref_client = $obj->ref_client;
|
$this->ref_client = $obj->ref_client;
|
||||||
$this->socid = $obj->fk_soc;
|
$this->socid = $obj->fk_soc;
|
||||||
$this->statut = $obj->fk_statut;
|
$this->statut = $obj->fk_statut;
|
||||||
$this->user_author_id = $obj->fk_user_author;
|
$this->user_author_id = $obj->fk_user_author;
|
||||||
$this->total_ht = $obj->total_ht;
|
$this->total_ht = $obj->total_ht;
|
||||||
$this->total_tva = $obj->total_tva;
|
$this->total_tva = $obj->total_tva;
|
||||||
$this->total_ttc = $obj->total_ttc;
|
$this->total_ttc = $obj->total_ttc;
|
||||||
$this->date = $obj->date_commande;
|
$this->date = $obj->date_commande;
|
||||||
$this->remise = $obj->remise;
|
$this->remise = $obj->remise;
|
||||||
$this->remise_percent = $obj->remise_percent;
|
$this->remise_percent = $obj->remise_percent;
|
||||||
$this->remise_absolue = $obj->remise_absolue;
|
$this->remise_absolue = $obj->remise_absolue;
|
||||||
$this->source = $obj->source;
|
$this->source = $obj->source;
|
||||||
$this->facturee = $obj->facturee;
|
$this->facturee = $obj->facturee;
|
||||||
$this->note = $obj->note;
|
$this->note = $obj->note;
|
||||||
$this->note_public = $obj->note_public;
|
$this->note_public = $obj->note_public;
|
||||||
$this->projet_id = $obj->fk_projet;
|
$this->projet_id = $obj->fk_projet;
|
||||||
$this->modelpdf = $obj->model_pdf;
|
$this->modelpdf = $obj->model_pdf;
|
||||||
$this->mode_reglement_id = $obj->fk_mode_reglement;
|
$this->mode_reglement_id = $obj->fk_mode_reglement;
|
||||||
$this->mode_reglement_code = $obj->mode_reglement_code;
|
$this->mode_reglement_code = $obj->mode_reglement_code;
|
||||||
$this->mode_reglement = $obj->mode_reglement_libelle;
|
$this->mode_reglement = $obj->mode_reglement_libelle;
|
||||||
$this->cond_reglement_id = $obj->fk_cond_reglement;
|
$this->cond_reglement_id = $obj->fk_cond_reglement;
|
||||||
$this->cond_reglement_code = $obj->cond_reglement_code;
|
$this->cond_reglement_code = $obj->cond_reglement_code;
|
||||||
$this->cond_reglement = $obj->cond_reglement_libelle;
|
$this->cond_reglement = $obj->cond_reglement_libelle;
|
||||||
$this->cond_reglement_facture = $obj->cond_reglement_libelle_facture;
|
$this->cond_reglement_facture = $obj->cond_reglement_libelle_facture;
|
||||||
$this->date_livraison = $obj->date_livraison;
|
$this->date_livraison = $obj->date_livraison;
|
||||||
$this->adresse_livraison_id = $obj->fk_adresse_livraison;
|
$this->adresse_livraison_id = $obj->fk_adresse_livraison;
|
||||||
$this->propale_id = $obj->fk_propale;
|
$this->propale_id = $obj->fk_propale;
|
||||||
$this->lignes = array();
|
$this->lignes = array();
|
||||||
|
|
||||||
if ($this->statut == 0) $this->brouillon = 1;
|
|
||||||
|
|
||||||
$this->db->free();
|
if ($this->statut == 0) $this->brouillon = 1;
|
||||||
|
|
||||||
if ($this->propale_id)
|
|
||||||
{
|
|
||||||
$sqlp = "SELECT ref";
|
|
||||||
$sqlp.= " FROM ".MAIN_DB_PREFIX."propal";
|
|
||||||
$sqlp.= " WHERE rowid = ".$this->propale_id;
|
|
||||||
|
|
||||||
$resqlprop = $this->db->query($sqlp);
|
$this->db->free();
|
||||||
|
|
||||||
if ($resqlprop)
|
if ($this->propale_id)
|
||||||
{
|
{
|
||||||
$objp = $this->db->fetch_object($resqlprop);
|
$sqlp = "SELECT ref";
|
||||||
$this->propale_ref = $objp->ref;
|
$sqlp.= " FROM ".MAIN_DB_PREFIX."propal";
|
||||||
$this->db->free($resqlprop);
|
$sqlp.= " WHERE rowid = ".$this->propale_id;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
$resqlprop = $this->db->query($sqlp);
|
||||||
* Lignes
|
|
||||||
*/
|
if ($resqlprop)
|
||||||
$result=$this->fetch_lines();
|
{
|
||||||
if ($result < 0)
|
$objp = $this->db->fetch_object($resqlprop);
|
||||||
{
|
$this->propale_ref = $objp->ref;
|
||||||
return -3;
|
$this->db->free($resqlprop);
|
||||||
}
|
}
|
||||||
return 1;
|
}
|
||||||
}
|
|
||||||
else
|
/*
|
||||||
{
|
* Lignes
|
||||||
dolibarr_syslog('Commande::Fetch Error rowid='.$rowid.' numrows=0 sql='.$sql);
|
*/
|
||||||
$this->error='Order with id '.$rowid.' not found sql='.$sql;
|
$result=$this->fetch_lines();
|
||||||
return -2;
|
if ($result < 0)
|
||||||
}
|
{
|
||||||
|
return -3;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dolibarr_syslog('Commande::Fetch Error rowid='.$rowid.' numrows=0 sql='.$sql);
|
||||||
|
$this->error='Order with id '.$rowid.' not found sql='.$sql;
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dolibarr_syslog('Commande::Fetch Error rowid='.$rowid.' Erreur dans fetch de la commande');
|
dolibarr_syslog('Commande::Fetch Error rowid='.$rowid.' Erreur dans fetch de la commande');
|
||||||
$this->error=$this->db->error();
|
$this->error=$this->db->error();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1812,7 +1814,7 @@ class Commande extends CommonObject
|
|||||||
global $conf, $user;
|
global $conf, $user;
|
||||||
|
|
||||||
$now=gmmktime();
|
$now=gmmktime();
|
||||||
|
|
||||||
$this->nbtodo=$this->nbtodolate=0;
|
$this->nbtodo=$this->nbtodolate=0;
|
||||||
$clause = "WHERE";
|
$clause = "WHERE";
|
||||||
|
|
||||||
|
|||||||
@ -154,14 +154,15 @@ $contactstatic=new Contact($db);
|
|||||||
/* Mode vue et edition */
|
/* Mode vue et edition */
|
||||||
/* */
|
/* */
|
||||||
/* *************************************************************************** */
|
/* *************************************************************************** */
|
||||||
if ( isset($mesg))
|
if (isset($mesg)) print $mesg;
|
||||||
print $mesg;
|
|
||||||
$id = $_GET["id"];
|
$id = $_GET['id'];
|
||||||
if ($id > 0)
|
$ref= $_GET['ref'];
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$langs->trans("OrderCard");
|
$langs->trans("OrderCard");
|
||||||
$commande = New Commande($db);
|
$commande = new Commande($db);
|
||||||
if ( $commande->fetch($_GET['id'], $user->societe_id) > 0)
|
if ( $commande->fetch($_GET['id'],$_GET['ref']) > 0)
|
||||||
{
|
{
|
||||||
$soc = new Societe($db, $commande->socid);
|
$soc = new Societe($db, $commande->socid);
|
||||||
$soc->fetch($commande->socid);
|
$soc->fetch($commande->socid);
|
||||||
@ -178,7 +179,7 @@ if ($id > 0)
|
|||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="18%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
print '<tr><td width="18%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||||
print $commande->ref;
|
print $html->showrefnav($commande,'ref','',1,'ref','ref');
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Ref commande client
|
// Ref commande client
|
||||||
|
|||||||
@ -20,11 +20,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/commande/document.php
|
\file htdocs/commande/document.php
|
||||||
\ingroup order
|
\ingroup order
|
||||||
\brief Page de gestion des documents attachees a une commande
|
\brief Page de gestion des documents attachees a une commande
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('./pre.inc.php');
|
require('./pre.inc.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/lib/order.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/lib/order.lib.php');
|
||||||
@ -32,7 +32,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
|
||||||
|
|
||||||
if (!$user->rights->commande->lire)
|
if (!$user->rights->commande->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$langs->load('companies');
|
$langs->load('companies');
|
||||||
//$langs->load("bills");
|
//$langs->load("bills");
|
||||||
@ -42,10 +42,10 @@ $id=empty($_GET['id']) ? 0 : intVal($_GET['id']);
|
|||||||
$action=empty($_GET['action']) ? (empty($_POST['action']) ? '' : $_POST['action']) : $_GET['action'];
|
$action=empty($_GET['action']) ? (empty($_POST['action']) ? '' : $_POST['action']) : $_GET['action'];
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
unset($_GET["action"]);
|
unset($_GET["action"]);
|
||||||
$action='';
|
$action='';
|
||||||
$socid = $user->societe_id;
|
$socid = $user->societe_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,63 +62,70 @@ $pageprev = $page - 1;
|
|||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
|
|
||||||
|
$id = $_GET['id'];
|
||||||
|
$ref= $_GET['ref'];
|
||||||
$commande = new Commande($db);
|
$commande = new Commande($db);
|
||||||
if (!$commande->fetch($id)) {
|
if (! $commande->fetch($_GET['id'],$_GET['ref']) > 0)
|
||||||
dolibarr_print_error($db);
|
{
|
||||||
|
dolibarr_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Envoi fichier
|
// Envoi fichier
|
||||||
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
||||||
{
|
{
|
||||||
$upload_dir = $conf->commande->dir_output . "/" . sanitizeFileName($commande->ref);
|
$upload_dir = $conf->commande->dir_output . "/" . sanitizeFileName($commande->ref);
|
||||||
if (! is_dir($upload_dir)) create_exdir($upload_dir);
|
if (! is_dir($upload_dir)) create_exdir($upload_dir);
|
||||||
|
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
|
||||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0) > 0)
|
|
||||||
{
|
{
|
||||||
|
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0) > 0)
|
||||||
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Echec transfert (fichier dépassant la limite ?)
|
// Echec transfert (fichier dépassant la limite ?)
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
// print_r($_FILES);
|
// print_r($_FILES);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
if ($action=='delete')
|
if ($action=='delete')
|
||||||
{
|
{
|
||||||
$upload_dir = $conf->commande->dir_output . "/" . sanitizeFileName($commande->ref);
|
$upload_dir = $conf->commande->dir_output . "/" . sanitizeFileName($commande->ref);
|
||||||
$file = $upload_dir . '/' . urldecode($_GET['urlfile']);
|
$file = $upload_dir . '/' . urldecode($_GET['urlfile']);
|
||||||
dol_delete_file($file);
|
dol_delete_file($file);
|
||||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Affichage
|
* View
|
||||||
*/
|
*/
|
||||||
if ($id > 0)
|
|
||||||
{
|
|
||||||
llxHeader();
|
|
||||||
|
|
||||||
$upload_dir = $conf->commande->dir_output.'/'.sanitizeFileName($commande->ref);
|
llxHeader();
|
||||||
|
|
||||||
$societe = new Societe($db);
|
$html = new Form($db);
|
||||||
$societe->fetch($commande->socid);
|
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
$head = commande_prepare_head($commande);
|
{
|
||||||
dolibarr_fiche_head($head, 'documents', $langs->trans('CustomerOrder'));
|
$upload_dir = $conf->commande->dir_output.'/'.sanitizeFileName($commande->ref);
|
||||||
|
|
||||||
|
$societe = new Societe($db);
|
||||||
|
$societe->fetch($commande->socid);
|
||||||
|
|
||||||
|
$head = commande_prepare_head($commande);
|
||||||
|
dolibarr_fiche_head($head, 'documents', $langs->trans('CustomerOrder'));
|
||||||
|
|
||||||
|
|
||||||
// Construit liste des fichiers
|
// Construit liste des fichiers
|
||||||
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
|
$filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_ASC:SORT_DESC),1);
|
||||||
$totalsize=0;
|
$totalsize=0;
|
||||||
@ -126,35 +133,37 @@ if ($id > 0)
|
|||||||
{
|
{
|
||||||
$totalsize+=$file['size'];
|
$totalsize+=$file['size'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print '<table class="border"width="100%">';
|
|
||||||
|
|
||||||
// Ref
|
|
||||||
print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">'.$commande->ref.'</td></tr>';
|
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$societe->getNomUrl(1).'</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 "</table>\n";
|
|
||||||
print "</div>\n";
|
|
||||||
|
|
||||||
if ($mesg) { print $mesg."<br>"; }
|
|
||||||
|
|
||||||
|
print '<table class="border"width="100%">';
|
||||||
|
|
||||||
|
// Ref
|
||||||
|
print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">';
|
||||||
|
print $html->showrefnav($commande,'ref','',1,'ref','ref');
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$societe->getNomUrl(1).'</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 "</table>\n";
|
||||||
|
print "</div>\n";
|
||||||
|
|
||||||
|
if ($mesg) { print $mesg."<br>"; }
|
||||||
|
|
||||||
|
|
||||||
// Affiche formulaire upload
|
// Affiche formulaire upload
|
||||||
$formfile=new FormFile($db);
|
$formfile=new FormFile($db);
|
||||||
$formfile->form_attach_new_file(DOL_URL_ROOT.'/commande/document.php?id='.$commande->id);
|
$formfile->form_attach_new_file(DOL_URL_ROOT.'/commande/document.php?id='.$commande->id);
|
||||||
|
|
||||||
|
|
||||||
// List of document
|
// List of document
|
||||||
$param='&id='.$commande->id;
|
$param='&id='.$commande->id;
|
||||||
$formfile->list_of_documents($filearray,$commande,'commande',$param);
|
$formfile->list_of_documents($filearray,$commande,'commande',$param);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Header('Location: index.php');
|
Header('Location: index.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -1136,122 +1136,128 @@ else
|
|||||||
/* Mode vue et edition */
|
/* Mode vue et edition */
|
||||||
/* */
|
/* */
|
||||||
/* *************************************************************************** */
|
/* *************************************************************************** */
|
||||||
|
$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 Commande($db);
|
$commande = new Commande($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);
|
||||||
|
|
||||||
$author = new User($db);
|
$author = new User($db);
|
||||||
$author->id = $commande->user_author_id;
|
$author->id = $commande->user_author_id;
|
||||||
$author->fetch();
|
$author->fetch();
|
||||||
|
|
||||||
$head = commande_prepare_head($commande);
|
$head = commande_prepare_head($commande);
|
||||||
dolibarr_fiche_head($head, 'order', $langs->trans("CustomerOrder"));
|
dolibarr_fiche_head($head, 'order', $langs->trans("CustomerOrder"));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation de la suppression de la commande
|
* Confirmation de la suppression de la commande
|
||||||
*/
|
*/
|
||||||
if ($_GET['action'] == 'delete')
|
if ($_GET['action'] == 'delete')
|
||||||
{
|
{
|
||||||
$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete');
|
$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete');
|
||||||
print '<br />';
|
print '<br />';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation de la validation
|
* Confirmation de la validation
|
||||||
*/
|
*/
|
||||||
if ($_GET['action'] == 'validate')
|
if ($_GET['action'] == 'validate')
|
||||||
{
|
{
|
||||||
// on verifie si la facture est en numerotation provisoire
|
// on verifie si la facture est en numerotation provisoire
|
||||||
$ref = substr($commande->ref, 1, 4);
|
$ref = substr($commande->ref, 1, 4);
|
||||||
if ($ref == 'PROV')
|
if ($ref == 'PROV')
|
||||||
{
|
{
|
||||||
$num = $commande->getNextNumRef($soc);
|
$num = $commande->getNextNumRef($soc);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$num = $commande->ref;
|
$num = $commande->ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text=$langs->trans('ConfirmValidateOrder',$num);
|
|
||||||
$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('ValidateOrder'), $text, 'confirm_validate');
|
|
||||||
print '<br />';
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
$text=$langs->trans('ConfirmValidateOrder',$num);
|
||||||
* Confirmation de la cloture
|
$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('ValidateOrder'), $text, 'confirm_validate');
|
||||||
*/
|
print '<br />';
|
||||||
if ($_GET['action'] == 'close')
|
}
|
||||||
{
|
|
||||||
$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_close');
|
|
||||||
print '<br />';
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation de l'annulation
|
* Confirmation de la cloture
|
||||||
*/
|
*/
|
||||||
if ($_GET['action'] == 'cancel')
|
if ($_GET['action'] == 'close')
|
||||||
{
|
{
|
||||||
$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('Cancel'), $langs->trans('ConfirmCancelOrder'), 'confirm_cancel');
|
$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_close');
|
||||||
print '<br />';
|
print '<br />';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation de la suppression d'une ligne produit
|
* Confirmation de l'annulation
|
||||||
*/
|
*/
|
||||||
if ($_GET['action'] == 'ask_deleteline' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
if ($_GET['action'] == 'cancel')
|
||||||
{
|
{
|
||||||
$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline');
|
$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('Cancel'), $langs->trans('ConfirmCancelOrder'), 'confirm_cancel');
|
||||||
print '<br>';
|
print '<br />';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Commande
|
* Confirmation de la suppression d'une ligne produit
|
||||||
*/
|
*/
|
||||||
$nbrow=8;
|
if ($_GET['action'] == 'ask_deleteline' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
|
||||||
if ($conf->projet->enabled) $nbrow++;
|
{
|
||||||
|
$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline');
|
||||||
|
print '<br>';
|
||||||
|
}
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
/*
|
||||||
|
* Commande
|
||||||
|
*/
|
||||||
|
$nbrow=8;
|
||||||
|
if ($conf->projet->enabled) $nbrow++;
|
||||||
|
|
||||||
// Ref
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td width="18%">'.$langs->trans('Ref').'</td>';
|
|
||||||
print '<td colspan="3">'.$commande->ref.'</td>';
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Ref commande client
|
// Ref
|
||||||
print '<tr><td>';
|
print '<tr><td width="18%">'.$langs->trans('Ref').'</td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td nowrap="nowrap">';
|
print '<td colspan="3">';
|
||||||
print $langs->trans('RefCustomer').'</td><td align="left">';
|
print $html->showrefnav($commande,'ref','',1,'ref','ref');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($_GET['action'] != 'RefCustomerOrder' && $commande->brouillon) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=RefCustomerOrder&id='.$commande->id.'">'.img_edit($langs->trans('Modify')).'</a></td>';
|
print '</tr>';
|
||||||
print '</tr></table>';
|
|
||||||
print '</td><td colspan="3">';
|
// Ref commande client
|
||||||
if ($user->rights->commande->creer && $_GET['action'] == 'RefCustomerOrder')
|
print '<tr><td>';
|
||||||
{
|
print '<table class="nobordernopadding" width="100%"><tr><td nowrap="nowrap">';
|
||||||
print '<form action="fiche.php?id='.$id.'" method="post">';
|
print $langs->trans('RefCustomer').'</td><td align="left">';
|
||||||
print '<input type="hidden" name="action" value="set_ref_client">';
|
print '</td>';
|
||||||
print '<input type="text" class="flat" size="20" name="ref_client" value="'.$commande->ref_client.'">';
|
if ($_GET['action'] != 'RefCustomerOrder' && $commande->brouillon) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=RefCustomerOrder&id='.$commande->id.'">'.img_edit($langs->trans('Modify')).'</a></td>';
|
||||||
print ' <input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
print '</tr></table>';
|
||||||
print '</form>';
|
print '</td><td colspan="3">';
|
||||||
}
|
if ($user->rights->commande->creer && $_GET['action'] == 'RefCustomerOrder')
|
||||||
else
|
{
|
||||||
{
|
print '<form action="fiche.php?id='.$id.'" method="post">';
|
||||||
print $commande->ref_client;
|
print '<input type="hidden" name="action" value="set_ref_client">';
|
||||||
}
|
print '<input type="text" class="flat" size="20" name="ref_client" value="'.$commande->ref_client.'">';
|
||||||
print '</td>';
|
print ' <input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||||
print '</tr>';
|
print '</form>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print $commande->ref_client;
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
// Societe
|
// Societe
|
||||||
print '<tr><td>'.$langs->trans('Company').'</td>';
|
print '<tr><td>'.$langs->trans('Company').'</td>';
|
||||||
print '<td colspan="3">'.$soc->getNomUrl(1).'</td>';
|
print '<td colspan="3">'.$soc->getNomUrl(1).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Ligne info remises tiers
|
// Ligne info remises tiers
|
||||||
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="3">';
|
||||||
|
|||||||
@ -16,16 +16,14 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/commande/note.php
|
\file htdocs/commande/note.php
|
||||||
\ingroup commande
|
\ingroup commande
|
||||||
\brief Fiche de notes sur une commande
|
\brief Fiche de notes sur une commande
|
||||||
\version $Revision$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/lib/order.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/lib/order.lib.php');
|
||||||
@ -33,27 +31,32 @@ require_once(DOL_DOCUMENT_ROOT.'/lib/order.lib.php');
|
|||||||
$socid=isset($_GET["socid"])?$_GET["socid"]:isset($_POST["socid"])?$_POST["socid"]:"";
|
$socid=isset($_GET["socid"])?$_GET["socid"]:isset($_POST["socid"])?$_POST["socid"]:"";
|
||||||
|
|
||||||
if (!$user->rights->commande->lire)
|
if (!$user->rights->commande->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
// Sécurité accés
|
// Sécurité accés
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
unset($_GET["action"]);
|
unset($_GET["action"]);
|
||||||
$socid = $user->societe_id;
|
$socid = $user->societe_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$id = $_GET['id'];
|
||||||
|
$ref= $_GET['ref'];
|
||||||
$commande = new Commande($db);
|
$commande = new Commande($db);
|
||||||
$commande->fetch($_GET["id"]);
|
if (! $commande->fetch($_GET['id'],$_GET['ref']) > 0)
|
||||||
|
{
|
||||||
|
dolibarr_print_error($db);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/*
|
||||||
/* Actions */
|
* Actions
|
||||||
/******************************************************************************/
|
*/
|
||||||
|
|
||||||
if ($_POST["action"] == 'update' && $user->rights->commande->creer)
|
if ($_POST["action"] == 'update' && $user->rights->commande->creer)
|
||||||
{
|
{
|
||||||
@ -61,7 +64,7 @@ if ($_POST["action"] == 'update' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
$resPrivateNote=$commande->update_note($_POST["note"]);
|
$resPrivateNote=$commande->update_note($_POST["note"]);
|
||||||
$resPublicNote=$commande->update_note_public($_POST["note_public"]);
|
$resPublicNote=$commande->update_note_public($_POST["note_public"]);
|
||||||
|
|
||||||
if ($resPrivateNote < 0 || $resPublicNote < 0)
|
if ($resPrivateNote < 0 || $resPublicNote < 0)
|
||||||
{
|
{
|
||||||
$mesg='<div class="error">'.$commande->error.'</div>';
|
$mesg='<div class="error">'.$commande->error.'</div>';
|
||||||
@ -75,77 +78,77 @@ if ($_POST["action"] == 'update' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/*
|
||||||
/* Affichage fiche */
|
* View
|
||||||
/******************************************************************************/
|
*/
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
|
|
||||||
if ($_GET["id"])
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$soc = new Societe($db, $commande->socid);
|
$soc = new Societe($db, $commande->socid);
|
||||||
$soc->fetch($commande->socid);
|
$soc->fetch($commande->socid);
|
||||||
|
|
||||||
$head = commande_prepare_head($commande);
|
$head = commande_prepare_head($commande);
|
||||||
|
|
||||||
dolibarr_fiche_head($head, 'note', $langs->trans("CustomerOrder"));
|
dolibarr_fiche_head($head, 'note', $langs->trans("CustomerOrder"));
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="18%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
print '<tr><td width="18%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||||
print $commande->ref;
|
print $html->showrefnav($commande,'ref','',1,'ref','ref');
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Ref commande client
|
// Ref commande client
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>';
|
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>';
|
||||||
print $langs->trans('RefCustomer').'</td><td align="left">';
|
print $langs->trans('RefCustomer').'</td><td align="left">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
print $commande->ref_client;
|
print $commande->ref_client;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Customer
|
// Customer
|
||||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||||
print '<td colspan="3">'.$soc->getNomUrl(1).'</td></tr>';
|
print '<td colspan="3">'.$soc->getNomUrl(1).'</td></tr>';
|
||||||
|
|
||||||
// Note publique
|
// Note publique
|
||||||
print '<tr><td valign="top">'.$langs->trans("NotePublic").' :</td>';
|
print '<tr><td valign="top">'.$langs->trans("NotePublic").' :</td>';
|
||||||
print '<td valign="top" colspan="3">';
|
print '<td valign="top" colspan="3">';
|
||||||
if ($_GET["action"] == 'edit')
|
if ($_GET["action"] == 'edit')
|
||||||
{
|
{
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?id='.$commande->id.'">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?id='.$commande->id.'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<textarea name="note_public" cols="80" rows="8">'.$commande->note_public."</textarea><br>";
|
print '<textarea name="note_public" cols="80" rows="8">'.$commande->note_public."</textarea><br>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print ($commande->note_public?nl2br($commande->note_public):" ");
|
print ($commande->note_public?nl2br($commande->note_public):" ");
|
||||||
}
|
}
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Note privée
|
// Note privée
|
||||||
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 valign="top" colspan="3">';
|
print '<td valign="top" colspan="3">';
|
||||||
if ($_GET["action"] == 'edit')
|
if ($_GET["action"] == 'edit')
|
||||||
{
|
{
|
||||||
print '<textarea name="note" cols="80" rows="8">'.$commande->note."</textarea><br>";
|
print '<textarea name="note" cols="80" rows="8">'.$commande->note."</textarea><br>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print ($commande->note?nl2br($commande->note):" ");
|
print ($commande->note?nl2br($commande->note):" ");
|
||||||
}
|
}
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
if ($_GET["action"] == 'edit')
|
if ($_GET["action"] == 'edit')
|
||||||
{
|
{
|
||||||
print '<br><center>';
|
print '<br><center>';
|
||||||
@ -153,21 +156,21 @@ if ($_GET["id"])
|
|||||||
print '</center>';
|
print '</center>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($user->rights->commande->creer && $_GET["action"] <> 'edit')
|
if ($user->rights->commande->creer && $_GET["action"] <> 'edit')
|
||||||
{
|
{
|
||||||
print "<a class=\"butAction\" href=\"note.php?id=".$commande->id."&action=edit\">".$langs->trans('Modify')."</a>";
|
print "<a class=\"butAction\" href=\"note.php?id=".$commande->id."&action=edit\">".$langs->trans('Modify')."</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@ -105,22 +105,21 @@ if ($_POST['action'] == 'setconditions' && $user->rights->commande->creer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
llxHeader('',$langs->trans("OrderCard"),"Commande");
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
|
llxHeader('',$langs->trans("OrderCard"),"Commande");
|
||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
|
|
||||||
/* *************************************************************************** */
|
$id = $_GET['id'];
|
||||||
/* */
|
$ref= $_GET['ref'];
|
||||||
/* Mode vue et edition */
|
if ($id > 0 || ! empty($ref))
|
||||||
/* */
|
|
||||||
/* *************************************************************************** */
|
|
||||||
|
|
||||||
if ($_GET["id"] > 0)
|
|
||||||
{
|
{
|
||||||
$commande = new Commande($db);
|
$commande = new Commande($db);
|
||||||
if ( $commande->fetch($_GET["id"]) > 0)
|
if ( $commande->fetch($_GET['id'],$_GET['ref']) > 0)
|
||||||
{
|
{
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($commande->socid);
|
$soc->fetch($commande->socid);
|
||||||
@ -142,7 +141,9 @@ if ($_GET["id"] > 0)
|
|||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="18%">'.$langs->trans('Ref').'</td>';
|
print '<tr><td width="18%">'.$langs->trans('Ref').'</td>';
|
||||||
print '<td colspan="3">'.$commande->ref.'</td>';
|
print '<td colspan="3">';
|
||||||
|
print $html->showrefnav($commande,'ref','',1,'ref','ref');
|
||||||
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Ref commande client
|
// Ref commande client
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2008 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2008 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -123,10 +123,12 @@ $formfile = new FormFile($db);
|
|||||||
|
|
||||||
llxHeader('',$langs->trans("OrderCard"));
|
llxHeader('',$langs->trans("OrderCard"));
|
||||||
|
|
||||||
if ($_GET["id"] > 0)
|
$id = $_GET['id'];
|
||||||
|
$ref= $_GET['ref'];
|
||||||
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$commande = new Commande($db);
|
$commande = new Commande($db);
|
||||||
if ( $commande->fetch($_GET["id"]) > 0)
|
if ( $commande->fetch($_GET['id'],$_GET['ref']) > 0)
|
||||||
{
|
{
|
||||||
$commande->loadExpeditions(1);
|
$commande->loadExpeditions(1);
|
||||||
|
|
||||||
@ -158,7 +160,9 @@ if ($_GET["id"] > 0)
|
|||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="18%">'.$langs->trans('Ref').'</td>';
|
print '<tr><td width="18%">'.$langs->trans('Ref').'</td>';
|
||||||
print '<td colspan="3">'.$commande->ref.'</td>';
|
print '<td colspan="3">';
|
||||||
|
print $html->showrefnav($commande,'ref','',1,'ref','ref');
|
||||||
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Ref commande client
|
// Ref commande client
|
||||||
@ -507,72 +511,85 @@ if ($_GET["id"] > 0)
|
|||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
// Bouton expedier sans gestion des stocks
|
// Bouton expedier sans gestion des stocks
|
||||||
if (! $conf->stock->enabled && $reste_a_livrer_total > 0 && ! $commande->brouillon && $user->rights->expedition->creer)
|
if (! $conf->stock->enabled && ! $commande->brouillon)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/expedition/fiche.php?action=create&origin=commande&object_id='.$_GET["id"].'">'.$langs->trans("NewSending").'</a>';
|
if ($user->rights->expedition->creer)
|
||||||
|
{
|
||||||
|
print '<a class="butAction" href="'.DOL_URL_ROOT.'/expedition/fiche.php?action=create&origin=commande&object_id='.$_GET["id"].'">'.$langs->trans("NewSending").'</a>';
|
||||||
|
if ($reste_a_livrer_total <= 0)
|
||||||
|
{
|
||||||
|
print ' '.img_warning($langs->trans("WarningNoQtyLeftToSend"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a class="butActionRefused" href="#">'.$langs->trans("NewSending").'</a>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print "</div>";
|
print "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Bouton expedier avec gestion des stocks
|
// Bouton expedier avec gestion des stocks
|
||||||
|
if ($conf->stock->enabled && $commande->statut > 0 && $commande->statut < 3)
|
||||||
print '<table width="100%"><tr><td width="100%" colspan="2" valign="top">';
|
|
||||||
|
|
||||||
if ($conf->stock->enabled && $reste_a_livrer_total > 0 && $commande->statut > 0 && $commande->statut < 3 && $user->rights->expedition->creer)
|
|
||||||
{
|
{
|
||||||
print_titre($langs->trans("NewSending"));
|
if ($user->rights->expedition->creer)
|
||||||
|
|
||||||
print '<form method="GET" action="'.DOL_URL_ROOT.'/expedition/fiche.php">';
|
|
||||||
print '<input type="hidden" name="action" value="create">';
|
|
||||||
print '<input type="hidden" name="id" value="'.$commande->id.'">';
|
|
||||||
print '<input type="hidden" name="origin" value="commande">';
|
|
||||||
print '<input type="hidden" name="object_id" value="'.$commande->id.'">';
|
|
||||||
print '<table class="border" width="100%">';
|
|
||||||
|
|
||||||
$entrepot = new Entrepot($db);
|
|
||||||
$langs->load("stocks");
|
|
||||||
|
|
||||||
print '<tr>';
|
|
||||||
print '<td>'.$langs->trans("Warehouse").'</td>';
|
|
||||||
print '<td>';
|
|
||||||
|
|
||||||
if (sizeof($user->entrepots) === 1)
|
|
||||||
{
|
{
|
||||||
$uentrepot = array();
|
print_titre($langs->trans("NewSending"));
|
||||||
$uentrepot[$user->entrepots[0]['id']] = $user->entrepots[0]['label'];
|
|
||||||
$html->select_array("entrepot_id",$uentrepot);
|
print '<form method="GET" action="'.DOL_URL_ROOT.'/expedition/fiche.php">';
|
||||||
|
print '<input type="hidden" name="action" value="create">';
|
||||||
|
print '<input type="hidden" name="id" value="'.$commande->id.'">';
|
||||||
|
print '<input type="hidden" name="origin" value="commande">';
|
||||||
|
print '<input type="hidden" name="object_id" value="'.$commande->id.'">';
|
||||||
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
|
$entrepot = new Entrepot($db);
|
||||||
|
$langs->load("stocks");
|
||||||
|
|
||||||
|
print '<tr>';
|
||||||
|
print '<td>'.$langs->trans("Warehouse").'</td>';
|
||||||
|
print '<td>';
|
||||||
|
|
||||||
|
if (sizeof($user->entrepots) === 1)
|
||||||
|
{
|
||||||
|
$uentrepot = array();
|
||||||
|
$uentrepot[$user->entrepots[0]['id']] = $user->entrepots[0]['label'];
|
||||||
|
$html->select_array("entrepot_id",$uentrepot);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$html->select_array("entrepot_id",$entrepot->list_array());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sizeof($entrepot->list_array()) <= 0)
|
||||||
|
{
|
||||||
|
print ' No warehouse defined, <a href="'.DOL_URL_ROOT.'/product/stock/fiche.php?action=create">add one</a>';
|
||||||
|
}
|
||||||
|
print '</td><td align="center">';
|
||||||
|
print '<input type="submit" class="button" named="save" value="'.$langs->trans("NewSending").'">';
|
||||||
|
if ($reste_a_livrer_total <= 0)
|
||||||
|
{
|
||||||
|
print ' '.img_warning($langs->trans("WarningNoQtyLeftToSend"));
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
print "</table>";
|
||||||
|
print "</form>\n";
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
$somethingshown=1;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$html->select_array("entrepot_id",$entrepot->list_array());
|
print '<div class="tabsAction">';
|
||||||
|
print '<a class="butActionRefused" href="#">'.$langs->trans("NewSending").'</a>';
|
||||||
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof($entrepot->list_array()) <= 0)
|
|
||||||
{
|
|
||||||
print ' Aucun entrepôt définit, <a href="'.DOL_URL_ROOT.'/product/stock/fiche.php?action=create">definissez en un</a>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
/*
|
|
||||||
print '<tr><td width="20%">Mode d\'expédition</td>';
|
|
||||||
print '<td>';
|
|
||||||
$html->select_array("entrepot_id",$entrepot->list_array());
|
|
||||||
print '</td></tr>';
|
|
||||||
*/
|
|
||||||
|
|
||||||
print '<tr><td align="center" colspan="2">';
|
|
||||||
print '<input type="submit" class="button" named="save" value="'.$langs->trans("NewSending").'">';
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
print "</table>";
|
|
||||||
print "</form>\n";
|
|
||||||
|
|
||||||
$somethingshown=1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</td></tr></table>";
|
|
||||||
|
|
||||||
print '<br>';
|
|
||||||
show_list_sending_receive('commande',$commande->id);
|
show_list_sending_receive('commande',$commande->id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -210,7 +210,7 @@ if ($_GET["action"] == 'create')
|
|||||||
|
|
||||||
$expe = new Expedition($db);
|
$expe = new Expedition($db);
|
||||||
|
|
||||||
print_titre($langs->trans("CreateASending"));
|
print_fiche_titre($langs->trans("CreateASending"));
|
||||||
if (! $origin)
|
if (! $origin)
|
||||||
{
|
{
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorBadParameters").'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorBadParameters").'</div>';
|
||||||
@ -295,9 +295,8 @@ if ($_GET["action"] == 'create')
|
|||||||
{
|
{
|
||||||
print '<tr><td colspan="3">'.$langs->trans("NotePrivate").': '.nl2br($object->note)."</td></tr>";
|
print '<tr><td colspan="3">'.$langs->trans("NotePrivate").': '.nl2br($object->note)."</td></tr>";
|
||||||
}
|
}
|
||||||
print "</table>";
|
|
||||||
|
print '<tr><td>';
|
||||||
print '<table><tr><td>';
|
|
||||||
print $langs->trans("Weight");
|
print $langs->trans("Weight");
|
||||||
print '</td><td><input name="weight" size="4" value=""></td><td>';
|
print '</td><td><input name="weight" size="4" value=""></td><td>';
|
||||||
print $formproduct->select_measuring_units("weight_units","weight");
|
print $formproduct->select_measuring_units("weight_units","weight");
|
||||||
@ -311,10 +310,7 @@ if ($_GET["action"] == 'create')
|
|||||||
print '</td></tr><tr><td>';
|
print '</td></tr><tr><td>';
|
||||||
print $langs->trans("Depth");
|
print $langs->trans("Depth");
|
||||||
print '</td><td><input name="sizeS" size="4" value=""></td>';
|
print '</td><td><input name="sizeS" size="4" value=""></td>';
|
||||||
print '<td> </td></tr></table>';
|
print '<td> </td></tr>';
|
||||||
|
|
||||||
|
|
||||||
print '<table>';
|
|
||||||
|
|
||||||
// Delivery method
|
// Delivery method
|
||||||
print "<tr><td>".$langs->trans("DeliveryMethod")."</td>";
|
print "<tr><td>".$langs->trans("DeliveryMethod")."</td>";
|
||||||
|
|||||||
@ -485,10 +485,10 @@ class Facture extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Recupére l'objet facture et ses lignes de factures
|
* \brief Get object and lines from database
|
||||||
* \param rowid id de la facture a récupérer
|
* \param rowid id of object to load
|
||||||
* \param ref Ref of invoice
|
* \param ref Ref of invoice
|
||||||
* \return int >0 si ok, <0 si ko
|
* \return int >0 if OK, <0 if KO
|
||||||
*/
|
*/
|
||||||
function fetch($rowid,$ref='')
|
function fetch($rowid,$ref='')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -62,6 +62,7 @@ FeaturesSupported=Features supported
|
|||||||
Width=Width
|
Width=Width
|
||||||
Height=Height
|
Height=Height
|
||||||
Weight=Weight
|
Weight=Weight
|
||||||
|
Depth=Depth
|
||||||
TotalWeight=Total weight
|
TotalWeight=Total weight
|
||||||
WeightUnitton=tonnes
|
WeightUnitton=tonnes
|
||||||
WeightUnitkg=kg
|
WeightUnitkg=kg
|
||||||
@ -73,9 +74,6 @@ VolumeUnitm3=m3
|
|||||||
VolumeUnitdm3=dm3
|
VolumeUnitdm3=dm3
|
||||||
VolumeUnitcm3=cm3
|
VolumeUnitcm3=cm3
|
||||||
VolumeUnitmm3=mm3
|
VolumeUnitmm3=mm3
|
||||||
Height=height
|
|
||||||
Width=width
|
|
||||||
Depth=depth
|
|
||||||
Size=size
|
Size=size
|
||||||
SizeUnitm=m
|
SizeUnitm=m
|
||||||
SizeUnitdm=dm
|
SizeUnitdm=dm
|
||||||
|
|||||||
@ -41,6 +41,7 @@ ConfirmCancelSending=Are you sure you want to cancel this sending ?
|
|||||||
GenericTransport=Generic transport
|
GenericTransport=Generic transport
|
||||||
Enlevement=Gotten by customer
|
Enlevement=Gotten by customer
|
||||||
DocumentModelSimple=Simple document model
|
DocumentModelSimple=Simple document model
|
||||||
|
WarningNoQtyLeftToSend=Warning, no products waiting to be shipped.
|
||||||
|
|
||||||
# NumRef
|
# NumRef
|
||||||
NumRefModelJade=Return a reference number with format BLYY00001, ... where YY is year. Number at end is never reset to zero.
|
NumRefModelJade=Return a reference number with format BLYY00001, ... where YY is year. Number at end is never reset to zero.
|
||||||
|
|||||||
@ -62,6 +62,7 @@ FeaturesSupported=Fonctionnalit
|
|||||||
Width=Largeur
|
Width=Largeur
|
||||||
Height=Hauteur
|
Height=Hauteur
|
||||||
Weight=Poids
|
Weight=Poids
|
||||||
|
Depth=Profondeur
|
||||||
TotalWeight=Poids total
|
TotalWeight=Poids total
|
||||||
WeightUnitton=tonnes
|
WeightUnitton=tonnes
|
||||||
WeightUnitkg=kg
|
WeightUnitkg=kg
|
||||||
@ -73,9 +74,6 @@ VolumeUnitm3=m3
|
|||||||
VolumeUnitdm3=dm3
|
VolumeUnitdm3=dm3
|
||||||
VolumeUnitcm3=cm3
|
VolumeUnitcm3=cm3
|
||||||
VolumeUnitmm3=mm3
|
VolumeUnitmm3=mm3
|
||||||
Height=hauteur
|
|
||||||
Width=largeur
|
|
||||||
Depth=profondeur
|
|
||||||
Size=taille
|
Size=taille
|
||||||
SizeUnitm=m
|
SizeUnitm=m
|
||||||
SizeUnitdm=dm
|
SizeUnitdm=dm
|
||||||
|
|||||||
@ -41,6 +41,7 @@ ConfirmCancelSending=Etes-vous s
|
|||||||
GenericTransport=Transporteur générique
|
GenericTransport=Transporteur générique
|
||||||
Enlevement=Enlèvement sur place par le client
|
Enlevement=Enlèvement sur place par le client
|
||||||
DocumentModelSimple=Modèle simple
|
DocumentModelSimple=Modèle simple
|
||||||
|
WarningNoQtyLeftToSend=Alerte, aucun produit en attente de livraison.
|
||||||
|
|
||||||
# NumRef
|
# NumRef
|
||||||
NumRefModelJade=Renvoie un numéro de référence sous la forme numérique BLYY00001, ... où YY représente l'année. Le numéro d'incrément qui suit l'année n'est PAS remis à zéro en début d'année.
|
NumRefModelJade=Renvoie un numéro de référence sous la forme numérique BLYY00001, ... où YY représente l'année. Le numéro d'incrément qui suit l'année n'est PAS remis à zéro en début d'année.
|
||||||
|
|||||||
@ -1142,7 +1142,7 @@ if ($_GET["action"] == '')
|
|||||||
print '<a class="butAction" href="fiche.php?action=edit&id='.$product->id.'">'.$langs->trans("Modify").'</a>';
|
print '<a class="butAction" href="fiche.php?action=edit&id='.$product->id.'">'.$langs->trans("Modify").'</a>';
|
||||||
|
|
||||||
if ($product->no_button_copy <> 1)
|
if ($product->no_button_copy <> 1)
|
||||||
print '<a class="butAction" href="fiche.php?action=clone&id='.$product->id.'">'.$langs->trans("CreateCopy").'</a>';
|
print '<a class="butAction" href="fiche.php?action=clone&id='.$product->id.'">'.$langs->trans("ToClone").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user