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->picto);
|
||||
|
||||
unset($object->facturee); // Replace with billed
|
||||
unset($object->fieldsforcombobox);
|
||||
unset($object->comments);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
@ -624,9 +620,9 @@ $currentdaytoshow = $firstdaytoshow;
|
||||
echo '<div class="div-table-responsive">';
|
||||
|
||||
while($currentdaytoshow<$lastdaytoshow) {
|
||||
|
||||
|
||||
echo '<table width="100%" class="noborder nocellnopadd cal_month">';
|
||||
|
||||
|
||||
echo '<tr class="liste_titre">';
|
||||
echo '<td></td>';
|
||||
$i=0; // 0 = sunday,
|
||||
@ -646,7 +642,7 @@ while($currentdaytoshow<$lastdaytoshow) {
|
||||
$i++;
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
|
||||
echo '<tr class="liste_titre">';
|
||||
echo '<td></td>';
|
||||
$i=0;
|
||||
@ -667,8 +663,8 @@ while($currentdaytoshow<$lastdaytoshow) {
|
||||
$i++;
|
||||
}
|
||||
echo "</tr>\n";
|
||||
|
||||
|
||||
|
||||
|
||||
// Define $usernames
|
||||
$usernames = array(); //init
|
||||
$usernamesid = array();
|
||||
@ -722,7 +718,7 @@ while($currentdaytoshow<$lastdaytoshow) {
|
||||
$result=$tmpuser->fetch($id);
|
||||
$usernames[]=$tmpuser;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
if ($filtert > 0)
|
||||
{
|
||||
@ -742,7 +738,7 @@ while($currentdaytoshow<$lastdaytoshow) {
|
||||
//$tmpgroup->fetch($usergroup); No fetch, we want all users for all groups
|
||||
$usernames = $tmpgroup->listUsersForGroup();
|
||||
}*/
|
||||
|
||||
|
||||
// Load array of colors by type
|
||||
$colorsbytype=array();
|
||||
$labelbytype=array();
|
||||
@ -753,7 +749,7 @@ while($currentdaytoshow<$lastdaytoshow) {
|
||||
$colorsbytype[$obj->code]=$obj->color;
|
||||
$labelbytype[$obj->code]=$obj->libelle;
|
||||
}
|
||||
|
||||
|
||||
// Loop on each user to show calendar
|
||||
$todayarray=dol_getdate($now,'fast');
|
||||
$sav = $tmpday;
|
||||
@ -767,42 +763,42 @@ while($currentdaytoshow<$lastdaytoshow) {
|
||||
print $username->getNomUrl(-1,'',0,0,20,1,'');
|
||||
print '</td>';
|
||||
$tmpday = $sav;
|
||||
|
||||
|
||||
// Lopp on each day of week
|
||||
$i = 0;
|
||||
for ($iter_day = 0; $iter_day < 8; $iter_day++)
|
||||
{
|
||||
|
||||
|
||||
if (($i + 1) < $begin_d || ($i + 1) > $end_d)
|
||||
{
|
||||
$i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// Show days of the current week
|
||||
$curtime = dol_time_plus_duree($currentdaytoshow, $iter_day, 'd');
|
||||
$tmparray = dol_getdate($curtime,'fast');
|
||||
$tmpday = $tmparray['mday'];
|
||||
$tmpmonth = $tmparray['mon'];
|
||||
$tmpyear = $tmparray['year'];
|
||||
|
||||
|
||||
$style='cal_current_month';
|
||||
if ($iter_day == 6) $style.=' cal_other_month';
|
||||
$today=0;
|
||||
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$tmpmonth && $todayarray['year']==$tmpyear) $today=1;
|
||||
if ($today) $style='cal_today_peruser';
|
||||
|
||||
|
||||
show_day_events2($username, $tmpday, $tmpmonth, $tmpyear, $monthshown, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, $showheader, $colorsbytype, $var);
|
||||
|
||||
|
||||
$i++;
|
||||
}
|
||||
echo "</tr>\n";
|
||||
$showheader = false;
|
||||
}
|
||||
|
||||
|
||||
echo "</table>\n";
|
||||
echo "<br>";
|
||||
|
||||
|
||||
$currentdaytoshow = dol_time_plus_duree($currentdaytoshow, 7, 'd');
|
||||
|
||||
}
|
||||
@ -921,7 +917,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
|
||||
$colorindexused[$user->id] = 0; // Color index for current user (user->id) is always 0
|
||||
$nextindextouse=count($colorindexused); // At first run this is 0, so first user has 0, next 1, ...
|
||||
//if ($username->id && $day==1) var_dump($eventarray);
|
||||
|
||||
|
||||
// We are in a particular day for $username, now we scan all events
|
||||
foreach ($eventarray as $daykey => $notused)
|
||||
{
|
||||
|
||||
@ -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>';
|
||||
|
||||
@ -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
|
||||
*
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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">';
|
||||
|
||||
@ -93,11 +93,11 @@ if ($resql)
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
||||
$shipment->id=$obj->rowid;
|
||||
$shipment->ref=$obj->ref;
|
||||
$shipment->ref_customer=$obj->ref_customer;
|
||||
|
||||
$shipment->ref_customer=$obj->ref_customer;
|
||||
|
||||
print '<tr class="oddeven"><td class="nowrap">';
|
||||
print $shipment->getNomUrl(1);
|
||||
print "</td>";
|
||||
@ -148,11 +148,11 @@ 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;
|
||||
|
||||
$companystatic->id=$obj->socid;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap">';
|
||||
print $orderstatic->getNomUrl(1);
|
||||
@ -203,16 +203,16 @@ if ( $resql )
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
||||
$orderstatic->id=$obj->rowid;
|
||||
$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;
|
||||
|
||||
$companystatic->id=$obj->socid;
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $orderstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
@ -262,11 +262,11 @@ if ($resql)
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
||||
$shipment->id=$obj->rowid;
|
||||
$shipment->ref=$obj->ref;
|
||||
$shipment->ref_customer=$obj->ref_customer;
|
||||
|
||||
$shipment->ref_customer=$obj->ref_customer;
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $shipment->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user