noalyss Version-9
|
Class to manage distribution keys for Analytic accountancy. More...
Public Member Functions | |
__construct ($p_id=-1) | |
delete () | |
delete the distribution key More... | |
fill_table ($p_target, $p_amount) | |
Call the Anc_Operation::display_form_plan with the right amounts. More... | |
get_key () | |
input () | |
Show the detail for a key distribution and let you change it for adding or update. More... | |
save ($p_array) | |
save the data of a repartition key. More... | |
set_key ($key) | |
verify ($p_array) | |
verify that data are ok More... | |
Static Public Member Functions | |
static | display_choice ($p_amount, $p_target, $p_ledger) |
display list of available keys More... | |
static | display_list () |
display a list of keys, choose one to modify it More... | |
static | key_add () |
show a form for adding a key + button to display it More... | |
static | key_available ($p_jrn) |
Return the number of keys available. More... | |
Private Attributes | |
$key | |
Class to manage distribution keys for Analytic accountancy.
Definition at line 38 of file anc_key.class.php.
Anc_Key::__construct | ( | $p_id = -1 | ) |
Definition at line 60 of file anc_key.class.php.
Anc_Key::delete | ( | ) |
delete the distribution key
Definition at line 390 of file anc_key.class.php.
|
static |
display list of available keys
$p_amount | amount to distribute |
$p_target | target to update |
$p_ledger | is the jrn_def_id |
Definition at line 85 of file anc_key.class.php.
References $cn.
|
static |
display a list of keys, choose one to modify it
Definition at line 111 of file anc_key.class.php.
References $cn.
Anc_Key::fill_table | ( | $p_target, | |
$p_amount | |||
) |
Call the Anc_Operation::display_form_plan with the right amounts.
This function compute the array and amount to pass to the Anc_Operation::display_form_plan and replace the current table of activity with the value computed from the key.
@global $cn database connection
$p_target | Table to be replaced |
$p_amount | amount to distribute among activities |
Definition at line 311 of file anc_key.class.php.
References $a_plan, $a_poste, $array, $cn, $i, $op, $pos, $val, and noalyss_str_replace().
Anc_Key::get_key | ( | ) |
Definition at line 68 of file anc_key.class.php.
References $key.
Anc_Key::input | ( | ) |
Show the detail for a key distribution and let you change it for adding or update.
Definition at line 128 of file anc_key.class.php.
Referenced by key_add().
|
static |
show a form for adding a key + button to display it
Definition at line 374 of file anc_key.class.php.
References $key, input(), style, type, and value.
|
static |
Return the number of keys available.
the distribution key Return the number of keys available for the ledger given in parameter
@global $cn database connection
$p_jrn | number of the ledger (jrn_def.jrn_def_id |
Definition at line 50 of file anc_key.class.php.
Anc_Key::save | ( | $p_array | ) |
save the data of a repartition key.
received | an array index :
|
'key_id' => string '1' (length=1) "name_key" => "name" "description_key" => "description" 'row' => array 0 => string '1' (length=1) 1 => string '2' (length=1) 2 => string '3' (length=1) 'pa' => array 0 => string '1' (length=1) 1 => string '2' (length=1) 'po_id' => array 0 => array 0 => string '1' (length=1) 1 => string '8' (length=1) 1 => array 0 => string '2' (length=1) 1 => string '-1' (length=2) 2 => array 0 => string '3' (length=1) 1 => string '8' (length=1) 'percent' => array 0 => string '50.0000' (length=7) 1 => string '20.0000' (length=7) 2 => string '30.0000' (length=7) 'jrn' => array 0 => string '3' (length=1) 1 => string '2' (length=1)
Definition at line 234 of file anc_key.class.php.
References $a_plan, $a_row, $cn, $e, $http, $i, $ledger, $p_array, $value, record_log(), and verify().
Anc_Key::set_key | ( | $key | ) |
Definition at line 73 of file anc_key.class.php.
References $key.
Anc_Key::verify | ( | $p_array | ) |
verify that data are ok
type | $p_array |
Definition at line 153 of file anc_key.class.php.
References $http, $i, and $p_array.
Referenced by save().
|
private |
Definition at line 41 of file anc_key.class.php.