require_once 'modules/ProductOperations/ProductOperation.php'; require_once 'modules/ProductComponents/Forms.php'; require_once 'modules/Layoutline/Layoutline.php'; require_once 'include/time.php'; require_once 'modules/Format/Format.php'; global $timedate; global $app_strings; global $app_list_strings; global $current_language; global $current_user; global $sugar_version, $sugar_config; // Unimplemented until jscalendar language files are fixed // global $current_language; // global $default_language; // global $cal_codes; $focus = new ProductComponents(); if (!empty($_REQUEST['record'])) { $focus->retrieve($_REQUEST['record']); } echo "\n<p>\n"; echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'] . ": " . $focus->name, true); echo "\n</p>\n"; global $theme; $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; require_once $theme_path . 'layout_utils.php'; $GLOBALS['log']->info("ProductComponents detail view"); $xtpl = new XTemplate('modules/ProductComponents/EditView.html'); $xtpl->assign('MOD', $mod_strings); $xtpl->assign('APP', $app_strings); ///
<?php if (!defined('sugarEntry') || !sugarEntry) { die('Not A Valid Entry Point'); } require_once 'modules/ProductComponents/ProductComponents.php'; if (isset($_REQUEST['paper_id']) && !empty($_REQUEST['paper_id'])) { $paperid = $_REQUEST['paper_id']; } $focus = new ProductComponents(); $paper_data = $focus->get_paper_info($paperid); echo '<input name="x" id="x" value=' . $paper_data['size_h'] . '>'; echo '<input name="y" id="y" value=' . $paper_data['size_w'] . '>'; echo '<input name="weight" id="weight" value=' . $paper_data['weight'] . '>'; echo '<input name="type" id="type" value=' . $paper_data['chrome'] . '>'; echo '<input name="texture" id="texture" value=' . $paper_data['texture'] . '>'; echo '<input name="color" id="color" value=' . $paper_data['color'] . '>'; echo '<input name="absorbtion" id="absorbtion" value=' . $paper_data['absorbtion'] . '>'; echo '<input name="side" id="side" value=' . $paper_data['side'] . '>';
$quoteLine->quantity = $product->quantity; $xtpl_data['ACCOUNT_ID'] = $product->account_id; $xtpl_data['ACCOUNT_NAME'] = $product->account_name; $xtpl_data['BILLTOCONTACTID'] = $product->contact_id; $xtpl_data['BILLTOCONTACTNAME'] = $product->contact_name; $xtpl_data['NAME'] = $mod_strings['LBL_QUOTE'] . '-' . $product->name; $focus->payment_method = 'Cash'; $validuntil = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") + 30, date("Y"))); $xtpl_data['VALIDUNTIL'] = $validuntil; $product_estimate = new ProductEstimate(); $return_array = $product_estimate->get_full_list("id", "product_id='" . $product->id . "'"); foreach ($return_array as $value) { $quoteLine->estp = $value->total_estimate; $quoteLine->price = $value->total_estimate; } $component = new ProductComponents(); $return_array = $component->get_full_list("id", "parent_id='" . $product->id . "'"); foreach ($return_array as $value) { $pages = $pages + $value->volume; } $quoteLine->pages = $pages; $xtpl->assign("PRODUCTROWS", $focus->getProductRow($quoteLine, 0, true)); $xtpl->parse("main.row1"); $account = new Account(); $return_array = $account->get_full_list("id", "accounts.id='" . $product->account_id . "'"); foreach ($return_array as $value) { $xtpl_data['BILLTOADDRESS'] = $value->billing_address_street; $xtpl_data['BILLTOCITY'] = $value->billing_address_city; $xtpl_data['BILLPOSTALCODE'] = $value->billing_address_postalcode; $xtpl_data['BILLTOSTATE'] = $value->billing_address_state; $xtpl_data['BILLTOCOUNTRY'] = $value->billing_address_country;
* The Initial Developer of the Original Code is SugarCRM, Inc. * Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.; * All Rights Reserved. * Contributor(s): ______________________________________. */ require_once 'modules/ComponentEstimate/ComponentEstimate.php'; require_once 'modules/ProductComponents/ProductComponents.php'; require_once 'include/formbase.php'; global $app_list_strings; $sugarbean = new ComponentEstimate(); $sugarbean = populateFromPost('', $sugarbean); $sugarbean->status = "uptodate"; if (isset($_REQUEST['email_id'])) { $sugarbean->email_id = $_REQUEST['email_id']; } if (!$sugarbean->ACLAccess('Save')) { ACLController::displayNoAccess(true); sugar_cleanup(true); } $sugarbean->save($GLOBALS['check_notify']); $component = new ProductComponents(); $component->retrieve($sugarbean->component_id); //// Status Update if (isset($_REQUEST['stat_action']) && !empty($_REQUEST['stat_action']) && !is_null($_REQUEST['stat_action'])) { $component->status_update('', $component->id, $_REQUEST['stat_action'], ''); } else { $component->status_update('', $component->id, '', ''); } ///////////////// $return_id = $sugarbean->id; handleRedirect($return_id, 'ComponentEstimate');
<?php if (!defined('sugarEntry') || !sugarEntry) { die('Not A Valid Entry Point'); } require_once 'modules/ProductComponents/ProductComponents.php'; $product = new ProductComponents(); if (!empty($_POST['record'])) { $product->retrieve($_POST['record']); } //// //// save the fields to the ProductComponents object //// if (isset($_REQUEST['email_id'])) { $product->email_id = $_REQUEST['email_id']; } if ($_POST['order_number'] == '') { $_POST['order_number'] = '1'; } foreach ($product->column_fields as $field) { if (isset($_REQUEST[$field])) { $product->{$field} = $_REQUEST[$field]; } if (!isset($_REQUEST['milestone_flag'])) { $product->milestone_flag = 'off'; } } //$product->time_start = str_replace('.',':',$_REQUEST['time_start']); //$product->time_due = str_replace('.',':',$_REQUEST['time_due']); // Get GMT clean values if (!empty($_REQUEST['date_start']) && !empty($_REQUEST['time_start'])) {
require_once 'XTemplate/xtpl.php'; require_once 'data/Tracker.php'; require_once 'modules/ProductComponents/ProductComponents.php'; require_once 'modules/ProductComponents/Forms.php'; require_once 'include/time.php'; global $timedate; global $app_strings; global $app_list_strings; global $current_language; global $current_user; global $sugar_version, $sugar_config; // Unimplemented until jscalendar language files are fixed // global $current_language; // global $default_language; // global $cal_codes; $focus = new ProductComponents(); if (!empty($_REQUEST['record'])) { $focus->retrieve($_REQUEST['record']); } echo "\n<p>\n"; echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'] . ": " . $focus->name, true); echo "\n</p>\n"; global $theme; $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; require_once $theme_path . 'layout_utils.php'; $GLOBALS['log']->info("ProductComponents detail view"); $xtpl = new XTemplate('modules/ProductComponents/EditView.html'); $xtpl->assign('MOD', $mod_strings); $xtpl->assign('APP', $app_strings); ///
* License. * * All copies of the Covered Code must include on each user interface screen: * (i) the "Powered by SugarCRM" logo and * (ii) the SugarCRM copyright notice * in the same form as they appear in the distribution. See full license for * requirements. * * The Original Code is: SugarCRM Open Source * The Initial Developer of the Original Code is SugarCRM, Inc. * Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.; * All Rights Reserved. * Contributor(s): ______________________________________. */ require_once 'modules/ProductComponents/ProductComponents.php'; $sugarbean = new ProductComponents(); // perform the delete if given a record to delete if (empty($_REQUEST['record'])) { $GLOBALS['log']->info('delete called without a record id specified'); } else { $record = $_REQUEST['record']; $sugarbean->retrieve($record); if (!$sugarbean->ACLAccess('Delete')) { ACLController::displayNoAccess(true); sugar_cleanup(true); } $GLOBALS['log']->info("deleting record: {$record}"); $sugarbean->mark_deleted($record); } // handle the return location variables $return_module = empty($_REQUEST['return_module']) ? 'ProductComponents' : $_REQUEST['return_module'];