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


PHP Products::generate_number方法代码示例

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


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

示例1: Products

//////////////////////////////
if (isset($_REQUEST['email_id'])) {
    $sugarbean->email_id = $_REQUEST['email_id'];
}
if (!$sugarbean->ACLAccess('Save')) {
    ACLController::displayNoAccess(true);
    sugar_cleanup(true);
}
if (!isset($sugarbean->product_id) || is_null($sugarbean->product_id) || empty($sugarbean->product_id)) {
    $product = new Products();
    $product->account_id = $_REQUEST['account_id'];
    $product->account_name = $_REQUEST['account_name'];
    $product->contact_id = $_REQUEST['contact_id'];
    $product->contact_name = $_REQUEST['contact_name'];
    $product->name = $_REQUEST['product_name'];
    $product->pnum = 'PRD' . $product->generate_number('pnum', $product->table_name);
    //TO DO GENERATE NUMBER
    $product->save($GLOBALS['check_notify']);
    $sugarbean->product_id = $product->id;
} else {
    $product = new Products();
    $product->retrieve($sugarbean->product_id);
}
$sugarbean->save($GLOBALS['check_notify']);
$product->clientrequest_id = $sugarbean->id;
$product->save($GLOBALS['check_notify']);
if (isset($_REQUEST['status_action']) && !empty($_REQUEST['status_action'])) {
    $productstatus->update_product_status($_REQUEST['status_action'], $sugarbean, $old_status);
} else {
    $productstatus->update_product_status($_REQUEST['status'], $sugarbean, $old_status);
}
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:Save.php

示例2:

    $focus->assigned_user_id = $current_user->id;
}
if (empty($focus->assigned_name) && empty($focus->id)) {
    $focus->assigned_user_name = $current_user->user_name;
}
$xtpl->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(TRUE, "Active", $focus->assigned_user_id), $focus->assigned_user_id));
$xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name);
$xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id);
//Assign editview fileds
$xtpl->assign("ACCOUNT_NAME", $focus->account_name);
$xtpl->assign("ACCOUNT_ID", $focus->account_id);
$xtpl->assign("CONTACT_NAME", $focus->contact_name);
$xtpl->assign("CONTACT_ID", $focus->contact_id);
$xtpl->assign('description', $focus->description);
if (empty($focus->pnum)) {
    $focus->pnum = 'PRD' . $focus->generate_number('pnum', $focus->table_name);
}
$xtpl->assign("pnum", $focus->pnum);
$xtpl->assign('note', $focus->note);
$xtpl->assign('quantity', $focus->quantity);
$xtpl->assign('fsize_h', $focus->fsize_h);
$xtpl->assign('fsize_w', $focus->fsize_w);
$xtpl->assign('volume', $focus->volume);
$xtpl->assign('samples', $focus->samples);
$xtpl->assign('file', $focus->file);
$xtpl->assign("SAMPLES_OPTIONS", get_select_options_with_id($app_list_strings['product_samples_dom'], $focus->samples));
$xtpl->assign("FILE_OPTIONS", get_select_options_with_id($app_list_strings['product_file_dom'], $focus->file));
$xtpl->assign("CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['products_category_options'], $focus->category));
$xtpl->assign("PERIOD_OPTIONS", get_select_options_with_id($app_list_strings['products_period_options'], $focus->period));
$xtpl->assign("FORMAT_OPTIONS", get_select_options_with_id($app_list_strings['products_format_options'], $focus->format));
$xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:EditView.php


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