PaymentsIn_FinvoiceProformaPaymentStatus_Model
extends PaymentsIn_PaymentStatus_Model
in package
Class to change the payment status of a proforma 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'
$moduleName
Module name.
protected
static string
$moduleName
= 'FInvoiceProforma'
$relatedRecordIdName
Related record ID name.
protected
static string
$relatedRecordIdName
= 'finvoiceproformaid'
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 —updateIfPossible()
Update if possible.
public
static updateIfPossible(Vtiger_Record_Model $recordModel) : void
Parameters
- $recordModel : Vtiger_Record_Model
Return values
void —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 —canUpdatePaymentStatus()
Checking if you can update the payment status.
protected
static canUpdatePaymentStatus(Vtiger_Record_Model $recordModel) : bool
Parameters
- $recordModel : Vtiger_Record_Model
Return values
bool —checkIfPaymentFieldsChanged()
Check if payment fields for update changed.
protected
static checkIfPaymentFieldsChanged(Vtiger_Record_Model $recordModel) : bool
Parameters
- $recordModel : Vtiger_Record_Model