• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getProductName函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getProductName函数的典型用法代码示例。如果您正苦于以下问题:PHP getProductName函数的具体用法?PHP getProductName怎么用?PHP getProductName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: updateStk

/**
 * This function updates the stock information once the product is ordered.
 * Param $productid - product id
 * Param $qty - product quantity in no's
 * Param $mode - mode type
 * Param $ext_prod_arr - existing products ** NOT USED: empty **
 * Param $module - module name
 * return type void
 */
function updateStk($product_id, $qty, $mode, $ext_prod_arr, $module)
{
    global $log, $adb, $current_user;
    $log->debug("Entering updateStk({$product_id},{$qty},{$mode},{$module}) method ...");
    $prod_name = getProductName($product_id);
    $qtyinstk = getPrdQtyInStck($product_id);
    $log->debug("Prd Qty in Stock " . $qtyinstk);
    $upd_qty = $qtyinstk - $qty;
    sendPrdStckMail($product_id, $upd_qty, $prod_name, $qtyinstk, $qty, $module);
    $log->debug("Exiting updateStk method ...");
}
开发者ID:kduqi,项目名称:corebos,代码行数:20,代码来源:InventoryUtils.php


示例2: updateStk

/**
 * This function updates the stock information once the product is ordered.
 * Param $productid - product id
 * Param $qty - product quantity in no's
 * Param $mode - mode type
 * Param $ext_prod_arr - existing vtiger_products
 * Param $module - module name
 * return type void
 */
function updateStk($product_id, $qty, $mode, $ext_prod_arr, $module)
{
    $log = vglobal('log');
    $log->debug("Entering updateStk(" . $product_id . "," . $qty . "," . $mode . "," . $ext_prod_arr . "," . $module . ") method ...");
    $adb = PearDatabase::getInstance();
    $current_user = vglobal('current_user');
    $log->debug("Inside updateStk function, module=" . $module);
    $log->debug("Product Id = {$product_id} & Qty = {$qty}");
    $prod_name = getProductName($product_id);
    $qtyinstk = getPrdQtyInStck($product_id);
    $log->debug("Prd Qty in Stock " . $qtyinstk);
    $upd_qty = $qtyinstk - $qty;
    $log->debug("Exiting updateStk method ...");
}
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:23,代码来源:InventoryUtils.php


示例3: updateStk

/**
 * This function updates the stock information once the product is ordered.
 * Param $productid - product id
 * Param $qty - product quantity in no's
 * Param $mode - mode type
 * Param $ext_prod_arr - existing vtiger_products
 * Param $module - module name
 * return type void
 */
function updateStk($product_id, $qty, $mode, $ext_prod_arr, $module)
{
    global $log;
    $log->debug("Entering updateStk(" . $product_id . "," . $qty . "," . $mode . "," . $ext_prod_arr . "," . $module . ") method ...");
    global $adb;
    global $current_user;
    $log->debug("Inside updateStk function, module=" . $module);
    $log->debug("Product Id = {$product_id} & Qty = {$qty}");
    $prod_name = getProductName($product_id);
    $qtyinstk = getPrdQtyInStck($product_id);
    $log->debug("Prd Qty in Stock " . $qtyinstk);
    $upd_qty = $qtyinstk - $qty;
    $log->debug("Exiting updateStk method ...");
}
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:23,代码来源:InventoryUtils.php


示例4: getArticleIdTime

function getArticleIdTime($faqid, $product_id, $faqcategory, $faqcreatedtime, $faqmodifiedtime)
{
    $list .= '<div id="faqDetail" onMouseOver="fnShowDiv(\'faqDetail\')" onMouseOut="fnHideDiv(\'faqDetail\')">
		 <table class="fagView" cellpadding="0" cellspacing="0">
		   <tr>
			<td align="right"><b>' . getTranslatedString('LBL_FAQ_ID') . ': </b></td><td align="left"><b>' . $faqid . '</b></td>
		   </tr>
		   <tr>
			<td align="right">' . getTranslatedString('LBL_PRODUCT') . ': </td><td align="left">' . getProductName($product_id) . '</td>
		   </tr>
		   <tr>
			<td align="right">' . getTranslatedString('LBL_CATEGORY') . ': </td><td align="left">' . $faqcategory . '</td>
		   </tr>
		   <tr>
			<td align="right">' . getTranslatedString('LBL_CREATED_DATE') . ': </td><td align="left">' . substr($faqcreatedtime, 0, 10) . '</td>
		   </tr>
		   <tr>
			<td align="right" nowrap>' . getTranslatedString('LBL_MODIFIED_DATE') . ': </td><td align="left">' . substr($faqmodifiedtime, 0, 10) . '</td>
		   </tr>
		</table>
		</div>';
    return $list;
}
开发者ID:chaudhary4k4,项目名称:vtigercrm,代码行数:23,代码来源:Utils.php


示例5: array

 *  Author       : Opencubed
 *************************************************************************************************/
$kaction = $_REQUEST['kaction'];
global $adb;
require_once "modules/Adocdetail/Adocdetail.php";
$content = array();
if ($kaction == 'retrieve') {
    $query = $adb->pquery("Select * from vtiger_adocdetail a \n                    join vtiger_crmentity ce on a.adocdetailid=ce.crmid \n                    where ce.deleted=0 and a.adoctomaster=?", array($_REQUEST['record']));
    $count = $adb->num_rows($query);
    for ($i = 0; $i < $count; $i++) {
        $content[$i]['adocdetailid'] = $adb->query_result($query, $i, 'adocdetailid');
        $content[$i]['adocdetailno'] = $adb->query_result($query, $i, 'adocdetailno');
        $content[$i]['adocdetailname'] = $adb->query_result($query, $i, 'adocdetailname');
        $content[$i]['nrline'] = $adb->query_result($query, $i, 'nrline');
        $product = $adb->query_result($query, $i, 'adoc_product');
        $content[$i]['adoc_product'] = getProductName($product);
        $content[$i]['urlproduct'] = 'index.php?module=Products&action=DetailView&record=' . $product;
        $content[$i]['url'] = 'index.php?module=Adocdetail&action=DetailView&record=' . $content[$i]['adocdetailid'];
        $content[$i]['adoc_quantity'] = $adb->query_result($query, $i, 'adoc_quantity');
        $content[$i]['adoc_price'] = $adb->query_result($query, $i, 'adoc_price');
        $content[$i]['inout_docnr'] = $adb->query_result($query, $i, 'inout_docnr');
        $content[$i]['poteknema'] = $adb->query_result($query, $i, 'poteknema');
        $content[$i]['posupplier'] = $adb->query_result($query, $i, 'posupplier');
        $content[$i]['riferimento'] = $adb->query_result($query, $i, 'riferimento');
        $stockid = $adb->query_result($query, $i, 'adoc_stock');
        $stock = getEntityName('Stock', $stockid);
        $content[$i]['adoc_stock'] = $stock[$stockid];
        $content[$i]['urlstock'] = 'index.php?module=Stock&action=DetailView&record=' . $stockid;
    }
    echo json_encode($content);
} elseif ($kaction == 'update') {
开发者ID:evolutivo,项目名称:test,代码行数:31,代码来源:KendoContent.php


示例6: getRecordValues

/** To get the converted record values which have to be display in duplicates merging tpl*/
function getRecordValues($id_array, $module)
{
    global $adb, $current_user;
    global $app_strings;
    global $mod_strings;
    $tabid = getTabid($module);
    $query = "select fieldname,fieldlabel from ec_field where tabid=" . $tabid . " and fieldname  not in ('createdtime','modifiedtime')";
    $result = $adb->query($query);
    $no_rows = $adb->num_rows($result);
    for ($i = 0; $i < $no_rows; $i++) {
        $fld_name = $adb->query_result($result, $i, "fieldname");
        if (getFieldVisibilityPermission($module, $current_user->id, $fld_name) == '0') {
            $fld_array[] = $fld_name;
        }
    }
    $js_arr = $fld_array;
    $focus = new $module();
    if (isset($id_array) && $id_array != '') {
        foreach ($id_array as $value) {
            $focus->id = $value;
            $focus->retrieve_entity_info($value, $module);
            $field_values[] = $focus->column_fields;
        }
    }
    $tabid = getTabid($module);
    $query = "select fieldname,uitype,fieldlabel from ec_field where tabid=" . $tabid . " and fieldname not in ('createdtime','modifiedtime','lastcontacttime')";
    $result = $adb->query($query);
    $no_rows = $adb->num_rows($result);
    $labl_array = array();
    $value_pair = array();
    $c = 0;
    for ($i = 0; $i < $no_rows; $i++) {
        $fld_name = $adb->query_result($result, $i, "fieldname");
        $fld_label = $adb->query_result($result, $i, "fieldlabel");
        if (isset($mod_strings[$fld_label])) {
            $fld_label = $mod_strings[$fld_label];
        }
        $ui_type = $adb->query_result($result, $i, "uitype");
        if (getFieldVisibilityPermission($module, $current_user->id, $fld_name) == '0') {
            $record_values[$c][$fld_label] = array();
            $ui_value[] = $ui_type;
            for ($j = 0; $j < count($field_values); $j++) {
                if ($ui_type == 56) {
                    if ($field_values[$j][$fld_name] == 0) {
                        $value_pair['disp_value'] = $app_strings['no'];
                    } else {
                        $value_pair['disp_value'] = $app_strings['yes'];
                    }
                } elseif ($ui_type == 51 || $ui_type == 50) {
                    $account_id = $field_values[$j][$fld_name];
                    $account_name = getAccountName($account_id);
                    $value_pair['disp_value'] = $account_name;
                } elseif ($ui_type == 53) {
                    $user_id = $field_values[$j][$fld_name];
                    $username = getUserName($user_id);
                    $group_info = getGroupName($field_values[$j]['record_id'], $module);
                    $groupname = $group_info[0];
                    $groupid = $group_info[1];
                    if ($user_id != 0) {
                        $value_pair['disp_value'] = $username;
                    } else {
                        $value_pair['disp_value'] = $groupname;
                    }
                } elseif ($ui_type == 57) {
                    $contact_id = $field_values[$j][$fld_name];
                    if ($contact_id != '') {
                        $contactname = getContactName($contact_id);
                    }
                    $value_pair['disp_value'] = $contactname;
                } elseif ($ui_type == 75 || $ui_type == 81) {
                    $vendor_id = $field_values[$j][$fld_name];
                    if ($vendor_id != '') {
                        $vendor_name = getVendorName($vendor_id);
                    }
                    $value_pair['disp_value'] = $vendor_name;
                } elseif ($ui_type == 52) {
                    $user_id = $field_values[$j][$fld_name];
                    $user_name = getUserName($user_id);
                    $value_pair['disp_value'] = $user_name;
                } elseif ($ui_type == 68) {
                    $parent_id = $field_values[$j][$fld_name];
                    $value_pair['disp_value'] = getAccountName($parent_id);
                    if ($value_pair['disp_value'] == '' || $value_pair['disp_value'] == NULL) {
                        $value_pair['disp_value'] = getContactName($parent_id);
                    }
                } elseif ($ui_type == 59) {
                    $product_name = getProductName($field_values[$j][$fld_name]);
                    if ($product_name != '') {
                        $value_pair['disp_value'] = $product_name;
                    } else {
                        $value_pair['disp_value'] = '';
                    }
                } elseif ($ui_type == 58) {
                    $campaign_name = getCampaignName($field_values[$j][$fld_name]);
                    if ($campaign_name != '') {
                        $value_pair['disp_value'] = $campaign_name;
                    } else {
                        $value_pair['disp_value'] = '';
                    }
//.........这里部分代码省略.........
开发者ID:ruckfull,项目名称:taobaocrm,代码行数:101,代码来源:CommonUtils.php


示例7: getPriceDetailsForProduct

}
$smarty->assign("TAX_DETAILS", $tax_details);
//Tax handling - ends
$unit_price = $focus->column_fields['unit_price'];
$price_details = getPriceDetailsForProduct($productid, $unit_price, 'available', $currentModule);
$smarty->assign("PRICE_DETAILS", $price_details);
$base_currency = 'curname' . $product_base_currency;
$smarty->assign("BASE_CURRENCY", $base_currency);
if (isset($focus->id) && $_REQUEST['isDuplicate'] != 'true') {
    $is_parent = $focus->isparent_check();
} else {
    $is_parent = 0;
}
$smarty->assign("IS_PARENT", $is_parent);
if ($_REQUEST['return_module'] == 'Products' && isset($_REQUEST['return_action'])) {
    $return_name = getProductName($_REQUEST['return_id']);
    $smarty->assign("RETURN_NAME", $return_name);
}
if ($errormessage == 2) {
    $msg = $mod_strings['LBL_MAXIMUM_LIMIT_ERROR'];
    $errormessage = "<B><font color='red'>" . $msg . "</font></B> <br><br>";
} else {
    if ($errormessage == 3) {
        $msg = $mod_strings['LBL_UPLOAD_ERROR'];
        $errormessage = "<B><font color='red'>" . $msg . "</font></B> <br><br>";
    } else {
        if ($errormessage == "image") {
            $msg = $mod_strings['LBL_IMAGE_ERROR'];
            $errormessage = "<B><font color='red'>" . $msg . "</font></B> <br><br>";
        } else {
            if ($errormessage == "invalid") {
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:31,代码来源:EditView.php


示例8: getDetailAssociatedProducts

/** This function returns a HTML output of associated vtiger_products for a given entity (Quotes,Invoice,Sales order or Purchase order)
 * Param $module - module name
 * Param $focus - module object
 * Return type string
 */
function getDetailAssociatedProducts($module, $focus)
{
    global $log;
    $log->debug("Entering getDetailAssociatedProducts(" . $module . "," . get_class($focus) . ") method ...");
    global $adb;
    global $mod_strings;
    global $theme;
    global $log;
    global $app_strings, $current_user;
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    if (vtlib_isModuleActive("Products")) {
        $hide_stock = 'no';
    } else {
        $hide_stock = 'yes';
    }
    if ($module != 'PurchaseOrder') {
        if (GlobalVariable::getVariable('B2B', '1') == '1') {
            $acvid = $focus->column_fields['account_id'];
        } else {
            $acvid = $focus->column_fields['contact_id'];
        }
        if ($hide_stock == 'no') {
            $colspan = '2';
        } else {
            $colspan = '1';
        }
    } else {
        $acvid = $focus->column_fields['vendor_id'];
        $colspan = '1';
    }
    //Get the taxtype of this entity
    $taxtype = getInventoryTaxType($module, $focus->id);
    $currencytype = getInventoryCurrencyInfo($module, $focus->id);
    $output = '';
    //Header Rows
    $output .= '

	<table width="100%"  border="0" align="center" cellpadding="5" cellspacing="0" class="crmTable" id="proTab">
	   <tr valign="top">
	   	<td colspan="' . $colspan . '" class="dvInnerHeader"><b>' . $app_strings['LBL_ITEM_DETAILS'] . '</b></td>
		<td class="dvInnerHeader" align="center" colspan="2"><b>' . $app_strings['LBL_CURRENCY'] . ' : </b>' . getTranslatedCurrencyString($currencytype['currency_name']) . ' (' . $currencytype['currency_symbol'] . ')
		</td>
		<td class="dvInnerHeader" align="center" colspan="2"><b>' . $app_strings['LBL_TAX_MODE'] . ' : </b>' . $app_strings[$taxtype] . '
		</td>
	   </tr>
	   <tr valign="top">
		<td width=40% class="lvtCol"><font color="red">*</font>
			<b>' . $app_strings['LBL_ITEM_NAME'] . '</b>
		</td>';
    //Add Quantity in Stock column for SO, Quotes and Invoice
    if (($module == 'Quotes' || $module == 'SalesOrder' || $module == 'Invoice') && $hide_stock == 'no') {
        $output .= '<td width=10% class="lvtCol"><b>' . $app_strings['LBL_QTY_IN_STOCK'] . '</b></td>';
    }
    $output .= '

		<td width=10% class="lvtCol"><b>' . $app_strings['LBL_QTY'] . '</b></td>
		<td width=10% class="lvtCol" align="right"><b>' . $app_strings['LBL_LIST_PRICE'] . '</b></td>
		<td width=12% nowrap class="lvtCol" align="right"><b>' . $app_strings['LBL_TOTAL'] . '</b></td>
		<td width=13% valign="top" class="lvtCol" align="right"><b>' . $app_strings['LBL_NET_PRICE'] . '</b></td>
	   </tr>
	   	';
    // DG 15 Aug 2006
    // Add "ORDER BY sequence_no" to retain add order on all inventoryproductrel items
    if ($module == 'Quotes' || $module == 'PurchaseOrder' || $module == 'SalesOrder' || $module == 'Invoice') {
        $query = "select case when vtiger_products.productid != '' then vtiger_products.productname else vtiger_service.servicename end as productname," . " case when vtiger_products.productid != '' then 'Products' else 'Services' end as entitytype," . " case when vtiger_products.productid != '' then vtiger_products.unit_price else vtiger_service.unit_price end as unit_price," . " case when vtiger_products.productid != '' then vtiger_products.qtyinstock else 'NA' end as qtyinstock, vtiger_inventoryproductrel.* " . " from vtiger_inventoryproductrel" . " left join vtiger_products on vtiger_products.productid=vtiger_inventoryproductrel.productid " . " left join vtiger_service on vtiger_service.serviceid=vtiger_inventoryproductrel.productid " . " where id=? ORDER BY sequence_no";
    }
    $result = $adb->pquery($query, array($focus->id));
    $num_rows = $adb->num_rows($result);
    $netTotal = '0.00';
    for ($i = 1; $i <= $num_rows; $i++) {
        $sub_prod_query = $adb->pquery("SELECT productid from vtiger_inventorysubproductrel WHERE id=? AND sequence_no=?", array($focus->id, $i));
        $subprodname_str = '';
        if ($adb->num_rows($sub_prod_query) > 0) {
            for ($j = 0; $j < $adb->num_rows($sub_prod_query); $j++) {
                $sprod_id = $adb->query_result($sub_prod_query, $j, 'productid');
                $sprod_name = getProductName($sprod_id);
                $str_sep = "";
                if ($j > 0) {
                    $str_sep = ":";
                }
                $subprodname_str .= $str_sep . " - " . $sprod_name;
            }
        }
        $subprodname_str = str_replace(":", "<br>", $subprodname_str);
        $productid = $adb->query_result($result, $i - 1, 'productid');
        $entitytype = $adb->query_result($result, $i - 1, 'entitytype');
        $productname = $adb->query_result($result, $i - 1, 'productname');
        $productname = '<a href="index.php?action=DetailView&record=' . $productid . '&module=' . $entitytype . '">' . $productname . '</a>';
        if ($subprodname_str != '') {
            $productname .= "<br/><span style='color:#C0C0C0;font-style:italic;'>" . $subprodname_str . "</span>";
        }
        $comment = $adb->query_result($result, $i - 1, 'comment');
        $qtyinstock = $adb->query_result($result, $i - 1, 'qtyinstock');
        $qty = $adb->query_result($result, $i - 1, 'quantity');
//.........这里部分代码省略.........
开发者ID:jaimeaga84,项目名称:corebos,代码行数:101,代码来源:DetailViewUtils.php


示例9: getAssociatedProducts

 function getAssociatedProducts($module, $focus, $seid = '')
 {
     $log = vglobal('log');
     $log->debug("Entering Calculations_Record_Model getAssociatedProducts(" . $module . "," . get_class($focus) . "," . $seid . "='') method ...");
     $adb = PearDatabase::getInstance();
     $output = '';
     global $theme;
     $no_of_decimal_places = getCurrencyDecimalPlaces();
     $theme_path = "themes/" . $theme . "/";
     $image_path = $theme_path . "images/";
     $product_Detail = array();
     if ($module == 'Calculations') {
         $query = "SELECT\n\t\t\t\t\t\tcase when vtiger_products.productid != '' then vtiger_products.productname else vtiger_service.servicename end as productname,\n\t\t\t\t\t\tcase when vtiger_products.productid != '' then vtiger_products.productcode else vtiger_service.service_no end as productcode,\n\t\t\t\t\t\tcase when vtiger_products.productid != '' then vtiger_products.unit_price else vtiger_service.unit_price end as unit_price,\n\t\t\t\t\t\tcase when vtiger_products.productid != '' then vtiger_products.qtyinstock else 'NA' end as qtyinstock,\n\t\t\t\t\t\tcase when vtiger_products.productid != '' then 'Products' else 'Services' end as entitytype,\n\t\t\t\t\t\t\t\t\tvtiger_calculationsproductrel.listprice,\n\t\t\t\t\t\t\t\t\tvtiger_calculationsproductrel.description AS product_description,\n\t\t\t\t\t\t\t\t\tvtiger_calculationsproductrel.*,vtiger_crmentity.deleted,\n\t\t\t\t\t\t\t\t\tvtiger_products.usageunit,\n\t\t\t\t\t\t\t\t\tvtiger_service.service_usageunit\n\t\t\t\t\t\t\t\t\tFROM vtiger_calculationsproductrel\n\t\t\t\t\t\t\t\t\tLEFT JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_calculationsproductrel.productid\n\t\t\t\t\t\t\t\t\tLEFT JOIN vtiger_products\n\t\t\t\t\t\t\t\t\t\t\tON vtiger_products.productid=vtiger_calculationsproductrel.productid\n\t\t\t\t\t\t\t\t\tLEFT JOIN vtiger_service\n\t\t\t\t\t\t\t\t\t\t\tON vtiger_service.serviceid=vtiger_calculationsproductrel.productid\n\t\t\t\t\t\t\t\t\tWHERE id=?\n\t\t\t\t\t\t\t\t\tORDER BY sequence_no";
         $params = array($focus->id);
     } elseif ($module == 'Products') {
         $query = "SELECT\n\t\t\t\t\t\t\t\t\tvtiger_products.productid,\n\t\t\t\t\t\t\t\t\tvtiger_products.productcode,\n\t\t\t\t\t\t\t\t\tvtiger_products.productname,\n\t\t\t\t\t\t\t\t\tvtiger_products.unit_price,\n\t\t\t\t\t\t\t\t\tvtiger_products.usageunit,\n\t\t\t\t\t\t\t\t\tvtiger_products.qtyinstock,vtiger_crmentity.deleted,\n\t\t\t\t\t\t\t\t\tvtiger_crmentity.description AS product_description,\n\t\t\t\t\t\t\t\t\t'Products' AS entitytype\n\t\t\t\t\t\t\t\t\tFROM vtiger_products\n\t\t\t\t\t\t\t\t\tINNER JOIN vtiger_crmentity\n\t\t\t\t\t\t\t\t\t\t\tON vtiger_crmentity.crmid=vtiger_products.productid\n\t\t\t\t\t\t\t\t\tWHERE vtiger_crmentity.deleted=0\n\t\t\t\t\t\t\t\t\t\t\tAND productid=?";
         $params = array($seid);
     } elseif ($module == 'Services') {
         $query = "SELECT\n\t\t\t\t\t\t\t\t\tvtiger_service.serviceid AS productid,\n\t\t\t\t\t\t\t\t\t'NA' AS productcode,\n\t\t\t\t\t\t\t\t\tvtiger_service.servicename AS productname,\n\t\t\t\t\t\t\t\t\tvtiger_service.unit_price AS unit_price,\n\t\t\t\t\t\t\t\t\tvtiger_service.service_usageunit AS usageunit,\n\t\t\t\t\t\t\t\t\t'NA' AS qtyinstock,vtiger_crmentity.deleted,\n\t\t\t\t\t\t\t\t\tvtiger_crmentity.description AS product_description,\n\t\t\t\t\t\t\t\t\t'Services' AS entitytype\n\t\t\t\t\t\t\t\t\tFROM vtiger_service\n\t\t\t\t\t\t\t\t\tINNER JOIN vtiger_crmentity\n\t\t\t\t\t\t\t\t\t\t\tON vtiger_crmentity.crmid=vtiger_service.serviceid\n\t\t\t\t\t\t\t\t\tWHERE vtiger_crmentity.deleted=0\n\t\t\t\t\t\t\t\t\t\t\tAND serviceid=?";
         $params = array($seid);
     }
     $result = $adb->pquery($query, $params);
     $num_rows = $adb->num_rows($result);
     for ($i = 1; $i <= $num_rows; $i++) {
         $deleted = $adb->query_result($result, $i - 1, 'deleted');
         $hdnProductId = $adb->query_result($result, $i - 1, 'productid');
         $hdnProductcode = $adb->query_result($result, $i - 1, 'productcode');
         $productname = $adb->query_result($result, $i - 1, 'productname');
         $productdescription = $adb->query_result($result, $i - 1, 'product_description');
         $comment = decode_html($adb->query_result($result, $i - 1, 'comment'));
         $qtyinstock = $adb->query_result($result, $i - 1, 'qtyinstock');
         $qty = $adb->query_result($result, $i - 1, 'quantity');
         $unitprice = $adb->query_result($result, $i - 1, 'unit_price');
         $listprice = $adb->query_result($result, $i - 1, 'listprice');
         $entitytype = $adb->query_result($result, $i - 1, 'entitytype');
         if ($entitytype == 'Services') {
             $usageunit = vtranslate($adb->query_result($result, $i - 1, 'service_usageunit'), $entitytype);
         } else {
             $usageunit = vtranslate($adb->query_result($result, $i - 1, 'usageunit'), $entitytype);
         }
         $rbh = $adb->query_result($result, $i - 1, 'rbh');
         $purchase = $adb->query_result($result, $i - 1, 'purchase');
         $margin = $adb->query_result($result, $i - 1, 'margin');
         $marginp = $adb->query_result($result, $i - 1, 'marginp');
         if ($deleted || !isset($deleted)) {
             $product_Detail[$i]['productDeleted' . $i] = true;
         } elseif (!$deleted) {
             $product_Detail[$i]['productDeleted' . $i] = false;
         }
         if (!empty($entitytype)) {
             $product_Detail[$i]['entityType' . $i] = $entitytype;
         }
         if ($listprice == '') {
             $listprice = $unitprice;
         }
         if ($qty == '') {
             $qty = 1;
         }
         //calculate productTotal
         $productTotal = $qty * $listprice;
         //Delete link in First column
         if ($i != 1) {
             $product_Detail[$i]['delRow' . $i] = "Del";
         }
         if (empty($focus->mode) && $seid != '') {
             $sub_prod_query = $adb->pquery("SELECT crmid as prod_id from vtiger_seproductsrel WHERE productid=? AND setype='Products'", array($seid));
         } else {
             $sub_prod_query = $adb->pquery("SELECT productid as prod_id from vtiger_inventorysubproductrel WHERE id=? AND sequence_no=?", array($focus->id, $i));
         }
         $subprodid_str = '';
         $subprodname_str = '';
         $subProductArray = array();
         if ($adb->num_rows($sub_prod_query) > 0) {
             for ($j = 0; $j < $adb->num_rows($sub_prod_query); $j++) {
                 $sprod_id = $adb->query_result($sub_prod_query, $j, 'prod_id');
                 $sprod_name = $subProductArray[] = getProductName($sprod_id);
                 $str_sep = "";
                 if ($j > 0) {
                     $str_sep = ":";
                 }
                 $subprodid_str .= $str_sep . $sprod_id;
                 $subprodname_str .= $str_sep . " - " . $sprod_name;
             }
         }
         $subprodname_str = str_replace(":", "<br>", $subprodname_str);
         $product_Detail[$i]['subProductArray' . $i] = $subProductArray;
         $product_Detail[$i]['hdnProductId' . $i] = $hdnProductId;
         $product_Detail[$i]['productName' . $i] = from_html($productname);
         /* Added to fix the issue Product Pop-up name display*/
         if ($_REQUEST['action'] == 'CreateSOPDF' || $_REQUEST['action'] == 'CreatePDF' || $_REQUEST['action'] == 'SendPDFMail') {
             $product_Detail[$i]['productName' . $i] = htmlspecialchars($product_Detail[$i]['productName' . $i]);
         }
         $product_Detail[$i]['hdnProductcode' . $i] = $hdnProductcode;
         $product_Detail[$i]['productDescription' . $i] = from_html($productdescription);
         if ($module == 'Potentials' || $module == 'Products' || $module == 'Services') {
             $product_Detail[$i]['comment' . $i] = $productdescription;
         } else {
             $product_Detail[$i]['comment' . $i] = $comment;
         }
         $listprice = number_format($listprice, $no_of_decimal_places, '.', '');
//.........这里部分代码省略.........
开发者ID:JeRRimix,项目名称:YetiForceCRM,代码行数:101,代码来源:Record.php


示例10: getValue

function getValue($uitype, $list_result, $fieldname, $focus, $module, $entity_id, $list_result_count, $mode, $popuptype, $returnset = '', $viewid = '')
{
    global $log;
    global $app_strings;
    //changed by dingjianting on 2007-11-05 for php5.2.x
    $log->debug("Entering getValue() method ...");
    global $adb, $current_user;
    if ($uitype == 10) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != "") {
            $value = "";
            $module_entityname = "";
            $modulename_lower = substr($fieldname, 0, -2);
            $modulename = ucfirst($modulename_lower);
            $modulesid = $modulename_lower . "id";
            $tablename = "ec_" . $modulename_lower;
            $entityname = substr($fieldname, 0, -3) . "name";
            $query = "SELECT {$entityname} FROM {$tablename} WHERE {$modulesid}='" . $temp_val . "' and deleted=0";
            $fldmod_result = $adb->query($query);
            $rownum = $adb->num_rows($fldmod_result);
            if ($rownum > 0) {
                $value = $adb->query_result($fldmod_result, 0, $entityname);
            }
        } else {
            $value = '';
        }
    } elseif ($uitype == 52 || $uitype == 53 || $uitype == 77) {
        $value = $adb->query_result($list_result, $list_result_count, 'user_name');
    } elseif ($uitype == 5 || $uitype == 6 || $uitype == 23 || $uitype == 70) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if (isValidDate($temp_val)) {
            $value = getDisplayDate($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 33) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = str_ireplace(' |##| ', ', ', $temp_val);
    } elseif ($uitype == 17) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = '<a href="http://' . $temp_val . '" target="_blank">' . $temp_val . '</a>';
    } elseif ($uitype == 13 || $uitype == 104) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = '<a href="' . getComposeMailUrl($temp_val) . '" target="_blank">' . $temp_val . '</a>';
    } elseif ($uitype == 56) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val == 1) {
            $value = 'yes';
        } else {
            $value = 'no';
        }
        //changed by dingjianting on 2006-10-15 for simplized chinese
        if (isset($app_strings[$value])) {
            $value = $app_strings[$value];
        }
    } elseif ($uitype == 51 || $uitype == 73 || $uitype == 50) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != '') {
            $value = getAccountName($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 59) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != '') {
            $value = getProductName($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 76) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != '') {
            $value = getPotentialName($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 80) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val != '') {
            $value = getSoName($temp_val);
        } else {
            $value = '';
        }
    } elseif ($uitype == 1004) {
        $value = $adb->query_result($list_result, $list_result_count, 'smcreatorid');
        $value = getUserName($value);
    } elseif ($uitype == 1007) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = getApproveStatusById($temp_val);
    } elseif ($uitype == 1008) {
        $value = $adb->query_result($list_result, $list_result_count, 'approvedby');
        $value = getUserName($value);
    } elseif ($uitype == 1004) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        $value = getUserName($temp_val);
    } elseif ($uitype == 1007) {
        $temp_val = $adb->query_result($list_result, $list_result_count, $fieldname);
        if ($temp_val == '1') {
            $value = $app_strings["already_approved"];
        } elseif ($temp_val == '-1') {
//.........这里部分代码省略.........
开发者ID:honj51,项目名称:taobaocrm,代码行数:101,代码来源:ListViewUtils.php


示例11: updateInfo

    $smarty->assign("UPDATEINFO", updateInfo($focus->id));
    $associated_prod = getAssociatedProducts("Invoice", $focus);
    $smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod);
    $smarty->assign("MODE", $focus->mode);
} elseif (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
    $associated_prod = $INVOICE_associated_prod;
    $smarty->assign("AVAILABLE_PRODUCTS", 'true');
    $smarty->assign("MODE", $focus->mode);
} elseif (isset($_REQUEST['product_id']) && $_REQUEST['product_id'] != '' || isset($_REQUEST['opportunity_id']) && $_REQUEST['opportunity_id'] != '') {
    $smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod);
    $InvTotal = getInventoryTotal($_REQUEST['return_module'], $_REQUEST['return_id']);
    $smarty->assign("MODE", $focus->mode);
    //this is to display the Product Details in first row when we create new PO from Product relatedlist
    if ($_REQUEST['return_module'] == 'Products') {
        $smarty->assign("PRODUCT_ID", vtlib_purify($_REQUEST['product_id']));
        $smarty->assign("PRODUCT_NAME", getProductName($_REQUEST['product_id']));
        $smarty->assign("UNIT_PRICE", vtlib_purify($_REQUEST['product_id']));
        $smarty->assign("QTY_IN_STOCK", getPrdQtyInStck($_REQUEST['product_id']));
        $smarty->assign("VAT_TAX", getProductTaxPercentage("VAT", $_REQUEST['product_id']));
        $smarty->assign("SALES_TAX", getProductTaxPercentage("Sales", $_REQUEST['product_id']));
        $smarty->assign("SERVICE_TAX", getProductTaxPercentage("Service", $_REQUEST['product_id']));
    }
}
if (isset($cust_fld)) {
    $smarty->assign("CUSTOMFIELD", $cust_fld);
}
$smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod);
if (isset($_REQUEST['return_module'])) {
    $smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module']));
} else {
    $smarty->assign("RETURN_MODULE", "Invoice");
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:31,代码来源:EditView.php


示例12: getListViewEntries2


//.........这里部分代码省略.........
                            }
                        } elseif ($name == 'Product') {
                            $product_id = textlength_check($adb->query_result($list_result, $i - 1, "productname"));
                            $value = $product_id;
                        } elseif ($name == 'Account Name') {
                            //modified for vtiger_customview 27/5
                            if ($module == 'Accounts') {
                                $account_id = $adb->query_result($list_result, $i - 1, "crmid");
                                //$account_name = getAccountName($account_id);
                                $account_name = textlength_check($adb->query_result($list_result, $i - 1, "accountname"));
                                // Fredy Klammsteiner, 4.8.2005: changes from 4.0.1 migrated to 4.2
                                $value = '<a href="index.php?module=Accounts&action=DetailView&record=' . $account_id . '&parenttab=' . $tabname . '" style="' . $P_FONT_COLOR . '">' . $account_name . '</a>';
                                // Armando Lüscher 05.07.2005 -> §priority -> Desc: inserted style="$P_FONT_COLOR"
                            } elseif ($module == 'Potentials' || $module == 'Contacts' || $module == 'Invoice' || $module == 'SalesOrder' || $module == 'Quotes') {
                                //Potential,Contacts,Invoice,SalesOrder & Quotes  records   sort by Account Name
                                $accountname = textlength_check($adb->query_result($list_result, $i - 1, "accountname"));
                                $accountid = $adb->query_result($list_result, $i - 1, "accountid");
                                $value = '<a href="index.php?module=Accounts&action=DetailView&record=' . $accountid . '&parenttab=' . $tabname . '" style="' . $P_FONT_COLOR . '">' . $accountname . '</a>';
                            } else {
                                $account_id = $adb->query_result($list_result, $i - 1, "accountid");
                                $account_name = getAccountName($account_id);
                                $acc_name = textlength_check($account_name);
                                // Fredy Klammsteiner, 4.8.2005: changes from 4.0.1 migrated to 4.2
                                $value = '<a href="index.php?module=Accounts&action=DetailView&record=' . $account_id . '&parenttab=' . $tabname . '" style="' . $P_FONT_COLOR . '">' . $acc_name . '</a>';
                                // Armando Lüscher 05.07.2005 -> §priority -> Desc: inserted style="$P_FONT_COLOR"
                            }
                        } elseif (($module == 'HelpDesk' || $module == 'PriceBook' || $module == 'Quotes' || $module == 'PurchaseOrder' || $module == 'Faq') && $name == 'Product Name') {
                            if ($module == 'HelpDesk' || $module == 'Faq') {
                                $product_id = $adb->query_result($list_result, $i - 1, "product_id");
                            } else {
                                $product_id = $adb->query_result($list_result, $i - 1, "productid");
                            }
                            if ($product_id != '') {
                                $product_name = getProductName($product_id);
                            } else {
                                $product_name = '';
                            }
                            $value = '<a href="index.php?module=Products&action=DetailView&parenttab=' . $tabname . '&record=' . $product_id . '">' . textlength_check($product_name) . '</a>';
                        } elseif ($module == 'Quotes' && $name == 'Potential Name' || $module == 'SalesOrder' && $name == 'Potential Name') {
                            $potential_id = $adb->query_result($list_result, $i - 1, "potentialid");
                            $potential_name = getPotentialName($potential_id);
                            $value = '<a href="index.php?module=Potentials&action=DetailView&parenttab=' . $tabname . '&record=' . $potential_id . '">' . textlength_check($potential_name) . '</a>';
                        } elseif ($module == 'Emails' && $relatedlist != '' && ($name == 'Subject' || $name == 'Date Sent' || $name == 'To')) {
                            $list_result_count = $i - 1;
                            $tmp_value = getValue($ui_col_array, $list_result, $fieldname, $focus, $module, $entity_id, $list_result_count, "list", "", $returnset, $oCv->setdefaultviewid);
                            $value = '<a href="javascript:;" onClick="ShowEmail(\'' . $entity_id . '\');">' . textlength_check($tmp_value) . '</a>';
                            if ($name == 'Date Sent') {
                                $sql = "select email_flag from vtiger_emaildetails where emailid=?";
                                $result = $adb->pquery($sql, array($entity_id));
                                $email_flag = $adb->query_result($result, 0, "email_flag");
                                if ($email_flag != 'SAVED') {
                                    $value = getValue($ui_col_array, $list_result, $fieldname, $focus, $module, $entity_id, $list_result_count, "list", "", $returnset, $oCv->setdefaultviewid);
                                } else {
                                    $value = '';
                                }
                            }
                        } elseif ($module == 'Calendar' && ($fieldname != 'taskstatus' && $fieldname != 'eventstatus')) {
                            if ($activitytype == 'Task') {
                                if (getFieldVisibilityPermission('Calendar', $current_user->id, $fieldname) == '0') {
                                    $list_result_count = $i - 1;
                                    $value = getValue($ui_col_array, $list_result, $fieldname, $focus, $module, $entity_id, $list_result_count, "list", "", $returnset, $oCv->setdefaultviewid);
                                } else {
                                    $value = '';
                                }
                            } else {
                                if (getFieldVisibilityPermission('Events', $current_user->id, $fieldname) == '0') {
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:67,代码来源:ListViewUtils2.php


示例13: x15

 private function x15()
 {
     global $x0b, $x0c, $x0d, $x0e, $x0f, $x10, $x11, $x12, $x13, $x14, $x15, $x16, $x17, $x18, $x19, $x1a, $x1b, $x1c, $x1d, $x1e, $x1f, $x20, $x21, $x22, $x23, $x24, $x25, $x26;
     $taxtype = $this->x1d();
     $currencytype = $this->x1c();
     $query = "select case when vtiger_products.productid != '' then vtiger_products.productname else vtiger_service.servicename end as productname," . " case when vtiger_products.productid != '' then vtiger_products.productid else vtiger_service.serviceid end as psid," . " case when vtiger_products.productid != '' then vtiger_products.product_no else vtiger_service.service_no end as psno," . " case when vtiger_products.productid != '' then 'Products' else 'Services' end as entitytype," . " case when vtiger_products.productid != '' then vtiger_products.unit_price else vtiger_service.unit_price end as unit_price," . " case when vtiger_products.productid != '' then vtiger_products.usageunit else vtiger_service.service_usageunit end as usageunit," . " case when vtiger_products.productid != '' then vtiger_products.qty_per_unit else vtiger_service.qty_per_unit end as qty_per_unit," . " case when vtiger_products.productid != '' then vtiger_products.qtyinstock else 'NA' end as qtyinstock," . " case when vtiger_products.productid != '' then c1.description else c2.description end as psdescription, vtiger_inventoryproductrel.* " . " from vtiger_inventoryproductrel" . " left join vtiger_products on vtiger_products.productid=vtiger_inventoryproductrel.productid " . " left join vtiger_crmentity as c1 on c1.crmid = vtiger_products.productid " . " left join vtiger_service on vtiger_service.serviceid=vtiger_inventoryproductrel.productid " . " left join vtiger_crmentity as c2 on c2.crmid = vtiger_service.serviceid " . " where id=? ORDER BY sequence_no";
     $result = $this->db->pquery($query, array($this->focus->id));
     $num_rows = $this->db->num_rows($result);
     $netTotal = "0.00";
     $totalAfterDiscount_subtotal = 0;
     $total_subtotal = 0;
     $totalsum_subtotal = 0;
     $images = $this->x17();
     $Total_Tax_Values = array();
     for ($i = 1; $i <= $num_rows; $i++) {
         $sub_prod_query = $this->db->pquery("SELECT productid from vtiger_inventorysubproductrel WHERE id=? AND sequence_no=?", array($this->focus->id, $i));
         $subprodname_str = '';
         if ($this->db->num_rows($sub_prod_query) > 0) {
             for ($j = 0; $j < $this->db->num_rows($sub_prod_query); $j++) {
                 $sprod_id = $this->db->query_result($sub_prod_query, $j, "productid");
                 $sprod_name = getProductName($sprod_id);
                 $str_sep = "";
                 if ($j > 0) {
                     $str_sep = ":";
                 }
                 $subprodname_str .= $str_sep . " - " . $sprod_name;
             }
         }
         $subprodname_str = $x1e(":", "<br>", $subprodname_str);
         $psid = $this->db->query_result($result, $i - 1, "psid");
         $psno = $this->db->query_result($result, $i - 1, "psno");
         $productid = $this->db->query_result($result, $i - 1, "productid");
         $entitytype = $this->db->query_result($result, $i - 1, "entitytype");
         $producttitle = $productname = $this->db->query_result($result, $i - 1, "productname");
         if ($subprodname_str != "") {
             $productname .= "<br/><span style='color:#C0C0C0;font-style:italic;'>" . $subprodname_str . "</span>";
         }
         $comment = $this->db->query_result($result, $i - 1, "comment");
         $psdescription = $this->db->query_result($result, $i - 1, "psdescri 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getProductProps函数代码示例发布时间:2022-05-15
下一篇:
PHP getProductBaseCurrency函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap