Hello everyone,
I have been using the contact/Addresses tab to manage the delivery address and found it to be pretty useful. However I couldn’t find a way to display the chosen address on the actual shipment tab.
One way I thought I could do is to create complementary attributes and make them point to the delivery address but I’m not sure what the actual object/variable is which stores the info. I see that in the setup module, you can create an attribute and point it to a computed value so I assume I can should be able to fetch the info I need from the database?
Would anyone know what the computer field/object is that stores the delivery address once I select it?
Thank you for your help!
Edit pdf_espadon.modules.php
add this code before // Show sender name
$idaddressshipping = $object->getIdContact(‘external’, ‘SHIPPING’);
if (!empty($idaddressshipping)) {
$contactshipping = $object->fetch_Contact($idaddressshipping[0]);
$companystatic = new Societe($this->db);
$companystatic->fetch($object->contact->fk_soc);
$carac_client_name_shipping = pdfBuildThirdpartyName($object->contact, $outputlangs);
$carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $companystatic, $object->contact, 1, 'target', $object);
} else {
$carac_client_name_shipping = pdfBuildThirdpartyName($object->thirdparty, $outputlangs);
$carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);
}
replace with
// Show sender name
if (!getDolGlobalString('MAIN_PDF_HIDE_SENDER_NAME')) {
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell($widthrecbox - 2, 4, $carac_client_name_shipping, 0, 'L');
$posy = $pdf->getY();
}
// Show sender information
$pdf->SetXY($posx + 2, $posy);
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->MultiCell($widthrecbox - 2, 4, $carac_client_shipping, 0, $ltrdirection);