add Ref client in PDF and send to propal on create

This commit is contained in:
Florian HENRY
2022-05-20 10:40:59 +02:00
parent 93831663d1
commit 8af848c539
2 changed files with 9 additions and 1 deletions

View File

@@ -1644,7 +1644,7 @@ if ($action == 'create') {
// Ref customer
print '<tr class="field_ref_client"><td class="titlefieldcreate">'.$langs->trans('RefCustomer').'</td><td class="valuefieldcreate">';
print '<input type="text" name="ref_client" value="'.GETPOST('ref_client').'"></td>';
print '<input type="text" name="ref_client" value="'.(!empty($ref_client)?$ref_client:GETPOST('ref_client')).'"></td>';
print '</tr>';
// Third party

View File

@@ -612,6 +612,14 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->datec, "day", false, $outputlangs, true), '', 'R');
if (!empty($object->ref_client)) {
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer") . " : " . dol_trunc($outputlangs->convToOutputCharset($object->ref_client), 65), '', 'R');
}
if (empty($conf->global->MAIN_PDF_HIDE_CUSTOMER_CODE) && $object->thirdparty->code_client) {
$posy += 4;
$pdf->SetXY($posx, $posy);