function find($where = array())
 {
     $this->translateDateRange($where);
     $this->db->join('belanjadetail', 'belanjadetail.belanja=belanja.id', 'LEFT');
     $this->db->join('baranggudang', 'belanjadetail.barang=baranggudang.id', 'LEFT');
     return parent::find($where);
 }
Example #2
0
 function find($where = array())
 {
     $this->translateDateRange($where);
     if (isset($where['outlet'])) {
         $where['pesanan.outlet'] = $where['outlet'];
         unset($where['outlet']);
     }
     $this->db->select('pesanan.*, outlet.nama as outlet', false)->select("DATE_FORMAT(pesanan.waktu,'%d %b %Y %T') AS waktu", false)->select("CONCAT('Rp ', FORMAT(total, 2)) AS total", false)->select("CONCAT('Rp ', FORMAT(SUM(pesananbayar.nominal), 2)) as dibayar", false)->join('pesananbayar', 'pesananbayar.pesanan = pesanan.id', 'LEFT')->join('outlet', 'outlet.id = pesanan.outlet', 'LEFT')->group_by('pesanan.id');
     return parent::find($where);
 }
Example #3
0
 function find($where = array())
 {
     $this->db->select('sirkulasiayamoutlet.*')->select('outlet.nama as outlet', false)->select('ayam.nama as ayam')->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->select("CONCAT(sirkulasiayamoutlet.pcs, ' PCs') as pcs", false)->select("CONCAT(sirkulasiayamoutlet.kg, ' KG') as kg", false)->select("CONCAT (stockpcs, ' PCs') AS stockpcs", false)->select("CONCAT (stockkg, ' KG') AS stockkg", false)->join('ayam', 'ayam.id=sirkulasiayamoutlet.ayam')->join('outlet', 'sirkulasiayamoutlet.outlet=outlet.id')->order_by('id', 'DESC');
     return parent::find($where);
 }
Example #4
0
 function find($where = array())
 {
     $this->db->select('pemasukan.*, karyawan.nama as karyawan')->select("CONCAT('Rp ', FORMAT(nominal, 2)) AS nominal", false)->join('karyawan', 'karyawan.id = pemasukan.karyawan', 'LEFT');
     return parent::find($where);
 }
Example #5
0
 function find($where = array())
 {
     $this->db->select('cashflowoutlet.*')->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->select("CONCAT('Rp ', FORMAT(nominal, 2)) AS nominal", false)->select("CONCAT('Rp ', FORMAT(cashflowoutlet.saldo, 2)) AS saldo", false)->select('outlet.nama as outlet')->join('outlet', 'cashflowoutlet.outlet=outlet.id', 'LEFT');
     // ->order_by('id', 'DESC');
     return parent::find($where);
 }
Example #6
0
 function find($where = array())
 {
     $this->db->select('ayamoutlet.*')->select("CONCAT(ayamoutlet.pcs, ' PCs') as stock", false)->select('outlet.nama as outlet')->join('outlet', 'ayamoutlet.outlet=outlet.id')->select('ayam.nama as ayam')->join('ayam', 'ayamoutlet.ayam=ayam.id', 'LEFT');
     return parent::find($where);
 }
Example #7
0
 function find($where = array())
 {
     $this->db->select('bawaan.*')->select('outlet.nama as outlet')->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->join('outlet', 'bawaan.outlet = outlet.id');
     return parent::find($where);
 }
Example #8
0
 function find($where = array())
 {
     $this->db->select('barangoutlet.*')->select('outlet.nama as outlet')->select('baranggudang.nama as barang')->select("CONCAT(barangoutlet.stock, ' ', baranggudang.satuan) as stock", false)->join('outlet', 'barangoutlet.outlet=outlet.id')->join('baranggudang', 'barangoutlet.barang=baranggudang.id', 'LEFT');
     return parent::find($where);
 }
Example #9
0
 function find($where = array())
 {
     $this->db->select('internal.*')->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->select('source.nama as source', false)->select('destination.nama as destination', false)->join('outlet as source', 'internal.source = source.id', 'LEFT')->join('outlet as destination', 'internal.destination = destination.id', 'LEFT');
     return parent::find($where);
 }
Example #10
0
 function find($where = array())
 {
     $this->db->select('belanjaayam.*')->select('karyawan.nama as karyawan')->select('distributor.nama as distributor')->select("CONCAT(ekor, ' EKOR') as ekor", false)->select("CONCAT(kg, ' KG') as kg", false)->select("CONCAT('Rp ', FORMAT(total, 2)) AS total", false)->join('karyawan', 'karyawan.id = belanjaayam.karyawan', 'LEFT')->join('distributor', 'distributor.id = belanjaayam.distributor', 'LEFT');
     return parent::find($where);
 }
Example #11
0
 function find($where = array())
 {
     $this->db->select('*')->select("CONCAT(stock, ' PCs') AS stock", false)->select("CONCAT('Rp ', FORMAT(harga, 2)) AS harga", false);
     return parent::find($where);
 }
Example #12
0
 function find($where = array())
 {
     $this->db->select('setoran.*, outlet.nama as outlet')->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->select("CONCAT('Rp ', FORMAT(nominal, 2)) AS nominal", false)->join('outlet', 'outlet.id = setoran.outlet', 'LEFT');
     return parent::find($where);
 }
Example #13
0
 function find($where = array())
 {
     $this->db->select('sirkulasiayam.*')->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->select('ayam.nama as ayam')->select("IF(type = 'MASUK', CONCAT (sirkulasiayam.pcs, ' PCS / ', sirkulasiayam.kg, ' KG'), '') as masuk", false)->select("IF(type = 'KELUAR', CONCAT (sirkulasiayam.pcs, ' PCS / ', sirkulasiayam.kg, ' KG'), '') as keluar", false)->select("CONCAT (stockpcs, ' PCS / ', stockkg, ' KG') as stock", false)->join('ayam', 'ayam.id=sirkulasiayam.ayam')->order_by('id', 'ASC');
     return parent::find($where);
 }
Example #14
0
 function find($where = array())
 {
     $this->db->select('produkoutlet.*')->select("CONCAT(produkoutlet.stock, ' PCs') as stock", false)->select('outlet.nama as outlet')->join('outlet', 'produkoutlet.outlet=outlet.id')->select('produk.nama as produk')->join('produk', 'produkoutlet.produk=produk.id', 'LEFT');
     return parent::find($where);
 }
Example #15
0
 function find($where = array())
 {
     $this->db->select('pemotongan.*')->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->select("CONCAT(bahanpcs, ' EKOR / ', bahankg, ' KG') as ayamhidup", false)->select("CONCAT(hasilpcs, ' PCs / ', hasilkg, ' KG') as hasilpemotongan", false)->select("CONCAT (kepasar, ' KG') as kepasar", false)->select("CONCAT (ROUND (avg, 1), ' KG') as avg", false)->select('ROUND (per5kg, 1) as per5kg', false)->select("CONCAT (susud, ' KG') as susud", false);
     return parent::find($where);
 }
Example #16
0
 function find($where = array())
 {
     $this->db->select('outlet.*')->select("CONCAT('Rp ', FORMAT(saldo, 2)) AS saldo", false);
     return parent::find($where);
 }
Example #17
0
 function find($where = array())
 {
     $this->db->select('belanja.*, karyawan.nama')->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->select("CONCAT('Rp ', FORMAT(total, 2)) AS total", false)->join('karyawan', 'karyawan.id = belanja.karyawan', 'LEFT');
     return parent::find($where);
 }
Example #18
0
 function find($where = array())
 {
     $this->db->select('pinjaman.*')->select('debitur.nama as debitur')->select("CONCAT('Rp ', FORMAT(nominal, 2)) AS nominal", false)->join('debitur', 'debitur.id = pinjaman.debitur')->order_by('id', 'DESC');
     return parent::find($where);
 }
Example #19
0
 function find($where = array())
 {
     $this->translateDateRange($where);
     $this->db->select('setoran.*')->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->select('produk.nama as produk', FALSE)->select('produk.type as type', FALSE)->select("CONCAT('Rp ', FORMAT(produk.harga, 2)) AS harga", false)->select("CONCAT (setoranpenjualan.qty, ' PCs') as qty", false)->select("CONCAT('Rp ', FORMAT(qty * harga, 2)) AS total", false)->join('setoranpenjualan', 'setoranpenjualan.setoran=setoran.id', 'LEFT')->join('produk', 'setoranpenjualan.produk=produk.id', 'LEFT');
     return parent::find($where);
 }
Example #20
0
 function find($where = array())
 {
     $this->db->select('*')->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->select("CONCAT('Rp ', FORMAT(nominal, 2)) AS nominal", false)->select("CONCAT('Rp ', FORMAT(saldo, 2)) AS saldo", false)->order_by('id', 'DESC');
     return parent::find($where);
 }
Example #21
0
 function find($where = array())
 {
     $this->translateDateRange($where);
     $this->db->select('*')->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->select("CONCAT('Rp ', FORMAT(IF (type = 'MASUK', nominal, 0), 2)) AS masuk", false)->select("CONCAT('Rp ', FORMAT(IF (type = 'KELUAR', nominal, 0), 2)) AS keluar", false)->select("CONCAT('Rp ', FORMAT(saldo, 2)) AS saldo", false)->where($where);
     return parent::find($where);
 }
Example #22
0
 function find($where = array())
 {
     $this->db->select('ayam.*')->select("CONCAT(pcs, ' PCs') AS pcs", false)->select("CONCAT(kg, ' KG') AS kg", false);
     return parent::find($where);
 }
Example #23
0
 function find($where = array())
 {
     $this->db->select('pinjaman.*')->select('debitur.nama as debitur')->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->select("CONCAT('Rp ', FORMAT(nominal, 2)) AS nominal", false)->join('debitur', 'debitur.id = pinjaman.debitur')->order_by('id', 'DESC')->where('type', 'PEMINJAMAN');
     return parent::find($where);
 }
Example #24
0
 function find($where = array())
 {
     $this->translateDateRange($where);
     $this->db->select('belanja.*')->select('baranggudang.satuan as satuan', false)->select('baranggudang.nama as barang', false)->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->select('karyawan.nama as karyawan', false)->select('distributor.nama as distributor', false)->select("CONCAT(belanjadetail.qty, ' ', baranggudang.satuan) as qty", false)->select("CONCAT('Rp ', FORMAT(hargasatuan, 2)) AS hargasatuan", false)->select("CONCAT('Rp ', FORMAT(belanjadetail.total, 2)) AS total", false)->join('belanjadetail', 'belanja.id = belanjadetail.belanja', 'LEFT')->join('baranggudang', 'baranggudang.id = belanjadetail.barang', 'LEFT')->join('karyawan', 'karyawan.id = belanja.karyawan', 'LEFT')->join('distributor', 'distributor.id = belanjadetail.distributor', 'LEFT');
     return parent::find($where);
 }
 function find($where = array())
 {
     $this->db->select('sirkulasibarangoutlet.*')->select('outlet.nama as outlet', false)->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->select('baranggudang.nama as barang')->select("CONCAT (sirkulasibarangoutlet.qty, ' ', baranggudang.satuan) AS qty", false)->select("CONCAT (sirkulasibarangoutlet.stock, ' ', baranggudang.satuan) AS stock", false)->join('baranggudang', 'baranggudang.id=sirkulasibarangoutlet.barang')->join('outlet', 'sirkulasibarangoutlet.outlet=outlet.id')->order_by('id', 'DESC');
     return parent::find($where);
 }
 function find($where = array())
 {
     $this->db->select('sirkulasiprodukoutlet.*')->select('outlet.nama as outlet', false)->select('produk.nama as produk')->select("CONCAT (sirkulasiprodukoutlet.qty, ' PCs') AS qty", false)->select("CONCAT (sirkulasiprodukoutlet.stock, ' PCs') AS stock", false)->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->join('produk', 'produk.id=sirkulasiprodukoutlet.produk')->join('outlet', 'sirkulasiprodukoutlet.outlet=outlet.id')->order_by('id', 'DESC');
     return parent::find($where);
 }
 function find($where = array())
 {
     $this->translateDateRange($where);
     $this->db->select('sirkulasibarang.*')->select('baranggudang.satuan')->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->select('baranggudang.nama as barang')->select("CONCAT (IF (sirkulasibarang.type = 'MASUK', qty, 0), ' ', baranggudang.satuan) AS masuk", false)->select("CONCAT (IF (sirkulasibarang.type = 'KELUAR', qty, 0), ' ', baranggudang.satuan) AS keluar", false)->select("CONCAT (sirkulasibarang.stock, ' ', baranggudang.satuan) AS stock", false)->join('baranggudang', 'baranggudang.id=sirkulasibarang.barang');
     return parent::find($where);
 }
Example #28
0
 function find($where = array())
 {
     return parent::find($where);
 }
Example #29
0
 function find($where = array())
 {
     $this->db->select('produksi.*')->select('karyawan.nama as karyawan', false)->select("IFNULL(outlet.nama, 'GUDANG') as outlet", false)->select("DATE_FORMAT(waktu,'%d %b %Y %T') AS waktu", false)->join('outlet', 'outlet.id = produksi.outlet', 'LEFT')->join('karyawan', 'karyawan.id = produksi.karyawan', 'LEFT');
     return parent::find($where);
 }
Example #30
0
 function find($where = array())
 {
     $this->db->select('komposisi.*, produk.nama as produk')->select("IFNULL(CONCAT(qty, ' PCs ', ayam.nama), CONCAT(qty, baranggudang.satuan, ' ', baranggudang.nama)) as barang", false)->join('baranggudang', 'baranggudang.id = komposisi.barang', 'LEFT')->join('ayam', 'ayam.id = komposisi.ayam', 'LEFT')->join('produk', 'produk.id = komposisi.produk', 'LEFT');
     return parent::find($where);
 }