Add customer code in proposals
This commit is contained in:
parent
ffa4a884d9
commit
5ae45de711
@ -131,6 +131,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$fac = new Facture($this->db,"",$id);
|
$fac = new Facture($this->db,"",$id);
|
||||||
$ret=$fac->fetch($id);
|
$ret=$fac->fetch($id);
|
||||||
}
|
}
|
||||||
|
$fac->fetch_client();
|
||||||
|
|
||||||
$deja_regle = $fac->getSommePaiement();
|
$deja_regle = $fac->getSommePaiement();
|
||||||
$amount_credit_not_included = $fac->getSommeCreditNote();
|
$amount_credit_not_included = $fac->getSommeCreditNote();
|
||||||
@ -994,6 +995,14 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateEcheance")." : " . dol_print_date($object->date_lim_reglement,"day",false,$outputlangs,true), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateEcheance")." : " . dol_print_date($object->date_lim_reglement,"day",false,$outputlangs,true), '', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($object->client->code_client)
|
||||||
|
{
|
||||||
|
$posy+=5;
|
||||||
|
$pdf->SetXY(100,$posy);
|
||||||
|
$pdf->SetTextColor(0,0,60);
|
||||||
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : " . $object->client->code_client, '', 'R');
|
||||||
|
}
|
||||||
|
|
||||||
if ($showadress)
|
if ($showadress)
|
||||||
{
|
{
|
||||||
// Emetteur
|
// Emetteur
|
||||||
@ -1041,7 +1050,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetFont('Arial','',8);
|
$pdf->SetFont('Arial','',8);
|
||||||
$pdf->SetXY(102,$posy-5);
|
$pdf->SetXY(102,$posy-5);
|
||||||
$pdf->MultiCell(80,5, $outputlangs->transnoentities("BillTo").":");
|
$pdf->MultiCell(80,5, $outputlangs->transnoentities("BillTo").":");
|
||||||
$object->fetch_client();
|
|
||||||
|
|
||||||
// Cadre client destinataire
|
// Cadre client destinataire
|
||||||
$pdf->rect(100, $posy, 100, $hautcadre);
|
$pdf->rect(100, $posy, 100, $hautcadre);
|
||||||
|
|||||||
@ -130,6 +130,7 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$fac = new Facture($this->db,"",$id);
|
$fac = new Facture($this->db,"",$id);
|
||||||
$ret=$fac->fetch($id);
|
$ret=$fac->fetch($id);
|
||||||
}
|
}
|
||||||
|
$fac->fetch_client();
|
||||||
|
|
||||||
$deja_regle = $fac->getSommePaiement();
|
$deja_regle = $fac->getSommePaiement();
|
||||||
$amount_credit_not_included = $fac->getSommeCreditNote();
|
$amount_credit_not_included = $fac->getSommeCreditNote();
|
||||||
@ -865,7 +866,6 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->SetFont('Arial','',8);
|
$pdf->SetFont('Arial','',8);
|
||||||
$pdf->SetXY($this->marges['g']+100,$posy-5);
|
$pdf->SetXY($this->marges['g']+100,$posy-5);
|
||||||
$pdf->SetFont('Arial','B',11);
|
$pdf->SetFont('Arial','B',11);
|
||||||
$fac->fetch_client();
|
|
||||||
|
|
||||||
$object=$fac;
|
$object=$fac;
|
||||||
|
|
||||||
@ -937,22 +937,28 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$pdf->MultiCell(100, 10, $outputlangs->transnoentities("Bill").' '.$outputlangs->transnoentities("Of").' '.dol_print_date($fac->date,"%d %B %Y",false,$outputlangs,true), '' , 'L');
|
$pdf->MultiCell(100, 10, $outputlangs->transnoentities("Bill").' '.$outputlangs->transnoentities("Of").' '.dol_print_date($fac->date,"%d %B %Y",false,$outputlangs,true), '' , 'L');
|
||||||
$pdf->SetFont('Arial','B',11);
|
$pdf->SetFont('Arial','B',11);
|
||||||
$pdf->SetXY($this->marges['g'],$posy+6);
|
$pdf->SetXY($this->marges['g'],$posy+5);
|
||||||
$pdf->SetTextColor(22,137,210);
|
$pdf->SetTextColor(22,137,210);
|
||||||
$pdf->MultiCell(100, 10, $outputlangs->transnoentities("RefBill")." : " . $outputlangs->transnoentities($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);
|
||||||
|
|
||||||
/*
|
if ($object->type != 2)
|
||||||
* ref projet
|
|
||||||
*/
|
|
||||||
if ($fac->projetid > 0)
|
|
||||||
{
|
{
|
||||||
$projet = New Project($fac->db);
|
$posy+=8;
|
||||||
$projet->fetch($fac->projetid);
|
$pdf->SetXY($this->marges['g'],$posy+5);
|
||||||
$pdf->SetFont('Arial','',9);
|
$pdf->SetFont('Arial','',9);
|
||||||
$pdf->MultiCell(60, 4, $outputlangs->transnoentities("Project")." : ".$projet->title);
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateEcheance")." : " . dol_print_date($object->date_lim_reglement,"day",false,$outputlangs,true), '', 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($object->client->code_client)
|
||||||
|
{
|
||||||
|
$posy+=4;
|
||||||
|
$pdf->SetXY($this->marges['g'],$posy+5);
|
||||||
|
$pdf->SetFont('Arial','',9);
|
||||||
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : " . $object->client->code_client, '', 'L');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ref propal
|
* ref propal
|
||||||
*/
|
*/
|
||||||
@ -966,8 +972,13 @@ class pdf_oursin extends ModelePDFFactures
|
|||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$objp = $fac->db->fetch_object();
|
$objp = $fac->db->fetch_object();
|
||||||
|
if ($objp->ref)
|
||||||
|
{
|
||||||
|
$posy+=4;
|
||||||
|
$pdf->SetXY($this->marges['g'],$posy+5);
|
||||||
$pdf->SetFont('Arial','',9);
|
$pdf->SetFont('Arial','',9);
|
||||||
$pdf->MultiCell(60, 4, $outputlangs->transnoentities("RefProposal")." : ".$objp->ref);
|
$pdf->MultiCell(60, 3, $outputlangs->transnoentities("RefProposal")." : ".$objp->ref);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user