Merge pull request 'update on dashboard' (#10) from paulcortezl5 into main

Reviewed-on: #10
pull/11/head
paul 1 year ago
commit d7766879ac

@ -1328,6 +1328,7 @@ class Pages extends CI_controller
$this->load->model("BranchItemLedger");
$this->load->model("ItemLedger");
$this->load->model("ItemInquiryLog");
$this->load->model("StockReceivingView");
$result = $this->Items->getItemInfoByModelNo($this->input->post("modelno"));
$row = $result->row();
@ -1337,6 +1338,9 @@ class Pages extends CI_controller
$resultKWH = $this->ItemLedger->getItemLedgerOfKWHByItemcode($row->itemcode);
$kwhRow = $resultKWH->row();
$resultKWHStockReceived = $this->StockReceivingView->getDtlDataByItemcode($row->itemcode);
$kwhStockReceivedRow = $resultKWHStockReceived->row();
// Log searched item
$this->ItemInquiryLog->itemcode = $row->itemcode;
$this->ItemInquiryLog->modelno = $row->modelno;
@ -1355,7 +1359,7 @@ class Pages extends CI_controller
}
if($result->num_rows() > 0)
echo json_encode(array("success"=>true, "data" => $row, "htmlTable" => $htmlTable, "KWHData" => $kwhRow->endingqty));
echo json_encode(array("success"=>true, "data" => $row, "htmlTable" => $htmlTable, "KWHData" => $kwhRow, "KWHStockReceived" => $kwhStockReceivedRow));
else
echo json_encode(array("success"=>false, "data" => "No Record"));
}

@ -0,0 +1,22 @@
<?php
class StockReceivingView extends CI_Model
{
public function __construct()
{
parent::__construct();
$this->load->database();
}
public function getHdrDataByTransID($transID)
{
return $this->db->get_where("stockreceivinghdr", array("transid"=>$transID))->order_by("transid", "DESC");
}
public function getDtlDataByItemcode($itemcode)
{
return $this->db->get_where("stockreceivingdtl", array("itemcode"=>$itemcode));
}
}

@ -142,10 +142,8 @@
</div>
<div class="box-body">
<ul>
<li>[2024-1-21] Added view of customer purchase history while encoding the sales.</li>
<li>[2022-10-03] Added Item Movement menu so transaction of specific item can be traced.</li>
<li>[2022-08-22] Fixed Sales Maintenance wherein qty changed to zero when updating.</li>
<li>[2022-08-20] Disabled on-wheel change of value on Qty to avoid having 0 quantity.</li>
<li>[2022-08-10] Removed SYSTEM DEVELOPMENT STAGE and transfer to MAIN NAVIGATION menu above.</li>
</ul>
</div><!-- /.box-body -->
</div><!-- /.box -->
@ -223,6 +221,9 @@
</div>
<div class="box-body">
<ul>
<li>[2022-08-22] Fixed Sales Maintenance wherein qty changed to zero when updating.</li>
<li>[2022-08-20] Disabled on-wheel change of value on Qty to avoid having 0 quantity.</li>
<li>[2022-08-10] Removed SYSTEM DEVELOPMENT STAGE and transfer to MAIN NAVIGATION menu above.</li>
<li>[2020-06-26] Store transaction is now editable under Maintenance Menu. You can change declared cash, dollar, check, credit cards, remarks and name of encoder.</li>
<li>[2019-12-09] Integration of Karat Card.</li>
<li>[2019-11-16] Added beginning inventory basing on yesterday's ending quantity.</li>
@ -324,7 +325,7 @@
' </div><!-- /.box -->';
}
function showIteminquiredInformation(data, htmlTable, KWHData)
function showIteminquiredInformation(data, htmlTable, KWHData, KWHStockReceived)
{
return '<div class="box">' +
' <div class="box-header with-border">' +
@ -362,8 +363,8 @@
' </table>' +
' </div>' +
' </div>' +
' <h3>Quantity Remaining in Warehouse: ' + KWHData + '</h3>' +
' <p></p>' +
' <p>Beginning quantity: ' + KWHStockReceived["qty"] + '</p>' +
' <h3>Quantity Remaining in Warehouse: ' + KWHData["endingqty"] + '</h3>' +
' </div>' +
' </div>';
}
@ -399,7 +400,7 @@
modelno: $("#txtModelNoInquiry").val()
}, function(data) {
if (data["success"] == true) {
$("#resultContainerStoreInquiry").prepend(showIteminquiredInformation(data["data"], data["htmlTable"], data["KWHData"]));
$("#resultContainerStoreInquiry").prepend(showIteminquiredInformation(data["data"], data["htmlTable"], data["KWHData"], data["KWHStockReceived"]));
} else {
$("#resultContainerStoreInquiry").prepend(errorMessage(data["data"]));
}

Loading…
Cancel
Save