Qual: Factorize redundant code
This commit is contained in:
parent
5e016e8f11
commit
77cc4a1b56
@ -148,7 +148,7 @@ $form = new Form($db);
|
|||||||
|
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
/* */
|
/* */
|
||||||
/* Affichage page en mode cr<EFBFBD>ation */
|
/* Affichage page en mode creation */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|||||||
@ -536,46 +536,12 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$account = new Account($this->db);
|
$account = new Account($this->db);
|
||||||
$account->fetch($conf->global->FACTURE_RIB_NUMBER);
|
$account->fetch($conf->global->FACTURE_RIB_NUMBER);
|
||||||
|
|
||||||
$this->marges['g']=$this->marge_gauche;
|
$curx=$this->marge_gauche;
|
||||||
|
$cury=$posy;
|
||||||
|
|
||||||
$cury=$posy;
|
$posy=pdf_bank($pdf,$outputlangs,$curx,$cury,$account);
|
||||||
$pdf->SetXY ($this->marges['g'], $cury);
|
|
||||||
$pdf->SetFont('Arial','B',8);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByTransferOnThisBankAccount').':', 0, 'L', 0);
|
|
||||||
$cury+=4;
|
|
||||||
$pdf->SetFont('Arial','B',6);
|
|
||||||
$pdf->line($this->marges['g']+1, $cury, $this->marges['g']+1, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury);
|
|
||||||
$pdf->MultiCell(18, 3, $outputlangs->transnoentities("BankCode"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+18, $cury, $this->marges['g']+18, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+18, $cury);
|
|
||||||
$pdf->MultiCell(18, 3, $outputlangs->transnoentities("DeskCode"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+36, $cury, $this->marges['g']+36, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+36, $cury);
|
|
||||||
$pdf->MultiCell(24, 3, $outputlangs->transnoentities("BankAccountNumber"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+60, $cury, $this->marges['g']+60, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+60, $cury);
|
|
||||||
$pdf->MultiCell(13, 3, $outputlangs->transnoentities("BankAccountNumberKey"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+73, $cury, $this->marges['g']+73, $cury+10 );
|
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',8);
|
$posy+=2;
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+5);
|
|
||||||
$pdf->MultiCell(18, 3, $account->code_banque, 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+18, $cury+5);
|
|
||||||
$pdf->MultiCell(18, 3, $account->code_guichet, 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+36, $cury+5);
|
|
||||||
$pdf->MultiCell(24, 3, $account->number, 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+60, $cury+5);
|
|
||||||
$pdf->MultiCell(13, 3, $account->cle_rib, 0, 'C', 0);
|
|
||||||
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+12);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Residence").' : ' . $account->domiciliation, 0, 'L', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+22);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("IbanPrefix").' : ' . $account->iban_prefix, 0, 'L', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+25);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("BIC").' : ' . $account->bic, 0, 'L', 0);
|
|
||||||
|
|
||||||
$posy=$pdf->GetY()+2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -696,46 +696,12 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$account = new Account($this->db);
|
$account = new Account($this->db);
|
||||||
$account->fetch($conf->global->FACTURE_RIB_NUMBER);
|
$account->fetch($conf->global->FACTURE_RIB_NUMBER);
|
||||||
|
|
||||||
$this->marges['g']=$this->marge_gauche;
|
$curx=$this->marge_gauche;
|
||||||
|
|
||||||
$cury=$posy;
|
$cury=$posy;
|
||||||
$pdf->SetXY ($this->marges['g'], $cury);
|
|
||||||
$pdf->SetFont('Arial','B',8);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByTransferOnThisBankAccount').':', 0, 'L', 0);
|
|
||||||
$cury+=4;
|
|
||||||
$pdf->SetFont('Arial','B',6);
|
|
||||||
$pdf->line($this->marges['g']+1, $cury, $this->marges['g']+1, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury);
|
|
||||||
$pdf->MultiCell(18, 3, $outputlangs->transnoentities("BankCode"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+18, $cury, $this->marges['g']+18, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+18, $cury);
|
|
||||||
$pdf->MultiCell(18, 3, $outputlangs->transnoentities("DeskCode"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+36, $cury, $this->marges['g']+36, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+36, $cury);
|
|
||||||
$pdf->MultiCell(24, 3, $outputlangs->transnoentities("BankAccountNumber"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+60, $cury, $this->marges['g']+60, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+60, $cury);
|
|
||||||
$pdf->MultiCell(13, 3, $outputlangs->transnoentities("BankAccountNumberKey"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+73, $cury, $this->marges['g']+73, $cury+10 );
|
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',8);
|
$posy=pdf_bank($pdf,$outputlangs,$curx,$cury,$account);
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+5);
|
|
||||||
$pdf->MultiCell(18, 3, $outputlangs->convToOutputCharset($account->code_banque), 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+18, $cury+5);
|
|
||||||
$pdf->MultiCell(18, 3, $outputlangs->convToOutputCharset($account->code_guichet), 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+36, $cury+5);
|
|
||||||
$pdf->MultiCell(24, 3, $outputlangs->convToOutputCharset($account->number), 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+60, $cury+5);
|
|
||||||
$pdf->MultiCell(13, 3, $outputlangs->convToOutputCharset($account->cle_rib), 0, 'C', 0);
|
|
||||||
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+12);
|
$posy+=2;
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Residence").' : ' . $outputlangs->convToOutputCharset($account->domiciliation), 0, 'L', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+22);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("IbanPrefix").' : ' . $outputlangs->convToOutputCharset($account->iban_prefix), 0, 'L', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+25);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("BIC").' : ' . $outputlangs->convToOutputCharset($account->bic), 0, 'L', 0);
|
|
||||||
|
|
||||||
$posy=$pdf->GetY()+2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -227,17 +227,10 @@ class pdf_huitre extends ModelePDFFactures
|
|||||||
$account = new Account($this->db);
|
$account = new Account($this->db);
|
||||||
$account->fetch(FACTURE_RIB_NUMBER);
|
$account->fetch(FACTURE_RIB_NUMBER);
|
||||||
|
|
||||||
$pdf->SetXY (10, 40);
|
$curx=10;
|
||||||
$pdf->SetFont('Arial','U',8);
|
$cury=40;
|
||||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("BankDetails"), 0, 'L', 0);
|
|
||||||
$pdf->SetFont('Arial','',8);
|
$posy=pdf_bank($pdf,$outputlangs,$curx,$cury,$account);
|
||||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("BankCode").' : ' . $outputlangs->convToOutputCharset($account->code_banque), 0, 'L', 0);
|
|
||||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("DeskCode").' : ' . $outputlangs->convToOutputCharset($account->code_guichet), 0, 'L', 0);
|
|
||||||
$pdf->MultiCell(50, 4, $outputlangs->transnoentities("BankAccountNumber").' : ' . $outputlangs->convToOutputCharset($account->number), 0, 'L', 0);
|
|
||||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("BankAccountNumberKey").' : ' . $outputlangs->convToOutputCharset($account->cle_rib), 0, 'L', 0);
|
|
||||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("Residence").' : ' . $outputlangs->convToOutputCharset($account->domiciliation), 0, 'L', 0);
|
|
||||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("IbanPrefix").' : ' . $outputlangs->convToOutputCharset($account->iban_prefix), 0, 'L', 0);
|
|
||||||
$pdf->MultiCell(40, 4, $outputlangs->transnoentities("BIC").' : ' . $outputlangs->convToOutputCharset($account->bic), 0, 'L', 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -270,7 +270,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Propose mode r<EFBFBD>glement par CHQ
|
// Propose mode reglement par CHQ
|
||||||
if (defined("FACTURE_CHQ_NUMBER"))
|
if (defined("FACTURE_CHQ_NUMBER"))
|
||||||
{
|
{
|
||||||
if (FACTURE_CHQ_NUMBER > 0)
|
if (FACTURE_CHQ_NUMBER > 0)
|
||||||
@ -287,7 +287,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Propose mode r<EFBFBD>glement par RIB
|
// Propose mode reglement par RIB
|
||||||
if (defined("FACTURE_RIB_NUMBER"))
|
if (defined("FACTURE_RIB_NUMBER"))
|
||||||
{
|
{
|
||||||
if (FACTURE_RIB_NUMBER > 0)
|
if (FACTURE_RIB_NUMBER > 0)
|
||||||
@ -296,45 +296,13 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$account->fetch(FACTURE_RIB_NUMBER);
|
$account->fetch(FACTURE_RIB_NUMBER);
|
||||||
|
|
||||||
$cury=240;
|
$cury=240;
|
||||||
$pdf->SetXY ($this->marges['g'], $cury);
|
$curx=$this->marges['g'];
|
||||||
$pdf->SetFont('Arial','B',8);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByTransferOnThisBankAccount').':', 0, 'L', 0);
|
|
||||||
$cury=245;
|
|
||||||
$pdf->SetFont('Arial','B',6);
|
|
||||||
$pdf->line($this->marges['g'], $cury, $this->marges['g'], $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury);
|
|
||||||
$pdf->MultiCell(18, 3, $outputlangs->transnoentities("BankCode"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+18, $cury, $this->marges['g']+18, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+18, $cury);
|
|
||||||
$pdf->MultiCell(18, 3, $outputlangs->transnoentities("DeskCode"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+36, $cury, $this->marges['g']+36, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+36, $cury);
|
|
||||||
$pdf->MultiCell(24, 3, $outputlangs->transnoentities("BankAccountNumber"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+60, $cury, $this->marges['g']+60, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+60, $cury);
|
|
||||||
$pdf->MultiCell(13, 3, $outputlangs->transnoentities("BankAccountNumberKey"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+73, $cury, $this->marges['g']+73, $cury+10 );
|
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',8);
|
$posy=pdf_bank($pdf,$outputlangs,$curx,$cury,$account);
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+5);
|
|
||||||
$pdf->MultiCell(18, 3, $account->code_banque, 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+18, $cury+5);
|
|
||||||
$pdf->MultiCell(18, 3, $account->code_guichet, 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+36, $cury+5);
|
|
||||||
$pdf->MultiCell(24, 3, $account->number, 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+60, $cury+5);
|
|
||||||
$pdf->MultiCell(13, 3, $account->cle_rib, 0, 'C', 0);
|
|
||||||
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+14);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Residence").' : ' . $outputlangs->convToOutputCharset($account->domiciliation), 0, 'L', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+19);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("IbanPrefix").' : ' . $outputlangs->convToOutputCharset($account->iban_prefix), 0, 'L', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+24);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("BIC").' : ' . $outputlangs->convToOutputCharset($account->bic), 0, 'L', 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Conditions de r<EFBFBD>glements
|
// Conditions de reglements
|
||||||
if ($fac->cond_reglement_code)
|
if ($fac->cond_reglement_code)
|
||||||
{
|
{
|
||||||
$pdf->SetFont('Arial','B',10);
|
$pdf->SetFont('Arial','B',10);
|
||||||
@ -729,10 +697,10 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->SetFont('Arial','B',11);
|
$pdf->SetFont('Arial','B',11);
|
||||||
$fac->fetch_client();
|
$fac->fetch_client();
|
||||||
$pdf->SetXY($this->marges['g']+100,$posy+4);
|
$pdf->SetXY($this->marges['g']+100,$posy+4);
|
||||||
$pdf->MultiCell(86,4, $fac->client->nom, 0, 'L');
|
$pdf->MultiCell(86,4, $outputlangs->transnoentities($fac->client->nom), 0, 'L');
|
||||||
$pdf->SetFont('Arial','B',10);
|
$pdf->SetFont('Arial','B',10);
|
||||||
$pdf->SetXY($this->marges['g']+100,$posy+12);
|
$pdf->SetXY($this->marges['g']+100,$posy+12);
|
||||||
$pdf->MultiCell(86,4, $fac->client->adresse . "\n\n" . $fac->client->cp . " " . $fac->client->ville);
|
$pdf->MultiCell(86,4, $outputlangs->transnoentities($fac->client->adresse) . "\n\n" . $outputlangs->transnoentities($fac->client->cp) . " " . $outputlangs->transnoentities($fac->client->ville));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ref facture
|
* ref facture
|
||||||
@ -745,7 +713,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->SetFont('Arial','B',11);
|
$pdf->SetFont('Arial','B',11);
|
||||||
$pdf->SetXY($this->marges['g'],$posy+6);
|
$pdf->SetXY($this->marges['g'],$posy+6);
|
||||||
$pdf->SetTextColor(22,137,210);
|
$pdf->SetTextColor(22,137,210);
|
||||||
$pdf->MultiCell(100, 10, $outputlangs->transnoentities("RefBill")." : " . $fac->ref, '', 'L');
|
$pdf->MultiCell(100, 10, $outputlangs->transnoentities("RefBill")." : " . $outputlangs->transnoentities($fac->ref), '', 'L');
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -546,46 +546,12 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
$account = new Account($this->db);
|
$account = new Account($this->db);
|
||||||
$account->fetch($conf->global->FACTURE_RIB_NUMBER);
|
$account->fetch($conf->global->FACTURE_RIB_NUMBER);
|
||||||
|
|
||||||
$this->marges['g']=$this->marge_gauche;
|
$curx=$this->marge_gauche;
|
||||||
|
$cury=$posy;
|
||||||
|
|
||||||
$cury=$posy;
|
$posy=pdf_bank($pdf,$outputlangs,$curx,$cury,$account);
|
||||||
$pdf->SetXY ($this->marges['g'], $cury);
|
|
||||||
$pdf->SetFont('Arial','B',8);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByTransferOnThisBankAccount').':', 0, 'L', 0);
|
|
||||||
$cury+=4;
|
|
||||||
$pdf->SetFont('Arial','B',6);
|
|
||||||
$pdf->line($this->marges['g']+1, $cury, $this->marges['g']+1, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury);
|
|
||||||
$pdf->MultiCell(18, 3, $outputlangs->transnoentities("BankCode"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+18, $cury, $this->marges['g']+18, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+18, $cury);
|
|
||||||
$pdf->MultiCell(18, 3, $outputlangs->transnoentities("DeskCode"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+36, $cury, $this->marges['g']+36, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+36, $cury);
|
|
||||||
$pdf->MultiCell(24, 3, $outputlangs->transnoentities("BankAccountNumber"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+60, $cury, $this->marges['g']+60, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+60, $cury);
|
|
||||||
$pdf->MultiCell(13, 3, $outputlangs->transnoentities("BankAccountNumberKey"), 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+73, $cury, $this->marges['g']+73, $cury+10 );
|
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',8);
|
$posy+=2;
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+5);
|
|
||||||
$pdf->MultiCell(18, 3, $outputlangs->convToOutputCharset($account->code_banque), 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+18, $cury+5);
|
|
||||||
$pdf->MultiCell(18, 3, $outputlangs->convToOutputCharset($account->code_guichet), 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+36, $cury+5);
|
|
||||||
$pdf->MultiCell(24, 3, $outputlangs->convToOutputCharset($account->number), 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+60, $cury+5);
|
|
||||||
$pdf->MultiCell(13, 3, $outputlangs->convToOutputCharset($account->cle_rib), 0, 'C', 0);
|
|
||||||
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+12);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Residence").' : ' . $outputlangs->convToOutputCharset($account->domiciliation), 0, 'L', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+22);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("IbanPrefix").' : ' . $outputlangs->convToOutputCharset($account->iban_prefix), 0, 'L', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+25);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("BIC").' : ' . $outputlangs->convToOutputCharset($account->bic), 0, 'L', 0);
|
|
||||||
|
|
||||||
$posy=$pdf->GetY()+2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -368,7 +368,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Propose mode r<EFBFBD>glement par RIB
|
* Propose mode reglement par RIB
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
if (defined("FACTURE_RIB_NUMBER"))
|
if (defined("FACTURE_RIB_NUMBER"))
|
||||||
@ -378,45 +378,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$account = new Account($this->db);
|
$account = new Account($this->db);
|
||||||
$account->fetch(FACTURE_RIB_NUMBER);
|
$account->fetch(FACTURE_RIB_NUMBER);
|
||||||
|
|
||||||
$this->marges['g']=$this->marge_gauche;
|
$curx=$this->marge_gauche;
|
||||||
|
|
||||||
$cury=242;
|
$cury=242;
|
||||||
$pdf->SetXY ($this->marges['g'], $cury);
|
|
||||||
$pdf->SetFont('Arial','B',8);
|
|
||||||
$pdf->MultiCell(90, 3, "R<EFBFBD>glement par virement sur le compte bancaire suivant:", 0, 'L', 0);
|
|
||||||
$cury+=4;
|
|
||||||
$pdf->SetFont('Arial','B',6);
|
|
||||||
$pdf->line($this->marges['g']+1, $cury, $this->marges['g']+1, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury);
|
|
||||||
$pdf->MultiCell(18, 3, "Code banque", 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+18, $cury, $this->marges['g']+18, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+18, $cury);
|
|
||||||
$pdf->MultiCell(18, 3, "Code guichet", 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+36, $cury, $this->marges['g']+36, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+36, $cury);
|
|
||||||
$pdf->MultiCell(24, 3, "Num<EFBFBD>ro compte", 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+60, $cury, $this->marges['g']+60, $cury+10 );
|
|
||||||
$pdf->SetXY ($this->marges['g']+60, $cury);
|
|
||||||
$pdf->MultiCell(13, 3, "Cl<EFBFBD> RIB", 0, 'C', 0);
|
|
||||||
$pdf->line($this->marges['g']+73, $cury, $this->marges['g']+73, $cury+10 );
|
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',8);
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+5);
|
|
||||||
$pdf->MultiCell(18, 3, $account->code_banque, 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+18, $cury+5);
|
|
||||||
$pdf->MultiCell(18, 3, $account->code_guichet, 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+36, $cury+5);
|
|
||||||
$pdf->MultiCell(24, 3, $account->number, 0, 'C', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g']+60, $cury+5);
|
|
||||||
$pdf->MultiCell(13, 3, $account->cle_rib, 0, 'C', 0);
|
|
||||||
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+12);
|
|
||||||
$pdf->MultiCell(90, 3, "Domiciliation : " . $account->domiciliation, 0, 'L', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+22);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->trans("IBAN")." : " . $account->iban_prefix, 0, 'L', 0);
|
|
||||||
$pdf->SetXY ($this->marges['g'], $cury+25);
|
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->trans("BIC")." : " . $account->bic, 0, 'L', 0);
|
|
||||||
|
|
||||||
|
pdf_bank($pdf,$outputlangs,$curx,$cury,$account);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
@ -602,7 +567,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Montants exprim<69>s en (en tab_top - 1)
|
// Montants exprim<69>s en (en tab_top - 1
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$pdf->SetFont('Arial','',8);
|
$pdf->SetFont('Arial','',8);
|
||||||
$titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentities("Currency".$conf->monnaie));
|
$titre = $outputlangs->transnoentities("AmountInCurrency",$outputlangs->transnoentities("Currency".$conf->monnaie));
|
||||||
|
|||||||
@ -679,6 +679,50 @@ function show_actions_done($conf,$langs,$db,$objsoc,$objcon='')
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Show bank informations for PDF generation
|
||||||
|
*/
|
||||||
|
function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account)
|
||||||
|
{
|
||||||
|
$pdf->SetXY ($curx, $cury);
|
||||||
|
$pdf->SetFont('Arial','B',8);
|
||||||
|
$pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByTransferOnThisBankAccount').':', 0, 'L', 0);
|
||||||
|
$cury+=4;
|
||||||
|
$pdf->SetFont('Arial','B',6);
|
||||||
|
$pdf->line($curx+1, $cury, $curx+1, $cury+10 );
|
||||||
|
$pdf->SetXY ($curx, $cury);
|
||||||
|
$pdf->MultiCell(18, 3, $outputlangs->transnoentities("BankCode"), 0, 'C', 0);
|
||||||
|
$pdf->line($curx+18, $cury, $curx+18, $cury+10 );
|
||||||
|
$pdf->SetXY ($curx+18, $cury);
|
||||||
|
$pdf->MultiCell(18, 3, $outputlangs->transnoentities("DeskCode"), 0, 'C', 0);
|
||||||
|
$pdf->line($curx+36, $cury, $curx+36, $cury+10 );
|
||||||
|
$pdf->SetXY ($curx+36, $cury);
|
||||||
|
$pdf->MultiCell(24, 3, $outputlangs->transnoentities("BankAccountNumber"), 0, 'C', 0);
|
||||||
|
$pdf->line($curx+60, $cury, $curx+60, $cury+10 );
|
||||||
|
$pdf->SetXY ($curx+60, $cury);
|
||||||
|
$pdf->MultiCell(13, 3, $outputlangs->transnoentities("BankAccountNumberKey"), 0, 'C', 0);
|
||||||
|
$pdf->line($curx+73, $cury, $curx+73, $cury+10 );
|
||||||
|
|
||||||
|
$pdf->SetFont('Arial','',8);
|
||||||
|
$pdf->SetXY ($curx, $cury+5);
|
||||||
|
$pdf->MultiCell(18, 3, $outputlangs->convToOutputCharset($account->code_banque), 0, 'C', 0);
|
||||||
|
$pdf->SetXY ($curx+18, $cury+5);
|
||||||
|
$pdf->MultiCell(18, 3, $outputlangs->convToOutputCharset($account->code_guichet), 0, 'C', 0);
|
||||||
|
$pdf->SetXY ($curx+36, $cury+5);
|
||||||
|
$pdf->MultiCell(24, 3, $outputlangs->convToOutputCharset($account->number), 0, 'C', 0);
|
||||||
|
$pdf->SetXY ($curx+60, $cury+5);
|
||||||
|
$pdf->MultiCell(13, 3, $outputlangs->convToOutputCharset($account->cle_rib), 0, 'C', 0);
|
||||||
|
|
||||||
|
$pdf->SetXY ($curx, $cury+12);
|
||||||
|
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Residence").' : ' . $outputlangs->convToOutputCharset($account->domiciliation), 0, 'L', 0);
|
||||||
|
$pdf->SetXY ($curx, $cury+22);
|
||||||
|
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("IbanPrefix").' : ' . $outputlangs->convToOutputCharset($account->iban_prefix), 0, 'L', 0);
|
||||||
|
$pdf->SetXY ($curx, $cury+25);
|
||||||
|
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("BIC").' : ' . $outputlangs->convToOutputCharset($account->bic), 0, 'L', 0);
|
||||||
|
|
||||||
|
return $pdf->getY();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Show footer of page for PDF generation
|
* \brief Show footer of page for PDF generation
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user