} $i++; } $optKary = makeOption($dbname, 'datakaryawan', 'karyawanid,namakaryawan', $whereKary, '0'); # Get Data $where = "kodeorg='" . $param['kodeorg'] . "' and shift=" . $param['shift']; $cols = "nik"; $query = selectQuery($dbname, 'pabrik_5shiftanggota', $cols, $where); $data = fetchData($query); $dataShow = $data; foreach ($dataShow as $key => $row) { $dataShow[$key]['nik'] = $optKary[$row['nik']]; } # Form $theForm2 = new uForm('kasbankForm', $_SESSION['lang']['form'] . " " . $_SESSION['lang']['anggotashif']); $theForm2->addEls('nik', $_SESSION['lang']['nik'], '', 'select', 'L', 20, $optKary); # Table $theTable2 = new uTable('kasbankTable', $_SESSION['lang']['tabel'] . " " . $_SESSION['lang']['anggotashif'], $cols, $data, $dataShow); # FormTable $formTab2 = new uFormTable('ftPrestasi', $theForm2, $theTable2, null, array('kodeorg##shift')); $formTab2->_target = "pabrik_slave_5shift"; #== Display View # Draw Tab echo "<fieldset><legend><b>Detail</b></legend>"; $formTab2->render(); echo "</fieldset>"; break; case 'add': $cols = array('nik', 'kodeorg', 'shift'); $data = $param; unset($data['numRow']);
$dataShow[$key]['kodekegiatan'] = $optKegiatan[$row['kodekegiatan']]; $dataShow[$key]['kodecustomer'] = $optCustomer[$row['kodecustomer']]; $dataShow[$key]['kodesupplier'] = $optSupplier[$row['kodesupplier']]; $dataShow[$key]['kodevhc'] = $optVhc[$row['kodevhc']]; $dataShow[$key]['matauang'] = $optMatauang[$row['matauang']]; $dataShow[$key]['noakun'] = $optAkun[$row['noakun']]; if ($row['kodebarang'] != '' and $row['kodebarang'] != '0') { $dataShow[$key]['kodebarang'] = $optBarang[$row['kodebarang']]; } $dataShow[$key]['kodeblok'] = $optBlok[$row['kodeblok']]; $dataShow[$key]['kodesegment'] = $optSegment[$row['kodesegment']]; $dataShow[$key]['revisi'] = $optRev[$row['revisi']]; } # Form $theForm = new uForm('jurnalForm', 'Form Jurnal Detail', 2); $theForm->addEls('nourut', $_SESSION['lang']['nourut'], '0', 'textnum', 'R', 3); $theForm->_elements[0]->_attr['disabled'] = 'disabled'; $theForm->addEls('noakun', $_SESSION['lang']['noakun'], '', 'select', 'L', 25, $optAkun); $theForm->addEls('keterangan', $_SESSION['lang']['keterangan'], '', 'text', 'L', 25); $theForm->addEls('jumlah', $_SESSION['lang']['jumlah'], '0', 'dk', 'R', 15); $theForm->_elements[3]->_attr['onchange'] = 'this.value=remove_comma(this);this.value = _formatted(this)'; $theForm->addEls('matauang', $_SESSION['lang']['matauang'], 'IDR', 'select', 'L', 25, $optMatauang); $theForm->addEls('kurs', $_SESSION['lang']['kurs'], '1', 'textnum', 'R', 10); $theForm->addEls('noaruskas', $_SESSION['lang']['noaruskas'], '', 'select', 'L', 25, $optCashFlow); $theForm->addEls('kodesegment', $_SESSION['lang']['segment'], '', 'searchSegment', 'L', 25); $theForm->addEls('kodekegiatan', $_SESSION['lang']['kodekegiatan'], '', 'select', 'L', 25, $optKegiatan); $theForm->addEls('kodeasset', $_SESSION['lang']['aktivadalam'], '', 'select', 'L', 35, $optAsset); $theForm->addEls('kodebarang', $_SESSION['lang']['kodebarang'], '', 'searchBarang', 'L', 10); $theForm->addEls('nik', $_SESSION['lang']['nik'], '', 'select', 'L', 35, $optKary); $theForm->addEls('kodecustomer', $_SESSION['lang']['kodecustomer'], '', 'select', 'L', 35, $optCustomer); $theForm->addEls('kodesupplier', $_SESSION['lang']['kodesupplier'], '', 'select', 'L', 35, $optSupplier);
$dataShow[$key]['kodeblok'] = $optBlok[$row['kodeblok']]; $dataShow[$key]['kodekegiatan'] = isset($optAct[$row['kodekegiatan']]) ? $optAct[$row['kodekegiatan']] : ''; } $strSatuan = "select * from " . $dbname . ".setup_kegiatan where kodekegiatan = '" . getFirstKey($optAct) . "'"; $qrySatuan = mysql_query($strSatuan) or die(mysql_error($conn)); $resSatuan = mysql_fetch_object($qrySatuan); if (isset($resSatuan->satuan)) { $satuan = $resSatuan->satuan; } else { $optMySatuan = makeOption($dbname, 'project_dt', 'kegiatan,satuan', "kegiatan = '" . getFirstKey($optAct) . "'"); $satuan = isset($optMySatuan[getFirstKey($optAct)]) ? $optMySatuan[getFirstKey($optAct)] : ''; } // $satuan = isset($resSatuan->satuan)? $resSatuan->satuan: $resSatuan->satuan; # Form $theForm1 = new uForm('detailForm', 'Form Detail', 2); $theForm1->addEls('kodeblok', $_SESSION['lang']['subunit'], '', 'select', 'L', 25, $optBlok); $theForm1->_elements[0]->_attr['onchange'] = "updKegiatan()"; $theForm1->addEls('kodekegiatan', $_SESSION['lang']['kodekegiatan'], '', 'select', 'L', 25, $optAct); $theForm1->_elements[1]->_attr['onchange'] = "updSatuan()"; $theForm1->addEls('hk', $_SESSION['lang']['hk'], '1', 'textnum', 'R', 10); $theForm1->addEls('hasilkerjajumlah', $_SESSION['lang']['volumekontrak'], '0', 'textnum', 'R', 10); $theForm1->_elements[3]->_attr['onkeyup'] = "calrppersatuan()"; $theForm1->addEls('satuan', $_SESSION['lang']['satuan'], $satuan, 'text', 'L', 25); $theForm1->_elements[4]->_attr['disabled'] = "true"; $theForm1->addEls('jumlahrp', $_SESSION['lang']['rupiah'] . ' ' . $_SESSION['lang']['total'], '0', 'textnum', 'R', 10); $theForm1->_elements[5]->_attr['onchange'] = 'this.value=remove_comma(this);this.value = _formatted(this)'; $theForm1->_elements[5]->_attr['onkeyup'] = 'calrppersatuan()'; $theForm1->addEls('rupiahpersatuan', $_SESSION['lang']['rupiah'] . ' ' . $_SESSION['lang']['per'] . ' ' . $_SESSION['lang']['satuan'], '0', 'textnum', 'R', 10); $theForm1->_elements[6]->_attr['disabled'] = 'true'; # Table $theTable1 = new uTable('detailTable', 'Tabel Detail', $cols, $data, $dataShow);
$dataShow[$key]['kode'] = $optKel[$row['kode']]; $dataShow[$key]['nik'] = $optKary[$row['nik']]; $dataShow[$key]['noaruskas'] = isset($optCashFlow[$row['noaruskas']]) ? $optCashFlow[$row['noaruskas']] : ''; $dataShow[$key]['kodekegiatan'] = $optKegiatan[$row['kodekegiatan']]; $dataShow[$key]['kodesegment'] = $optSegment[$row['kodesegment']]; $dataShow[$key]['kodecustomer'] = $optCustomer[$row['kodecustomer']]; $dataShow[$key]['kodesupplier'] = $optSupplier[$row['kodesupplier']]; $dataShow[$key]['kodevhc'] = $optVhc[$row['kodevhc']]; $dataShow[$key]['matauang'] = $optMataUang[$row['matauang']]; $dataShow[$key]['noakun'] = $optAkun[$row['noakun']]; $dataShow[$key]['orgalokasi'] = $optOrgAl[$row['orgalokasi']]; $dataShow[$key]['hutangunit1'] = $optHutangUnit[$row['hutangunit1']]; } # Form $theForm2 = new uForm('kasbankForm', 'Form Kas Bank', 2); $theForm2->addEls('kode', $_SESSION['lang']['kode'], '', 'select', 'L', 25, $optKel); $theForm2->addEls('keterangan1', $_SESSION['lang']['noinvoice'], '', 'text', 'L', 25); $theForm2->_elements[1]->_attr['onclick'] = "searchNopo('" . $_SESSION['lang']['find'] . " " . $_SESSION['lang']['noinvoice'] . "','<div id=formPencariandata></div>',event)"; $theForm2->addEls('noakun', $_SESSION['lang']['noakun'], '', 'selectsearch', 'L', 25, $optAkun); $theForm2->_elements[2]->_attr['onchange'] = 'updFieldAktif()'; $theForm2->addEls('noaruskas', $_SESSION['lang']['noaruskas'], '', 'select', 'L', 25, $optCashFlow); $theForm2->addEls('matauang', $_SESSION['lang']['matauang'], $defMU, 'select', 'L', 25, $optMataUang); $theForm2->_elements[4]->_attr['onchange'] = "getKurs2()"; #$theForm2->_elements[4]->_attr['disabled'] = 'disabled'; #permintaan pak rahmad per tanggal 03 june 2015 by email menambahkan dokumentasi, jamhari $theForm2->addEls('kurs', $_SESSION['lang']['kurs'], $defKurs, 'textnum', 'L', 10); //ind $theForm2->_elements[5]->_attr['readonly'] = true; $theForm2->addEls('keterangan2', $_SESSION['lang']['keterangan2'], '', 'text', 'L', 40); $theForm2->addEls('jumlah', $_SESSION['lang']['jumlah'], '0', 'textnumw-', 'R', 10); $theForm2->_elements[7]->_attr['onchange'] = 'this.value=remove_comma(this);this.value = _formatted(this)'; $theForm2->addEls('kodesegment', $_SESSION['lang']['segment'], '', 'searchSegment', 'L', 35);
$optBarang = makeOption($dbname, 'log_5masterbarang', 'kodebarang,namabarang', $whereBarang); } else { $optBarang = array(); } $optGudang = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', " kodeorganisasi like '" . $_SESSION['empl']['lokasitugas'] . "%' and tipe='GUDANGTEMP'"); $dataShow = $data; foreach ($dataShow as $key => $row) { $dataShow[$key]['kodeorg'] = $optOrg[$row['kodeorg']]; $dataShow[$key]['kwantitasha'] = number_format($row['kwantitasha'], 2); $dataShow[$key]['kodegudang'] = $optGudang[$row['kodegudang']]; $dataShow[$key]['kodebarang'] = $optBarang[$row['kodebarang']]; $dataShow[$key]['kwantitas'] = number_format($row['kwantitas'], 2); } # Form $theForm3 = new uForm('materialForm', $_SESSION['lang']['form'] . ' ' . $_SESSION['lang']['pakaimaterial'], 2); $theForm3->addEls('kodeorg', $_SESSION['lang']['kodeorg'], $theBlok, 'select', 'L', 40, $optOrg); $theForm3->_elements[0]->_attr['disabled'] = 'disabled'; $theForm3->addEls('kwantitasha', $_SESSION['lang']['kwantitasha'], '0', 'textnum', 'R', 10); $theForm3->addEls('kodegudang', $_SESSION['lang']['pilihgudang'], '', 'select', 'L', 40, $optGudang); $theForm3->_elements[2]->_attr['onchange'] = 'changeGudang()'; $theForm3->_elements[2]->_attr['disabled'] = 'disabled'; $theForm3->addEls('kodebarang', $_SESSION['lang']['kodebarang'], '', 'searchBarangGudang', 'L', 20, null, null, null, null, 'kodegudang', 'saldoMaterial'); $theForm3->addEls('kwantitas', $_SESSION['lang']['kwantitas'], '0', 'textnum', 'R', 10); //$theForm3->_elements[4]->_attr['onkeyup'] = 'cekSaldo()'; # Table $theTable3 = new uTable('materialTable', $_SESSION['lang']['tabel'] . ' ' . $_SESSION['lang']['pakaimaterial'], $cols, $data, $dataShow); # FormTable $formTab3 = new uFormTable('ftMaterial', $theForm3, $theTable3, null, array('notransaksi')); $formTab3->_target = "kebun_slave_operasional_material"; $formTab3->_noClearField = '##kodebarang'; $formTab3->_noEnable = '##kodebarang##kodeorg##kodegudang##kwantitas';
$optOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', "induk='" . $param['kodeorg'] . "'"); $optMesin = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', "tipe='STENGINE' and induk='" . end(array_reverse(array_keys($optOrg))) . "'"); $optMesinAll = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', "tipe='STENGINE'", '0', true); //$optDwnStat = makeOption($dbname,'pabrik_pengolahanmesin','downstatus','','7'); //$optDwnStat=array(''=>'','breakdown'=>'Breakdown','stagnasi'=>'Stagnasi','emergency'=>'Emergency'); $optDwnStat = array('' => '', 'EDT' => 'EDT : Breakdown', 'SDT' => 'SDT : Stagnasi', 'CDT' => 'CDT : Commercial Downtime'); # Data Show $dataShow = $data; foreach ($dataShow as $key => $row) { $dataShow[$key]['downstatus'] = $optDwnStat[$row['downstatus']]; $dataShow[$key]['station'] = $optOrg[$row['station']]; $dataShow[$key]['tahuntanam'] = $optMesinAll[$row['tahuntanam']]; } # Form $theForm1 = new uForm('mesinForm', $_SESSION['lang']['form'] . " " . $_SESSION['lang']['mesin'], 2); $theForm1->addEls('station', $_SESSION['lang']['station'], '', 'select', 'L', 25, $optOrg); $theForm1->_elements[0]->_attr['onchange'] = 'updMesin()'; $theForm1->addEls('tahuntanam', $_SESSION['lang']['mesin'], '0', 'select', 'L', 25, $optMesin); $theForm1->addEls('jammulai', $_SESSION['lang']['jamawalperbaikan'], '0', 'jammenit', 'R', 10); $theForm1->addEls('jamselesai', $_SESSION['lang']['jamakhirperbaikan'], '0', 'jammenit', 'R', 10); $theForm1->addEls('jamstagnasi', $_SESSION['lang']['jamstagnasi'], '0', 'textnum', 'R', 10); $theForm1->addEls('downstatus', $_SESSION['lang']['downstatus'], '0', 'select', 'L', 25, $optDwnStat); $theForm1->addEls('tekananawal', $_SESSION['lang']['tekananawal'], '0', 'textnum', 'R', 10); $theForm1->addEls('tekananakhir', $_SESSION['lang']['tekananakhir'], '0', 'textnum', 'R', 10); $theForm1->addEls('keterangan', $_SESSION['lang']['keterangan'], '', 'text', 'L', 50); #$theForm1->addEls('kodebarang',$_SESSION['lang']['kodebarang'],'','searchBarang','L',20,null,null,'jumlahbarang_satuan'); #$theForm1->addEls('jumlahbarang',$_SESSION['lang']['jumlahbarang'],'0','textnumwsatuan','L',10); # Table $theTable1 = new uTable('mesinTable', $_SESSION['lang']['tabel'] . " " . $_SESSION['lang']['mesin'], $cols, $data, $dataShow); # FormTable $formTab1 = new uFormTable('ftMesin', $theForm1, $theTable1, null, array('nopengolahan'));
$whereBarang .= ",'" . $row['kodebarang'] . "'"; } } $whereBarang .= ")"; $optBarang = makeOption($dbname, 'log_5masterbarang', 'kodebarang,namabarang', $whereBarang); } else { $optBarang = array(); } # Data Show $dataShow = $data; foreach ($dataShow as $key => $row) { $dataShow[$key]['kodebarang'] = $optBarang[$row['kodebarang']]; } # Form $theForm1 = new uForm('materialForm', 'Form Material'); $theForm1->addEls('kodebarang', $_SESSION['lang']['kodebarang'], '', 'searchBarang', 'L', 20, null, null, 'jumlahbarang_satuan'); $theForm1->addEls('jumlah', $_SESSION['lang']['jumlah'], '0', 'textnumwsatuan', 'L', 10); # Table $theTable1 = new uTable('materialTable', 'Tabel Material', $cols, $data, $dataShow); # FormTable $formTab1 = new uFormTable('ftMaterial', $theForm1, $theTable1, null, array('nopengolahan', 'ftMesin_station_' . $param['numRow'], 'ftMesin_tahuntanam_' . $param['numRow'])); $formTab1->_target = "pabrik_slave_pengolahan_material"; # Draw Tab $formTab1->render(); break; case 'add': $cols = array('nopengolahan', 'kodeorg', 'tahuntanam', 'kodebarang', 'jumlah'); # Get Data $data = array(); $data['nopengolahan'] = $param['nopengolahan']; foreach ($param as $key => $row) {
# Get Data $where = "kodeorg='" . $param['kodeorg'] . "' and periodegaji='" . $param['periodegaji'] . "'"; $cols = "tanggal,nik,jumlahpotongan,keterangan"; $query = selectQuery($dbname, 'sdm_potongandt', $cols, $where); $data = fetchData($query); $dataShow = $data; foreach ($dataShow as $key => $row) { $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); $dataShow[$key]['tanggal'] = tanggalnormal($row['tanggal']); $dataShow[$key]['nik'] = $optKary[$row['nik']]; $total += $dataShow[$key]['jumlahpotongan']; } $data[] = array('tanggal' => '', 'nik' => 'Total', 'jumlahpotongan' => number_format($total), 'keterangan' => ''); $dataShow[] = array('tanggal' => '', 'nik' => 'Total', 'jumlahpotongan' => number_format($total), 'keterangan' => ''); $theForm1 = new uForm('detailForm', 'Form Detail', 2); $theForm1->addEls('tanggal', $_SESSION['lang']['tanggal'], '', 'text', 'L', 15); $theForm1->_elements[0]->_attr['readonly'] = 'readonly'; $theForm1->_elements[0]->_attr['onmousemove'] = 'setCalendar(this.id)'; $theForm1->addEls('nik', $_SESSION['lang']['nik'], '', 'select', 'L', 25, $optKary); $theForm1->addEls('jumlahpotongan', $_SESSION['lang']['potongan'], '0', 'textnum', 'R', 10); $theForm1->addEls('keterangan', $_SESSION['lang']['keterangan'], '', 'text', 'L', 50); # Table $theTable1 = new uTable('detailTable', 'Tabel Detail', $cols, $data, $dataShow); # FormTable $formTab1 = new uFormTable('ftDetail', $theForm1, $theTable1, null, array('kodeorg', 'periodegaji')); $formTab1->_target = "sdm_slave_potongan_detail"; $formTab1->setFreezeEls('##tanggal##nik'); #== Display View # Draw Tab echo "<fieldset><legend><b>Detail</b></legend>"; $formTab1->render();
} // kamus hari libur $strorg = "select * from " . $dbname . ".sdm_5harilibur where tanggal = '" . $tanggalx . "'"; $queorg = mysql_query($strorg) or die(mysql_error()); while ($roworg = mysql_fetch_assoc($queorg)) { // $libur=true; if ($roworg['keterangan'] == 'libur') { $libur = true; } if ($roworg['keterangan'] == 'masuk') { $libur = false; } } # Form $theForm2 = new uForm('prestasiForm', 'Form Prestasi', 3); $theForm2->addEls('nik', $_SESSION['lang']['nik'], '', 'select', 'L', 25, $optKary); if ($libur == false) { if ($regional != 'KALTIM') { $theForm2->_elements[0]->_attr['onchange'] = "updUpah()"; } else { $theForm2->_elements[0]->_attr['onchange'] = "updUpah2()"; } } $theForm2->addEls('kodeorg', $_SESSION['lang']['kodeorg'], '', 'select', 'L', 25, $optOrg); if ($libur == false) { if ($regional != 'KALTIM') { $theForm2->_elements[1]->_attr['onchange'] = "updTahunTanam();"; } else { $theForm2->_elements[1]->_attr['onchange'] = "updTahunTanam2();"; } } else {
foreach ($dataShow as $key => $row) { $dataShow[$key]['tipe'] = $optTipe[$row['tipe']]; #$dataShow[$key]['noakundari'] = $optAkun[$row['noakundari']]; #$dataShow[$key]['noakunsampai'] = $optAkun[$row['noakunsampai']]; #$dataShow[$key]['noakundisplay'] = $optAkun[$row['noakundisplay']]; } $maxNo = 1; foreach ($data as $row) { if ($row['nourut'] > $maxNo) { $maxNo = $row['nourut']; } } $maxNo++; # Form $theForm1 = new uForm('mesinForm', 'Form Detail', 2); $theForm1->addEls('nourut', $_SESSION['lang']['nourut'], $maxNo, 'textnum', 'R', 10); $theForm1->addEls('tipe', $_SESSION['lang']['tipe'], '', 'select', 'L', 25, $optTipe); $theForm1->addEls('noakundari', $_SESSION['lang']['noakundari'], ' ', 'select', 'L', 25, $optAkun); $theForm1->addEls('noakunsampai', $_SESSION['lang']['noakunsampai'], ' ', 'select', 'L', 25, $optAkun); $theForm1->addEls('noakundisplay', $_SESSION['lang']['noakundisplay'], ' ', 'text', 'L', 25); $theForm1->addEls('keterangandisplay', $_SESSION['lang']['keterangandisplay'], '', 'text', 'L', 45); // $theForm1->addEls('inputbit',$_SESSION['lang']['inputbit'],'','text','C',2); // $theForm1->addEls('rubahoperatr',$_SESSION['lang']['ubahoperator'],'0','textnum','C',2); // $theForm1->addEls('variableoutput',$_SESSION['lang']['variableoutput'],'0','textnum','C',10); // $theForm1->addEls('operator',$_SESSION['lang']['operator'],'+','text','C',2); // $theForm1->addEls('variablejadi',$_SESSION['lang']['variablejadi'],'0','textnum','C',10); // $theForm1->addEls('resetvariableoutput',$_SESSION['lang']['resetvariableoutput'],'0','textnum','C',2); # Table $theTable1 = new uTable('mesinTable', 'Tabel Detail', $cols, $data, $dataShow); # FormTable $formTab1 = new uFormTable('ftMesin', $theForm1, $theTable1, null, array('kodeorg', 'namalaporan'));
switch ($proses) { case 'showDetail': # Options $optAkun = makeOption($dbname, 'keu_5akun', 'noakun,namaakun', "noakun like '116%' and detail=1"); # Get Data $where = "noinvoice='" . $param['noinvoice'] . "'"; $cols = "noakun,nilai"; $query = selectQuery($dbname, 'keu_tagihandt', $cols, $where); $data = fetchData($query); $dataShow = $data; foreach ($data as $key => $row) { $dataShow[$key]['noakun'] = $optAkun[$row['noakun']]; } # Form $theForm2 = new uForm('transForm', $_SESSION['lang']['form'] . ' ' . $_SESSION['lang']['invoice']); $theForm2->addEls('noakun', $_SESSION['lang']['noakun'], '', 'select', 'L', 30, $optAkun); $theForm2->addEls('nilai', $_SESSION['lang']['nilai'], '0', 'textnum', 'L', 30); $theForm2->_elements[1]->_attr['onchange'] = 'this.value=remove_comma(this);this.value = _formatted(this)'; #$theForm2->_elements[1]->_attr['disabled'] = 'disabled'; # Table $theTable2 = new uTable('transTable', $_SESSION['lang']['tabel'] . ' ' . $_SESSION['lang']['invoice'], $cols, $data, $dataShow); # FormTable $formTab2 = new uFormTable('transFT', $theForm2, $theTable2, null, array('noinvoice')); $formTab2->_target = "keu_slave_tagihan_detail"; $formTab2->_numberFormat = '##nilai'; #$formTab2->_nourut = true; #== Display View # Draw Tab echo "<fieldset><legend><b>Detail</b></legend>"; $formTab2->render(); echo "</fieldset>";
case 'showDetail': # Options $optBlok = getOrgBelow($dbname, $param['afdeling'], false, 'blok'); # Get Data $where = "kodeorg='" . $param['afdeling'] . "' and bulan=" . $param['bulan'] . " and tahun=" . $param['tahun']; $cols = "kodeblok,tanggal,jumlah,jumlahha,jumlahpremi,jumlahpokok"; $query = selectQuery($dbname, 'kebun_rencanapanen', $cols, $where); $data = fetchData($query); $dataShow = $data; foreach ($dataShow as $key => $row) { $dataShow[$key]['kodeblok'] = $optBlok[$row['kodeblok']]; $data[$key]['tanggal'] = tanggalnormal($row['tanggal']); } # Form $theForm2 = new uForm('formRencana', 'Form Sensus Produksi', 2); $theForm2->addEls('kodeblok', $_SESSION['lang']['kodeblok'], '', 'select', 'L', 25, $optBlok); $theForm2->addEls('tanggal', $_SESSION['lang']['tanggal'], '', 'text', 'L', 25); $theForm2->_elements[1]->_attr['readonly'] = 'readonly'; $theForm2->_elements[1]->_attr['onmousemove'] = 'setCalendar(this.id)'; $theForm2->addEls('jumlah', $_SESSION['lang']['jumlah'] . "(JJG)", '0', 'textnum', 'R', 25); $theForm2->addEls('jumlahha', $_SESSION['lang']['jumlahha'], '0', 'textnum', 'R', 25); $theForm2->addEls('jumlahpremi', $_SESSION['lang']['jumlahpremi'], '0', 'textnum', 'R', 25); $theForm2->_elements[4]->_attr['disabled'] = 'disabled'; $theForm2->addEls('jumlahpokok', $_SESSION['lang']['jumlahpokok'], '0', 'textnum', 'R', 25); # Table $theTable2 = new uTable('tableRencana', 'Daftar Rencana Panen', $cols, $data, $dataShow); # FormTable $formTab2 = new uFormTable('ftRencanaPanen', $theForm2, $theTable2, null, array('kodeorg', 'bulan', 'tahun')); $formTab2->_target = "kebun_slave_rencanapanen_detail"; #== Display View # Draw Tab