The supplier code was not visible on supplier pdf.
This commit is contained in:
parent
5dc1102601
commit
d7ef1e7da0
@ -1481,12 +1481,12 @@ 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)
|
if ($object->thirdparty->code_client)
|
||||||
{
|
{
|
||||||
$posy+=3;
|
$posy+=3;
|
||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : " . $outputlangs->transnoentities($object->client->code_client), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : " . $outputlangs->transnoentities($object->thirdparty->code_client), '', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
$posy+=1;
|
$posy+=1;
|
||||||
|
|||||||
@ -957,46 +957,57 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierInvoice")." ".$outputlangs->convToOutputCharset($object->ref), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierInvoice")." ".$outputlangs->convToOutputCharset($object->ref), '', 'R');
|
||||||
|
$posy+=1;
|
||||||
$pdf->SetFont('','B', $default_font_size);
|
|
||||||
|
|
||||||
if ($object->ref_supplier)
|
if ($object->ref_supplier)
|
||||||
{
|
{
|
||||||
$posy+=4;
|
$posy+=4;
|
||||||
|
$pdf->SetFont('','B', $default_font_size);
|
||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefSupplier")." : " . $object->ref_supplier, '', 'R');
|
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefSupplier")." : " . $object->ref_supplier, '', 'R');
|
||||||
|
$posy+=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
|
|
||||||
$posy+=6;
|
|
||||||
if (! empty($conf->global->PDF_SHOW_PROJECT))
|
if (! empty($conf->global->PDF_SHOW_PROJECT))
|
||||||
{
|
{
|
||||||
$object->fetch_projet();
|
$object->fetch_projet();
|
||||||
$pdf->SetXY($posx,$posy);
|
|
||||||
if (! empty($object->project->ref))
|
if (! empty($object->project->ref))
|
||||||
{
|
{
|
||||||
$langs->load("projects");
|
$posy+=4;
|
||||||
|
$pdf->SetXY($posx,$posy);
|
||||||
|
$langs->load("projects");
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->ref)?'':$object->projet->ref), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->ref)?'':$object->projet->ref), '', 'R');
|
||||||
$posy+=4;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetXY($posx,$posy);
|
|
||||||
if ($object->date)
|
if ($object->date)
|
||||||
{
|
{
|
||||||
|
$posy+=4;
|
||||||
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date,"day",false,$outputlangs,true), '', 'R');
|
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date,"day",false,$outputlangs,true), '', 'R');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$posy+=4;
|
||||||
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(255,0,0);
|
$pdf->SetTextColor(255,0,0);
|
||||||
$pdf->MultiCell(100, 4, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R');
|
$pdf->MultiCell(100, 4, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
$posy+=2;
|
if ($object->thirdparty->code_fournisseur)
|
||||||
|
{
|
||||||
|
$posy+=4;
|
||||||
|
$pdf->SetXY($posx,$posy);
|
||||||
|
$pdf->SetTextColor(0,0,60);
|
||||||
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierCode")." : " . $outputlangs->transnoentities($object->thirdparty->code_fournisseur), '', 'R');
|
||||||
|
}
|
||||||
|
|
||||||
|
$posy+=1;
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
|
|
||||||
// Show list of linked objects
|
// Show list of linked objects
|
||||||
|
|||||||
@ -1001,51 +1001,67 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$title=$outputlangs->transnoentities("SupplierOrder")." ".$outputlangs->convToOutputCharset($object->ref);
|
$title=$outputlangs->transnoentities("SupplierOrder")." ".$outputlangs->convToOutputCharset($object->ref);
|
||||||
$pdf->MultiCell(100, 3, $title, '', 'R');
|
$pdf->MultiCell(100, 3, $title, '', 'R');
|
||||||
|
$posy+=1;
|
||||||
$pdf->SetFont('','B', $default_font_size);
|
|
||||||
|
|
||||||
if ($object->ref_supplier)
|
if ($object->ref_supplier)
|
||||||
{
|
{
|
||||||
$posy+=4;
|
$posy+=4;
|
||||||
|
$pdf->SetFont('','B', $default_font_size);
|
||||||
$pdf->SetXY($posx,$posy);
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefSupplier")." : " . $outputlangs->convToOutputCharset($object->ref_supplier), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefSupplier")." : " . $outputlangs->convToOutputCharset($object->ref_supplier), '', 'R');
|
||||||
|
$posy+=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size -1);
|
$pdf->SetFont('','', $default_font_size -1);
|
||||||
|
|
||||||
$posy+=6;
|
|
||||||
if (! empty($conf->global->PDF_SHOW_PROJECT))
|
if (! empty($conf->global->PDF_SHOW_PROJECT))
|
||||||
{
|
{
|
||||||
$object->fetch_projet();
|
$object->fetch_projet();
|
||||||
$pdf->SetXY($posx,$posy);
|
|
||||||
if (! empty($object->project->ref))
|
if (! empty($object->project->ref))
|
||||||
{
|
{
|
||||||
|
$posy+=4;
|
||||||
|
$pdf->SetXY($posx,$posy);
|
||||||
$langs->load("projects");
|
$langs->load("projects");
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->ref)?'':$object->projet->ref), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->ref)?'':$object->projet->ref), '', 'R');
|
||||||
$posy+=4;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetXY($posx,$posy);
|
|
||||||
if (! empty($object->date_commande))
|
if (! empty($object->date_commande))
|
||||||
{
|
{
|
||||||
|
$posy+=4;
|
||||||
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date_commande,"day",false,$outputlangs,true), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date_commande,"day",false,$outputlangs,true), '', 'R');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$posy+=4;
|
||||||
|
$pdf->SetXY($posx,$posy);
|
||||||
$pdf->SetTextColor(255,0,0);
|
$pdf->SetTextColor(255,0,0);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$usehourmin='day';
|
$usehourmin='day';
|
||||||
if ( empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) $usehourmin='dayhour';
|
if (empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) $usehourmin='dayhour';
|
||||||
if (! empty($object->date_livraison)) $pdf->MultiCell(190, 3, $outputlangs->transnoentities("DateDeliveryPlanned")." : " . dol_print_date($object->date_livraison,$usehourmin,false,$outputlangs,true), '', 'R');
|
if (! empty($object->date_livraison))
|
||||||
|
{
|
||||||
|
$posy+=4;
|
||||||
|
$pdf->SetXY($posx-90,$posy);
|
||||||
|
$pdf->MultiCell(190, 3, $outputlangs->transnoentities("DateDeliveryPlanned")." : " . dol_print_date($object->date_livraison,$usehourmin,false,$outputlangs,true), '', 'R');
|
||||||
|
}
|
||||||
|
|
||||||
$posy+=5;
|
if ($object->thirdparty->code_fournisseur)
|
||||||
|
{
|
||||||
|
$posy+=4;
|
||||||
|
$pdf->SetXY($posx,$posy);
|
||||||
|
$pdf->SetTextColor(0,0,60);
|
||||||
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierCode")." : " . $outputlangs->transnoentities($object->thirdparty->code_fournisseur), '', 'R');
|
||||||
|
}
|
||||||
|
|
||||||
|
$posy+=1;
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
|
|
||||||
// Show list of linked objects
|
// Show list of linked objects
|
||||||
|
|||||||
@ -140,6 +140,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$result=$object->setValueFrom('ref_supplier',GETPOST('ref_supplier','alpha'));
|
$result=$object->setValueFrom('ref_supplier',GETPOST('ref_supplier','alpha'));
|
||||||
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
|
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
else $object->ref_supplier = GETPOST('ref_supplier','alpha'); // The setValueFrom does not set new property of object
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set incoterm
|
// Set incoterm
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user