|
|
|
@ -193,4 +193,47 @@ class StoreFrontAPIController extends RestController
|
|
|
|
|
|
|
|
|
|
$this->response($data, 200);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function itemLedgerByBranch_get($brCode)
|
|
|
|
|
{
|
|
|
|
|
$this->load->model("ItemLedger");
|
|
|
|
|
|
|
|
|
|
$result = $this->ItemLedger->getItemLedgerByBrCodeNoZero($brCode);
|
|
|
|
|
|
|
|
|
|
$data = [];
|
|
|
|
|
|
|
|
|
|
if($result != null)
|
|
|
|
|
{
|
|
|
|
|
foreach($result->result() as $row)
|
|
|
|
|
{
|
|
|
|
|
$item[] = [
|
|
|
|
|
'Itemcode' => $row->itemcode,
|
|
|
|
|
'Model No' => $row->modelno,
|
|
|
|
|
'Series' => $row->seriescode,
|
|
|
|
|
'Description' => $row->item_desc,
|
|
|
|
|
'Karat' => $row->karat,
|
|
|
|
|
'Size' => $row->size,
|
|
|
|
|
'Grams' => $row->grams,
|
|
|
|
|
'cts' => $row->cts,
|
|
|
|
|
'SRP' => number_format($row->srp, 2),
|
|
|
|
|
'pic' => $this->baseImgURL().basename(str_replace('\\', '/', $row->pic)),
|
|
|
|
|
'Category' => $row->catCode,
|
|
|
|
|
'Gold ID' => $row->goldID,
|
|
|
|
|
'Supplier' => $row->supCode,
|
|
|
|
|
'Modified Date' => $row->modifieddate,
|
|
|
|
|
'Others' => '',
|
|
|
|
|
'Remarks' => '',
|
|
|
|
|
'Quantity' => $row->endingqty
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$data = ['status' => 'FOUND',
|
|
|
|
|
'data' => $item];
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
$data = ['status' => 'NOTFOUND',
|
|
|
|
|
'data' => null];
|
|
|
|
|
|
|
|
|
|
$this->response($data, 200);
|
|
|
|
|
}
|
|
|
|
|
}
|