fadlyshafa

Untitled

Jun 19th, 2020
1,321
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function getProducts99($id) {
  2.         return $this->db->select(
  3.                         'p.code, p.name, p.unit, p.quantity, s.po, s.po_cust, s.currentdate, s.date, s.customer_id, s.total, si.quantity as qty, si.price as qprice, si.gross_total as grossTotal, si.serial_no, si.discount_value, si.discount, si.discount_id, si.product_id, p.code as verifikasi'
  4.                         )
  5.                         ->from('sales s')
  6.                         ->join('sales_items si', 'si.sales_id = s.sales_id', 'left')
  7.                         ->join('products p', 'p.product_id = si.product_id', 'left')
  8.                         // ->join('product_grouping d', 'd.product_id = p.product_id', 'left')
  9.                         // ->join('bonus_items bi', 'bi.product = p.product_id','left')
  10.                         ->where('s.sales_id',$id)
  11.                         ->get()
  12.                         ->result();
  13.     }
  14.  
  15.     public function getSalesItems_new($sales_id) {
  16.         $this->db->select('si.*')
  17.             ->from('sales_items si')
  18.             ->where('si.sales_id',$sales_id)
  19.             ->get()->result();
  20.     }
RAW Paste Data