|
@@ -128,8 +128,6 @@ class ocean_booking {
|
|
|
}
|
|
}
|
|
|
$sqlWhere = ' where ' . common::searchExtendHandNew("booking", $_SESSION["ONLINE_USER"]);
|
|
$sqlWhere = ' where ' . common::searchExtendHandNew("booking", $_SESSION["ONLINE_USER"]);
|
|
|
$sqlWhere .= search::getInstance()->getSearchSQL("Booking_Search");
|
|
$sqlWhere .= search::getInstance()->getSearchSQL("Booking_Search");
|
|
|
- //新版要排除type2情况,总数才会对的上
|
|
|
|
|
- $sqlWhere .= " and (not(bol_type != 'BOOKING' and booking_no is not null and booking_no <> ''))";
|
|
|
|
|
|
|
|
|
|
//移除掉全文检索 但保留代码
|
|
//移除掉全文检索 但保留代码
|
|
|
// if (!empty($_POST["_textSearch"])) {
|
|
// if (!empty($_POST["_textSearch"])) {
|
|
@@ -173,20 +171,16 @@ class ocean_booking {
|
|
|
$filterTag_param = "1=1";
|
|
$filterTag_param = "1=1";
|
|
|
}
|
|
}
|
|
|
if (stripos($filterTag, "Confirmed") !== FALSE) {
|
|
if (stripos($filterTag, "Confirmed") !== FALSE) {
|
|
|
- $_sqlwhere .= " or (bol_type = 'BOOKING' and status!='Cancelled')";
|
|
|
|
|
- $filterTag_param .= " or (bol_type = 'BOOKING' and status!='Cancelled')";
|
|
|
|
|
- }
|
|
|
|
|
- if (stripos($filterTag, "type2") !== FALSE) {
|
|
|
|
|
- $_sqlwhere .= " or (bol_type != 'BOOKING' and booking_no is not null and booking_no <> '')";
|
|
|
|
|
- $filterTag_param .= " or (bol_type != 'BOOKING' and booking_no is not null and booking_no <> '')";
|
|
|
|
|
|
|
+ $_sqlwhere .= " or (bol_type != 'BOOKING')";
|
|
|
|
|
+ $filterTag_param .= " or (bol_type != 'BOOKING')";
|
|
|
}
|
|
}
|
|
|
if (stripos($filterTag, "Cancelled") !== FALSE) {
|
|
if (stripos($filterTag, "Cancelled") !== FALSE) {
|
|
|
$_sqlwhere .= " or (status='Cancelled')";
|
|
$_sqlwhere .= " or (status='Cancelled')";
|
|
|
$filterTag_param .= " or (status='Cancelled')";
|
|
$filterTag_param .= " or (status='Cancelled')";
|
|
|
}
|
|
}
|
|
|
if (stripos($filterTag, "Created") !== FALSE) {
|
|
if (stripos($filterTag, "Created") !== FALSE) {
|
|
|
- $_sqlwhere .= " or (bol_type != 'BOOKING' and (booking_no is null or booking_no = ''))";
|
|
|
|
|
- $filterTag_param .= " or (bol_type != 'BOOKING' and (booking_no is null or booking_no = ''))";
|
|
|
|
|
|
|
+ $_sqlwhere .= " or (bol_type = 'BOOKING' and status!='Cancelled')";
|
|
|
|
|
+ $filterTag_param .= " or (bol_type = 'BOOKING' and status!='Cancelled')";
|
|
|
}
|
|
}
|
|
|
if(strtolower($filterTag) <> "all" && !empty($filterTag)){
|
|
if(strtolower($filterTag) <> "all" && !empty($filterTag)){
|
|
|
$sqlWhere .= " and ($_sqlwhere)";
|
|
$sqlWhere .= " and ($_sqlwhere)";
|
|
@@ -202,8 +196,8 @@ class ocean_booking {
|
|
|
if ($rc == - 1 || true) {
|
|
if ($rc == - 1 || true) {
|
|
|
$sql_all_status = "SELECT count(1) as rc,
|
|
$sql_all_status = "SELECT count(1) as rc,
|
|
|
sum(case when $filterTag_param then 1 else 0 end) as seach_rc,
|
|
sum(case when $filterTag_param then 1 else 0 end) as seach_rc,
|
|
|
- sum(case when (1<>1 or (bol_type != 'BOOKING' and (booking_no is null or booking_no = ''))) then 1 else 0 end) as creatd,
|
|
|
|
|
- sum(case when (1<>1 or (bol_type = 'BOOKING' and status!='Cancelled')) then 1 else 0 end) as confirmed,
|
|
|
|
|
|
|
+ sum(case when (1<>1 or (bol_type = 'BOOKING' and status!='Cancelled')) then 1 else 0 end) as creatd,
|
|
|
|
|
+ sum(case when (1<>1 or (bol_type != 'BOOKING')) then 1 else 0 end) as confirmed,
|
|
|
sum(case when (1<>1 or (status='Cancelled')) then 1 else 0 end) as concelled
|
|
sum(case when (1<>1 or (status='Cancelled')) then 1 else 0 end) as concelled
|
|
|
from public.online_booking" . $sqlWhere_befrom_filterTag;
|
|
from public.online_booking" . $sqlWhere_befrom_filterTag;
|
|
|
|
|
|
|
@@ -274,12 +268,9 @@ class ocean_booking {
|
|
|
|
|
|
|
|
//按新逻辑处理status,现在是管理员权限,客户权限少了一种状态,先设置默认值防止出错
|
|
//按新逻辑处理status,现在是管理员权限,客户权限少了一种状态,先设置默认值防止出错
|
|
|
$status = "Created";
|
|
$status = "Created";
|
|
|
- if(!($val['color'] == "FFFF0000" || $val['color'] == "FF00FF00" || $val['color'] == "FF0000FF")){
|
|
|
|
|
|
|
+ if ($val['color'] == "FF00FF00" || $val['color'] == "FF0000FF"){
|
|
|
$status = "Confirmed";
|
|
$status = "Confirmed";
|
|
|
}
|
|
}
|
|
|
- if ($val['color'] == "FF0000FF"){
|
|
|
|
|
- $status = "Created";
|
|
|
|
|
- }
|
|
|
|
|
if ($val['color'] == "FFFF0000"){
|
|
if ($val['color'] == "FFFF0000"){
|
|
|
$status = "Cancelled";
|
|
$status = "Cancelled";
|
|
|
}
|
|
}
|