From 568d5cb5ba8f2eddc729a4b6d362f24fe6fcf1eb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Jan 2015 18:47:47 +0100 Subject: [PATCH] Fixed: Tracking number restored on PDF shipments Fixed: Translation Conflicts: htdocs/langs/en_US/agenda.lang --- ChangeLog | 1 + .../modules/expedition/doc/pdf_merou.modules.php | 16 ++++++++-------- .../expedition/doc/pdf_rouget.modules.php | 14 ++++++++++---- htdocs/expedition/class/expedition.class.php | 2 +- htdocs/langs/en_US/admin.lang | 4 ++-- htdocs/langs/en_US/agenda.lang | 4 ++-- htdocs/langs/en_US/sendings.lang | 8 ++++---- htdocs/langs/en_US/stocks.lang | 2 +- 8 files changed, 29 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2643b444876..ace6a13363d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,7 @@ English Dolibarr ChangeLog - Fix: [ bug #1783 ] SQL error when enabling 3rd party module with PostgreSQL and MySQL strict mode ON - Fix: [ bug #1717 ] Sorting unpaid invoices by amount received brings due amount - Fix: [ bug #1784 ] MOTD doesn't show up in Amarok theme +- Fix: Tracking number not visible on shipment pdf ***** ChangeLog for 3.6.2 compared to 3.6.1 ***** - Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice. diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index cc9d884a831..8fab26f211c 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -534,13 +534,18 @@ class pdf_merou extends ModelePdfExpedition // Date Expedition $Yoff = $Yoff+7; - $pdf->SetXY($blSocX-80,$blSocY+20); + $pdf->SetXY($blSocX-80,$blSocY+17); $pdf->SetFont('','B', $default_font_size - 2); $pdf->SetTextColor(0,0,0); $pdf->MultiCell(50, 8, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date_delivery,'day',false,$outputlangs,true), '', 'L'); + $pdf->SetXY($blSocX-80,$blSocY+20); + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->SetTextColor(0,0,0); + $pdf->MultiCell(50, 8, $outputlangs->transnoentities("TrackingNumber")." : " . $object->tracking_number, '', 'L'); + // Deliverer - $pdf->SetXY($blSocX-80,$blSocY+23); + $pdf->SetXY($blSocX-80,$blSocY+24); $pdf->SetFont('','', $default_font_size - 2); $pdf->SetTextColor(0,0,0); @@ -554,13 +559,8 @@ class pdf_merou extends ModelePdfExpedition // Get code using getLabelFromKey $code=$outputlangs->getLabelFromKey($this->db,$object->shipping_method_id,'c_shipment_mode','rowid','code'); $label=$outputlangs->trans("SendingMethod".strtoupper($code))." :"; + $pdf->writeHTMLCell(50, 8, '', '', $label." ".$object->tracking_url, '', 'L'); } - else - { - $label=$outputlangs->transnoentities("Deliverer"); - } - - $pdf->writeHTMLCell(50, 8, '', '', $label." ".$object->tracking_url, '', 'L'); } } else diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index eedc4b91827..12fd723bf9b 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -180,11 +180,17 @@ class pdf_rouget extends ModelePdfExpedition $tab_height = 130; $tab_height_newpage = 150; - if (! empty($object->note_public) || (! empty($object->tracking_number) && ! empty($object->shipping_method_id))) + if (! empty($object->note_public) || ! empty($object->tracking_number)) { $tab_top = 88; $tab_top_alt = $tab_top; + $pdf->SetFont('','B', $default_font_size - 2); + $pdf->writeHTMLCell(60, 4, $this->posxdesc-1, $tab_top-1, $outputlangs->transnoentities("TrackingNumber")." : " . $object->tracking_number, 0, 1, false, true, 'L'); + + $tab_top_alt = $pdf->GetY(); + //$tab_top_alt += 1; + // Tracking number if (! empty($object->tracking_number)) { @@ -198,14 +204,14 @@ class pdf_rouget extends ModelePdfExpedition $label=$outputlangs->trans("LinkToTrackYourPackage")."
"; $label.=$outputlangs->trans("SendingMethod".strtoupper($code))." :"; $pdf->SetFont('','B', $default_font_size - 2); - $pdf->writeHTMLCell(60, 7, $this->posxdesc-1, $tab_top-1, $label." ".$object->tracking_url, 0, 1, false, true, 'L'); + $pdf->writeHTMLCell(60, 4, $this->posxdesc-1, $tab_top+6, $label." ".$object->tracking_url, 0, 1, false, true, 'L'); - $tab_top_alt += 7; + $tab_top_alt = $pdf->GetY(); } } } - // Affiche notes + // Notes if (! empty($object->note_public)) { $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 1045bed42be..e120ce24a40 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1494,7 +1494,7 @@ class Expedition extends CommonObject } /** - * Get tracking url status + * Forge an set tracking url * * @param string $value Value * @return void diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 2aa09fd867d..57d496bd0f4 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1374,9 +1374,9 @@ ListOfAvailableNotifications=List of available notifications (This list depends SendingsSetup=Sending module setup SendingsReceiptModel=Sending receipt model SendingsNumberingModules=Sendings numbering modules -SendingsAbility=Support sendings sheets for customer deliveries +SendingsAbility=Support shipment sheets for customer deliveries NoNeedForDeliveryReceipts=In most cases, sendings receipts are used both as sheets for customer deliveries (list of products to send) and sheets that is recevied and signed by customer. So product deliveries receipts is a duplicated feature and is rarely activated. -FreeLegalTextOnShippings=Free text on shippings +FreeLegalTextOnShippings=Free text on shipments ##### Deliveries ##### DeliveryOrderNumberingModules=Products deliveries receipt numbering module DeliveryOrderModel=Products deliveries receipt model diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 687e3cae146..52b2e8128fd 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -52,8 +52,8 @@ OrderSentByEMail=Customer order %s sent by EMail InvoiceSentByEMail=Customer invoice %s sent by EMail SupplierOrderSentByEMail=Supplier order %s sent by EMail SupplierInvoiceSentByEMail=Supplier invoice %s sent by EMail -ShippingSentByEMail=Shipping %s sent by EMail -ShippingValidated= Shipping %s validated +ShippingSentByEMail=Shipment %s sent by EMail +ShippingValidated= Shipment %s validated InterventionSentByEMail=Intervention %s sent by EMail NewCompanyToDolibarr= Third party created DateActionPlannedStart= Planned start date diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index 039d47f6aa9..861feeaf8d0 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -4,7 +4,7 @@ Sending=Shipment Sendings=Shipments Shipment=Shipment Shipments=Shipments -Receivings=Receivings +Receivings=Receipts SendingsArea=Shipments area ListOfSendings=List of shipments SendingMethod=Shipping method @@ -14,7 +14,7 @@ SearchASending=Search for shipment StatisticsOfSendings=Statistics for shipments NbOfSendings=Number of shipments NumberOfShipmentsByMonth=Number of shipments by month -SendingCard=Shipping card +SendingCard=Shipment card NewSending=New shipment CreateASending=Create a shipment CreateSending=Create shipment @@ -37,7 +37,7 @@ StatusSendingCanceledShort=Canceled StatusSendingDraftShort=Draft StatusSendingValidatedShort=Validated StatusSendingProcessedShort=Processed -SendingSheet=Sending sheet +SendingSheet=Shipment sheet Carriers=Carriers Carrier=Carrier CarriersArea=Carriers area @@ -58,7 +58,7 @@ SendShippingRef=Send shipment %s ActionsOnShipping=Events on shipment LinkToTrackYourPackage=Link to track your package ShipmentCreationIsDoneFromOrder=For the moment, creation of a new shipment is done from the order card. -RelatedShippings=Related shippings +RelatedShippings=Related shipments ShipmentLine=Shipment line CarrierList=List of transporters diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 7a08148c9ce..63c118dd6e2 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -116,7 +116,7 @@ MassMovement=Mass movement MassStockMovement=Mass stock movement SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfert -ReceivingForSameOrder=Receivings for this order +ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded RuleForStockAvailability=Rules on stock requirements StockMustBeEnoughForInvoice=Stock level must be enough to add product/service into invoice