diff --git a/include/class/pdf_operation.class.php b/include/class/pdf_operation.class.php index db0ab7481..c4f62d515 100644 --- a/include/class/pdf_operation.class.php +++ b/include/class/pdf_operation.class.php @@ -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->LongLine(130, 3 , $this->acc_detail->det->jr_comment); + $this->pdf->write_multi(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->LongLine($width[2],3,$row['j_text']); + $this->pdf->write_multi($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->LongLine($width[2],3,$row['j_text']); + $this->pdf->write_multi($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); diff --git a/include/class/print_ledger_detail.class.php b/include/class/print_ledger_detail.class.php index f1a3f8156..2f951daa0 100644 --- a/include/class/print_ledger_detail.class.php +++ b/include/class/print_ledger_detail.class.php @@ -92,10 +92,10 @@ class Print_Ledger_Detail extends Print_Ledger $this->SetFont('DejaVuCond','B',7); $row=$array[$i]; - $this->LongLine(20,3,$row['pj']); + $this->write_multi(20,3,$row['pj']); $this->write_cell(15,7,$row['date_fmt']); $this->write_cell(20,7,$row['internal']); - $this->LongLine(170,3,$row['comment']); + $this->write_multi(170,3,$row['comment']); $this->write_cell(20,7,nbm($row['montant']),0,0,'R'); $this->line_new(); diff --git a/include/class/print_ledger_detail_item.class.php b/include/class/print_ledger_detail_item.class.php index 6e1154251..c9827a1ee 100644 --- a/include/class/print_ledger_detail_item.class.php +++ b/include/class/print_ledger_detail_item.class.php @@ -121,10 +121,10 @@ class Print_Ledger_Detail_Item extends Print_Ledger { // Print the general info line width=270mm - $this->LongLine(20, $high_lg, $row['jr_date'],1, 'L', true); + $this->write_multi(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->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_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->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); @@ -154,9 +154,9 @@ class Print_Ledger_Detail_Item extends Print_Ledger // Header detail - $this->LongLine(30,$high_lg,_('QuickCode')); + $this->write_multi(30,$high_lg,_('QuickCode')); $this->write_cell(30,$high,_('Poste')); - $this->LongLine(70,$high_lg,_('Libellé')); + $this->write_multi(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'); @@ -169,10 +169,10 @@ class Print_Ledger_Detail_Item extends Print_Ledger } } // Print detail sale / purchase - $this->LongLine(30,$high_lg,$row['j_qcode']); + $this->write_multi(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->LongLine(70,$high_lg,$comment); + $this->write_multi(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'); diff --git a/include/class/print_ledger_fin.class.php b/include/class/print_ledger_fin.class.php index dd465a71a..ab768ded0 100644 --- a/include/class/print_ledger_fin.class.php +++ b/include/class/print_ledger_fin.class.php @@ -118,7 +118,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->LongLine(60,3,$row['comment'],0,'L'); + $this->write_multi(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'])); diff --git a/include/class/print_ledger_misc.class.php b/include/class/print_ledger_misc.class.php index 1e137196f..91cb7034d 100644 --- a/include/class/print_ledger_misc.class.php +++ b/include/class/print_ledger_misc.class.php @@ -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->LongLine(30,3,$row['jr_pj_number']); + $this->write_multi(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->LongLine(25,3,$other,0,'L'); + $this->write_multi(25,3,$other,0,'L'); $positive=$row['montant']; - $this->LongLine(60,3,$row['comment'],0,'L'); + $this->write_multi(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']); diff --git a/include/class/print_ledger_simple.class.php b/include/class/print_ledger_simple.class.php index 7a3deb133..feeda422d 100644 --- a/include/class/print_ledger_simple.class.php +++ b/include/class/print_ledger_simple.class.php @@ -318,14 +318,14 @@ class Print_Ledger_Simple extends \Print_Ledger } $row=$a_jrn[$i]; $ret_reconcile=$ledger->db->execute('reconcile_date',array($row['jr_id'])); - $this->LongLine(15,3,($row['jr_pj_number']),0); + $this->write_multi(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->LongLine(40,3,"[".$qc."]".$name,0,'L'); + $this->write_multi(40,3,"[".$qc."]".$name,0,'L'); if ( !$flag_tva ) { - $this->LongLine(65,3,mb_substr($row['jr_comment'],0,150),0,'L'); + $this->write_multi(65,3,mb_substr($row['jr_comment'],0,150),0,'L'); } /* get other amount (without vat, total vat included, private, ND */ diff --git a/include/class/print_ledger_simple_without_vat.class.php b/include/class/print_ledger_simple_without_vat.class.php index d82519090..1596efed2 100644 --- a/include/class/print_ledger_simple_without_vat.class.php +++ b/include/class/print_ledger_simple_without_vat.class.php @@ -166,14 +166,14 @@ class Print_Ledger_Simple_Without_Vat extends Print_Ledger { $row=$a_jrn[$i]; - $this->LongLine(15,3,($row['jr_pj_number']),0); + $this->write_multi(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->LongLine(40,3,$name,0,'L'); + $this->write_multi(40,3,$name,0,'L'); - $this->LongLine(105,3,$row['jr_comment'],0,'L'); + $this->write_multi(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']); diff --git a/include/export/export_balance_pdf.php b/include/export/export_balance_pdf.php index 0b4dda419..6e3f342a9 100644 --- a/include/export/export_balance_pdf.php +++ b/include/export/export_balance_pdf.php @@ -118,7 +118,7 @@ $pdf->SetAuthor('NOALYSS'); $pdf->SetFont('DejaVuCond', '', 7); $pdf->setTitle(_("Balance comptable"), true); $pdf->write_cell(30, 6, _('poste')); -$pdf->LongLine(60, 3, _('Libellé')); +$pdf->write_multi(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->LongLine(30, 3, $strTotal,"TB"); + $pdf->write_multi(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->LongLine(30, 3, $label, 0, 'L', $fill); - $pdf->LongLine(60, 3, $value['label'], 0, 'L', $fill); + $pdf->write_multi(30, 3, $label, 0, 'L', $fill); + $pdf->write_multi(60, 3, $value['label'], 0, 'L', $fill); $summary_tab = $bal->summary_add($summary_tab, $value['poste'], $value['sum_deb'], $value['sum_cred']); diff --git a/include/export/export_fiche_balance_pdf.php b/include/export/export_fiche_balance_pdf.php index ca4b06c62..983072e43 100644 --- a/include/export/export_fiche_balance_pdf.php +++ b/include/export/export_fiche_balance_pdf.php @@ -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->LongLine(30,3,'Quick Code',0,'L',0); - $pdf->LongLine(80,3,'Libellé',0,'L',0); + $pdf->write_multi(30,3,'Quick Code',0,'L',0); + $pdf->write_multi(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); @@ -120,8 +120,10 @@ 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->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); @@ -233,10 +235,10 @@ else $row = $letter->content[$i]; $str_date = shrink_date($row['j_date_fmt']); - $pdf->LongLine($tab[0], 3, $str_date, 0, $align[0], $fill); + $pdf->write_multi($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->LongLine($tab[2], 3, $row['jr_internal'], 0, $align[1], $fill); - $pdf->LongLine($tab[3], 3, $row['jr_comment'], 0, $align[2], $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); if ($row['j_debit'] == 't') { $prog=bcadd($prog,$row['j_montant']); diff --git a/include/export/export_fiche_detail_pdf.php b/include/export/export_fiche_detail_pdf.php index 27609bfba..6ea2d042e 100644 --- a/include/export/export_fiche_detail_pdf.php +++ b/include/export/export_fiche_detail_pdf.php @@ -113,9 +113,9 @@ for ($e=0;$eSetFont('DejaVu','B',8); - $pdf->LongLine(15,6,_('totaux'),0,'L'); + $pdf->write_multi(15,6,_('totaux'),0,'L'); $pdf->write_cell(15,6,$current_exercice,0,0,'L'); - $pdf->LongLine(40,6,$solde,0,'L'); + $pdf->write_multi(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;$efind_tiers($row['jr_id'], $row['j_id'], $row['j_qcode']); $description=($tiers=="")?$row["description"]:"[".$tiers."]".$row['description']; - $pdf->LongLine($size[$l],6,($description.'('.$row['jr_internal'].")"),0,$align[$l]); + $pdf->write_multi($size[$l],6,($description.'('.$row['jr_internal'].")"),0,$align[$l]); $l++; - $pdf->LongLine($size[$l],6,((!empty($row['letter']) && $row['letter']!=-1)?strtoupper(base_convert($row['letter'],10,36)):''),0,$align[$l]); + $pdf->write_multi($size[$l],6,((!empty($row['letter']) && $row['letter']!=-1)?strtoupper(base_convert($row['letter'],10,36)):''),0,$align[$l]); $l++; - $pdf->LongLine($size[$l],6,(sprintf('% 12.2f',$row['deb_montant'])),0,$align[$l]); + $pdf->write_multi($size[$l],6,(sprintf('% 12.2f',$row['deb_montant'])),0,$align[$l]); $l++; - $pdf->LongLine($size[$l],6,(sprintf('% 12.2f',$row['cred_montant'])),0,$align[$l]); + $pdf->write_multi($size[$l],6,(sprintf('% 12.2f',$row['cred_montant'])),0,$align[$l]); $l++; - $pdf->LongLine($size[$l],6,(sprintf('% 12.2f',abs($progress))),0,$align[$l]); + $pdf->write_multi($size[$l],6,(sprintf('% 12.2f',abs($progress))),0,$align[$l]); $l++; $pdf->line_new(); $tot_deb=bcadd($tot_deb,$row['deb_montant']); diff --git a/include/export/export_gl_pdf.php b/include/export/export_gl_pdf.php index cf42ed2a4..6e690d65a 100644 --- a/include/export/export_gl_pdf.php +++ b/include/export/export_gl_pdf.php @@ -162,14 +162,14 @@ foreach ($a_accounting as $accounting_item) $i = 0; $side=" ".$acc_account_ledger->get_amount_side($solde); - $pdf->LongLine($width[$i], 3, shrink_date($detail['j_date_fmt']), 0, $lor[$i]); + $pdf->write_multi($width[$i], 3, shrink_date($detail['j_date_fmt']), 0, $lor[$i]); $i++; - $pdf->LongLine($width[$i], 3, $detail['jr_internal'], 0, $lor[$i] ); + $pdf->write_multi($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->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]); + // $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]); $i++; $pdf->write_cell($width[$i], 6, $detail['jr_pj_number'], 0, 0, $lor[$i]); $i++; diff --git a/include/export/export_poste_detail_pdf.php b/include/export/export_poste_detail_pdf.php index 583435a45..9be956220 100644 --- a/include/export/export_poste_detail_pdf.php +++ b/include/export/export_poste_detail_pdf.php @@ -89,7 +89,7 @@ foreach ($a_poste as $poste) $l++; $pdf->write_cell($size[$l],6,_('Journal'),0,0,'C'); $l++; - $pdf->LongLine($size[$l],3,_('Libellé'),0,'L'); + $pdf->write_multi($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->LongLine($size[$l],3, $description,0,$align[$l]); + $pdf->write_multi($size[$l],3, $description,0,$align[$l]); $l++; $pdf->write_cell($size[$l],6,(($row['letter']!=-1)?$row['letter']:''),0,0,$align[$l]); $l++;