本文整理匯總了PHP中Kit::getBarcode方法的典型用法代碼示例。如果您正苦於以下問題:PHP Kit::getBarcode方法的具體用法?PHP Kit::getBarcode怎麽用?PHP Kit::getBarcode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Kit
的用法示例。
在下文中一共展示了Kit::getBarcode方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getKitProductInfo
public function getKitProductInfo()
{
$html = '<div class="kit-product">';
$html .= '<h4>' . $this->kit->getBarcode() . '</h4>';
$html .= '<div>[' . $this->kit->getProduct()->getSku() . ']' . $this->kit->getProduct()->getName() . '</div>';
$html .= '</div>';
return $html;
}
示例2: createAsAKit
/**
* a product is created as a kit
*
* @param string $comments
* @param BaseEntityAbstract $entity
*/
public function createAsAKit($comments, Kit $entity)
{
$task = $entity instanceof Kit ? $entity->getTask() : null;
return $this->setStockOnHand(($originalStockOnHand = $this->getStockOnHand()) + 1)->setTotalOnHandValue(($originalTotalOnHandValue = $this->getTotalOnHandValue()) + $entity->getCost())->snapshotQty($entity instanceof BaseEntityAbstract ? $entity : $this, ProductQtyLog::TYPE_WORKSHOP, 'Created a Kit[' . $entity->getBarcode() . '] with value(cost=' . StringUtilsAbstract::getCurrency($entity->getCost()) . ')' . ($task instanceof Task ? ' generated from Task[' . $task->getId() . ']' : '') . (trim($comments) === '' ? '.' : ': ' . $comments))->save()->addLog('StockOnHand(' . $originalStockOnHand . ' => ' . $this->getStockOnHand() . '), StockOnHandValue(' . $originalTotalOnHandValue . ' => ' . $this->getTotalOnHandValue() . ')' . (trim($comments) === '' ? '.' : ': ' . $comments), Log::TYPE_SYSTEM, 'STOCK_QTY_CHG', __CLASS__ . '::' . __FUNCTION__);
}