From 083cf06908f1526ce5fe6a7556567b9bbcc06245 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Jan 2015 18:33:33 +0100 Subject: [PATCH] Fixed: Tracking number restored on PDF shipments Fixed: Translation --- .../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 +- 7 files changed, 28 insertions(+), 22 deletions(-) diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index 145eeafcdde..fefe2f591fe 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -557,13 +557,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); @@ -577,13 +582,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 ea6601b8396..ef9db41254b 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -191,11 +191,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)) { @@ -209,14 +215,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 44e79acfdb1..e6cc0e86d09 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1522,7 +1522,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 fe2cfad5a42..1527126f95b 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1397,9 +1397,9 @@ FixedEmailTarget=Fixed email target 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 9ed2d79edd2..cd6d6fbf033 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -58,8 +58,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 NewCompanyToDolibarr= Third party created DateActionPlannedStart= Planned start date DateActionPlannedEnd= Planned end date diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index f6111bac684..b3c47889d66 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=Submission of 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 SendingRunning=Product from customer order already sent diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 492cbbd7464..d77c65a9a13 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