AccountingClosingRegularization
        
        extends AccountingClosingBase
    
    
            
            in package
            
        
    
    
    
        
            Perform regularization of account balances for the exercise.
Tags
Table of Contents
- $dataBase : DataBase
 - It provides direct access to the database.
 - $exercise : Ejercicio
 - $subAccount : Subcuenta
 - Subaccount for special process
 - __construct() : mixed
 - Class Constructor
 - delete() : bool
 - Delete special accounting entry from exercise.
 - exec() : bool
 - Execute main process.
 - getConcept() : string
 - Get the concept for the accounting entry and its lines.
 - getDate() : string
 - Get the date for the accounting entry.
 - getOperation() : string
 - Get the special operation identifier for the accounting entry.
 - getSQL() : string
 - Get Balance SQL sentence
 - loadSubAccount() : bool
 - Search and load data account from a special account code
 - saveBalanceLine() : bool
 - Add regularization lines to account entry.
 - saveLines() : bool
 - Create each of the lines of the accounting entry with the accounts that have a balance.
 - setData() : mixed
 - Establishes the common data of the accounting entry
 - setDataLine() : mixed
 - Establishes the common data of the entries of the accounting entry
 - toolBox() : ToolBox
 - addLine() : bool
 - deleteAccountEntry() : bool
 - Delete accounting entry of type indicated.
 - getBalance() : array<string|int, mixed>
 - Returns an array with the balances of the accounting sub-accounts for each channel.
 - newAccountEntry() : bool
 - Create new accounting entry for channel and journal.
 
Properties
$dataBase
It provides direct access to the database.
    protected
    static    DataBase
    $dataBase
    
    
    
    
$exercise
    protected
        Ejercicio
    $exercise
    
    
    
    
$subAccount
Subaccount for special process
    protected
        Subcuenta
    $subAccount
    
    
    
    
Methods
__construct()
Class Constructor
    public
                    __construct() : mixed
    
    
    
        Return values
mixed —delete()
Delete special accounting entry from exercise.
    public
                    delete(Ejercicio $exercise) : bool
    
        Parameters
- $exercise : Ejercicio
 
Return values
bool —exec()
Execute main process.
    public
                    exec(Ejercicio $exercise, int $idjournal) : bool
        Create a new account entry for channel with a one line by account balance.
Parameters
- $exercise : Ejercicio
 - $idjournal : int
 
Return values
bool —getConcept()
Get the concept for the accounting entry and its lines.
    protected
                    getConcept() : string
    
    
    
        Return values
string —getDate()
Get the date for the accounting entry.
    protected
                    getDate() : string
    
    
    
        Return values
string —getOperation()
Get the special operation identifier for the accounting entry.
    protected
                    getOperation() : string
    
    
    
        Return values
string —getSQL()
Get Balance SQL sentence
    protected
                    getSQL() : string
    
    
    
        Return values
string —loadSubAccount()
Search and load data account from a special account code
    protected
                    loadSubAccount(Ejercicio $exercise, string $specialAccount) : bool
    
        Parameters
- $exercise : Ejercicio
 - $specialAccount : string
 
Return values
bool —saveBalanceLine()
Add regularization lines to account entry.
    protected
                    saveBalanceLine(Asiento $accountEntry, float $debit, float $credit) : bool
    
        Parameters
- $accountEntry : Asiento
 - $debit : float
 - $credit : float
 
Return values
bool —saveLines()
Create each of the lines of the accounting entry with the accounts that have a balance.
    protected
                    saveLines(Asiento $accountEntry, array<string|int, mixed> $balance, float &$debit, float &$credit) : bool
    
        Parameters
- $accountEntry : Asiento
 - $balance : array<string|int, mixed>
 - $debit : float
 - $credit : float
 
Return values
bool —setData()
Establishes the common data of the accounting entry
    protected
                    setData(Asiento &$entry) : mixed
    
        Parameters
- $entry : Asiento
 
Return values
mixed —setDataLine()
Establishes the common data of the entries of the accounting entry
    protected
                    setDataLine(Partida &$line, array<string|int, mixed> $data) : mixed
    
        Parameters
- $line : Partida
 - $data : array<string|int, mixed>
 
Return values
mixed —toolBox()
    protected
                    toolBox() : ToolBox
    
    
    
        Return values
ToolBox —addLine()
    private
                    addLine(Asiento $accountEntry, float $debit, float $credit) : bool
    
        Parameters
- $accountEntry : Asiento
 - $debit : float
 - $credit : float
 
Return values
bool —deleteAccountEntry()
Delete accounting entry of type indicated.
    private
                    deleteAccountEntry(Ejercicio $exercise, string $type) : bool
    
        Parameters
- $exercise : Ejercicio
 - $type : string
 
Return values
bool —getBalance()
Returns an array with the balances of the accounting sub-accounts for each channel.
    private
                    getBalance() : array<string|int, mixed>
        Structure: [channel] ['id' => value, 'code' => value, 'debit' => amount, 'credit' => amount] ['id' => value, 'code' => value, 'debit' => amount, 'credit' => amount]
Return values
array<string|int, mixed> —newAccountEntry()
Create new accounting entry for channel and journal.
    private
                    newAccountEntry(Asiento &$accountEntry, int $channel, int $idjournal) : bool
        New accounting it's set into accountEntry param.
Parameters
- $accountEntry : Asiento
 - $channel : int
 - $idjournal : int