Documentation

PaymentsIn_FinvoicePaymentStatus_Model extends PaymentsIn_PaymentStatus_Model
in package

Class to change the payment status of a sales invoice.

Table of Contents

$fieldPaymentStatusName  : string
Field payment status name.
$fieldPaymentSumName  : string
Field payment sum name.
$moduleName  : string
Module name.
$relatedRecordIdName  : string
Related record ID name.
getSumOfPaymentsByRecordId()  : float
Get the sum of all payments by record ID.
updateIfPossible()  : void
Update if possible.
updatePaymentStatus()  : void
Update payment status.
calculatePaymentStatus()  : string
Calculate payment status.
canUpdatePaymentStatus()  : bool
Checking if you can update the payment status.
checkIfPaymentFieldsChanged()  : bool
Check if payment fields for update changed.

Properties

$fieldPaymentStatusName

Field payment status name.

protected static string $fieldPaymentStatusName = 'payment_status'

$fieldPaymentSumName

Field payment sum name.

protected static string $fieldPaymentSumName = 'payment_sum'

$relatedRecordIdName

Related record ID name.

protected static string $relatedRecordIdName = 'finvoiceid'

Methods

getSumOfPaymentsByRecordId()

Get the sum of all payments by record ID.

public static getSumOfPaymentsByRecordId(int $recordId, string $moduleName) : float
Parameters
$recordId : int
$moduleName : string
Return values
float

updatePaymentStatus()

Update payment status.

public static updatePaymentStatus(int $recordId) : void
Parameters
$recordId : int
Return values
void

calculatePaymentStatus()

Calculate payment status.

protected static calculatePaymentStatus(float $sumOfGross, float $sumOfPayments) : string
Parameters
$sumOfGross : float
$sumOfPayments : float
Return values
string

        

Search results