Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Sts\WebToko\BO;
- use Sts\PleafCore\BusinessFunction;
- use Sts\WebToko\Model\PuReceiveGoods;
- use Sts\WebToko\Model\PuReceiveGoodsItem;
- use Sts\WebToko\Model\PuPoItem;
- use Sts\WebToko\Model\PuPoBalanceInvoice;
- use Sts\WebToko\Model\Product;
- use DB;
- /**
- * @in
- * @In(["poId","numeric","true","ID PO"])
- */
- class GetMonitoringOrderPembelianDetailGoodsReceiptList implements BusinessFunction {
- public function getDescription(){
- return "Get Monitoring Order Pembelian Detail Goods Receipt List";
- }
- public function execute($dto){
- $poId = $dto["poId"];
- $result = DB::table(with(new PuReceiveGoods)->getTable()." as A")
- ->join(with(new PuReceiveGoodsItem)->getTable()." as B", "B.receive_goods_id", "A.receive_goods_id")
- ->join(with(new Product)->getTable()." as C", "C.product_id", "B.product_id")
- ->join(with(new PuPoItem)->getTable()." as D", "D.po_item_id", "B.ref_item_id")
- ->select([
- "A.doc_no", "A.doc_date", "A.remark", "A.status_doc", "A.status_doc",
- "C.product_name",
- "B.qty_receive", "D.unit_price",
- ])
- ->where("A.ref_id", $poId)
- ->get();
- return $result;
- }
- }
Add Comment
Please, Sign In to add comment