|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<?php
|
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
|
|
|
|
|
|
define('PAY_OTHER','15017,15008,15006');
|
|
|
|
|
define('PAY_OTHER','15017,15008,15006,15020');
|
|
|
|
|
|
|
|
|
|
class Vendor_money_model extends CI_Model {
|
|
|
|
|
|
|
|
|
@ -16,14 +16,21 @@ class Vendor_money_model extends CI_Model {
|
|
|
|
|
{
|
|
|
|
|
$sql = "SELECT sum_opi.COLI_OPI_ID,sum(sum_opi.海纳收款) as trippest_sum,sum(sum_opi.地接社收款) as vendor_sum,
|
|
|
|
|
sum(sum_opi.other_price_RMB) as other_price_sum
|
|
|
|
|
, sum(sum_opi.other_cost_RMB) as other_cost_sum
|
|
|
|
|
from (
|
|
|
|
|
SELECT
|
|
|
|
|
(select isnull(SUM(COLD_TotalPrice),0) from BIZ_ConfirmLineDetail cold
|
|
|
|
|
where cold.COLD_COLI_SN=cgi_group.COLI_SN
|
|
|
|
|
and COLD_ServiceType <> 'D'
|
|
|
|
|
and COLD_PlanVEI_SN NOT IN ($all_vendor)
|
|
|
|
|
and COLD_PlanVEI_SN IN ($all_vendor)
|
|
|
|
|
and cold.DeleteFlag=0
|
|
|
|
|
)*cgi_group.汇率 as other_price_RMB,
|
|
|
|
|
(select isnull(SUM(COLD_TotalCost),0) from BIZ_ConfirmLineDetail cold
|
|
|
|
|
where cold.COLD_COLI_SN=cgi_group.COLI_SN
|
|
|
|
|
and COLD_ServiceType <> 'D'
|
|
|
|
|
and COLD_PlanVEI_SN IN ($all_vendor)
|
|
|
|
|
and cold.DeleteFlag=0
|
|
|
|
|
) as other_cost_RMB,
|
|
|
|
|
*
|
|
|
|
|
from (
|
|
|
|
|
select
|
|
|
|
|