Removed deprecated method classer_facturee(). Duplicate of
classifyBilled
This commit is contained in:
parent
a642ac60f6
commit
e639f2a91f
@ -140,7 +140,6 @@ class DolibarrApi
|
|||||||
unset($object->class_element_line);
|
unset($object->class_element_line);
|
||||||
unset($object->picto);
|
unset($object->picto);
|
||||||
|
|
||||||
unset($object->facturee); // Replace with billed
|
|
||||||
unset($object->fieldsforcombobox);
|
unset($object->fieldsforcombobox);
|
||||||
unset($object->comments);
|
unset($object->comments);
|
||||||
|
|
||||||
|
|||||||
@ -592,7 +592,6 @@ class ActionComm extends CommonObject
|
|||||||
$this->label = $obj->label;
|
$this->label = $obj->label;
|
||||||
$this->datep = $this->db->jdate($obj->datep);
|
$this->datep = $this->db->jdate($obj->datep);
|
||||||
$this->datef = $this->db->jdate($obj->datep2);
|
$this->datef = $this->db->jdate($obj->datep2);
|
||||||
// $this->durationp = $this->durationp; // deprecated
|
|
||||||
|
|
||||||
$this->datec = $this->db->jdate($obj->datec);
|
$this->datec = $this->db->jdate($obj->datec);
|
||||||
$this->datem = $this->db->jdate($obj->datem);
|
$this->datem = $this->db->jdate($obj->datem);
|
||||||
|
|||||||
@ -468,10 +468,8 @@ if ($resql)
|
|||||||
$event->datef=$datep2;
|
$event->datef=$datep2;
|
||||||
$event->type_code=$obj->code;
|
$event->type_code=$obj->code;
|
||||||
$event->type_color=$obj->color;
|
$event->type_color=$obj->color;
|
||||||
//$event->libelle=$obj->label; // deprecated
|
|
||||||
$event->label=$obj->label;
|
$event->label=$obj->label;
|
||||||
$event->percentage=$obj->percent;
|
$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->authorid=$obj->fk_user_author; // user id of creator
|
||||||
$event->userownerid=$obj->fk_user_action; // user id of owner
|
$event->userownerid=$obj->fk_user_action; // user id of owner
|
||||||
$event->priority=$obj->priority;
|
$event->priority=$obj->priority;
|
||||||
@ -483,8 +481,6 @@ if ($resql)
|
|||||||
|
|
||||||
$event->socid=$obj->fk_soc;
|
$event->socid=$obj->fk_soc;
|
||||||
$event->contactid=$obj->fk_contact;
|
$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->fk_element=$obj->fk_element;
|
||||||
$event->elementtype=$obj->elementtype;
|
$event->elementtype=$obj->elementtype;
|
||||||
|
|||||||
@ -496,10 +496,8 @@ if ($resql)
|
|||||||
$event->datef=$datep2;
|
$event->datef=$datep2;
|
||||||
$event->type_code=$obj->code;
|
$event->type_code=$obj->code;
|
||||||
$event->type_color=$obj->color;
|
$event->type_color=$obj->color;
|
||||||
//$event->libelle=$obj->label; // deprecated
|
|
||||||
$event->label=$obj->label;
|
$event->label=$obj->label;
|
||||||
$event->percentage=$obj->percent;
|
$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->authorid=$obj->fk_user_author; // user id of creator
|
||||||
$event->userownerid=$obj->fk_user_action; // user id of owner
|
$event->userownerid=$obj->fk_user_action; // user id of owner
|
||||||
$event->priority=$obj->priority;
|
$event->priority=$obj->priority;
|
||||||
@ -511,8 +509,6 @@ if ($resql)
|
|||||||
|
|
||||||
$event->socid=$obj->fk_soc;
|
$event->socid=$obj->fk_soc;
|
||||||
$event->contactid=$obj->fk_contact;
|
$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->fk_element=$obj->fk_element;
|
||||||
$event->elementtype=$obj->elementtype;
|
$event->elementtype=$obj->elementtype;
|
||||||
|
|||||||
@ -751,7 +751,7 @@ if ($object->id > 0)
|
|||||||
{
|
{
|
||||||
// Check if there are orders billable
|
// 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 = '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.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||||
$sql2.= ', '.MAIN_DB_PREFIX.'commande as c';
|
$sql2.= ', '.MAIN_DB_PREFIX.'commande as c';
|
||||||
$sql2.= ' WHERE c.fk_soc = s.rowid';
|
$sql2.= ' WHERE c.fk_soc = s.rowid';
|
||||||
@ -779,14 +779,16 @@ if ($object->id > 0)
|
|||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$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 '<tr class="oddeven">';
|
||||||
print '<td class="nowrap">';
|
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 $commande_static->getNomUrl(1);
|
||||||
print '</td><td align="right" width="80px">'.dol_print_date($db->jdate($objp->dc),'day')."</td>\n";
|
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>';
|
print '<td align="right" style="min-width: 60px">'.price($objp->total_ht).'</td>';
|
||||||
|
|||||||
@ -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
|
* Set draft status
|
||||||
*
|
*
|
||||||
|
|||||||
@ -79,10 +79,9 @@ class Commande extends CommonOrder
|
|||||||
*/
|
*/
|
||||||
public $statut;
|
public $statut;
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* Billed
|
||||||
* @see billed
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $facturee;
|
|
||||||
public $billed; // billed or not
|
public $billed; // billed or not
|
||||||
|
|
||||||
public $brouillon;
|
public $brouillon;
|
||||||
@ -545,7 +544,6 @@ class Commande extends CommonOrder
|
|||||||
{
|
{
|
||||||
$this->statut = self::STATUS_VALIDATED;
|
$this->statut = self::STATUS_VALIDATED;
|
||||||
$this->billed = 0;
|
$this->billed = 0;
|
||||||
$this->facturee = 0; // deprecated
|
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
@ -1624,7 +1622,6 @@ class Commande extends CommonOrder
|
|||||||
$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->billed; // deprecated
|
|
||||||
$this->billed = $obj->billed;
|
$this->billed = $obj->billed;
|
||||||
$this->note = $obj->note_private; // deprecated
|
$this->note = $obj->note_private; // deprecated
|
||||||
$this->note_private = $obj->note_private;
|
$this->note_private = $obj->note_private;
|
||||||
@ -2701,7 +2698,6 @@ class Commande extends CommonOrder
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$this->oldcopy= clone $this;
|
$this->oldcopy= clone $this;
|
||||||
$this->facturee=1; // deprecated
|
|
||||||
$this->billed=1;
|
$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
|
* Classify the order as not invoiced
|
||||||
*
|
*
|
||||||
@ -2773,7 +2754,6 @@ class Commande extends CommonOrder
|
|||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$this->oldcopy= clone $this;
|
$this->oldcopy= clone $this;
|
||||||
$this->facturee=1; // deprecated
|
|
||||||
$this->billed=1;
|
$this->billed=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2784,7 +2764,6 @@ class Commande extends CommonOrder
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$this->facturee=0; // deprecated
|
|
||||||
$this->billed=0;
|
$this->billed=0;
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
@ -3319,7 +3298,6 @@ class Commande extends CommonOrder
|
|||||||
*/
|
*/
|
||||||
function getLibStatut($mode)
|
function getLibStatut($mode)
|
||||||
{
|
{
|
||||||
if ($this->facturee && empty($this->billed)) $this->billed=$this->facturee; // For backward compatibility
|
|
||||||
return $this->LibStatut($this->statut, $this->billed, $mode);
|
return $this->LibStatut($this->statut, $this->billed, $mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -545,7 +545,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$sql = 'SELECT s.nom, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,';
|
$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.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||||
$sql.= ', '.MAIN_DB_PREFIX.'commande as c';
|
$sql.= ', '.MAIN_DB_PREFIX.'commande as c';
|
||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
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>';
|
print '</td>';
|
||||||
|
|
||||||
// Statut
|
// 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
|
// Checkbox
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
|
|||||||
@ -148,7 +148,7 @@ if ($resql)
|
|||||||
$orderstatic->ref=$obj->ref;
|
$orderstatic->ref=$obj->ref;
|
||||||
$orderstatic->ref_customer=$obj->ref_customer;
|
$orderstatic->ref_customer=$obj->ref_customer;
|
||||||
$orderstatic->statut=$obj->fk_statut;
|
$orderstatic->statut=$obj->fk_statut;
|
||||||
$orderstatic->facturee=0;
|
$orderstatic->billed=0;
|
||||||
|
|
||||||
$companystatic->name=$obj->name;
|
$companystatic->name=$obj->name;
|
||||||
$companystatic->id=$obj->socid;
|
$companystatic->id=$obj->socid;
|
||||||
@ -208,7 +208,7 @@ if ( $resql )
|
|||||||
$orderstatic->ref=$obj->ref;
|
$orderstatic->ref=$obj->ref;
|
||||||
$orderstatic->ref_customer=$obj->ref_customer;
|
$orderstatic->ref_customer=$obj->ref_customer;
|
||||||
$orderstatic->statut=$obj->status;
|
$orderstatic->statut=$obj->status;
|
||||||
$orderstatic->facturee=$obj->billed;
|
$orderstatic->billed=$obj->billed;
|
||||||
|
|
||||||
$companystatic->name=$obj->name;
|
$companystatic->name=$obj->name;
|
||||||
$companystatic->id=$obj->socid;
|
$companystatic->id=$obj->socid;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user