|
|
|
@ -511,11 +511,16 @@ class Orders_model extends CI_Model {
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function get_SN_by_groupCode($code, $NoName)
|
|
|
|
|
public function get_SN_by_groupCode($code, $vendorOrderId=NULL)
|
|
|
|
|
{
|
|
|
|
|
$vendorOrderId_sql = $vendorOrderId===null ? "" : " case when GCI_VendorOrderId=$vendorOrderId then 0 else 1 end asc, ";
|
|
|
|
|
$gri_sql = "SELECT top 1 GRI_SN,GRI_OPI_ID,GRI_operator,GRI_No,GRI_Name
|
|
|
|
|
from GRoupInfo
|
|
|
|
|
where GRI_Name like '%$code%' ";
|
|
|
|
|
left join GroupCombineInfo on GCI_GRI_SN=GRI_SN
|
|
|
|
|
where GRI_Name like '%$code%'
|
|
|
|
|
order by
|
|
|
|
|
$vendorOrderId_sql
|
|
|
|
|
GCI_GRI_SN desc,GCI_SN asc";
|
|
|
|
|
$gri_query = $this->HT->query($gri_sql);
|
|
|
|
|
if ($gri_query->num_rows() > 0) {
|
|
|
|
|
$this->GRI_SN = $gri_query->row()->GRI_SN;
|
|
|
|
@ -525,8 +530,8 @@ class Orders_model extends CI_Model {
|
|
|
|
|
FROM BIZ_ConfirmLineInfo coli
|
|
|
|
|
inner join BIZ_ConfirmLineDetail cold on cold.COLD_COLI_SN=COLI_SN
|
|
|
|
|
LEFT JOIN GRoupInfo gri ON coli.COLI_GRI_SN=gri.GRI_SN
|
|
|
|
|
where COLI_GroupCode like '%$code%' ";
|
|
|
|
|
// where COLI_GRI_SN=" . $this->GRI_SN;
|
|
|
|
|
where COLI_GRI_SN=" . $this->GRI_SN;
|
|
|
|
|
// where COLI_GroupCode like '%$code%' ";
|
|
|
|
|
$coli_query = $this->HT->query($coli_sql);
|
|
|
|
|
if ($coli_query->num_rows() > 0) {
|
|
|
|
|
$this->BIZ_COLI_SN = $coli_query->row()->COLI_SN;
|
|
|
|
@ -1827,6 +1832,7 @@ class Orders_model extends CI_Model {
|
|
|
|
|
{
|
|
|
|
|
// return NULL;
|
|
|
|
|
$sql = "
|
|
|
|
|
|
|
|
|
|
";
|
|
|
|
|
$query = $this->HT->query($sql);
|
|
|
|
|
}
|
|
|
|
|