fix loctype to use vid
This commit is contained in:
parent
4db1a61e04
commit
07eb2a04d8
@ -20,7 +20,7 @@ class Location extends Controller {
|
|||||||
$rows = $this->db->table('location l')
|
$rows = $this->db->table('location l')
|
||||||
->select("l.LocationID, LocCode, Parent, LocFull, LocType, v.VDesc ")
|
->select("l.LocationID, LocCode, Parent, LocFull, LocType, v.VDesc ")
|
||||||
->join("locationaddress la", "l.LocationID=la.LocationID", 'left')
|
->join("locationaddress la", "l.LocationID=la.LocationID", 'left')
|
||||||
->join("valueset v", "v.VSetID=12 and v.VValue=l.LocType", 'left')
|
->join("valueset v", "v.VSetID=12 and v.VID=l.loctype", 'left')
|
||||||
->get()->getResultArray();
|
->get()->getResultArray();
|
||||||
|
|
||||||
if (empty($rows)) {
|
if (empty($rows)) {
|
||||||
@ -42,7 +42,7 @@ class Location extends Controller {
|
|||||||
$rows = $this->db->table('location l')
|
$rows = $this->db->table('location l')
|
||||||
->select("l.*, la.*, v.*")
|
->select("l.*, la.*, v.*")
|
||||||
->join("locationaddress la", "l.LocationID=la.LocationID", "left")
|
->join("locationaddress la", "l.LocationID=la.LocationID", "left")
|
||||||
->join("valueset v", "v.VSetID=12 and v.VValue=l.loctype", "left")
|
->join("valueset v", "v.VSetID=12 and v.VID=l.loctype", "left")
|
||||||
->where('l.LocationID', (int) $LocationID)
|
->where('l.LocationID', (int) $LocationID)
|
||||||
->get()->getResultArray();
|
->get()->getResultArray();
|
||||||
|
|
||||||
@ -192,6 +192,7 @@ class Location extends Controller {
|
|||||||
"LocCode" => $input['LocCode'] ?? null,
|
"LocCode" => $input['LocCode'] ?? null,
|
||||||
"Parent" => $input['Parent'] ?? null,
|
"Parent" => $input['Parent'] ?? null,
|
||||||
"LocFull" => $input['LocFull'] ?? null,
|
"LocFull" => $input['LocFull'] ?? null,
|
||||||
|
"LocType" => $input['LocType'] ?? null,
|
||||||
"Description" => $input['Description'] ?? null,
|
"Description" => $input['Description'] ?? null,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user