当前位置: 首页>>代码示例>>PHP>>正文


PHP Receipt::LoadByTransactionId方法代码示例

本文整理汇总了PHP中Receipt::LoadByTransactionId方法的典型用法代码示例。如果您正苦于以下问题:PHP Receipt::LoadByTransactionId方法的具体用法?PHP Receipt::LoadByTransactionId怎么用?PHP Receipt::LoadByTransactionId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Receipt的用法示例。


在下文中一共展示了Receipt::LoadByTransactionId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __toStringWithLink

 public function __toStringWithLink()
 {
     // Shipment
     if ($this->TransactionTypeId == 6) {
         $objShipment = Shipment::LoadByTransactionId($this->TransactionId);
         if ($objShipment) {
             $strToReturn = sprintf('<a href="../shipping/shipment_edit.php?intShipmentId=%s">Ship</a>', $objShipment->ShipmentId);
         } else {
             $strToReturn = '';
         }
     } elseif ($this->TransactionTypeId == 7) {
         $objReceipt = Receipt::LoadByTransactionId($this->TransactionId);
         if ($objReceipt) {
             $strToReturn = sprintf('<a href="../receiving/receipt_edit.php?intReceiptId=%s">Receipt</a>', $objReceipt->ReceiptId);
         } else {
             $strToReturn = '';
         }
     } else {
         $strToReturn = sprintf('<a href="../common/transaction_edit.php?intTransactionId=%s">%s</a>', $this->TransactionId, $this->TransactionType->__toString());
     }
     return $strToReturn;
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:22,代码来源:Transaction.class.php

示例2: __get

 /**
  * Override method to perform a property "Get"
  * This will get the value of $strName
  *
  * @param string $strName Name of the property to get
  * @return mixed
  */
 public function __get($strName)
 {
     switch ($strName) {
         ///////////////////
         // Member Variables
         ///////////////////
         case 'TransactionId':
             // Gets the value for intTransactionId (Read-Only PK)
             // @return integer
             return $this->intTransactionId;
         case 'EntityQtypeId':
             // Gets the value for intEntityQtypeId (Not Null)
             // @return integer
             return $this->intEntityQtypeId;
         case 'TransactionTypeId':
             // Gets the value for intTransactionTypeId (Not Null)
             // @return integer
             return $this->intTransactionTypeId;
         case 'Note':
             // Gets the value for strNote
             // @return string
             return $this->strNote;
         case 'CreatedBy':
             // Gets the value for intCreatedBy
             // @return integer
             return $this->intCreatedBy;
         case 'CreationDate':
             // Gets the value for dttCreationDate
             // @return QDateTime
             return $this->dttCreationDate;
         case 'ModifiedBy':
             // Gets the value for intModifiedBy
             // @return integer
             return $this->intModifiedBy;
         case 'ModifiedDate':
             // Gets the value for strModifiedDate (Read-Only Timestamp)
             // @return string
             return $this->strModifiedDate;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'TransactionType':
             // Gets the value for the TransactionType object referenced by intTransactionTypeId (Not Null)
             // @return TransactionType
             try {
                 if (!$this->objTransactionType && !is_null($this->intTransactionTypeId)) {
                     $this->objTransactionType = TransactionType::Load($this->intTransactionTypeId);
                 }
                 return $this->objTransactionType;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'CreatedByObject':
             // Gets the value for the UserAccount object referenced by intCreatedBy
             // @return UserAccount
             try {
                 if (!$this->objCreatedByObject && !is_null($this->intCreatedBy)) {
                     $this->objCreatedByObject = UserAccount::Load($this->intCreatedBy);
                 }
                 return $this->objCreatedByObject;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ModifiedByObject':
             // Gets the value for the UserAccount object referenced by intModifiedBy
             // @return UserAccount
             try {
                 if (!$this->objModifiedByObject && !is_null($this->intModifiedBy)) {
                     $this->objModifiedByObject = UserAccount::Load($this->intModifiedBy);
                 }
                 return $this->objModifiedByObject;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Receipt':
             // Gets the value for the Receipt object that uniquely references this Transaction
             // by objReceipt (Unique)
             // @return Receipt
             try {
                 if ($this->objReceipt === false) {
                     // We've attempted early binding -- and the reverse reference object does not exist
                     return null;
                 }
                 if (!$this->objReceipt) {
                     $this->objReceipt = Receipt::LoadByTransactionId($this->intTransactionId);
                 }
                 return $this->objReceipt;
//.........这里部分代码省略.........
开发者ID:proxymoron,项目名称:tracmor,代码行数:101,代码来源:TransactionGen.class.php

示例3: __toStringVerbWithLink

 public function __toStringVerbWithLink()
 {
     if ($this->TransactionTypeId == 6) {
         $objShipment = Shipment::LoadByTransactionId($this->TransactionId);
         if ($objShipment) {
             if ($objShipment->ShippedFlag) {
                 $verb = 'shipped';
             } else {
                 $verb = 'scheduled shipment';
             }
             $strToReturn = sprintf('<a href="../shipping/shipment_edit.php?intShipmentId=%s">%s</a>', $objShipment->ShipmentId, $verb);
         } else {
             $strToReturn = '';
         }
     } elseif ($this->TransactionTypeId == 7) {
         $objReceipt = Receipt::LoadByTransactionId($this->TransactionId);
         if ($objReceipt) {
             if ($objReceipt->ReceivedFlag) {
                 $verb = 'received';
             } else {
                 $verb = 'scheduled receipt';
             }
             $strToReturn = sprintf('<a href="../receiving/receipt_edit.php?intReceiptId=%s">%s</a>', $objReceipt->ReceiptId, $verb);
         } else {
             $strToReturn = '';
         }
     } else {
         $verb = strtolower($this->TransactionType->__toString());
         if (str_word_count($verb) > 1) {
             $verb = explode(" ", $verb);
             $verb = $verb[0] . 'ed ' . $verb[1];
         } else {
             $verb = $verb . 'd';
         }
         $strToReturn = sprintf('<a href="../common/transaction_edit.php?intTransactionId=%s">%s</a>', $this->TransactionId, $verb);
     }
     return $strToReturn;
     return '';
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:39,代码来源:Transaction.class.php

示例4: __toStringData

 public function __toStringData()
 {
     switch ($this->Transaction->TransactionTypeId) {
         case 1:
             return sprintf('from %s to %s', $this->__toStringSourceLocation(), $this->__toStringDestinationLocation());
             break;
         case 2:
             if ($this->Transaction->ModifiedByObject instanceof UserAccount) {
                 $user = $this->Transaction->ModifiedByObject->__toStringFullName();
             } else {
                 $user = $this->Transaction->CreatedByObject->__toStringFullName();
             }
             return sprintf('from %s to %s', $user, $this->__toStringDestinationLocation());
             break;
         case 3:
             if ($this->AssetTransactionCheckout) {
                 if ($this->AssetTransactionCheckout->ToContactId) {
                     $strToReturn = $this->AssetTransactionCheckout->ToContact->__toStringWithLink();
                 } else {
                     $strToReturn = $this->AssetTransactionCheckout->ToUser->__toStringFullName();
                 }
             } else {
                 $strToReturn = $this->Transaction->CreatedByObject->__toStringFullName();
             }
             return sprintf('from %s to %s', $this->__toStringSourceLocation(), $strToReturn);
             break;
         case 6:
             $this->Transaction->Shipment = Shipment::LoadByTransactionId($this->TransactionId);
             return sprintf('from %s to %s', $this->__toStringSourceLocation(), $this->Transaction->ToStringCompanyWithLink());
             break;
         case 7:
             $this->Transaction->Receipt = Receipt::LoadByTransactionId($this->TransactionId);
             if ($this->Transaction->Receipt->ReceivedFlag) {
                 return sprintf('from %s to %s', $this->Transaction->ToStringCompanyWithLink(), $this->__toStringDestinationLocation());
             } else {
                 return sprintf('from %s', $this->Transaction->ToStringCompanyWithLink());
             }
             break;
         default:
             return '';
             break;
     }
 }
开发者ID:jdellinger,项目名称:tracmor,代码行数:43,代码来源:AssetTransaction.class.php


注:本文中的Receipt::LoadByTransactionId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。