Advertisement
setiadi

GetMonitoringOrderPembelianDetailInvoiceList

May 21st, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.01 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Sts\WebToko\BO;
  4.  
  5. use Sts\PleafCore\BusinessFunction;
  6. use Sts\WebToko\Model\FiInvoiceAp;
  7. use Sts\WebToko\Model\FiInvoiceApBalance;
  8. use DB;
  9. /**
  10.  * @in
  11.  * @In(["poId","numeric","true","ID PO"])
  12.  */
  13. class GetMonitoringOrderPembelianDetailInvoiceList implements BusinessFunction {
  14.  
  15.     public function getDescription(){
  16.         return "Get Monitoring Order Pembelian Detail Invoice List";
  17.     }
  18.  
  19.     public function execute($dto){                          
  20.    
  21.         $poId = $dto["poId"];        
  22.  
  23.         $result = DB::table(with(new FiInvoiceAp)->getTable()." as A")
  24.                 ->join(with(new FiInvoiceApBalance)->getTable()." as B", "B.invoice_ap_id", "A.invoice_ap_id")    
  25.                 ->select([
  26.                     "A.doc_no", "A.doc_date", "A.status_doc", "A.due_date",            
  27.                    "B.invoice_amount"
  28.                 ])
  29.                 ->where("A.ref_id", $poId)                
  30.                 ->get();    
  31.      
  32.         return $result;
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement