Revert "WIP : longline change"

PDF Change not working

This reverts commit c41efc26dc.
This commit is contained in:
sparkyx 2024-11-05 08:37:33 +01:00
parent 03da6c8cdb
commit 3a68c08960
12 changed files with 45 additions and 45 deletions

View file

@ -95,7 +95,7 @@ class PDF_Operation extends PDF {
$this->pdf->write_cell(100, 6, $this->acc_detail->det->jr_pj_number);
$this->pdf->line_new(4);
$this->pdf->write_cell(50, 6, _("Commentaire"));
$this->pdf->write_multi(130, 3 , $this->acc_detail->det->jr_comment);
$this->pdf->LongLine(130, 3 , $this->acc_detail->det->jr_comment);
$this->pdf->line_new(4);
$this->pdf->write_cell(50, 6, _("Nom document"));
$this->pdf->write_cell(100, 6, $this->acc_detail->det->jr_pj_name);
@ -192,7 +192,7 @@ class PDF_Operation extends PDF {
$fiche=new Fiche($this->cn,$fiche_id);
$this->pdf->write_cell($width[0],6,$i+1);
$this->pdf->write_cell($width[1],6,$fiche->get_quick_code());
$this->pdf->write_multi($width[2],3,$row['j_text']);
$this->pdf->LongLine($width[2],3,$row['j_text']);
$this->pdf->write_cell($width[3],6,nbm($row["qs_price"],2),"",0,"R");
$str=$this->str_vat($row["qs_vat_code"]);
$this->pdf->write_cell($width[4],6,$str);
@ -243,7 +243,7 @@ class PDF_Operation extends PDF {
$fiche=new Fiche($this->cn,$fiche_id);
$this->pdf->write_cell($width[0],6,$i+1);
$this->pdf->write_cell($width[1],6,$fiche->get_quick_code());
$this->pdf->write_multi($width[2],3,$row['j_text']);
$this->pdf->LongLine($width[2],3,$row['j_text']);
$this->pdf->write_cell($width[3],6,nbm($row["qp_price"],2),"",0,"R");
$str=$this->str_vat($row["qp_vat_code"]);
$this->pdf->write_cell($width[4],6,$str);

View file

@ -92,10 +92,10 @@ class Print_Ledger_Detail extends Print_Ledger
$this->SetFont('DejaVuCond','B',7);
$row=$array[$i];
$this->write_multi(20,3,$row['pj']);
$this->LongLine(20,3,$row['pj']);
$this->write_cell(15,7,$row['date_fmt']);
$this->write_cell(20,7,$row['internal']);
$this->write_multi(170,3,$row['comment']);
$this->LongLine(170,3,$row['comment']);
$this->write_cell(20,7,nbm($row['montant']),0,0,'R');
$this->line_new();

View file

@ -120,10 +120,10 @@ class Print_Ledger_Detail_Item extends Print_Ledger
{
// Print the general info line width=270mm
$this->write_multi(20, $high_lg, $row['jr_date'],1, 'L', true);
$this->LongLine(20, $high_lg, $row['jr_date'],1, 'L', true);
$this->write_cell(20, $high,$row['jr_pj_number'].".". $row['jr_internal'], 1, 0, 'L', true);
$this->write_multi(50, $high_lg, $row['quick_code']." ".$row['tiers_name'],1,'L',true);
$this->write_multi(80, $high_lg, $row['jr_comment'],1,'L',true);
$this->LongLine(50, $high_lg, $row['quick_code']." ".$row['tiers_name'],1,'L',true);
$this->LongLine(80, $high_lg, $row['jr_comment'],1,'L',true);
$this->write_cell(20, $high, nbm($row['htva']), 1, 0, 'R', true);
$this->write_cell(20, $high, nbm($row['tot_tva_np']), 1, 0, 'R', true);
$this->write_cell(20, $high, nbm($row['other_tax_amount']), 1, 0, 'R', true);
@ -153,9 +153,9 @@ class Print_Ledger_Detail_Item extends Print_Ledger
// Header detail
$this->write_multi(30,$high_lg,_('QuickCode'));
$this->LongLine(30,$high_lg,_('QuickCode'));
$this->write_cell(30,$high,_('Poste'));
$this->write_multi(70,$high_lg,_('Libellé'));
$this->LongLine(70,$high_lg,_('Libellé'));
$this->write_cell(20,$high,_('Prix/Unit'),0,0,'R');
$this->write_cell(20,$high,_('Quant.'),0,0,'R');
$this->write_cell(20,$high,_('HTVA'),0,0,'R');
@ -168,10 +168,10 @@ class Print_Ledger_Detail_Item extends Print_Ledger
}
}
// Print detail sale / purchase
$this->write_multi(30,$high_lg,$row['j_qcode']);
$this->LongLine(30,$high_lg,$row['j_qcode']);
$this->write_cell(30,$high,$row['j_poste']);
$comment=($row['j_text']=="")?$row['item_name']:$row['j_text'];
$this->write_multi(70,$high_lg,$comment);
$this->LongLine(70,$high_lg,$comment);
$this->write_cell(20,$high,nbm($row['price_per_unit']),0,0,'R');
$this->write_cell(20,$high,nbm($row['quantity']),0,0,'R');
$this->write_cell(20,$high,nbm($row['price']),0,0,'R');

View file

@ -117,7 +117,7 @@ class Print_Ledger_Financial extends Print_Ledger
$name=$ledger->get_tiers($this->jrn_type,$row['id']);
$this->write_cell(40,5,$name,0,0,'L');
$this->write_multi(60,3,$row['comment'],0,'L');
$this->LongLine(60,3,$row['comment'],0,'L');
$amount=$this->cn->get_value('select qf_amount from quant_fin where jr_id=$1',array( $row['id']));
$ret_amount_cur=$this->cn->execute("amount_cur",array($row['id']));

View file

@ -83,13 +83,13 @@ class Print_Ledger_Misc extends Print_Ledger
$row=$a_jrn[$i];
$this->write_cell(10,5, smaller_date($row['date']));
$this->write_multi(30,3,$row['jr_pj_number']);
$this->LongLine(30,3,$row['jr_pj_number']);
$this->write_cell(20,5,$row['jr_internal']);
$type=$this->cn->get_value("select jrn_def_type from jrn_def where jrn_def_id=$1",array($a_jrn[$i]['jr_def_id']));
$other=mb_substr($ledger->get_tiers($type,$a_jrn[$i]['jr_id']),0,25);
$this->write_multi(25,3,$other,0,'L');
$this->LongLine(25,3,$other,0,'L');
$positive=$row['montant'];
$this->write_multi(60,3,$row['comment'],0,'L');
$this->LongLine(60,3,$row['comment'],0,'L');
if ( $type == 'FIN' ) {
$positive = $this->cn->get_value("select qf_amount from quant_fin ".
" where jr_id=".$row['jr_id']);

View file

@ -295,14 +295,14 @@ class Print_Ledger_Simple extends \Print_Ledger
}
$row=$a_jrn[$i];
$ret_reconcile=$ledger->db->execute('reconcile_date',array($row['jr_id']));
$this->write_multi(15,3,($row['jr_pj_number']),0);
$this->LongLine(15,3,($row['jr_pj_number']),0);
$this->write_cell(10,5,$row['str_date_short'],0,0);
$this->write_cell(13,5,$row['jr_internal'],0,0);
list($qc,$name)=$this->get_tiers($row['jr_id'],$this->jrn_type);
$this->write_multi(40,3,"[".$qc."]".$name,0,'L');
$this->LongLine(40,3,"[".$qc."]".$name,0,'L');
if ( !$flag_tva ) {
$this->write_multi(65,3,mb_substr($row['jr_comment'],0,150),0,'L');
$this->LongLine(65,3,mb_substr($row['jr_comment'],0,150),0,'L');
}
/* get other amount (without vat, total vat included, private, ND */

View file

@ -166,14 +166,14 @@ class Print_Ledger_Simple_Without_Vat extends Print_Ledger
{
$row=$a_jrn[$i];
$this->write_multi(15,3,($row['jr_pj_number']),0);
$this->LongLine(15,3,($row['jr_pj_number']),0);
$this->write_cell(15,5,$row['str_date_short'],0,0);
$this->write_cell(20,5,$row['jr_internal'],0,0);
list($qc,$name)=$this->get_tiers($row['jr_id'],$this->jrn_type);
$this->write_cell(20,5,$qc,0,0);
$this->write_multi(40,3,$name,0,'L');
$this->LongLine(40,3,$name,0,'L');
$this->write_multi(105,3,$row['jr_comment'],0,'L');
$this->LongLine(105,3,$row['jr_comment'],0,'L');
/* get other amount (without vat, total vat included, private, ND */
$other=$ledger->get_other_amount($a_jrn[$i]['jr_grpt_id']);

View file

@ -118,7 +118,7 @@ $pdf->SetAuthor('NOALYSS');
$pdf->SetFont('DejaVuCond', '', 7);
$pdf->setTitle(_("Balance comptable"), true);
$pdf->write_cell(30, 6, _('poste'));
$pdf->write_multi(60, 3, _('Libellé'));
$pdf->LongLine(60, 3, _('Libellé'));
if ($previous == 1) {
$pdf->write_cell(20, 6, 'Débit N-1', 0, 0, 'R');
$pdf->write_cell(20, 6, 'Crédit N-1', 0, 0, 'R');
@ -171,7 +171,7 @@ if (!empty($array)) {
if (${'lvl' . $ind . '_old'} != substr($r['poste'], 0, $ind)) {
$pdf->SetFont('DejaVu', 'B', 7);
$strTotal=sprintf(_("Totaux %s "),${'lvl' . $ind . '_old'});
$pdf->write_multi(30, 3, $strTotal,"TB");
$pdf->LongLine(30, 3, $strTotal,"TB");
$delta = bcsub(${'nlvl' . $ind}['solde_cred'], ${'nlvl' . $ind}['solde_deb']);
$side = ($delta < 0) ? "D" : "C";
if ($previous == 1) {
@ -223,8 +223,8 @@ if (!empty($array)) {
$label.=" ".mb_chr(0x26a0);
}
$pdf->write_multi(30, 3, $label, 0, 'L', $fill);
$pdf->write_multi(60, 3, $value['label'], 0, 'L', $fill);
$pdf->LongLine(30, 3, $label, 0, 'L', $fill);
$pdf->LongLine(60, 3, $value['label'], 0, 'L', $fill);
$summary_tab = $bal->summary_add($summary_tab, $value['poste'],
$value['sum_deb'],
$value['sum_cred']);

View file

@ -88,8 +88,8 @@ if ($histo == 4 || $histo==5)
$pdf->write_cell(0,8,$name,0,1,'C');
$pdf->line_new();
$pdf->SetFont('DejaVuCond','',7);
$pdf->write_multi(30,3,'Quick Code',0,'L',0);
$pdf->write_multi(80,3,'Libellé',0,'L',0);
$pdf->LongLine(30,3,'Quick Code',0,'L',0);
$pdf->LongLine(80,3,'Libellé',0,'L',0);
$pdf->write_cell(20,7,'Débit',0,0,'R',0);
$pdf->write_cell(20,7,'Crédit',0,0,'R',0);
$pdf->write_cell(20,7,'Solde',0,0,'R',0);
@ -121,7 +121,7 @@ if ($histo == 4 || $histo==5)
$sum_solde=bcsub($sum_deb,$sum_cred);
$pdf->write_cell(30,7,$oCard->strAttribut(ATTR_DEF_QUICKCODE),0,0,'L',$fill);
$pdf->write_multi(80,3,$oCard->strAttribut(ATTR_DEF_NAME)." (".$oCard->strAttribut(ATTR_DEF_ACCOUNT).")",0,'L',$fill);
$pdf->LongLine(80,3,$oCard->strAttribut(ATTR_DEF_NAME)." (".$oCard->strAttribut(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);
@ -233,10 +233,10 @@ else
$row = $letter->content[$i];
$str_date = shrink_date($row['j_date_fmt']);
$pdf->write_multi($tab[0], 3, $str_date, 0, $align[0], $fill);
$pdf->LongLine($tab[0], 3, $str_date, 0, $align[0], $fill);
$pdf->write_cell($tab[1], 4, $row['jr_pj_number'], 0, 0, $align[1], $fill);
$pdf->write_multi($tab[2], 3, $row['jr_internal'], 0, $align[1], $fill);
$pdf->write_multi($tab[3], 3, $row['jr_comment'], 0, $align[2], $fill);
$pdf->LongLine($tab[2], 3, $row['jr_internal'], 0, $align[1], $fill);
$pdf->LongLine($tab[3], 3, $row['jr_comment'], 0, $align[2], $fill);
if ($row['j_debit'] == 't')
{
$prog=bcadd($prog,$row['j_montant']);

View file

@ -113,9 +113,9 @@ for ($e=0;$e<count($array);$e++)
$str_diff_solde=sprintf("%12.2f ",$diff_solde);
$pdf->SetFont('DejaVu','B',8);
$pdf->write_multi(15,6,_('totaux'),0,'L');
$pdf->LongLine(15,6,_('totaux'),0,'L');
$pdf->write_cell(15,6,$current_exercice,0,0,'L');
$pdf->write_multi(40,6,$solde,0,'L');
$pdf->LongLine(40,6,$solde,0,'L');
$pdf->write_cell(40,6,$str_debit,0,0,'R');
$pdf->write_cell(40,6,$str_credit,0,0,'R');
$pdf->write_cell(40,6,$str_diff_solde,0,0,'R');
@ -146,17 +146,17 @@ for ($e=0;$e<count($array);$e++)
$tiers=$operation->find_tiers($row['jr_id'], $row['j_id'], $row['j_qcode']);
$description=($tiers=="")?$row["description"]:"[".$tiers."]".$row['description'];
$pdf->write_multi($size[$l],6,($description.'('.$row['jr_internal'].")"),0,$align[$l]);
$pdf->LongLine($size[$l],6,($description.'('.$row['jr_internal'].")"),0,$align[$l]);
$l++;
$pdf->write_multi($size[$l],6,((!empty($row['letter']) && $row['letter']!=-1)?strtoupper(base_convert($row['letter'],10,36)):''),0,$align[$l]);
$pdf->LongLine($size[$l],6,((!empty($row['letter']) && $row['letter']!=-1)?strtoupper(base_convert($row['letter'],10,36)):''),0,$align[$l]);
$l++;
$pdf->write_multi($size[$l],6,(sprintf('% 12.2f',$row['deb_montant'])),0,$align[$l]);
$pdf->LongLine($size[$l],6,(sprintf('% 12.2f',$row['deb_montant'])),0,$align[$l]);
$l++;
$pdf->write_multi($size[$l],6,(sprintf('% 12.2f',$row['cred_montant'])),0,$align[$l]);
$pdf->LongLine($size[$l],6,(sprintf('% 12.2f',$row['cred_montant'])),0,$align[$l]);
$l++;
$pdf->write_multi($size[$l],6,(sprintf('% 12.2f',abs($progress))),0,$align[$l]);
$pdf->LongLine($size[$l],6,(sprintf('% 12.2f',abs($progress))),0,$align[$l]);
$l++;
$pdf->line_new();
$tot_deb=bcadd($tot_deb,$row['deb_montant']);

View file

@ -162,14 +162,14 @@ foreach ($a_accounting as $accounting_item)
$i = 0;
$side=" ".$acc_account_ledger->get_amount_side($solde);
$pdf->write_multi($width[$i], 3, shrink_date($detail['j_date_fmt']), 0, $lor[$i]);
$pdf->LongLine($width[$i], 3, shrink_date($detail['j_date_fmt']), 0, $lor[$i]);
$i++;
$pdf->write_multi($width[$i], 3, $detail['jr_internal'], 0, $lor[$i] );
$pdf->LongLine($width[$i], 3, $detail['jr_internal'], 0, $lor[$i] );
$i++;
/* limit set to 40 for the substring */
// $triple_point = (mb_strlen($detail['description']) > 40 ) ? '...':'';
// $pdf->write_multi($width[$i], 6, mb_substr($detail['description'],0,40).$triple_point, 0,$lor[$i]);
$pdf->write_multi($width[$i], 3,$detail['description'].'['.$detail['jr_optype'].']', 0,$lor[$i]);
// $pdf->LongLine($width[$i], 6, mb_substr($detail['description'],0,40).$triple_point, 0,$lor[$i]);
$pdf->LongLine($width[$i], 3,$detail['description'].'['.$detail['jr_optype'].']', 0,$lor[$i]);
$i++;
$pdf->write_cell($width[$i], 6, $detail['jr_pj_number'], 0, 0, $lor[$i]);
$i++;

View file

@ -89,7 +89,7 @@ foreach ($a_poste as $poste)
$l++;
$pdf->write_cell($size[$l],6,_('Journal'),0,0,'C');
$l++;
$pdf->write_multi($size[$l],3,_('Libellé'),0,'L');
$pdf->LongLine($size[$l],3,_('Libellé'),0,'L');
$l++;
$pdf->write_cell($size[$l],6,_('Let'),0,0,'R');
$l++;
@ -160,7 +160,7 @@ foreach ($a_poste as $poste)
$l++;
$tiers=$operation->find_tiers($row['jr_id'], $row['j_id'], $row['j_qcode']);
$description=($tiers=="")?$row["description"]:"[".$tiers."]".$row['description'];
$pdf->write_multi($size[$l],3, $description,0,$align[$l]);
$pdf->LongLine($size[$l],3, $description,0,$align[$l]);
$l++;
$pdf->write_cell($size[$l],6,(($row['letter']!=-1)?$row['letter']:''),0,0,$align[$l]);
$l++;