|
|
|
@ -25,17 +25,14 @@ class StoreFrontAPIController extends RestController
|
|
|
|
|
$this->load->model("Items");
|
|
|
|
|
$this->load->model("BranchItemLedger");
|
|
|
|
|
|
|
|
|
|
$result = $this->Items->getItemInfoByModelNo('DB-422');
|
|
|
|
|
$row = $this->Items->getItemByModelNo('DB-422');
|
|
|
|
|
|
|
|
|
|
// disabled during testing
|
|
|
|
|
//$result = $this->Items->getItemInfoByModelNo($modelno);
|
|
|
|
|
|
|
|
|
|
$itemcount = $result->num_rows();
|
|
|
|
|
//$result = $this->Items->getItemByModelNo($modelno);
|
|
|
|
|
|
|
|
|
|
if($itemcount > 0)
|
|
|
|
|
if($row != null)
|
|
|
|
|
{
|
|
|
|
|
$branches = [];
|
|
|
|
|
$row = $result->row();
|
|
|
|
|
|
|
|
|
|
$resultBranches = $this->BranchItemLedger->getDataByItemcodeWithBranchExcempt($row->itemcode);
|
|
|
|
|
|
|
|
|
@ -58,20 +55,23 @@ class StoreFrontAPIController extends RestController
|
|
|
|
|
'grams' => $row->grams,
|
|
|
|
|
'cts' => $row->cts,
|
|
|
|
|
'srp' => $row->srp,
|
|
|
|
|
//'mrp' => $row->mrp,
|
|
|
|
|
'mrp' => '0',
|
|
|
|
|
'pic' => '',
|
|
|
|
|
'catCode' => $row->catCode,
|
|
|
|
|
'goldID' => $row->goldID,
|
|
|
|
|
'supCode' => $row->supCode,
|
|
|
|
|
'modifieddate' => $row->modifieddate,
|
|
|
|
|
'others' => '',
|
|
|
|
|
'remarks' => '',
|
|
|
|
|
'branches' => $branches
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
$data = ['status' => 'FOUND',
|
|
|
|
|
'item_count' => $itemcount,
|
|
|
|
|
'data' => $item];
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
$data = ['status' => 'NOTFOUND',
|
|
|
|
|
'item_count' => 0,
|
|
|
|
|
'data' => null];
|
|
|
|
|
|
|
|
|
|
$this->response($data, 200);
|
|
|
|
|