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=".((int) $rowid);
83 $sql .=
" AND p.rowid = pl.fk_prelevement_bons";
84 $sql .=
" AND p.entity = ".$conf->entity;
89 $obj = $this->
db->fetch_object(
$resql);
91 $this->
id = $obj->rowid;
92 $this->amount = $obj->amount;
93 $this->socid = $obj->fk_soc;
94 $this->statut = $obj->statut;
95 $this->bon_ref = $obj->ref;
96 $this->bon_rowid = $obj->bon_rowid;
99 dol_syslog(
"LignePrelevement::Fetch rowid=$rowid numrows=0");
105 dol_syslog(
"LignePrelevement::Fetch rowid=$rowid");
120 return $this->
LibStatut($this->statut, $mode);
137 return $langs->trans($this->statuts[$status]);
138 } elseif ($mode == 1) {
140 return img_picto($langs->trans($this->statuts[$status]),
'statut1',
'class="valignmiddle"').
' '.$langs->transnoentitiesnoconv($this->statuts[$status]);
141 } elseif ($status == 2) {
142 return img_picto($langs->trans($this->statuts[$status]),
'statut6',
'class="valignmiddle"').
' '.$langs->transnoentitiesnoconv($this->statuts[$status]);
143 } elseif ($status == 3) {
144 return img_picto($langs->trans($this->statuts[$status]),
'statut8',
'class="valignmiddle"').
' '.$langs->transnoentitiesnoconv($this->statuts[$status]);
146 } elseif ($mode == 2) {
148 return img_picto($langs->trans($this->statuts[$status]),
'statut1',
'class="valignmiddle"');
149 } elseif ($status == 2) {
150 return img_picto($langs->trans($this->statuts[$status]),
'statut6',
'class="valignmiddle"');
151 } elseif ($status == 3) {
152 return img_picto($langs->trans($this->statuts[$status]),
'statut8',
'class="valignmiddle"');
154 } elseif ($mode == 3) {
156 return $langs->trans($this->statuts[$status]).
' '.
img_picto($langs->transnoentitiesnoconv($this->statuts[$status]),
'statut1',
'class="valignmiddle"');
157 } elseif ($status == 2) {
158 return $langs->trans($this->statuts[$status]).
' '.
img_picto($langs->transnoentitiesnoconv($this->statuts[$status]),
'statut6',
'class="valignmiddle"');
159 } elseif ($status == 3) {
160 return $langs->trans($this->statuts[$status]).
' '.
img_picto($langs->transnoentitiesnoconv($this->statuts[$status]),
'statut8',
'class="valignmiddle"');
static commonReplaceThirdparty(DoliDB $dbs, $origin_id, $dest_id, array $tables, $ignoreerrors=0)
Function used to replace a thirdparty id with another one.
Class to manage Dolibarr database access.
Class to manage withdrawals.
static replaceThirdparty(DoliDB $dbs, $origin_id, $dest_id)
Function used to replace a thirdparty id with another one.
fetch($rowid)
Recupere l'objet prelevement.
LibStatut($status, $mode=0)
Return status label for a status.
getLibStatut($mode=0)
Return status label of object.
__construct($db)
Constructor.
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
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.
$conf db
API class for accounts.