dolibarr 21.0.0-alpha
RejetPrelevement Class Reference

Class to manage standing orders rejects. More...

Public Member Functions

 __construct ($db, $user, $type)
 Constructor.
 
 create ($user, $id, $motif, $date_rejet, $bonid, $facturation=0)
 Create a reject.
 
 fetch ($rowid)
 Retrieve withdrawal object.
 

Private Member Functions

 _send_email ($fac)
 Send email to all users that has asked the withdraw request.
 
 getListInvoices ($amounts=0)
 Retrieve the list of invoices.
 

Detailed Description

Class to manage standing orders rejects.

Definition at line 33 of file rejetprelevement.class.php.

Constructor & Destructor Documentation

◆ __construct()

RejetPrelevement::__construct ( $db,
$user,
$type )

Constructor.

Parameters
DoliDB$dbDatabase handler
User$userObject user
'direct-debit'|'bank-transfer'$type Type ('direct-debit' for direct debit or 'bank-transfer' for credit transfer)

Definition at line 87 of file rejetprelevement.class.php.

References type, and user.

Member Function Documentation

◆ _send_email()

RejetPrelevement::_send_email ( $fac)
private

Send email to all users that has asked the withdraw request.

Parameters
Facture$facInvoice object
Returns
void

Definition at line 255 of file rejetprelevement.class.php.

References dol_syslog(), price(), and user.

Referenced by create().

◆ create()

RejetPrelevement::create ( $user,
$id,
$motif,
$date_rejet,
$bonid,
$facturation = 0 )

Create a reject.

Parameters
User$userUser object
int$idId
string$motifMotif
int$date_rejetDate reject
int$bonidBon id
int<0,1>$facturation 1=Bill the reject
Returns
int Return >=0 if OK, <0 if KO

Definition at line 123 of file rejetprelevement.class.php.

References _send_email(), dol_now(), dol_syslog(), getDolGlobalString(), getListInvoices(), price2num(), and type.

◆ fetch()

RejetPrelevement::fetch ( $rowid)

Retrieve withdrawal object.

Parameters
int$rowidid of invoice to retrieve
Returns
int

Definition at line 375 of file rejetprelevement.class.php.

References dol_syslog().

◆ getListInvoices()

RejetPrelevement::getListInvoices ( $amounts = 0)
private

Retrieve the list of invoices.

Parameters
int<0,1>$amounts If you want to get the amount of the order for each invoice
Returns
array<int|array{0:int,1:float}> Array List of invoices related to the withdrawal line

Definition at line 324 of file rejetprelevement.class.php.

References dol_syslog(), and type.

Referenced by create().


The documentation for this class was generated from the following file: