Пример #1
0
 function Header()
 {
     global $conn;
     global $dbname;
     global $userid;
     global $kdOrg;
     global $tgl;
     global $akhirY;
     global $akhirYline;
     $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;
     }
     $sIsi = "select * from " . $dbname . ".sdm_absensiht where kodeorg='" . $kdOrg . "' and tanggal='" . tanggalsystem($tgl) . "'";
     $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, $nama, '', 1, 'L');
     $this->SetFont('Arial', '', 8);
     $akhirY = $this->GetY() - 5;
     $this->Line(10, $akhirY, 200, $akhirY);
     $akhirYline = $this->GetY();
     $this->SetY($akhirYline);
     $this->Cell(35, 5, $_SESSION['lang']['kodeorg'], '', 0, 'L');
     $this->Cell(2, 5, ':', '', 0, 'L');
     $this->Cell(75, 5, $rIsi['kodeorg'], '', 0, 'L');
     $this->Cell(25, 5, $_SESSION['lang']['nm_perusahaan'], '', 0, 'L');
     $this->Cell(2, 5, ':', '', 0, 'L');
     $this->Cell(35, 5, $rOrg['namaorganisasi'], 0, 1, 'L');
     $this->Cell(35, 5, $_SESSION['lang']['tanggal'], '', 0, 'L');
     $this->Cell(2, 5, ':', '', 0, 'L');
     $this->Cell(75, 5, $tgl, '', 0, 'L');
     $this->Cell(25, 5, $_SESSION['lang']['periode'], '', 0, 'L');
     $this->Cell(2, 5, ':', '', 0, 'L');
     $this->Cell(35, 5, substr(tanggalnormal($rIsi['periode']), 1, 7), 0, 1, 'L');
     $this->Ln();
 }
Пример #2
0
 /**
  * genNoJournal
  * Generate Nomor Jurnal
  */
 public function genNoJournal($tanggal, $kodeUnit, $kodeJurnal, $counter)
 {
     if (substr($tanggal, 2, 1) == '-') {
         $tanggal = tanggalsystem($tanggal);
     } elseif (substr($tanggal, 4, 1) == '-') {
         $tanggal = str_replace('-', '', $tanggal);
     }
     $nojurnal = $tanggal . '/' . $kodeUnit . '/' . $kodeJurnal . '/' . str_pad($counter + 1, 3, '0', STR_PAD_LEFT);
     return $nojurnal;
 }
Пример #3
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';
$lksiTgs = $_SESSION['empl']['lokasitugas'];
$_POST['unitId'] == '' ? $kdOrg = $_GET['unitId'] : ($kdOrg = $_POST['unitId']);
$_POST['tglDari'] == '' ? $tglDari = tanggalsystem($_GET['tglDari']) : ($tglDari = tanggalsystem($_POST['tglDari']));
$_POST['tglSmp'] == '' ? $tglSmp = tanggalsystem($_GET['tglSmp']) : ($tglSmp = tanggalsystem($_POST['tglSmp']));
$_GET['proses'] == '' ? $proses = $_POST['proses'] : ($proses = $_GET['proses']);
$optNmKar = makeOption($dbname, 'datakaryawan', 'karyawanid,namakaryawan');
$optTipeId = makeOption($dbname, 'datakaryawan', 'karyawanid,tipekaryawan');
$optTipe = makeOption($dbname, 'sdm_5tipekaryawan', 'id,tipe');
if ($kdOrg == '') {
    exit("Error: Working unit required");
}
if ($tglDari == '' || $tglSmp == '') {
    exit("Error: Date required");
}
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);
Пример #4
0
<?php

require_once 'master_validation.php';
require_once 'config/connection.php';
require_once 'lib/nangkoelib.php';
$totalSmaData = $dsetujui = $dtolak = $dmenungguKptsn = $blmDiajukan = $pros = 0;
//======================================
$proses = isset($_GET['proses']) ? $_GET['proses'] : '';
$nopp = isset($_GET['nopp']) ? $_GET['nopp'] : '';
$tglSdt = isset($_GET['tglSdt']) ? tanggalsystem($_GET['tglSdt']) : '';
$statusPP = isset($_GET['statPP']) ? $_GET['statPP'] : '';
$periode = isset($_GET['periode']) ? $_GET['periode'] : '';
$lokBeli = isset($_GET['lokBeli']) ? $_GET['lokBeli'] : '';
//ambil namapt
$str = "select namaorganisasi from " . $dbname . ".organisasi where kodeorganisasi='" . $_SESSION['org']['kodeorganisasi'] . "'";
$namapt = 'COMPANY NAME';
$res = mysql_query($str);
while ($bar = mysql_fetch_object($res)) {
    $namapt = strtoupper($bar->namaorganisasi);
}
$stream = "<table  cellspacing='1' border='0'>\r\n                                <tr><td colspan=10  align=center>" . strtoupper($_SESSION['lang']['riwayatPP']) . "</td></tr>\r\n                                <tr><td colspan=3  align='left'>" . $_SESSION['lang']['user'] . ":" . $_SESSION['standard']['username'] . "</td></tr>\r\n                                <tr><td colspan=3  align='left'>" . $_SESSION['lang']['tanggal'] . ":" . date('d-m-Y H:i:s') . "</td></tr></table>\r\n                                <table  cellspacing='1' border='1'>\r\n                                <tr>\r\n                                <td bgcolor=#DEDEDE align=center>No.</td>\r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['nopp'] . "</td>\r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['tanggal'] . "</td>\r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['kodevhc'] . "</td>\r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['kodebarang'] . "</td>\r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['namabarang'] . "</td>\r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['satuan'] . "</td>\r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['jmlhDiminta'] . "</td> \r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['jumlah'] . " " . $_SESSION['lang']['disetujui'] . "</td>    \r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['keterangan'] . "</td>    \r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['status'] . "</td>\r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['nopo'] . "</td>\r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['tgl_po'] . "</td>\r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['status'] . " </td>\r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['namasupplier'] . "</td>\r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['rapbNo'] . "</td>\r\n                                <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['tanggal'] . "</td>\r\n                                </tr></table><table  cellspacing='1' border='1'>";
if ($nopp == '' && $tglSdt == '' && $statusPP == '' && $periode == '' && $lokBeli == '' && $_GET['supplier_id'] == '' && $_GET['txNmbrg'] == '') {
    $tglSkrng = date("Y-m");
    $sql = "select a.*,b.*,a.keterangan as keterangan,a.kodevhc as kodevhc FROM " . $dbname . ".log_prapodt a left join " . $dbname . ".log_prapoht b on a.nopp=b.nopp where substr(b.tanggal,1,7)='" . $tglSkrng . "'  order by a.nopp desc ";
} else {
    if ($tglSdt != '') {
        $where = " where b.tanggal='" . $tglSdt . "'";
    } else {
        $where = " where a.nopp!=''";
    }
    if ($statusPP != '') {
<?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);
Пример #6
0
if ($_POST['tanggalpermintaan'] == '') {
    $_POST['tanggalpermintaan'] = '00-00-0000';
}
if ($_POST['tanggalbayar'] == '') {
    $_POST['tanggalbayar'] = '00-00-0000';
}
if ($_POST['tanggalkades'] == '') {
    $_POST['tanggalkades'] = '00-00-0000';
}
if ($_POST['tanggalcamat'] == '') {
    $_POST['tanggalcamat'] = '00-00-0000';
}
$tanggalpermintaan = tanggalsystem($_POST['tanggalpermintaan']);
$tanggalbayar = tanggalsystem($_POST['tanggalbayar']);
$tanggalkades = tanggalsystem($_POST['tanggalkades']);
$tanggalcamat = tanggalsystem($_POST['tanggalcamat']);
$method = $_POST['method'];
if ($method == '') {
    $method = $_GET['method'];
    $idlahan = $_GET['idlahan'];
    $pemilik = $_GET['pemilik'];
}
switch ($method) {
    case 'pdf':
        $str1 = "select padid, nama from " . $dbname . ".pad_5masyarakat";
        $res1 = mysql_query($str1);
        while ($bar1 = mysql_fetch_object($res1)) {
            $kamuspemilik[$bar1->padid] = $bar1->nama;
        }
        class PDF extends FPDF
        {
Пример #7
0
    $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);
    return $dates_array;
}
if ($tgl_1 != '' && $tgl_2 != '') {
    $tgl1 = tanggalsystem($tgl1);
    $tgl22 = tanggalsystem($tgl22);
}
$test = dates_inbetween($tgl1, $tgl22);
$brdr = 0;
$bgclr = "";
if ($proses == 'excel') {
    $bgclr = " bgcolor=#DEDEDE";
    $brdr = 1;
}
$tab .= "<table cellpadding=1 cellspacing=1 border=" . $brdr . " class=sortable><thead>";
$tab .= "<tr>";
$tab .= "<td " . $bgclr . ">" . $_SESSION['lang']['tanggal'] . "</td>";
$tab .= "<td align=center " . $bgclr . ">Kode " . $_SESSION['lang']['station'] . "</td>";
$tab .= "<td align=center " . $bgclr . ">Nama " . $_SESSION['lang']['station'] . "</td>";
$tab .= "<td align=center " . $bgclr . ">Kode " . $_SESSION['lang']['mesin'] . "</td>";
$tab .= "<td align=center " . $bgclr . ">" . $_SESSION['lang']['nmmesin'] . "</td>";
Пример #8
0
    }
}
$pdf = new PDF('P', 'pt', 'A4');
$width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
$height = 9;
$pdf->AddPage();
$pdf->SetFillColor(255, 255, 255);
$pdf->SetFont('Arial', '', 7);
if ($gudang == '') {
    $str = "select a.tanggal,a.tahuntanam,a.unit,a.kodeorg,sum(a.hasilkerja) as jjg,sum(a.hasilkerjakg) as berat,\r\n              sum(a.upahkerja) as upah,sum(a.upahpenalty) as upahpenalty, sum(a.premibasis) as premibasis,\r\n              sum(a.upahpremi) as premi,sum(a.rupiahpenalty) as penalty,count(a.karyawanid) as jumlahhk  \r\n              from " . $dbname . ".kebun_prestasi_vw a\r\n              left join " . $dbname . ".organisasi c on substr(a.kodeorg,1,4)=c.kodeorganisasi\r\n              where c.induk = '" . $pt . "'  and a.tanggal between " . tanggalsystem($tgl1) . " and " . tanggalsystem($tgl2) . " \r\n              and a.jurnal=1 \r\n              group by a.tanggal,a.kodeorg";
} else {
    $where = '';
    if ($gudang != $_SESSION['empl']['lokasitugas']) {
        $where = " and a.jurnal=1";
    }
    $str = "select a.tanggal,a.tahuntanam,a.unit,a.kodeorg,sum(a.hasilkerja) as jjg,sum(a.hasilkerjakg) as berat,\r\n              sum(a.upahkerja) as upah,sum(a.upahpenalty) as upahpenalty, sum(a.premibasis) as premibasis,\r\n              sum(a.upahpremi) as premi,sum(a.rupiahpenalty) as penalty,count(a.karyawanid) as jumlahhk  \r\n              from " . $dbname . ".kebun_prestasi_vw a\r\n              where unit = '" . $gudang . "'  and a.tanggal between " . tanggalsystem($tgl1) . " and " . tanggalsystem($tgl2) . " \r\n              " . $where . " \r\n              group by a.tanggal, a.kodeorg";
}
$res = mysql_query($str);
$no = 0;
$totberat = $totUpah = $totUpahpenalty = $totJjg = $totPremi = $totPremibasis = $totHk = $totPenalty = 0;
while ($bar = mysql_fetch_object($res)) {
    $periode = date('Y-m-d H:i:s');
    $tanggal = $bar->tanggal;
    $kodeorg = $bar->kodeorg;
    $no += 1;
    $pdf->Cell(3 / 100 * $width, $height, $no, 1, 0, 'C', 1);
    $pdf->Cell(8 / 100 * $width, $height, tanggalnormal($tanggal), 1, 0, 'C', 1);
    $pdf->Cell(6 / 100 * $width, $height, substr($kodeorg, 0, 6), 1, 0, 'L', 1);
    $pdf->Cell(10 / 100 * $width, $height, $kodeorg, 1, 0, 'L', 1);
    $pdf->Cell(8 / 100 * $width, $height, $bar->tahuntanam, 1, 0, 'C', 1);
    $pdf->Cell(6 / 100 * $width, $height, number_format($bar->jjg, 0), 1, 0, 'R', 1);
Пример #9
0
 if ($data['hutangunit'] == 1 and ($data['pemilikhutang'] == '' or $data['noakunhutang'] == '')) {
     exit("Error: Silakan melengkapi data hutang.");
 }
 if ($data['hutangunit'] == '') {
     $data['hutangunit'] = 0;
 }
 $where = "notransaksi='" . $data['notransaksi'] . "' and kodeorg='" . $data['kodeorg'] . "' and noakun='" . $data['oldNoakun'] . "' and tipetransaksi='" . $data['tipetransaksi'] . "'";
 $wheredt = "notransaksi='" . $data['notransaksi'] . "' and kodeorg='" . $data['kodeorg'] . "'";
 $datadt['noakun2a'] = $param['noakun'];
 $datadt['matauang'] = $param['matauang'];
 $datadt['kurs'] = $param['kurs'];
 unset($data['notransaksi']);
 unset($data['kodeorg']);
 unset($data['oldNoakun']);
 unset($data['tipetransaksi']);
 $data['tanggal'] = tanggalsystem($data['tanggal']);
 $data['jumlah'] = str_replace(',', '', $data['jumlah']);
 $query = updateQuery($dbname, 'keu_kasbankht', $data, $where);
 $querydt = updateQuery($dbname, 'keu_kasbankdt', $datadt, $wheredt);
 if (!mysql_query($query)) {
     echo "DB Error ht : " . mysql_error();
 } else {
     if (!mysql_query($querydt)) {
         echo "DB Error dt : " . mysql_error();
     } else {
         echo 'Done.';
     }
 }
 // tadinya ga pake else echo Done, tapi kalo ga pake update-annya ga kesimpen. koq bisa ya?
 // tambahan querydt untuk ngupdate noakun2a kasbankdt
 break;
Пример #10
0
$nmBrg = makeOption($dbname, 'log_5masterbarang', 'kodebarang,namabarang');
$satBrg = makeOption($dbname, 'log_5masterbarang', 'kodebarang,satuan');
$stPp = array("0" => "Proses Persetujuan", "1" => "sudah selesai di sisi user", "2" => "PP sudah bisa di PO", "3" => "Ditolak");
$stPo = array("0" => "Belum Selesai", "1" => "sudah selesai dan diajukan", "2" => "sudah dapat di kirim(persetujuan selesai)", "3" => "barang sudah ada yang masuk gudang");
$proses = $_GET['proses'];
$nopp = $_POST['nopp'];
$tgl = tanggalsystem($_POST['tgl']);
$per = $_POST['per'];
$lok = $_POST['lok'];
$stat = $_POST['stat'];
$sup = $_POST['sup'];
$nama = $_POST['nama'];
$psj = $_POST['psj'];
if ($proses == 'excel' || $proses == 'pdf') {
    $nopp = $_GET['nopp'];
    $tgl = tanggalsystem($_GET['tgl']);
    $per = $_GET['per'];
    $lok = $_GET['lok'];
    $stat = $_GET['stat'];
    $sup = $_GET['sup'];
    $nama = $_GET['nama'];
    $psj = $_GET['psj'];
}
if ($proses == 'excel') {
    $stream = "<table class=sortable cellspacing=1 border=1>";
} else {
    $stream = "<table class=sortable cellspacing=1>";
}
$stream .= "<thead class=rowheader>\n        <tr class=rowheader>\n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['nourut'] . "</td>\n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['nopp'] . "</td> \n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['tanggal'] . "</td>\n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['kodebarang'] . "</td>    \n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['namabarang'] . "</td>\n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['jumlah'] . "</td>\n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['satuan'] . "</td>\n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['status'] . " " . $_SESSION['lang']['persetujuan'] . "</td>\n            <td bgcolor=#CCCCCC  align=center>Ostd</td>   \n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['chat'] . "</td>   \n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['nopo'] . "</td>     \n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['tgl_po'] . "</td> \n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['namasupplier'] . "</td>     \n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['status'] . " PO</td>\n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['rapbNo'] . "</td>\n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['tanggal'] . "</td>\n            <td bgcolor=#CCCCCC  align=center>" . $_SESSION['lang']['print'] . "</td>\n                \n        </tr></thead>";
//lokasitugas lock
//print_r($_SESSION['empl']);
Пример #11
0
<?php

require_once 'master_validation.php';
require_once 'config/connection.php';
include 'lib/nangkoelib.php';
include_once 'lib/zLib.php';
$optNm = makeOption($dbname, 'log_5klbarang', 'kode,kelompok');
$optNmBrg = makeOption($dbname, 'log_5masterbarang', 'kodebarang,namabarang');
$nopp = isset($_POST['rnopp']) ? $_POST['rnopp'] : '';
$tanggal = isset($_POST['rtgl_pp']) ? tanggalsystem($_POST['rtgl_pp']) : '';
$kodeorg = isset($_POST['rkd_bag']) ? $_POST['rkd_bag'] : '';
$method = isset($_POST['method']) ? $_POST['method'] : '';
$user_id = isset($_POST['usr_id']) ? $_POST['usr_id'] : '';
$nopp2 = isset($_POST['dnopp']) ? $_POST['dnopp'] : '';
$stat_cls = isset($_POST['stat']) ? $_POST['stat'] : '';
$tgl = date('Ymd');
$bln = substr($tgl, 4, 2);
$thn = substr($tgl, 0, 4);
switch ($method) {
    case 'delete':
        $strx = "delete from " . $dbname . ".log_prapoht where nopp='" . $nopp . "'";
        if (mysql_query($strx)) {
            $ql = "delete from " . $dbname . ".log_prapodt where nopp='" . $nopp . "'";
            mysql_query($ql) or die(mysql_error());
        } else {
            echo " Error," . addslashes(mysql_error($conn));
        }
        break;
    case 'update':
        $strx = "update " . $dbname . ". log_prapoht set tanggal='" . $tanggal . "',kodeorg='" . $kodeorg . "' where nopp='" . $nopp . "'";
        if (mysql_query($strx)) {
Пример #12
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;
Пример #13
0
<?php

session_start();
require_once 'master_validation.php';
require_once 'config/connection.php';
include_once 'lib/nangkoelib.php';
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) {
        $data['jumlahrealisasi'] = str_replace(',', '', $data['jumlahrealisasi']);
        $data['jjgkontanan'] = str_replace(',', '', $data['jjgkontanan']);
        # Empty Data
        foreach ($data as $cont) {
            if ($cont == '') {
                echo 'Warning : Data tidak boleh ada yang kosong';
                exit;
            }
        }
        # Convert Tanggal
        $param['tanggal'] = tanggalsystem($param['tanggal']);
        $where = "notransaksi='" . $param['notransaksi'] . "' and kodeblok='" . $param['blokalokasi'] . "' and kodekegiatan='" . $param['kodekegiatan'] . "' and tanggal='" . $param['tanggal'] . "' and blokspkdt='" . $param['kodeblok'] . "' and kodesegment='" . $param['kodesegment'] . "'";
        $query = updateQuery($dbname, 'log_baspk', $data, $where);
        if (!mysql_query($query)) {
            echo "DB Error : " . mysql_error();
            exit;
        }
        break;
    case 'delete':
        # Convert Tanggal
        $param['tanggal'] = tanggalsystem($param['tanggal']);
        $where = "notransaksi='" . $param['notransaksi'] . "' and kodeblok='" . $param['blokalokasi'] . "' and kodekegiatan='" . $param['kodekegiatan'] . "' and tanggal='" . $param['tanggal'] . "' and blokspkdt='" . $param['kodeblok'] . "' and kodesegment='" . $param['kodesegment'] . "'";
        $query = "delete from `" . $dbname . "`.`log_baspk` where " . $where;
        if (!mysql_query($query)) {
            echo "DB Error : " . mysql_error();
            exit;
        }
        break;
    default:
        break;
}
Пример #15
0
     $sDel = "delete from " . $dbname . ".kebun_pengirimanbbt where notransaksi='" . $notrans . "'";
     if (mysql_query($sDel)) {
         echo "";
     } else {
         echo "DB Error : " . mysql_error($conn);
     }
     break;
     //cari transaksi
 //cari transaksi
 case 'cari_transaksi':
     OPEN_BOX();
     echo "<fieldset>\r\n<legend>" . $_SESSION['lang']['result'] . "</legend>";
     echo "<div style=\"width:600px; height:450px; overflow:auto;\">\r\n\t\t\t<table cellspacing=1 border=0 class='sortable'>\r\n\t\t<thead>\r\n<tr class=rowheader>\r\n<td>" . $_SESSION['lang']['notransaksi'] . "</td>\r\n<td>" . $_SESSION['lang']['kodeorg'] . "</td>\r\n<td>" . $_SESSION['lang']['tanggal'] . "</td>\r\n<td>" . $_SESSION['lang']['jenisbibit'] . "</td>\r\n<td>" . $_SESSION['lang']['jumlah'] . "</td>\r\n<td>Action</td>\r\n</tr>\r\n</thead>\r\n<tbody>\r\n";
     if (isset($_POST['txtSearch'])) {
         $txt_search = $_POST['txtSearch'];
         $txt_tgl = tanggalsystem($_POST['txtTgl']);
         $txt_tgl_a = substr($txt_tgl, 0, 4);
         $txt_tgl_b = substr($txt_tgl, 4, 2);
         $txt_tgl_c = substr($txt_tgl, 6, 2);
         $txt_tgl = $txt_tgl_a . "-" . $txt_tgl_b . "-" . $txt_tgl_c;
     } else {
         $txt_search = '';
         $txt_tgl = '';
     }
     if ($txt_search != '') {
         $where = " notransaksi LIKE  '%" . $txt_search . "%'";
     } elseif ($txt_tgl != '') {
         $where .= " tanggal LIKE '" . $txt_tgl . "'";
     } elseif ($txt_tgl != '' && $txt_search != '') {
         $where .= " notransaksi LIKE '%" . $txt_search . "%' and tanggal LIKE '%" . $txt_tgl . "%'";
     }
Пример #16
0
<?php

require_once 'master_validation.php';
require_once 'config/connection.php';
require_once 'lib/nangkoelib.php';
require_once 'lib/zLib.php';
?>
	

<?php 
$method = $_POST['method'];
$kdorg = $_POST['kdorg'];
$harga = $_POST['harga'];
$thntnm = $_POST['thntnm'];
$tgl = tanggalsystem($_POST['tgl']);
$kodesupplier = $_POST['kodesupplier'];
$periodesort = $_POST['periodesort'];
$suppsort = $_POST['suppsort'];
$kdorgsort = $_POST['kdorgsort'];
//exit("Error:$sInsert");
$namasupp = makeOption($dbname, 'log_5supplier', 'kodetimbangan,namasupplier');
$namaorg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi');
?>

<?php 
switch ($method) {
    case 'insert':
        $ha = "insert into " . $dbname . ".pabrik_5hargatbs (`kodeorg`,`kodesupplier`,`tanggal`,`tahuntanam`,`harga`,`updateby`)\r\n\t\tvalues ('" . $kdorg . "','" . $kodesupplier . "','" . $tgl . "','" . $thntnm . "','" . $harga . "','" . $_SESSION['standard']['userid'] . "')";
        if (mysql_query($ha)) {
        } else {
            echo " Gagal," . addslashes(mysql_error($conn));
$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  )";
        }
    }
    if (mysql_query($str)) {
        $str = "select a.*,case a.sertifikat when 0 then 'N' else 'Y' end as bersertifikat, b.jenistraining as jnstraining \r\n\t       from " . $dbname . ".sdm_karyawantraining a\r\n\t\t   left join " . $dbname . ".sdm_5jenistraining b\r\n\t\t   on a.jenistraining = b.kodetraining\r\n\t \t\twhere a.karyawanid=" . $karyawanid . " \r\n\t\t\torder by a.tanggalmulai desc";
        $res = mysql_query($str);
        $no = 0;
        while ($bar = mysql_fetch_object($res)) {
            $no += 1;
            echo "\t  <tr class=rowcontent>\r\n\t\t\t  <td class=firsttd>" . $no . "</td>\r\n\t\t\t  <td>" . $bar->jnstraining . "</td>\t\t\t  \r\n\t\t\t  <td>" . $bar->judultraining . "</td>\r\n\t\t\t  <td>" . $bar->penyelenggara . "</td>\t\t\t  \r\n\t\t\t  <td>" . tanggalnormal($bar->tanggalmulai) . "</td>\t\t\t  \r\n\t\t\t  <td>" . tanggalnormal($bar->tanggalselesai) . "</td>\r\n\t\t\t  <td>" . $bar->bersertifikat . "</td>\r\n                          <td align=right>" . $bar->biaya . "</td>\r\n\t\t\t  <td style='text-align:center;'><img src=images/skyblue/delete.png class=resicon  title='Delete' onclick=\"delTraining('" . $karyawanid . "','" . $bar->nomor . "');\"></td>\r\n\t\t\t</tr>";
        }
    } else {
        echo " Gagal:" . addslashes(mysql_error($conn)) . $str;
    }
} else {
    echo " Error; Data incomplete";
                 $noUrut == 1 ? $dret = 5 : ($dret = 3);
                 $tab .= "<td align=center colspan=" . $dret . "><button class=mybutton id=save_" . $noUrut . " onclick=simpanSemua2(" . $noUrut . "," . $totRow . ")>" . $_SESSION['lang']['save'] . "</button></td>";
             }
             $tab .= "</tr>";
         }
     } else {
         exit("Error: No data found");
     }
     $tab .= "</tbody></table>";
     echo $tab;
     break;
 case 'update':
     $subTotal = str_replace(',', '', $subTotal);
     $nilaiPermintaan = str_replace(',', '', $nilaiPermintaan);
     //                                    $nilDiskon=str_replace(',', '', $nilDiskon);  param+='&tglDari='+tgldari+'&tglSmp='+tglsmp+'&mtUang='+mtng+'&kurs='+krs;
     $sUpdate = "update " . $dbname . ".log_perintaanhargaht set id_franco='" . $idFranco . "', stock='" . $stockId . "', \r\n                                              catatan='" . $ketUraian . "',sisbayar='" . $termPay . "', ppn='" . $nilPPn . "', subtotal='" . $subTotal . "', \r\n                                              diskonpersen='" . $diskonPersen . "', nilaidiskon='" . $nilDiskon . "', nilaipermintaan='" . $nilaiPermintaan . "', \r\n                                              tgldari='" . tanggalsystem($_POST['tglDari']) . "', tglsmp='" . tanggalsystem($_POST['tglSmp']) . "', kurs='" . $_POST['kurs'] . "',\r\n                                              matauang='" . $_POST['mtUang'] . "',supplierid='" . $_POST['supplierId'] . "'\r\n                                              where nomor='" . $no_prmntan . "'";
     if (mysql_query($sUpdate)) {
         $totRow = count($_POST['kdbrg']);
         foreach ($_POST['kdbrg'] as $row => $Act) {
             $kdbrg = $Act;
             $merk = $_POST['merk'][$row];
             $hrg = $_POST['price'][$row];
             //$hrg=str_replace(',','',$hrg);
             $jmlh = $_POST['jmlh'][$row];
             $sUpdate2 = "update " . $dbname . ".log_permintaanhargadt set `jumlah`='" . $jmlh . "',`harga`='" . $hrg . "',`merk`='" . $merk . "' \r\n                                                                    where nomor='" . $no_prmntan . "' and kodebarang='" . $kdbrg . "'";
             //exit("Error".$sUpdate2);
             if (mysql_query($sUpdate2)) {
                 $berhasil += 1;
             } else {
                 echo " Gagal," . $sUpdate2 . "\n detail" . addslashes(mysql_error($conn));
             }
Пример #19
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', '');
$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);
             $pdf->Cell(3 / 100 * $width, $height, "", 1, 0, 'R', 1);
         } elseif ($k == 12 || $k == 13) {
             $pdf->Cell(4 / 100 * $width, $height, number_format($subTotal['fraksi' . $k], 2), 1, 0, 'R', 1);
         } else {
             $pdf->Cell(3 / 100 * $width, $height, number_format($subTotal['fraksi' . $k], 2), 1, 0, 'R', 1);
         }
     }
     $pdf->Cell(4 / 100 * $width, $height, number_format($subTotal['jjgSortasitot'], 2), 1, 0, 'R', 1);
     $pdf->Cell(4 / 100 * $width, $height, number_format($subTotal['prsnBrondolan'], 2), 1, 0, 'R', 1);
     $pdf->Output();
     break;
 case 'excel':
     $kdPbrk = $_GET['kdPbrk'];
     $statBuah = $_GET['statBuah'];
     $tglAkhir = tanggalsystem($_GET['tglAkhir']);
     $tglAwal = tanggalsystem($_GET['tglAwal']);
     $thn = substr($tglAwal, 0, 4);
     $bln = substr($tglAwal, 4, 2);
     $dte = substr($tglAwal, 6, 2);
     $tglAwal1 = $thn . "-" . $bln . "-" . $dte;
     $thn2 = substr($tglAkhir, 0, 4);
     $bln2 = substr($tglAkhir, 4, 2);
     $dte2 = substr($tglAkhir, 6, 2);
     $tglAkhir1 = $thn2 . "-" . $bln2 . "-" . $dte2;
     $suppId = $_GET['suppId'];
     $kdOrg = $_GET['kdOrg'];
     $str = "select namasupplier from " . $dbname . ".log_5supplier where kodetimbangan='" . $suppId . "'";
     $res = mysql_query($str);
     while ($bar = mysql_fetch_object($res)) {
         $namaspl = $bar->namasupplier;
     }
Пример #21
0
<?php

require_once 'master_validation.php';
require_once 'config/connection.php';
require_once 'lib/nangkoelib.php';
require_once 'lib/zLib.php';
$_POST['method'] == '' ? $method = $_GET['method'] : ($method = $_POST['method']);
$notran = isset($_POST['notran']) ? $_POST['notran'] : '';
$pt = isset($_POST['pt']) ? $_POST['pt'] : '';
$tgl = isset($_POST['tgl']) ? tanggalsystem($_POST['tgl']) : '';
$ket = isset($_POST['ket']) ? $_POST['ket'] : '';
$peti = isset($_POST['peti']) ? $_POST['peti'] : '';
$serah = isset($_POST['serah']) ? $_POST['serah'] : '';
$terima = isset($_POST['terima']) ? $_POST['terima'] : '';
$noPo = isset($_POST['noPo']) ? $_POST['noPo'] : '';
//$=$_POST[''];
$txtBarang = isset($_POST['txtBarang']) ? $_POST['txtBarang'] : '';
$kdOrg = isset($_POST['kdOrg']) ? $_POST['kdOrg'] : '';
$satuan = isset($_POST['satuan']) ? $_POST['satuan'] : '';
$nobpb = isset($_POST['nobpb']) ? $_POST['nobpb'] : '';
$nopo = isset($_POST['nopo']) ? $_POST['nopo'] : '';
$nopp = isset($_POST['nopp']) ? $_POST['nopp'] : '';
$kodebarang = isset($_POST['kodebarang']) ? $_POST['kodebarang'] : '';
$jumlah = isset($_POST['jumlah']) ? $_POST['jumlah'] : '';
$satuanpo = isset($_POST['satuanpo']) ? $_POST['satuanpo'] : '';
$matauang = isset($_POST['matauang']) ? $_POST['matauang'] : '';
$kurs = isset($_POST['kurs']) ? $_POST['kurs'] : '';
$hargasatuan = isset($_POST['hargasatuan']) ? $_POST['hargasatuan'] : '';
$keteranganpp = isset($_POST['keteranganpp']) ? $_POST['keteranganpp'] : '';
$tampung = isset($_POST['tampung']) ? $_POST['tampung'] : '';
$notranDet = isset($_POST['notranDet']) ? $_POST['notranDet'] : '';
Пример #22
0
 //echo $tglDari."__".$tanggalSampai;exit();
 if ($tglDari == '' || $tanggalSampai == '') {
     echo "warning:Tanggal Dari dan Sampai Tanggal Tidak Boleh Kosong";
     exit;
 } else {
     if ($kdPt != '') {
         $where .= " and a.kodeorg='" . $kdPt . "'";
     }
     if ($kdUnit != '') {
         $where .= " and substring(b.nopp,16,4)='" . $kdUnit . "'";
     }
     if ($kdSup != "") {
         $where .= " and a.kodesupplier='" . $kdSup . "'";
     }
     if ($tglDr != '' || $tanggalSampai != '') {
         $where .= " and (a.tanggal between '" . $tglDari . "' and '" . tanggalsystem($_GET['tanggalSampai']) . "')";
     }
     if ($lokBeli != '') {
         $where .= " and lokalpusat='" . $lokBeli . "'";
     }
 }
 class PDF extends FPDF
 {
     function Header()
     {
         global $conn;
         global $dbname;
         global $align;
         global $length;
         global $colArr;
         global $title;
<?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;
}
$date1 = $tanggal1[2] . '-' . $tanggal1[1] . '-' . $tanggal1[0];
$tanggalterakhir = date('t', strtotime($date1));
// kamus blok
$sdakar = "select kodeorg,tahuntanam from " . $dbname . ".setup_blok";
$qdakar = mysql_query($sdakar) or die(mysql_error($conn));
while ($rdakar = mysql_fetch_assoc($qdakar)) {
    $belok[$rdakar['kodeorg']] = $rdakar['tahuntanam'];
}
if ($unit == '') {
    $str = "select a.blok,a.tanggal,a.nospb,a.notiket,a.nokendaraan,a.jjg,a.kgwb,a.bjr,a.kgbjr,\r\n\t\t\t  if(b.intiplasma='I','Inti','Plasma') as intiplasma \r\n              from " . $dbname . ".kebun_spb_vw a\r\n              left join " . $dbname . ".organisasi c on substr(a.kodeorg,1,4)=c.kodeorganisasi \r\n\t\t\t  left join " . $dbname . ".setup_blok b on a.blok = b.kodeorg \r\n              where c.induk = '" . $pt . "'  and a.tanggal between " . tanggalsystem($tgl1) . " and " . tanggalsystem($tgl2) . " and b.intiplasma like '%" . $intiplasma . "%' \r\n              and a.posting=1 order by a.blok, a.tanggal";
} else {
    $where = '';
    if ($unit != $_SESSION['empl']['lokasitugas']) {
        $where = " and a.posting=1";
    }
    $str = "select a.blok,a.tanggal,a.nospb,a.notiket,a.nokendaraan,a.jjg,a.kgwb,a.bjr,a.kgbjr,\r\n\t\t\t  if(b.intiplasma='I','Inti','Plasma') as intiplasma \r\n              from " . $dbname . ".kebun_spb_vw a \r\n\t\t\t  left join " . $dbname . ".setup_blok b on a.blok = b.kodeorg \r\n              where blok like '" . $unit . "%'  and a.tanggal between " . tanggalsystem($tgl1) . " and " . tanggalsystem($tgl2) . " and b.intiplasma like '%" . $intiplasma . "%' \r\n              " . $where . " order by a.blok, a.tanggal";
}
//    exit('error: '.$str);
$stream = $_SESSION['lang']['laporanpanen'] . " " . $pt . " " . $unit . " SPB vs WB " . $tgl1 . " - " . $tgl2;
$stream .= '<table border=1 cellpading=1>';
// header
$stream .= "<thead>\r\n                <tr>\r\n            <td align=center>No.</td>\r\n            <td align=center>" . $_SESSION['lang']['afdeling'] . "</td>\r\n            <td align=center>" . $_SESSION['lang']['blok'] . "</td>\r\n            <td align=center>" . $_SESSION['lang']['intiplasma'] . "</td>\r\n            <td align=center>" . $_SESSION['lang']['tahuntanam'] . "</td>\r\n            <td align=center>" . $_SESSION['lang']['tanggal'] . "</td> \r\n            <td align=center>" . $_SESSION['lang']['nospb'] . "</td>\r\n            <td align=center>" . $_SESSION['lang']['noTiket'] . "</td>\r\n            <td align=center>" . $_SESSION['lang']['kendaraan'] . "</td>\r\n            <td align=center>" . $_SESSION['lang']['jjg'] . "</td>\r\n            <td align=center>" . "KG " . $_SESSION['lang']['kebun'] . "</td>    \r\n            <td align=center>" . $_SESSION['lang']['kgwb'] . "</td>\r\n            <td align=center>" . $_SESSION['lang']['bjr'] . " " . $_SESSION['lang']['aktual'] . "</td>\r\n            <td align=center>" . $_SESSION['lang']['bjr'] . " Kebun</td>\r\n            <td align=center>%</td>\r\n        </tr>\r\n        </thead>\r\n\t<tbody>";
// content
$res = mysql_query($str);
$no = 0;
if (mysql_num_rows($res) < 1) {
    $jukol = 15;
    echo "<tr class=rowcontent><td colspan=" . $jukol . ">" . $_SESSION['lang']['tidakditemukan'] . "</td></tr>";
    exit;
} else {
    $totalbarjjg = $totalbarkgbjr = $totalbarkgwb = 0;
<?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);
    }
}
Пример #26
0
 $entry_by = $_SESSION['standard']['userid'];
 #Check Header
 if ($data['jjng'] == '' or $data['brondolan'] == '' or $data['bjr'] == '') {
     echo "Error : Tolong lengkap data detail, data tidak boleh kosong";
     exit;
 }
 /*if(($data['jjng']==0) or ($data['bjr']==0) ) {
       echo "Error : ".$_SESSION['lang']['bjr'].",".$_SESSION['lang']['jjg']." tidak boleh kosong atau nol";
       exit();
   }*/
 $sql = "select nospb from " . $dbname . ".kebun_spbht where nospb='" . $_POST['noSpb'] . "'";
 $query = mysql_query($sql) or die(mysql_error());
 $res = mysql_fetch_row($query);
 //echo "warning:".$res;exit();
 if ($res < 1) {
     $sins = "insert into " . $dbname . ".kebun_spbht (`nospb`, `kodeorg`, `tanggal`,`updateby`,`tujuan`,`penerimatbs`) values \r\n\t\t\t\t('" . $_POST['noSpb'] . "','" . $_POST['kodeOrg'] . "','" . tanggalsystem($_POST['tgl']) . "','" . $entry_by . "','" . $_POST['intex'] . "','" . $_POST['pks'] . "')";
     if (mysql_query($sins)) {
         $kgBjr = intval($_POST['jjng']) * intval($_POST['bjr']);
         $dins = "insert into " . $dbname . ".kebun_spbdt (nospb, blok, jjg, bjr, brondolan,  mentah, busuk, matang, lewatmatang,kgbjr,kgwb) \r\n\t\t\t\t\tvalues ('" . $_POST['noSpb'] . "','" . $_POST['blok'] . "','" . $_POST['jjng'] . "','" . $_POST['bjr'] . "',\r\n\t\t\t\t\t'" . $_POST['brondolan'] . "','" . $_POST['mentah'] . "','" . $_POST['busuk'] . "','" . $_POST['matang'] . "','" . $_POST['lwtmatang'] . "','" . $kgBjr . "','" . $_POST['kgwb'] . "')";
         //echo "warning:test".$dins;
         if (mysql_query($dins)) {
             echo "";
         } else {
             //echo "warning:masuk";
             echo "DB Error : " . mysql_error($conn);
         }
     } else {
         echo "DB Error : " . mysql_error($conn);
     }
 } else {
     $kgBjr = intval($_POST['jjng']) * intval($_POST['bjr']);
     $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 . "%'";
         }
     }
     if ($kdPabrik != '') {
         $where .= " and millcode='" . $kdPabrik . "'";
     }
     if ($tgl_1 != '' && $tgl_2 != '') {
         $where .= " and tanggal >= " . $tgl_1 . "000001 and tanggal<=" . $tgl_2 . "235959";
Пример #28
0
         echo "";
     } else {
         echo " Gagal," . addslashes(mysql_error($conn));
     }
     break;
 case 'update':
     if ($tanggal == '') {
         exit("error: " . $_SESSION['lang']['tanggal'] . " is empty!");
     }
     if ($_POST['kodetraksi'] == '') {
         exit("error: " . $_SESSION['lang']['kodetraksi'] . " is empty!");
     }
     if ($_POST['kd_vhc'] == '') {
         exit("error: " . $_SESSION['lang']['kde_vhc'] . " is empty!");
     }
     $i = "update " . $dbname . ".vhc_balaka set kodetraksi='" . $kodetraksi . "',tanggal='" . tanggalsystem($tanggal) . "',kodealat='" . $kde_vhc . "'\r\n                    ,operator='" . $_POST['operator'] . "',security='" . $_POST['security'] . "',mekanik='" . $_POST['karymekanik'] . "'\r\n                        ,managerunit='" . $_POST['managerunit'] . "',kaworkshop='" . $_POST['karyworkshop'] . "',kronologis='" . $_POST['kronologiskejadian'] . "',akibatkejadian='" . $_POST['akibatkejadian'] . "'\r\n                    ,updateby='" . $_SESSION['standard']['userid'] . "'\r\n\t\t where notransaksi='" . $_POST['notransaksi'] . "' ";
     //exit("Error.$str");
     if (mysql_query($i)) {
         echo "";
     } else {
         echo " Gagal," . addslashes(mysql_error($conn));
     }
     break;
 case 'loadData':
     echo "\r\n\t\r\n\t\t<table class=sortable cellspacing=1 border=0>\r\n\t     <thead>\r\n\t\t\t <tr class=rowheader>\r\n\t\t\t\t <td align=center>" . $_SESSION['lang']['nourut'] . "</td>\r\n                                 <td align=center>" . $_SESSION['lang']['notransaksi'] . "</td>\r\n                                 <td align=center>" . $_SESSION['lang']['kodetraksi'] . "</td>\r\n\t\t\t\t <td align=center>" . $_SESSION['lang']['tanggal'] . "</td>\r\n\t\t\t\t <td align=center>" . $_SESSION['lang']['kendaraan'] . "</td>\r\n\t\t\t\t <td align=center>" . $_SESSION['lang']['operator'] . "</td>\r\n\t\t\t\t <td align=center>" . $_SESSION['lang']['security'] . "</td>\r\n\t\t\t\t <td align=center>" . $_SESSION['lang']['mekanik'] . "</td>\r\n                                 <td align=center>" . $_SESSION['lang']['managerunit'] . "</td>\r\n                                 <td align=center>" . $_SESSION['lang']['kaworkshop'] . "</td>\r\n                                 <td align=center>" . $_SESSION['lang']['action'] . "</td>\r\n\t\t\t\t \r\n\t\t\t </tr>\r\n\t\t</thead>\r\n\t\t<tbody>";
     $limit = 15;
     $page = 0;
     if (isset($_POST['page'])) {
         $page = $_POST['page'];
         if ($page < 0) {
             $page = 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';
//$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");
Пример #30
0
<?php

require_once 'master_validation.php';
require_once 'config/connection.php';
require_once 'lib/nangkoelib.php';
$notransaksi = $_POST['notransaksi'];
$bayar = $_POST['bayar'];
$tglbayar = tanggalsystem($_POST['tglbayar']);
$str = "update " . $dbname . ".sdm_penggantiantransport set dibayar=" . $bayar . ",\r\n      tanggalbayar=" . $tglbayar . ",\r\n\t  posting=1\r\n\t  where notransaksi='" . $notransaksi . "'";
if (mysql_query($str)) {
} else {
    echo " Gagal " . addslashes(mysql_error($conn));
}