Removed deprecated method classer_facturee(). Duplicate of

classifyBilled
This commit is contained in:
Laurent Destailleur 2018-03-16 10:51:12 +01:00
parent a642ac60f6
commit e639f2a91f
9 changed files with 45 additions and 90 deletions

View File

@ -140,7 +140,6 @@ class DolibarrApi
unset($object->class_element_line);
unset($object->picto);
unset($object->facturee); // Replace with billed
unset($object->fieldsforcombobox);
unset($object->comments);

View File

@ -592,7 +592,6 @@ class ActionComm extends CommonObject
$this->label = $obj->label;
$this->datep = $this->db->jdate($obj->datep);
$this->datef = $this->db->jdate($obj->datep2);
// $this->durationp = $this->durationp; // deprecated
$this->datec = $this->db->jdate($obj->datec);
$this->datem = $this->db->jdate($obj->datem);

View File

@ -468,10 +468,8 @@ if ($resql)
$event->datef=$datep2;
$event->type_code=$obj->code;
$event->type_color=$obj->color;
//$event->libelle=$obj->label; // deprecated
$event->label=$obj->label;
$event->percentage=$obj->percent;
//$event->author->id=$obj->fk_user_author; // user id of creator
$event->authorid=$obj->fk_user_author; // user id of creator
$event->userownerid=$obj->fk_user_action; // user id of owner
$event->priority=$obj->priority;
@ -483,8 +481,6 @@ if ($resql)
$event->socid=$obj->fk_soc;
$event->contactid=$obj->fk_contact;
//$event->societe->id=$obj->fk_soc; // deprecated
//$event->contact->id=$obj->fk_contact; // deprecated
$event->fk_element=$obj->fk_element;
$event->elementtype=$obj->elementtype;

View File

@ -496,10 +496,8 @@ if ($resql)
$event->datef=$datep2;
$event->type_code=$obj->code;
$event->type_color=$obj->color;
//$event->libelle=$obj->label; // deprecated
$event->label=$obj->label;
$event->percentage=$obj->percent;
//$event->author->id=$obj->fk_user_author; // user id of creator
$event->authorid=$obj->fk_user_author; // user id of creator
$event->userownerid=$obj->fk_user_action; // user id of owner
$event->priority=$obj->priority;
@ -511,8 +509,6 @@ if ($resql)
$event->socid=$obj->fk_soc;
$event->contactid=$obj->fk_contact;
//$event->societe->id=$obj->fk_soc; // deprecated
//$event->contact->id=$obj->fk_contact; // deprecated
$event->fk_element=$obj->fk_element;
$event->elementtype=$obj->elementtype;

View File

@ -751,7 +751,7 @@ if ($object->id > 0)
{
// Check if there are orders billable
$sql2 = 'SELECT s.nom, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,';
$sql2.= ' c.date_valid, c.date_commande, c.date_livraison, c.fk_statut, c.facture as facturee';
$sql2.= ' c.date_valid, c.date_commande, c.date_livraison, c.fk_statut, c.facture as billed';
$sql2.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
$sql2.= ', '.MAIN_DB_PREFIX.'commande as c';
$sql2.= ' WHERE c.fk_soc = s.rowid';
@ -779,14 +779,16 @@ if ($object->id > 0)
{
$objp = $db->fetch_object($resql);
$commande_static->id = $objp->cid;
$commande_static->ref = $objp->ref;
$commande_static->ref_client=$objp->ref_client;
$commande_static->total_ht = $objp->total_ht;
$commande_static->total_tva = $objp->total_tva;
$commande_static->total_ttc = $objp->total_ttc;
$commande_static->billed = $objp->billed;
print '<tr class="oddeven">';
print '<td class="nowrap">';
$commande_static->id = $objp->cid;
$commande_static->ref = $objp->ref;
$commande_static->ref_client=$objp->ref_client;
$commande_static->total_ht = $objp->total_ht;
$commande_static->total_tva = $objp->total_tva;
$commande_static->total_ttc = $objp->total_ttc;
print $commande_static->getNomUrl(1);
print '</td><td align="right" width="80px">'.dol_print_date($db->jdate($objp->dc),'day')."</td>\n";
print '<td align="right" style="min-width: 60px">'.price($objp->total_ht).'</td>';

View File

@ -2528,21 +2528,6 @@ class Propal extends CommonObject
}
}
/**
* Class invoiced the Propal
*
* @return int <0 si ko, >0 si ok
* @deprecated
* @see classifyBilled()
*/
function classer_facturee()
{
global $user;
dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING);
return $this->classifyBilled($user);
}
/**
* Set draft status
*

View File

@ -79,10 +79,9 @@ class Commande extends CommonOrder
*/
public $statut;
/**
* @deprecated
* @see billed
* Billed
* @var int
*/
public $facturee;
public $billed; // billed or not
public $brouillon;
@ -545,7 +544,6 @@ class Commande extends CommonOrder
{
$this->statut = self::STATUS_VALIDATED;
$this->billed = 0;
$this->facturee = 0; // deprecated
$this->db->commit();
return 1;
@ -1624,7 +1622,6 @@ class Commande extends CommonOrder
$this->remise_percent = $obj->remise_percent;
$this->remise_absolue = $obj->remise_absolue;
$this->source = $obj->source;
$this->facturee = $obj->billed; // deprecated
$this->billed = $obj->billed;
$this->note = $obj->note_private; // deprecated
$this->note_private = $obj->note_private;
@ -2701,7 +2698,6 @@ class Commande extends CommonOrder
if (! $error)
{
$this->oldcopy= clone $this;
$this->facturee=1; // deprecated
$this->billed=1;
}
@ -2737,21 +2733,6 @@ class Commande extends CommonOrder
}
}
/**
* Classify the order as invoiced
*
* @return int <0 if ko, >0 if ok
* @deprecated
* @see classifyBilled()
*/
function classer_facturee()
{
global $user;
dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING);
return $this->classifyBilled($user);
}
/**
* Classify the order as not invoiced
*
@ -2773,7 +2754,6 @@ class Commande extends CommonOrder
if (! $error)
{
$this->oldcopy= clone $this;
$this->facturee=1; // deprecated
$this->billed=1;
}
@ -2784,7 +2764,6 @@ class Commande extends CommonOrder
if (! $error)
{
$this->facturee=0; // deprecated
$this->billed=0;
$this->db->commit();
@ -3319,7 +3298,6 @@ class Commande extends CommonOrder
*/
function getLibStatut($mode)
{
if ($this->facturee && empty($this->billed)) $this->billed=$this->facturee; // For backward compatibility
return $this->LibStatut($this->statut, $this->billed, $mode);
}

View File

@ -545,7 +545,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
<?php
$sql = 'SELECT s.nom, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,';
$sql.= ' c.date_valid, c.date_commande, c.date_livraison, c.fk_statut, c.facture as facturee';
$sql.= ' c.date_valid, c.date_commande, c.date_livraison, c.fk_statut, c.facture as billed';
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
$sql.= ', '.MAIN_DB_PREFIX.'commande as c';
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@ -695,7 +695,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
print '</td>';
// Statut
print '<td align="right" class="nowrap">'.$generic_commande->LibStatut($objp->fk_statut,$objp->facturee,5).'</td>';
print '<td align="right" class="nowrap">'.$generic_commande->LibStatut($objp->fk_statut,$objp->billed,5).'</td>';
// Checkbox
print '<td align="center">';

View File

@ -148,7 +148,7 @@ if ($resql)
$orderstatic->ref=$obj->ref;
$orderstatic->ref_customer=$obj->ref_customer;
$orderstatic->statut=$obj->fk_statut;
$orderstatic->facturee=0;
$orderstatic->billed=0;
$companystatic->name=$obj->name;
$companystatic->id=$obj->socid;
@ -208,7 +208,7 @@ if ( $resql )
$orderstatic->ref=$obj->ref;
$orderstatic->ref_customer=$obj->ref_customer;
$orderstatic->statut=$obj->status;
$orderstatic->facturee=$obj->billed;
$orderstatic->billed=$obj->billed;
$companystatic->name=$obj->name;
$companystatic->id=$obj->socid;