code cleaning GetName ==> get_name
This commit is contained in:
parent
9fdc2922d5
commit
169a9c2606
15 changed files with 22 additions and 45 deletions
|
|
@ -40,7 +40,7 @@ $User->Check();
|
|||
|
||||
|
||||
$Form=new rapport($cn,$_GET['form_id']);
|
||||
$Form->GetName();
|
||||
$Form->get_name();
|
||||
// Step ?
|
||||
//--
|
||||
if ( $_GET['p_step'] == 0 )
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ if ( $_GET['p_step'] == 0 )
|
|||
|
||||
}
|
||||
|
||||
$Libelle=sprintf("(%s) %s ",$Form->id,$Form->GetName());
|
||||
$Libelle=sprintf("(%s) %s ",$Form->id,$Form->get_name());
|
||||
|
||||
$pdf->ezText($Libelle,30);
|
||||
// without step
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ if ( $User->CheckAction($cn,IMP) == 0 ||
|
|||
|
||||
$Jrn=new Acc_Ledger($cn,$_GET['jrn_id']);
|
||||
|
||||
$Jrn->GetName();
|
||||
$Jrn->get_name();
|
||||
$jrn_type=$Jrn->get_type();
|
||||
// Detailled printing
|
||||
//---
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ if ($_GET['central'] == 'on' ) {
|
|||
}
|
||||
$Jrn=new Acc_Ledger($cn,$_GET['jrn_id']);
|
||||
|
||||
$Jrn->GetName();
|
||||
$Jrn->get_name();
|
||||
$User=new cl_user(DbConnect());
|
||||
$User->Check();
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ if ( count($a_poste) == 0 )
|
|||
foreach ($a_poste as $pos)
|
||||
{
|
||||
$Poste=new poste($cn,$pos['pcm_val']);
|
||||
$Poste->GetName();
|
||||
$Poste->get_name();
|
||||
list($array,$tot_deb,$tot_cred)=$Poste->GetRow( $_POST['from_periode'],
|
||||
$_POST['to_periode']
|
||||
);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ foreach ($a_poste as $poste)
|
|||
if ( count($array) == 0 ) {
|
||||
continue;
|
||||
}
|
||||
$Libelle=sprintf("(%s) %s ",$Poste->id,$Poste->GetName());
|
||||
$Libelle=sprintf("(%s) %s ",$Poste->id,$Poste->get_name());
|
||||
|
||||
// $pdf->ezText($Libelle,30);
|
||||
$pdf->ezTable($array,
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ include_once("postgres.php");
|
|||
include_once("class.ezpdf.php");
|
||||
include_once("impress_inc.php");
|
||||
include_once("preference.php");
|
||||
require_once('class_acc_ledger.php');
|
||||
|
||||
echo_debug('send_jrn_pdf.php',__LINE__,"imp pdf journaux");
|
||||
$l_Db=sprintf("dossier%d",$gDossier);
|
||||
$cn=DbConnect($gDossier);
|
||||
|
|
@ -43,12 +45,8 @@ if ( isset ($_POST['central']) ) {
|
|||
$centr=" centralisé ";
|
||||
$l_centr=1;
|
||||
}
|
||||
|
||||
if ( $_GET["filter"] == YES) {
|
||||
$name_jrn=GetJrnName($cn,$_GET["p_id"]).$centr;
|
||||
} else {
|
||||
$name_jrn="Grand livre ".$centr;
|
||||
}
|
||||
$oJrn=new Acc_Ledger($cn,$_GET['p_id']);
|
||||
$name=$oJrn->get_name().$centr;
|
||||
$ret="";
|
||||
$pdf=& new Cezpdf("A4");
|
||||
$pdf->selectFont('./addon/fonts/Helvetica.afm');
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ return $ret['jrn_def_type'];
|
|||
* \brief Return the name of a ledger
|
||||
*
|
||||
*/
|
||||
function GetName() {
|
||||
function get_name() {
|
||||
if ( $this->id==0 ) {
|
||||
$this->name=" Grand Livre ";
|
||||
return $this->name;
|
||||
|
|
@ -487,7 +487,7 @@ foreach ( $data_jrnx as $code ) {
|
|||
echo_debug('class_acc_ledger',__LINE__,$code['j_qcode'].'est F ou C');
|
||||
$p_array['TVAC']=$code['j_montant'];
|
||||
|
||||
$p_array['client']=($trunc==0)?$fiche->GetName():substr($fiche->GetName(),0,20);
|
||||
$p_array['client']=($trunc==0)?$fiche->get_name():substr($fiche->get_name(),0,20);
|
||||
$p_array['reversed']=false;
|
||||
if ( $fiche_def_id == FICHE_TYPE_CLIENT && $code['j_debit']=='f')
|
||||
{
|
||||
|
|
@ -510,7 +510,7 @@ foreach ( $data_jrnx as $code ) {
|
|||
echo_debug('class_acc_ledger',__LINE__,$code['j_qcode']."n 'est PAS F ou C");
|
||||
$p_array['TVAC']=$code['j_montant'];
|
||||
|
||||
$p_array['client']= ($trunc==0)?$fiche->GetName():substr($fiche->GetName(),0,20);
|
||||
$p_array['client']= ($trunc==0)?$fiche->get_name():substr($fiche->get_name(),0,20);
|
||||
$p_array['reversed']=false;
|
||||
if ($p_jrn_type == 'ACH' && $code['j_debit']=='t')
|
||||
{
|
||||
|
|
@ -813,7 +813,7 @@ function get_propertie()
|
|||
$oposte=new poste($this->db,${'poste'.$i});
|
||||
$strPoste=$oposte->id;
|
||||
$ret.="<td>".${"poste".$i}." - ".
|
||||
$oposte->GetName().$hidden->IOValue('poste'.$i,${'poste'.$i}).
|
||||
$oposte->get_name().$hidden->IOValue('poste'.$i,${'poste'.$i}).
|
||||
'</td>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class poste {
|
|||
* it doesn't change any data member
|
||||
* \return string with the pcm_lib
|
||||
*/
|
||||
function GetName() {
|
||||
function get_name() {
|
||||
$ret=pg_exec($this->db,
|
||||
"select pcm_lib from tmp_pcmn where
|
||||
pcm_val=".$this->id);
|
||||
|
|
@ -202,7 +202,7 @@ function GetSoldeDetail($p_cond="") {
|
|||
|
||||
function HtmlTable()
|
||||
{
|
||||
$this->GetName();
|
||||
$this->get_name();
|
||||
|
||||
list($array,$tot_deb,$tot_cred)=$this->GetRow( $_POST['from_periode'],
|
||||
$_POST['to_periode']
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class rapport {
|
|||
}
|
||||
/*!\brief Return the report's name
|
||||
*/
|
||||
function GetName() {
|
||||
function get_name() {
|
||||
$ret=execSql($this->db,"select fr_label from formdef where fr_id=".$this->id);
|
||||
if (pg_NumRows($ret) == 0) return $this->name;
|
||||
$a=pg_fetch_array($ret,0);
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ function UpdateCSV($p_cn){
|
|||
* modify the Quick Code or remove record poss.value are form, remove
|
||||
*/
|
||||
function ShowBox($p_val,$counter,$p_cn,$p_form='form'){
|
||||
|
||||
$w=new widget('js_search_only');
|
||||
$w->name='poste'.$counter;
|
||||
$w->extra='cred';
|
||||
|
|
@ -97,6 +96,7 @@ function ShowBox($p_val,$counter,$p_cn,$p_form='form'){
|
|||
if ( $p_form == 'remove' )
|
||||
$w->readonly=true;
|
||||
|
||||
$oJrn=new Acc_Ledger($p_cn,$p_val['jrn']);
|
||||
// widget concerned
|
||||
$wConcerned=new widget('js_concerned');
|
||||
$wConcerned->name="e_concerned"+$counter;
|
||||
|
|
@ -124,7 +124,7 @@ function ShowBox($p_val,$counter,$p_cn,$p_form='form'){
|
|||
echo '<input type="hidden" name="count" value="'.$counter.'">';
|
||||
echo '<table border="1" width="500">';
|
||||
echo '<tr><td width="200">'.$p_val['code'].'</td><td width="200">'.$p_val['date_exec'].'</td><td width="100">'.$p_val['montant'].' EUR</td><tr/>';
|
||||
echo "<tr><td> Journal : ".GetJrnName($p_cn,$p_val['jrn'])."</TD><TD>poste comptable Destination : ".$p_val['bq_account']."</td><tr>";
|
||||
echo "<tr><td> Journal : ".$oJrn->get_name()."</TD><TD>poste comptable Destination : ".$p_val['bq_account']."</td><tr>";
|
||||
echo '<tr colspan="3"><td height="50" colspan="3">'.$p_val['detail'].'</td></tr>';
|
||||
echo '<tr><td colspan="3"> '.$wConcerned->IOValue("e_concerned".$counter).'</td></tr>';
|
||||
echo '<tr><td>'.$w->IOValue().' '.$s->IOValue('poste'.$counter.'_label').
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ include("class_acc_ledger.php");
|
|||
$d=var_export($_POST,true);
|
||||
echo_debug('impress_jrn.php',__LINE__,$d);
|
||||
$Jrn=new Acc_Ledger($cn,$_POST['jrn_id']);
|
||||
$Jrn->GetName();
|
||||
$Jrn->get_name();
|
||||
if ( $_POST['p_simple']==0 )
|
||||
{
|
||||
$Jrn->GetRow( $_POST['from_periode'],
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ include_once("class_widget.php");
|
|||
if ( isset( $_GET['bt_html'] ) ) {
|
||||
include("class_rapport.php");
|
||||
$Form=new rapport($cn,$_GET['form_id']);
|
||||
$Form->GetName();
|
||||
$Form->get_name();
|
||||
// step asked ?
|
||||
//--
|
||||
if ($_GET['p_step'] == 0 ) {
|
||||
|
|
|
|||
|
|
@ -740,27 +740,6 @@ function GetInternal($p_cn,$p_id) {
|
|||
return $l_line['jr_internal'];
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Return the name of the jrn
|
||||
*
|
||||
* parm :
|
||||
* - p_cn connexion resource
|
||||
* - jrn id
|
||||
* gen :
|
||||
* - none
|
||||
* return:
|
||||
* - string or null if not found
|
||||
*
|
||||
*/
|
||||
function GetJrnName($p_cn,$p_id) {
|
||||
$Res=ExecSql($p_cn,"select jrn_def_name from ".
|
||||
" jrn_def where jrn_def_id=".
|
||||
$p_id);
|
||||
$Max=pg_NumRows($Res);
|
||||
if ($Max==0) return null;
|
||||
$ret=pg_fetch_array($Res,0);
|
||||
return $ret['jrn_def_name'];
|
||||
}
|
||||
/*!
|
||||
* \brief
|
||||
* Get the number of the next jrn
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ if ( $User->AccessJrn($cn,$id) == false ) {
|
|||
exit();
|
||||
}
|
||||
echo '<div class="u_content">';
|
||||
echo '<h2 class="info"> Journal : '.$ledger->GetName().'</h2>';
|
||||
echo '<h2 class="info"> Journal : '.$ledger->get_name().'</h2>';
|
||||
echo widget::button_href('Autre journal','?p_action='.$_REQUEST['p_action'].'&'.dossier::get());
|
||||
// User can write ?
|
||||
if ( CheckJrn(dossier::id(),$_SESSION['g_user'],$id) != 2 ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue