109 $sql =
"SELECT pl.rowid, pl.amount, p.ref, p.rowid as bon_rowid";
110 $sql .=
", pl.statut, pl.fk_soc";
111 $sql .=
" FROM ".MAIN_DB_PREFIX.
"prelevement_lignes as pl";
112 $sql .=
", ".MAIN_DB_PREFIX.
"prelevement_bons as p";
113 $sql .=
" WHERE pl.rowid=".((int) $rowid);
114 $sql .=
" AND p.rowid = pl.fk_prelevement_bons";
115 $sql .=
" AND p.entity = ".$conf->entity;
117 $resql = $this->db->query($sql);
119 if ($this->db->num_rows($resql)) {
120 $obj = $this->db->fetch_object($resql);
122 $this->
id = $obj->rowid;
123 $this->amount = $obj->amount;
124 $this->socid = $obj->fk_soc;
125 $this->
statut = $obj->statut;
126 $this->bon_ref = $obj->ref;
127 $this->bon_rowid = $obj->bon_rowid;
130 dol_syslog(
"LignePrelevement::Fetch rowid=$rowid numrows=0");
133 $this->db->free($resql);
136 dol_syslog(
"LignePrelevement::Fetch rowid=$rowid");
168 return $langs->trans($this->labelStatus[$status]);
169 } elseif ($mode == 1) {
171 return img_picto($langs->trans($this->labelStatus[$status]),
'statut1',
'class="valignmiddle"').
' '.$langs->transnoentitiesnoconv($this->labelStatus[$status]);
172 } elseif ($status == 2) {
173 return img_picto($langs->trans($this->labelStatus[$status]),
'statut6',
'class="valignmiddle"').
' '.$langs->transnoentitiesnoconv($this->labelStatus[$status]);
174 } elseif ($status == 3) {
175 return img_picto($langs->trans($this->labelStatus[$status]),
'statut8',
'class="valignmiddle"').
' '.$langs->transnoentitiesnoconv($this->labelStatus[$status]);
177 } elseif ($mode == 2) {
179 return img_picto($langs->trans($this->labelStatus[$status]),
'statut1',
'class="valignmiddle"');
180 } elseif ($status == 2) {
181 return img_picto($langs->trans($this->labelStatus[$status]),
'statut6',
'class="valignmiddle"');
182 } elseif ($status == 3) {
183 return img_picto($langs->trans($this->labelStatus[$status]),
'statut8',
'class="valignmiddle"');
185 } elseif ($mode == 3) {
187 return $langs->trans($this->labelStatus[$status]).
' '.
img_picto($langs->transnoentitiesnoconv($this->labelStatus[$status]),
'statut1',
'class="valignmiddle"');
188 } elseif ($status == 2) {
189 return $langs->trans($this->labelStatus[$status]).
' '.
img_picto($langs->transnoentitiesnoconv($this->labelStatus[$status]),
'statut6',
'class="valignmiddle"');
190 } elseif ($status == 3) {
191 return $langs->trans($this->labelStatus[$status]).
' '.
img_picto($langs->transnoentitiesnoconv($this->labelStatus[$status]),
'statut8',
'class="valignmiddle"');