noalyss Version-9
|
this class is used to show the form for entering an operation only FOR analytic operation to save it, to display or to get a list from a certain period More...
Public Member Functions | |
__construct ($p_cn, $p_id=0) | |
constructor More... | |
__toString () | |
add ($p_seq=0) | |
add a row to the table operation_analytique More... | |
delete () | |
delete a row from the table operation_analytique More... | |
delete_by_jid ($p_jid) | |
delete from operation_analytique More... | |
display_form_plan ($p_array, $p_null, $p_mode, $p_seq, $p_amount, $p_id='', $p_add_button=true) | |
display the form for PA More... | |
display_table ($p_mode, $p_amount, $p_id) | |
Display a table with analytic accounting in detail of operation. More... | |
get_balance ($p_from, $p_to, $p_plan_id) | |
get_by_jid ($p_jid) | |
retrieve an operation thanks a jrnx.j_id More... | |
get_currency_rate () | |
get_jrid () | |
retrieve the jr_id thanks the oa_group More... | |
get_list ($p_from, $p_to, $p_from_poste="", $p_to_poste="") | |
get a list of row from a certain periode More... | |
get_list_simple ($p_from, $p_to) | |
html_table ($p_from) | |
save_form_plan ($p_array, $p_item, $p_j_id) | |
it called for each item, the data are taken from $p_array data and set before in this. Amount will be transformed thanks the $this->currency_rate; More... | |
save_form_plan_vat_nd ($p_array, $p_item, $p_j_id, $p_nd) | |
Save the ND VAT with prorata. More... | |
save_update_form ($p_array) | |
save a whole form from a update box More... | |
set_currency_rate ($currency_rate) | |
test_me () | |
to_request ($p_array, $p_line) | |
update_from_jrnx ($p_po_id) | |
modify an op from modify_op.php More... | |
Data Fields | |
$card | |
$db | |
$has_data | |
$id | |
$in_div | |
$j_id | |
$list | |
$oa_amount | |
$oa_date | |
$oa_debit | |
$oa_description | |
$oa_group | |
$oa_id | |
$oa_jrnx_id_source | |
In the case, the amount comes from a ND VAT, the variable contents the jrnx.j_id of the source which was used to compute the amount. More... | |
$oa_positive | |
signed of the amount More... | |
$oa_row | |
$pa_id | |
$po_id | |
$row | |
Private Attributes | |
$currency_rate | |
this class is used to show the form for entering an operation only FOR analytic operation to save it, to display or to get a list from a certain period
Definition at line 32 of file anc_operation.class.php.
Anc_Operation::__construct | ( | $p_cn, | |
$p_id = 0 |
|||
) |
constructor
Definition at line 100 of file anc_operation.class.php.
Anc_Operation::__toString | ( | ) |
Definition at line 63 of file anc_operation.class.php.
References $card, $currency_rate, $id, $j_id, $list, $oa_amount, $oa_date, $oa_debit, $oa_description, $oa_group, $pa_id, $po_id, $r, and $row.
Anc_Operation::add | ( | $p_seq = 0 | ) |
add a row to the table operation_analytique
Definition at line 116 of file anc_operation.class.php.
References $fiche, $oa_row, $side, $sql, and db.
Referenced by update_from_jrnx().
Anc_Operation::delete | ( | ) |
delete a row from the table operation_analytique
Definition at line 194 of file anc_operation.class.php.
Anc_Operation::delete_by_jid | ( | $p_jid | ) |
Anc_Operation::display_form_plan | ( | $p_array, | |
$p_null, | |||
$p_mode, | |||
$p_seq, | |||
$p_amount, | |||
$p_id = '' , |
|||
$p_add_button = true |
|||
) |
display the form for PA
$p_array | contains POST (or GET) data (val[] hplan[][] op[]) |
$p_null | = 1 if PA optional otherwise 0 mandatory |
$p_mode | == form 1 ==> read/write otherwise 0==>readonly |
$p_seq | number of the row |
$p_amount | amount |
$p_id | operation is detailled in a HTML popup, if several are opened, the tableid MUST be different. So we need to use a new parameter |
$p_add_button | true, show the button, false don't display them |
Add a button for distribution key
Add a button to clean the detail
Definition at line 571 of file anc_operation.class.php.
References $a_plan, $array, $count, $hidden, $i, $nb_row, $p_array, $readonly, $result, $select, $table_id, $val, $value, db, js, table, tr(), and value.
Anc_Operation::display_table | ( | $p_mode, | |
$p_amount, | |||
$p_id | |||
) |
Display a table with analytic accounting in detail of operation.
$p_mode | 0 = readonly or 1=writable |
$p_amount | amount |
$p_id | unique id |
Definition at line 1060 of file anc_operation.class.php.
References $array, $p_id, $seq, get_by_jid(), and to_request().
Anc_Operation::get_balance | ( | $p_from, | |
$p_to, | |||
$p_plan_id | |||
) |
Definition at line 506 of file anc_operation.class.php.
References $array, $e, $res, $sql, db, DatabaseCore\fetch_all(), record_log(), and sql_filter_per().
Anc_Operation::get_by_jid | ( | $p_jid | ) |
retrieve an operation thanks a jrnx.j_id
the | jrnx.j_id |
Definition at line 366 of file anc_operation.class.php.
References $a, $a_plan, $array, $attr, $i, $res, $row, $template, $value, and db.
Referenced by display_table(), and update_from_jrnx().
Anc_Operation::get_currency_rate | ( | ) |
Definition at line 58 of file anc_operation.class.php.
References $currency_rate.
Anc_Operation::get_jrid | ( | ) |
retrieve the jr_id thanks the oa_group
Definition at line 493 of file anc_operation.class.php.
References $res, $ret, $sql, db, DatabaseCore\fetch_all(), and DatabaseCore\num_row().
Anc_Operation::get_list | ( | $p_from, | |
$p_to, | |||
$p_from_poste = "" , |
|||
$p_to_poste = "" |
|||
) |
get a list of row from a certain periode
Definition at line 232 of file anc_operation.class.php.
References $array, $sql, db, DatabaseCore\fetch_all(), and pa_id.
Anc_Operation::get_list_simple | ( | $p_from, | |
$p_to | |||
) |
Definition at line 201 of file anc_operation.class.php.
Referenced by html_table().
Anc_Operation::html_table | ( | $p_from | ) |
Definition at line 293 of file anc_operation.class.php.
References $_GET, $array, $bar, $class, $count, $from, $gDossier, $i, $js, $offset, $p, $page, $ret, $row, $step, $to, db, HtmlInput\filter_table(), get_list_simple(), h, id, Icon_Action\modify(), navigation_bar(), td(), and th().
Anc_Operation::save_form_plan | ( | $p_array, | |
$p_item, | |||
$p_j_id | |||
) |
it called for each item, the data are taken from $p_array data and set before in this. Amount will be transformed thanks the $this->currency_rate;
$p_item | if the item nb for each item (purchase or selling merchandise) |
$p_array | structure |
nb_tx x is the number of the item it contains the number of rows of CA for this card
here Operation 0 has 2 row for a total of 10.31 and 1 here Operation 1 has 1 row for a total of 430
[val] => Array ( [0] => Array ( [0] => 10.31 [1] => 1 ) [1] => Array ( [0] => 430 ) )
It is the amount to split per accounting, it is possible that it is different from the sum of the given amount ( see val) per row
[amount_t0] => 11.31 [amount_t1] => 430
ta_AoCrow_R contains the value of the pa_id and po_id for this row with the form pa_id_po_id d_d
Double array operation => all the amount but in linear form
Example if the amount of the operation 0 is splitted in 2 rows and 2 cols (because 2 analytic plan, means 2 cols) we have an array of 4 values for operation 0, it gives the poste_analytique.po_id (from DB).
Here is the operation 0 (one row of the accounting) is splitted in po_id = 1 (pa_id see in tables or array pa_id) and po_id=5 (second pa_id) for 10.31 (see array val) and for 1 is set for po_id 1 and 4, p
[hplan] => Array ( [0] => Array ( [0] => 1 [1] => 5 [2] => 1 [3] => 4 ) [1] => Array ( [0] => 1 [1] => 6 ) )
pa_id array of plan_analytic.pa_id (1 per column), always ordered by pa_id
[pa_id] => Array ( [0] => 1 [1] => 2 ) *
Definition at line 889 of file anc_operation.class.php.
Anc_Operation::save_form_plan_vat_nd | ( | $p_array, | |
$p_item, | |||
$p_j_id, | |||
$p_nd | |||
) |
Save the ND VAT with prorata.
$p_array | usually $_POST |
$p_item | item of the form |
$p_j_id | jrnx.j_id concerned writing |
$p_nd | amount nd vat |
Definition at line 729 of file anc_operation.class.php.
Referenced by save_update_form().
Anc_Operation::save_update_form | ( | $p_array | ) |
save a whole form from a update box
$p_array | for ALL j_id |
Definition at line 943 of file anc_operation.class.php.
References $e, $i, $p_array, db, and save_form_plan_vat_nd().
Anc_Operation::set_currency_rate | ( | $currency_rate | ) |
Definition at line 86 of file anc_operation.class.php.
References $currency_rate.
Anc_Operation::test_me | ( | ) |
Definition at line 1086 of file anc_operation.class.php.
References $_REQUEST, $a, $array, $cn, $j_id, Dossier\connect(), and HtmlInput\hidden().
Anc_Operation::to_request | ( | $p_array, | |
$p_line | |||
) |
Definition at line 997 of file anc_operation.class.php.
References $i, $p_array, $pa_id, $result, $seq, $val, db, and pa_id.
Referenced by display_table().
Anc_Operation::update_from_jrnx | ( | $p_po_id | ) |
modify an op from modify_op.php
Definition at line 462 of file anc_operation.class.php.
References $a, $res, $row, $sql, add(), db, DatabaseCore\fetch_array(), get_by_jid(), and DatabaseCore\num_row().
Anc_Operation::$card |
Card linked to the operation
Definition at line 47 of file anc_operation.class.php.
Referenced by __toString().
|
private |
currency rate
Definition at line 48 of file anc_operation.class.php.
Referenced by __toString(), get_currency_rate(), and set_currency_rate().
Anc_Operation::$db |
database connection
Definition at line 34 of file anc_operation.class.php.
Anc_Operation::$has_data |
Definition at line 55 of file anc_operation.class.php.
Anc_Operation::$id |
= oa_id (one row)
Definition at line 37 of file anc_operation.class.php.
Referenced by __toString().
Anc_Operation::$in_div |
Definition at line 96 of file anc_operation.class.php.
Anc_Operation::$j_id |
foreign key to a jrnx operation (or null if none
Definition at line 42 of file anc_operation.class.php.
Referenced by __toString(), and test_me().
Anc_Operation::$list |
array of all operation
Definition at line 36 of file anc_operation.class.php.
Referenced by __toString().
Anc_Operation::$oa_amount |
amount for one row
Definition at line 39 of file anc_operation.class.php.
Referenced by __toString().
Anc_Operation::$oa_date |
equal to j_date if j_id is not null
Definition at line 45 of file anc_operation.class.php.
Referenced by __toString().
Anc_Operation::$oa_debit |
true for debit or false
Definition at line 41 of file anc_operation.class.php.
Referenced by __toString().
Anc_Operation::$oa_description |
comment for one row
Definition at line 40 of file anc_operation.class.php.
Referenced by __toString().
Anc_Operation::$oa_group |
group of operation
Definition at line 44 of file anc_operation.class.php.
Referenced by __toString().
Anc_Operation::$oa_id |
Definition at line 56 of file anc_operation.class.php.
Anc_Operation::$oa_jrnx_id_source |
In the case, the amount comes from a ND VAT, the variable contents the jrnx.j_id of the source which was used to compute the amount.
Definition at line 54 of file anc_operation.class.php.
Anc_Operation::$oa_positive |
signed of the amount
Definition at line 95 of file anc_operation.class.php.
Anc_Operation::$oa_row |
Definition at line 57 of file anc_operation.class.php.
Referenced by add().
Anc_Operation::$pa_id |
the plan analytique id
Definition at line 46 of file anc_operation.class.php.
Referenced by __toString(), and to_request().
Anc_Operation::$po_id |
Anc_Operation::$row |
array of row for one operation
Definition at line 35 of file anc_operation.class.php.
Referenced by __toString(), get_by_jid(), html_table(), and update_from_jrnx().