}
//Operations save ----------------------------------------------/
$operations1 = new ProductOperation();
$component->check_modified_fields($keys, $operations1, $component->id);
$operations1->mark_deletedByComponentId($return_id);
$operation_types = array(0 => 'CutngOperations', 1 => 'OtherOperations');
for ($p = 0; $p < count($operation_types); $p++) {
    for ($i = 0; $i < $count; $i++) {
        if (substr_count($keys[$i], "{$operation_types[$p]}_Id_") > 0) {
            $index = substr($keys[$i], -1, 1);
            $operation_id = $_POST["{$operation_types[$p]}_Id_" . $index];
            $operation_name = $_POST["{$operation_types[$p]}_Name_" . $index];
            $operations_count = $_POST["{$operation_types[$p]}_count_" . $index];
            $component_id = $component->id;
            $parent_id = $component->parent_id;
            $operations = new ProductOperation();
            $operations->operation_id = $operation_id;
            $operations->operation_name = $operation_name;
            $operations->name = $component->name . "-" . $operation_name;
            $operations->component_id = $component_id;
            $operations->component_name = $component->name;
            $operations->operations_count = $operations_count;
            $operations->product_id = $parent_id;
            $operations->save();
        }
    }
}
//Prepress Save -------------------------------------------------/
$componentPrepress1 = new ComponentPrepress();
$component->check_modified_fields($keys, $componentPrepress1, $component->id);
$componentPrepress1->mark_deletedByComponentId($return_id);
 * Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
 * All Rights Reserved.
 * Contributor(s): ______________________________________.
 */
require_once 'XTemplate/xtpl.php';
require_once 'data/Tracker.php';
require_once 'modules/ProductOperations/ProductOperation.php';
require_once 'include/time.php';
require_once 'modules/ProductOperations/Forms.php';
global $timedate;
global $app_strings;
global $app_list_strings;
global $current_language;
global $current_user;
global $sugar_version, $sugar_config;
$focus = new ProductOperation();
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("Project detail view");
$xtpl = new XTemplate('modules/ProductOperations/EditView.html');
/// Users Popup
$json = getJSONobj();
$popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'EditView', 'field_to_name_array' => array('id' => 'assigned_user_id', 'user_name' => 'assigned_user_name'));
 * 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/ProductOperations/ProductOperation.php';
$sugarbean = new ProductOperation();
// 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']) ? 'ProductOperations' : $_REQUEST['return_module'];
 function getOperationsRows()
 {
     $return_array = array();
     if ($this->id != "") {
         $operationrow = new ProductOperation();
         $return_array = $operationrow->get_full_list("id", "component_id='" . $this->id . "'");
     }
     return $return_array;
 }