function form_office() { $this->db->trans_start(); list($day, $month, $year) = explode('/', $_REQUEST['tgl_penerimaan']); $arr['ID'] = $this->data_model->setID(); $no_bayar = getNoPenerimaan($_REQUEST['jenis_pungutan'], $_REQUEST['tgl_penerimaan']); $this->data_model->data = array('penerimaan_pr_id' => $arr['ID'], 'penetapan_pr_id' => $this->input->post('id_kohir'), 'pendataan_id' => $this->input->post('id_spt'), 'pendaftaran_id' => $this->input->post('id_npwp'), 'pemohon_id' => $this->input->post('id_pemohon'), 'skpd_id' => $this->input->post('id_dinas'), 'penerimaan_pr_no' => $no_bayar, 'tgl_penerimaan' => prepare_date($_REQUEST['tgl_penerimaan']), 'thn_penerimaan' => date('Y', strtotime(prepare_date($_REQUEST['tgl_penerimaan']))), 'bank_no' => $this->input->post('bank_no'), 'jenis_pungutan' => $this->input->post('jenis_pungutan'), 'nominal_pajak' => str_replace(',', '', $this->input->post('nominal_pajak')), 'id_ref_pembayaran' => $this->input->post('cpenyetoran'), 'keterangan' => $this->input->post('keterangan'), 'logs' => 'NOW', 'user_id' => $this->session->userdata('SESS_USER_ID')); $hsl = $this->data_model->insert_data(); $qy = 'select id_rekening, nominal from v_pendataan_content where pendataan_id=' . $this->db->escape($_REQUEST['id_spt']); $result = $this->db->query($qy); if ($result->num_rows() > 0) { foreach ($result->result() as $row) { $this->data_model->data_rincian = array('penerimaan_pr_id' => $arr['ID'], 'id_rekening' => $row->ID_REKENING, 'nominal' => $row->NOMINAL); $hsl = $this->data_model->insert_rincian_data(); } } if ($hsl) { $this->result_msg = '<li>:: Data telah tersimpan ::</li>'; } else { $this->result_msg = '<li>:: Error tersimpan data ::</li>'; } updateNoPenerimaan($_REQUEST['jenis_pungutan'], $_REQUEST['tgl_penerimaan']); echo $this->result_msg; $this->db->trans_complete(); }
unset($other_request); $err = 0; if ($a) { $qy = 'select id_rekening, nominal from v_pendataan_content where pendataan_id=' . quote_smart($_REQUEST['id_spt']); $result = gcms_query($qy); while ($rs = gcms_fetch_object($result)) { $exception = array('penerimaan_pr_content_id'); $other_request = array('penerimaan_pr_id' => $ID_HEADER, 'id_rekening' => $rs->id_rekening, 'nominal' => $rs->nominal); $b = $fbird->FBInsert('penerimaan_pr_content', $other_request, $exception); if (!$b) { $err = 1; } } if ($b) { //updateNoPenerimaan('OFFICE',$_REQUEST['thn_spt']); updateNoPenerimaan($_REQUEST['jenis_pungutan'], $_REQUEST['tgl_penerimaan']); echo 'Data telah tersimpan...'; } else { echo '!C'; } } else { echo '!H'; } } } elseif ($_REQUEST['sender'] == 'entri_penetapan_pr') { if ($_REQUEST['action'] == 'edit') { if (isset($_REQUEST['detail'])) { } else { } } else { if (isset($_REQUEST['detail'])) {