diff --git a/oss/vtiger/trunk/modules/Products/ListView.php b/oss/vtiger/trunk/modules/Products/ListView.php
index ba08c5a4..aac79759 100644
--- a/oss/vtiger/trunk/modules/Products/ListView.php
+++ b/oss/vtiger/trunk/modules/Products/ListView.php
@@ -1,223 +1,227 @@
-initSortbyField($currentModule);
-$sorder = $focus->getSortOrder();
-$order_by = $focus->getOrderBy();
-
-$_SESSION['PRODUCTS_ORDER_BY'] = $order_by;
-$_SESSION['PRODUCTS_SORT_ORDER'] = $sorder;
-
-$smarty = new vtigerCRM_Smarty();
-
-$smarty->assign('MOD', $mod_strings);
-$smarty->assign('APP', $app_strings);
-$smarty->assign("THEME", $theme);
-$smarty->assign('MODULE', $currentModule);
-$smarty->assign('SINGLE_MOD', $currentModule);
-$smarty->assign('CATEGORY', $category);
-$smarty->assign('BUTTONS', $list_buttons);
-$smarty->assign('CHECK', $tool_buttons);
-$smarty->assign('IMAGE_PATH', "themes/$theme/images/");
-
-$smarty->assign('CHANGE_OWNER', getUserslist());
-$smarty->assign('CHANGE_GROUP_OWNER', getGroupslist());
-
-// Custom View
-$customView = new CustomView($currentModule);
-$viewid = $customView->getViewId($currentModule);
-$customview_html = $customView->getCustomViewCombo($viewid);
-$viewinfo = $customView->getCustomViewByCvid($viewid);
-
-// Feature available from 5.1
-if(method_exists($customView, 'isPermittedChangeStatus')) {
- // Approving or Denying status-public by the admin in CustomView
- $statusdetails = $customView->isPermittedChangeStatus($viewinfo['status']);
-
- // To check if a user is able to edit/delete a CustomView
- $edit_permit = $customView->isPermittedCustomView($viewid,'EditView',$currentModule);
- $delete_permit = $customView->isPermittedCustomView($viewid,'Delete',$currentModule);
-
- $smarty->assign("CUSTOMVIEW_PERMISSION",$statusdetails);
- $smarty->assign("CV_EDIT_PERMIT",$edit_permit);
- $smarty->assign("CV_DELETE_PERMIT",$delete_permit);
-}
-// END
-
-$smarty->assign("VIEWID", $viewid);
-
-if($viewinfo['viewname'] == 'All') $smarty->assign('ALL', 'All');
-
-if($viewid ==0)
-{
- echo "
";
- exit;
-}
-
-global $current_user;
-$queryGenerator = new QueryGenerator($currentModule, $current_user);
-if ($viewid != "0") {
- $queryGenerator->initForCustomViewById($viewid);
-} else {
- $queryGenerator->initForDefaultCustomView();
-}
-
-// Enabling Module Search
-$url_string = '';
-if($_REQUEST['query'] == 'true') {
- // has to REQUEST as it can either $_GET for Dashboard and
- // $_POST for search in listview.
- $queryGenerator->addUserSearchConditions($_REQUEST);
- $ustring = getSearchURL($_REQUEST);
- $url_string .= "&query=true$ustring";
- $smarty->assign('SEARCH_URL', $url_string);
-}
-
-$list_query = $queryGenerator->getQuery();
-$where = $queryGenerator->getConditionalWhere();
-if(isset($where) && $where != '') {
- $_SESSION['export_where'] = $where;
-} else {
- unset($_SESSION['export_where']);
-}
-// Sorting
-if(!empty($order_by)) {
- if($order_by == 'smownerid') $list_query .= ' ORDER BY user_name '.$sorder;
- else {
- $tablename = getTableNameForField($currentModule, $order_by);
- $tablename = ($tablename != '')? ($tablename . '.') : '';
- $list_query .= ' ORDER BY ' . $tablename . $order_by . ' ' . $sorder;
- }
-}
-
-//Postgres 8 fixes
-if( $adb->dbType == "pgsql")
- $list_query = fixPostgresQuery( $list_query, $log, 0);
-
-if(PerformancePrefs::getBoolean('LISTVIEW_COMPUTE_PAGE_COUNT', false) === true){
- $count_result = $adb->query( mkCountQuery( $list_query));
- $noofrows = $adb->query_result($count_result,0,"count");
-}else{
- $noofrows = null;
-}
-
-$queryMode = (isset($_REQUEST['query']) && $_REQUEST['query'] == 'true');
-$start = ListViewSession::getRequestCurrentPage($currentModule, $list_query, $viewid, $queryMode);
-
-$navigation_array = VT_getSimpleNavigationValues($start,$list_max_entries_per_page,$noofrows);
-
-$limit_start_rec = ($start-1) * $list_max_entries_per_page;
-
-if( $adb->dbType == "pgsql")
- $list_result = $adb->pquery($list_query. " OFFSET $limit_start_rec LIMIT $list_max_entries_per_page", array());
-else
- $list_result = $adb->pquery($list_query. " LIMIT $limit_start_rec, $list_max_entries_per_page", array());
-
-$recordListRangeMsg = getRecordRangeMessage($list_result, $limit_start_rec,$noofrows);
-$smarty->assign('recordListRange',$recordListRangeMsg);
-
-$smarty->assign("CUSTOMVIEW_OPTION",$customview_html);
-
-$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, $currentModule, 'index', $viewid);
-$smarty->assign("NAVIGATION", $navigationOutput);
-
-$controller = new ListViewController($adb, $current_user, $queryGenerator);
-$listview_header = $controller->getListViewHeader($focus,$currentModule,$url_string,$sorder,
- $order_by);
-$listview_entries = $controller->getListViewEntries($focus,$currentModule,$list_result,
- $navigation_array);
-$listview_header_search = $controller->getBasicSearchFieldInfoList();
-
-$smarty->assign('LISTHEADER', $listview_header);
-$smarty->assign('LISTENTITY', $listview_entries);
-$smarty->assign('SEARCHLISTHEADER',$listview_header_search);
-
-// Module Search
-$alphabetical = AlphabeticalSearch($currentModule,'index',$focus->def_basicsearch_col,'true','basic','','','','',$viewid);
-$fieldnames = $controller->getAdvancedSearchOptionString();
-$criteria = getcriteria_options();
-$smarty->assign("ALPHABETICAL", $alphabetical);
-$smarty->assign("FIELDNAMES", $fieldnames);
-$smarty->assign("CRITERIA", $criteria);
-
-ListViewSession::setSessionQuery($currentModule,$list_query,$viewid);
-
-if($_REQUEST['errormsg'] != '')
-{
- $errormsg = vtlib_purify($_REQUEST['errormsg']);
- $smarty->assign("ERROR","The User does not have permission to delete ".$errormsg." ".$currentModule);
-}else
-{
- $smarty->assign("ERROR","");
-}
-$url_string = '&smodule=PRODUCTS'; // assigning http url string
-
-$smarty->assign("SELECT_SCRIPT", $view_script);
-
-$smarty->assign("AVALABLE_FIELDS", getMergeFields($currentModule,"available_fields"));
-$smarty->assign("FIELDS_TO_MERGE", getMergeFields($currentModule,"fileds_to_merge"));
-
-//Added to select Multiple records in multiple pages
-$smarty->assign("SELECTEDIDS", vtlib_purify($_REQUEST['selobjs']));
-$smarty->assign("ALLSELECTEDIDS", vtlib_purify($_REQUEST['allselobjs']));
-$smarty->assign("CURRENT_PAGE_BOXES", implode(array_keys($listview_entries),";"));
-
-// Gather the custom link information to display
-include_once('vtlib/Vtiger/Link.php');
-$customlink_params = Array('MODULE'=>$currentModule, 'ACTION'=>vtlib_purify($_REQUEST['action']), 'CATEGORY'=> $category);
-$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('LISTVIEWBASIC','LISTVIEW'), $customlink_params));
-// END
-
-if(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '')
- $smarty->display("ListViewEntries.tpl");
-else
- $smarty->display('ListView.tpl');
-
+initSortbyField($currentModule);
+
+if(ListViewSession::hasViewChanged($currentModule,$viewid)) {
+ $_SESSION['PRODUCTS_ORDER_BY'] = '';
+}
+$sorder = $focus->getSortOrder();
+$order_by = $focus->getOrderBy();
+
+$_SESSION['PRODUCTS_ORDER_BY'] = $order_by;
+$_SESSION['PRODUCTS_SORT_ORDER'] = $sorder;
+
+$smarty = new vtigerCRM_Smarty();
+
+$smarty->assign('MOD', $mod_strings);
+$smarty->assign('APP', $app_strings);
+$smarty->assign("THEME", $theme);
+$smarty->assign('MODULE', $currentModule);
+$smarty->assign('SINGLE_MOD', $currentModule);
+$smarty->assign('CATEGORY', $category);
+$smarty->assign('BUTTONS', $list_buttons);
+$smarty->assign('CHECK', $tool_buttons);
+$smarty->assign('IMAGE_PATH', "themes/$theme/images/");
+
+$smarty->assign('CHANGE_OWNER', getUserslist());
+$smarty->assign('CHANGE_GROUP_OWNER', getGroupslist());
+
+// Custom View
+$customView = new CustomView($currentModule);
+$viewid = $customView->getViewId($currentModule);
+$customview_html = $customView->getCustomViewCombo($viewid);
+$viewinfo = $customView->getCustomViewByCvid($viewid);
+
+// Feature available from 5.1
+if(method_exists($customView, 'isPermittedChangeStatus')) {
+ // Approving or Denying status-public by the admin in CustomView
+ $statusdetails = $customView->isPermittedChangeStatus($viewinfo['status']);
+
+ // To check if a user is able to edit/delete a CustomView
+ $edit_permit = $customView->isPermittedCustomView($viewid,'EditView',$currentModule);
+ $delete_permit = $customView->isPermittedCustomView($viewid,'Delete',$currentModule);
+
+ $smarty->assign("CUSTOMVIEW_PERMISSION",$statusdetails);
+ $smarty->assign("CV_EDIT_PERMIT",$edit_permit);
+ $smarty->assign("CV_DELETE_PERMIT",$delete_permit);
+}
+// END
+
+$smarty->assign("VIEWID", $viewid);
+
+if($viewinfo['viewname'] == 'All') $smarty->assign('ALL', 'All');
+
+if($viewid ==0)
+{
+ echo "";
+ exit;
+}
+
+global $current_user;
+$queryGenerator = new QueryGenerator($currentModule, $current_user);
+if ($viewid != "0") {
+ $queryGenerator->initForCustomViewById($viewid);
+} else {
+ $queryGenerator->initForDefaultCustomView();
+}
+
+// Enabling Module Search
+$url_string = '';
+if($_REQUEST['query'] == 'true') {
+ // has to REQUEST as it can either $_GET for Dashboard and
+ // $_POST for search in listview.
+ $queryGenerator->addUserSearchConditions($_REQUEST);
+ $ustring = getSearchURL($_REQUEST);
+ $url_string .= "&query=true$ustring";
+ $smarty->assign('SEARCH_URL', $url_string);
+}
+
+$list_query = $queryGenerator->getQuery();
+$where = $queryGenerator->getConditionalWhere();
+if(isset($where) && $where != '') {
+ $_SESSION['export_where'] = $where;
+} else {
+ unset($_SESSION['export_where']);
+}
+// Sorting
+if(!empty($order_by)) {
+ if($order_by == 'smownerid') $list_query .= ' ORDER BY user_name '.$sorder;
+ else {
+ $tablename = getTableNameForField($currentModule, $order_by);
+ $tablename = ($tablename != '')? ($tablename . '.') : '';
+ $list_query .= ' ORDER BY ' . $tablename . $order_by . ' ' . $sorder;
+ }
+}
+
+//Postgres 8 fixes
+if( $adb->dbType == "pgsql")
+ $list_query = fixPostgresQuery( $list_query, $log, 0);
+
+if(PerformancePrefs::getBoolean('LISTVIEW_COMPUTE_PAGE_COUNT', false) === true){
+ $count_result = $adb->query( mkCountQuery( $list_query));
+ $noofrows = $adb->query_result($count_result,0,"count");
+}else{
+ $noofrows = null;
+}
+
+$queryMode = (isset($_REQUEST['query']) && $_REQUEST['query'] == 'true');
+$start = ListViewSession::getRequestCurrentPage($currentModule, $list_query, $viewid, $queryMode);
+
+$navigation_array = VT_getSimpleNavigationValues($start,$list_max_entries_per_page,$noofrows);
+
+$limit_start_rec = ($start-1) * $list_max_entries_per_page;
+
+if( $adb->dbType == "pgsql")
+ $list_result = $adb->pquery($list_query. " OFFSET $limit_start_rec LIMIT $list_max_entries_per_page", array());
+else
+ $list_result = $adb->pquery($list_query. " LIMIT $limit_start_rec, $list_max_entries_per_page", array());
+
+$recordListRangeMsg = getRecordRangeMessage($list_result, $limit_start_rec,$noofrows);
+$smarty->assign('recordListRange',$recordListRangeMsg);
+
+$smarty->assign("CUSTOMVIEW_OPTION",$customview_html);
+
+$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, $currentModule, 'index', $viewid);
+$smarty->assign("NAVIGATION", $navigationOutput);
+
+$controller = new ListViewController($adb, $current_user, $queryGenerator);
+$listview_header = $controller->getListViewHeader($focus,$currentModule,$url_string,$sorder,
+ $order_by);
+$listview_entries = $controller->getListViewEntries($focus,$currentModule,$list_result,
+ $navigation_array);
+$listview_header_search = $controller->getBasicSearchFieldInfoList();
+
+$smarty->assign('LISTHEADER', $listview_header);
+$smarty->assign('LISTENTITY', $listview_entries);
+$smarty->assign('SEARCHLISTHEADER',$listview_header_search);
+
+// Module Search
+$alphabetical = AlphabeticalSearch($currentModule,'index',$focus->def_basicsearch_col,'true','basic','','','','',$viewid);
+$fieldnames = $controller->getAdvancedSearchOptionString();
+$criteria = getcriteria_options();
+$smarty->assign("ALPHABETICAL", $alphabetical);
+$smarty->assign("FIELDNAMES", $fieldnames);
+$smarty->assign("CRITERIA", $criteria);
+
+ListViewSession::setSessionQuery($currentModule,$list_query,$viewid);
+
+if($_REQUEST['errormsg'] != '')
+{
+ $errormsg = vtlib_purify($_REQUEST['errormsg']);
+ $smarty->assign("ERROR","The User does not have permission to delete ".$errormsg." ".$currentModule);
+}else
+{
+ $smarty->assign("ERROR","");
+}
+$url_string = '&smodule=PRODUCTS'; // assigning http url string
+
+$smarty->assign("SELECT_SCRIPT", $view_script);
+
+$smarty->assign("AVALABLE_FIELDS", getMergeFields($currentModule,"available_fields"));
+$smarty->assign("FIELDS_TO_MERGE", getMergeFields($currentModule,"fileds_to_merge"));
+
+//Added to select Multiple records in multiple pages
+$smarty->assign("SELECTEDIDS", vtlib_purify($_REQUEST['selobjs']));
+$smarty->assign("ALLSELECTEDIDS", vtlib_purify($_REQUEST['allselobjs']));
+$smarty->assign("CURRENT_PAGE_BOXES", implode(array_keys($listview_entries),";"));
+
+// Gather the custom link information to display
+include_once('vtlib/Vtiger/Link.php');
+$customlink_params = Array('MODULE'=>$currentModule, 'ACTION'=>vtlib_purify($_REQUEST['action']), 'CATEGORY'=> $category);
+$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('LISTVIEWBASIC','LISTVIEW'), $customlink_params));
+// END
+
+if(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '')
+ $smarty->display("ListViewEntries.tpl");
+else
+ $smarty->display('ListView.tpl');
+
?>
\ No newline at end of file
diff --git a/oss/vtiger/trunk/modules/Products/language/zh_cn.lang.php b/oss/vtiger/trunk/modules/Products/language/zh_cn.lang.php
index dad09962..d08a3bfc 100644
--- a/oss/vtiger/trunk/modules/Products/language/zh_cn.lang.php
+++ b/oss/vtiger/trunk/modules/Products/language/zh_cn.lang.php
@@ -21,15 +21,15 @@
* ---------------------------------------------
*/
$mod_strings = Array(
-'LBL_MODULE_NAME' => '产品',
+'LBL_MODULE_NAME'=>'产品',
'SINGLE_Products'=>'产品',
-'LBL_LIST_PRODUCT_NAME' => '产品名称',
-'LBL_TOOL_FORM_TITLE' => '产品工具',
-'LBL_SEARCH_FORM_TITLE' => '搜寻产品',
-'LBL_PRODUCT_NAME' => '产品类型名称:',
-'LBL_VENDOR_NAME' => '厂商名称:',
-'LBL_PRICEBOOK_NAME' => '价目表名称:',
-'LBL_VENDOR' => '厂商',
+'LBL_LIST_PRODUCT_NAME'=>'产品名称',
+'LBL_TOOL_FORM_TITLE'=>'产品工具',
+'LBL_SEARCH_FORM_TITLE'=>'搜寻产品',
+'LBL_PRODUCT_NAME'=>'产品类型名称:',
+'LBL_VENDOR_NAME'=>'厂商名称:',
+'LBL_PRICEBOOK_NAME'=>'价目表名称:',
+'LBL_VENDOR'=> '厂商',
'LBL_PRICEBOOK' => '价目表:',
'LBL_VENDOR_INFORMATION' => '厂商信息:',
'LBL_PRICEBOOK_INFORMATION' => '价目表信息:',
@@ -44,7 +44,7 @@ $mod_strings = Array(
'LBL_CATEGORY' => '产品分类:',
'LBL_PRODUCT_CODE' => '产品编码',
'LBL_LIST_PRODUCT_CODE' => '产品类型编码:',
-'LBL_PRODUCT_ACTIVE' => '产品任务',
+'LBL_PRODUCT_ACTIVE' => '产品上架',
'LBL_PRODUCT_COMMISSION_RATE' => '评价',
'LBL_PRODUCT_QTY_PER_UNIT' => '量/单位',
'LBL_PRODUCT_UNIT_PRICE' => '单位价格',
@@ -96,7 +96,7 @@ $mod_strings = Array(
'Product Name' => '产品名称',
//'Product Code'=>'Part Number',
'Part Number' => '部件编码',
-'Product Active' => '产品任务',
+'Product Active' => '产品上架',
'Commission Rate' => '评价 (%)',
'Qty/Unit' => '量/单位',
'Unit Price' => '单位价格',
@@ -182,33 +182,33 @@ $mod_strings = Array(
'Software'=>'签证',
'CRM Applications'=>'企业注册',
-'300-Sales-Software' => '投资性公司',
-'301-Sales-Hardware' => '股份有限公司',
-'302-Rental-Income' => '研发机构',
-'303-Interest-Income' => '拍卖企业',
-'304-Sales-Software-Support' => '物流',
-'305-Sales Other' => '贸易公司',
-'306-Internet Sales' => '资产评估机构',
-'307-Service-Hardware Labor' => '人才中介机构',
-'308-Sales-Books' => '其他',
+'300-Sales-Software'=>'投资性公司',
+'301-Sales-Hardware'=>'股份有限公司',
+'302-Rental-Income'=>'研发机构',
+'303-Interest-Income'=>'拍卖企业',
+'304-Sales-Software-Support'=>'物流',
+'305-Sales Other'=>'贸易公司',
+'306-Internet Sales'=>'资产评估机构',
+'307-Service-Hardware Labor'=>'人才中介机构',
+'308-Sales-Books'=>'其他',
-'Box' => '盒',
-'Carton' => '纸板',
-'Caton' => 'Caton',
-'Dozen' => '打',
-'Each' => '每件',
-'Hours' => '小时',
-'Impressions' => '印象',
-'Lb' => '磅',
-'M' => '公尺',
-'Pack' => '包装',
-'Pages' => '包装',
-'Pieces' => '片',
-'Quantity' => '数量',
-'Reams' => '大量',
-'Sheet' => '张',
-'Spiral Binder' => '打包带',
-'Sq Ft' => '平方英呎',
+'Box'=>'盒',
+'Carton'=>'纸板',
+'Caton'=>'箱',
+'Dozen'=>'打',
+'Each'=>'每件',
+'Hours'=>'小时',
+'Impressions'=>'印象',
+'Lb'=>'磅',
+'M'=>'公尺',
+'Pack'=>'包装',
+'Pages'=>'包装',
+'Pieces'=>'片',
+'Quantity'=>'数量',
+'Reams'=>'大量',
+'Sheet'=>'张',
+'Spiral Binder'=>'打包带',
+'Sq Ft'=>'平方英呎',
//Added for 5.0.3
'MSG_STOCK_LEVEL'=>'库存水平依然很低',
@@ -219,6 +219,16 @@ $mod_strings = Array(
'MSG_SEVERITY'=>'严重性:重大',
'MSG_THANKS'=>'Thanks,',
+// Added after 5.0.4 GA
+
+'LBL_PRODUCT_PRICES'=>'产品价格',
+'Member Of'=>'是什么的成员:',
+
+// Module Sequence Numbering
+'Product No' => '产品编号',
+// END
+
+'LBL_NO_TAXES_ASSOCIATED'=>'本产品无相关税务信息',
);
?>