Qual: Uniformize code
This commit is contained in:
parent
cd30e2744b
commit
e4ee9680d7
@ -46,11 +46,10 @@ class CommandeStats extends Stats
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param $DB Database handler
|
* @param DoliDB $DB Database handler
|
||||||
* @param $socid Id third party for filter
|
* @param int $socid Id third party for filter
|
||||||
* @param $mode Option
|
* @param string $mode Option
|
||||||
* @param $userid Id user for filter
|
* @param int $userid Id user for filter
|
||||||
* @return CommandeStats
|
|
||||||
*/
|
*/
|
||||||
function CommandeStats($DB, $socid=0, $mode, $userid=0)
|
function CommandeStats($DB, $socid=0, $mode, $userid=0)
|
||||||
{
|
{
|
||||||
@ -88,8 +87,10 @@ class CommandeStats extends Stats
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoie le nombre de commande par mois pour une annee donnee
|
* Return orders number by month for a year
|
||||||
*
|
*
|
||||||
|
* @param int $year year for stats
|
||||||
|
* @return array array with number by month
|
||||||
*/
|
*/
|
||||||
function getNbByMonth($year)
|
function getNbByMonth($year)
|
||||||
{
|
{
|
||||||
@ -108,7 +109,9 @@ class CommandeStats extends Stats
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie le nombre de commande par annee
|
* Return orders number by year
|
||||||
|
*
|
||||||
|
* @return array array with number by year
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function getNbByYear()
|
function getNbByYear()
|
||||||
@ -127,8 +130,10 @@ class CommandeStats extends Stats
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie le nombre de commande par mois pour une annee donnee
|
* Return the orders amount by month for a year
|
||||||
*
|
*
|
||||||
|
* @param int $year year for stats
|
||||||
|
* @return array array with number by month
|
||||||
*/
|
*/
|
||||||
function getAmountByMonth($year)
|
function getAmountByMonth($year)
|
||||||
{
|
{
|
||||||
@ -147,8 +152,10 @@ class CommandeStats extends Stats
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie le nombre de commande par mois pour une annee donnee
|
* Return the orders amount average by month for a year
|
||||||
*
|
*
|
||||||
|
* @param int $year year for stats
|
||||||
|
* @return array array with number by month
|
||||||
*/
|
*/
|
||||||
function getAverageByMonth($year)
|
function getAverageByMonth($year)
|
||||||
{
|
{
|
||||||
@ -166,10 +173,10 @@ class CommandeStats extends Stats
|
|||||||
return $this->_getAverageByMonth($year, $sql);
|
return $this->_getAverageByMonth($year, $sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return nb, total and average
|
* Return nb, total and average
|
||||||
* \return array Array of values
|
*
|
||||||
|
* @return array Array of values
|
||||||
*/
|
*/
|
||||||
function getAllByYear()
|
function getAllByYear()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -275,8 +275,11 @@ class Expedition extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Create a expedition line
|
||||||
*
|
*
|
||||||
*
|
* @param int $entrepot_id Id of warehouse
|
||||||
|
* @param int $origin_line_id Id of source line
|
||||||
|
* @param int $qty Quantity
|
||||||
*/
|
*/
|
||||||
function create_line($entrepot_id, $origin_line_id, $qty)
|
function create_line($entrepot_id, $origin_line_id, $qty)
|
||||||
{
|
{
|
||||||
@ -617,8 +620,11 @@ class Expedition extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ajoute une ligne
|
* Add a expedition line
|
||||||
*
|
*
|
||||||
|
* @param int $entrepot_id Id of warehouse
|
||||||
|
* @param int $id Id of source line
|
||||||
|
* @param int $qty Quantity
|
||||||
*/
|
*/
|
||||||
function addline( $entrepot_id, $id, $qty )
|
function addline( $entrepot_id, $id, $qty )
|
||||||
{
|
{
|
||||||
@ -633,8 +639,10 @@ class Expedition extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Delete line
|
||||||
*
|
*
|
||||||
*
|
* @param int $lineid Id line of order
|
||||||
|
* TODO Voir si cette function est utilisee
|
||||||
*/
|
*/
|
||||||
function deleteline($lineid)
|
function deleteline($lineid)
|
||||||
{
|
{
|
||||||
@ -763,7 +771,7 @@ class Expedition extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Delete shipping
|
* Delete shipping
|
||||||
*
|
*
|
||||||
* @return void
|
* @return int >0 if OK otherwise if KO
|
||||||
*/
|
*/
|
||||||
function delete()
|
function delete()
|
||||||
{
|
{
|
||||||
@ -851,7 +859,7 @@ class Expedition extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Load lines
|
* Load lines
|
||||||
*
|
*
|
||||||
* @return void
|
* @return int >0 if OK, Otherwise if KO
|
||||||
*/
|
*/
|
||||||
function fetch_lines()
|
function fetch_lines()
|
||||||
{
|
{
|
||||||
@ -910,10 +918,13 @@ class Expedition extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie nom clicable (avec eventuellement le picto)
|
* Return clicable link of object (with eventually picto)
|
||||||
*
|
*
|
||||||
* @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
* @param int $withpicto Add picto into link
|
||||||
* @return string Chaine avec URL
|
* @param int $option Where point the link
|
||||||
|
* @param int $max Max length to show
|
||||||
|
* @param int $short Use short labels
|
||||||
|
* @return string String with URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
|
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
|
||||||
{
|
{
|
||||||
@ -938,8 +949,9 @@ class Expedition extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne le libelle du statut d'une expedition
|
* Return status label
|
||||||
*
|
*
|
||||||
|
* @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto
|
||||||
* @return string Libelle
|
* @return string Libelle
|
||||||
*/
|
*/
|
||||||
function getLibStatut($mode=0)
|
function getLibStatut($mode=0)
|
||||||
@ -1064,8 +1076,8 @@ class Expedition extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Set the planned delivery date
|
* Set the planned delivery date
|
||||||
*
|
*
|
||||||
* @param user Objet utilisateur qui modifie
|
* @param User $user Objet utilisateur qui modifie
|
||||||
* @param date_livraison Date de livraison
|
* @param timestamp date_livraison Date de livraison
|
||||||
* @return int <0 si ko, >0 si ok
|
* @return int <0 si ko, >0 si ok
|
||||||
*/
|
*/
|
||||||
function set_date_livraison($user, $date_livraison)
|
function set_date_livraison($user, $date_livraison)
|
||||||
@ -1123,9 +1135,10 @@ class Expedition extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
* Get tracking url status
|
* Get tracking url status
|
||||||
*
|
*
|
||||||
* @return void
|
* @param string $value
|
||||||
*/
|
*/
|
||||||
function GetUrlTrackingStatus($value='')
|
function GetUrlTrackingStatus($value='')
|
||||||
{
|
{
|
||||||
@ -1194,7 +1207,11 @@ class ExpeditionLigne
|
|||||||
var $product_desc; // Description produit
|
var $product_desc; // Description produit
|
||||||
var $ref;
|
var $ref;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
*/
|
||||||
function ExpeditionLigne($DB)
|
function ExpeditionLigne($DB)
|
||||||
{
|
{
|
||||||
$this->db=$DB;
|
$this->db=$DB;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -41,9 +42,9 @@ class ExpeditionStats
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie le nombre de expedition par annee
|
* Return expedition number by year
|
||||||
*
|
*
|
||||||
* @return void
|
* @return array array with number by year
|
||||||
*/
|
*/
|
||||||
function getNbExpeditionByYear()
|
function getNbExpeditionByYear()
|
||||||
{
|
{
|
||||||
@ -74,10 +75,10 @@ class ExpeditionStats
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie le nombre de expedition par mois pour une annee donnee
|
* Return the expeditions number by month for a year
|
||||||
*
|
*
|
||||||
* @param int $year Year
|
* @param int $year Year
|
||||||
* @return int
|
* @return array Array with number by month
|
||||||
*/
|
*/
|
||||||
function getNbExpeditionByMonth($year)
|
function getNbExpeditionByMonth($year)
|
||||||
{
|
{
|
||||||
@ -122,9 +123,10 @@ class ExpeditionStats
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Return the expeditions number by month for a year
|
||||||
*
|
*
|
||||||
* @param int $year Year
|
* @param int $year Year
|
||||||
* @return int
|
* @return array Array with number by month
|
||||||
*/
|
*/
|
||||||
function getNbExpeditionByMonthWithPrevYear($year)
|
function getNbExpeditionByMonthWithPrevYear($year)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user