44 public $statuts = array();
60 $langs->load(
"withdrawals");
61 $this->statuts[0] = $langs->trans(
"StatusWaiting");
62 $this->statuts[2] = $langs->trans(
"StatusPaid");
63 $this->statuts[3] = $langs->trans(
"StatusRefused");
78 $sql =
"SELECT pl.rowid, pl.amount, p.ref, p.rowid as bon_rowid";
79 $sql .=
", pl.statut, pl.fk_soc";
80 $sql .=
" FROM ".MAIN_DB_PREFIX.
"prelevement_lignes as pl";
81 $sql .=
", ".MAIN_DB_PREFIX.
"prelevement_bons as p";
82 $sql .=
" WHERE pl.rowid=".$rowid;
83 $sql .=
" AND p.rowid = pl.fk_prelevement_bons";
84 $sql .=
" AND p.entity = ".$conf->entity;
91 $obj = $this->
db->fetch_object(
$resql);
93 $this->
id = $obj->rowid;
94 $this->amount = $obj->amount;
95 $this->socid = $obj->fk_soc;
96 $this->
statut = $obj->statut;
97 $this->bon_ref = $obj->ref;
98 $this->bon_rowid = $obj->bon_rowid;
101 dol_syslog(
"LignePrelevement::Fetch rowid=$rowid numrows=0");
107 dol_syslog(
"LignePrelevement::Fetch rowid=$rowid");
140 return $langs->trans($this->statuts[$status]);
141 } elseif ($mode == 1)
143 if ($status == 0)
return img_picto($langs->trans($this->statuts[$status]),
'statut1').
' '.$langs->trans($this->statuts[$status]);
144 elseif ($status == 2)
return img_picto($langs->trans($this->statuts[$status]),
'statut6').
' '.$langs->trans($this->statuts[$status]);
145 elseif ($status == 3)
return img_picto($langs->trans($this->statuts[$status]),
'statut8').
' '.$langs->trans($this->statuts[$status]);
146 } elseif ($mode == 2)
148 if ($status == 0)
return img_picto($langs->trans($this->statuts[$status]),
'statut1');
149 elseif ($status == 2)
return img_picto($langs->trans($this->statuts[$status]),
'statut6');
150 elseif ($status == 3)
return img_picto($langs->trans($this->statuts[$status]),
'statut8');
151 } elseif ($mode == 3)
153 if ($status == 0)
return $langs->trans($this->statuts[$status]).
' '.
img_picto($langs->trans($this->statuts[$status]),
'statut1');
154 elseif ($status == 2)
return $langs->trans($this->statuts[$status]).
' '.
img_picto($langs->trans($this->statuts[$status]),
'statut6');
155 elseif ($status == 3)
return $langs->trans($this->statuts[$status]).
' '.
img_picto($langs->trans($this->statuts[$status]),
'statut8');
if(!empty($arrayfields['u.datec']['checked'])) print_liste_field_titre("DateCreationShort"u if(!empty($arrayfields['u.tms']['checked'])) print_liste_field_titre("DateModificationShort"u if(!empty($arrayfields['u.statut']['checked'])) print_liste_field_titre("Status"u statut
LibStatut($status, $mode=0)
Return status label for a status.
static replaceThirdparty(DoliDB $db, $origin_id, $dest_id)
Function used to replace a thirdparty id with another one.
Class to manage Dolibarr database access.
fetch($rowid)
Recupere l'objet prelevement.
$conf db
API class for accounts.
getLibStatut($mode=0)
Return status label of object.
__construct($db)
Constructor.
static commonReplaceThirdparty(DoliDB $db, $origin_id, $dest_id, array $tables, $ignoreerrors=0)
Function used to replace a thirdparty id with another one.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename= '', $restricttologhandler= '', $logcontext=null)
Write log message into outputs.
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
Class to manage withdrawals.