DocumentPayments
Document payments table trait
Table of Contents
Methods
- getPaymentsTotal() : float
- Get payments total
- hasPayment() : bool
- Retrun true if payment exists
- savePayment() : bool
- Save document payment
- scopePaymentsQuery() : Builder
- Payments items query
Methods
getPaymentsTotal()
Get payments total
public
getPaymentsTotal(int $documentId) : float
Parameters
- $documentId : int
Return values
floathasPayment()
Retrun true if payment exists
public
hasPayment(string $transactionId) : bool
Parameters
- $transactionId : string
Return values
boolsavePayment()
Save document payment
public
savePayment(int $documentId, float $amount, string|null $transactionId) : bool
Parameters
- $documentId : int
- $amount : float
- $transactionId : string|null
Return values
boolscopePaymentsQuery()
Payments items query
public
scopePaymentsQuery(Builder $query, int|null $documentId) : Builder
Parameters
- $query : Builder
- $documentId : int|null