diff --git a/html/ecrit_ouv.php b/html/ecrit_ouv.php index b65b1d84c..459cd8193 100644 --- a/html/ecrit_ouv.php +++ b/html/ecrit_ouv.php @@ -24,7 +24,7 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr include_once ("ac_common.php"); require_once('class_widget.php'); -require_once('class_poste.php'); +require_once('class_acc_account.php'); html_page_start($_SESSION['g_theme']); require_once('class_dossier.php'); $gDossier=dossier::id(); @@ -169,7 +169,7 @@ if ( isset ($_GET['import'])) { for ($i=0;$i<$idx;$i++) { - $p=new Poste($cn,$aposte[$i]); + $p=new Acc_Account($cn,$aposte[$i]); // if the poste exists then check the next one if ( $p->get() == true ) continue; diff --git a/html/export_ouv.php b/html/export_ouv.php index 584a588c2..3a48fbd87 100644 --- a/html/export_ouv.php +++ b/html/export_ouv.php @@ -23,7 +23,7 @@ */ include_once ("ac_common.php"); -require_once("class_poste.php"); +require_once("class_acc_account.php"); header('Content-type: application/csv'); header('Content-Disposition: attachment;filename="export_ouv.csv"',FALSE); require_once('class_dossier.php'); @@ -65,7 +65,7 @@ printf ("OUVERTURE\n"); $sum=0; foreach ($ret as $poste_id) { - $Poste=new poste($cn,$poste_id['j_poste']); + $Poste=new Acc_Account($cn,$poste_id['j_poste']); // fill the object $Poste->get(); // build sql stmt diff --git a/html/fiche_csv.php b/html/fiche_csv.php index ecb259ceb..80dc159a8 100644 --- a/html/fiche_csv.php +++ b/html/fiche_csv.php @@ -31,7 +31,7 @@ include_once("check_priv.php"); require_once('class_dossier.php'); $gDossier=dossier::id(); -if ( isset ($_REQUEST['with_amount'])) include_once("class_poste.php"); +if ( isset ($_REQUEST['with_amount'])) include_once("class_acc_account.php"); $cn=DbConnect($gDossier); $rep=DbConnect(); diff --git a/html/poste_csv.php b/html/poste_csv.php index 719b7e03c..a4c777038 100644 --- a/html/poste_csv.php +++ b/html/poste_csv.php @@ -24,7 +24,7 @@ include_once("ac_common.php"); include_once ("postgres.php"); include ('class_user.php'); -include("class_poste.php"); +include("class_acc_account.php"); header('Content-type: application/csv'); header('Content-Disposition: attachment;filename="poste.csv"',FALSE); require_once('class_dossier.php'); @@ -49,7 +49,7 @@ if ( count($a_poste) == 0 ) foreach ($a_poste as $pos) { - $Poste=new poste($cn,$pos['pcm_val']); + $Poste=new Acc_Account($cn,$pos['pcm_val']); $Poste->get_name(); list($array,$tot_deb,$tot_cred)=$Poste->GetRow( $_POST['from_periode'], $_POST['to_periode'] diff --git a/html/poste_pdf.php b/html/poste_pdf.php index d62a2ab88..4f5cc1ca8 100644 --- a/html/poste_pdf.php +++ b/html/poste_pdf.php @@ -23,7 +23,7 @@ /*! \file * \brief send the account list in PDF */ -include_once("class_poste.php"); +include_once("class_acc_account.php"); include_once("ac_common.php"); include_once("postgres.php"); include_once("class.ezpdf.php"); @@ -56,7 +56,7 @@ if ( count($a_poste) == 0 ) { foreach ($a_poste as $poste) { echo_debug("poste_pdf",__LINE__,$poste); - $Poste=new poste($cn,$poste['pcm_val']); + $Poste=new Acc_Account($cn,$poste['pcm_val']); list($array,$tot_deb,$tot_cred)=$Poste->GetRow($from_periode,$to_periode); // don't print empty account if ( count($array) == 0 ) { diff --git a/html/quick_code_pdf.php b/html/quick_code_pdf.php index 21582ce51..24c270aef 100644 --- a/html/quick_code_pdf.php +++ b/html/quick_code_pdf.php @@ -23,7 +23,7 @@ /*! \file * \brief send the account list in PDF */ -include_once("class_poste.php"); +include_once("class_acc_account.php"); include_once("ac_common.php"); include_once("postgres.php"); include_once("class.ezpdf.php"); diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index 1d9d57002..211a1ed14 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -25,7 +25,7 @@ require_once ('class_dossier.php'); require_once ('class_own.php'); require_once ('class_anc_operation.php'); require_once ('class_acc_operation.php'); -require_once ('class_poste.php'); +require_once ('class_acc_account.php'); require_once ('class_pre_op_advanced.php'); require_once ('jrn.php'); require_once ('class_acexception.php'); @@ -471,7 +471,7 @@ foreach ( $data_jrnx as $code ) { $idx_tva=0; echo_debug('class_acc_ledger',__LINE__,'Code is'); echo_debug('class_acc_ledger',__LINE__,$code); - $poste=new poste($this->db,$code['j_poste']); + $poste=new Acc_Account($this->db,$code['j_poste']); // if card retrieve name if the account is not a VAT account if ( strlen(trim($code['j_qcode'] )) != 0 && $poste->isTva() == 0 ) @@ -810,7 +810,7 @@ function get_propertie() } if ( trim(${'qc_'.$i})=="" && trim(${'poste'.$i}) != "") { - $oposte=new poste($this->db,${'poste'.$i}); + $oposte=new Acc_Account($this->db,${'poste'.$i}); $strPoste=$oposte->id; $ret.="".${"poste".$i}." - ". $oposte->get_name().$hidden->IOValue('poste'.$i,${'poste'.$i}). @@ -1023,7 +1023,7 @@ function get_propertie() // Check if the account is permitted if ( isset (${'poste'.$i})) { - $p=new poste($this->db,${'poste'.$i}); + $p=new Acc_Account($this->db,${'poste'.$i}); if ( $p->belong_ledger ($p_jrn) < 0 ) throw new AcException("Le poste ".$p->id." n\'est pas dans ce journal",5); } diff --git a/include/class_admin.php b/include/class_admin.php index af53a30bd..fb1f21aaa 100644 --- a/include/class_admin.php +++ b/include/class_admin.php @@ -24,7 +24,7 @@ require_once("class_parm_code.php"); require_once("class_widget.php"); require_once('class_fiche.php'); -require_once('class_poste.php'); +require_once('class_acc_account.php'); require_once('user_common.php'); /*! \file * \brief Derived from class fiche Administration are a specific kind of card diff --git a/include/class_customer.php b/include/class_customer.php index db56553ac..4d2a26e81 100644 --- a/include/class_customer.php +++ b/include/class_customer.php @@ -24,7 +24,7 @@ require_once("class_parm_code.php"); require_once("class_widget.php"); require_once('class_fiche.php'); -require_once('class_poste.php'); +require_once('class_acc_account.php'); require_once('user_common.php'); /*! \file * \brief Derived from class fiche Customer are a specific kind of card @@ -246,7 +246,7 @@ where " ".$client->strAttribut(ATTR_DEF_PAYS). ""; - $post=new poste($this->cn,$client->strAttribut(ATTR_DEF_ACCOUNT)); + $post=new Acc_Account($this->cn,$client->strAttribut(ATTR_DEF_ACCOUNT)); /* Filter on the default year */ $User=new cl_user($this->cn); $filter_year=" j_tech_per in (select p_id from parm_periode ". diff --git a/include/class_document.php b/include/class_document.php index 65571cf3f..617815268 100644 --- a/include/class_document.php +++ b/include/class_document.php @@ -19,7 +19,7 @@ /* $Revision$ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr require_once('class_own.php'); -require_once('class_poste.php'); +require_once('class_acc_account.php'); require_once('class_action.php'); /*! \file * \brief Class Document corresponds to the table document diff --git a/include/class_poste.php b/include/class_poste.php index 48cc38f31..cd8b8ed58 100644 --- a/include/class_poste.php +++ b/include/class_poste.php @@ -331,7 +331,7 @@ function GetSoldeDetail($p_cond="") { } static function test_me() { $cn=DbConnect(dossier::id()); - $a=new poste($cn,550); + $a=new Acc_Account($cn,550); echo ' Journal 4 '.$a->belong_ledger(4); } diff --git a/include/class_supplier.php b/include/class_supplier.php index 9ecc2b8db..5335a786b 100644 --- a/include/class_supplier.php +++ b/include/class_supplier.php @@ -24,7 +24,7 @@ require_once("class_parm_code.php"); require_once("class_widget.php"); require_once('class_fiche.php'); -require_once('class_poste.php'); +require_once('class_acc_account.php'); require_once('user_common.php'); /*! \file * \brief Derived from class fiche Supplier are a specific kind of card @@ -129,7 +129,7 @@ class Supplier extends fiche{ " ".$supplier->strAttribut(ATTR_DEF_PAYS). ""; - $post=new poste($this->cn,$supplier->strAttribut(ATTR_DEF_ACCOUNT)); + $post=new Acc_Account($this->cn,$supplier->strAttribut(ATTR_DEF_ACCOUNT)); /* Filter on the default year */ $User=new cl_user($this->cn); $filter_year=" j_tech_per in (select p_id from parm_periode ". diff --git a/include/impress_fiche.inc.php b/include/impress_fiche.inc.php index 709e45b93..08b61c710 100644 --- a/include/impress_fiche.inc.php +++ b/include/impress_fiche.inc.php @@ -30,7 +30,7 @@ if ( isset ($_REQUEST['fd_id'])) { // if amount requested $with_amount= (isset($_REQUEST['with_amount']))?true:false; if ($with_amount) - include_once("class_poste.php"); + include_once("class_acc_account.php"); echo '
'; $submit=new widget(); diff --git a/include/impress_inc.php b/include/impress_inc.php index 7e13b33c1..12d6c0505 100644 --- a/include/impress_inc.php +++ b/include/impress_inc.php @@ -549,7 +549,7 @@ function ParseFormula($p_cn,$p_label,$p_formula,$p_start,$p_end,$p_eval=true,$p_ else $cond="( j_date >= to_date('$p_start','DD.MM.YYYY') and j_date <= to_date('$p_end','DD.MM.YYYY'))"; - include_once("class_poste.php"); + include_once("class_acc_account.php"); while (ereg("(\[[0-9]*%*D*C*\])",$p_formula,$e) == true) { // remove the [ ] @@ -602,7 +602,7 @@ function ParseFormula($p_cn,$p_label,$p_formula,$p_start,$p_end,$p_eval=true,$p_ } // Get sum of account - $P=new poste($p_cn,$e[0]); + $P=new Acc_Account($p_cn,$e[0]); echo_debug(__FILE__.":".__LINE__." condition is $cond"); $detail=$P->GetSoldeDetail($cond); diff --git a/include/impress_poste.inc.php b/include/impress_poste.inc.php index e0d443129..98d88ff79 100644 --- a/include/impress_poste.inc.php +++ b/include/impress_poste.inc.php @@ -33,7 +33,7 @@ include_once("class_widget.php"); // after in pdf or cvs //----------------------------------------------------- if ( isset( $_POST['bt_html'] ) ) { - include("class_poste.php"); + include("class_acc_account.php"); $go=0; // we ask a poste_id if ( strlen(trim($_POST['poste_id'])) != 0 && isNumber($_POST['poste_id']) ) @@ -47,7 +47,7 @@ if ( isset( $_POST['bt_html'] ) ) { // Check if the post is numeric and exists elseif ( CountSql($cn,'select * from tmp_pcmn where pcm_val='.FormatString($_POST['poste_id'])) != 0 ) { - $Poste=new poste($cn,$_POST['poste_id']);$go=1; + $Poste=new Acc_Account($cn,$_POST['poste_id']);$go=1; } } if ( strlen(trim($_POST['f_id'])) != 0 ) @@ -93,13 +93,13 @@ if ( isset( $_POST['bt_html'] ) ) { echo '
'; - $Poste=new poste($cn,$_POST['poste_id']); + $Poste=new Acc_Account($cn,$_POST['poste_id']); $Poste->HtmlTableHeader($_POST['poste_id']); $Poste->HtmlTable(); foreach ($a_poste as $poste_id ) { - $Poste=new poste ($cn,$poste_id['pcm_val']); + $Poste=new Acc_Account ($cn,$poste_id['pcm_val']); $Poste->HtmlTable(); } $Poste->HtmlTableHeader($_POST['poste_id']);