AccountingClosingOpening
extends AccountingClosingBase
in package
Perform opening of account balances for the exercise.
Table of Contents
Properties
- $copySubAccounts : bool
- indicates whether the accounting account plan should be copied to the new fiscal year.
- $dataBase : DataBase
- It provides direct access to the database.
- $exercise : Ejercicio
- $newExercise : Ejercicio
- $subAccount : Subcuenta
- Subaccount for special process
Methods
- __construct() : mixed
- Class Constructor
- delete() : bool
- Delete main process.
- exec() : bool
- Execute main process.
- setCopySubAccounts() : void
- Establish whether the accounting account plan should be copied to the new fiscal year.
- 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 accounting entry line with balance override.
- saveLines() : bool
- Create each of the lines of the accounting entry with the accounts that have a balance.
- setData() : void
- Establishes the common data of the accounting entry
- setDataLine() : void
- Establishes the common data of the entries of the accounting entry.
- copyAccounts() : bool
- Copy accounts and subaccounts from exercise to new exercise
- copySubAccount() : int|null
- Copy existing subaccount into new exercise.
- isProfitLossAccount() : bool
- Check if subaccount is a special profit and loss account
- loadNewExercise() : void
- Search and load next exercise of indicated exercise.
- setResultAccountData() : void
- Set the subaccount data based on the result of the previous exercise
Properties
$copySubAccounts
indicates whether the accounting account plan should be copied to the new fiscal year.
protected
bool
$copySubAccounts
= true
$dataBase
It provides direct access to the database.
protected
static DataBase
$dataBase
$exercise
protected
Ejercicio
$exercise
$newExercise
protected
Ejercicio
$newExercise
$subAccount
Subaccount for special process
protected
Subcuenta
$subAccount
Methods
__construct()
Class Constructor
public
__construct() : mixed
delete()
Delete main process.
public
delete(Ejercicio $exercise) : bool
Delete opening accounting entry from exercise.
Parameters
- $exercise : Ejercicio
Return values
boolexec()
Execute main process.
public
exec(Ejercicio $exercise, int $idjournal) : bool
Create a new account entry for channel with a one line by account balance. The informed exercise must be the closed exercise.
Parameters
- $exercise : Ejercicio
- $idjournal : int
Return values
boolsetCopySubAccounts()
Establish whether the accounting account plan should be copied to the new fiscal year.
public
setCopySubAccounts(bool $value) : void
Parameters
- $value : bool
getConcept()
Get the concept for the accounting entry and its lines.
protected
getConcept() : string
Return values
stringgetDate()
Get the date for the accounting entry.
protected
getDate() : string
Return values
stringgetOperation()
Get the special operation identifier for the accounting entry.
protected
getOperation() : string
Return values
stringgetSQL()
Get Balance SQL sentence
protected
getSQL() : string
Return values
stringloadSubAccount()
Search and load data account from a special account code
protected
loadSubAccount(Ejercicio $exercise, string $specialAccount) : bool
Parameters
- $exercise : Ejercicio
- $specialAccount : string
Return values
boolsaveBalanceLine()
Add accounting entry line with balance override.
protected
saveBalanceLine(Asiento $accountEntry, float $debit, float $credit) : bool
Return true without doing anything, if you do not need balance override.
Parameters
- $accountEntry : Asiento
- $debit : float
- $credit : float
Return values
boolsaveLines()
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
boolsetData()
Establishes the common data of the accounting entry
protected
setData(Asiento &$entry) : void
Parameters
- $entry : Asiento
setDataLine()
Establishes the common data of the entries of the accounting entry.
protected
setDataLine(Partida &$line, array<string|int, mixed> $data) : void
Set new exercise data values.
Parameters
- $line : Partida
- $data : array<string|int, mixed>
copyAccounts()
Copy accounts and subaccounts from exercise to new exercise
private
copyAccounts() : bool
Return values
boolcopySubAccount()
Copy existing subaccount into new exercise.
private
copySubAccount(int $idSubAccount) : int|null
Parameters
- $idSubAccount : int
Return values
int|nullisProfitLossAccount()
Check if subaccount is a special profit and loss account
private
isProfitLossAccount(string $subaccount) : bool
Parameters
- $subaccount : string
Return values
boolloadNewExercise()
Search and load next exercise of indicated exercise.
private
loadNewExercise() : void
setResultAccountData()
Set the subaccount data based on the result of the previous exercise
private
setResultAccountData(array<string|int, mixed> &$data) : void
Parameters
- $data : array<string|int, mixed>