Code improvement : change fiche function
getAttribut becomes load_attribute, strAttribut becomes set_attribute getAttribut becomes get_attribute
This commit is contained in:
parent
bec8b39afa
commit
6c3154abbd
45 changed files with 316 additions and 311 deletions
|
|
@ -82,9 +82,9 @@ if ( $_GET['histo'] == 4 || $_GET['histo'] == 5)
|
|||
if (bcsub($solde['credit'], $solde['debit']) > 0)
|
||||
$side = 'Cred.';
|
||||
|
||||
$export->add($oCard->strAttribut(ATTR_DEF_QUICKCODE));
|
||||
$export->add($oCard->strAttribut(ATTR_DEF_NAME));
|
||||
$export->add($oCard->strAttribut(ATTR_DEF_ACCOUNT));
|
||||
$export->add($oCard->get_attribute(ATTR_DEF_QUICKCODE));
|
||||
$export->add($oCard->get_attribute(ATTR_DEF_NAME));
|
||||
$export->add($oCard->get_attribute(ATTR_DEF_ACCOUNT));
|
||||
$export->add($solde['debit'],"number");
|
||||
$export->add($solde['credit'],"number");
|
||||
$export->add(abs($solde['solde']),"number");
|
||||
|
|
@ -114,7 +114,7 @@ else
|
|||
{
|
||||
$row = new Fiche($cn, $card['f_id']);
|
||||
$letter = new Lettering_Card($cn);
|
||||
$letter->set_parameter('quick_code', $row->strAttribut(ATTR_DEF_QUICKCODE));
|
||||
$letter->set_parameter('quick_code', $row->get_attribute(ATTR_DEF_QUICKCODE));
|
||||
$letter->set_parameter('start', $_GET['start']);
|
||||
$letter->set_parameter('end', $_GET['end']);
|
||||
// all
|
||||
|
|
@ -140,9 +140,9 @@ else
|
|||
/* skip if nothing to display */
|
||||
if (count($letter->content) == 0)
|
||||
continue;
|
||||
$export->add($row->strAttribut(ATTR_DEF_QUICKCODE));
|
||||
$export->add( $row->strAttribut(ATTR_DEF_NAME));
|
||||
$export->add($row->strAttribut(ATTR_DEF_ACCOUNT));
|
||||
$export->add($row->get_attribute(ATTR_DEF_QUICKCODE));
|
||||
$export->add( $row->get_attribute(ATTR_DEF_NAME));
|
||||
$export->add($row->get_attribute(ATTR_DEF_ACCOUNT));
|
||||
$export->write();
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -120,8 +120,8 @@ if ($histo == 4 || $histo==5)
|
|||
$sum_deb=bcadd($sum_deb,$solde['debit']);
|
||||
$sum_solde=bcsub($sum_deb,$sum_cred);
|
||||
|
||||
$pdf->write_cell(30,7,$oCard->strAttribut(ATTR_DEF_QUICKCODE),0,0,'L',$fill);
|
||||
$pdf->LongLine(80,7,$oCard->strAttribut(ATTR_DEF_NAME)." (".$oCard->strAttribut(ATTR_DEF_ACCOUNT).")",0,'L',$fill);
|
||||
$pdf->write_cell(30,7,$oCard->get_attribute(ATTR_DEF_QUICKCODE),0,0,'L',$fill);
|
||||
$pdf->LongLine(80,7,$oCard->get_attribute(ATTR_DEF_NAME)." (".$oCard->get_attribute(ATTR_DEF_ACCOUNT).")",0,'L',$fill);
|
||||
$pdf->write_cell(20,7,nbm($solde['debit']),0,0,'R',$fill);
|
||||
$pdf->write_cell(20,7,nbm($solde['credit']),0,0,'R',$fill);
|
||||
$pdf->write_cell(20,7,nbm(abs($solde['solde'])),0,0,'R',$fill);
|
||||
|
|
@ -181,7 +181,7 @@ else
|
|||
{
|
||||
$fic = new Fiche($cn, $row_fiche['f_id']);
|
||||
$letter = new Lettering_Card($cn);
|
||||
$letter->set_parameter('quick_code', $fic->strAttribut(ATTR_DEF_QUICKCODE));
|
||||
$letter->set_parameter('quick_code', $fic->get_attribute(ATTR_DEF_QUICKCODE));
|
||||
$letter->set_parameter('start',$http->request('start'));
|
||||
$letter->set_parameter('end',$http->request('end'));
|
||||
// all
|
||||
|
|
@ -209,7 +209,7 @@ else
|
|||
continue;
|
||||
$pdf->SetFont('DejaVuCond', '', 10);
|
||||
$fiche = new Fiche($cn, $row_fiche['f_id']);
|
||||
$pdf->write_cell(0, 7, $fiche->strAttribut(ATTR_DEF_NAME)." [".$fiche->strAttribut(ATTR_DEF_QUICKCODE).":".$fiche->strAttribut(ATTR_DEF_ACCOUNT)."]", 1, 'C');
|
||||
$pdf->write_cell(0, 7, $fiche->get_attribute(ATTR_DEF_NAME)." [".$fiche->get_attribute(ATTR_DEF_QUICKCODE).":".$fiche->get_attribute(ATTR_DEF_ACCOUNT)."]", 1, 'C');
|
||||
|
||||
$pdf->SetFont('DejaVuCond', '', 7);
|
||||
$pdf->line_new();
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ if ( isset ($_GET['fd_id']))
|
|||
$e=$fiche_def->get_by_type(inactive: $http->request('inactive'));
|
||||
$o=0;
|
||||
// Heading
|
||||
$fiche_def->GetAttribut();
|
||||
$fiche_def->load_attribute();
|
||||
$title=array();
|
||||
foreach ($fiche_def->attribut as $attribut)
|
||||
{
|
||||
|
|
@ -56,7 +56,7 @@ if ( isset ($_GET['fd_id']))
|
|||
{
|
||||
$detail=new Fiche($cn,$fiche['f_id']);
|
||||
|
||||
$detail->getAttribut();
|
||||
$detail->load_attribute();
|
||||
|
||||
foreach ( $detail->attribut as $dattribut )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ if ( count($array) == 0 )
|
|||
$size=array(13,25,20,60,12,20,20,20);
|
||||
$align=array('L','C','C','L','R','R','R','R');
|
||||
|
||||
$Libelle=sprintf("(%s) %s %s [ %s ]",$Fiche->id,$Fiche->getName(),$Fiche->strAttribut(ATTR_DEF_FIRST_NAME,0),$Fiche->get_quick_code());
|
||||
$Libelle=sprintf("(%s) %s %s [ %s ]",$Fiche->id,$Fiche->getName(),$Fiche->get_attribute(ATTR_DEF_FIRST_NAME,0),$Fiche->get_quick_code());
|
||||
$pdf->SetFont('DejaVu','',10);
|
||||
$pdf->write_cell(0,8,$Libelle,1,0,'C');
|
||||
$pdf->line_new();
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ if ($get_option=="L" && ($jrn_type=='ODS'||$jrn_type=='FIN'||$jrn_type=='GL') )
|
|||
{
|
||||
$tiers_id=$Jrn->get_tiers_id($line['jrn_def_type'], $line['jr_id']);
|
||||
$fiche_tiers=new Fiche($cn, $tiers_id);
|
||||
$tiers=$fiche_tiers->strAttribut(ATTR_DEF_NAME, 0)." ".$fiche_tiers->strAttribut(ATTR_DEF_FIRST_NAME,
|
||||
$tiers=$fiche_tiers->get_attribute(ATTR_DEF_NAME, 0)." ".$fiche_tiers->get_attribute(ATTR_DEF_FIRST_NAME,
|
||||
0);
|
||||
|
||||
$export->add($line['num']);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue