Fix: limit prefix_com field
Fix: use invoice field entity in stat Fix: replaced invoice is already with statut 3
This commit is contained in:
parent
de4cf814c0
commit
5ea37d7835
@ -58,20 +58,20 @@ class FactureStats extends Stats
|
||||
if ($mode == 'customer')
|
||||
{
|
||||
$object=new Facture($this->db);
|
||||
$this->from = MAIN_DB_PREFIX.$object->table_element." as p, ".MAIN_DB_PREFIX."societe as s";
|
||||
$this->from = MAIN_DB_PREFIX.$object->table_element;
|
||||
$this->field='total';
|
||||
}
|
||||
if ($mode == 'supplier')
|
||||
{
|
||||
$object=new FactureFournisseur($this->db);
|
||||
$this->from = MAIN_DB_PREFIX.$object->table_element." as p, ".MAIN_DB_PREFIX."societe as s";
|
||||
$this->from = MAIN_DB_PREFIX.$object->table_element;
|
||||
$this->field='total_ht';
|
||||
}
|
||||
|
||||
$this->socid = $socid;
|
||||
$this->where =" fk_statut > 0";
|
||||
$this->where.= " AND p.fk_soc = s.rowid AND s.entity = ".$conf->entity;
|
||||
if ($mode == 'customer') $this->where.=" AND (fk_statut != 3 OR close_code != 'replaced')"; // Exclude replaced invoices
|
||||
$this->where.= " AND entity = ".$conf->entity;
|
||||
if ($mode == 'customer') $this->where.=" AND fk_statut != 3"; // Exclude replaced invoices
|
||||
if ($this->socid)
|
||||
{
|
||||
$this->where.=" AND fk_soc = ".$this->socid;
|
||||
@ -81,7 +81,7 @@ class FactureStats extends Stats
|
||||
|
||||
|
||||
/**
|
||||
* \brief Renvoie le nombre de facture par année
|
||||
* \brief Renvoie le nombre de facture par annee
|
||||
* \return array Array of values
|
||||
*/
|
||||
function getNbByYear()
|
||||
@ -96,7 +96,7 @@ class FactureStats extends Stats
|
||||
|
||||
|
||||
/**
|
||||
* \brief Renvoie le nombre de facture par mois pour une année donnée
|
||||
* \brief Renvoie le nombre de facture par mois pour une annee donnee
|
||||
* \param year Year to scan
|
||||
* \return array Array of values
|
||||
*/
|
||||
@ -115,7 +115,7 @@ class FactureStats extends Stats
|
||||
|
||||
|
||||
/**
|
||||
* \brief Renvoie le montant de facture par mois pour une année donnée
|
||||
* \brief Renvoie le montant de facture par mois pour une annee donnee
|
||||
* \param year Year to scan
|
||||
* \return array Array of values
|
||||
*/
|
||||
|
||||
@ -30,7 +30,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php");
|
||||
$WIDTH=500;
|
||||
$HEIGHT=200;
|
||||
|
||||
// Sécurité accés client
|
||||
// Securite acces client
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
$action = '';
|
||||
|
||||
@ -397,7 +397,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create')
|
||||
if ($soc->particulier)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('LastName').'</td><td><input type="text" size="30" name="nom" value="'.$soc->nom.'"></td>';
|
||||
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" name="prefix_comm" value="'.$soc->prefix_comm.'"></td></tr>';
|
||||
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$soc->prefix_comm.'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans('FirstName').'</td><td><input type="text" size="30" name="prenom" value="'.$soc->firstname.'"></td>';
|
||||
print '<td colspan=2> </td></tr>';
|
||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td>';
|
||||
@ -407,7 +407,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create')
|
||||
else
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('Name').'</td><td><input type="text" size="30" name="nom" value="'.$soc->nom.'"></td>';
|
||||
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" name="prefix_comm" value="'.$soc->prefix_comm.'"></td></tr>';
|
||||
print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$soc->prefix_comm.'"></td></tr>';
|
||||
}
|
||||
|
||||
// Client / Prospect
|
||||
@ -735,7 +735,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<input type="text" size="5" name="prefix_comm" value="'.$soc->prefix_comm.'">';
|
||||
print '<input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$soc->prefix_comm.'">';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user