Example #1
0
 protected function UpdateShipmentLabels()
 {
     $this->lblShipDate->Text = $this->objShipment->ShipDate->__toString();
     $this->lblFromCompany->Text = $this->objShipment->FromCompany->__toStringWithLink();
     $this->lblFromContact->Text = $this->objShipment->FromContact->__toStringWithLink();
     $this->lblFromAddress->Text = $this->objShipment->FromAddress->__toStringWithLink();
     $this->lblToCompany->Text = $this->objShipment->ToCompany->__toStringWithLink();
     $this->lblToContact->Text = $this->objShipment->ToContact->__toStringWithLink();
     $this->lblToAddress->Text = $this->objShipment->ToAddress->__toStringWithLink();
     if (QApplication::$TracmorSettings->CustomShipmentNumbers) {
         $this->lblShipmentNumber->Text = $this->objShipment->ShipmentNumber;
     }
     $this->lblCourier->Text = $this->objShipment->CourierId ? $this->objShipment->Courier->__toString() : "Other";
     $this->lblTrackingNumber->Text = $this->objShipment->__toStringTrackingNumber();
     $this->pnlNote->Text = nl2br($this->objShipment->Transaction->Note);
     if ($this->objFedexShipment) {
         $this->lblToPhone->Text = $this->objFedexShipment->ToPhone;
         $this->lblBillTransportationTo->Text = $this->objFedexShipment->FedexServiceTypeId == 6 ? FedExDC::ground_pay_type($this->objFedexShipment->PayType) : FedExDC::express_pay_type($this->objFedexShipment->PayType);
         $this->lblPayerAccount->Text = $this->objFedexShipment->PayType === 1 ? $this->objFedexShipment->ShippingAccount->__toString() : $this->objFedexShipment->PayerAccountNumber;
         $this->lblReference->Text = $this->objFedexShipment->Reference;
         $this->lblFedexNotifySenderEmail->Text = $this->objFedexShipment->NotifySenderEmail;
         $this->lblFedexNotifyRecipientEmail->Text = $this->objFedexShipment->NotifyRecipientEmail;
         $this->lblFedexNotifyOtherEmail->Text = $this->objFedexShipment->NotifyOtherEmail;
         $this->lblFxServiceType->Text = $this->objFedexShipment->FedexServiceType ? $this->objFedexShipment->FedexServiceType->__toString() : '';
         $this->lblPackageType->Text = $this->objFedexShipment->PackageType ? $this->objFedexShipment->PackageType->__toString() : '';
         $this->lblPackageWeight->Text = $this->objFedexShipment->PackageWeight;
         $this->lblPackageLength->Text = $this->objFedexShipment->PackageLength;
         $this->lblPackageWidth->Text = $this->objFedexShipment->PackageWidth;
         $this->lblPackageHeight->Text = $this->objFedexShipment->PackageHeight;
         $this->lblValue->Text = $this->objFedexShipment->DeclaredValue;
         $this->lblWeightUnit->Text = $this->objFedexShipment->WeightUnit->__toString();
         $this->lblLengthUnit->Text = $this->objFedexShipment->LengthUnit->__toString();
         $this->lblCurrencyUnit->Text = $this->objFedexShipment->CurrencyUnit->__toString();
         $this->lblHoldAtLocationAddress->Text = $this->objFedexShipment->HoldAtLocationAddress;
         $this->lblHoldAtLocationCity->Text = $this->objFedexShipment->HoldAtLocationCity;
         $this->lblHoldAtLocationState->Text = $this->objFedexShipment->HoldAtLocationStateObject ? $this->objFedexShipment->HoldAtLocationStateObject->__toString() : '';
         $this->lblHoldAtLocationPostalCode->Text = $this->objFedexShipment->HoldAtLocationPostalCode;
         $this->lblFedexLabelPrinterType->Text = FedExDC::label_printer_type($this->objFedexShipment->LabelPrinterType);
         $this->lblFedexLabelFormatType->Text = FedExDC::label_format_type($this->objFedexShipment->LabelFormatType);
         $this->lblFedexThermalPrinterPort->Text = $this->objFedexShipment->ThermalPrinterPort;
     }
     // Update custom labels
     if ($this->arrCustomFields) {
         CustomField::UpdateLabels($this->arrCustomFields);
     }
 }