Exemplo n.º 1
0
require_once 'lib/zLib.php';
$proses = checkPostGet('proses', '');
$txtFind = checkPostGet('txtfind', '');
$absnId = explode("###", checkPostGet('absnId', ''));
$tgl = isset($absnId[1]) ? tanggalsystem($absnId[1]) : '';
$kdOrg = $absnId[0];
$krywnId = checkPostGet('krywnId', '');
$shifTid = checkPostGet('shifTid', '');
$asbensiId = checkPostGet('asbensiId', '');
$Jam = checkPostGet('Jam', '');
$Jam2 = checkPostGet('Jam2', '');
$ket = checkPostGet('ket', '');
$periode = checkPostGet('period', '');
$idOrg = substr($_SESSION['empl']['lokasitugas'], 0, 4);
$catu = checkPostGet('catu', '');
$penaltykehadiran = checkPostGet('dendakehadiran', '');
$periodeAkutansi = $_SESSION['org']['period']['tahun'] . "-" . $_SESSION['org']['period']['bulan'];
$kdJbtn = makeOption($dbname, 'datakaryawan', 'karyawanid,kodejabatan');
$tipeKary = makeOption($dbname, 'datakaryawan', 'karyawanid,tipekaryawan');
##buat cek proses gaji
$iPer = "select * from " . $dbname . ".sdm_5periodegaji where kodeorg='" . $_SESSION['empl']['lokasitugas'] . "' and " . " sudahproses=0 order by periode asc limit 1";
$nPer = mysql_query($iPer) or die(mysql_error($conn));
$dPer = mysql_fetch_assoc($nPer);
$perGjSkrg = $dPer['periode'];
switch ($proses) {
    case 'cariOrg':
        //echo"warning:masuk";
        $str = "select namaorganisasi,kodeorganisasi from " . $dbname . ".organisasi where namaorganisasi like '%" . $txtFind . "%' or kodeorganisasi like '%" . $txtFind . "%' ";
        //echo "warning:".$str;exit();
        if ($res = mysql_query($str)) {
            echo "\r\n          <fieldset>\r\n        <legend>Result</legend>\r\n        <div style=\"overflow:auto; height:300px;\" >\r\n        <table class=data cellspacing=1 cellpadding=2  border=0>\r\n                                 <thead>\r\n                                 <tr class=rowheader>\r\n                                 <td class=firsttd>\r\n                                 No.\r\n                                 </td>\r\n                                 <td>" . $_SESSION['lang']['kodeorg'] . "</td>\r\n                                 <td>" . $_SESSION['lang']['namaorganisasi'] . "</td>\r\n                                 </tr>\r\n                                 </thead>\r\n                                 <tbody>";
         $subharga += $harga;
     }
     $pdf->Cell(42 / 100 * $width, $height, "Total", 1, 0, 'R', 1);
     $pdf->SetFont('Arial', '', 6);
     $pdf->Cell(8 / 100 * $width, $height, number_format($subtota), 1, 0, 'R', 1);
     $pdf->Cell(8 / 100 * $width, $height, number_format($subbrtpot), 1, 0, 'R', 1);
     $pdf->Cell(8 / 100 * $width, $height, number_format($subbrtnor), 1, 0, 'R', 1);
     $pdf->Cell(7 / 100 * $width, $height, "", 1, 0, 'C', 1);
     //                if($tipeIntex==0)$pdf->Cell(10/100*$width,$height,number_format($subharga),1,0,'R',1); else
     $pdf->Cell(15 / 100 * $width, $height, "", 1, 0, 'C', 1);
     $pdf->Cell(8 / 100 * $width, $height, number_format($subjjg), 1, 0, 'R', 1);
     $pdf->Cell(8 / 100 * $width, $height, '', 1, 1, 'R', 1);
     $pdf->Output();
     break;
 case 'excel':
     $periode = checkPostGet('periode', '00-00-0000');
     $tipeIntex = $_GET['tipeIntex'];
     $unit = $_GET['unit'];
     $tglPeriode = explode("-", $periode);
     $tanggal = $tglPeriode[1] . "-" . $tglPeriode[0];
     $tgl_1 = tanggalsystem($_GET['tgl_1']);
     $tgl_2 = tanggalsystem($_GET['tgl_2']);
     $kdPabrik = $_GET['kdPabrik'];
     $pilTamp = $_GET['pilTamp'];
     $dateDt = dates_inbetween($tgl_1, $tgl_2);
     if ($unit != "") {
         if ($tipeIntex == 0) {
             $where = "and kodecustomer='" . $unit . "'";
         } else {
             $where = "and substr(nospb,9,6) like '%" . $unit . "%'";
         }
Exemplo n.º 3
0
 $penghasilanjbt = checkPostGet('penghasilanjbt', '');
 $pensiun = checkPostGet('pensiun', '');
 $jml_ptkp = checkPostGet('jml_ptkp', '');
 $pkp = checkPostGet('pkp', '');
 $pph21bln = checkPostGet('pph21bln', '');
 $premiasuransi = checkPostGet('premiasuransi', '');
 $pajakterhutang = checkPostGet('pajakterhutang', '');
 $statuspajak = checkPostGet('statuspajak', '');
 $jabatan = checkPostGet('jabatan', '');
 $npwp = checkPostGet('npwp', '');
 $gajipokok = checkPostGet('gajipokok', '');
 $gajih = checkPostGet('gajih', '');
 $pajaksetahun = $pajakterhutang;
 $tipekaryawan = checkPostGet('tipekaryawan', '');
 $lemburpremi = checkPostGet('lemburpremi', '');
 $premittp = checkPostGet('premittp', '');
 if ($pkp < 0) {
     $pkp = 0;
 }
 echo "<fieldset><legend>Print Excel</legend>\r\n <img onclick=\"detailExcel(event,'sdm_slave_2pajak.php?proses=excel2&nama=" . $nama . "&karid=" . $karid . "&tipekaryawan=" . $tipekaryawan . "&statuspajak=" . $statuspajak . "&jabatan=" . $jabatan . "&npwp=" . $npwp . "&gajipokok=" . $gajipokok . "&lemburpremi=" . $lemburpremi . "&premiasuransi=" . $premiasuransi . "&gajih=" . $gajih . "&totrapel=" . $totrapel . "&totbonus=" . $totbonus . "&totthr=" . $totthr . "&gajihsthn=" . $gajihsthn . "&pensiun=" . $pensiun . "&byjbt=" . $byjbt . "&penghasilanjbt=" . $penghasilanjbt . "&jml_ptkp=" . $jml_ptkp . "&pkp=" . $pkp . "&pajakterhutang=" . $pajakterhutang . "&pph21bln=" . $pph21bln . "')\" src=images/excel.jpg class=resicon title='MS.Excel'>\r\n </fieldset>";
 //echo $_GET['type'];
 if ($_GET['proses'] != 'excel2') {
     $stream = "<table class=sortable border=0 cellspacing=1>";
 } else {
     $stream = "<table class=sortable border=1 cellspacing=1>";
 }
 $stream .= "<thead><tr class=rowheader>\r\n                 <td align=center>Nama</td>\r\n                 <td align=center>NIK</td>\r\n                 <td align=center>Tipe Karyawan</td>\r\n                 <td align=center>Status Pajak</td>\r\n                 <td align=center>Jabatan</td>\r\n                 <td align=center>NPWP</td>\r\n                 <td align=center>Gaji Pokok</td>\r\n                 <td align=center>Lembur dan Premi</td>\r\n                 <td align=center>Premi Asuransi</td>\r\n                 <td align=center>Total Penghasilan BI</td>\r\n                 <td align=center>Rapel Kenaikan Gaji</td>\r\n                 <td align=center>Bonus</td> \r\n                 <td align=center>THR</td> \r\n                 <td align=center>Total Penghasilan Disetahunkan</td>\r\n                 <td align=center>Iuran Pensiun</td>\r\n                 <td align=center>Biaya Jabatan</td>\r\n                 <td align=center>Penghasilan Netto Setahun</td>\r\n                 <td align=center>PTKP</td>\r\n                 <td align=center>PKP</td>\r\n                 <td align=center>Pajak Terhutang Setahun</td>\r\n                 <td align=center>Total Pajak BI</td>\r\n                </tr></thead>";
 $stream .= "<tbody><tr class=rowcontent>\r\n                 <td>" . $nama . "</td>\r\n                 <td>" . $karid . "</td>\r\n                 <td>" . $tipekaryawan . "</td>\r\n                 <td>" . $statuspajak . "</td>\r\n                 <td>" . $jabatan . "</td>\r\n                 <td align=right>" . $npwp . "</td>\r\n                 <td align=right>" . number_format($gajipokok, 0) . "</td>\r\n                 <td align=right>" . number_format($lemburpremi, 0) . "</td>    \r\n                 <td align=right>" . number_format($premiasuransi, 0) . "</td>\r\n                 <td align=right>" . number_format($gajih, 0) . "</td>\r\n                 <td align=right>" . number_format($totrapel, 0) . "</td>\r\n                 <td align=right>" . number_format($totbonus, 0) . "</td>\r\n                 <td align=right>" . number_format($totthr, 0) . "</td>\r\n                 <td align=right>" . number_format($gajihsthn, 0) . "</td>\r\n                 <td align=right>" . number_format($pensiun, 0) . "</td>\r\n                 <td align=right>" . number_format($byjbt, 0) . "</td>\r\n                 <td align=right>" . number_format($penghasilanjbt, 0) . "</td>\r\n                 <td align=right>" . number_format($jml_ptkp, 0) . "</td>\r\n                 <td align=right>" . number_format($pkp, 0) . "</td>\r\n                 <td align=right>" . number_format($pajakterhutang, 0) . "</td>\r\n                 <td align=right>" . number_format($pph21bln, 0) . "</td>\r\n                </tr>";
 $stream .= "</tbody></table>";
 if ($_GET['proses'] == 'excel2') {
     $nop_ = "Detail Pajak";
Exemplo n.º 4
0
<?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'];
$proses = checkPostGet('proses', '');
$unit = checkPostGet('unit', '');
$tgl1 = tanggalsystemn(checkPostGet('tgl1', ''));
$tgl2 = tanggalsystemn(checkPostGet('tgl2', ''));
$nmOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi');
$nmBrg = makeOption($dbname, 'log_5masterbarang', 'kodebarang,namabarang');
$stBrg = makeOption($dbname, 'log_5masterbarang', 'kodebarang,satuan');
$arrPost = array("0" => "Not Posted", "1" => "Posting");
if ($tgl1 == '--') {
    $tgl1 = '';
}
if ($tgl2 == '--') {
    $tgl2 = '';
}
$golkar = makeOption($dbname, 'datakaryawan', 'karyawanid', 'kodegolongan');
$namagol = makeOption($dbname, 'sdm_5golongan', 'kodegolongan', 'namagolongan');
$namatipe = makeOption($dbname, 'sdm_5tipekaryawan', 'id,tipe');
$sGetKary = "select sum(c.jumlah) as jumlah,a.kodegolongan,a.karyawanid,a.nik,b.namajabatan,a.namakaryawan,a.tipekaryawan,\r\n           subbagian from " . $dbname . ".datakaryawan a \r\n           left join " . $dbname . ".sdm_5jabatan b on a.kodejabatan=b.kodejabatan \r\n           left join " . $dbname . ".sdm_5gajipokok c on a.karyawanid=c.karyawanid\r\n           where (tanggalkeluar>'" . $tgl1 . "' or tanggalkeluar='0000-00-00') and lokasitugas='{$unit}' and \r\n           a.tipekaryawan in ('1','2','3','4')  group by a.karyawanid order by namakaryawan asc";
//echo $sGetKary;
//$sGetKar="";
//echo $sGetKary; exit;
$rGetkary = fetchData($sGetKary);
foreach ($rGetkary as $row => $kar) {
Exemplo n.º 5
0
<?php

require_once 'master_validation.php';
require_once 'config/connection.php';
require_once 'lib/nangkoelib.php';
require_once 'lib/fpdf.php';
$pt = checkPostGet('pt', '');
$gudang = checkPostGet('gudang', '');
$periode = checkPostGet('periode', '');
$periode1 = checkPostGet('periode1', '');
$revisi = checkPostGet('revisi', '');
$regional = checkPostGet('regional', '');
$kdKel = checkPostGet('kdKel', '');
//cek periode dan periode1
if ($periode1 < $periode) {
    #ditukar
    $z = $periode;
    $periode = $periode1;
    $periode1 = $z;
}
//ambil namapt
$str = "select namaorganisasi from " . $dbname . ".organisasi where kodeorganisasi='" . $pt . "'";
$namapt = '';
$res = mysql_query($str);
while ($bar = mysql_fetch_object($res)) {
    $namapt = strtoupper($bar->namaorganisasi);
}
//ambil namagudang
$str = "select namaorganisasi from " . $dbname . ".organisasi where kodeorganisasi='" . $gudang . "'";
$namagudang = '';
$res = mysql_query($str);
Exemplo n.º 6
0
<?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';
$proses = checkPostGet('proses', '');
$tgl_1 = checkPostGet('tgl1', '');
$tgl_2 = checkPostGet('tgl2', '');
$tanggl = checkPostGet('tglRe', '');
$kdPabrik = checkPostGet('kdPabrik', '');
$dwnStatus = checkPostGet('dwnStatus', '');
if ($tgl_1 == '' || $tgl_2 == '') {
    exit("Error:Date required");
}
if ($kdPabrik == '') {
    exit("Error: Mill code required");
}
if (strlen($tgl_1) != 10 || strlen($tgl_2) != 10) {
    exit("Error: Invalid date format");
}
$stad = "";
if ($dwnStatus != '') {
    if ($dwnStatus == '0') {
        $stad = " and downstatus=''";
    } else {
        $stad = " and downstatus='" . $dwnStatus . "'";
    }
}
<?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;
}
Exemplo n.º 8
0
<?php

session_start();
require_once 'master_validation.php';
require_once 'config/connection.php';
include_once 'lib/nangkoelib.php';
include_once 'lib/zLib.php';
include_once 'lib/fpdf.php';
$proses = checkPostGet('proses', '');
$kodeorg = checkPostGet('kodeorg', '');
$kodetangki = checkPostGet('kodetangki', '');
$suhu = checkPostGet('suhu', '0');
$beratjenis = checkPostGet('beratjenis', '0');
$varian = checkPostGet('varian', '0');
switch ($proses) {
    case 'insert':
        if ($kodeorg == '' || $kodetangki == '' || $suhu == '' || $beratjenis == '' || $varian == '') {
            echo 'Gagal : Semua field harus diisi.';
        } else {
            $strCount = "select * from " . $dbname . ".pabrik_5suhu where millcode='" . $kodeorg . "' and kodetangki='" . $kodetangki . "' and suhu='" . $suhu . "'";
            $qryCount = mysql_query($strCount) or die(mysql_error());
            $numRows = mysql_num_rows($qryCount);
            if ($numRows >= 1) {
                echo "Gagal : Item ini sudah ada didatabase.";
            } else {
                $str = "insert into " . $dbname . ".pabrik_5suhu(millcode,kodetangki,suhu,berat_jenis,varian,updateby) values ('" . $kodeorg . "','" . $kodetangki . "','" . $suhu . "','" . $beratjenis . "','" . $varian . "','" . $_SESSION['standard']['userid'] . "')";
                if (mysql_query($str)) {
                    loadData();
                } else {
                    echo "DB Error : " . mysql_error($conn);
                }
Exemplo n.º 9
0
<?php

session_start();
include_once 'lib/nangkoelib.php';
include_once 'lib/zLib.php';
include_once 'config/connection.php';
$proses = checkPostGet('proses', '');
$kdOrg = checkPostGet('kdDiv', '');
$noSpb = checkPostGet('noSpb', '');
$periode = checkPostGet('periode', '');
$tgl = explode('-', checkPostGet('tgl', ''));
$tglThn = count($tgl) > 2 ? $tgl[2] : '';
$tglBln = count($tgl) > 1 ? $tgl[1] : '';
$periodeB = $tglThn . "-" . $tglBln;
switch ($proses) {
    case 'createTable':
        $cekPost = "select distinct posting from " . $dbname . ".kebun_spbht where nospb='" . $noSpb . "'";
        $qcekPost = mysql_query($cekPost) or die(mysql_error($conn));
        $rCek = mysql_fetch_assoc($qcekPost);
        if ($rCek['posting'] != 0) {
            exit("Error:Nospb Sudah Posting");
        }
        //$kodeOrg=substr($id,8,6);
        //echo"warning:".$periode."___".$periodeB;exit();
        if ($periode != $periodeB) {
            echo "warning:Tanggal dan Periode tidak sama";
            exit;
        }
        if (!isset($_POST['statusCek']) or $_POST['statusCek'] == 0) {
            $where = " tipe='BLOK' and kodeorganisasi in (select distinct kodeorg from " . $dbname . ".setup_blok where left(kodeorg,6)='" . $kdOrg . "' and luasareaproduktif!=0)";
            //echo"warning:".$where;exit();
<?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 = checkPostGet('proses', '');
$kdorg = checkPostGet('kdorg', '');
$per1 = checkPostGet('per1', '');
$per2 = checkPostGet('per2', '');
$kom = checkPostGet('kom', '');
$tipekar = checkPostGet('tipekar', '');
$optNmKomponen = makeOption($dbname, 'sdm_ho_component', 'id,name');
$optnmjab = makeOption($dbname, 'sdm_5jabatan', 'kodejabatan,namajabatan');
$opttipekar = makeOption($dbname, 'sdm_5tipekaryawan', 'id,tipe');
$komponen = "";
if ($kom != '') {
    $komponen = " and idkomponen='" . $kom . "' ";
}
$sorttk = "";
if ($tipekar != '') {
    $sorttk = " and tipekaryawan='" . $tipekar . "'";
} else {
    $sorttk = " and tipekaryawan between '1' and '6' ";
}
#bentuk komponen
/*$noKom=$counterKar=$counterGaji="";
$iKom="select distinct idkomponen from ".$dbname.".sdm_gaji where kodeorg='".$kdorg."' "
        . " ".$komponen." ";
$nKom=mysql_query($iKom) or die (mysql_error($conn));
while($dKom=mysql_fetch_assoc($nKom))
<?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 = checkPostGet('proses', '');
$kdPbrk = checkPostGet('kdPbrk', '');
$statBuah = checkPostGet('statBuah', '');
$tglAkhir = tanggalsystem(checkPostGet('tglAkhir', ''));
$tglAwal = tanggalsystem(checkPostGet('tglAwal', ''));
$suppId = checkPostGet('suppId', '');
$kdOrg = checkPostGet('kdOrg', '');
$intextId = checkPostGet('intextId', '');
$BuahStat = checkPostGet('BuahStat', '');
$j = 0;
$sFr = "select * from " . $dbname . ".pabrik_5fraksi2 order by kode asc";
$qFr = mysql_query($sFr) or die(mysql_error());
$rNm = mysql_num_rows($qFr);
while ($rFraksi = mysql_fetch_assoc($qFr)) {
    if ($_SESSION['language'] == 'EN') {
        $zz = $rFraksi['keterangan1'];
    } else {
        $zz = $rFraksi['keterangan'];
    }
    $kodeFraksi[] = $rFraksi['kode'];
    $nmKeterangan[$rFraksi['kode']] = $zz;
}
// PT
$optPT = makeOption($dbname, 'organisasi', 'kodeorganisasi,induk', "tipe='PABRIK'");
Exemplo n.º 12
0
<?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';
$proses = checkPostGet('proses', '');
$kodeOrg = checkPostGet('kdUnit', '');
$periode = checkPostGet('periode', '');
$intiplasma = checkPostGet('intiplasma', '');
$thnBudget = '';
$optNm = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi');
$where = " kodeunit='" . $kodeOrg . "' and tahunbudget='" . $thnBudget . "'";
$arrBln = array("1" => "Jan", "2" => "Feb", "3" => "Mar", "4" => "Apr", "5" => "Mei", "6" => "Jun", "7" => "Jul", "8" => "Aug", "9" => "Sep", "10" => "Okt", "11" => "Nov", "12" => "Des");
if ($_SESSION['language'] == 'EN') {
    $zz = "namakegiatan1";
} else {
    $zz = "namakegiatan1";
}
$optNmkeg = makeOption($dbname, 'setup_kegiatan', 'kodekegiatan,' . $zz);
$optSatkeg = makeOption($dbname, 'setup_kegiatan', 'kodekegiatan,satuan');
if ($kodeOrg == '' || $periode == '') {
    exit("Error: All field required");
}
$bln = explode("-", $periode);
$blnLalu = intval($bln[1]);
if ($blnLalu == 1) {
    $blnLalu = 12;
    $thnLalu = intval($bln[0]) - 1;
<?php

session_start();
require_once 'master_validation.php';
require_once 'config/connection.php';
include_once 'lib/nangkoelib.php';
include_once 'lib/zLib.php';
$proses = $_POST['proses'];
$pbrkId = $_POST['pbrkId'];
$statId = $_POST['statId'];
$msnId = checkPostGet('msnId', '');
$periode = $_POST['periode'];
$kdBrg = checkPostGet('kdBrg', '');
$optNmMsn = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi');
switch ($proses) {
    case 'getData':
        if ($periode == '0') {
            $sql = "select a.*,b.* from " . $dbname . ".pabrik_rawatmesinht a left join " . $dbname . ".pabrik_rawatmesindt b on a.notransaksi=b.notransaksi \r\n                where a.pabrik='" . $pbrkId . "' and a.statasiun='" . $statId . "'  order by a.tanggal asc";
            //echo"warning:".$sql;
        } elseif ($periode != '0') {
            $sql = "select a.*,b.* from " . $dbname . ".pabrik_rawatmesinht a left join " . $dbname . ".pabrik_rawatmesindt b on a.notransaksi=b.notransaksi \r\n                where a.pabrik='" . $pbrkId . "' and a.statasiun='" . $statId . "' and tanggal like '%" . $periode . "%' order by a.tanggal asc";
        }
        $query = mysql_query($sql) or die(mysql_error());
        echo "<div style=\"width:100%; height:300px; overflow:scroll;\">";
        echo "<table cellspacing=1 border=0 width=1500px>\r\n                <thead><tr class=rowheader>\r\n                        <td>No</td>\r\n                        <td>" . $_SESSION['lang']['notransaksi'] . "</td>\r\n                        <td>" . $_SESSION['lang']['tanggal'] . "</td>\r\n                        <td>" . $_SESSION['lang']['kegiatan'] . "</td>\r\n                        <td>" . $_SESSION['lang']['jammulai'] . "</td>\r\n                        <td>" . $_SESSION['lang']['jamselesai'] . "</td>\r\n                        <td>" . $_SESSION['lang']['mesin'] . "</td>\r\n                        <td>" . $_SESSION['lang']['nmmesin'] . "</td>\r\n                        <td>" . $_SESSION['lang']['kodebarang'] . "</td>\r\n                        <td>" . $_SESSION['lang']['namabarang'] . "</td>\r\n                        <td>" . $_SESSION['lang']['satuan'] . "</td>\r\n                        <td>" . $_SESSION['lang']['jumlah'] . "</td>\r\n                        <td>" . $_SESSION['lang']['keterangan'] . "</td></tr></thead><tbody>";
        while ($res = mysql_fetch_assoc($query)) {
            $sBrg = "select namabarang,kodebarang from " . $dbname . ".log_5masterbarang where kodebarang='" . $res['kodebarang'] . "'";
            $qBrg = mysql_query($sBrg) or die(mysql_error());
            $rBrg = mysql_fetch_assoc($qBrg);
            $no += 1;
            echo "<tr class=rowcontent>\r\n                        <td>" . $no . "</td>\r\n                        <td>" . $res['notransaksi'] . "</td>\r\n                        <td>" . tanggalnormal($res['tanggal']) . "</td>\r\n                        <td>" . $res['kegiatan'] . "</td>\r\n                        <td>" . tanggalnormald($res['jammulai']) . "</td>\r\n                        <td>" . tanggalnormald($res['jamselesai']) . "</td>\r\n                        <td>" . $res['mesin'] . "</td>\r\n                        <td>" . $optNmMsn[$res['mesin']] . "</td>\r\n                        <td>" . $res['kodebarang'] . "</td>\r\n                        <td>" . $rBrg['namabarang'] . "</td>\r\n                        <td>" . $res['satuan'] . "</td>\r\n                        <td>" . $res['jumlah'] . "</td>\r\n                        <td>" . $res['keterangan'] . "</td>\r\n                        </tr>";
Exemplo n.º 14
0
<?php

session_start();
include_once 'lib/nangkoelib.php';
include_once 'lib/zLib.php';
include_once 'config/connection.php';
$proses = checkPostGet('proses', '');
$id = checkPostGet('absnId', '');
$kdOrg = checkPostGet('kdOrg', '');
$tgl = tanggalsystem(checkPostGet('tgl', ''));
$arrTipeLembur = array($_SESSION['lang']['haribiasa'], $_SESSION['lang']['hariminggu'], $_SESSION['lang']['harilibur'], $_SESSION['lang']['hariraya']);
switch ($proses) {
    case 'createTable':
        $table .= "<table id='ppDetailTable'>";
        # Header
        $table .= "<thead>";
        $table .= "<tr>";
        $table .= "<td>" . $_SESSION['lang']['namakaryawan'] . "</td>";
        $table .= "<td>" . $_SESSION['lang']['tipelembur'] . "</td>";
        $table .= "<td>" . $_SESSION['lang']['jamaktual'] . "</td>";
        $table .= "<td>" . $_SESSION['lang']['uangmakan'] . "</td>";
        $table .= "<td>" . $_SESSION['lang']['penggantiantransport'] . "</td>";
        $table .= "<td>" . $_SESSION['lang']['uangkelebihanjam'] . "</td>";
        $table .= "<td>Action</td>";
        $table .= "</tr>";
        $table .= "</thead>";
        # Data
        $table .= "<tbody id='detailBody'>";
        $idAbn = explode("###", $id);
        $sTpLmbr2 = "select tipelembur from " . $dbname . ".sdm_5lembur where kodeorg='" . substr($idAbn[0], 0, 4) . "'";
        //echo"warning:".$sTpLmbr2;
Exemplo n.º 15
0
require_once 'lib/zLib.php';
require_once 'lib/fpdf.php';
require_once 'lib/terbilang.php';
$proses = checkPostGet('proses', '');
$lksiTgs = $_SESSION['empl']['lokasitugas'];
$kdeOrg = checkPostGet('kdeOrg', '');
$kdOrg = checkPostGet('kdOrg', '');
$tgl1 = tanggalsystem(checkPostGet('tgl1', ''));
$tgl2 = tanggalsystem(checkPostGet('tgl2', ''));
$tgl_1 = tanggalsystem(checkPostGet('tgl_1', ''));
$tgl_2 = tanggalsystem(checkPostGet('tgl_2', ''));
$periode = checkPostGet('periode', '');
$kdUnit = checkPostGet('kdUnit', '');
$pilihan = checkPostGet('pilihan', '');
$pilihan2 = checkPostGet('pilihan2', '');
$pilihan3 = checkPostGet('pilihan3', '');
$periodeGaji = $periode;
$periode = explode('-', $periode);
$total = 0;
if (!$kdOrg) {
    $kdOrg = $_SESSION['empl']['lokasitugas'];
}
function dates_inbetween($date1, $date2)
{
    $day = 60 * 60 * 24;
    $date1 = strtotime($date1);
    $date2 = strtotime($date2);
    $days_diff = round(($date2 - $date1) / $day);
    // Unix time difference devided by 1 day to get total days in between
    $dates_array = array();
    $dates_array[] = date('Y-m-d', $date1);
<?php

//@Copy nangkoelframework
require_once 'master_validation.php';
require_once 'config/connection.php';
include_once 'lib/nangkoelib.php';
$periode = checkPostGet('periode', '');
$tampil = checkPostGet('tampil', '');
$pabrik = checkPostGet('pabrik', '');
if ($pabrik == $_SESSION['lang']['all']) {
    $str = "select tanggal,sum(tbsdiolah) as tbsdiolah,sum(sisahariini) as sisahariini,sum(oer) as oer,sum(oerpk) as oerpk,\r\n          sum(tbsmasuk) as tbsmasuk,sum(sisatbskemarin) as sisatbskemarin, kodeorg\r\n          from " . $dbname . ".pabrik_produksi where tanggal like '" . $periode . "%' and kodeorg like '%%'\r\n          group by tanggal order by tanggal asc";
} else {
    $str = "select * from " . $dbname . ".pabrik_produksi where tanggal like '" . $periode . "%' and kodeorg='" . $pabrik . "'\r\n      order by tanggal asc";
}
//echo $str;
$res2 = mysql_query($str);
$res = mysql_query($str);
while ($datArr = mysql_fetch_assoc($res2)) {
    $tbs[$datArr['kodeorg']][$datArr['tanggal']] = $datArr['tbsdiolah'];
    $jmOer[$datArr['kodeorg']][$datArr['tanggal']] = $datArr['oer'];
    $jmOerPk[$datArr['kodeorg']][$datArr['tanggal']] = $datArr['oerpk'];
}
#jam start
#jam end
/*$sStart="select distinct tanggal,jammulai,jamselesai from ".$dbname.".pabrik_pengolahan 
           where kodeorg='".$pabrik."' and tanggal like '".$periode."%' and shift=1 order by tanggal asc";
  $qStart=mysql_query($sStart) or die(mysql_error($conn));
  while($rStart=  mysql_fetch_assoc($qStart)){
      $jmStart[$rStart['tanggal']]=$rStart['jammulai'];
      $jmEnd[$rStart['tanggal']]=$rStart['jamselesai'];
  }*/
Exemplo n.º 17
0
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', '');
$lksiTgs = $_SESSION['empl']['lokasitugas'];
$kdOrg = checkPostGet('kdeOrg', '');
//$tgl1=tanggalsystem(checkPostGet('tgl1',''));
//$tgl2=tanggalsystem(checkPostGet('tgl2',''));
$tgl_1 = tanggalsystemn(checkPostGet('tgl_1', ''));
$tgl_2 = tanggalsystemn(checkPostGet('tgl_2', ''));
$periodeGaji = checkPostGet('period', '');
$periode = explode('-', checkPostGet('periode', '-'));
$idKry = checkPostGet('idKry', '');
$a = "select tanggalmulai,tanggalsampai from " . $dbname . ".sdm_5periodegaji where kodeorg='" . $lksiTgs . "' and periode='" . $periodeGaji . "'";
$b = mysql_query($a) or die(mysql_error($conn));
$c = mysql_fetch_assoc($b);
$tgl_1 = $c['tanggalmulai'];
$tgl_2 = $c['tanggalsampai'];
function dates_inbetween($date1, $date2)
{
    $day = 60 * 60 * 24;
    $date1 = strtotime($date1);
    $date2 = strtotime($date2);
    $days_diff = round(($date2 - $date1) / $day);
    // Unix time difference devided by 1 day to get total days in between
    $dates_array = array();
    $dates_array[] = date('Y-m-d', $date1);
    for ($x = 1; $x < $days_diff; $x++) {
Exemplo n.º 18
0
<?php

session_start();
require_once 'master_validation.php';
require_once 'config/connection.php';
include_once 'lib/nangkoelib.php';
include_once 'lib/zLib.php';
include_once 'lib/fpdf.php';
$proses = checkPostGet('proses', '');
$kodeorg = checkPostGet('kodeorg', '');
$kodetangki = checkPostGet('kodetangki', '');
$tinggi = checkPostGet('tinggi', '0');
$volume = checkPostGet('volume', '0');
$beda = checkPostGet('beda', '0');
switch ($proses) {
    case 'insert':
        if ($kodeorg == '' || $kodetangki == '' || $tinggi == '' || $volume == '' || $beda == '') {
            echo 'Gagal : Semua field harus diisi.';
        } else {
            $strCount = "select * from " . $dbname . ".pabrik_5tinggitangki where " . "millcode='" . $kodeorg . "' and kodetangki='" . $kodetangki . "' and tinggi='" . $tinggi . "'";
            $qryCount = mysql_query($strCount) or die(mysql_error());
            $numRows = mysql_num_rows($qryCount);
            if ($numRows >= 1) {
                echo "Gagal : Item ini sudah ada didatabase.";
            } else {
                $str = "insert into " . $dbname . ".pabrik_5tinggitangki(millcode,kodetangki,tinggi,volume,beda,updateby) values ('" . $kodeorg . "','" . $kodetangki . "','" . $tinggi . "','" . $volume . "','" . $beda . "','" . $_SESSION['standard']['userid'] . "')";
                if (mysql_query($str)) {
                    loadData();
                } else {
                    echo "DB Error : " . mysql_error($conn);
                }
Exemplo n.º 19
0
require_once 'master_validation.php';
require_once 'config/connection.php';
require_once 'lib/nangkoelib.php';
//require_once('lib/zFunction.php');
require_once 'lib/fpdf.php';
include_once 'lib/zMysql.php';
/*echo "<pre>";
print_r($_GET);
echo "</pre>";
*/
$pabrik = $_GET['pabrik'];
$statId = $_GET['statId'];
$periode = substr($_GET['periode'], 0, 7);
$kdBrg = checkPostGet('kdBrg', '');
$msnId = checkPostGet('msnId', '');
//=============
//create Header
class PDF extends FPDF
{
    function Header()
    {
        global $conn;
        global $dbname;
        global $userid;
        global $pabrik;
        global $statId;
        global $periode;
        global $kdBrg;
        global $msnId;
        $str1 = "select * from " . $dbname . ".organisasi where induk='MHO' and tipe='PT'";
Exemplo n.º 20
0
<?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 = checkPostGet('proses', '');
$kdKbn = checkPostGet('kdKbn', '');
$klpmkVhc = checkPostGet('klpmkVhc', '');
if ($_SESSION['language'] == 'EN') {
    $arrKlmpk = array("KD" => "Vehicle", "MS" => "Machinery", "AB" => "Heavy Equipment");
} else {
    $arrKlmpk = array("KD" => "Kendaraan", "MS" => "Mesin", "AB" => "Alat Berat");
}
switch ($proses) {
    case 'preview':
        echo "<table class=sortable cellspacing=1 border=0>\r\n\t<thead>\r\n \t\t<tr class=rowheader>\r\n\t\t  <td>No</td>\r\n\t\t   <td align=center>" . $_SESSION['lang']['kodeorganisasi'] . "</td>\t\t \r\n\t\t   <td align=center>" . str_replace(" ", "<br>", $_SESSION['lang']['jenkendabmes']) . "</td>\r\n\t\t   <td align=center>" . $_SESSION['lang']['kodenopol'] . "</td>\t\t\r\n           <td align=center>" . $_SESSION['lang']['namabarang'] . "</td>\t\t\r\n\t\t   <td align=center>" . $_SESSION['lang']['tahunperolehan'] . "</td>\r\n\t\t   <td align=center>" . $_SESSION['lang']['noakun'] . "</td>\r\n\t\t   <td align=center>" . $_SESSION['lang']['beratkosong'] . "</td>\r\n\t\t   <td align=center>" . $_SESSION['lang']['nomorrangka'] . "</td>\r\n\t\t   <td align=center>" . $_SESSION['lang']['nomormesin'] . "</td>\r\n\t\t   <td align=center>" . $_SESSION['lang']['detail'] . "</td>\t   \r\n\t\t   <td align=center>" . $_SESSION['lang']['kepemilikan'] . "</td>\r\n\t\t  </tr>\r\n\t\t   </thead><tbody>\r\n\t";
        if ($kdKbn != '0' && $klpmkVhc != '0') {
            $sql = "select * from " . $dbname . ".vhc_5master where kodeorg='" . $kdKbn . "' and kelompokvhc='" . $klpmkVhc . "' order by kodeorg,kodevhc";
        } elseif ($kdKbn != '0' && $klpmkVhc == '0') {
            $sql = "select * from " . $dbname . ".vhc_5master where kodeorg='" . $kdKbn . "' order by kodeorg,kodevhc";
        } elseif ($kdKbn == '0' && $klpmkVhc != '0') {
            $sql = "select * from " . $dbname . ".vhc_5master where kelompokvhc='" . $klpmkVhc . "' order by kodeorg,kodevhc";
        } elseif ($kdKbn == '0' && $klpmkVhc == '0') {
            $sql = "select * from " . $dbname . ".vhc_5master order by kodeorg,kodevhc";
        }
        //echo "warning".$sql;
        $query = mysql_query($sql) or die(mysql_error());
        $row = mysql_num_rows($query);
        if ($row > 0) {
<?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 = checkPostGet('proses', '');
$tipeIntex = checkPostGet('tipeIntexRe', '');
$unit = checkPostGet('unitRe', '');
$tgl_1 = checkPostGet('tglRe', '');
$tanggl = checkPostGet('tglRe', '');
$kdPabrik = checkPostGet('kdPabrikRe', '');
$optSupp = makeOption($dbname, 'log_5supplier', 'kodetimbangan,namasupplier');
$optNm = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi');
$XA = tanggalsystem($tanggl);
$thnA = substr($XA, 0, 4);
$blnA = substr($XA, 4, 2);
$tglA = substr($XA, 6, 2);
if ($proses != 'getKodeorg') {
    //for($x=$tglA-1;$x>=0;$x--){
    //    $tm=mktime(0,0,0,$blnA,$tglA-$x,$thnA);
    //    $TGL[]=date('Y-m-d',$tm);
    //    if($x==$tglA-1)
    //      $listTGL="'".date('Y-m-d',$tm)."'";
    //    else
    //      $listTGL.=",'".date('Y-m-d',$tm)."'";
    //}
    for ($x = 7; $x >= 0; $x--) {
        $tm = mktime(0, 0, 0, $blnA, $tglA - $x, $thnA);
        $TGL[] = date('Y-m-d', $tm);
Exemplo n.º 22
0
$kdBudget = checkPostGet('kdBudget', '');
$kdBrg = checkPostGet('kdBrg', '');
$jmlhBrg = checkPostGet('jmlhBrg', '');
$satuanBrg = checkPostGet('satuanBrg', '');
$totHarga = checkPostGet('totHarga', '');
$optNmBrg = makeOption($dbname, 'log_5masterbarang', 'kodebarang,namabarang');
$optNm = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi');
$optNm = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi');
$optNmAkun = makeOption($dbname, 'keu_5akun', 'noakun,namaakun');
$kdBudgetB = checkPostGet('kdBudgetB', '');
$noAkun = checkPostGet('noAkun', '');
$totBiayaB = checkPostGet('totBiayaB', '');
$kdBudgetS = checkPostGet('kdBudgetS', '');
$kdWorkshop = checkPostGet('kdWorkshop', '');
$jmlhJam = checkPostGet('jmlhJam', '');
$totHargaJam = checkPostGet('totHargaJam', '');
$where2 = " kodeorg like '%" . $_SESSION['empl']['lokasitugas'] . "%' and tipebudget='TRK' and tahunbudget='" . $thnBudget . "'";
////param+='&kdBudget='+kdBudget+'&kdBrg='+kdBrg+'&jmlhBrg='+jmlhBrg+'&proses=getHarga';
switch ($proses) {
    case 'getVhc':
        $optVhc = "<option value=''>" . $_SESSION['lang']['pilihdata'] . "</option>";
        $sVhc = "select distinct kodevhc from " . $dbname . ".vhc_5master where kodetraksi='" . $kdTraksi . "'";
        // exit ("Error".$sVhc);
        $qVhc = mysql_query($sVhc) or die(mysql_error($conn));
        while ($rVhc = mysql_fetch_assoc($qVhc)) {
            if ($kdVhc != '') {
                $optVhc .= "<option value='" . $rVhc['kodevhc'] . "' " . ($kdVhc == $rVhc['kodevhc'] ? 'selected' : '') . ">" . $rVhc['kodevhc'] . "</option>";
            } else {
                $optVhc .= "<option value='" . $rVhc['kodevhc'] . "'>" . $rVhc['kodevhc'] . "</option>";
            }
        }
<?php

require_once 'master_validation.php';
require_once 'config/connection.php';
require_once 'lib/nangkoelib.php';
$notransaksi = checkPostGet('notransaksi', '');
$tanggal = tanggalsystem(checkPostGet('tanggal', ''));
$jenisby = checkPostGet('jenisby', '');
$jumlahhrd = checkPostGet('jumlahhrd', '');
$method = checkPostGet('method', '');
$jumlah = checkPostGet('jumlah', '');
if ($jumlahhrd == '') {
    $jumlahhrd = 0;
}
if ($method == 'update') {
    $str = "update " . $dbname . ".sdm_pjdinasdt\r\n\t       set jumlahhrd=" . $jumlahhrd . "\r\n\t      where jenisbiaya=" . $jenisby . " and notransaksi='" . $notransaksi . "'\r\n\t\t  and tanggal=" . $tanggal . " and jumlah='" . $jumlah . "'";
    //echo "Error:".$str;
    if (mysql_query($str)) {
    } else {
        echo " Gagal:" . addslashes(mysql_error($conn));
        exit(0);
    }
}
if ($method == 'finish') {
    $str = "update " . $dbname . ".sdm_pjdinasht\r\n\t       set statuspertanggungjawaban=1\r\n\t      where  notransaksi='" . $notransaksi . "'";
    if (mysql_query($str)) {
    } else {
        echo " Gagal:" . addslashes(mysql_error($conn));
        exit(0);
    }
}
Exemplo n.º 24
0
<?php

require_once 'master_validation.php';
require_once 'config/connection.php';
require_once 'lib/nangkoelib.php';
$kodeorg = checkPostGet('kodeorg', '');
$notph = checkPostGet('notph', '');
$keterangan = checkPostGet('keterangan', '');
switch ($_POST['aksi']) {
    case 'save':
        $str = "insert into " . $dbname . ".kebun_5tph(kode,kodeorg,keterangan) values('" . $notph . "','" . $kodeorg . "','" . $keterangan . "')";
        if (mysql_query($str)) {
        } else {
            echo " Error:" . addslashes(mysql_error($conn));
        }
        break;
    case 'edit':
        $str = "update " . $dbname . ".kebun_5tph set keterangan='" . $keterangan . "' where kodeorg='" . $kodeorg . "'\r\n               and kode='" . $notph . "'";
        if (mysql_query($str)) {
        } else {
            echo " Error:" . addslashes(mysql_error($conn));
        }
        break;
    case 'del':
        $str = "delete from " . $dbname . ".kebun_5tph  where kodeorg='" . $kodeorg . "'\r\n               and kode='" . $notph . "'";
        if (mysql_query($str)) {
        } else {
            echo " Error:" . addslashes(mysql_error($conn));
        }
        break;
    case 'list':
<?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';
$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='')";
Exemplo n.º 26
0
<?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 = checkPostGet('proses', '');
$kdOrg = checkPostGet('kdOrg', '');
$per = checkPostGet('per', '');
function dates_inbetween($date1, $date2)
{
    $day = 60 * 60 * 24;
    $date1 = strtotime($date1);
    $date2 = strtotime($date2);
    $days_diff = round(($date2 - $date1) / $day);
    // Unix time difference devided by 1 day to get total days in between
    $dates_array = array();
    $dates_array[] = date('Y-m-d', $date1);
    for ($x = 1; $x < $days_diff; $x++) {
        $dates_array[] = date('Y-m-d', $date1 + $day * $x);
    }
    $dates_array[] = date('Y-m-d', $date2);
    if ($date1 == $date2) {
        $dates_array = array();
        $dates_array[] = date('Y-m-d', $date1);
    }
    return $dates_array;
}
$iTgl = "select * from " . $dbname . ".setup_periodeakuntansi where periode='" . $per . "' and kodeorg='" . $kdOrg . "' ";
$nTgl = mysql_query($iTgl) or die(mysql_error($conn));
$dTgl = mysql_fetch_assoc($nTgl);
Exemplo n.º 27
0
require_once 'master_validation.php';
require_once 'config/connection.php';
require_once 'lib/nangkoelib.php';
$periode = checkPostGet('periode', '');
$kodeorg = substr($_SESSION['empl']['lokasitugas'], 0, 4);
$karyawanid = checkPostGet('karyawanid', '');
$pt = checkPostGet('pt', '');
$notransaksi = checkPostGet('notransaksi', '');
$keterangan = checkPostGet('keterangan', '');
$bytransport = checkPostGet('bytransport', '');
$byperawatan = checkPostGet('byperawatan', '');
$bytoll = checkPostGet('bytoll', '');
$bylain = checkPostGet('bylain', '');
$total = checkPostGet('total', '');
$method = checkPostGet('method', '');
$userid = $_SESSION['standard']['userid'];
if ($method == 'delete') {
    $str = "delete from " . $dbname . ".sdm_penggantiantransport where notransaksi='" . $notransaksi . "'";
} else {
    if ($method == 'insert') {
        $str = "insert into " . $dbname . ".sdm_penggantiantransport \r\n\t      (`notransaksi`,`karyawanid`,`periode`,\r\n\t\t  `keterangan`,`toll`,`trans`,\r\n\t\t  `perawatan`,`kodeorg`,`alokasi`,\r\n\t\t  `updateby`,`bylain`,`totalklaim`)\r\n\t\t  values(\r\n\t\t   '" . $notransaksi . "'," . $karyawanid . ",'" . $periode . "',\r\n\t\t   '" . $keterangan . "'," . $bytoll . "," . $bytransport . ",\r\n\t\t   " . $byperawatan . ",'" . $kodeorg . "','" . $pt . "',\r\n\t\t   " . $userid . "," . $bylain . "," . $total . "\r\n\t\t  )";
    } else {
        if ($method == 'update') {
            $str = "update " . $dbname . ".sdm_penggantiantransport\r\n\t      set \r\n\t\t  `karyawanid`=" . $karyawanid . ",\r\n\t\t  `periode`='" . $periode . "',\r\n\t\t  `keterangan`='" . $keterangan . "',\r\n\t\t  `toll`=" . $bytoll . ",\r\n\t\t  `trans`=" . $bytransport . ",\r\n\t\t  `perawatan`=" . $byperawatan . ",\r\n\t\t  `kodeorg`='" . $kodeorg . "',\r\n\t\t  `alokasi`='" . $pt . "',\r\n\t\t  `updateby`=" . $userid . ",\r\n\t\t  `bylain`=" . $bylain . ",\r\n\t\t  `totalklaim`=" . $total . "\r\n\t\t  where notransaksi='" . $notransaksi . "'";
        } else {
            $str = "select 1=1";
        }
    }
}
if (mysql_query($str)) {
require_once 'master_validation.php';
require_once 'config/connection.php';
require_once 'lib/nangkoelib.php';
$jenistraining = checkPostGet('jenistraining', '');
$judultraining = checkPostGet('judultraining', '');
$penyelenggara = checkPostGet('penyelenggara', '');
$tanggalmulai = checkPostGet('tanggalmulai', '');
$tanggalselesai = checkPostGet('tanggalselesai', '');
// $trainingblnmulai=checkPostGet('trainingblnmulai','');
// $trainingthnmulai=checkPostGet('trainingthnmulai','');
// $trainingblnselesai=checkPostGet('trainingblnselesai','');
// $trainingthnselesai=checkPostGet('trainingthnselesai','');
$sertifikat = checkPostGet('sertifikat', '');
$biaya = checkPostGet('biaya', '');
$karyawanid = checkPostGet('karyawanid', '');
$nomor = checkPostGet('nomor', '');
if (isset($nilai) and $nilai == '') {
    $nilai = 0;
}
if (isset($_POST['del']) or $tanggalmulai != '' and $tanggalselesai != '' or isset($_POST['queryonly'])) {
    if (isset($_POST['del']) and $_POST['del'] == 'true') {
        $str = "delete from " . $dbname . ".sdm_karyawantraining where nomor=" . $nomor;
    } else {
        if (isset($_POST['queryonly'])) {
            $str = "select 1=1";
        } else {
            // $trainingblnmulai=$trainingblnmulai."-".$trainingthnmulai;
            // $trainingblnselesai=$trainingblnselesai."-".$trainingthnselesai;
            $str = "insert into " . $dbname . ".sdm_karyawantraining\r\n\t     (\t`karyawanid`,\r\n\t\t\t`jenistraining`,\r\n\t\t\t`tanggalmulai`,\r\n\t\t\t`tanggalselesai`,\r\n\t\t\t`judultraining`,\r\n\t\t\t`penyelenggara`,\r\n\t\t\t`sertifikat`,\r\n                        `biaya`\r\n\t\t  )\r\n\t\t  values(" . $karyawanid . ",\r\n\t\t  '" . $jenistraining . "',\r\n\t\t  '" . tanggalsystem($tanggalmulai) . "',\r\n\t\t  '" . tanggalsystem($tanggalselesai) . "',\r\n\t\t  '" . $judultraining . "',\r\n\t\t  '" . $penyelenggara . "',\r\n\t\t  " . $sertifikat . ",\r\n                  " . $biaya . "\r\n\t\t  )";
        }
    }
Exemplo n.º 29
0
$optNm = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi');
$tglSkrng = date('Y-m-d');
$thnSkrng = date('Y');
$total = 0;
switch ($proses) {
    case 'preview':
        if ($kdUnit == '') {
            exit("Error: Unit code required");
        }
        break;
    default:
        break;
}
$pt1 = checkPostGet('pt1', '');
$kebun1 = checkPostGet('kebun1', '');
$tanggal1 = checkPostGet('tanggal1', '');
if ($kebun1 == 'all') {
    $kebun1 = 'Seluruhnya';
}
if ($proses == 'excel1') {
    $hider = $_SESSION['lang']['laporanStockBIbit'] . "<br>PT: " . $pt1 . "<br>" . $_SESSION['lang']['kebun'] . ": " . $kebun1 . "<br>" . $_SESSION['lang']['sampai'] . ": " . $tanggal1;
    $bgcoloz = "bgcolor=#dedede";
    $boder = 1;
} else {
    $hider = "";
    $bgcoloz = "";
    $boder = 0;
}
if ($kebun1 == 'Seluruhnya') {
    $kebun1 = '';
}
Exemplo n.º 30
0
<?php

require_once 'master_validation.php';
include 'lib/nangkoelib.php';
include_once 'lib/zLib.php';
$afdeling = checkPostGet('afdeling', '');
$str = "select t1.kodeorg as kodeorganisasi, t1.kodeorg as namaorganisasi from " . $dbname . ".setup_blok t1, " . $dbname . ".organisasi t2\r\n\t where t1.kodeorg=t2.kodeorganisasi and t2.tipe='BLOK' and t2.induk='" . $afdeling . "' and t1.intiplasma='P' \r\n\t order by t1.kodeorg ASC";
$res = mysql_query($str);
while ($bar = mysql_fetch_object($res)) {
    echo "kodeblok.options[kodeblok.options.length] = new Option('" . $bar->kodeorganisasi . "','" . $bar->namaorganisasi . "');";
}