本文整理汇总了PHP中split_validationdataArray函数的典型用法代码示例。如果您正苦于以下问题:PHP split_validationdataArray函数的具体用法?PHP split_validationdataArray怎么用?PHP split_validationdataArray使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了split_validationdataArray函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: vtEditExpressions
function vtEditExpressions($adb, $appStrings, $current_language, $theme, $formodule = '')
{
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$smarty = new vtigerCRM_Smarty();
$smarty->assign('APP', $appStrings);
$mod = array_merge(return_module_language($current_language, 'FieldFormulas'), return_module_language($current_language, 'Settings'));
$jsStrings = array('NEED_TO_ADD_A' => $mod['NEED_TO_ADD_A'], 'CUSTOM_FIELD' => $mod['LBL_CUSTOM_FIELD'], 'LBL_USE_FUNCTION_DASHDASH' => $mod['LBL_USE_FUNCTION_DASHDASH'], 'LBL_USE_FIELD_VALUE_DASHDASH' => $mod['LBL_USE_FIELD_VALUE_DASHDASH'], 'LBL_DELETE_EXPRESSION_CONFIRM' => $mod['LBL_DELETE_EXPRESSION_CONFIRM']);
$smarty->assign("JS_STRINGS", Zend_Json::encode($jsStrings));
$smarty->assign("MOD", $mod);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("MODULE_NAME", 'FieldFormulas');
$smarty->assign("PAGE_NAME", 'LBL_FIELDFORMULAS');
$smarty->assign("PAGE_TITLE", 'LBL_FIELDFORMULAS');
$smarty->assign("PAGE_DESC", 'LBL_FIELDFORMULAS_DESCRIPTION');
$smarty->assign("FORMODULE", $formodule);
if (file_exists("modules/{$formodule}/{$formodule}.php")) {
$focus = CRMEntity::getInstance($formodule);
$validationArray = split_validationdataArray(getDBValidationData($focus->tab_name, getTabid($formodule)));
$smarty->assign('VALIDATION_DATA_FIELDNAME', $validationArray['fieldname']);
$smarty->assign('VALIDATION_DATA_FIELDDATATYPE', $validationArray['datatype']);
$smarty->assign('VALIDATION_DATA_FIELDLABEL', $validationArray['fieldlabel']);
}
$smarty->display(vtlib_getModuleTemplate('FieldFormulas', 'EditExpressions.tpl'));
}
示例2: vtlib_purify
} else {
$smarty->assign("RETURN_ACTION", "index");
}
if (isset($_REQUEST['return_id'])) {
$smarty->assign("RETURN_ID", vtlib_purify($_REQUEST['return_id']));
}
if (isset($_REQUEST['return_viewname'])) {
$smarty->assign("RETURN_VIEWNAME", vtlib_purify($_REQUEST['return_viewname']));
}
$smarty->assign("UPLOADSIZE", $upload_maxsize / 1000000);
//Convert to MB
$smarty->assign("UPLOAD_MAXSIZE", $upload_maxsize);
// Field Validation Information
$tabid = getTabid($currentModule);
$validationData = getDBValidationData($focus->tab_name, $tabid);
$validationArray = split_validationdataArray($validationData);
$smarty->assign("VALIDATION_DATA_FIELDNAME", $validationArray['fieldname']);
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE", $validationArray['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL", $validationArray['fieldlabel']);
// In case you have a date field
$smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']);
$smarty->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT']));
// Module Sequence Numbering
$mod_seq_field = getModuleSequenceField($currentModule);
if ($focus->mode != 'edit' && $mod_seq_field != null) {
$autostr = getTranslatedString('MSG_AUTO_GEN_ON_SAVE');
$mod_seq_string = $adb->pquery("SELECT prefix, cur_id from vtiger_modentity_num where semodule = ? and active=1", array($currentModule));
$mod_seq_prefix = $adb->query_result($mod_seq_string, 0, 'prefix');
$mod_seq_no = $adb->query_result($mod_seq_string, 0, 'cur_id');
if ($adb->num_rows($mod_seq_string) == 0 || $focus->checkModuleSeqNumber($focus->table_name, $mod_seq_field['column'], $mod_seq_prefix . $mod_seq_no)) {
echo '<br><font color="#FF0000"><b>' . getTranslatedString('LBL_DUPLICATE') . ' ' . getTranslatedString($mod_seq_field['label']) . ' - ' . getTranslatedString('LBL_CLICK') . ' <a href="index.php?module=Settings&action=CustomModEntityNo&parenttab=Settings&selmodule=' . $currentModule . '">' . getTranslatedString('LBL_HERE') . '</a> ' . getTranslatedString('LBL_TO_CONFIGURE') . ' ' . getTranslatedString($mod_seq_field['label']) . '</b></font>';
示例3: getModuleSequenceField
$mod_seq_field = getModuleSequenceField($currentModule);
if ($mod_seq_field != null) {
$mod_seq_id = $focus->column_fields[$mod_seq_field['name']];
} else {
$mod_seq_id = $focus->id;
}
$smarty->assign('MOD_SEQ_ID', $mod_seq_id);
//Added to display the Tax informations
$tax_details = getTaxDetailsForProduct($focus->id);
for ($i = 0; $i < count($tax_details); $i++) {
$tax_details[$i]['percentage'] = getProductTaxPercentage($tax_details[$i]['taxname'], $focus->id);
}
$smarty->assign("TAX_DETAILS", $tax_details);
$price_details = getPriceDetailsForProduct($focus->id, $focus->unit_price, 'available_associated', $currentModule);
$smarty->assign('PRICE_DETAILS', $price_details);
$validationArray = split_validationdataArray(getDBValidationData($focus->tab_name, $tabid));
$smarty->assign('VALIDATION_DATA_FIELDNAME', $validationArray['fieldname']);
$smarty->assign('VALIDATION_DATA_FIELDDATATYPE', $validationArray['datatype']);
$smarty->assign('VALIDATION_DATA_FIELDLABEL', $validationArray['fieldlabel']);
$smarty->assign('EDIT_PERMISSION', isPermitted($currentModule, 'EditView', $record));
$smarty->assign('CHECK', $tool_buttons);
if (PerformancePrefs::getBoolean('DETAILVIEW_RECORD_NAVIGATION', true) && isset($_SESSION[$currentModule . '_listquery'])) {
$recordNavigationInfo = ListViewSession::getListViewNavigation($focus->id);
VT_detailViewNavigation($smarty, $recordNavigationInfo, $focus->id);
}
$smarty->assign('IS_REL_LIST', isPresentRelatedLists($currentModule));
$smarty->assign('SinglePane_View', $singlepane_view);
if ($singlepane_view == 'true') {
$related_array = getRelatedLists($currentModule, $focus);
$smarty->assign("RELATEDLISTS", $related_array);
require_once 'include/ListView/RelatedListViewSession.php';
示例4: getSplitDBValidationData
/**
* merged with getDBValidationData and split_validationdataArray functions for performance
*/
function getSplitDBValidationData($tablearray, $tabid = '')
{
global $log;
$log->debug("Entering getSplitDBValidationData() method ...");
$key = "split_validationdata_" . $tabid;
$validationData = getSqlCacheData($key);
if (!$validationData) {
$fieldName_array = array();
$sql = '';
$tab_con = "";
$numValues = count($tablearray);
global $adb, $mod_strings;
if ($tabid != '') {
$tab_con = ' and tabid=' . $tabid;
}
for ($i = 0; $i < $numValues; $i++) {
if (in_array("emails", $tablearray)) {
if ($numValues > 1 && $i != $numValues - 1) {
$sql .= "select fieldlabel,fieldname,typeofdata from ec_field where tablename='" . $tablearray[$i] . "'and tabid=10 and displaytype <> 2 union ";
} else {
$sql .= "select fieldlabel,fieldname,typeofdata from ec_field where tablename='" . $tablearray[$i] . "' and tabid=10 and displaytype <> 2 ";
}
} else {
if ($numValues > 1 && $i != $numValues - 1) {
$sql .= "select fieldlabel,fieldname,typeofdata from ec_field where tablename='" . $tablearray[$i] . "'" . $tab_con . " and displaytype=1 union ";
} else {
$sql .= "select fieldlabel,fieldname,typeofdata from ec_field where tablename='" . $tablearray[$i] . "'" . $tab_con . " and displaytype=1";
}
}
}
$result = $adb->query($sql);
$noofrows = $adb->num_rows($result);
$fieldName_array = array();
for ($i = 0; $i < $noofrows; $i++) {
$fieldlabel = $mod_strings[$adb->query_result($result, $i, 'fieldlabel')];
$fieldname = $adb->query_result($result, $i, 'fieldname');
$typeofdata = $adb->query_result($result, $i, 'typeofdata');
//echo '<br> '.$fieldlabel.'....'.$fieldname.'....'.$typeofdata;
$fldLabel_array = array();
$fldLabel_array[$fieldlabel] = $typeofdata;
$fieldName_array[$fieldname] = $fldLabel_array;
}
$validationData = split_validationdataArray($fieldName_array);
setSqlCacheData($key, $validationData);
}
$log->debug("Exiting getSplitDBValidationData method ...");
return $validationData;
}
示例5: getQuickValidationData
/**
* merged with getDBValidationData and split_validationdataArray functions for performance
*/
function getQuickValidationData($tabid, $display_type_check)
{
global $log;
$log->debug("Entering getQuickValidationData() method ...");
$key = "quickedit_validationdata_" . $tabid;
$validationData = getSqlCacheData($key);
if (!$validationData) {
$sql = '';
global $adb, $mod_strings, $current_user;
//retreive the ec_profileList from database
require 'user_privileges/user_privileges_' . $current_user->id . '.php';
$sql = "SELECT ec_field.* FROM ec_field INNER JOIN ec_def_org_field ON ec_def_org_field.fieldid=ec_field.fieldid AND ec_def_org_field.visible=0 WHERE ec_field.tabid=" . $tabid . " AND ec_field.block IN " . $blockid_list . " AND " . $display_type_check . " ORDER BY block,sequence";
$result = $adb->query($sql);
$noofrows = $adb->num_rows($result);
$fieldName_array = array();
for ($i = 0; $i < $noofrows; $i++) {
$fieldlabel = $mod_strings[$adb->query_result($result, $i, 'fieldlabel')];
$fieldname = $adb->query_result($result, $i, 'fieldname');
$typeofdata = $adb->query_result($result, $i, 'typeofdata');
$fldLabel_array = array();
$fldLabel_array[$fieldlabel] = $typeofdata;
$fieldName_array[$fieldname] = $fldLabel_array;
}
$validationData = split_validationdataArray($fieldName_array);
setSqlCacheData($key, $validationData);
}
$log->debug("Exiting getQuickValidationData method ...");
return $validationData;
}
示例6: process
/**
* Process the request to perform relationship operations
* @global Users Instance $current_user
* @global PearDataBase Instance $adb
* @global String $currentModule
* @param MailManager_Request $request
* @return boolean
*/
function process(MailManager_Request $request)
{
global $current_user, $adb;
$response = new MailManager_Response(true);
$viewer = $this->getViewer();
if ('find' == $request->getOperationArg()) {
$this->skipConnection = true;
// No need to connect to mailbox here, improves performance
// Check if the message is already linked.
//$linkedto = MailManager_RelationControllerAction::associatedLink($request->get('_msguid'));
// If the message was not linked, lookup for matching records, using FROM address
//if (empty($linkedto)) {
$msguid = $request->get('_msguid');
$results = array();
$modules = array();
$allowedModules = $this->getCurrentUserMailManagerAllowedModules();
foreach (self::$MODULES as $MODULE) {
if (!in_array($MODULE, $allowedModules)) {
continue;
}
$from = $request->get('_mfrom');
if (empty($from)) {
continue;
}
$results[$MODULE] = $this->lookupModuleRecordsWithEmail($MODULE, $from, $msguid);
$describe = $this->ws_describe($MODULE);
$modules[$MODULE] = array('label' => $describe['label'], 'name' => textlength_check($describe['name']), 'id' => $describe['idPrefix']);
// If look is found in a module, skip rest. - for performance
//if (!empty($results[$MODULE])) break;
}
$viewer->assign('LOOKUPS', $results);
$viewer->assign('MODULES', $modules);
//} else {
// $viewer->assign('LINKEDTO', $linkedto);
//}
$viewer->assign('LinkToAvailableActions', $this->linkToAvailableActions());
$viewer->assign('AllowedModules', $allowedModules);
$viewer->assign('MSGNO', $request->get('_msgno'));
$viewer->assign('FOLDER', $request->get('_folder'));
$response->setResult(array('ui' => $viewer->fetch($this->getModuleTpl('Relationship.tpl'))));
} else {
if ('link' == $request->getOperationArg()) {
$linkto = $request->get('_mlinkto');
$foldername = $request->get('_folder');
$connector = $this->getConnector($foldername);
// This is to handle larger uploads
$memory_limit = ConfigPrefs::get('MEMORY_LIMIT');
ini_set('memory_limit', $memory_limit);
$mail = $connector->openMail($request->get('_msgno'));
$mail->attachments();
// Initialize attachments
$linkedto = MailManager_RelationControllerAction::associate($mail, $linkto);
$viewer->assign('LinkToAvailableActions', $this->linkToAvailableActions());
$viewer->assign('AllowedModules', $this->getCurrentUserMailManagerAllowedModules());
$viewer->assign('LINKEDTO', $linkedto);
$viewer->assign('MSGNO', $request->get('_msgno'));
$viewer->assign('FOLDER', $foldername);
$response->setResult(array('ui' => $viewer->fetch($this->getModuleTpl('Relationship.tpl'))));
} else {
if ('create_wizard' == $request->getOperationArg()) {
global $currentModule;
$moduleName = $request->get('_mlinktotype');
$parent = $request->get('_mlinkto');
$foldername = $request->get('_folder');
$connector = $this->getConnector($foldername);
$mail = $connector->openMail($request->get('_msgno'));
$qcreate_array = QuickCreate($moduleName);
$validationData = $qcreate_array['data'];
$data = split_validationdataArray($validationData);
$qcreate_array['form'] = $this->processFormData($qcreate_array['form'], $mail);
$viewer->assign("QUICKCREATE", $qcreate_array['form']);
if ($moduleName == 'Calendar') {
$viewer->assign("QCMODULE", getTranslatedString('Todo', 'Calendar'));
} elseif ($moduleName == "HelpDesk") {
$viewer->assign("QCMODULE", getTranslatedString('Ticket', 'HelpDesk'));
} else {
$viewer->assign("QCMODULE", getTranslatedString("SINGLE_" . $moduleName, $moduleName));
}
$viewer->assign("PARENT", $parent);
$viewer->assign("MODULE", $moduleName);
$viewer->assign('MSGNO', $request->get('_msgno'));
$viewer->assign('FOLDER', $foldername);
$viewer->assign("VALIDATION_DATA_FIELDNAME", $data['fieldname']);
$viewer->assign("VALIDATION_DATA_FIELDDATATYPE", $data['datatype']);
$viewer->assign("VALIDATION_DATA_FIELDLABEL", $data['fieldlabel']);
$viewer->display($this->getModuleTpl('Relationship.CreateWizard.tpl'));
$response = false;
} else {
if ('create' == $request->getOperationArg()) {
$linkModule = $request->get('_mlinktotype');
$parent = $request->get('_mlinkto');
$focus = CRMEntity::getInstance($linkModule);
//.........这里部分代码省略.........
示例7: process
public function process(Vtiger_Request $request)
{
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$record = $request->get('record');
if (!empty($record) && $request->get('isDuplicate') == true) {
$recordModel = $this->record ? $this->record : Vtiger_Record_Model::getInstanceById($record, $moduleName);
$viewer->assign('MODE', '');
//While Duplicating record, If the related record is deleted then we are removing related record info in record model
$mandatoryFieldModels = $recordModel->getModule()->getMandatoryFieldModels();
foreach ($mandatoryFieldModels as $fieldModel) {
if ($fieldModel->isReferenceField()) {
$fieldName = $fieldModel->get('name');
if (Vtiger_Util_Helper::checkRecordExistance($recordModel->get($fieldName))) {
$recordModel->set($fieldName, '');
}
}
}
} else {
if (!empty($record)) {
$recordModel = $this->record ? $this->record : Vtiger_Record_Model::getInstanceById($record, $moduleName);
$viewer->assign('RECORD_ID', $record);
$viewer->assign('MODE', 'edit');
} else {
$recordModel = Vtiger_Record_Model::getCleanInstance($moduleName);
$viewer->assign('MODE', '');
}
}
if (!$this->record) {
$this->record = $recordModel;
}
$moduleModel = $recordModel->getModule();
$fieldList = $moduleModel->getFields();
$requestFieldList = array_intersect_key($request->getAll(), $fieldList);
foreach ($requestFieldList as $fieldName => $fieldValue) {
$fieldModel = $fieldList[$fieldName];
$specialField = false;
// We collate date and time part together in the EditView UI handling
// so a bit of special treatment is required if we come from QuickCreate
if ($moduleName == 'Calendar' && empty($record) && $fieldName == 'time_start' && !empty($fieldValue)) {
$specialField = true;
// Convert the incoming user-picked time to GMT time
// which will get re-translated based on user-time zone on EditForm
$fieldValue = DateTimeField::convertToDBTimeZone($fieldValue)->format("H:i");
}
if ($moduleName == 'Calendar' && empty($record) && $fieldName == 'date_start' && !empty($fieldValue)) {
$startTime = Vtiger_Time_UIType::getTimeValueWithSeconds($requestFieldList['time_start']);
$startDateTime = Vtiger_Datetime_UIType::getDBDateTimeValue($fieldValue . " " . $startTime);
list($startDate, $startTime) = explode(' ', $startDateTime);
$fieldValue = Vtiger_Date_UIType::getDisplayDateValue($startDate);
}
if ($fieldModel->isEditable() || $specialField) {
$recordModel->set($fieldName, $fieldModel->getDBInsertValue($fieldValue));
}
}
// SalesPlatform.ru begin Unifying method for EditView preparing
$recordModel = prepareEditView($recordModel, $_REQUEST, $viewer);
// SalesPlatform.ru end
// SalesPlatform.ru begin Set company
if ($request->get('relationOperation')) {
$sourceRecordModel = Vtiger_Record_Model::getInstanceById($request->get('sourceRecord'));
if ($sourceRecordModel->get('spcompany') != null && $sourceRecordModel->get('spcompany') != '') {
if ($recordModel->getField('spcompany')) {
$recordModel->set('spcompany', $sourceRecordModel->get('spcompany'));
}
}
}
// SalesPlatform.ru end
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceFromRecordModel($recordModel, Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_EDIT);
$picklistDependencyDatasource = Vtiger_DependencyPicklist::getPicklistDependencyDatasource($moduleName);
// SalesPlatform.ru begin Field Validation Information
$tabid = getTabid($moduleName);
$validationData = getDBValidationData($recordModel->get('tab_name'), $tabid);
$validationArray = split_validationdataArray($validationData);
$viewer->assign("VALIDATION_DATA_FIELDNAME", $validationArray['fieldname']);
$viewer->assign("VALIDATION_DATA_FIELDDATATYPE", $validationArray['datatype']);
$viewer->assign("VALIDATION_DATA_FIELDLABEL", $validationArray['fieldlabel']);
$viewer->assign('ID', $record);
// SalesPlatform.ru end
$viewer->assign('PICKIST_DEPENDENCY_DATASOURCE', Zend_Json::encode($picklistDependencyDatasource));
$viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructureInstance);
$viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
$viewer->assign('MODULE', $moduleName);
$viewer->assign('CURRENTDATE', date('Y-n-j'));
$viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
$isRelationOperation = $request->get('relationOperation');
//if it is relation edit
$viewer->assign('IS_RELATION_OPERATION', $isRelationOperation);
if ($isRelationOperation) {
$viewer->assign('SOURCE_MODULE', $request->get('sourceModule'));
$viewer->assign('SOURCE_RECORD', $request->get('sourceRecord'));
}
$viewer->assign('MAX_UPLOAD_LIMIT_MB', Vtiger_Util_Helper::getMaxUploadSize());
$viewer->assign('MAX_UPLOAD_LIMIT', vglobal('upload_maxsize'));
// SalesPlatform.ru begin enable/disable button Import
$instance = Vtiger_Module::getInstance('SPSocialConnector');
$fl_import_button = true;
if (empty($record) || $instance->presence == 1) {
$fl_import_button = false;
}
//.........这里部分代码省略.........
示例8: process
//.........这里部分代码省略.........
$recordModel = Vtiger_Record_Model::getCleanInstance($moduleName);
$viewer->assign('MODE', '');
//The creation of Inventory record from action and Related list of product/service detailview the product/service details will calculated by following code
if ($request->get('product_id') || $sourceModule === 'Products') {
if ($sourceRecord) {
$productRecordModel = Products_Record_Model::getInstanceById($sourceRecord);
} else {
$productRecordModel = Products_Record_Model::getInstanceById($request->get('product_id'));
}
$relatedProducts = $productRecordModel->getDetailsForInventoryModule($recordModel);
} elseif ($request->get('service_id') || $sourceModule === 'Services') {
if ($sourceRecord) {
$serviceRecordModel = Services_Record_Model::getInstanceById($sourceRecord);
} else {
$serviceRecordModel = Services_Record_Model::getInstanceById($request->get('service_id'));
}
$relatedProducts = $serviceRecordModel->getDetailsForInventoryModule($recordModel);
} elseif ($sourceRecord && ($sourceModule === 'Accounts' || $sourceModule === 'Contacts' || $sourceModule === 'Potentials' || $sourceModule === 'Vendors' && $moduleName === 'PurchaseOrder')) {
$parentRecordModel = Vtiger_Record_Model::getInstanceById($sourceRecord, $sourceModule);
$recordModel->setParentRecordData($parentRecordModel);
}
}
$moduleModel = $recordModel->getModule();
$fieldList = $moduleModel->getFields();
$requestFieldList = array_intersect_key($request->getAll(), $fieldList);
//get the inventory terms and conditions
$inventoryRecordModel = Inventory_Record_Model::getCleanInstance($moduleName);
$termsAndConditions = $inventoryRecordModel->getInventoryTermsandConditions();
foreach ($requestFieldList as $fieldName => $fieldValue) {
$fieldModel = $fieldList[$fieldName];
if ($fieldModel->isEditable()) {
$recordModel->set($fieldName, $fieldModel->getDBInsertValue($fieldValue));
}
}
// SalesPlatform.ru begin Set default invoice status for SalesOrder
if ($moduleName == "SalesOrder") {
if (empty($record)) {
$recordModel->set("invoicestatus", "AutoCreated");
} else {
$checkbox = $recordModel->get("enable_recurring");
if ($checkbox != 1) {
$recordModel->set("invoicestatus", "AutoCreated");
}
}
}
// SalesPlatform.ru end
// SalesPlatform.ru begin Unifying method for EditView preparing
$recordModel = prepareEditView($recordModel, $_REQUEST, $viewer);
// SalesPlatform.ru end
$recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceFromRecordModel($recordModel, Vtiger_RecordStructure_Model::RECORD_STRUCTURE_MODE_EDIT);
// SalesPlatform.ru begin Field Validation Information
$tabid = getTabid($moduleName);
$validationData = getDBValidationData($recordModel->get('tab_name'), $tabid);
$validationArray = split_validationdataArray($validationData);
$viewer->assign("VALIDATION_DATA_FIELDNAME", $validationArray['fieldname']);
$viewer->assign("VALIDATION_DATA_FIELDDATATYPE", $validationArray['datatype']);
$viewer->assign("VALIDATION_DATA_FIELDLABEL", $validationArray['fieldlabel']);
$viewer->assign('ID', $record);
// SalesPlatform.ru end
$viewer->assign('VIEW_MODE', "fullForm");
$isRelationOperation = $request->get('relationOperation');
//if it is relation edit
//SalesPlatform.ru begin add relation create for Act from Invoice
$isFromInvoiceCreate = $request->get('convertFromInvoice');
$viewer->assign('IS_FROM_INVOICE_CREATE', $isFromInvoiceCreate);
//SalesPlatform.ru end
$viewer->assign('IS_RELATION_OPERATION', $isRelationOperation);
//SalesPlatform.ru begin add relation create for Act from Invoice
if ($isRelationOperation || $isFromInvoiceCreate) {
//if($isRelationOperation)
//SalesPlatform.ru end
$viewer->assign('SOURCE_MODULE', $sourceModule);
$viewer->assign('SOURCE_RECORD', $sourceRecord);
}
if (!empty($record) && $request->get('isDuplicate') == true) {
$viewer->assign('IS_DUPLICATE', true);
} else {
$viewer->assign('IS_DUPLICATE', false);
}
$currencies = Inventory_Module_Model::getAllCurrencies();
$picklistDependencyDatasource = Vtiger_DependencyPicklist::getPicklistDependencyDatasource($moduleName);
$viewer->assign('PICKIST_DEPENDENCY_DATASOURCE', Zend_Json::encode($picklistDependencyDatasource));
$viewer->assign('RECORD', $recordModel);
$viewer->assign('RECORD_STRUCTURE_MODEL', $recordStructureInstance);
$viewer->assign('RECORD_STRUCTURE', $recordStructureInstance->getStructure());
$viewer->assign('MODULE', $moduleName);
$viewer->assign('CURRENTDATE', date('Y-n-j'));
$viewer->assign('USER_MODEL', Users_Record_Model::getCurrentUserModel());
$viewer->assign('RELATED_PRODUCTS', $relatedProducts);
$viewer->assign('SHIPPING_TAXES', $shippingTaxes);
$viewer->assign('TAXES', $taxes);
$viewer->assign('CURRENCINFO', $currencyInfo);
$viewer->assign('CURRENCIES', $currencies);
$viewer->assign('TERMSANDCONDITIONS', $termsAndConditions);
$productModuleModel = Vtiger_Module_Model::getInstance('Products');
$viewer->assign('PRODUCT_ACTIVE', $productModuleModel->isActive());
$serviceModuleModel = Vtiger_Module_Model::getInstance('Services');
$viewer->assign('SERVICE_ACTIVE', $serviceModuleModel->isActive());
$viewer->view('EditView.tpl', 'Inventory');
}