Code Cleaning : get-> load, GetWWW ==> get_www

This commit is contained in:
sparkyx 2007-12-21 09:07:07 +00:00
parent 32e57311b7
commit d11266d34f
43 changed files with 96 additions and 96 deletions

View file

@ -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) {

View file

@ -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].'<br>';
$sql=sprintf("select account_add(%d,'%s')",
$p->id,$alabel[$i]);

View file

@ -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;

View file

@ -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",

View file

@ -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

View file

@ -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;
}

View file

@ -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);

View file

@ -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,

View file

@ -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 )

View file

@ -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;

View file

@ -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');

View file

@ -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']
);

View file

@ -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;

View file

@ -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']);

View file

@ -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 "<tr>";

View file

@ -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();

View file

@ -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();
}

View file

@ -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();

View file

@ -110,7 +110,7 @@ if ( isset($_POST['save'])) {
'Op&eacute;ration sauv&eacute;e';
$a=new Anc_Group_Operation($cn);
$a->from_POST();
$a->load_from_array($_POST);
$a->save();
echo $a->show();

View file

@ -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";
}

View file

@ -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']
);

View file

@ -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');

View file

@ -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;
* </ul>
* </ul>
*
* \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)

View file

@ -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());

View file

@ -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)
{

View file

@ -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.="<th>D/C</th>";
$r.="</tr>";
$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;

View file

@ -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;
}
}

View file

@ -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();
}

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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('<TD align="right"> %15.2f&euro;</TD>',$a['debit']);
$r.=sprintf('<TD align="right"> %15.2f&euro;</TD>',$a['credit']);

View file

@ -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);

View file

@ -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);

View file

@ -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,

View file

@ -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('<TD align="right"> %15.2f&euro;</TD>',$a['debit']);
$r.=sprintf('<TD align="right"> %15.2f&euro;</TD>',$a['credit']);
$r.=sprintf('<TD align="right"> %15.2f&euro;</TD>',$a['solde']);

View file

@ -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 ("<td align=\"right\">% 10.2f</td>",$solde['debit']);
printf ("<td align=\"right\">% 10.2f</td>",$solde['credit']);

View file

@ -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')

View file

@ -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);

View file

@ -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;
}
}

View file

@ -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,

View file

@ -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 "<tr>";

View file

@ -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.=" <b> Solde = ".$solde." </b>";
$new_solde=$solde;
}