Trippest 地接收款整理[未完]

feature/trippest
lyt 6 years ago
parent 4ba0760466
commit f90b0691af

@ -1,6 +1,8 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
define('PAY_OTHER','15017,15008,15006');
class Vendor_money_model extends CI_Model {
function __construct() {
@ -44,11 +46,11 @@ class Vendor_money_model extends CI_Model {
) as 总收款,
(select isnull(SUM(GAI_SSJE),0) from BIZ_GroupAccountInfo
where DeleteFlag=0 and GAI_COLI_SN=COLI_SN
and GAI_Type not in (15017,15008,15006)
and GAI_Type not in (" . PAY_OTHER . ")
) as 海纳收款,
(select isnull(SUM(GAI_SSJE),0) from BIZ_GroupAccountInfo
where DeleteFlag=0 and GAI_COLI_SN=COLI_SN
and GAI_Type in (15017,15008,15006)
and GAI_Type in (" . PAY_OTHER . ")
) as 地接社收款
,coli.COLI_OPI_ID
@ -83,9 +85,7 @@ class Vendor_money_model extends CI_Model {
FROM BIZ_GroupAccountInfo
WHERE DeleteFlag=0
AND GAI_COLI_SN=COLI_SN
AND GAI_Type IN (15017,
15008,
15006)) AS vendor_sum ,
AND GAI_Type IN (" . PAY_OTHER . ")) AS vendor_sum ,
coli.COLI_OPI_ID
FROM CK_GroupInfo cgi
INNER JOIN GRoupInfo gri ON CGI_GRI_SN=GRI_SN
@ -110,9 +110,7 @@ class Vendor_money_model extends CI_Model {
WHERE DeleteFlag=0
AND GAI_COLI_SN=COLI_SN
AND GAI_SSJE>0
AND GAI_Type IN (15017,
15008,
15006)
AND GAI_Type IN (" . PAY_OTHER . ")
)
ORDER BY cgi.CGI_ArriveDate ";
$query = $this->HT->query($sql);

Loading…
Cancel
Save