class LignePrelevement (View source)

Class to manage withdrawals

Constants

STATUS_DRAFT

STATUS_NOT_USED

STATUS_CREDITED

STATUS_DEBITED

STATUS_REJECTED

Properties

int $id
float $amount
int $socid
int $statut
string $bon_ref
int $bon_rowid
DoliDB $db
$labelStatus

Methods

__construct($db)

Constructor

int
fetch($rowid)

Recupere l'objet prelevement

string
getLibStatut($mode = 0)

Return status label of object

LibStatut($status, int $mode = 0)

Return status label for a status

static bool
replaceThirdparty(DoliDB $dbs, int $origin_id, int $dest_id)

Function used to replace a thirdparty id with another one.

Details

__construct($db)

Constructor

@param DoliDB $db Database handler

Parameters

$db

int fetch($rowid)

Recupere l'objet prelevement

@param int $rowid Id de la facture a recuperer

Parameters

$rowid

Return Value

int

Return integer <0 if KO, >=0 if OK

string getLibStatut($mode = 0)

Return status label of object

@param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto

Parameters

$mode

Return Value

string Label

LibStatut($status, int $mode = 0)

Return status label for a status

@param int $status Id status

Parameters

$status
int $mode

0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto @return null|string Return status label (or null if $mode != 0, 1, 2, 3 or 4)

static bool replaceThirdparty(DoliDB $dbs, int $origin_id, int $dest_id)

Function used to replace a thirdparty id with another one.

Parameters

DoliDB $dbs

Database handler, because function is static we name it $dbs not $db to avoid breaking coding test

int $origin_id

Old thirdparty id

int $dest_id

New thirdparty id

Return Value

bool