|
|
|
@ -191,11 +191,11 @@ class Orders_model extends CI_Model {
|
|
|
|
|
from GroupCombineInfo gci
|
|
|
|
|
inner join GRoupInfo on GRI_SN=GCI_GRI_SN and GRI_No<>''
|
|
|
|
|
LEFT JOIN BIZ_ConfirmLineInfo coli ON coli.COLI_GRI_SN=gci.GCI_GRI_SN
|
|
|
|
|
and coli.COLI_State<>50
|
|
|
|
|
and (select OPI_DEI_SN from OperatorInfo where OPI_SN=coli.COLI_OPI_ID)=30
|
|
|
|
|
LEFT JOIN BIZ_ConfirmLineDetail cold ON cold.COLD_COLI_SN=coli.COLI_SN
|
|
|
|
|
where
|
|
|
|
|
GCI_combineNo is not null and GCI_combineNo not in ('cancel','forbidden')
|
|
|
|
|
and coli.COLI_State<>50
|
|
|
|
|
and (select OPI_DEI_SN from OperatorInfo where OPI_SN=coli.COLI_OPI_ID)=30
|
|
|
|
|
-- 已生成账单的不再自动同步
|
|
|
|
|
and NOT EXISTS (
|
|
|
|
|
SELECT 1 FROM report_order WHERE ordernumber=COLI_ID AND orderstats=1
|
|
|
|
|