[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
BACKUP C 19-12
/
XAMPP74
/
htdocs
/
simkeu
/
application
/
models
/
[
Home
]
File: mkasir.php
<?php class Mkasir extends CI_Model { function __construct(){ parent::__construct(); $this->load->model('Mspp','',TRUE); } function add_kasir($kasir){ $this->db->insert('ueu_tbl_kasir',$kasir); } function get_kasir(){ $this->db->order_by('no_kasir','desc'); return $this->db->get('ueu_tbl_kasir'); } function jml_diminta($nospm){ $jml = $this->Mspp->get_nospm($nospm); if ($jml->num_rows()>0){ $jumlah = 0; foreach ($jml->result() as $row) { $jumlah = $jumlah + $row->ajuan; } return $j = $jumlah; }else{ return $j = 0; } } function get_nospm(){ $this->db->select('no_spm'); $this->db->order_by('no_spm','desc'); return $this->db->get('ueu_tbl_kasir'); } }