diff --git a/html/bal_csv.php b/html/bal_csv.php
index 62dbe3682..8d9424058 100644
--- a/html/bal_csv.php
+++ b/html/bal_csv.php
@@ -55,7 +55,7 @@ if ( isset($_POST['central']) ) {
$bal->from_poste=$_POST['from_poste'];
$bal->to_poste=$_POST['to_poste'];
- $row=$bal->GetRow($_POST['from_periode'],
+ $row=$bal->get_row($_POST['from_periode'],
$_POST['to_periode']);
foreach ($row as $r) {
diff --git a/html/ecrit_ouv.php b/html/ecrit_ouv.php
index 459cd8193..757e360fa 100644
--- a/html/ecrit_ouv.php
+++ b/html/ecrit_ouv.php
@@ -172,7 +172,7 @@ if ( isset ($_GET['import'])) {
$p=new Acc_Account($cn,$aposte[$i]);
// if the poste exists then check the next one
- if ( $p->get() == true ) continue;
+ if ( $p->load() == true ) continue;
echo 'Attention creation de '.$p->id.' '.$alabel[$i].'
';
$sql=sprintf("select account_add(%d,'%s')",
$p->id,$alabel[$i]);
diff --git a/html/export_ouv.php b/html/export_ouv.php
index 3a48fbd87..7b0c77f22 100644
--- a/html/export_ouv.php
+++ b/html/export_ouv.php
@@ -67,10 +67,10 @@ foreach ($ret as $poste_id) {
$Poste=new Acc_Account($cn,$poste_id['j_poste']);
// fill the object
- $Poste->get();
+ $Poste->load();
// build sql stmt
$sql="j_tech_per >=". $sql_from[0]['min']." and j_tech_per <=".$sql_to[0]['max'];
- $result=$Poste->GetSoldeDetail($sql );
+ $result=$Poste->get_solde_detail($sql );
$Poste->label=str_replace(';','',$Poste->label);
if ( $result['solde'] == 0 ) continue;
diff --git a/html/fiche_csv.php b/html/fiche_csv.php
index 434875620..417f4a447 100644
--- a/html/fiche_csv.php
+++ b/html/fiche_csv.php
@@ -77,7 +77,7 @@ if ( isset ($_POST['fd_id'])) {
&& isset ($_REQUEST['with_amount'])) {
$sql_periode=sql_filter_per($cn,$_REQUEST['from_periode'],$_REQUEST['to_periode'],'p_id','j_tech_per');
- $solde= $detail->GetSoldeDetail($sql_periode);
+ $solde= $detail->get_solde_detail($sql_periode);
printf(";% 10.2f;% 10.2f;% 10.2f",
diff --git a/html/form_csv.php b/html/form_csv.php
index 003a060f1..bcbfcbc9b 100644
--- a/html/form_csv.php
+++ b/html/form_csv.php
@@ -46,9 +46,9 @@ $Form->get_name();
if ( $_GET['p_step'] == 0 )
{
if ( $_GET ['type_periode'] == 0 )
- $array=$Form->GetRow( $_GET['from_periode'],$_GET['to_periode'], $_GET['type_periode']);
+ $array=$Form->get_row( $_GET['from_periode'],$_GET['to_periode'], $_GET['type_periode']);
else
- $array=$Form->GetRow( $_GET['from_date'],$_GET['to_date'], $_GET['type_periode']);
+ $array=$Form->get_row( $_GET['from_date'],$_GET['to_date'], $_GET['type_periode']);
if ( count($Form->row ) == 0 )
@@ -74,7 +74,7 @@ if ( $_GET['p_step'] == 0 )
{
$periode=getPeriodeName($cn,$e);
if ( $periode == null ) continue;
- $array[]=$Form->GetRow($e,$e);
+ $array[]=$Form->get_row($e,$e);
$periode_name[]=$periode;
}
// Display column heading
diff --git a/html/form_pdf.php b/html/form_pdf.php
index 2d72a9838..1e4c9ab8e 100644
--- a/html/form_pdf.php
+++ b/html/form_pdf.php
@@ -53,9 +53,9 @@ if ( $_GET['p_step'] == 0 )
// No step asked
//--
if ( $_GET ['type_periode'] == 0 )
- $array=$Form->GetRow( $_GET['from_periode'],$_GET['to_periode'], $_GET['type_periode']);
+ $array=$Form->get_row( $_GET['from_periode'],$_GET['to_periode'], $_GET['type_periode']);
else
- $array=$Form->GetRow( $_GET['from_date'],$_GET['to_date'], $_GET['type_periode']);
+ $array=$Form->get_row( $_GET['from_date'],$_GET['to_date'], $_GET['type_periode']);
}
else
@@ -66,7 +66,7 @@ if ( $_GET['p_step'] == 0 )
{
$periode=getPeriodeName($cn,$e);
if ( $periode == null ) continue;
- $array[]=$Form->GetRow($e,$e);
+ $array[]=$Form->get_row($e,$e);
$periode_name[]=$periode;
}
diff --git a/html/jrn_csv.php b/html/jrn_csv.php
index 4530b5e11..728e33255 100644
--- a/html/jrn_csv.php
+++ b/html/jrn_csv.php
@@ -55,7 +55,7 @@ $jrn_type=$Jrn->get_type();
//---
if ( $_GET['p_simple'] == 0 )
{
- $Jrn->GetRow( $_GET['from_periode'],
+ $Jrn->get_row( $_GET['from_periode'],
$_GET['to_periode'],
$p_cent);
@@ -86,7 +86,7 @@ if ( $_GET['p_simple'] == 0 )
}
else
{
- $Row=$Jrn->GetRowSimple($_GET['from_periode'],
+ $Row=$Jrn->get_rowSimple($_GET['from_periode'],
$_GET['to_periode'],
$p_cent,
0);
diff --git a/html/jrn_pdf.php b/html/jrn_pdf.php
index 8fe9324a7..746d8b07e 100644
--- a/html/jrn_pdf.php
+++ b/html/jrn_pdf.php
@@ -81,7 +81,7 @@ if ( $Jrn->id==0 || $jrn_type=='FIN' || $jrn_type=='ODS' || $_REQUEST['p_simple
$rap_deb=0;$rap_cred=0;
while (1) {
$a=0;
- list ($a_jrn,$tot_deb,$tot_cred)=$Jrn->GetRow($_GET['from_periode'],
+ list ($a_jrn,$tot_deb,$tot_cred)=$Jrn->get_row($_GET['from_periode'],
$_GET['to_periode'],
$_GET['central'],
$limit,$offset);
@@ -211,7 +211,7 @@ if ( ($jrn_type=='ACH' || $jrn_type=='VEN' ) && $_REQUEST['p_simple']== 1 )
while (1) {
$a=0;
- $a_jrn=$Jrn->GetRowSimple($_GET['from_periode'],
+ $a_jrn=$Jrn->get_rowSimple($_GET['from_periode'],
$_GET['to_periode'],
$_GET['central'],
1,
diff --git a/html/poste_csv.php b/html/poste_csv.php
index b7980ad1e..2b1bc07f2 100644
--- a/html/poste_csv.php
+++ b/html/poste_csv.php
@@ -51,7 +51,7 @@ foreach ($a_poste as $pos)
{
$Poste=new Acc_Account($cn,$pos['pcm_val']);
$Poste->get_name();
- list($array,$tot_deb,$tot_cred)=$Poste->GetRow( $_POST['from_periode'],
+ list($array,$tot_deb,$tot_cred)=$Poste->get_row( $_POST['from_periode'],
$_POST['to_periode']
);
if ( count($Poste->row ) == 0 )
diff --git a/html/poste_pdf.php b/html/poste_pdf.php
index 2812ec0c2..a555aa096 100644
--- a/html/poste_pdf.php
+++ b/html/poste_pdf.php
@@ -57,7 +57,7 @@ foreach ($a_poste as $poste)
{
echo_debug("poste_pdf",__LINE__,$poste);
$Poste=new Acc_Account($cn,$poste['pcm_val']);
- list($array,$tot_deb,$tot_cred)=$Poste->GetRow($from_periode,$to_periode);
+ list($array,$tot_deb,$tot_cred)=$Poste->get_row($from_periode,$to_periode);
// don't print empty account
if ( count($array) == 0 ) {
continue;
diff --git a/html/print_balance.php b/html/print_balance.php
index afd97a840..b1a4193ea 100644
--- a/html/print_balance.php
+++ b/html/print_balance.php
@@ -70,7 +70,7 @@ $bal->jrn=$_POST['p_jrn'];
$bal->from_poste=$_POST['from_poste'];
$bal->to_poste=$_POST['to_poste'];
-$array=$bal->GetRow($from_periode,$to_periode);
+$array=$bal->get_row($from_periode,$to_periode);
if ( sizeof($array) == 0 ) {
$pdf= new Cezpdf('a4');
diff --git a/html/quick_code_csv.php b/html/quick_code_csv.php
index 9b72603aa..815588db2 100644
--- a/html/quick_code_csv.php
+++ b/html/quick_code_csv.php
@@ -39,7 +39,7 @@ $User->Check();
$Fiche=new fiche($cn,$_REQUEST['f_id']);
$Fiche->getName();
-list($array,$tot_deb,$tot_cred)=$Fiche->GetRow(
+list($array,$tot_deb,$tot_cred)=$Fiche->get_row(
$_POST['from_periode'],
$_POST['to_periode']
);
diff --git a/html/quick_code_pdf.php b/html/quick_code_pdf.php
index 24c270aef..f76aeb98d 100644
--- a/html/quick_code_pdf.php
+++ b/html/quick_code_pdf.php
@@ -47,7 +47,7 @@ echo_debug("quick_code_pdf",__LINE__,$f_id);
$Fiche=new fiche($cn,$f_id);
-list($array,$tot_deb,$tot_cred)=$Fiche->GetRow($from_periode,$to_periode);
+list($array,$tot_deb,$tot_cred)=$Fiche->get_row($from_periode,$to_periode);
// don't print empty account
if ( count($array) == 0 ) {
continue;
diff --git a/include/balance.inc.php b/include/balance.inc.php
index a74f16bff..0687e48df 100644
--- a/include/balance.inc.php
+++ b/include/balance.inc.php
@@ -144,7 +144,7 @@ if ( isset($_POST['view'] ) ) {
else
$bal->central='N';
- $row=$bal->GetRow($_POST['from_periode'],
+ $row=$bal->get_row($_POST['from_periode'],
$_POST['to_periode']);
$a=GetPeriode($cn,$_POST['from_periode']);
$b=GetPeriode($cn,$_POST['to_periode']);
diff --git a/include/bank.inc.php b/include/bank.inc.php
index 0e4fd8986..8766e1dca 100644
--- a/include/bank.inc.php
+++ b/include/bank.inc.php
@@ -100,7 +100,7 @@ if ( $sub_action == "solde" )
for ( $i = 0; $i < pg_NumRows($ResAccount);$i++) {
// get the saldo
$l=pg_fetch_array($ResAccount,$i);
- $m=GetSolde($cn,$l['pcm_val'],$filter_year);
+ $m=get_solde($cn,$l['pcm_val'],$filter_year);
// print the result if the saldo is not equal to 0
if ( $m != 0.0 ) {
echo "
";
diff --git a/include/bud_card.inc.php b/include/bud_card.inc.php
index 59a2e1c12..498bb154e 100644
--- a/include/bud_card.inc.php
+++ b/include/bud_card.inc.php
@@ -45,21 +45,21 @@ $msg="";
if ( isset($_POST['remove'])){
$obj=new Bud_Card($cn);
- $obj->from_array($_POST);
+ $obj->load_from_array($_POST);
$msg=$obj->delete();
}
if ( isset($_POST['add'])){
$obj=new Bud_Card($cn);
- $obj->from_array($_POST);
+ $obj->load_from_array($_POST);
$msg=$obj->add();
}
if ( isset($_POST['update'])){
$obj=new Bud_Card($cn);
- $obj->from_array($_POST);
+ $obj->load_from_array($_POST);
$msg= $obj->update();
diff --git a/include/bud_hypo.inc.php b/include/bud_hypo.inc.php
index a8515da33..63a8ab9ae 100644
--- a/include/bud_hypo.inc.php
+++ b/include/bud_hypo.inc.php
@@ -29,21 +29,21 @@ require_once ('class_widget.php');
if ( isset($_POST['remove'])){
$obj=new Bud_Hypo($cn);
- $obj->from_array($_POST);
+ $obj->load_from_array($_POST);
$obj->delete();
}
if ( isset($_POST['add'])){
$obj=new Bud_Hypo($cn);
- $obj->from_array($_POST);
+ $obj->load_from_array($_POST);
$obj->add();
}
if ( isset($_POST['update'])){
$obj=new Bud_Hypo($cn);
- $obj->from_array($_POST);
+ $obj->load_from_array($_POST);
$obj->update();
}
diff --git a/include/ca_group.inc.php b/include/ca_group.inc.php
index 86b3891ba..98482f97e 100644
--- a/include/ca_group.inc.php
+++ b/include/ca_group.inc.php
@@ -47,7 +47,7 @@ if ( isset ($_POST['remove'])) {
// INSERT
if ( isset($_POST['add'])) {
$obj=new Anc_Group($cn);
- $obj->fill_from_array($_POST);
+ $obj->load_from_array($_POST);
$obj->insert();
}
$array=$r->myList();
diff --git a/include/ca_od.inc.php b/include/ca_od.inc.php
index e760b2f6a..6c239266b 100644
--- a/include/ca_od.inc.php
+++ b/include/ca_od.inc.php
@@ -110,7 +110,7 @@ if ( isset($_POST['save'])) {
'Opération sauvée';
$a=new Anc_Group_Operation($cn);
- $a->from_POST();
+ $a->load_from_array($_POST);
$a->save();
echo $a->show();
diff --git a/include/ca_pa.inc.php b/include/ca_pa.inc.php
index 7887caa5d..4f834e0fa 100644
--- a/include/ca_pa.inc.php
+++ b/include/ca_pa.inc.php
@@ -141,7 +141,7 @@ if ( isset($_REQUEST['sa']))
{
// var_dump($_POST);
$po=new Anc_Account($cn);
- $po->fill_from_POST();
+ $po->load_from_array($_POST);
$po->add();
$sa="list";
@@ -179,7 +179,7 @@ if ( isset($_REQUEST['sa']))
if ( $sa=="po_update")
{
$po=new Anc_Account($cn);
- $po->fill_from_POST();
+ $po->load_from_array($_POST);
$po->update();
$sa="list";
}
diff --git a/include/class_acc_account.php b/include/class_acc_account.php
index fff5742a4..2dee142f6 100644
--- a/include/class_acc_account.php
+++ b/include/class_acc_account.php
@@ -32,7 +32,7 @@ class Acc_Account {
var $id; /*! \enum $id poste_id (pcm_val)*/
var $label; /*! \enum $label label of the poste */
var $parent; /*! \enum $parent parent account */
- var $row; /*! \enum $row double array see GetRow */
+ var $row; /*! \enum $row double array see get_row */
function __construct ($p_cn,$p_id) {
$this->db=$p_cn;
$this->id=$p_id;
@@ -47,7 +47,7 @@ class Acc_Account {
* (tot_deb,tot_credit
*
*/
- function GetRow($p_from,$p_to)
+ function get_row($p_from,$p_to)
{
$periode=sql_filter_per($this->db,$p_from,$p_to,'p_id','jr_tech_per');
@@ -126,7 +126,7 @@ class Acc_Account {
* balance of the account
*
*/
-function GetSolde($p_cond=" true ") {
+function get_solde($p_cond=" true ") {
$Res=ExecSql($this->db,"select sum(deb) as sum_deb, sum(cred) as sum_cred from
( select j_poste,
case when j_debit='t' then j_montant else 0 end as deb,
@@ -148,7 +148,7 @@ function GetSolde($p_cond=" true ") {
* balance of the account
*
*/
-function GetSoldeDetail($p_cond="") {
+function get_solde_detail($p_cond="") {
if ( $p_cond != "") $p_cond=" and ".$p_cond;
$sql="select sum(deb) as sum_deb, sum(cred) as sum_cred from
@@ -214,7 +214,7 @@ function GetSoldeDetail($p_cond="") {
{
$this->get_name();
- list($array,$tot_deb,$tot_cred)=$this->GetRow( $_POST['from_periode'],
+ list($array,$tot_deb,$tot_cred)=$this->get_row( $_POST['from_periode'],
$_POST['to_periode']
);
diff --git a/include/class_acc_balance.php b/include/class_acc_balance.php
index 09bbfddfe..c76003b0e 100644
--- a/include/class_acc_balance.php
+++ b/include/class_acc_balance.php
@@ -57,7 +57,7 @@ class Acc_Balance {
* - $a['solde_deb']
* - $a['solde_cred']
*/
- function GetRow($p_from_periode,$p_to_periode) {
+ function get_row($p_from_periode,$p_to_periode) {
// filter on requested periode
$per_sql=sql_filter_per($this->db,$p_from_periode,$p_to_periode,'p_id','j_tech_per');
diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php
index 211a1ed14..7e607d317 100644
--- a/include/class_acc_ledger.php
+++ b/include/class_acc_ledger.php
@@ -94,7 +94,7 @@ return $ret['jrn_def_name'];
}
-/*! \function GetRow
+/*! \function get_row
* \brief Get The data
*
*
@@ -109,9 +109,9 @@ return $ret['jrn_def_name'];
* \return Array with the asked data
*
*/
-function GetRow($p_from,$p_to,$cent='off',$p_limit=-1,$p_offset=-1) {
+function get_row($p_from,$p_to,$cent='off',$p_limit=-1,$p_offset=-1) {
-echo_debug('class_acc_ledger.php',__LINE__,"GetRow ( $p_from,$p_to,$cent,$p_limit,$p_offset)");
+echo_debug('class_acc_ledger.php',__LINE__,"get_row ( $p_from,$p_to,$cent,$p_limit,$p_offset)");
$periode=sql_filter_per($this->db,$p_from,$p_to,'p_id','jr_tech_per');
@@ -234,8 +234,8 @@ $jr_montant=($line['jr_montant']!=0)?sprintf("% 8.2f",$line['jr_montant']):"";
$tot_deb+=$line['deb_montant'];
$tot_cred+=$line['cred_montant'];
$tot_op=$line['jr_montant'];
-echo_debug('class_acc_ledger.php',__LINE__," GetRow : mont_Deb ".$mont_deb);
-echo_debug('class_acc_ledger.php',__LINE__," GetRow : mont_cred ".$mont_cred);
+echo_debug('class_acc_ledger.php',__LINE__," get_row : mont_Deb ".$mont_deb);
+echo_debug('class_acc_ledger.php',__LINE__," get_row : mont_cred ".$mont_cred);
/* Check first if there is a quickcode */
if ( strlen(trim($line['j_qcode'])) != 0 )
@@ -324,7 +324,7 @@ return $a;
*
* \return an Array with the asked data
*/
-function GetRowSimple($p_from,$p_to,$cent='off',$trunc=0,$p_limit=-1,$p_offset=-1)
+function get_rowSimple($p_from,$p_to,$cent='off',$trunc=0,$p_limit=-1,$p_offset=-1)
{
// Grand-livre : id= 0
//---
@@ -412,7 +412,7 @@ else
}
return $array;
-}// end function GetRowSimple
+}// end function get_rowSimple
/*!
* \brief get_detail gives the detail of row
@@ -432,7 +432,7 @@ return $array;
*
*
*
-* \param p_array the structure is set in GetRowSimple, this array is
+* \param p_array the structure is set in get_rowSimple, this array is
* modified,
* \param $trunc if the data must be truncated, usefull for pdf export
* \param p_jrn_type is the type of the ledger (ACH or VEN)
diff --git a/include/class_anc_account.php b/include/class_anc_account.php
index 65d6cb33d..90ac896e6 100644
--- a/include/class_anc_account.php
+++ b/include/class_anc_account.php
@@ -264,14 +264,14 @@ class Anc_Account
return $r;
}
- function fill_from_POST()
+ function load_from_array($p_array)
{
- $this->name=$_POST['po_name'];
- $this->description=$_POST['po_description'];
- $this->pa_id=$_POST['pa_id'];
- $this->amount=$_POST['po_amount'];
- $this->id=$_POST['po_id'];
- $this->ga_id=($_POST['ga_id'] == "-1" )?"":$_POST['ga_id'];
+ $this->name=(isset ($p_array['po_name']))?$p_array['po_name']:"";
+ $this->description=(isset ($p_array['po_description']))?$p_array['po_description']:"";
+ $this->pa_id=(isset ($p_array['pa_id']))?$p_array['pa_id']:"";
+ $this->amount=(isset ($p_array['po_amount']))?$p_array['po_amount']:0;
+ $this->id=(isset ($p_array['po_id']))?$p_array['po_id']:-1;
+ $this->ga_id=((isset ($p_array['ga_id'] == "-1" )?"":$p_array['ga_id'];
}
static function testme() {
$cn=DbConnect(dossier::id());
diff --git a/include/class_anc_balance_double.php b/include/class_anc_balance_double.php
index 3271bb43b..429555c60 100644
--- a/include/class_anc_balance_double.php
+++ b/include/class_anc_balance_double.php
@@ -45,7 +45,7 @@ class Anc_Balance_Double extends Anc_Print
{
$r="";
- $array=$this->get_data();
+ $array=$this->load();
$odd=0;
if ( is_array($array) == false ){
return $array;
@@ -133,7 +133,7 @@ class Anc_Balance_Double extends Anc_Print
*/
function display_pdf()
{
- $array=$this->get_data();
+ $array=$this->load();
$offset=0;
$page=1;
$pagesize=50;
@@ -231,7 +231,7 @@ class Anc_Balance_Double extends Anc_Print
$r.="\r\n";
- $array=$this->get_data();
+ $array=$this->load();
if ( is_array($array) == false ){
return $array;
@@ -347,7 +347,7 @@ class Anc_Balance_Double extends Anc_Print
*
* \return array
*/
- function get_data()
+ function load()
{
$filter_poste="";
$and="";
@@ -428,7 +428,7 @@ order by 1;
/*!
* \brief Set the filter (account_date)
*
- * \return return the string to add to get_data
+ * \return return the string to add to load
*/
function set_sql_filter()
@@ -448,7 +448,7 @@ order by 1;
/*!
* \brief add extra lines with sum of each account
- * \param $p_array array returned by get_data()
+ * \param $p_array array returned by load()
*/
function show_sum ($p_array)
{
diff --git a/include/class_anc_balance_simple.php b/include/class_anc_balance_simple.php
index 312325dac..d93494d71 100644
--- a/include/class_anc_balance_simple.php
+++ b/include/class_anc_balance_simple.php
@@ -40,7 +40,7 @@ class Anc_Balance_Simple extends Anc_Print {
*
* \return array
*/
- function get_data()
+ function load()
{
$filter=$this->set_sql_filter();
// sum debit
@@ -80,7 +80,7 @@ class Anc_Balance_Simple extends Anc_Print {
/*!
* \brief Set the filter (account_date)
*
- * \return return the string to add to get_data
+ * \return return the string to add to load
*/
@@ -123,7 +123,7 @@ class Anc_Balance_Simple extends Anc_Print {
$r.="| D/C | ";
$r.="
";
- $array=$this->get_data();
+ $array=$this->load();
$odd=0;
if ( is_array($array) == false ){
return $array;
@@ -169,7 +169,7 @@ class Anc_Balance_Simple extends Anc_Print {
*/
function display_pdf()
{
- $array=$this->get_data();
+ $array=$this->load();
$offset=0;
$page=1;
$pagesize=50;
@@ -214,7 +214,7 @@ class Anc_Balance_Simple extends Anc_Print {
*/
function display_csv()
{
- $array=$this->get_data();
+ $array=$this->load();
if ( is_array($array) == false ){
return $array;
diff --git a/include/class_anc_group.php b/include/class_anc_group.php
index 4301d7a19..ca6d9b4dd 100644
--- a/include/class_anc_group.php
+++ b/include/class_anc_group.php
@@ -87,7 +87,7 @@ class Anc_Group {
* \brief fill the object thanks an array
* \param array
*/
- function fill_from_array($p_array) {
+ function load_from_array($p_array) {
$this->ga_id=$p_array['ga_id'];
$this->ga_description=$p_array['ga_description'];
}
@@ -98,7 +98,7 @@ class Anc_Group {
if ( ! empty($array)) {
foreach ($array as $m ) {
$obj= new Anc_Group($this->db);
- $obj->fill_from_array($m);
+ $obj->load_from_array($m);
$res[]=clone $obj;
}
}
diff --git a/include/class_anc_group_operation.php b/include/class_anc_group_operation.php
index a3c9078cf..a3049d454 100644
--- a/include/class_anc_group_operation.php
+++ b/include/class_anc_group_operation.php
@@ -161,7 +161,7 @@ class Anc_Group_Operation
/*!\brief fill row from $_POST data
*
*/
- function from_POST() {
+ function load_from_array($p_array) {
$Plan=new Anc_Plan($this->db);
$aPlan=$Plan->get_list();
@@ -171,12 +171,12 @@ class Anc_Group_Operation
{
$idx=$d['id'];
$p=new Anc_Operation($this->db);
- $p->oa_amount=$_POST["pamount$i"];
+ $p->oa_amount=$_array["pamount$i"];
- $p->oa_description=$_POST["pdesc"];
+ $p->oa_description=$p_array["pdesc"];
$p->oa_date=$_POST['pdate'];
$p->j_id=0;
- $p->oa_debit=(isset ($_POST["pdeb$i"]))?'t':'f';
+ $p->oa_debit=(isset ($p_array["pdeb$i"]))?'t':'f';
$p->oa_group=0;
$p->po_id=$_POST["pop$i"."plan".$idx];
@@ -217,7 +217,7 @@ class Anc_Group_Operation
if ( isset($_POST['go'])) {
$b=new Anc_Group_Operation($cn);
- $b->from_POST();
+ $b->load_from_array($_POST);
exit();
}
diff --git a/include/class_anc_listing.php b/include/class_anc_listing.php
index 0e36fa829..69d55219e 100644
--- a/include/class_anc_listing.php
+++ b/include/class_anc_listing.php
@@ -62,7 +62,7 @@ class Anc_Listing extends Anc_Print {
function display_html() {
$r="";
//---Html
- $array=$this->get_data();
+ $array=$this->load();
if ( is_array($array) == false ){
return $array;
@@ -95,7 +95,7 @@ class Anc_Listing extends Anc_Print {
*
* \return array
*/
- function get_data()
+ function load()
{
$op=new Anc_Operation ($this->db);
$op->pa_id=$this->pa_id;
@@ -109,7 +109,7 @@ class Anc_Listing extends Anc_Print {
function display_csv()
{
- $array=$this->get_data($this->from,$this->to,$this->from_poste,$this->to_poste);
+ $array=$this->load($this->from,$this->to,$this->from_poste,$this->to_poste);
if ( empty($array) == true ){
return $array;
diff --git a/include/class_bud_card.php b/include/class_bud_card.php
index 73912bf55..f57daed8a 100644
--- a/include/class_bud_card.php
+++ b/include/class_bud_card.php
@@ -102,7 +102,7 @@ class Bud_Card {
* corresponding property will be null
* \param $p_array array to convert
*/
- function from_array($p_array) {
+ function load_from_array($p_array) {
if ( empty($p_array) ) return;
foreach (array ('bh_id','bc_id','bc_code','bc_description','bc_price_unit','bc_unit')
as $key ){
@@ -128,7 +128,7 @@ class Bud_Card {
if ( pg_NumRows($res) == 0 ) return null;
$a=pg_fetch_array($res,0);
- $this->from_array($a);
+ $this->load_from_array($a);
}
static function get_list($p_cn,$p_bh_id) {
@@ -143,7 +143,7 @@ class Bud_Card {
foreach ($get as $row ) {
$obj=new Bud_Card($p_cn);
- $obj->from_array($row);
+ $obj->load_from_array($row);
$result[]=clone $obj;
}
return $result;
diff --git a/include/class_bud_hypo.php b/include/class_bud_hypo.php
index 0b1717035..f37e6f655 100644
--- a/include/class_bud_hypo.php
+++ b/include/class_bud_hypo.php
@@ -106,7 +106,7 @@ class Bud_Hypo {
ExecSql($this->db,$sql);
}
- function from_array($p_array) {
+ function load_from_array($p_array) {
$this->bh_id=(isset($p_array['bh_id']))?$p_array['bh_id']:0;
$this->bh_saldo=(isset($p_array['bh_saldo']))?$p_array['bh_saldo']:0;
$this->bh_description=(isset($p_array['bh_description']))?$p_array['bh_description']:0;
diff --git a/include/class_customer.php b/include/class_customer.php
index 4d2a26e81..077dba7fe 100644
--- a/include/class_customer.php
+++ b/include/class_customer.php
@@ -251,7 +251,7 @@ where
$User=new cl_user($this->cn);
$filter_year=" j_tech_per in (select p_id from parm_periode ".
"where p_exercice='".$User->getExercice()."')";
- $a=$post->GetSoldeDetail($filter_year);
+ $a=$post->get_solde_detail($filter_year);
$r.=sprintf(' %15.2f€ | ',$a['debit']);
$r.=sprintf(' %15.2f€ | ',$a['credit']);
diff --git a/include/class_document.php b/include/class_document.php
index 617815268..c8d48455f 100644
--- a/include/class_document.php
+++ b/include/class_document.php
@@ -536,7 +536,7 @@ class Document
$tiers->Getbyqcode($qcode,false);
$p=$tiers->strAttribut(ATTR_DEF_ACCOUNT);
$poste=new Poste($this->db,$p);
- $r=$poste->GetSolde(' true' );
+ $r=$poste->get_solde(' true' );
break;
case 'CUST_NAME':
$tiers=new fiche($this->db);
diff --git a/include/class_fiche.php b/include/class_fiche.php
index dff7a4b98..8c8af4aa5 100644
--- a/include/class_fiche.php
+++ b/include/class_fiche.php
@@ -797,7 +797,7 @@ class fiche {
* (tot_deb,tot_credit
*
*/
- function GetRow($p_from,$p_to)
+ function get_row($p_from,$p_to)
{
if ( $this->id == 0 )
{
@@ -843,7 +843,7 @@ class fiche {
{
$name=$this->getName();
- list($array,$tot_deb,$tot_cred)=$this->GetRow( $_POST['from_periode'],
+ list($array,$tot_deb,$tot_cred)=$this->get_row( $_POST['from_periode'],
$_POST['to_periode']
);
@@ -935,7 +935,7 @@ class fiche {
* balance of the card
*
*/
-function GetSoldeDetail($p_cond="") {
+function get_solde_detail($p_cond="") {
if ( $this->id == 0 ) exit('fiche->id est nul');
$qcode=$this->strAttribut(ATTR_DEF_QUICKCODE);
diff --git a/include/class_rapport.php b/include/class_rapport.php
index 43aef26b6..9cebb3475 100644
--- a/include/class_rapport.php
+++ b/include/class_rapport.php
@@ -51,7 +51,7 @@ class rapport {
* \param $p_type_date type of the date : periode or calendar
*/
- function GetRow($p_start,$p_end,$p_type_date) {
+ function get_row($p_start,$p_end,$p_type_date) {
$Res=ExecSql($this->db,"select fo_id ,
fo_fr_id,
diff --git a/include/class_supplier.php b/include/class_supplier.php
index 5335a786b..9939e5d2b 100644
--- a/include/class_supplier.php
+++ b/include/class_supplier.php
@@ -134,7 +134,7 @@ class Supplier extends fiche{
$User=new cl_user($this->cn);
$filter_year=" j_tech_per in (select p_id from parm_periode ".
"where p_exercice='".$User->getExercice()."')";
- $a=$post->GetSoldeDetail($filter_year);
+ $a=$post->get_solde_detail($filter_year);
$r.=sprintf(' %15.2f€ | ',$a['debit']);
$r.=sprintf(' %15.2f€ | ',$a['credit']);
$r.=sprintf(' %15.2f€ | ',$a['solde']);
diff --git a/include/impress_fiche.inc.php b/include/impress_fiche.inc.php
index 08b61c710..da8013807 100644
--- a/include/impress_fiche.inc.php
+++ b/include/impress_fiche.inc.php
@@ -116,7 +116,7 @@ if ( isset ($_REQUEST['fd_id'])) {
$sql_periode=sql_filter_per($cn,$_REQUEST['from_periode'],$_REQUEST['to_periode'],'p_id','j_tech_per');
- $solde= $detail->GetSoldeDetail($sql_periode);
+ $solde= $detail->get_solde_detail($sql_periode);
printf ("% 10.2f | ",$solde['debit']);
printf ("% 10.2f | ",$solde['credit']);
diff --git a/include/impress_inc.php b/include/impress_inc.php
index 12d6c0505..87d2ff02f 100644
--- a/include/impress_inc.php
+++ b/include/impress_inc.php
@@ -405,7 +405,7 @@ function GetRappelSimple ($p_cn,$p_jrn_id,$p_jrn_type,$p_from,&$arap)
" and p_start <= (select p_start from parm_periode where p_id=$p_from)");
$j=new Acc_Ledger($p_cn,$p_jrn_id);
- $a=$j->GetRowSimple($previous,$previous,$cent='on');
+ $a=$j->get_rowSimple($previous,$previous,$cent='on');
$total_tvac=0.0;
$total_htva=0.0;
foreach ($a as $line) {
@@ -605,7 +605,7 @@ function ParseFormula($p_cn,$p_label,$p_formula,$p_start,$p_end,$p_eval=true,$p_
$P=new Acc_Account($p_cn,$e[0]);
echo_debug(__FILE__.":".__LINE__." condition is $cond");
- $detail=$P->GetSoldeDetail($cond);
+ $detail=$P->get_solde_detail($cond);
if ( $compute=='all')
diff --git a/include/impress_jrn.inc.php b/include/impress_jrn.inc.php
index 13b8b8159..3aca5f2b2 100644
--- a/include/impress_jrn.inc.php
+++ b/include/impress_jrn.inc.php
@@ -41,13 +41,13 @@ require_once("class_acc_ledger.php");
$Jrn->get_name();
if ( $_POST['p_simple']==0 )
{
- $Jrn->GetRow( $_POST['from_periode'],
+ $Jrn->get_row( $_POST['from_periode'],
$_POST['to_periode'],
$p_cent);
}
else
{
- $Row=$Jrn->GetRowSimple($_POST['from_periode'],
+ $Row=$Jrn->get_rowSimple($_POST['from_periode'],
$_POST['to_periode'],
$p_cent);
// var_dump($Row);
diff --git a/include/impress_rapport.inc.php b/include/impress_rapport.inc.php
index 902b44d43..7e8b92769 100644
--- a/include/impress_rapport.inc.php
+++ b/include/impress_rapport.inc.php
@@ -39,9 +39,9 @@ if ( isset( $_GET['bt_html'] ) ) {
//--
if ($_GET['p_step'] == 0 ) {
if ( $_GET ['type_periode'] == 0 )
- $array=$Form->GetRow( $_GET['from_periode'],$_GET['to_periode'], $_GET['type_periode']);
+ $array=$Form->get_row( $_GET['from_periode'],$_GET['to_periode'], $_GET['type_periode']);
else
- $array=$Form->GetRow( $_GET['from_date'],$_GET['to_date'], $_GET['type_periode']);
+ $array=$Form->get_row( $_GET['from_date'],$_GET['to_date'], $_GET['type_periode']);
} else {
// step are asked
//--
@@ -50,7 +50,7 @@ if ( isset( $_GET['bt_html'] ) ) {
$periode=getPeriodeName($cn,$e);
if ( $periode == null ) continue;
- $array[]=$Form->GetRow($e,$e,$_GET['type_periode']);
+ $array[]=$Form->get_row($e,$e,$_GET['type_periode']);
$periode_name[]=$periode;
}
}
diff --git a/include/poste.php b/include/poste.php
index dbd3597b5..302ab1b26 100644
--- a/include/poste.php
+++ b/include/poste.php
@@ -111,7 +111,7 @@ function PosteForm($p_cn) {
* \return balance of the account
*
*/
-function GetSolde($p_cn,$p_account,$p_cond="") {
+function get_solde($p_cn,$p_account,$p_cond="") {
$Res=ExecSql($p_cn,"select j_poste,sum(deb) as sum_deb, sum(cred) as sum_cred from
( select j_poste,
case when j_debit='t' then j_montant else 0 end as deb,
diff --git a/include/user_action_fin.php b/include/user_action_fin.php
index a8ec45c7c..057102d77 100644
--- a/include/user_action_fin.php
+++ b/include/user_action_fin.php
@@ -283,7 +283,7 @@ if ( $action == 'solde' ) {
for ( $i = 0; $i < pg_NumRows($ResAccount);$i++) {
// get the saldo
$l=pg_fetch_array($ResAccount,$i);
- $m=GetSolde($cn,$l['pcm_val']);
+ $m=get_solde($cn,$l['pcm_val']);
// print the result if the saldo is not equal to 0
if ( $m != 0.0 ) {
echo "";
diff --git a/include/user_form_fin.php b/include/user_form_fin.php
index 6e0ec486a..a0536a374 100644
--- a/include/user_form_fin.php
+++ b/include/user_form_fin.php
@@ -222,7 +222,7 @@ function FormFin($p_cn,$p_jrn,$p_periode,$p_submit,$p_array=null,$pview_only=tru
// ComputeBanqueSaldo
//
if ( $pview_only == true ) {
- $solde=GetSolde($p_cn,GetFicheAttribut($p_cn,$e_bank_account,ATTR_DEF_ACCOUNT));
+ $solde=get_solde($p_cn,GetFicheAttribut($p_cn,$e_bank_account,ATTR_DEF_ACCOUNT));
$r.=" Solde = ".$solde." ";
$new_solde=$solde;
}