function Header() { global $conn; global $dbname; global $userid; global $kdOrg; global $tgl; global $tppot; global $optTipePot; $sInduk = "select induk from " . $dbname . ".organisasi where kodeorganisasi='" . $kdOrg . "'"; $qInduk = mysql_query($sInduk) or die(mysql_error()); $rInduk = mysql_fetch_assoc($qInduk); // $str1="select * from ".$dbname.".organisasi where kodeorganisasi='".$rInduk['induk']."'"; $str1 = "select * from " . $dbname . ".organisasi where kodeorganisasi='" . $_SESSION['org']['kodeorganisasi'] . "'"; $res1 = mysql_query($str1); while ($bar1 = mysql_fetch_object($res1)) { $nama = $bar1->namaorganisasi; $alamatpt = $bar1->alamat . ", " . $bar1->wilayahkota; $telp = $bar1->telepon; } $optTipePot = makeOption($dbname, 'sdm_ho_component', 'id,name'); $optNmOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi'); $sIsi = "select * from " . $dbname . ".sdm_potonganht where \r\n\t\t\t kodeorg='" . $kdOrg . "' and periodegaji='" . $tgl . "' and tipepotongan='" . $tppot . "'"; $qIsi = mysql_query($sIsi) or die(mysql_error()); $rIsi = mysql_fetch_assoc($qIsi); $sOrg = "select namaorganisasi from " . $dbname . ".organisasi where kodeorganisasi='" . $rIsi['kodeorg'] . "'"; $qOrg = mysql_query($sOrg) or die(mysql_error()); $rOrg = mysql_fetch_assoc($qOrg); $path = 'images/logo.jpg'; $this->Image($path, 15, 10, 20); $this->SetFont('Arial', 'B', 10); $this->SetFillColor(255, 255, 255); $this->SetX(40); $this->Cell(60, 5, $nama, 0, 1, 'L'); $this->SetX(40); $this->MultiCell(150, 5, $alamatpt, 0); //$this->Cell(60,5,$alamatpt,0,1,'L'); $this->SetX(40); $this->Cell(60, 5, "Tel: " . $telp, 0, 1, 'L'); $this->Ln(); $this->SetFont('Arial', 'B', 8); $this->Cell(20, 5, '', '', 1, 'L'); // $this->Cell(20,5,$nama,'',1,'L'); $this->SetFont('Arial', '', 8); //$this->Line(10,30,200,30); $akhirY = $this->GetY() - 5; $this->Line(10, $akhirY, 200, $akhirY); $akhirYline = $this->GetY(); $this->SetY($akhirYline); $this->Cell(15, 5, $_SESSION['lang']['unit'], '', 0, 'L'); $this->Cell(2, 5, ':', '', 0, 'L'); $this->Cell(175, 5, $rIsi['kodeorg'] . " " . $optNmOrg[$rIsi['kodeorg']], '', 1, 'L'); $this->Cell(15, 5, $_SESSION['lang']['periode'], '', 0, 'L'); $this->Cell(2, 5, ':', '', 0, 'L'); $this->Cell(175, 5, $tgl, '', 1, 'L'); $this->Cell(15, 5, $_SESSION['lang']['potongan'], '', 0, 'L'); $this->Cell(2, 5, ':', '', 0, 'L'); $this->Cell(175, 5, $optTipePot[$rIsi['tipepotongan']], 0, 1, 'L'); $this->Ln(); }
function countKode() { global $dbname; global $conn; global $regional; $optReg = makeOption($dbname, 'bgt_regional', 'regional,kodepenerimaankaryawan'); $sCount = "select substring(kode,2,3) as kodeku from " . $dbname . ".sdm_5uangmukapjd where regional = '" . $regional . "' order by kode desc limit 1"; $qCount = mysql_query($sCount) or die(mysql_error($conn)); $rCount = mysql_fetch_assoc($qCount); $nextKode = $optReg[$regional] . "" . addZero($rCount['kodeku'] + 1, 3); return $nextKode; }
<?php require_once 'master_validation.php'; require_once 'config/connection.php'; require_once 'lib/nangkoelib.php'; require_once 'lib/zLib.php'; require_once 'lib/fpdf.php'; require_once 'lib/terbilang.php'; //$arr="##kdSarana##tglKonSarana##kondId##idProgress##method"; $method = $_POST['method']; $kdSarana = $_POST['kdSarana']; $tglKonSarana = tanggalsystem($_POST['tglKonSarana']); $kondId = $_POST['kondId']; $idProgress = $_POST['idProgress']; $jmlhSarana = $_POST['jmlhSarana']; $optNmOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi'); $optKlmpk2 = "<option value=''>" . $_SESSION['lang']['pilihdata'] . "</option>"; $sKlmpk2 = "select distinct jenis,nama,satuan from " . $dbname . ".sdm_5jenis_prasarana order by nama asc"; $qKlmpk2 = mysql_query($sKlmpk2) or die(mysql_error()); while ($rKlmpk2 = mysql_fetch_assoc($qKlmpk2)) { $orgNmKlmpk2[$rKlmpk2['jenis']] = $rKlmpk2['nama']; $arrSat[$rKlmpk2['jenis']] = $rKlmpk2['satuan']; } switch ($method) { case 'insert': if ($kdSarana == '' || $tglKonSarana == '' || $kondId == '' || $idProgress == '') { echo "warning:Semua Field tidak boleh kosong"; exit; } if ($jmlhSarana == '' || $jmlhSarana == '0') { exit("Error:Jumlah tidak boleh kosong");
include_once 'lib/rTable.php'; /** Controller **/ # Options //$optPeriod = makeOption($dbname,'sdm_5periodegaji','periode,periode', // "kodeorg='".$_SESSION['empl']['lokasitugas']."' and jenisgaji='B'"); $str = "select periode from " . $dbname . ".sdm_5periodegaji where kodeorg='" . $_SESSION['empl']['lokasitugas'] . "' and jenisgaji='B'\r\n order by periode desc"; $res = mysql_query($str); while ($bar = mysql_fetch_object($res)) { $optPeriod[$bar->periode] = $bar->periode; } if ($_SESSION['empl']['tipelokasitugas'] == 'KANWIL' || $_SESSION['empl']['bagian'] == 'IT') { $hrt = " induk='" . $_SESSION['org']['kodeorganisasi'] . "'"; } else { $hrt = " kodeorganisasi='" . $_SESSION['empl']['lokasitugas'] . "'"; } $optOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', $hrt); # Element $els = array(); $els[] = array(makeElement('unit', 'label', $_SESSION['lang']['unit']), makeElement('kodeorg', 'select', '', array('style' => 'width:150px'), $optOrg)); $els[] = array(makeElement('periodegaji', 'label', $_SESSION['lang']['periodegaji']), makeElement('periodegaji', 'select', '', array('style' => 'width:150px'), $optPeriod)); $els['btn'] = array(makeElement('listBtn', 'btn', $_SESSION['lang']['list'], array('onclick' => "list()"))); $form = ""; $form .= "<h3 align='left'>" . $_SESSION['lang']['prosesgjbulanan'] . "</h3>"; $form .= genElementMultiDim($_SESSION['lang']['form'], $els, 1); $form .= "<fieldset style='float:left;clear:left'><legend><b>" . $_SESSION['lang']['list'] . "</b>" . "</legend><div id='listContainer'></div></fieldset>"; /** View **/ echo open_body(); ?> <script languange=javascript1.2 src='js/sdm_prosesgjbulanan.js'></script> <link rel=stylesheet type=text/css href='style/zTable.css'> <?php
<?php require_once 'master_validation.php'; include_once 'lib/nangkoelib.php'; include_once 'lib/zLib.php'; include_once 'lib/rTable.php'; $proses = $_GET['proses']; $param = $_POST; $namakar = array(); $optTipe = makeOption($dbname, 'organisasi', 'kodeorganisasi,tipe'); $tipeOrg = $optTipe[$param['kodeorg']]; $str = "select * from " . $dbname . ".bgt_regional_assignment \r\n where kodeunit LIKE '" . $param['kodeorg'] . "%'\r\n "; $res = mysql_query($str); while ($bar = mysql_fetch_object($res)) { $regional = $bar->regional; $unit = $bar->kodeunit; } #cek tutup atau belum periode gaji $sCekPeriode = "select distinct * from " . $dbname . ".sdm_5periodegaji where periode='" . $param['periodegaji'] . "' \r\n and kodeorg='" . $param['kodeorg'] . "' and sudahproses=1 and jenisgaji='H'"; $qCekPeriode = mysql_query($sCekPeriode) or die(mysql_error($conn)); if (mysql_num_rows($qCekPeriode) > 0) { $aktif2 = false; } else { $aktif2 = true; } if (!$aktif2) { exit(" Payroll period has been closed"); } #periksa tutupbuku $str = "select * from " . $dbname . ".setup_periodeakuntansi where periode='" . $param['periodegaji'] . "' and \r\n kodeorg='" . $param['kodeorg'] . "' and tutupbuku=1"; $res = mysql_query($str);
require_once 'master_validation.php'; require_once 'config/connection.php'; require_once 'lib/nangkoelib.php'; require_once 'lib/zLib.php'; require_once 'lib/fpdf.php'; require_once 'lib/terbilang.php'; $proses = checkPostGet('proses', ''); $periode = checkPostGet('periode', ''); $period = checkPostGet('period', ''); $perod = checkPostGet('perod', ''); $idKry = checkPostGet('idKry', ''); $idAfd = checkPostGet('idAfd', ''); $tPkary = checkPostGet('tPkary2', ''); $kdBag2 = checkPostGet('kdBag2', ''); $arrBln = array(1 => "Jan", 2 => "Feb", 3 => "Mar", 4 => "Apr", 5 => "Mei", 6 => "Jun", 7 => "Jul", 8 => "Agu", 9 => "Sep", 10 => "Okt", 11 => "Nov", 12 => "Des"); $rNmTipe = makeOption($dbname, 'sdm_5tipekaryawan', 'id,tipe'); $lksiTgs = substr($idAfd, 0, 4); if ($_SESSION['empl']['tipelokasitugas'] == 'HOLDING' || $_SESSION['empl']['tipelokasitugas'] == 'KANWIL') { if ($idAfd != '') { $add = "b.lokasitugas='" . $idAfd . "'"; } else { exit("Error: Working unit required"); } if ($kdBag2 != '') { $add .= " and b.bagian='" . $kdBag2 . "'"; } } else { if (strlen($idAfd) < 6) { $add = "b.lokasitugas='" . $idAfd . "' and (b.subbagian is null or b.subbagian='')"; } else { $add = "b.subbagian='" . $idAfd . "'";
require_once 'lib/terbilang.php'; if (isset($_POST['proses'])) { $proses = $_POST['proses']; } else { $proses = $_GET['proses']; } //$arr="##klmpkBrg##kdUnit##periode##lokasi##statId##purId"; $sKlmpk = "select kode,kelompok from " . $dbname . ".log_5klbarang order by kode"; $qKlmpk = mysql_query($sKlmpk) or die(mysql_error()); while ($rKlmpk = mysql_fetch_assoc($qKlmpk)) { $rKelompok[$rKlmpk['kode']] = $rKlmpk['kelompok']; } $optNmBrg = makeOption($dbname, 'log_5masterbarang', 'kodebarang,namabarang'); $optNmOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi'); $optKelompok = makeOption($dbname, 'log_5klbarang', 'kode,kelompok'); $optSatuan = makeOption($dbname, 'log_5masterbarang', 'kodebarang,satuan'); $_POST['kdUnit'] == '' ? $kdUnit = $_GET['kdUnit'] : ($kdUnit = $_POST['kdUnit']); $_POST['periode'] == '' ? $periode = $_GET['periode'] : ($periode = $_POST['periode']); $_POST['afdId'] == '' ? $afdId = $_GET['afdId'] : ($afdId = $_POST['afdId']); // $unitId = $_SESSION['lang']['all']; $nmPrshn = "Holding"; $purchaser = $_SESSION['lang']['all']; if ($periode == '') { exit("Error: " . $_SESSION['lang']['periode'] . " required"); } if ($kdUnit != '') { $unitId = $optNmOrg[$kdUnit]; } else { exit("Error:" . $_SESSION['lang']['unit'] . " required"); }
} } if (isset($arrAsset[$bar->tipeasset]['nilai'])) { $arrAsset[$bar->tipeasset]['nilai'] += $out; } else { $arrAsset[$bar->tipeasset]['nilai'] = $out; } $arrAsset[$bar->tipeasset]['nama'] = $bar->namatipe; $arrAsset[$bar->tipeasset]['kode'] = 'DEP' . substr($bar->tipeasset, 0, 2); } $poolAsset = array(); foreach ($arrAsset as $row) { $poolAsset[$row['kode']] = $row['nilai']; } // Get List Akun dari Parameter Jurnal = 'DEP' $optDep = makeOption($dbname, 'keu_5parameterjurnal', "jurnalid,noakunkredit", "kodeaplikasi='DEP'"); // Get Jurnal foreach ($poolAsset as $kode => $nilai) { // No Jurnal $konter = '001'; $tanggal = $param['periode'] . "-28"; # Transform No Jurnal dari No Transaksi $nojurnal = str_replace("-", "", $tanggal) . "/" . substr($param['kodeorg'], 0, 4) . "/" . $kode . "/" . $konter; $qJurnal = selectQuery($dbname, 'keu_jurnaldt', "jumlah", "nojurnal='" . $nojurnal . "' and noakun='" . $optDep[$kode] . "'"); $resJurnal = fetchData($qJurnal); if (empty($resJurnal)) { exit("Warning: Depresiasi " . $kode . " belum terjurnal dengan benar"); } else { if ($resJurnal[0]['jumlah'] + round($nilai, 2) > 0.01) { exit("Warning: Depresiasi " . $kode . " belum terjurnal dengan benar"); }
$data .= "<td align=center " . $bgBelakang . ">" . $_SESSION['lang']['akumulasipenyusutan'] . "</td> "; $data .= "<td align=center " . $bgBelakang . ">" . $_SESSION['lang']['nilaibuku'] . "</td> "; $data .= "<td align=center " . $bgBelakang . ">" . $_SESSION['lang']['keterangan'] . "</td> "; $data .= "<td align=center " . $bgBelakang . ">" . $_SESSION['lang']['awalpenyusutan'] . "</td> "; $data .= "<td align=center " . $bgBelakang . ">" . $_SESSION['lang']['bulanan'] . "</td> "; $data .= "<td align=center " . $bgBelakang . ">" . $_SESSION['lang']['persendecline'] . "</td> "; $data .= "<td align=center " . $bgBelakang . ">Leasing</td>"; $data .= "<td align=center " . $bgBelakang . ">" . $_SESSION['lang']['induk'] . "</td> "; $data .= "</tr> </thead><tbody>"; //$sList="select * from ".$dbname.".sdm_daftarasset where tipeasset='".$kdAst."' and kodeorg='".$kdOrg."' order by kodeorg"; if (empty($unitCode)) { $sList = "select * from " . $dbname . ".sdm_daftarasset where kodeorg in (select distinct kodeorganisasi from " . $dbname . ".organisasi where induk='" . $kdOrg . "') " . $where . " order by tipeasset"; } else { $sList = "select * from " . $dbname . ".sdm_daftarasset where kodeorg = '" . $unitCode . "' " . $where . " order by tipeasset"; } $optMetode = makeOption($dbname, 'sdm_5tipeasset', 'kodetipe,metodepenyusutan'); //echo $sList; $qList = mysql_query($sList) or die(mysql_error()); $no = 0; $totHarga = 0; $totHargaAkumul = 0; $totNilai = 0; $bulanan = 0; $tpengurang = 0; $tpenambah = 0; while ($bar = mysql_fetch_assoc($qList)) { if (empty($unitCode)) { $scounttipe = "select count(tipeasset) as countasset from " . $dbname . ".sdm_daftarasset where tipeasset='" . $bar['tipeasset'] . "' and kodeorg in (select distinct kodeorganisasi from " . $dbname . ".organisasi where induk='" . $kdOrg . "') order by tipeasset"; } else { $scounttipe = "select count(tipeasset) as countasset from " . $dbname . ".sdm_daftarasset where tipeasset='" . $bar['tipeasset'] . "' and kodeorg = '" . $unitCode . "' order by tipeasset"; }
$tglnya = $tglTtd[0]; $blnnya = numToMonth($tglTtd[1], $lang = 'I', $format = 'long'); $thnnya = $tglTtd[2]; $tglbenernya = $tglnya . ' ' . $blnnya . ' ' . $thnnya; $pdf->Cell(39, 5, ucwords(strtolower('Jakarta')) . ", " . $tglbenernya, '', 0, 'L'); $pdf->Ln(); $pdf->Cell(20, 5, '', 0, 'L'); $pdf->Cell(12, 5, $_SESSION['lang']['penjual'] . ',', '', 0, 'L'); $pdf->Cell(80, 5, '', '', 0, 'L'); $pdf->Cell(18, 5, $_SESSION['lang']['Pembeli'] . ',', '', 1, 'L'); $pdf->SetFont('Arial', 'B', '10'); $pdf->Cell(20, 5, '', 0, 'L'); $nmPt = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi'); $nmPtS = explode(".", $nmPt[$bar['kodept']]); setIt($nmPtS[1], ''); $pdf->Cell(80, 5, $nmPtS[0] . "." . ucwords(strtolower($nmPtS[1])), '', 0, 'C'); //$pdf->Cell(80,5,$nmdt2[0].".".ucwords(strtolower($nmdt2[1])),'',1,'C'); $pdf->Cell(80, 5, $nmdt2[0] . "." . $nmdt2[1], '', 1, 'C'); $jabatanTtd = makeOption($dbname, 'pmn_5ttd', 'nama,jabatan'); $namaTtdBeli = makeOption($dbname, 'pmn_4customer', 'kodecustomer,penandatangan'); $jabTtdBeli = makeOption($dbname, 'pmn_4customer', 'kodecustomer,jabatan'); $pdf->Ln(25); $pdf->SetFont('Arial', 'BU', '10'); $pdf->Cell(20, 5, '', 0, 'L'); $pdf->Cell(80, 5, ucwords(strtolower($bar['penandatangan'])), '', 0, 'C'); $pdf->Cell(80, 5, ucwords(strtolower($namaTtdBeli[$bar['koderekanan']])), '', 1, 'C'); $pdf->SetFont('Arial', 'B', '10'); $pdf->Cell(20, 5, '', 0, 'L'); $pdf->Cell(80, 5, ucwords(strtolower($jabatanTtd[$bar['penandatangan']])), '', 0, 'C'); $pdf->Cell(80, 5, ucwords(strtolower($jabTtdBeli[$bar['koderekanan']])), '', 1, 'C'); $pdf->Output();
} } break; case 'delete': $str = "delete from " . $dbname . ".sdm_pengobatanplafond \r\n\twhere kodegolongan='" . $kodegolongan . "' and kodejenisbiaya='" . $jenisbiaya . "'"; if (mysql_query($str)) { } else { echo " Gagal," . addslashes(mysql_error($conn)); } break; default: break; } $str1 = "select * from " . $dbname . ".sdm_pengobatanplafond order by regional asc, kodegolongan asc, kodejenisbiaya asc"; $vGolognan = makeOption($dbname, 'sdm_5golongan', 'kodegolongan,namagolongan'); $vJenisBiaya = makeOption($dbname, 'sdm_5jenisbiayapengobatan', 'kode,nama'); if ($res1 = mysql_query($str1)) { while ($bar1 = mysql_fetch_object($res1)) { if ($bar1->satuan == 1) { $hVal = 'per tahun'; } else { if ($bar1->satuan == 2) { $hVal = 'per hari'; } else { if ($bar1->satuan == 3) { $hVal = '1 tahun sekali'; } else { $hVal = '3 tahun sekali'; } } }
$query = selectQuery($dbname, 'datakaryawan', '*', $where); $data = fetchData($query); if ($mode == 'add') { foreach ($data[0] as $key => $row) { $data[0][$key] = ''; } } #=========== Prepare Tab and Content ================== $hfrm = array('Utama', 'Perkawinan', 'Pendidikan', 'Alamat', 'Pangalaman Kerja', 'Riwayat', 'Penghargaan', 'Inventaris', 'Kondite'); $frm = array('Utama', makeElement('perkawinan', 'button', 'Refresh', array('onclick' => "refreshTab('perkawinan','" . $mode . "')")) . "<div id='tabPerkawinan'></div>", makeElement('pendidikan', 'button', 'Refresh', array('onclick' => "refreshTab('pendidikan','" . $mode . "')")) . "<div id='tabPendidikan'></div>", makeElement('alamat', 'button', 'Refresh', array('onclick' => "refreshTab('alamat','" . $mode . "')")) . "<div id='tabAlamat'></div>", makeElement('pengalamankerja', 'button', 'Refresh', array('onclick' => "refreshTab('pengalamankerja','" . $mode . "')")) . "<div id='tabPengalamanKerja'></div>", makeElement('riwayat', 'button', 'Refresh', array('onclick' => "refreshTab('riwayat','" . $mode . "')")) . "<div id='tabRiwayat'></div>", makeElement('penghargaan', 'button', 'Refresh', array('onclick' => "refreshTab('penghargaan','" . $mode . "')")) . "<div id='tabPenghargaan'></div>", makeElement('inventaris', 'button', 'Refresh', array('onclick' => "refreshTab('inventaris','" . $mode . "')")) . "<div id='tabInventaris'></div>", makeElement('kondite', 'button', 'Refresh', array('onclick' => "refreshTab('kondite','" . $mode . "')")) . "<div id='tabKondite'></div>"); #=========== Tab Utama ============= # Prep Options $optOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi'); $optPend = makeOption($dbname, 'sdm_5pendidikan', 'levelpendidikan,pendidikan'); $optJab = makeOption($dbname, 'sdm_5jabatan', 'kodejabatan,namajabatan'); $optGol = makeOption($dbname, 'sdm_5golongan', 'golongan,keterangan'); $optGender = array('P' => $_SESSION['lang']['pria'], 'W' => $_SESSION['lang']['wanita']); $optStatMarr = array('Bujang' => $_SESSION['lang']['bujang'], 'Menikah' => $_SESSION['lang']['menikah'], 'Janda' => $_SESSION['lang']['janda'], 'Duda' => $_SESSION['lang']['duda']); $optAgama = array('Islam' => $_SESSION['lang']['islam'], 'Protestan' => $_SESSION['lang']['protestan'], 'Katolik' => $_SESSION['lang']['katolik'], 'Hindu' => $_SESSION['lang']['hindu'], 'Budha' => $_SESSION['lang']['budha'], 'Konghucu' => $_SESSION['lang']['konghucu'], 'Lainnya' => $_SESSION['lang']['lain']); $optBlood = array('A+' => 'A+', 'A-' => 'A-', 'B+' => 'B+', 'B-' => 'B-', 'O+' => 'O+', 'O-' => 'O-', 'AB+' => 'AB+', 'AB-' => 'AB-'); # Fields $els = array(); $els[] = array(makeElement('nik', 'label', $_SESSION['lang']['nik']), makeElement('nik', 'text', $data[0]['nik'], array('style' => 'width:100px', 'maxlength' => '10'))); $els[] = array(makeElement('namakaryawan', 'label', $_SESSION['lang']['namakaryawan']), makeElement('namakaryawan', 'text', $data[0]['namakaryawan'], array('style' => 'width:250px', 'maxlength' => '40', 'onkeypress' => 'return tanpa_kutip(event)'))); $els[] = array(makeElement('lahir', 'label', $_SESSION['lang']['lahir']), makeElement('tempatlahir', 'text', $data[0]['tempatlahir'], array('style' => 'width:250px', 'maxlength' => '30', 'onkeypress' => 'return tanpa_kutip(event)')) . makeElement('tanggallahir', 'text', $data[0]['tanggallahir'], array('style' => 'width:250px', 'readonly' => 'readonly', 'onmousemove' => 'setCalendar(this.id)'))); $els[] = array(makeElement('warganegara', 'label', $_SESSION['lang']['warganegara']), makeElement('warganegara', 'text', $data[0]['warganegara'], array('style' => 'width:250px', 'maxlength' => '45', 'onkeypress' => 'return tanpa_kutip(event)'))); $els[] = array(makeElement('jeniskelamin', 'label', $_SESSION['lang']['jeniskelamin']), makeElement('jeniskelamin', 'select', $data[0]['jeniskelamin'], array('style' => 'width:250px'), $optGender)); $els[] = array(makeElement('statusperkawinan', 'label', $_SESSION['lang']['statusperkawinan']), makeElement('statusperkawinan', 'select', $data[0]['statusperkawinan'], array('style' => 'width:250px'), $optStatMarr)); $els[] = array(makeElement('tanggalmenikah', 'label', $_SESSION['lang']['tanggalmenikah']), makeElement('tanggalmenikah', 'text', $data[0]['tanggalmenikah'], array('style' => 'width:250px', 'readonly' => 'readonly', 'onmousemove' => 'setCalendar(this.id)'))); $els[] = array(makeElement('agama', 'label', $_SESSION['lang']['agama']), makeElement('agama', 'text', $data[0]['agama'], array('style' => 'width:250px'), $optAgama)); $els[] = array(makeElement('golongandarah', 'label', $_SESSION['lang']['golongandarah']), makeElement('golongandarah', 'select', $data[0]['golongandarah'], array('style' => 'width:70px'), $optBlood));
"; </script> <script language="javascript" src="js/zTools.js"></script> <script type="text/javascript" src="js/bgt_budget_sebaran.js"></script> <script> dataKdvhc="<?php echo $_SESSION['lang']['pilihdata']; ?> "; </script> <?php // Options $optUnit = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', "LENGTH(kodeorganisasi)=4", 2); $optDiv = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', "induk='" . key($optUnit) . "'", 2); $optBlok = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', "induk='" . key($optDiv) . "'", 2); $optKode = makeOption($dbname, 'bgt_kode', 'kodebudget,nama', "kodebudget not in ('KONTRAK','TOOL')", 2, true); $optKode[''] = $_SESSION['lang']['pilihdata']; $optMethod = array('insert' => 'Insert', 'update' => 'Update'); // Onchange Organisasi $qOrg = selectQuery($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi,induk', "LENGTH(kodeorganisasi) > 5"); $resOrg = fetchData($qOrg); $optOrg = array(); foreach ($resOrg as $row) { if (strlen($row['kodeorganisasi']) == 6) { if (!isset($optOrg[substr($row['kodeorganisasi'], 0, 4)][$row['kodeorganisasi']])) { $optOrg[substr($row['kodeorganisasi'], 0, 4)][$row['kodeorganisasi']] = array('nama' => $row['kodeorganisasi'] . " - " . $row['namaorganisasi'], 'child' => array()); } else { $optOrg[substr($row['kodeorganisasi'], 0, 4)][$row['kodeorganisasi']]['nama'] = $row['kodeorganisasi'] . " - " . $row['namaorganisasi']; } } else { if (!isset($optOrg[substr($row['kodeorganisasi'], 0, 4)][substr($row['kodeorganisasi'], 0, 6)])) {
<?php require_once 'master_validation.php'; require_once 'config/connection.php'; require_once 'lib/nangkoelib.php'; require_once 'lib/zLib.php'; require_once 'lib/fpdf.php'; $_POST['proses'] == '' ? $proses = $_GET['proses'] : ($proses = $_POST['proses']); $_POST['tipe'] == '' ? $tipe = $_GET['tipe'] : ($tipe = $_POST['tipe']); $_POST['periode'] == '' ? $periode = $_GET['periode'] : ($periode = $_POST['periode']); $_POST['judul'] == '' ? $judul = $_GET['judul'] : ($judul = $_POST['judul']); $qwe = explode('-', $periode); $tahun = $qwe[0]; $bulan = $qwe[1]; $optNm = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi'); $optNmBrg = makeOption($dbname, 'log_5masterbarang', 'kodebarang,namabarang'); if ($periode == '') { exit("Error:Field Tidak Boleh Kosong"); } $arr = "##periode##judul"; $optBulan['01'] = $_SESSION['lang']['jan']; $optBulan['02'] = $_SESSION['lang']['peb']; $optBulan['03'] = $_SESSION['lang']['mar']; $optBulan['04'] = $_SESSION['lang']['apr']; $optBulan['05'] = $_SESSION['lang']['mei']; $optBulan['06'] = $_SESSION['lang']['jun']; $optBulan['07'] = $_SESSION['lang']['jul']; $optBulan['08'] = $_SESSION['lang']['agt']; $optBulan['09'] = $_SESSION['lang']['sep']; $optBulan['10'] = $_SESSION['lang']['okt']; $optBulan['11'] = $_SESSION['lang']['nov'];
<?php require_once 'master_validation.php'; require_once 'config/connection.php'; require_once 'lib/nangkoelib.php'; require_once 'lib/zLib.php'; $method = $_POST['method']; $notran = isset($_POST['notran']) ? $_POST['notran'] : ''; $txt = isset($_POST['txt']) ? $_POST['txt'] : ''; $hrini = date('Ymd'); $jumlahditerima = isset($_POST['jumlahditerima']) ? $_POST['jumlahditerima'] : ''; $kodebarang = isset($_POST['kodebarang']) ? $_POST['kodebarang'] : ''; $nmFranco = makeOption($dbname, 'setup_franco', 'id_franco,franco_name'); switch ($method) { case 'posting': $sekarang = date('Y-m-d'); $i = "update " . $dbname . ".log_konosemenht set posting=1,postingby='" . $_SESSION['standard']['userid'] . "',tanggalterima='" . $sekarang . "' where nokonosemen='" . $notran . "'"; //exit("Error:$i"); if (mysql_query($i)) { } else { echo " Gagal," . addslashes(mysql_error($conn)); } break; case 'savePenerimaan': //exit("Error:MASUK"); $i = "update " . $dbname . ".`log_konosemendt` set jumlahditerima='" . $jumlahditerima . "' where nokonosemen='" . $notran . "' and kodebarang='" . $kodebarang . "'"; //exit("Error:$i"); if (mysql_query($i)) { } else { echo " Gagal," . addslashes(mysql_error($conn)); }
<input type="hidden" id="h_id" name="h_id" value="<?php echo $posted["h_id"]; ?> "> <input name="my_selected" id="my_selected" value="" type="hidden" /> <div class="row"> <div class="col-md-5"> <div class="form-group"> <label ><?php echo addslashes(t("User Type")); ?> <span class="text-danger">*</span> </label> <select class="form-control" name="opt_user_type" id="opt_user_type" > <?php echo makeOption($user_type, encrypt($posted['i_user_type'])); ?> </select> <span class="text-danger"></span> </div> </div> <div class="col-md-5 col-md-offset-1"></div> </div> <div class="row"> <div class="col-md-5"> <div class="form-group"> <label ><?php echo addslashes(t("First Name"));
$pdf->Cell(35, $height, number_format($data['jumlah'], 2), 0, 0, 'C'); $pdf->Cell(35, $height, $data['satuan'], '0', 0, 'C'); $pdf->Cell(40, $height, tanggalnormal($data['tgl_sdt']), '0', 0, 'L'); //$pdf->SetFont('Arial','',6.5); //$height=12; $akhirXket = $pdf->getX() + 190; $pdf->MultiCell(190, $height, $data['keterangan'], '0', 'L'); $pdf->SetFont('Arial', 'I', 7); if ($data['keteranganubah'] != '') { $pdf->SetX(385); $pdf->SetFillColor(240, 240, 240); $pdf->MultiCell(150, $height, "- Barang diatas diubah dengan catatan: " . $data['keteranganubah'], '0', 'L'); //$pdf->Cell(545,$height,"Barang diatas diubah oleh Purchasing dengan catatan: ".$data['keteranganubah'],1,1,'L',1); } $whKartolak = "karyawanid='" . $data['ditolakoleh'] . "'"; $nmKartolak = makeOption($dbname, 'datakaryawan', 'karyawanid,namakaryawan', $whKartolak); if ($data['status'] == '3') { $pdf->SetX(385); $pdf->SetFillColor(240, 240, 240); $pdf->MultiCell(150, $height, '- Barang telah ditolak oleh : ' . $nmKartolak[$data['ditolakoleh']], '0', 'L'); //$pdf->Cell(545,$height,"Barang diatas diubah oleh Purchasing dengan catatan: ".$data['keteranganubah'],1,1,'L',1); } $akhirYket = $pdf->GetY(); if ($akhirYnmbrg >= $akhirYket) { $akhirYbanget = $akhirYnmbrg; } else { $akhirYbanget = $akhirYket; } $pdf->Line($awalXno, $akhirYbanget, $akhirXket, $akhirYbanget); $awalYbanget = $akhirYbanget; }
switch ($proses) { case 'showDetail': # Options $where = "`tipe`='PABRIK'"; $optOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', $where, '0'); $whereKary = ""; $i = 0; foreach ($optOrg as $key => $row) { if ($i == 0) { $whereKary .= "lokasitugas='" . $key . "'"; } else { $whereKary .= " or lokasitugas='" . $key . "'"; } $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
if ($tab == 8) { echo $optws2; } } if ($proses == 'loaddata') { $limit = 10; $page = 0; if (isset($_POST['page'])) { $page = $_POST['page']; if ($page < 0) { $page = 0; } } $kamusbarang = makeOption($dbname, 'log_5masterbarang', 'kodebarang,namabarang'); $kamussatuan = makeOption($dbname, 'log_5masterbarang', 'kodebarang,satuan'); $kamuskegiatan = makeOption($dbname, 'setup_kegiatan', 'kodekegiatan,namakegiatan'); $ql2 = "select count(*) as jmlhrow from " . $dbname . ".log_baspk_material order by `notransaksi` desc"; $query2 = mysql_query($ql2) or die(mysql_error()); while ($jsl = mysql_fetch_object($query2)) { $jlhbrs = $jsl->jmlhrow; } $offset = $page * $limit; if ($jlhbrs < $offset) { $page -= 1; } $offset = $page * $limit; $no = $offset; $slvhc = "select * from " . $dbname . ".log_baspk_material order by `notransaksi` desc,`kodekegiatan`,`blok`,`tanggal`,`kodebarang` desc limit " . $offset . "," . $limit . " "; $qlvhc = mysql_query($slvhc) or die(mysql_error()); $user_online = $_SESSION['standard']['userid']; while ($rlvhc = mysql_fetch_assoc($qlvhc)) {
<?php require_once 'master_validation.php'; require_once 'config/connection.php'; require_once 'lib/nangkoelib.php'; require_once 'lib/zLib.php'; $method = $_POST['method']; $notran = isset($_POST['notran']) ? $_POST['notran'] : ''; $txt = isset($_POST['txt']) ? $_POST['txt'] : ''; $hrini = date('Ymd'); $jumlahditerima = isset($_POST['jumlahditerima']) ? $_POST['jumlahditerima'] : ''; $kodebarang = isset($_POST['kodebarang']) ? $_POST['kodebarang'] : ''; $nmSup = makeOption($dbname, 'log_5supplier', 'supplierid,namasupplier'); $optKend = makeOption($dbname, 'vhc_5jenisvhc', 'jenisvhc,namajenisvhc', "kelompokvhc='KD'"); $nmKar = makeOption($dbname, 'datakaryawan', 'karyawanid,namakaryawan'); switch ($method) { case 'posting': $sekarang = date('Y-m-d'); $i = "update " . $dbname . ".log_suratjalanht set postingpenerimaan=1,penerima='" . $_SESSION['empl']['name'] . "',tanggaltiba='" . $sekarang . "' where nosj='" . $notran . "'"; //exit("Error:$i"); if (mysql_query($i)) { } else { echo " Gagal," . addslashes(mysql_error($conn)); } break; case 'savePenerimaan': $i = "update " . $dbname . ".`log_suratjalandt` set jumlahditerima='" . $jumlahditerima . "' where nosj='" . $notran . "' and kodebarang='" . $kodebarang . "'"; //exit("Error:$i"); if (mysql_query($i)) { } else { echo " Gagal," . addslashes(mysql_error($conn));
<?php //@Copy nangkoelframework require_once 'master_validation.php'; include_once 'lib/nangkoelib.php'; include_once 'lib/zLib.php'; echo open_body(); ?> <script language=javascript1.2 src='js/vhc_kegiatan.js'></script> <?php include 'master_mainMenu.php'; OPEN_BOX('', $_SESSION['lang']['vhc_kegiatan']); // Akun dari Kelompok Kegiatan $optAkunKeg = makeOption($dbname, 'setup_klpkegiatan', "noakun,noakun"); $whereAkun = ""; //foreach($optAkunKeg as $akun) { // if(!empty($whereAkun)) $whereAkun .= " OR "; // $whereAkun .= "noakun LIKE '".$akun."%'"; //} if ($_SESSION['language'] == 'EN') { $dd = 'namaakun1'; } else { $dd = 'namaakun'; } $str = "select noakun," . $dd . " as namakegiatan from " . $dbname . ".keu_5akun where detail=1 "; if (!empty($whereAkun)) { $str .= " and (" . $whereAkun . ")"; } //echo $str; $str .= "order by noakun";
$no = 0; $a = "select * from " . $dbname . ".log_packingdt where notransaksi='" . $notran . "' "; //exit("Error:$a"); $b = mysql_query($a) or die(mysql_error()); while ($c = mysql_fetch_assoc($b)) { $no += 1; $xCek = "\tselect a.nopo,a.kodebarang,sum(a.jumlah) as jumlah from " . $dbname . ".log_packingdt a\r\n\t\t\t\t\twhere a.nopo='" . $c['nopo'] . "' and a.kodebarang='" . $c['kodebarang'] . "' group by a.nopo,a.kodebarang\r\n\t\t\t\t\tunion\r\n\t\t\t\t\tselect b.nopo,b.kodebarang,sum(b.jumlah) as jumlah from " . $dbname . ".log_suratjalandt b\r\n\t\t\t\t\twhere b.jenis='PO' and b.nopo='" . $c['nopo'] . "' and b.kodebarang='" . $c['kodebarang'] . "' group by b.nopo,b.kodebarang\r\n\t\t\t\t\tunion\r\n\t\t\t\t\tselect c.nopo,c.kodebarang,sum(c.jumlah) as jumlah from " . $dbname . ".log_konosemendt c\r\n\t\t\t\t\twhere c.jenis='PO' and c.nopo='" . $c['nopo'] . "' and c.kodebarang='" . $c['kodebarang'] . "' group by c.nopo,c.kodebarang"; //echo $xCek; $yCek = mysql_query($xCek) or die(mysql_error($conn)); $zCek = mysql_fetch_assoc($yCek); $i = "select * from " . $dbname . ".log_po_vw where statuspo='3' and nopo='" . $c['nopo'] . "' and kodebarang='" . $c['kodebarang'] . "' "; $n = mysql_query($i) or die(mysql_error($conn)); $d = mysql_fetch_assoc($n); $nobpb = makeOption($dbname, 'log_transaksi_vw', 'nopo,notransaksi'); $whi = "nopo='" . $d['nopo'] . "' and kodebarang='" . $d['kodebarang'] . "' and tipetransaksi=1 "; $jumlah = makeOption($dbname, 'log_transaksi_vw', 'notransaksi,jumlah', $whi); //$jumlah[$nobpb[$d['nopo']]]; $jumlahSimpan = $zCek['jumlah'] - $c['jumlah']; /* <td>".$jumlah[$nobpb[$d['nopo']]]."</td><td>".$jumlahSimpan."</td>*/ echo "<tr class=rowcontent id=row" . $no . ">\r\n\t\t\t\t\t<td>" . $no . "</td>\r\n\t\t\t\t\t<td id=notranDet" . $no . ">" . $c['notransaksi'] . "</td>\r\n\t\t\t\t\t<td id=nobpbDet" . $no . ">" . $c['nobpb'] . "</td>\r\n\t\t\t\t\t<td id=nopoDet" . $no . ">" . $c['nopo'] . "</td>\r\n\t\t\t\t\t<td>" . $c['nopp'] . "</td>\r\n\t\t\t\t\t<td id=kodebarangDet" . $no . ">" . $c['kodebarang'] . "</td>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<td>" . $nmBarang[$c['kodebarang']] . "</td>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<td><input type=text id=jumlah" . $no . " value=" . $c['jumlah'] . " onkeypress=\"return angka_doang(event);\" class=myinputtextnumber style=\"width:100px;\"></td>\r\n\t\t\t\t\t<td>" . $c['satuanpo'] . "</td>\r\n\t\t\t\t\t<td>" . $c['matauang'] . "</td>\r\n\t\t\t\t\t<td>" . $c['kurs'] . "</td>\r\n\t\t\t\t\t<td>" . $c['harga'] . "</td>\r\n\t\t\t\t\t<td>" . $c['keteranganpp'] . "</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<img src=images/icons/Grey/PNG/save.png class=resicon title='update' onclick=\"updateDetail('" . $c['notransaksi'] . "','" . $c['nobpb'] . "','" . $c['nopo'] . "','" . $c['kodebarang'] . "'," . $no . ",'" . (isset($jumlah[$nobpb[$d['nopo']]]) and isset($nobpb[$d['nopo']]) ? $jumlah[$nobpb[$d['nopo']]] : '') . "','" . $jumlahSimpan . "');\" >\r\n\t\t\t\t\t\t<img src=images/application/application_delete.png class=resicon title='Delete' onclick=\"DelDetail('" . $c['notransaksi'] . "','" . $c['nobpb'] . "','" . $c['nopo'] . "','" . $c['kodebarang'] . "');\" >\t\t\t\t\t\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>"; } echo "<tr>\r\n\t\t\t\t<td colspan=14 align=center>\r\n\t\t\t\t\t<button class=mybutton id=editAll onclick=editAll(" . $no . ")>" . $_SESSION['lang']['edit'] . "</button>\r\n\t\t\t\t\t<button class=mybutton id=cancelDetail onclick=cancel()>" . $_SESSION['lang']['selesai'] . "</button>\r\n\t\t\t\t</td>\r\n\t\t\t </tr>"; //<button class=mybutton id=editAll onclick=editAll()>".$_SESSION['lang']['edit']."</button> echo "</table>"; break; case 'loadData': $kdPtLoad = "kodept!='' "; if ($kdPtSch != '') { $kdPtLoad = "kodept like '%" . $kdPtSch . "%'"; }
echo "DB Error : " . mysql_error($conn); } break; case 'addRow': # Get Field $tmpField = explode('##', $_POST['field']); $j = $_POST['numRow']; $primaryStr = $_POST['primary']; $fieldStr = $_POST['field']; foreach ($tmpField as $key => $row) { if ($key != 0) { $field[] = $row; } } # Setting drop down options $optTopografi = makeOption($dbname, 'setup_topografi', 'topografi,keterangan'); $optTipeAng = getEnum($dbname, 'setup_kegiatannorma', 'tipeanggaran'); #$optBarang = makeOption($dbname,'log_5masterbarang','kodebarang,namabarang'); $content = ""; foreach ($field as $row) { if ($row == 'topografi') { $content .= "<td>" . makeElement($row . "_" . $j, 'select', '', array('style' => 'width:100px'), $optTopografi) . "</td>"; } elseif ($row == 'tipeanggaran') { $content .= "<td>" . makeElement($row . "_" . $j, 'select', '', array('style' => 'width:100px'), $optTipeAng) . "</td>"; } elseif ($row == 'kodebarang') { $content .= "<td>" . makeElement($row . "_" . $j, 'text', '', array('style' => 'width:70px', 'readonly' => 'readonly')) . makeElement('getInvBtn_' . $j, 'btn', 'Cari', array('onclick' => 'getInv(event,\'' . $j . '\')')) . "</td>"; } elseif ($row == 'namabarang') { $content .= "<td>" . makeElement($row . "_" . $j, 'txt', '', array('style' => 'width:120px', 'readonly' => 'readonly')) . "</td>"; } elseif ($row == 'kuantitas1') { $content .= "<td>" . makeElement($row . "_" . $j, 'textnum', '0', array('style' => 'width:40px', 'onkeypress' => 'return tanpa_kutip(event)')) . " <span id='uom1_" . $j . "'></span></td>"; } elseif ($row == 'kuantitas2') {
<?php require_once 'master_validation.php'; require_once 'config/connection.php'; require_once 'lib/nangkoelib.php'; require_once 'lib/zLib.php'; require_once 'lib/fpdf.php'; $proses = $_GET['proses']; $_POST['kdUnit_sebaran'] == '' ? $kodeOrg = $_GET['kdUnit_sebaran'] : ($kodeOrg = $_POST['kdUnit_sebaran']); $_POST['thnBudget_sebaran'] == '' ? $thnBudget = $_GET['thnBudget_sebaran'] : ($thnBudget = $_POST['thnBudget_sebaran']); $arrBln = array("1" => "Jan", "2" => "Feb", "3" => "Mar", "4" => "Apr", "5" => "Mei", "6" => "Jun", "7" => "Jul", "8" => "Aug", "9" => "Sept", "10" => "Okt", "11" => "Nov", "12" => "Des"); $optNm = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi'); $optAkun = makeOption($dbname, 'keu_5akun', 'noakun,namaakun'); $where = " substring(kodeorg,1,4)='" . $kodeOrg . "' and tahunbudget='" . $thnBudget . "' and tipebudget='ESTATE' and kodebudget!='UMUM'"; //luas TM //ambil luas planted per tahuntanam $str = "select sum(hathnini) as luas,thntnm from " . $dbname . ".bgt_blok where \r\n kodeblok like '" . $kodeOrg . "%' and statusblok='TM'\r\n group by thntnm"; $res = mysql_query($str); while ($bar = mysql_fetch_object($res)) { $dtJmlhLuastm[$thnBudget][$bar->thntnm] += $bar->luas; $ttlLuastm += $bar->luas; } //luas TBM //ambil luas planted per tahuntanam $str = "select sum(hathnini) as luas,thntnm from " . $dbname . ".bgt_blok where \r\n kodeblok like '" . $kodeOrg . "%' and statusblok in ('TBM','TB')\r\n group by thntnm"; $res = mysql_query($str); while ($bar = mysql_fetch_object($res)) { $dtJmlhLuastbm[$thnBudget][$bar->thntnm] += $bar->luas; $ttlLuastbm += $bar->luas; } $ttlLuas = $ttlLuastbm + $ttlLuastm;
} } if ($proses == 'excel') { $stream .= "<table border='1'>"; } else { $stream .= "<table cellspacing='1' border='0' class='sortable' width=100%>"; } $stream .= "<thead>\r\n<tr class=rowheader>\r\n<td align=center>" . $_SESSION['lang']['nomor'] . "</td>\r\n<td align=center>" . $_SESSION['lang']['kodeorg'] . "</td> \r\n<td align=center>" . $_SESSION['lang']['id'] . "</td>\r\n<td align=center>" . $_SESSION['lang']['namakaryawan'] . "</td> \r\n<td align=center>" . $_SESSION['lang']['tipekaryawan'] . "</td>\r\n<td align=center>" . $_SESSION['lang']['statuspajak'] . "</td>\r\n<td align=center>" . $_SESSION['lang']['npwp'] . "</td> \r\n<td align=center>" . $_SESSION['lang']['tahun'] . "</td>\r\n<td align=center>Penghasilan01</td>\r\n<td align=center>Gaji01</td> \r\n<td align=center>Tunj01</td> \r\n<td align=center>" . $_SESSION['lang']['pph12'] . ".01</td>"; $stream .= "<td align=center>Penghasilan02</td>\r\n<td align=center>Gaji02</td> \r\n<td align=center>Tunj02</td> \r\n<td align=center>" . $_SESSION['lang']['pph12'] . ".02</td> \r\n<td align=center>Penghasilan03</td>\r\n<td align=center>Gaji03</td> \r\n<td align=center>Tunj03</td> \r\n<td align=center>" . $_SESSION['lang']['pph12'] . ".03</td> \r\n<td align=center>Penghasilan04</td>\r\n<td align=center>Gaji04</td> \r\n<td align=center>Tunj04</td> \r\n<td align=center>" . $_SESSION['lang']['pph12'] . ".04</td> \r\n<td align=center>Penghasilan05</td>\r\n<td align=center>Gaji05</td> \r\n<td align=center>Tunj05</td> \r\n<td align=center>" . $_SESSION['lang']['pph12'] . ".05</td> \r\n<td align=center>Penghasilan06</td>\r\n<td align=center>Gaji06</td> \r\n<td align=center>Tunj06</td> \r\n<td align=center>" . $_SESSION['lang']['pph12'] . ".06</td> \r\n<td align=center>Penghasilan07</td>\r\n<td align=center>Gaji07</td> \r\n<td align=center>Tunj07</td> \r\n<td align=center>" . $_SESSION['lang']['pph12'] . ".07</td> \r\n<td align=center>Penghasilan08</td>\r\n<td align=center>Gaji08</td> \r\n<td align=center>Tunj08</td> \r\n<td align=center>" . $_SESSION['lang']['pph12'] . ".08</td> \r\n<td align=center>Penghasilan09</td>\r\n<td align=center>Gaji09</td> \r\n<td align=center>Tunj09</td> \r\n<td align=center>" . $_SESSION['lang']['pph12'] . ".09</td> \r\n<td align=center>Penghasilan10</td>\r\n<td align=center>Gaji10</td> \r\n<td align=center>Tunj10</td> \r\n<td align=center>" . $_SESSION['lang']['pph12'] . ".10</td> \r\n<td align=center>Penghasilan11</td>\r\n<td align=center>Gaji11</td> \r\n<td align=center>Tunj11</td> \r\n<td align=center>" . $_SESSION['lang']['pph12'] . ".11</td> \r\n<td align=center>Penghasilan12</td>\r\n<td align=center>Gaji12</td> \r\n<td align=center>Tunj12</td> \r\n<td align=center>" . $_SESSION['lang']['pph12'] . ".12</td> \r\n<td align=center>" . $_SESSION['lang']['total'] . "</td>\r\n<td align=center>GajiTOT</td> \r\n<td align=center>TunjTOT</td> \r\n<td align=center>PPh21 Tahunan</td> \r\n</tr> \r\n</thead>\r\n<tbody>"; // kamus tipe karyawan $str = "select id, tipe from " . $dbname . ".sdm_5tipekaryawan\r\n "; $res = mysql_query($str); while ($bar = mysql_fetch_object($res)) { $kamusTipe[$bar->id] = $bar->tipe; } $optNmjabatan = makeOption($dbname, 'sdm_5jabatan', 'kodejabatan,namajabatan'); // kamus data karyawan $kamusKar = array(); $str = "select nik, karyawanid, namakaryawan, tipekaryawan, statuspajak, lokasitugas, subbagian,npwp,kodejabatan from " . $dbname . ".datakaryawan \r\n where lokasitugas like '" . $kodeorg . "%' "; $res = mysql_query($str); while ($bar = mysql_fetch_object($res)) { $kamusKar[$bar->karyawanid]['nik'] = $bar->karyawanid; $kamusKar[$bar->karyawanid]['nama'] = $bar->namakaryawan; $kamusKar[$bar->karyawanid]['tipe'] = $bar->tipekaryawan; $kamusKar[$bar->karyawanid]['status'] = $bar->statuspajak; $kamusKar[$bar->karyawanid]['lokasi'] = $bar->lokasitugas; $kamusKar[$bar->karyawanid]['bagian'] = $bar->subbagian; $kamusKar[$bar->karyawanid]['jabatan'] = $bar->kodejabatan; $kamusKar[$bar->karyawanid]['npwp'] = str_replace(" ", "", str_replace(".", "", $bar->npwp)); if (!is_numeric($kamusKar[$bar->karyawanid]['npwp'])) { $kamusKar[$bar->karyawanid]['npwp'] = '';
<?php require_once 'master_validation.php'; require_once 'config/connection.php'; require_once 'lib/nangkoelib.php'; require_once 'lib/zLib.php'; $unit = checkPostGet('unit', ''); $tglAwal = tanggalsystem(checkPostGet('tglAwal', '')); $tglAkhir = tanggalsystem(checkPostGet('tglAkhir', '')); $periode = checkPostGet('periode', ''); $jenisVhc = makeOption($dbname, 'vhc_5master', 'kodevhc,jenisvhc'); $tahunperolehan = makeOption($dbname, 'vhc_5master', 'kodevhc,tahunperolehan'); if ($unit == '') { echo "warning: Working unit required"; exit; } if ($tglAwal == '' || $tglAkhir == '') { echo "Warning: date required"; exit; } #========================================================= #4.5 ambilnoakun biaya kendaraan $akunkdari = ''; $akunksampai = ''; $strh = "select distinct noakundebet,sampaidebet from " . $dbname . ".keu_5parameterjurnal where jurnalid='LPVHC'"; $resh = mysql_query($strh); echo mysql_error($conn); while ($barh = mysql_fetch_object($resh)) { $akunkdari = $barh->noakundebet; $akunksampai = $barh->sampaidebet; }
$optPeriodeAkn = makeOption($dbname, 'setup_periodeakuntansi', 'periode,tutupbuku', $whrPrd); $optData = makeOption($dbname, 'sdm_potonganht', 'periodegaji,tipepotongan', $whrPrdData); if ($optPeriodeAkn[$param['periode']] == 1) { exit("Error: Accounting period has been closed"); } if (!empty($optData[$param['periode']])) { exit("error: This date and Organization Name already exist"); } } $where = " lokasitugas='" . $param['kdOrg'] . "' and (tanggalkeluar='0000-00-00' or tanggalkeluar<'" . $tgl . "')"; /*if($optTipe[$param['kdOrg']]=='KANWIL'){ $where=" lokasitugas in (select kodeorganisasi from ".$dbname.".organisasi where induk='".$_SESSION['empl']['kodeorganisasi']."')" . " and (tanggalkeluar='0000-00-00' or tanggalkeluar<'".$tgl."')"; }*/ $where .= " and left(kodegolongan,1)<=3"; $optTipeKar = makeOption($dbname, 'sdm_5tipekaryawan', 'id,tipe'); $optKry = "<option value=''>" . $_SESSION['lang']['pilihdata'] . "</option>"; $sKry = "select namakaryawan,nik,karyawanid,lokasitugas,tipekaryawan from " . $dbname . ".datakaryawan where " . $where . " order by namakaryawan asc"; $qKry = mysql_query($sKry) or die(mysql_error($conn)); while ($rKry = mysql_fetch_assoc($qKry)) { $optKry .= "<option value=" . $rKry['karyawanid'] . ">" . $rKry['namakaryawan'] . " [" . $rKry['nik'] . "] " . $optTipeKar[$rKry['tipekaryawan']] . " [" . $rKry['lokasitugas'] . "]</option>"; } $table = "<table id='ppDetailTable' cellspacing='1' border='0' class='sortable'>\r\n\t\t<thead>\r\n\t\t<tr class=rowheader>\r\n\t\t<td>" . $_SESSION['lang']['namakaryawan'] . "</td>\r\n\t\t<td>" . $_SESSION['lang']['potongan'] . "</td>\r\n\t\t<td>" . $_SESSION['lang']['keterangan'] . "</td>\r\n\t\t<td>Action</td>\r\n\t\t</tr></thead>\r\n\t\t<tbody id='detailBody'>"; $table .= "<tr class=rowcontent>\r\n\t\t<td><select id=krywnId name=krywnId style='width:200px'>" . $optKry . "</select>\r\n\t\t<img class='zImgBtn' style='position:relative;top:5px' src='images/onebit_02.png' onclick=\"getKary('" . $_SESSION['lang']['find'] . " " . $_SESSION['lang']['namakaryawan'] . "','1',event);\" />\r\n\t\t</td>\r\n\t\t<td><input type=text class='myinputtextnumber' id=rpPot style=width:150px onkeypress='return angka_doang(event)' /></td>\r\n\t\t<td><input type=text class=myinputtext id=ketPot style=width:150px onkeypress='return tanpa_kutip(event)' /></td>\r\n\t\t<td align=center><img id='detail_add' title='Simpan' class=zImgBtn onclick=\"addDetail()\" src='images/save.png'/></td>\r\n\t\t</tr>\r\n\t\t"; $table .= "</tbody></table>"; echo $table; break; case 'loadDetail': if ($_SESSION['empl']['tipelokasitugas'] == 'KANWIL') { if ($_SESSION['empl']['regional'] == 'SULAWESI') { $sDet = "select * from " . $dbname . ".sdm_potongandt where periodegaji='" . $param['periode'] . "' " . "and kodeorg in (select distinct kodeunit from " . $dbname . ".bgt_regional_assignment where regional='" . $_SESSION['empl']['regional'] . "')\r\n\t\t\t\t\t and tipepotongan='" . $param['tipePot'] . "' order by nik asc";
// $gtt+=$ttExt; #Grand Total $pdf->Cell(20 / 100 * $width, $height, "Grand Total (A+B)", 1, 0, 'L', 1); if (!empty($TGL)) { foreach ($TGL as $key => $tg) { $pdf->Cell(9 / 100 * $width, $height, number_format($tExt[$tg] + $tinternal[$tg]), 1, 0, 'R', 1); // $gtt+=$tExt[$tg]+$tinternal[$tg]; } } $pdf->Cell(9 / 100 * $width, $height, number_format($gtt), 1, 1, 'R', 1); $pdf->Output(); break; case 'getKodeorg': $optorg = "<option value=''>" . $_SESSION['lang']['all'] . "</option>"; $kdPabrik = $_POST['kdPabrik']; $optPt = makeOption($dbname, 'organisasi', 'kodeorganisasi,induk'); $ptnya = $optPt[$kdPabrik]; if ($tipeIntex == 1) { //$sOrg="SELECT namaorganisasi,kodeorganisasi FROM ".$dbname.".organisasi WHERE tipe='KEBUN' and induk in(select induk from ".$dbname.".organisasi where tipe='PABRIK') order by namaorganisasi asc"; $sOrg = "SELECT namaorganisasi,kodeorganisasi FROM " . $dbname . ".organisasi WHERE tipe='KEBUN' and induk ='" . $ptnya . "' order by namaorganisasi asc"; } else { if ($tipeIntex == 0) { $sOrg = "SELECT namasupplier,`kodetimbangan` FROM " . $dbname . ".log_5supplier WHERE (kodetimbangan!='' or kodetimbangan!='NULL') and substring(kodekelompok,1,1)='S' order by namasupplier asc"; //echo "warning:".$sOrg; } else { if ($tipeIntex == 2) { //$sOrg="SELECT namaorganisasi,kodeorganisasi FROM ".$dbname.".organisasi WHERE tipe='KEBUN' and induk not in(select induk from ".$dbname.".organisasi where tipe='PABRIK') order by namaorganisasi asc"; $sOrg = "SELECT namaorganisasi,kodeorganisasi FROM " . $dbname . ".organisasi WHERE tipe='KEBUN' and induk <>'" . $ptnya . "' order by namaorganisasi asc"; } } }
function Header() { global $conn; global $dbname; global $userid; global $posted; global $tanggal; global $norek_sup; global $npwp_sup; global $nm_kary; global $nm_pt; global $nmSupplier; global $almtSupplier; global $tlpSupplier; global $faxSupplier; global $nopo; global $tglPo; global $kdBank; global $an; global $optNmkry; global $kota; global $cp; $optNmkry = makeOption($dbname, 'datakaryawan', 'karyawanid,namakaryawan'); $str = "select kodeorg,kodesupplier,purchaser,nopo,tanggal from " . $dbname . ".log_poht where nopo='" . $_GET['column'] . "'"; //echo $str;exit(); $res = mysql_query($str); $bar = mysql_fetch_object($res); //ambil nama pt if ($bar->kodeorg == '') { $bar->kodeorg = $_SESSION['org']['kodeorganisasi']; } $str1 = "select namaorganisasi,alamat,wilayahkota,telepon from " . $dbname . ".organisasi where kodeorganisasi='" . $bar->kodeorg . "'"; $res1 = mysql_query($str1); while ($bar1 = mysql_fetch_object($res1)) { if (substr($bar1->namaorganisasi, 0, 8) == 'KOPERASI' || substr($bar1->namaorganisasi, 0, 8) == 'koperasi') { $scek = "select distinct regional from " . $dbname . ".bgt_regional_assignment \r\n where kodeunit in (select kodeorganisasi from " . $dbname . ".organisasi where induk='" . $bar->kodeorg . "')"; //exit("Error:".$scek); $qcek = mysql_query($scek) or die(mysql_error($conn)); $rcek = mysql_fetch_assoc($qcek); if ($rcek['regional'] == 'KALTIM') { $bar->kodeorg = 'DPA'; } if ($rcek['regional'] == 'SUMSEL' || $rcek['regional'] == 'LAMPUNG') { $bar->kodeorg = 'PMO'; } $str1 = "select namaorganisasi,alamat,wilayahkota,telepon from " . $dbname . ".organisasi where kodeorganisasi='" . $bar->kodeorg . "'"; $res1 = mysql_query($str1); $bar1 = mysql_fetch_object($res1); } $namapt = $bar1->namaorganisasi; $alamatpt = $bar1->alamat . ", " . $bar1->wilayahkota; $telp = $bar1->telepon; } $sNpwp = "select npwp,alamatnpwp from " . $dbname . ".setup_org_npwp where kodeorg='" . $bar->kodeorg . "'"; $qNpwp = mysql_query($sNpwp) or die(mysql_error()); $rNpwp = mysql_fetch_assoc($qNpwp); $sql = "select * from " . $dbname . ".log_5supplier where supplierid='" . $bar->kodesupplier . "'"; //echo $sql; $query = mysql_query($sql) or die(mysql_error()); $res = mysql_fetch_object($query); $sql2 = "select namakaryawan from " . $dbname . ".datakaryawan where karyawanid='" . $bar->purchaser . "'"; $query2 = mysql_query($sql2) or die(mysql_error()); $res2 = mysql_fetch_object($query2); $sql3 = "select namaorganisasi from " . $dbname . ".organisasi where kodeorganisasi='" . $bar->kodeorg . "'"; $query3 = mysql_query($sql3) or die(mysql_error()); $res3 = mysql_fetch_object($query3); $norek_sup = isset($res->rekening) ? $res->rekening : ''; $kdBank = isset($res->bank) ? $res->bank : ''; $npwp_sup = isset($res->npwp) ? $res->npwp : ''; $an = isset($res->an) ? $res->an : ''; $nm_kary = isset($res2->namakaryawan) ? $res2->namakaryawan : ''; $nm_pt = isset($res3->namaorganisasi) ? $res3->namaorganisasi : ''; //data PO $nopo = isset($bar->nopo) ? $bar->nopo : ''; $tglPo = isset($bar->tanggal) ? tanggalnormal($bar->tanggal) : ''; //data supplier $nmSupplier = isset($res->namasupplier) ? $res->namasupplier : ''; $almtSupplier = isset($res->alamat) ? $res->alamat : ''; $tlpSupplier = isset($res->telepon) ? $res->telepon : ''; $faxSupplier = isset($res->fax) ? $res->fax : ''; $kota = isset($res->kota) ? $res->kota : ''; $cp = isset($res->kontakperson) ? $res->kontakperson : ''; $this->SetMargins(15, 10, 0); $path = 'images/logo.jpg'; $this->Image($path, 15, 5, 0, 30); $this->SetFont('Arial', 'B', 9); $this->SetFillColor(255, 255, 255); $this->SetX(55); $this->Cell(60, 5, $namapt, 0, 1, 'L'); $this->SetX(55); $this->Cell(60, 5, $alamatpt, 0, 1, 'L'); $this->SetX(55); $this->Cell(60, 5, "Tel: " . $telp, 0, 1, 'L'); $this->SetFont('Arial', 'B', 7); $this->SetX(55); $this->Cell(60, 5, "NPWP: " . $rNpwp['npwp'], 0, 1, 'L'); $this->SetX(55); $this->Cell(60, 5, $_SESSION['lang']['alamat'] . " NPWP: " . $rNpwp['alamatnpwp'], 0, 1, 'L'); $this->SetFont('Arial', 'B', 9); $this->Line(15, 35, 205, 35); $this->SetX(155); $this->Cell(30, 10, "No. PO: " . $nopo, 0, 1, 'L'); }
$_POST['idPt'] == '' ? $idPt = $_GET['idPt'] : ($idPt = $_POST['idPt']); $_POST['klmpkBrg'] == '' ? $klmpkBrg = $_GET['klmpkBrg'] : ($klmpkBrg = $_POST['klmpkBrg']); $_POST['periode'] == '' ? $periode = $_GET['periode'] : ($periode = $_POST['periode']); $_POST['judul'] == '' ? $judul = $_GET['judul'] : ($judul = $_POST['judul']); $qwe = explode('-', $periode); $tahun = $qwe[0]; $bulan = $qwe[1]; $_POST['pt'] == '' ? $pt = $_GET['pt'] : ($pt = $_POST['pt']); $_POST['periodeDt'] == '' ? $periodeDt = $_GET['periodeDt'] : ($periodeDt = $_POST['periodeDt']); if ($pt != '') { $idPt = $pt; } $dtNmBrg = makeOption($dbname, 'log_5masterbarang', 'kodebarang,namabarang'); $dtSat = makeOption($dbname, 'log_5masterbarang', 'kodebarang,satuan'); $optNm = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi'); $optNmKlmpk = makeOption($dbname, 'log_5klbarang', 'kode,kelompok'); if ($periode == '') { exit("Error:Field Tidak Boleh Kosong"); } $arr = "##periode##judul"; $optBulan['01'] = $_SESSION['lang']['jan']; $optBulan['02'] = $_SESSION['lang']['peb']; $optBulan['03'] = $_SESSION['lang']['mar']; $optBulan['04'] = $_SESSION['lang']['apr']; $optBulan['05'] = $_SESSION['lang']['mei']; $optBulan['06'] = $_SESSION['lang']['jun']; $optBulan['07'] = $_SESSION['lang']['jul']; $optBulan['08'] = $_SESSION['lang']['agt']; $optBulan['09'] = $_SESSION['lang']['sep']; $optBulan['10'] = $_SESSION['lang']['okt']; $optBulan['11'] = $_SESSION['lang']['nov'];