Galette API documentation
Gestionnaire d’Adhérents en Ligne Extrêmement Tarabiscoté mais Tellement Efficace
1.0.0
Galette\Entity\ScheduledPayment Class Reference

Public Member Functions

 __construct (Db $zdb, ArrayObject|int $args=null)
 
 load (int $id)
 
 check (array $data)
 
 store ()
 
 remove ()
 
 getId ()
 
 getContribution ()
 
 setContribution (int|Contribution $contribution)
 
 getPaymentType ()
 
 setPaymentType (int|PaymentType $payment_type)
 
 getCreationDate (bool $formatted=true)
 
 setCreationDate (string $creation_date)
 
 getScheduledDate (bool $formatted=true)
 
 setScheduledDate (string $scheduled_date)
 
 getAmount ()
 
 setAmount (float $amount)
 
 isPaid ()
 
 setPaid (bool $is_paid=true)
 
 getComment ()
 
 setComment (?string $comment)
 
 isContributionHandled (int $id_cotis)
 
 getAllocation (int $id_cotis)
 
 getAllocated ()
 
 getMissingAmount ()
 
 isFullyAllocated (Contribution $contrib)
 
 getNotFullyAllocated ()
 
 getErrors ()
 

Public Attributes

const TABLE = 'payments_schedules'
 
const PK = 'id_schedule'
 

Protected Member Functions

 setFields ()
 

Detailed Description

Scheduled payment

Author
Johan Cwiklinski johan.nosp@m.@x-t.nosp@m.nd.be

Constructor & Destructor Documentation

◆ __construct()

Galette\Entity\ScheduledPayment::__construct ( Db  $zdb,
ArrayObject|int  $args = null 
)

Main constructor

Parameters
Db$zdbDatabase instance
ArrayObject<string,int|string>|int|null$args Arguments

Member Function Documentation

◆ check()

Galette\Entity\ScheduledPayment::check ( array  $data)

Check data

Parameters
array<string,mixed>$data Data
Returns
boolean

◆ getAllocated()

Galette\Entity\ScheduledPayment::getAllocated ( )

Get allocated amount for current contribution

Returns
float
Exceptions
Throwable

◆ getAllocation()

Galette\Entity\ScheduledPayment::getAllocation ( int  $id_cotis)

Get allocated amount

Parameters
int$id_cotisContribution identifier
Returns
float
Exceptions
Throwable

◆ getAmount()

Galette\Entity\ScheduledPayment::getAmount ( )

Get amount

Returns
float

◆ getComment()

Galette\Entity\ScheduledPayment::getComment ( )

Get comment

Returns
?string

◆ getContribution()

Galette\Entity\ScheduledPayment::getContribution ( )

Get contribution

Returns
Contribution

◆ getCreationDate()

Galette\Entity\ScheduledPayment::getCreationDate ( bool  $formatted = true)

Get creation date

Parameters
bool$formattedGet formatted date, or DateTime object
Returns
string|DateTime|null

◆ getErrors()

Galette\Entity\ScheduledPayment::getErrors ( )

Get errors

Returns
string[]

◆ getId()

Galette\Entity\ScheduledPayment::getId ( )

Get identifier

Returns
?int

◆ getMissingAmount()

Galette\Entity\ScheduledPayment::getMissingAmount ( )

Get missing amount

Returns
float

◆ getNotFullyAllocated()

Galette\Entity\ScheduledPayment::getNotFullyAllocated ( )

Get not fully allocated scheduled payments

Returns
Contribution[]

@phpstan-ignore-next-line

@phpstan-ignore-next-line

◆ getPaymentType()

Galette\Entity\ScheduledPayment::getPaymentType ( )

Get payment type

Returns
PaymentType

◆ getScheduledDate()

Galette\Entity\ScheduledPayment::getScheduledDate ( bool  $formatted = true)

Get scheduled date

Parameters
bool$formattedGet formatted date, or DateTime object
Returns
string|DateTime|null

◆ isContributionHandled()

Galette\Entity\ScheduledPayment::isContributionHandled ( int  $id_cotis)

Is a contribution handled from a scheduled payment?

Parameters
int$id_cotisContribution identifier
Returns
bool
Exceptions
Throwable

◆ isFullyAllocated()

Galette\Entity\ScheduledPayment::isFullyAllocated ( Contribution  $contrib)

Is scheduled payment fully allocated?

Parameters
Contribution$contribContribution
Returns
bool

◆ isPaid()

Galette\Entity\ScheduledPayment::isPaid ( )

Is payment done?

Returns
bool

◆ load()

Galette\Entity\ScheduledPayment::load ( int  $id)

Load a scheduled payment from its identifier

Parameters
integer$idIdentifier
Returns
bool

◆ remove()

Galette\Entity\ScheduledPayment::remove ( )

Remove current

Returns
boolean

◆ setAmount()

Galette\Entity\ScheduledPayment::setAmount ( float  $amount)

Set amount

Parameters
float$amountAmount
Returns
self

◆ setComment()

Galette\Entity\ScheduledPayment::setComment ( ?string  $comment)

Set comment

Parameters
?string$comment Comment
Returns
self

◆ setContribution()

Galette\Entity\ScheduledPayment::setContribution ( int|Contribution  $contribution)

Set contribution

Parameters
int | Contribution$contributionContribution instance or id
Returns
self

◆ setCreationDate()

Galette\Entity\ScheduledPayment::setCreationDate ( string  $creation_date)

Set creation date

Parameters
string$creation_dateCreation date
Returns
self

◆ setFields()

Galette\Entity\ScheduledPayment::setFields ( )
protected

Set fields, must populate $this->fields

Returns
self

◆ setPaid()

Galette\Entity\ScheduledPayment::setPaid ( bool  $is_paid = true)

Set paid

Parameters
bool$is_paidPaid status
Returns
self

◆ setPaymentType()

Galette\Entity\ScheduledPayment::setPaymentType ( int|PaymentType  $payment_type)

Set payment type

Parameters
int | PaymentType$payment_typePayment type instance or id
Returns
self

◆ setScheduledDate()

Galette\Entity\ScheduledPayment::setScheduledDate ( string  $scheduled_date)

Set scheduled date

Parameters
string$scheduled_dateScheduled date
Returns
self

◆ store()

Galette\Entity\ScheduledPayment::store ( )

Store scheduled payment in database

Returns
boolean

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