Merge branch 'feature/trippest'

mobile-first
lyt 6 years ago
commit 242bab453d

@ -296,6 +296,7 @@ class Vendor_money extends CI_Controller {
$vendors = $this->input->post("vendors");
$ret['default_vendor'] = $vendors;
$vendor_sourcetype = $this->trippest->vendor_sourcetype();
$ret['no_check_cancel'] = $this->money_model->get_cancel_not_check($start_date, $end_date, implode(',' ,$vendors));
// price [Trippest receipts & agency receipts]
$ret['price_error'] = $this->money_model->get_precheck_price_error($start_date, $end_date, implode(',' ,$vendors));
// 仅更新成本数据, 后重新获取

@ -63,11 +63,12 @@ class Vendor_money_model extends CI_Model {
and DeleteFlag=0
) as service_cnt,
(select isnull(SUM(COLD_TotalPrice),0) from BIZ_ConfirmLineDetail
left join biz_packageorderinfo on poi_cold_sn=cold_sn
where COLD_COLI_SN=COLI_SN
--and COLD_ServiceType='D'
and DeleteFlag=0
--and COLD_PlanVEI_SN<>$vendor
and COLD_PlanVEI_SN not in ($all_vendor)
and ( COLD_PlanVEI_SN not in ($all_vendor) or isnull(poi_quotationType,0)=4)
) as other_vendor_price,
COLI.COLI_sourcetype,
COLI.COLI_Price,
@ -91,9 +92,8 @@ class Vendor_money_model extends CI_Model {
--and GAI_Type in (" . PAY_OTHER . ")
) as vendor_receipt
,(select SUM(convert(decimal(10,2),isnull(GCI_priceCNY,0))) from
GroupCombineInfo where GCI_GRI_SN=GRI_SN and GCI_VEI_SN in ($all_vendor)
--and COLI_OPI_ID<>435
and ISNULL(GCI_combineNo,'') not in ('','cancel')
GroupCombineInfo where GCI_GRI_SN=GRI_SN
and ISNULL(GCI_combineNo,'') not in ('','cancel','forbidden')
) as sync_total_receipt_sum
,coli.COLI_OPI_ID
,(
@ -117,6 +117,10 @@ class Vendor_money_model extends CI_Model {
and DeleteFlag=0
and COLD_PlanVEI_SN in ($all_vendor)
)
and exists (
select 1 from GroupCombineInfo where GCI_GRI_SN=GRI_SN and GCI_VEI_SN in ($all_vendor)
and GCI_travelDate between '$start_date' and '$end_date'
)
) as cgi_group";
// -- and COLI_SN not in ($duplicate_gri)
@ -398,6 +402,27 @@ class Vendor_money_model extends CI_Model {
return $query->result_array();
}
public function get_cancel_not_check($start_date, $end_date, $all_vendor)
{
$sql = "SELECT
COLI_ID, COLI_GroupCode,GCI_combineNo,
GCI_priceCNY
from GroupCombineInfo gci
inner join BIZ_ConfirmLineInfo coli on COLI_GRI_SN=GCI_GRI_SN
where
GCI_travelDate between '$start_date' and '$end_date'
and convert(decimal(10,2),isnull(GCI_priceCNY,0))<>0
and COLI_State in (30,40)
and GCI_VEI_SN in ($all_vendor)
and isnull(GCI_combineNo,'') not in ('','cancel','forbidden')
and not exists(
select 1 from CK_GroupInfo where CGI_GRI_SN=COLI_GRI_SN
and CGI_Checked=1
)";
$query = $this->HT->query($sql);
return $query->result_array();
}
public function get_precheck_price_error($start_date, $end_date, $all_vendor)
{
$expire_fresh = date('Y-m-d',strtotime("+3 months", strtotime($start_date)));

@ -152,6 +152,32 @@
</div>
</div>
</form>
<?php if (!empty($no_check_cancel)) { ?>
<p></p>
<table class="table table-bordered table-hover">
<thead>
<tr>
<th class="text-left" colspan="3">不成行或已取消的团, 账单未审核</th>
</tr>
<tr>
<th >HT团号</th>
<th >拼团号</th>
<th >团款</th>
</tr>
</thead>
<tbody>
<?php
foreach ($no_check_cancel as $ko => $cc) { ?>
<tr>
<td class="text-left"><?php echo $cc['COLI_GroupCode']; ?></td>
<td class="text-left"><?php echo $cc['GCI_combineNo']; ?></td>
<td class="text-left"><?php echo $cc['GCI_priceCNY']; ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } ?>
<p></p>
<table class="table table-bordered table-hover">
<thead>

Loading…
Cancel
Save