diff --git a/html/ajax_card.php b/html/ajax_card.php index c6ae961d1..c7b4bd10e 100644 --- a/html/ajax_card.php +++ b/html/ajax_card.php @@ -81,7 +81,7 @@ switch($op) { /* ------------------------------------------------------------ */ case 'dc': - $f=new fiche($cn); + $f=new Fiche($cn); $f->get_by_qcode($qcode); $html=$f->Display(true); break; @@ -184,7 +184,7 @@ case 'fs': $ledger=new Acc_Ledger($cn,$jrn); $type=$ledger->get_type(); } - $fiche=new fiche($cn); + $fiche=new Fiche($cn); /* Build the SQL and show result */ $sql=$fiche->build_sql($sql_array); @@ -290,7 +290,7 @@ case 'scc': "nom_mod"=>$_POST['nom_mod'], "class_base"=>$_POST['class_base']); if ( isset ($_POST['create'])) $array['create']=1; - $catcard=new Fiche_def($cn); + $catcard=new Fiche_Def($cn); if ( $catcard->Add($array) == -1) $html.="alert('"._('Catégorie existe déjà')."')"; else diff --git a/html/fiche_csv.php b/html/fiche_csv.php index 7b5bab5d8..1c44d2ddb 100644 --- a/html/fiche_csv.php +++ b/html/fiche_csv.php @@ -40,8 +40,8 @@ $User->can_request(IMPFIC,0); if ( isset ($_GET['fd_id'])) { - $fiche_def=new fiche_def($cn,$_GET ['fd_id']); - $fiche=new fiche($cn); + $fiche_def=new Fiche_Def($cn,$_GET ['fd_id']); + $fiche=new Fiche($cn); $e=$fiche_def->GetByType(); $o=0; // Heading diff --git a/html/get_saldo.php b/html/get_saldo.php index 09bc5115a..b27430664 100644 --- a/html/get_saldo.php +++ b/html/get_saldo.php @@ -47,7 +47,7 @@ if ( $user->check_jrn($_GET['j'])=='X' ) return '{"saldo":"0"}'; $filter_year=" j_tech_per in (select p_id from parm_periode ". "where p_exercice='".$user->get_exercice()."')"; -$acc=new fiche($cn); +$acc=new Fiche($cn); $acc->get_by_qcode($_GET['ctl'],false); if ( $acc->belong_ledger($_GET['j']) == -1 ) diff --git a/html/jrn_search.php b/html/jrn_search.php index c560a452c..99552f5db 100644 --- a/html/jrn_search.php +++ b/html/jrn_search.php @@ -243,7 +243,7 @@ echo '
'; echo ''; if ( $l_line ['j_qcode'] != "" ) { - $o=new fiche($cn); + $o=new Fiche($cn); $o->get_by_qcode($l_line['j_qcode'],false); echo "[ ".$l_line['j_qcode']." ]". $o->strAttribut(ATTR_DEF_NAME); diff --git a/html/quick_code_csv.php b/html/quick_code_csv.php index eb26df5b4..3df90d791 100644 --- a/html/quick_code_csv.php +++ b/html/quick_code_csv.php @@ -37,7 +37,7 @@ $cn=new Database($gDossier); $User=new User($cn); $User->Check(); -$Fiche=new fiche($cn,$_REQUEST['f_id']); +$Fiche=new Fiche($cn,$_REQUEST['f_id']); $Fiche->getName(); list($array,$tot_deb,$tot_cred)=$Fiche->get_row_date( $_GET['from_periode'], diff --git a/html/quick_code_pdf.php b/html/quick_code_pdf.php index a6290130d..f924ca090 100644 --- a/html/quick_code_pdf.php +++ b/html/quick_code_pdf.php @@ -44,7 +44,7 @@ $pdf->AliasNbPages(); $pdf->AddPage(); -$Fiche=new fiche($cn,$f_id); +$Fiche=new Fiche($cn,$f_id); list($array,$tot_deb,$tot_cred)=$Fiche->get_row_date($from_periode,$to_periode); diff --git a/include/adm_card.inc.php b/include/adm_card.inc.php index 3e328f89f..a4ac46159 100644 --- a/include/adm_card.inc.php +++ b/include/adm_card.inc.php @@ -56,7 +56,7 @@ default: $def=1; $ss_action='dc'; } -$f=new fiche($cn,$_REQUEST['f_id']); +$f=new Fiche($cn,$_REQUEST['f_id']); echo '
'; echo ShowItem(array( array($root."&sc=dc",_('Fiche'),_('Détail de la fiche'),1), @@ -99,7 +99,7 @@ if ( $ss_action == 'op') { if ( $ss_action == 'cn') { echo '
'; echo dossier::hidden(); - $f=new fiche($cn,$_REQUEST['f_id']); + $f=new Fiche($cn,$_REQUEST['f_id']); $contact=new Contact($cn); $contact->company=$f->get_quick_code(); echo $contact->summary(""); diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index 3be50ea75..c7292afe0 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -372,7 +372,7 @@ jr_comment||' ('||jr_internal||')'||case when jr_pj_number is not null and jr_pj $tot_cred=0; $row=Database::fetch_all($Res); for ($i=0;$i<$Max;$i++) { - $fiche=new fiche($this->db); + $fiche=new Fiche($this->db); $line=$row[$i]; $mont_deb=($line['deb_montant']!=0)?sprintf("% 8.2f",$line['deb_montant']):""; $mont_cred=($line['cred_montant']!=0)?sprintf("% 8.2f",$line['cred_montant']):""; @@ -399,7 +399,7 @@ jr_comment||' ('||jr_internal||')'||case when jr_pj_number is not null and jr_pj if ( $row[$e]['grp'] != $case ) continue; if ( strlen(trim($row[$e]['j_qcode'])) == 0 ) continue; - $f=new fiche($this->db); + $f=new Fiche($this->db); $f->get_by_qcode($row[$e]['j_qcode'],false); if ( $f->get_fiche_def_ref_id() == FICHE_TYPE_FIN ) { $tot_op=($row[$e]['debit'] == 't')?$jr_montant:" - ".$jr_montant; @@ -915,7 +915,7 @@ jr_comment||' ('||jr_internal||')'||case when jr_pj_number is not null and jr_pj // if card retrieve name if the account is not a VAT account if ( strlen(trim($code['j_qcode'] )) != 0 && $poste->isTva() == 0 ) { - $fiche=new fiche($this->db); + $fiche=new Fiche($this->db); $fiche->get_by_qcode(trim($code['j_qcode']),false); $fiche_def_id=$fiche->get_fiche_def_ref_id(); // Customer or supplier @@ -1241,7 +1241,7 @@ jr_comment||' ('||jr_internal||')'||case when jr_pj_number is not null and jr_pj for ($i=0;$i<$nb_item;$i++) { $ret.=""; if ( trim(${'qc_'.$i})!="") { - $oqc=new fiche($this->db); + $oqc=new Fiche($this->db); $oqc->get_by_qcode(${'qc_'.$i},false); $strPoste=$oqc->strAttribut(ATTR_DEF_ACCOUNT); $ret.="". @@ -1443,7 +1443,7 @@ jr_comment||' ('||jr_internal||')'||case when jr_pj_number is not null and jr_pj $label=''; if ( $quick_code->value != '' ) { - $Fiche=new fiche($this->db); + $Fiche=new Fiche($this->db); $Fiche->get_by_qcode($quick_code->value); $label=$Fiche->strAttribut(ATTR_DEF_NAME); } @@ -1590,7 +1590,7 @@ jr_comment||' ('||jr_internal||')'||case when jr_pj_number is not null and jr_pj // Check if the card is permitted if ( isset (${'qc_'.$i}) && trim(${'qc_'.$i}) !="") { - $f=new fiche($this->db); + $f=new Fiche($this->db); $f->quick_code=${'qc_'.$i}; if ( $f->belong_ledger($p_jrn) < 0 ) throw new Exception("La fiche quick_code = ". @@ -1681,7 +1681,7 @@ jr_comment||' ('||jr_internal||')'||case when jr_pj_number is not null and jr_pj $quick_code=""; // First we save the jrnx if ( isset(${'qc_'.$i})) { - $qc=new fiche($this->db); + $qc=new Fiche($this->db); $qc->get_by_qcode(${'qc_'.$i},false); $sposte=$qc->strAttribut(ATTR_DEF_ACCOUNT); /* if there are 2 accounts take following the deb or cred */ @@ -1979,7 +1979,7 @@ function get_last_date() /* Check if the "paid by" is empty, */ if ( $e_mp != 0) { /* the paid by is not empty then check if valid */ - $empl=new fiche($this->db); + $empl=new Fiche($this->db); $empl->get_by_qcode($e_mp_qcode); if ( $empl->empty_attribute(ATTR_DEF_ACCOUNT)== true) { throw new Exception('Celui qui paie n\' a pas de poste comptable',20); diff --git a/include/class_acc_ledger_fin.php b/include/class_acc_ledger_fin.php index efb3b1013..3826ccc0b 100644 --- a/include/class_acc_ledger_fin.php +++ b/include/class_acc_ledger_fin.php @@ -95,7 +95,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { - $fiche=new fiche($this->db); + $fiche=new Fiche($this->db); $fiche->get_by_qcode($e_bank_account); if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) throw new Exception('La fiche '.$e_bank_account.'n\'a pas de poste comptable',8); @@ -118,7 +118,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { } /* Check if the card belong to the ledger */ - $fiche=new fiche ($this->db); + $fiche=new Fiche ($this->db); $fiche->get_by_qcode($e_bank_account); if ( $fiche->belong_ledger($p_jrn,'deb') !=1 ) throw new Exception('La fiche '.$e_bank_account.'n\'est pas accessible à ce journal',10); @@ -137,7 +137,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { /* compute the total */ $tot_amount+=round(${'e_other'.$i.'_amount'},2); /* check if all card has a ATTR_DEF_ACCOUNT*/ - $fiche=new fiche($this->db); + $fiche=new Fiche($this->db); $fiche->get_by_qcode(${'e_other'.$i}); if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) throw new Exception('La fiche '.${'e_other'.$i}.'n\'a pas de poste comptable',8); @@ -156,7 +156,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { throw new Exception('Pour la fiche '.${'e_other'.$i}.' le poste comptable ['.$poste->id.'n\'existe pas',9); } /* Check if the card belong to the ledger */ - $fiche=new fiche ($this->db); + $fiche=new Fiche ($this->db); $fiche->get_by_qcode(${'e_other'.$i}); if ( $fiche->belong_ledger($p_jrn,'cred') !=1 ) throw new Exception('La fiche '.${'e_other'.$i}.'n\'est pas accessible à ce journal',10); @@ -261,7 +261,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { // retrieve e_bank_account_label if ( $e_bank_account != "" ) { - $fBank=new fiche($this->db); + $fBank=new Fiche($this->db); $fBank->get_by_qcode($e_bank_account); $e_bank_account_label=$fBank->strAttribut(ATTR_DEF_NAME).' '. ' Adresse : '.$fBank->strAttribut(ATTR_DEF_ADRESS).' '. @@ -330,7 +330,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { // If $tiers has a value if ( $tiers != "" ) { - $fTiers=new fiche($this->db); + $fTiers=new Fiche($this->db); $fTiers->get_by_qcode($tiers); $tiers_label=$fTiers->strAttribut(ATTR_DEF_NAME); @@ -446,7 +446,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { $e_bank_account=( isset ($e_bank_account) )?$e_bank_account:""; $e_bank_account_label=""; - $fBank=new fiche($this->db); + $fBank=new Fiche($this->db); $fBank->get_by_qcode($e_bank_account); $e_bank_account_label=$fBank->strAttribut(ATTR_DEF_NAME).' '. ' Adresse : '.$fBank->strAttribut(ATTR_DEF_ADRESS).' '. @@ -508,7 +508,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { $tot_amount=bcadd($tot_amount,$tiers_amount); $tiers_comment=h(${"e_other$i"."_comment"}); // If $tiers has a value - $fTiers=new fiche($this->db); + $fTiers=new Fiche($this->db); $fTiers->get_by_qcode($tiers); $tiers_label=$fTiers->strAttribut(ATTR_DEF_NAME); @@ -583,7 +583,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { $ret=''; // Debit = banque - $fBank=new fiche($this->db); + $fBank=new Fiche($this->db); $fBank->get_by_qcode($e_bank_account); // Get the saldo $pPeriode=new Periode($this->db); @@ -620,7 +620,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { // if tiers is set and amount != 0 insert it into the database // and quit the loop ? if ( strlen(trim(${"e_other$i"}))==0 ) continue; - $fPoste=new fiche($this->db); + $fPoste=new Fiche($this->db); $fPoste->get_by_qcode(${"e_other$i"}); // round it diff --git a/include/class_acc_ledger_purchase.php b/include/class_acc_ledger_purchase.php index 5c405a737..34bf2db8b 100644 --- a/include/class_acc_ledger_purchase.php +++ b/include/class_acc_ledger_purchase.php @@ -105,7 +105,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { } /* check the account */ - $fiche=new fiche($this->db); + $fiche=new Fiche($this->db); $fiche->get_by_qcode($e_client); if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) @@ -127,7 +127,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { throw new Exception(_('Pour la fiche ').$e_client._(' le poste comptable [').$poste->id.'] '._('n\'existe pas'),9); } /* Check if the card belong to the ledger */ - $fiche=new fiche ($this->db); + $fiche=new Fiche ($this->db); $fiche->get_by_qcode($e_client,'cred'); if ( $fiche->belong_ledger($p_jrn) !=1 ) throw new Exception(_('La fiche ').$e_client._('n\'est pas accessible à ce journal'),10); @@ -162,7 +162,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { throw new Exception(_('La fiche ').${'e_march'.$i}._('a un code tva invalide').' ['.${'e_march'.$i.'_tva_id'}.']',13); } /* check if all card has a ATTR_DEF_ACCOUNT*/ - $fiche=new fiche($this->db); + $fiche=new Fiche($this->db); $fiche->get_by_qcode(${'e_march'.$i}); if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) throw new Exception(_('La fiche ').${'e_march'.$i}._('n\'a pas de poste comptable'),8); @@ -183,7 +183,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { throw new Exception(_('Pour la fiche ').${'e_march'.$i}._(' le poste comptable').' ['.$poste->id._('n\'existe pas'),9); } /* Check if the card belong to the ledger */ - $fiche=new fiche ($this->db); + $fiche=new Fiche ($this->db); $fiche->get_by_qcode(${'e_march'.$i}); if ( $fiche->belong_ledger($p_jrn,'deb') !=1 ) throw new Exception(_('La fiche ').${'e_march'.$i}._('n\'est pas accessible à ce journal'),10); @@ -263,7 +263,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $internal=$this->compute_internal_code($seq); $this->internal=$internal; - $cust=new fiche($this->db); + $cust=new Fiche($this->db); $cust->get_by_qcode($e_client); $sposte=$cust->strAttribut(ATTR_DEF_ACCOUNT); // if 2 accounts, take only the credit Supplier @@ -300,7 +300,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { if ( ${'e_quant'.$i} == 0 ) continue; /* First we save all the items without vat */ - $fiche=new fiche($this->db); + $fiche=new Fiche($this->db); $fiche->get_by_qcode(${"e_march".$i}); /* tva */ @@ -594,7 +594,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { else $fqcode=$mp->get_parameter('qcode'); - $acfiche = new fiche($this->db); + $acfiche = new Fiche($this->db); $acfiche->get_by_qcode($fqcode); /* jrnx */ @@ -849,7 +849,7 @@ array //-- if ( strlen(trim($e_client)) != 0) { - $fClient=new fiche($this->db); + $fClient=new Fiche($this->db); $fClient->get_by_qcode($e_client); $e_client_label=$fClient->strAttribut(ATTR_DEF_NAME).' '. ' Adresse : '.$fClient->strAttribut(ATTR_DEF_ADRESS).' '. @@ -911,7 +911,7 @@ array // retrieve the tva label and name //-- if ( strlen(trim($march))!=0 ) { - $fMarch=new fiche($this->db); + $fMarch=new Fiche($this->db); $fMarch->get_by_qcode($march); $march_label=$fMarch->strAttribut(ATTR_DEF_NAME); /* vat use */ @@ -1057,7 +1057,7 @@ array $owner = new Own($this->db); bcscale(4); - $client=new fiche($this->db); + $client=new Fiche($this->db); $client->get_by_qcode($e_client,true); $client_name=h($client->getName(). @@ -1129,7 +1129,7 @@ array if ( strlen(trim(${"e_march".$i})) == 0 ) continue; /* retrieve information for card */ - $fiche=new fiche($this->db); + $fiche=new Fiche($this->db); $fiche->get_by_qcode(${"e_march".$i}); $fiche_name=h($fiche->getName()); diff --git a/include/class_acc_ledger_sold.php b/include/class_acc_ledger_sold.php index 4a1762cad..36ab26415 100644 --- a/include/class_acc_ledger_sold.php +++ b/include/class_acc_ledger_sold.php @@ -106,7 +106,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { } - $fiche=new fiche($this->db); + $fiche=new Fiche($this->db); $fiche->get_by_qcode($e_client); if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) throw new Exception(_('La fiche ').$e_client._('n\'a pas de poste comptable'),8); @@ -129,7 +129,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { } /* Check if the card belong to the ledger */ - $fiche=new fiche ($this->db); + $fiche=new Fiche ($this->db); $fiche->get_by_qcode($e_client,'deb'); if ( $fiche->belong_ledger($p_jrn) !=1 ) throw new Exception(_('La fiche ').$e_client._('n\'est pas accessible à ce journal'),10); @@ -148,7 +148,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { throw new Exception(_('La fiche ').${'e_march'.$i}._('a une quantité invalide [').${'e_quant'.$i}.']',7); /* check if all card has a ATTR_DEF_ACCOUNT*/ - $fiche=new fiche($this->db); + $fiche=new Fiche($this->db); $fiche->get_by_qcode(${'e_march'.$i}); if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) throw new Exception(_('La fiche ').${'e_march'.$i}._('n\'a pas de poste comptable'),8); @@ -178,7 +178,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { throw new Exception(_('Pour la fiche ').${'e_march'.$i}._(' le poste comptable [').$poste->id._('n\'existe pas'),9); } /* Check if the card belong to the ledger */ - $fiche=new fiche ($this->db); + $fiche=new Fiche ($this->db); $fiche->get_by_qcode(${'e_march'.$i}); if ( $fiche->belong_ledger($p_jrn,'cred') !=1 ) throw new Exception(_('La fiche ').${'e_march'.$i}._('n\'est pas accessible à ce journal'),10); @@ -224,7 +224,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { else $tperiode=$oPeriode->find_periode($e_date); - $cust=new fiche($this->db); + $cust=new Fiche($this->db); $cust->get_by_qcode($e_client); $sposte=$cust->strAttribut(ATTR_DEF_ACCOUNT); @@ -250,7 +250,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { if ( ${'e_quant'.$i} == 0 ) continue; /* First we save all the items without vat */ - $fiche=new fiche($this->db); + $fiche=new Fiche($this->db); $fiche->get_by_qcode(${"e_march".$i}); $amount=bcmul(${'e_march'.$i.'_price'},${'e_quant'.$i}); $tot_amount+=$amount; @@ -432,7 +432,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { /* fiche */ $fqcode=${'e_mp_qcode_'.$e_mp}; - $acfiche = new fiche($this->db); + $acfiche = new Fiche($this->db); $acfiche->get_by_qcode($fqcode); /* jrnx */ @@ -537,7 +537,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { $owner = new Own($this->db); bcscale(4); - $client=new fiche($this->db); + $client=new Fiche($this->db); $client->get_by_qcode($e_client,true); $client_name=$client->getName(). @@ -602,7 +602,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { if ( strlen(trim(${"e_march".$i})) == 0 ) continue; /* retrieve information for card */ - $fiche=new fiche($this->db); + $fiche=new Fiche($this->db); $fiche->get_by_qcode(${"e_march".$i}); $fiche_name=h($fiche->getName()); if ( $owner->MY_TVA_USE=='Y') { @@ -971,7 +971,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { //-- if ( strlen(trim($e_client)) != 0) { - $fClient=new fiche($this->db); + $fClient=new Fiche($this->db); $fClient->get_by_qcode($e_client); $e_client_label=$fClient->strAttribut(ATTR_DEF_NAME).' '. ' Adresse : '.$fClient->strAttribut(ATTR_DEF_ADRESS).' '. @@ -1032,7 +1032,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { // retrieve the tva label and name //-- if ( strlen(trim($march))!=0 ) { - $fMarch=new fiche($this->db); + $fMarch=new Fiche($this->db); $fMarch->get_by_qcode($march); $march_label=$fMarch->strAttribut(ATTR_DEF_NAME); if ( $flag_tva=='Y') { diff --git a/include/class_acc_payment.php b/include/class_acc_payment.php index 48a92cd51..8c95c3f58 100644 --- a/include/class_acc_payment.php +++ b/include/class_acc_payment.php @@ -303,7 +303,7 @@ class Acc_Payment /* if the qcode is not null then add a hidden variable with the qcode */ - $fiche=new fiche($this->cn); + $fiche=new Fiche($this->cn); $fiche->get_by_qcode($row->mp_qcode); $f=HtmlInput::hidden('e_mp_qcode_'.$row->mp_id,$row->mp_qcode); diff --git a/include/class_action.php b/include/class_action.php index 6bcf2ea17..32150f9c3 100644 --- a/include/class_action.php +++ b/include/class_action.php @@ -268,7 +268,7 @@ class Action // f_id_dest sender if ( $this->qcode_dest != '- ERROR -' && strlen(trim($this->qcode_dest)) != 0) { - $tiers=new fiche($this->db); + $tiers=new Fiche($this->db); $tiers->get_by_qcode($this->qcode_dest); $qcode_dest_label=$tiers->strAttribut(1); $this->f_id_dest=$tiers->id; @@ -555,7 +555,7 @@ class Action $this->ag_state=$row[0]['ag_state']; } $this->dt_id=$this->ag_type; - $aexp=new fiche($this->db,$this->f_id_dest); + $aexp=new Fiche($this->db,$this->f_id_dest); $this->qcode_dest=$aexp->strAttribut(ATTR_DEF_QUICKCODE); } @@ -576,10 +576,10 @@ class Action $add_file=''; // f_id exp - $exp=new fiche($this->db); + $exp=new Fiche($this->db); $exp->get_by_qcode($this->qcode_dest); - $contact=new fiche($this->db); + $contact=new Fiche($this->db); $contact->get_by_qcode($this->ag_contact); if ( trim($this->ag_title) == "") @@ -819,7 +819,7 @@ class Action $r.="".$href.$row['my_date'].''.""; // Expediteur - $fexp=new fiche($this->db); + $fexp=new Fiche($this->db); $fexp->id=$row['f_id_dest']; $qcode_dest=$fexp->strAttribut(ATTR_DEF_QUICKCODE); @@ -885,14 +885,14 @@ class Action } else { - $tiers=new fiche($this->db); + $tiers=new Fiche($this->db); if ( $tiers->get_by_qcode($this->qcode_dest) == -1 ) // Error we cannot retrieve this qcode return false; else $this->f_id_dest=$tiers->id; } - $contact=new fiche($this->db); + $contact=new Fiche($this->db); if ( $contact->get_by_qcode($this->ag_contact) == -1 ) $contact->id=0; diff --git a/include/class_admin.php b/include/class_admin.php index cf500b85e..d1930af76 100644 --- a/include/class_admin.php +++ b/include/class_admin.php @@ -35,7 +35,7 @@ require_once('user_common.php'); // Use the view vw_supplier // -class Admin extends fiche{ +class Admin extends Fiche{ var $name; /*!< $name name of the company */ var $street; /*!< $street Street */ @@ -47,8 +47,7 @@ class Admin extends fiche{ /* only a db connection is needed */ function Admin($p_cn,$p_id=0) { $this->fiche_def_ref=FICHE_TYPE_ADM_TAX; - fiche::fiche($p_cn,$p_id) ; - + parent::__construct($p_cn,$p_id) ; } diff --git a/include/class_contact.php b/include/class_contact.php index 0314837e7..eb544f455 100644 --- a/include/class_contact.php +++ b/include/class_contact.php @@ -29,14 +29,14 @@ require_once("user_common.php"); * \brief Class contact (customer, supplier...) */ -class contact extends fiche +class contact extends Fiche { var $company; /*!< $company company of the contact (ad_id=ATTR_DEF_COMPANY)*/ /*!\brief constructor */ function contact($p_cn,$p_id=0) { $this->fiche_def_ref=FICHE_TYPE_CONTACT; - fiche::fiche($p_cn,$p_id) ; + parent::__construct($p_cn,$p_id) ; $this->company=""; } /*! Summary @@ -107,7 +107,7 @@ $back_url=urlencode($_SERVER['REQUEST_URI']); return $r; echo JS_LEDGER; foreach ($step_contact as $contact ) { - $l_company=new fiche($this->cn); + $l_company=new Fiche($this->cn); $l_company->get_by_qcode($contact->strAttribut(ATTR_DEF_COMPANY),false); $l_company_name=$l_company->strAttribut(ATTR_DEF_NAME); if ( $l_company_name == '- ERROR -' ) $l_company_name=""; diff --git a/include/class_customer.php b/include/class_customer.php index 0d5c555da..ac6c5be55 100644 --- a/include/class_customer.php +++ b/include/class_customer.php @@ -34,7 +34,7 @@ require_once('user_common.php'); // Use the view vw_customer // -class Customer extends fiche{ +class Customer extends Fiche{ var $poste; /*!< $poste poste comptable */ var $name; /*!< $name name of the company */ @@ -47,7 +47,7 @@ class Customer extends fiche{ /* only a db connection is needed */ function Customer($p_cn,$p_id=0) { $this->fiche_def_ref=FICHE_TYPE_CLIENT; - fiche::fiche($p_cn,$p_id) ; + parent::__construct($p_cn,$p_id) ; } /*! \brief Get all info contains in the view diff --git a/include/class_document.php b/include/class_document.php index a8e34313e..997e88c15 100644 --- a/include/class_document.php +++ b/include/class_document.php @@ -515,7 +515,7 @@ class Document * which contains the quick_code */ case 'SOLDE': - $tiers=new fiche($this->db); + $tiers=new Fiche($this->db); $qcode=isset($_REQUEST['qcode_dest'])?$_REQUEST['qcode_dest']:$_REQUEST['e_client']; $tiers->get_by_qcode($qcode,false); $p=$tiers->strAttribut(ATTR_DEF_ACCOUNT); @@ -523,20 +523,20 @@ class Document $r=$poste->get_solde(' true' ); break; case 'CUST_NAME': - $tiers=new fiche($this->db); + $tiers=new Fiche($this->db); $qcode=isset($_REQUEST['qcode_dest'])?$_REQUEST['qcode_dest']:$_REQUEST['e_client']; $tiers->get_by_qcode($qcode,false); $r=$tiers->strAttribut(ATTR_DEF_NAME); break; case 'CUST_ADDR_1': - $tiers=new fiche($this->db); + $tiers=new Fiche($this->db); $qcode=isset($_REQUEST['qcode_dest'])?$_REQUEST['qcode_dest']:$_REQUEST['e_client']; $tiers->get_by_qcode($qcode,false); $r=$tiers->strAttribut(ATTR_DEF_ADRESS); break ; case 'CUST_CP': - $tiers=new fiche($this->db); + $tiers=new Fiche($this->db); $qcode=isset($_REQUEST['qcode_dest'])?$_REQUEST['qcode_dest']:$_REQUEST['e_client']; $tiers->get_by_qcode($qcode,false); @@ -544,7 +544,7 @@ class Document break; case 'CUST_CITY': - $tiers=new fiche($this->db); + $tiers=new Fiche($this->db); $qcode=isset($_REQUEST['qcode_dest'])?$_REQUEST['qcode_dest']:$_REQUEST['e_client']; $tiers->get_by_qcode($qcode,false); @@ -553,7 +553,7 @@ class Document break; case 'CUST_CO': - $tiers=new fiche($this->db); + $tiers=new Fiche($this->db); $qcode=isset($_REQUEST['qcode_dest'])?$_REQUEST['qcode_dest']:$_REQUEST['e_client']; $tiers->get_by_qcode($qcode,false); @@ -563,26 +563,26 @@ class Document // Marchandise in $_POST['e_march*'] // \see user_form_achat.php or user_form_ven.php case 'CUST_VAT': - $tiers=new fiche($this->db); + $tiers=new Fiche($this->db); $qcode=isset($_REQUEST['qcode_dest'])?$_REQUEST['qcode_dest']:$_REQUEST['e_client']; $tiers->get_by_qcode($qcode,false); $r=$tiers->strAttribut(ATTR_DEF_NUMTVA); break; case 'CUST_NUM': - $tiers=new fiche($this->db); + $tiers=new Fiche($this->db); $qcode=isset($_REQUEST['qcode_dest'])?$_REQUEST['qcode_dest']:$_REQUEST['e_client']; $tiers->get_by_qcode($qcode,false); $r=$tiers->strAttribut(ATTR_DEF_NUMBER_CUSTOMER); break; case 'CUST_BANQUE_NO': - $tiers=new fiche($this->db); + $tiers=new Fiche($this->db); $qcode=isset($_REQUEST['qcode_dest'])?$_REQUEST['qcode_dest']:$_REQUEST['e_client']; $tiers->get_by_qcode($qcode,false); $r=$tiers->strAttribut(ATTR_DEF_BQ_NO); break; case 'CUST_BANQUE_NAME': - $tiers=new fiche($this->db); + $tiers=new Fiche($this->db); $qcode=isset($_REQUEST['qcode_dest'])?$_REQUEST['qcode_dest']:$_REQUEST['e_client']; $tiers->get_by_qcode($qcode,false); $r=$tiers->strAttribut(ATTR_DEF_BQ_NAME); @@ -638,7 +638,7 @@ class Document // check that something is sold if ( ${'e_march'.$counter.'_price'} != 0 && ${'e_quant'.$counter} != 0 ) { - $f=new fiche($this->db); + $f=new Fiche($this->db); $f->get_by_qcode(${$id},false); $r=$f->strAttribut(ATTR_DEF_NAME); } else $r = ""; diff --git a/include/class_fiche.php b/include/class_fiche.php index 7e60eaf88..ff547bc98 100644 --- a/include/class_fiche.php +++ b/include/class_fiche.php @@ -132,7 +132,7 @@ class Fiche { $t->jnt_order=$row['jnt_order']; $this->attribut[$i]=$t; } - $e=new Fiche_def($this->cn,$this->fiche_def); + $e=new Fiche_Def($this->cn,$this->fiche_def); $e->GetAttribut(); if ( sizeof($this->attribut) != sizeof($e->attribut ) ) { @@ -255,11 +255,11 @@ class Fiche { $Ret=$this->cn->exec_sql($sql); if ( ($Max=Database::num_row($Ret)) == 0 ) return ; - $all[0]=new fiche($this->cn); + $all[0]=new Fiche($this->cn); for ($i=0;$i<$Max;$i++) { $row=Database::fetch_array($Ret,$i); - $t=new fiche($this->cn,$row['f_id']); + $t=new Fiche($this->cn,$row['f_id']); $t->getAttribut(); $all[$i]=$t; @@ -360,7 +360,7 @@ Array function blank($p_fiche_def) { // array = array of attribute object sorted on ad_id - $f=new fiche_def($this->cn,$p_fiche_def); + $f=new Fiche_Def($this->cn,$p_fiche_def); $f->Get(); $array=$f->getAttribut(); $r=''; @@ -814,7 +814,7 @@ av_text1=>'name' // if the card has its own account in PCMN // Get the fiche_def.fd_id from fiche.f_id $this->Get(); - $fiche_def=new fiche_def($this->cn,$this->fiche_def); + $fiche_def=new Fiche_Def($this->cn,$this->fiche_def); $fiche_def->Get(); // if the card is used do not removed it @@ -1398,7 +1398,7 @@ static function get_fiche_def($p_cn,$pFd_id,$p_order='') { $array=$p_cn->get_array($sql,array($pFd_id)); if ( empty ($array) ) return null; foreach ($array as $ret ) { - $r[]=new fiche($p_cn,$ret['f_id']); + $r[]=new Fiche($p_cn,$ret['f_id']); } return $r; } diff --git a/include/class_fiche_def.php b/include/class_fiche_def.php index 4472cb1ab..2fdceba89 100644 --- a/include/class_fiche_def.php +++ b/include/class_fiche_def.php @@ -46,7 +46,7 @@ class Fiche_Def { $this->cn=$p_cn; $this->id=$p_id; } -/*!\brief show the content of the form to create a new fiche_def_ref +/*!\brief show the content of the form to create a new Fiche_Def_Ref */ function input () { @@ -122,7 +122,7 @@ function input () for ( $i = 0; $i < $Max;$i++) { $row=Database::fetch_array($Ret,$i); - $this->all[$i]=new fiche_def($this->cn,$row['fd_id']); + $this->all[$i]=new Fiche_Def($this->cn,$row['fd_id']); $this->all[$i]->label=$row['fd_label']; $this->all[$i]->class_base=$row['fd_class_base']; $this->all[$i]->fiche_def=$row['frd_id']; @@ -184,7 +184,7 @@ function input () alert (_('Vous devez choisir une categorie')); return; } - $fiche_Def_ref=new fiche_def_ref($this->cn,$p_FICHE_REF); + $fiche_Def_ref=new Fiche_Def_Ref($this->cn,$p_FICHE_REF); $fiche_Def_ref->Get(); // build the sql request for fiche_def // and insert into fiche_def @@ -287,11 +287,11 @@ function input () $Ret=$this->cn->exec_sql($sql); if ( ($Max=Database::num_row($Ret)) == 0 ) return ; - $all[0]=new fiche($this->cn); + $all[0]=new Fiche($this->cn); for ($i=0;$i<$Max;$i++) { $row=Database::fetch_array($Ret,$i); - $t=new fiche($this->cn,$row['f_id']); + $t=new Fiche($this->cn,$row['f_id']); $t->getAttribut(); $all[$i]=$t; @@ -311,11 +311,11 @@ function input () $Ret=$this->cn->exec_sql($sql,array($p_cat)); if ( ($Max=Database::num_row($Ret)) == 0 ) return null; - $all[0]=new fiche($this->cn); + $all[0]=new Fiche($this->cn); for ($i=0;$i<$Max;$i++) { $row=Database::fetch_array($Ret,$i); - $t=new fiche($this->cn,$row['f_id']); + $t=new Fiche($this->cn,$row['f_id']); $t->getAttribut(); $all[$i]=$t; diff --git a/include/class_fiche_def_ref.php b/include/class_fiche_def_ref.php index 57a7349b8..53cba740c 100644 --- a/include/class_fiche_def_ref.php +++ b/include/class_fiche_def_ref.php @@ -58,7 +58,7 @@ class Fiche_Def_Ref $array=array(); foreach ($all as $row) { - $o=new fiche_def_ref($this->db); + $o=new Fiche_Def_Ref($this->db); foreach ( $this->attribut as $value) { diff --git a/include/class_supplier.php b/include/class_supplier.php index 4937375e9..fb8b55fe6 100644 --- a/include/class_supplier.php +++ b/include/class_supplier.php @@ -34,7 +34,7 @@ require_once('user_common.php'); // Use the view vw_supplier // -class Supplier extends fiche{ +class Supplier extends Fiche{ var $poste; /*!< $poste poste comptable */ var $name; /*!< $name name of the company */ @@ -47,7 +47,7 @@ class Supplier extends fiche{ /* only a db connection is needed */ function Supplier($p_cn,$p_id=0) { $this->fiche_def_ref=FICHE_TYPE_FOURNISSEUR; - fiche::fiche($p_cn,$p_id) ; + parent::__construct($p_cn,$p_id) ; } /*! \brief Get all info contains in the view diff --git a/include/client_card.inc.php b/include/client_card.inc.php index d48f240ba..f57d0fd44 100644 --- a/include/client_card.inc.php +++ b/include/client_card.inc.php @@ -59,7 +59,7 @@ default: $def=1; $ss_action='dc'; } -$f=new fiche($cn,$_REQUEST['f_id']); +$f=new Fiche($cn,$_REQUEST['f_id']); echo '
'; echo ShowItem(array( array($root."&sc=dc",_('Fiche'),_('Détail de la fiche'),1), @@ -104,7 +104,7 @@ if ( $ss_action == 'op') { if ( $ss_action == 'cn') { echo '
'; echo dossier::hidden(); - $f=new fiche($cn,$_REQUEST['f_id']); + $f=new Fiche($cn,$_REQUEST['f_id']); $contact=new Contact($cn); $contact->company=$f->get_quick_code(); echo $contact->summary(); diff --git a/include/compta_fin.inc.php b/include/compta_fin.inc.php index 9023cef33..de3949799 100644 --- a/include/compta_fin.inc.php +++ b/include/compta_fin.inc.php @@ -231,7 +231,7 @@ if ( $def == 2) { if ( $def==3) { require_once ('class_acc_parm_code.php'); echo '
'; - $fiche=new fiche_def($cn); + $fiche=new Fiche_Def($cn); $array=$fiche->get_by_category(FICHE_TYPE_FIN); echo '
'; diff --git a/include/deprecated_jrn.php b/include/deprecated_jrn.php index 3ffc1b977..f56bfa0c1 100644 --- a/include/deprecated_jrn.php +++ b/include/deprecated_jrn.php @@ -329,7 +329,7 @@ function deprecated_ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) { $r.='
'; $r.=''; - $client=new fiche($p_cn,$content['qp_supplier']); + $client=new Fiche($p_cn,$content['qp_supplier']); $r.="Client : ".$client->getName(); /* now we get the different lines for this operation thanks */ @@ -364,7 +364,7 @@ function deprecated_ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) $i_march=0; foreach ($array as $row) { - $fiche=new fiche($p_cn,$row->qp_fiche); + $fiche=new Fiche($p_cn,$row->qp_fiche); // compute sum $tot_tva+=$row->qp_vat; $tot_nd+=$row->qp_nd_amount; @@ -450,7 +450,7 @@ function deprecated_ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) // for selling ledger if ( $content['jrn_def_type'] == 'VEN' ) { - $client=new fiche($p_cn,$content['qs_client']); + $client=new Fiche($p_cn,$content['qs_client']); $r.="Client : ".$client->getName(); /* now we get the different lines for this operation thanks */ @@ -478,7 +478,7 @@ function deprecated_ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) $i=0; $i_march=0; foreach ($array as $row) { - $fiche=new fiche($p_cn,$row->qs_fiche); + $fiche=new Fiche($p_cn,$row->qs_fiche); $tot_tva+=$row->qs_vat; $tot_amount+=$row->qs_price; $r.=($i%2==0)?"":''; $i++; @@ -668,7 +668,7 @@ function deprecated_get_dataJrnJrId ($p_cn,$p_jr_id) { // if ( strlen( $line['j_qcode']) != 0 ) { - $fiche=new fiche($p_cn); + $fiche=new Fiche($p_cn); $fiche->get_by_qcode($line['j_qcode']); $array['vw_name']=$fiche->getName(); @@ -752,7 +752,7 @@ function deprecated_get_dataJrnJrIdUser ($p_cn,$p_jr_id) { // if ( strlen( $line['j_qcode']) != 0 ) { - $fiche=new fiche($p_cn); + $fiche=new Fiche($p_cn); $fiche->get_by_qcode($line['j_qcode']); $array['vw_name']=$fiche->getName(); diff --git a/include/fiche.inc.php b/include/fiche.inc.php index a54011af7..95574a100 100644 --- a/include/fiche.inc.php +++ b/include/fiche.inc.php @@ -132,7 +132,7 @@ if ( isset($_POST['add_modele']) ) { $User->can_request(FICCAT); // insert the model of card in database - $fiche_def=new fiche_def($cn); + $fiche_def=new Fiche_Def($cn); $fiche_def->Add($_POST); } $r=""; @@ -140,7 +140,7 @@ $r=""; if ( isset ($_POST['remove_cat'] ) ) { $User->can_request(FICCAT); - $fd_id=new fiche_def($cn,$_POST['fd_id']); + $fd_id=new Fiche_Def($cn,$_POST['fd_id']); $remains=$fd_id->remove(); if ( $remains != 0 ) /* some card are not removed because it is used */ @@ -156,7 +156,7 @@ if ( isset ($_POST["add_line"]) ) { $r.= "

Pas d'accès

"; else { - $fiche_def=new fiche_def($cn,$_REQUEST['fd_id']); + $fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']); // Insert Line $fiche_def->InsertAttribut($_REQUEST['ad_id']); @@ -172,14 +172,14 @@ if ( isset ($_POST["add_line"]) ) { if ( isset($_POST['save_line'])) { $User->can_request(FICCAT); - $fiche_def=new fiche_def($cn,$_REQUEST['fd_id']); + $fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']); $fiche_def->save_order($_POST); $r= '
'; if ( $write ==0) $r.= "

Pas d'accès

"; else { - $fiche_def=new fiche_def($cn,$_REQUEST['fd_id']); + $fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']); // Insert Line $r.=ShowFicheDefInput($fiche_def); @@ -197,7 +197,7 @@ if ( isset ($_POST['remove_line']) ) $r.= "

Pas d'accès

"; else { - $fiche_def=new fiche_def($cn,$_REQUEST['fd_id']); + $fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']); // Insert Line // demander confirmation @@ -216,7 +216,7 @@ if ( isset ($_POST["change_name"] ) ) { $r.= "

"._("Pas d'accès")."

"; else { - $fiche_def=new fiche_def($cn,$_REQUEST['fd_id']); + $fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']); $r.=ShowFicheDefInput($fiche_def); } $r.= '
'; @@ -242,7 +242,7 @@ if ( isset ( $_GET["action"]) ) { $User->can_request(FICADD); echo '
'; - $fiche_def=new fiche_def($cn,$_GET['fiche']); + $fiche_def=new Fiche_Def($cn,$_GET['fiche']); $fiche_def->myList(); echo '
'; @@ -260,9 +260,9 @@ if ( isset ( $_GET["action"]) ) { $t=true; } $str="&".dossier::get(); - $fiche=new fiche($cn,$_GET["fiche_id"]); + $fiche=new Fiche($cn,$_GET["fiche_id"]); $fiche->get_categorie(); - $fiche_def=new fiche_def($cn,$fiche->fd_id); + $fiche_def=new Fiche_Def($cn,$fiche->fd_id); $fiche_def->Get(); echo '

'.$fiche_def->label.'

'; @@ -307,7 +307,7 @@ if ( isset ( $_GET["action"]) ) { $User->can_request(FICCAT); echo '
'; echo ''; - $oFiche_Def=new fiche_def($cn); + $oFiche_Def=new Fiche_Def($cn); echo HtmlInput::hidden("p_action","fiche"); echo dossier::hidden(); echo $oFiche_Def->input(); // CreateCategory($cn,$search); @@ -322,7 +322,7 @@ if ( isset ( $_GET["action"]) ) { if ($action == "modifier" ) { $User->can_request(FICCAT); echo '
'; - $fiche_def=new fiche_def($cn,$_GET['fiche']); + $fiche_def=new Fiche_Def($cn,$_GET['fiche']); echo ShowFicheDefInput($fiche_def); echo '
'; @@ -345,7 +345,7 @@ if ( isset ( $_GET["action"]) ) { echo '
'; echo "Résultat : ".sizeof($all).'éléments trouvés
'; foreach ($all as $f_id){ - $fiche=new fiche($cn,$f_id['f_id']); + $fiche=new Fiche($cn,$f_id['f_id']); echo ''. $fiche->getName().'
'; @@ -372,11 +372,11 @@ if ( isset ($_POST["fiche"]) && isset ($_POST["add"] ) ) { echo "

Pas d'accès

"; else { - $fiche_def=new fiche_def($cn,$_POST['fiche']); + $fiche_def=new Fiche_Def($cn,$_POST['fiche']); $fiche_def->Get(); echo '

'.$fiche_def->label.'

'; $url=$_SERVER['REQUEST_URI']; - $fiche=new fiche($cn,0); + $fiche=new Fiche($cn,0); echo ''; echo dossier::hidden(); @@ -401,10 +401,10 @@ if (isset($_POST['delete']) ) { echo "

Pas d'accès

"; else { - $fiche=new fiche($cn,$_POST["f_id"]); + $fiche=new Fiche($cn,$_POST["f_id"]); $fiche->remove(); } - $fiche_def=new fiche_def($cn,$_GET['fiche']); + $fiche_def=new Fiche_Def($cn,$_GET['fiche']); $fiche_def->myList(); echo "
"; @@ -422,9 +422,9 @@ if ( isset ($_POST["add_fiche"]) ) { { ShowRecherche(); echo '
'; - $fiche=new fiche($cn); + $fiche=new Fiche($cn); $fiche->Save($_REQUEST['fiche']); - $fiche_def=new fiche_def($cn,$_GET['fiche']); + $fiche_def=new Fiche_Def($cn,$_GET['fiche']); $fiche_def->myList(); @@ -441,11 +441,11 @@ if ( isset ($_POST["update_fiche"]) ) { echo "

Pas d'accès

"; else { - $fiche=new fiche($cn,$_POST['f_id']); + $fiche=new Fiche($cn,$_POST['f_id']); $fiche->Save(); } - $fiche_def=new fiche_def($cn,$_GET['fiche']); + $fiche_def=new Fiche_Def($cn,$_GET['fiche']); $fiche_def->myList(); @@ -461,7 +461,7 @@ if ( isset($_POST['move'])){ echo '
'; $fiche=new Fiche($cn,$_POST['f_id']); $fiche->move_to($_POST['move_to']); - $fiche_def=new fiche_def($cn,$_GET['fiche']); + $fiche_def=new Fiche_Def($cn,$_GET['fiche']); $fiche_def->myList(); echo '
'; } diff --git a/include/fiche_def.inc.php b/include/fiche_def.inc.php index 153f30cbe..64cc187dc 100644 --- a/include/fiche_def.inc.php +++ b/include/fiche_def.inc.php @@ -28,14 +28,14 @@ echo '
'; // record change if ( isset ($_POST['confirm_mod'])) { extract ($_POST); - $update=new fiche_def_ref($cn); + $update=new Fiche_Def_Ref($cn); $update->frd_id=FormatString($frd_id); $update->frd_text=FormatString($frd_text); $update->frd_class_base=FormatString($frd_class_base); $update->Save(); } // Load All Fiche_def -$fiche_def=new fiche_def_ref($cn); +$fiche_def=new Fiche_Def_Ref($cn); $all=$fiche_def->LoadAll(); // Display Them @@ -68,7 +68,7 @@ if ( isset ($_POST['mod']) ) echo _("sinon le programme fonctionnera mal, ". "utiliser uniquement des chiffres pour la classe de base ou rien").""; - $mod=new fiche_def_ref($cn); + $mod=new Fiche_Def_Ref($cn); $mod->frd_id=$idx; $mod->Get(); echo ''; diff --git a/include/import_inc.php b/include/import_inc.php index 232b643aa..2498062d5 100644 --- a/include/import_inc.php +++ b/include/import_inc.php @@ -130,7 +130,7 @@ function ShowBox($p_val,$counter,$p_cn,$p_form='form'){ { $w->value=$p_val['poste_comptable']; $cn=new Database(dossier::id()); - $f=new fiche($p_cn); + $f=new Fiche($p_cn); $f->get_by_qcode($p_val['poste_comptable']); $s->value=$f->strAttribut(ATTR_DEF_NAME); } @@ -297,7 +297,7 @@ function TransferCSV($p_cn, $periode){ $jr_rapt=$val['jr_rapt']; // Retrieve the account thx the quick code - $f=new fiche($p_cn); + $f=new Fiche($p_cn); $quick_code=$poste_comptable; $f->get_by_qcode($poste_comptable,false); $poste_comptable=$f->strAttribut(ATTR_DEF_ACCOUNT); diff --git a/include/impress_poste.inc.php b/include/impress_poste.inc.php index 06f247bc8..916f8be1d 100644 --- a/include/impress_poste.inc.php +++ b/include/impress_poste.inc.php @@ -150,7 +150,7 @@ if ( isset( $_REQUEST['bt_html'] ) ) { { require_once("class_fiche.php"); // thanks the qcode we found the poste account - $fiche=new fiche($cn); + $fiche=new Fiche($cn); $qcode=$fiche->get_by_qcode($_GET['f_id']); $p=$fiche->strAttribut(ATTR_DEF_ACCOUNT); if ( $p != "- ERROR -") { diff --git a/include/jrn_deprecated.php b/include/jrn_deprecated.php index 3ffc1b977..f56bfa0c1 100644 --- a/include/jrn_deprecated.php +++ b/include/jrn_deprecated.php @@ -329,7 +329,7 @@ function deprecated_ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) { $r.='
'; $r.=''; - $client=new fiche($p_cn,$content['qp_supplier']); + $client=new Fiche($p_cn,$content['qp_supplier']); $r.="Client : ".$client->getName(); /* now we get the different lines for this operation thanks */ @@ -364,7 +364,7 @@ function deprecated_ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) $i_march=0; foreach ($array as $row) { - $fiche=new fiche($p_cn,$row->qp_fiche); + $fiche=new Fiche($p_cn,$row->qp_fiche); // compute sum $tot_tva+=$row->qp_vat; $tot_nd+=$row->qp_nd_amount; @@ -450,7 +450,7 @@ function deprecated_ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) // for selling ledger if ( $content['jrn_def_type'] == 'VEN' ) { - $client=new fiche($p_cn,$content['qs_client']); + $client=new Fiche($p_cn,$content['qs_client']); $r.="Client : ".$client->getName(); /* now we get the different lines for this operation thanks */ @@ -478,7 +478,7 @@ function deprecated_ShowOperationUser($p_cn,$p_jr_id,$p_mode=1) $i=0; $i_march=0; foreach ($array as $row) { - $fiche=new fiche($p_cn,$row->qs_fiche); + $fiche=new Fiche($p_cn,$row->qs_fiche); $tot_tva+=$row->qs_vat; $tot_amount+=$row->qs_price; $r.=($i%2==0)?"":''; $i++; @@ -668,7 +668,7 @@ function deprecated_get_dataJrnJrId ($p_cn,$p_jr_id) { // if ( strlen( $line['j_qcode']) != 0 ) { - $fiche=new fiche($p_cn); + $fiche=new Fiche($p_cn); $fiche->get_by_qcode($line['j_qcode']); $array['vw_name']=$fiche->getName(); @@ -752,7 +752,7 @@ function deprecated_get_dataJrnJrIdUser ($p_cn,$p_jr_id) { // if ( strlen( $line['j_qcode']) != 0 ) { - $fiche=new fiche($p_cn); + $fiche=new Fiche($p_cn); $fiche->get_by_qcode($line['j_qcode']); $array['vw_name']=$fiche->getName(); diff --git a/include/operation_adm.inc.php b/include/operation_adm.inc.php index 92e01a432..e41fa5fa3 100644 --- a/include/operation_adm.inc.php +++ b/include/operation_adm.inc.php @@ -30,7 +30,7 @@ * - $ss_action */ require_once('class_acc_ledger.php'); -$f=new fiche($cn,$_REQUEST['f_id']); +$f=new Fiche($cn,$_REQUEST['f_id']); $qcode=$f->get_quick_code(); $_GET['qcode']=$qcode; $_REQUEST['qcode']=$qcode; diff --git a/include/operation_client.inc.php b/include/operation_client.inc.php index 92e01a432..e41fa5fa3 100644 --- a/include/operation_client.inc.php +++ b/include/operation_client.inc.php @@ -30,7 +30,7 @@ * - $ss_action */ require_once('class_acc_ledger.php'); -$f=new fiche($cn,$_REQUEST['f_id']); +$f=new Fiche($cn,$_REQUEST['f_id']); $qcode=$f->get_quick_code(); $_GET['qcode']=$qcode; $_REQUEST['qcode']=$qcode; diff --git a/include/operation_supplier.inc.php b/include/operation_supplier.inc.php index 92e01a432..e41fa5fa3 100644 --- a/include/operation_supplier.inc.php +++ b/include/operation_supplier.inc.php @@ -30,7 +30,7 @@ * - $ss_action */ require_once('class_acc_ledger.php'); -$f=new fiche($cn,$_REQUEST['f_id']); +$f=new Fiche($cn,$_REQUEST['f_id']); $qcode=$f->get_quick_code(); $_GET['qcode']=$qcode; $_REQUEST['qcode']=$qcode; diff --git a/include/supplier_card.inc.php b/include/supplier_card.inc.php index f80d82597..6282c67a0 100644 --- a/include/supplier_card.inc.php +++ b/include/supplier_card.inc.php @@ -59,7 +59,7 @@ default: $def=1; $ss_action='dc'; } -$f=new fiche($cn,$_REQUEST['f_id']); +$f=new Fiche($cn,$_REQUEST['f_id']); echo '
'; echo ShowItem(array( @@ -105,7 +105,7 @@ if ( $ss_action == 'op') { if ( $ss_action == 'cn') { echo '
'; echo dossier::hidden(); - $f=new fiche($cn,$_REQUEST['f_id']); + $f=new Fiche($cn,$_REQUEST['f_id']); $contact=new Contact($cn); $contact->company=$f->get_quick_code(); echo $contact->summary(""); diff --git a/include/user_common.php b/include/user_common.php index efc8ec5c2..6114ac654 100644 --- a/include/user_common.php +++ b/include/user_common.php @@ -53,7 +53,7 @@ function InsertStockGoods($p_cn,$p_j_id,$p_good,$p_quant,$p_type) { // Retrieve the good account for stock - $code=new fiche($p_cn); + $code=new Fiche($p_cn); $code->get_by_qcode($p_good); $code_marchandise=$code->strAttribut(ATTR_DEF_STOCK); $p_good=FormatString($p_good); diff --git a/release-note b/release-note index 83ff93edf..25799f46e 100644 --- a/release-note +++ b/release-note @@ -15,6 +15,7 @@ Conséquence : réécriture de code, correction modop, ... 13. Pour les balances, on peut choisir les journaux : adapté à ceux en ayant vraiment beaucoup 14. Depuis les lettrages, on peut aussi accèder aux détails d'une opération 15. TODO9 - dépend de TODO4 TODO2 - dans impressions, on peut avoir les détails de toutes les opérations +16. TODO19 Le menu Grand Livre devient recherche IDEE6, categorie de fiche, changer la présentation @@ -32,9 +33,9 @@ TODO13 Bouton validate CA ne fonctionne plus TODO14 confirmation quand effacement d'un PA (comptabilité analytique -> Plan Analytique) -REFLEXION1 Pièce attachée uniquement depuis détail opération ? +IDEE1 Pièce attachée uniquement depuis détail opération ? + -TODO19 Le menu Grand Livre devient recherche TODO20 Ajouter d'attribut avec type : text, nombre ou date; ajouter le javascript équivalent pour la saisie, le numéro de séquence commence à 10000, afin de ne pas mélanger les attributs que je créé avec ceux des utilisateurs. A ajouter dans la doc comme exemple pour la gestion d'abonnés dont on peut tirer un CSV par impression -> catégorie -> résume