diff --git a/webht/third_party/trippestOrderSync/models/orderFinance_model.php b/webht/third_party/trippestOrderSync/models/orderFinance_model.php index 4f0b8149..01172721 100644 --- a/webht/third_party/trippestOrderSync/models/orderFinance_model.php +++ b/webht/third_party/trippestOrderSync/models/orderFinance_model.php @@ -155,12 +155,12 @@ class OrderFinance_model extends CI_Model { { $ret = new stdClass(); // 从订单客人名单列表中取 - $sql = "SELECT BPL_BPE_SN,bp.BPE_GuestType + $sql = "SELECT BPL_BPE_SN,isnull(bp.BPE_GuestType, '1') BPE_GuestType from BIZ_ConfirmLineDetail cold inner join BIZ_BookPeopleList bpl on bpl.BPL_COLD_SN=cold.COLD_SN inner join biz_bookpeople bp on bp.BPE_SN=bpl.BPL_BPE_SN - where cold.COLD_COLI_SN=$coli_sn - group by bpl.BPL_BPE_SN,bp.BPE_GuestType"; + where cold.COLD_COLI_SN=$coli_sn AND cold.DeleteFlag=0 + group by bpl.BPL_BPE_SN,isnull(bp.BPE_GuestType, '1')"; $query = $this->HT->query($sql); $ret->person_num = $query->num_rows(); $guest_type_cnt = array_count_values(array_map(function($ele) { return $ele->BPE_GuestType; }, $query->result()));