Example #1
0
 function gridElement($num, $data, $attr = array())
 {
     # Merge Attr
     $newAttr = array('maxlength' => $this->_length, 'style' => 'margin:0;width:' . (string) ($this->_length * 6.5) . 'px');
     $attr = array_merge($attr, $newAttr);
     # Create Element
     $el = makeElement($this->_id . "_" . $num, $this->_type, $data, $attr, $this->_refer);
     return $el;
 }
Example #2
0
 function prep()
 {
     global $dbname;
     ##=== Prep
     # Field
     $primeStr = "";
     $advanceStr = "";
     foreach ($this->_primeEls as $els) {
         switch ($els->_type) {
             case 'bulantahun':
                 $primeStr .= "##" . $els->_id . "_bulan##" . $els->_id . "_tahun";
                 break;
             default:
                 $primeStr .= "##" . $els->_id;
         }
     }
     foreach ($this->_advanceEls as $els) {
         switch ($els->_type) {
             case 'bulantahun':
                 $advanceStr .= "##" . $els->_id . "_bulan##" . $els->_id . "_tahun";
                 break;
             default:
                 $advanceStr .= "##" . $els->_id;
         }
     }
     ##=== Form
     $fReport = "";
     #$fReport .= "<div align='center'><h3>".$this->_name."</h3></div>";
     $fReport .= "<fieldset><legend><b>" . $this->_name . "</b></legend>";
     $fReport .= "<div id='" . $this->_id . "'><table align='left'>";
     //$fReport .= "<tr><td>".$_SESSION['lang']['kebun']."</td><td>:</td><td><select id=kebun name=kebun>".$optKbn."</select></td></tr>";
     foreach ($this->_primeEls as $els) {
         $fReport .= "<tr><td>" . makeElement($els->_id, 'label', $els->_name) . "</td>";
         $fReport .= "<td>:</td><td>" . $els->genEls() . "</td></tr>";
     }
     $fReport .= "<tr><td colspan='4' align='left'>" . makeElement('btnPreview', 'btn', 'Preview', array('onclick' => "formPrint('preview',0,'" . $primeStr . "','" . $advanceStr . "','" . $this->_page . "',event)"));
     if (!$this->_noPdf) {
         $fReport .= makeElement('btnPDF', 'btn', 'PDF', array('onclick' => "formPrint('pdf',0,'" . $primeStr . "','" . $advanceStr . "','" . $this->_page . "',event)"));
     }
     // $fReport .= makeElement('btnExcel','btn','Excel',
     // array('onclick'=>"formPrint('excel',0,'".$primeStr."','".$advanceStr."','".$this->_page."',event)"));
     if (!$this->_noExcel) {
         $fReport .= makeElement('btnExcel', 'btn', 'Excel', array('onclick' => "formPrint('excel',0,'" . $primeStr . "','" . $advanceStr . "','" . $this->_page . "',event)"));
     }
     $fReport .= "</td></tr>";
     $fReport .= "</table></div></fieldset>";
     ##=== Work Field
     $fReport .= "<fieldset><legend><b>Preview</b></legend>";
     $fReport .= "<div id='" . $this->_workField . "' style='overflow:auto;height:" . $this->_detailHeight . "%'></div></fieldset>";
     return $fReport;
 }
function createTabDetail($id, $data)
{
    $table .= "<table id='kontakDetailTable'>";
    # Header
    $table .= "<thead>";
    $table .= "<tr>";
    $table .= "<td style='width: 150px;'>" . $_SESSION['lang']['nama'] . "</td>";
    $table .= "<td style='width: 150px;'>" . $_SESSION['lang']['telepon'] . "</td>";
    $table .= "<td style='width: 150px;'>" . $_SESSION['lang']['email'] . "</td>";
    $table .= "<td style='width: 50px; text-align:center;'>" . $_SESSION['lang']['action'] . "</td>";
    $table .= "</tr>";
    $table .= "</thead></table>";
    # Data
    $table .= "<div style='overflow:auto;max-height:200px'><table><tbody id='detailBody'>";
    $i = 0;
    #======= Display Data =======
    if ($data != array()) {
        foreach ($data as $key => $row) {
            $table .= "<tr id='detail_tr_" . $key . "' class='rowcontent'>";
            $table .= "<td style='width: 150px;'>" . $row['nama'] . "</td>";
            $table .= "<td style='width: 150px;'>" . $row['telepon'] . "</td>";
            $table .= "<td style='width: 150px;'>" . $row['email'] . "</td>";
            $table .= "<td style='text-align:center;'><img id='detail_delete_" . $key . "' title='Hapus' class=resicon onclick=\"deleteKontakPerson('" . $row['idkontak'] . "')\" src='images/delete_32.png'/></td>";
            $i = $key;
        }
        $i++;
    }
    #======= New Row ===========
    $table .= "<tr id='detail_tr_" . $i . "' class='rowcontent'>";
    $table .= "<td style='width: 150px;'>" . makeElement("nama_" . $i . "", 'txt', '', array('onkeypress' => 'return tanpa_kutip(event)')) . "</td>";
    $table .= "<td style='width: 150px;'>" . makeElement("telepon_" . $i . "", 'txt', '', array('onkeypress' => 'return angka_doang(event)')) . "</td>";
    $table .= "<td style='width: 150px;'>" . makeElement("email_" . $i . "", 'txt', '', array('onkeypress' => 'return tanpa_kutip(event)')) . "</td>";
    # Add, Container Delete
    $table .= "<td style='width: 50px; text-align:center'><img id='detail_add_" . $i . "' title='Tambah' class=resicon onclick=\"addKontakPerson('" . $i . "')\" src='images/plus.png'/>";
    $table .= "&nbsp;<img id='detail_delete_" . $i . "' /></td>";
    $table .= "</tr>";
    $table .= "</tbody>";
    $table .= "</table></div>";
    echo $table;
}
Example #4
0
 function prep()
 {
     ##=== Prep
     # Field
     $primeStr = "";
     $advanceStr = "";
     foreach ($this->_primeEls as $els) {
         $primeStr .= "##" . $els->_id;
     }
     foreach ($this->_advanceEls as $els) {
         $advanceStr .= "##" . $els->_id;
     }
     ##=== Form
     $fReport = "<div align='center'><h3>" . $this->_name . "</h3></div>";
     $fReport .= "<fieldset><legend>Filter</legend>";
     $fReport .= "<div id='" . $this->_id . "'><table align='center'>";
     foreach ($this->_primeEls as $els) {
         $fReport .= "<tr><td>" . makeElement($els->_id . "_check", 'checkbox', 1, array('checked' => 'checked', 'onclick' => "toggleActive(this,'" . $els->_id . "')")) . "</td>";
         $fReport .= "<td>" . makeElement($els->_id, 'label', $els->_name) . "</td>";
         $fReport .= "<td>:</td><td>" . $els->genEls() . "</td></tr>";
     }
     $fReport .= "<tr><td colspan='4' align='center'>" . makeElement('btnPreview', 'btn', 'Preview', array('onclick' => "print('preview','" . $primeStr . "','" . $advanceStr . "','" . $this->_page . "')")) . "</td></tr>";
     $fReport .= "</table></div></fieldset>";
     ##=== Print Format
     $fReport .= "<fieldset><legend>Print Format</legend>";
     $fReport .= "<div id='printFormat' align='center'>";
     # PDF
     $fReport .= "<img id='report_pdf' title='PDF' src='images/" . $_SESSION['theme'] . "/pdf.jpg' ";
     $fReport .= "class='zImgPrint' onclick=\"print('pdf','" . $primeStr . "','" . $advanceStr . "','" . $this->_page . "')\"></img>&nbsp;";
     # Excel
     $fReport .= "<img id='report_xls' title='Excel' src='images/" . $_SESSION['theme'] . "/excel.jpg' ";
     $fReport .= "class='zImgPrint' onclick=\"print('excel','" . $primeStr . "','" . $advanceStr . "','" . $this->_page . "')\"></img>";
     $fReport .= "</div></fieldset>";
     ##=== Work Field
     $fReport .= "<fieldset><legend>Preview</legend>";
     $fReport .= "<div id='workField'></div></fieldset>";
     return $fReport;
 }
Example #5
0
 function prep()
 {
     $table = "";
     $table .= "<table id='" . $this->_id . "' name='" . $this->_name . "' class='sortable'>";
     # Header
     $table .= "<thead><tr class='rowheader'>";
     $table .= "<td>Status</td>";
     foreach ($this->_header as $head) {
         $table .= "<td>" . $head . "</td>";
     }
     $table .= "</tr></thead>";
     # Content
     $table .= "<tbody id='tbody_" . $this->_id . "'>";
     foreach ($this->_data as $key => $row) {
         $table .= "<tr id='tr_" . $this->_id . "_" . $key . "' class='rowcontent'>";
         $table .= "<td><img id='status_" . $this->_id . "_" . $key . "' class='zImgOffBtn' ";
         $table .= "src='images/" . $_SESSION['theme'] . "/posting.png'></td>";
         foreach ($row as $head => $cont) {
             $table .= "<td id='" . $this->_id . "_" . $head . "_" . $key . "' ";
             $table .= "value='" . $cont . "'>" . $this->_dataShow[$key][$head];
             $table .= "</td>";
         }
         $table .= "</tr>";
     }
     $table .= "</tbody>";
     # Footer (Post Button)
     $table .= "<tfoot><tr><td align='center' colspan='" . (count($this->_header) + 1) . "'>";
     if (empty($this->_data)) {
         $table .= makeElement('btnPosting_' . $this->_id, 'btn', $_SESSION['lang']['posting'], array('disabled' => "disabled"));
     } else {
         $table .= makeElement('btnPosting_' . $this->_id, 'btn', $_SESSION['lang']['posting'], array('onclick' => "post('" . $this->_id . "',0,'" . $this->_colsStr . "','" . $_SESSION['theme'] . "')"));
     }
     $table .= "</td></tr></tfoot>";
     $table .= "</table>";
     $fieldset = makeFieldset($this->_title, 'fs_' . $this->_id, $table);
     return $fieldset;
 }
            }
        }
        # Setting drop down options
        $optTopografi = makeOption($dbname, 'setup_topografi', 'topografi,keterangan');
        $optTipeAng = getEnum($dbname, 'setup_kegiatannorma', 'tipeanggaran');
        #$optBarang = makeOption($dbname,'log_5masterbarang','kodebarang,namabarang');
        $content = "";
        foreach ($field as $row) {
            if ($row == 'topografi') {
                $content .= "<td>" . makeElement($row . "_" . $j, 'select', '', array('style' => 'width:100px'), $optTopografi) . "</td>";
            } elseif ($row == 'tipeanggaran') {
                $content .= "<td>" . makeElement($row . "_" . $j, 'select', '', array('style' => 'width:100px'), $optTipeAng) . "</td>";
            } elseif ($row == 'kodebarang') {
                $content .= "<td>" . makeElement($row . "_" . $j, 'text', '', array('style' => 'width:70px', 'readonly' => 'readonly')) . makeElement('getInvBtn_' . $j, 'btn', 'Cari', array('onclick' => 'getInv(event,\'' . $j . '\')')) . "</td>";
            } elseif ($row == 'namabarang') {
                $content .= "<td>" . makeElement($row . "_" . $j, 'txt', '', array('style' => 'width:120px', 'readonly' => 'readonly')) . "</td>";
            } elseif ($row == 'kuantitas1') {
                $content .= "<td>" . makeElement($row . "_" . $j, 'textnum', '0', array('style' => 'width:40px', 'onkeypress' => 'return tanpa_kutip(event)')) . "&nbsp;<span id='uom1_" . $j . "'></span></td>";
            } elseif ($row == 'kuantitas2') {
                $content .= "<td>" . makeElement($row . "_" . $j, 'textnum', '0', array('style' => 'width:40px', 'onkeypress' => 'return tanpa_kutip(event)')) . "&nbsp;<span id='uom2_" . $j . "'></span></td>";
            } else {
                $content .= "<td>" . makeElement($row . "_" . $j, 'textnum', '0', array('style' => 'width:40px', 'onkeypress' => 'return tanpa_kutip(event)')) . "</td>";
            }
        }
        $content .= "<td><img id='addNorma_" . $j . "' title='Tambah' class=zImgBtn onclick=\"addNorma('" . $j . "','" . $primaryStr . "','" . $fieldStr . "')\" src='images/plus.png'/>";
        $content .= "&nbsp;<img id='deleteNorma_" . $j . "' /></td>";
        echo $content;
        break;
    default:
        break;
}
$els[] = array(makeElement('noteleponrumah', 'label', $_SESSION['lang']['noteleponrumah']), makeElement('noteleponrumah', 'text', $data[0]['noteleponrumah'], array('style' => 'width:250px', 'maxlength' => '15', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('nohp', 'label', $_SESSION['lang']['nohp']), makeElement('nohp', 'text', $data[0]['nohp'], array('style' => 'width:250px', 'maxlength' => '15', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('norekeningbank', 'label', $_SESSION['lang']['norekeningbank']), makeElement('norekeningbank', 'text', $data[0]['norekeningbank'], array('style' => 'width:250px', 'maxlength' => '30', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('namabank', 'label', $_SESSION['lang']['namabank']), makeElement('namabank', 'text', $data[0]['namabank'], array('style' => 'width:250px', 'maxlength' => '45', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('sistemgaji', 'label', $_SESSION['lang']['sistemgaji']), makeElement('sistemgaji', 'text', $data[0]['sistemgaji'], array('style' => 'width:250px', 'maxlength' => '3', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('nopaspor', 'label', $_SESSION['lang']['nopaspor']), makeElement('nopaspor', 'text', $data[0]['nopaspor'], array('style' => 'width:250px', 'maxlength' => '30', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('noktp', 'label', $_SESSION['lang']['noktp']), makeElement('noktp', 'text', $data[0]['noktp'], array('style' => 'width:250px', 'maxlength' => '30', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('notelepondarurat', 'label', $_SESSION['lang']['notelepondarurat']), makeElement('notelepondarurat', 'text', $data[0]['notelepondarurat'], array('style' => 'width:250px', 'maxlength' => '15', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('tanggalmasuk', 'label', $_SESSION['lang']['tanggalmasuk']), makeElement('tanggalmasuk', 'text', $data[0]['tanggalmasuk'], array('style' => 'width:250px', 'readonly' => 'readonly', 'onmousemove' => 'setCalendar(this.id)')));
$els[] = array(makeElement('tanggalkeluar', 'label', $_SESSION['lang']['tanggalkeluar']), makeElement('tanggalkeluar', 'text', $data[0]['tanggalkeluar'], array('style' => 'width:250px', 'maxlength' => 'maxlength', 'onmousemove' => 'setCalendar(this.id)')));
$els[] = array(makeElement('tipekaryawan', 'label', $_SESSION['lang']['tipekaryawan']), makeElement('tipekaryawan', 'text', $data[0]['tipekaryawan'], array('style' => 'width:250px', 'maxlength' => '3', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('jumlahanak', 'label', $_SESSION['lang']['jumlahanak']), makeElement('jumlahanak', 'text', $data[0]['jumlahanak'], array('style' => 'width:250px', 'maxlength' => '10', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('jumlahtanggungan', 'label', $_SESSION['lang']['jumlahtanggungan']), makeElement('jumlahtanggungan', 'text', $data[0]['jumlahtanggungan'], array('style' => 'width:250px', 'maxlength' => '10', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('statuspajak', 'label', $_SESSION['lang']['statuspajak']), makeElement('statuspajak', 'text', $data[0]['statuspajak'], array('style' => 'width:250px', 'maxlength' => '4', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('npwp', 'label', $_SESSION['lang']['npwp']), makeElement('npwp', 'text', $data[0]['npwp'], array('style' => 'width:250px', 'maxlength' => '25', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('lokasipenerimaan', 'label', $_SESSION['lang']['lokasipenerimaan']), makeElement('lokasipenerimaan', 'text', $data[0]['lokasipenerimaan'], array('style' => 'width:250px', 'maxlength' => '30', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('kodeorganisasi', 'label', $_SESSION['lang']['kodeorganisasi']), makeElement('kodeorganisasi', 'select', $data[0]['kodeorganisasi'], array('style' => 'width:250px'), $optOrg));
$els[] = array(makeElement('bagian', 'label', $_SESSION['lang']['bagian']), makeElement('bagian', 'text', $data[0]['bagian'], array('style' => 'width:250px', 'maxlength' => '8', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('kodejabatan', 'label', $_SESSION['lang']['kodejabatan']), makeElement('kodejabatan', 'select', $data[0]['kodejabatan'], array('style' => 'width:250px'), $optJab));
$els[] = array(makeElement('kodegolongan', 'label', $_SESSION['lang']['kodegolongan']), makeElement('kodegolongan', 'select', $data[0]['kodegolongan'], array('style' => 'width:250px'), $optGol));
$els[] = array(makeElement('lokasitugas', 'label', $_SESSION['lang']['lokasitugas']), makeElement('lokasitugas', 'text', $data[0]['lokasitugas'], array('style' => 'width:250px', 'maxlength' => '8', 'onkeypress' => 'return tanpa_kutip(event)')));
$frm[0] = "<div style='width:783px;height:345px;overflow:auto'>" . genElementMultiDim('Header Data Karyawan', $els, 2) . "</div>";
#=========== Draw Tab and Content ==================
# Karyawan id
if ($mode == 'edit') {
    echo makeElement('karyawanid', 'hidden', $idK);
} else {
    echo makeElement('karyawanid', 'hidden', '');
}
# Tab
drawTab('tabKary', $hfrm, $frm, 80, 775);
Example #8
0
        $j = $i + 1;
    }
}
# New Row
foreach ($fieldNew as $row) {
    if ($row == 'topografi') {
        $content[$j][$row] = makeElement($row . "_" . $j, 'select', '', array('style' => 'width:100px'), $optTopografi);
    } elseif ($row == 'tipeanggaran') {
        $content[$j][$row] = makeElement($row . "_" . $j, 'select', '', array('style' => 'width:100px'), $optTipeAng);
    } elseif ($row == 'kodebarang') {
        $content[$j][$row] = makeElement($row . "_" . $j, 'text', '', array('style' => 'width:70px', 'readonly' => 'readonly')) . makeElement('getInvBtn_' . $j, 'btn', 'Cari', array('onclick' => 'getInv(event,\'' . $j . '\')'));
    } elseif ($row == 'namabarang') {
        $content[$j][$row] = makeElement($row . "_" . $j, 'txt', '', array('style' => 'width:120px', 'readonly' => 'readonly'));
    } elseif ($row == 'kuantitas1') {
        $content[$j][$row] = makeElement($row . "_" . $j, 'textnum', '0', array('style' => 'width:40px', 'onkeypress' => 'return angka_doang(event)')) . "&nbsp;<span id='uom1_" . $j . "'></span>";
    } elseif ($row == 'kuantitas2') {
        $content[$j][$row] = makeElement($row . "_" . $j, 'textnum', '0', array('style' => 'width:40px', 'onkeypress' => 'return angka_doang(event)')) . "&nbsp;<span id='uom2_" . $j . "'>" . $uom . "</span>";
    } else {
        $content[$j][$row] = makeElement($row . "_" . $j, 'textnum', '0', array('style' => 'width:40px', 'onkeypress' => 'return angka_doang(event)'));
    }
}
$content[$j]['Z'] = "<img id='addNorma_" . $j . "' title='Tambah' class=zImgBtn onclick=\"addNorma('" . $j . "','" . $primaryStr . "','" . $fieldStr . "')\" src='images/plus.png'/>";
$content[$j]['Z'] .= "&nbsp;<img id='deleteNorma_" . $j . "' />";
#============= Generate Main Table =======================
$mainTable = makeTable('normaTable', 'normaBody', $header, $content, array(), true, 'detail_tr');
echo "<div id='mainTable' style='float:left;'>";
echo "<fieldset><legend><b>Norma</b></legend>";
echo "<div style='overflow:auto;width:770px;max-height:270px'>";
echo $primary;
echo $mainTable;
echo "</div></fieldset></div>";
Example #9
0
include 'master_mainMenu.php';
?>
<script language=javascript src='js/zMaster.js'></script>
<script language=javascript src='js/zSearch.js'></script>
<script language=javascript src='js/zTools.js'></script>
<script language=javascript src='js/formTable.js'></script>
<script language=javascript src='js/log_konosemen.js'></script>
<link rel=stylesheet type=text/css href='style/zTable.css'>
<?php 
#=== Prep Control & Search
$ctl = array();
# Control
$ctl[] = "<div align='center'><img class=delliconBig src=images/" . $_SESSION['theme'] . "/addbig.png title='" . $_SESSION['lang']['new'] . "' onclick=\"showAdd()\"><br><span align='center'>" . $_SESSION['lang']['new'] . "</span></div>";
$ctl[] = "<div align='center'><img class=delliconBig src=images/" . $_SESSION['theme'] . "/list.png title='" . $_SESSION['lang']['list'] . "' onclick=\"defaultList()\"><br><span align='center'>" . $_SESSION['lang']['list'] . "</span></div>";
# Search
$ctl[] = "<fieldset><legend><b>" . $_SESSION['lang']['find'] . "</b></legend>" . makeElement('sNoKonosemen', 'label', $_SESSION['lang']['nokonosemen']) . makeElement('sNoKonosemen', 'text', '') . makeElement('sFind', 'btn', $_SESSION['lang']['find'], array('onclick' => "searchTrans()")) . "</fieldset>";
#=== Table Aktivitas
# Header
$header = array($_SESSION['lang']['nokonosemen'], $_SESSION['lang']['nokonosemen'] . ' Expeditor', $_SESSION['lang']['pt'], $_SESSION['lang']['tanggal'], $_SESSION['lang']['tanggalberangkat'], $_SESSION['lang']['tanggaltiba'], 'postingterimaby');
//cari nama orang
$str = "select karyawanid, namakaryawan from " . $dbname . ".datakaryawan";
$res = mysql_query($str);
while ($bar = mysql_fetch_object($res)) {
    $nama[$bar->karyawanid] = $bar->namakaryawan;
}
# Content
$cols = "nokonosemen,nokonosemenexp,kodept,tanggal,tanggalberangkat,tanggaltiba,postingby,posting,postingkirim";
$order = "nokonosemen desc";
$query = selectQuery($dbname, 'log_konosemenht', $cols, null, $order, false, 10, 1);
$data = fetchData($query);
$totalRow = getTotalRow($dbname, 'log_suratjalanht');
Example #10
0
echo open_body();
include 'master_mainMenu.php';
OPEN_BOX();
?>
<script language=javascript src=js/zMaster.js></script>
<link rel=stylesheet type=text/css href=style/zTable.css>
  
<p align="left"><u><b><font face="Arial" size="5" color="#000080">Jenis Bibit</font></b></u></p>
<?php 
#======Select Prep======
#======End Select Prep======
#=======Form============
echo "<div style='margin-bottom:30px'>";
$els = array();
# Fields
$els[] = array(makeElement('jenisbibit', 'label', $_SESSION['lang']['jenisbibit']), makeElement('jenisbibit', 'text', '', array('style' => 'width:100px', 'maxlength' => '30', 'onkeypress' => 'return tanpa_kutip(event)')));
# Fields
$fieldStr = '##jenisbibit';
$fieldArr = explode("##", substr($fieldStr, 2, strlen($fieldStr) - 2));
# Button
$els['btn'] = array(genFormBtn($fieldStr, 'setup_jenisbibit', "##jenisbibit"));
# Generate Field
echo genElement($els);
echo "</div>";
#=======End Form============
#=======Table===============
# Display Table
echo "<div style='height:200px;overflow:auto'>";
echo masterTable($dbname, 'setup_jenisbibit', "*", array(), array(), null, array(), null, 'jenisbibit');
echo "</div>";
#=======End Table============
         $table .= "<td id='t_nopo_" . $key . "' value='" . $row['nopo'] . "'>";
         $table .= makeElement('el_nopo_' . $key, 'text', $row['nopo'], array('onkeyup' => "changeBg(getById('detRow_" . $key . "'),'#FF00FF')"));
         $table .= "</td>";
     } else {
         $table .= "<td id='t_nopo_" . $key . "' value='" . $row['nopo'] . "'>" . $row['nopo'] . "</td>";
     }
     if ($row['jenis'] == 'M') {
         $table .= "<td id='t_nopp_" . $key . "' value='" . $row['nopp'] . "'>";
         $table .= makeElement('el_nopp_' . $key, 'text', $row['nopp'], array('onkeyup' => "changeBg(getById('detRow_" . $key . "'),'#FF00FF')"));
         $table .= "</td>";
     } else {
         $table .= "<td id='t_nopp_" . $key . "' value='" . $row['nopp'] . "'>" . $row['nopp'] . "</td>";
     }
     $table .= "<td id='t_jumlah_" . $key . "' align=right>";
     if ($row['jenis'] != 'PL') {
         $table .= makeElement('el_jumlah_' . $key, 'textnum', $row['jumlah'], array('onkeyup' => "changeBg(getById('detRow_" . $key . "'),'#FF00FF')"));
     } else {
         $table .= $row['jumlah'];
     }
     $table .= "</td>";
     $table .= "<td id='t_satuan_" . $key . "'>" . $row['satuanpo'] . "</td><td>";
     if ($row['jenis'] != 'PL') {
         $table .= "<img src='images/save.png' class=zImgBtn onclick='saveDetail(" . $key . ")' style='cursor:pointer'>";
     }
     $table .= "</td><td><img src='images/delete_32.png' class=zImgBtn onclick='deleteDetail(" . $key . ")' style='cursor:pointer'></td>";
     $table .= "</tr>";
 }
 $table .= "</tbody>";
 $table .= "</table></fieldset>";
 echo $table;
 break;
         $mnt .= "<option value=" . $y . " " . ($y == 00 ? 'selected' : '') . ">" . $y . "</option>";
         $y++;
     }
     $table .= "<tr id='detail_tr' class='rowcontent'>";
     //$table .= "<td>".makeElement("krywnId",'select','',
     // array('style'=>'width:150px','onchange'=>'bersihFormDetail()'),$optKry)."</td>";
     $table .= "<td><select id=krywnId name=krywnId onchange=bersihFormDetail() >" . $optKry . "</select></td>";
     $table .= "<td>" . makeElement("shiftId", 'text', '', array('style' => 'width:120px', 'onkeypress' => 'return tanpa_kutip(event)')) . "</td>";
     $table .= "<td><select id=premiPil name=premiPil ><option value=1>Yes</option><option value=0>No</option></select></td>";
     $table .= "<td>" . makeElement("absniId", 'select', '', array('style' => 'width:100px'), $optAbsen) . "</td>";
     $table .= "<td><select id=jmId name=jmId  >" . $jm . "</select>:<select id=mntId name=mntId onchange=getPremiTetap()>" . $mnt . "</select></td>";
     $table .= "<td><select id=jmId2 name=jmId2 >" . $jm . "</select>:<select id=mntId2 name=mntId2 onchange=getPremiTetap()>" . $mnt . "</select></td>";
     $table .= "<td style='display:none'><select id=catu name=catu><option value=1>Yes</option><option value=0>No</option></select></td>";
     $table .= "<td><input type=text id=dendakehadiran class=myinputtextnumber size=12 onkeypress=\"return angka_doang(event)\" value=0></td>";
     $table .= "<td><input type=text id=premiInsentif class=myinputtextnumber size=12 onkeypress=\"return angka_doang(event)\" /></td>";
     $table .= "<td>" . makeElement("ktrng", 'text', '', array('style' => 'width:150px', 'onkeypress' => 'return tanpa_kutip(event)')) . "</td>";
     # Add, Container Delete
     $table .= "<td><input type=hidden id=insentif /><input type=hidden id=premi /><img id='detail_add' title='Simpan' class=zImgBtn onclick=\"addDetail()\" src='images/save.png'/>";
     $table .= "&nbsp;<img id='detail_delete' /></td>";
     $table .= "</tr>";
     $table .= "</tbody>";
     $table .= "</table>";
     echo $table;
     break;
 case 'loadDetail':
     $sDt = "select * from " . $dbname . ".sdm_absensidt where kodeorg='" . $kdOrg . "' and tanggal='" . $tgAbsn . "'";
     $qDt = mysql_query($sDt) or die(mysql_error());
     while ($rDet = mysql_fetch_assoc($qDt)) {
         $optTipeKar = makeOption($dbname, 'sdm_5tipekaryawan', 'id,tipe');
         $sNm = "select namakaryawan,nik,tipekaryawan from " . $dbname . ".datakaryawan where karyawanid='" . $rDet['karyawanid'] . "'";
         $qNm = mysql_query($sNm) or die(mysql_error());
Example #13
0
$optOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', $where, '0');
$optPt = "<option value=''>" . $_SESSION['lang']['pilihdata'] . "</option>";
$sOPt = "select distinct kodeorganisasi,namaorganisasi from " . $dbname . ".organisasi where " . $where . "";
$qOpt = mysql_query($sOPt) or die(mysql_error($conn));
while ($rOpt = mysql_fetch_assoc($qOpt)) {
    $optPt .= "<option value=" . $rOpt['kodeorganisasi'] . ">" . $rOpt['namaorganisasi'] . "</option>";
}
#======End Select Prep======
#=======Form============
echo "<div style='margin-bottom:30px'>";
$els = array();
# Fields
$els[] = array(makeElement('kodeorg', 'label', $_SESSION['lang']['kodeorg']), makeElement('kodeorg', 'select', '', array('style' => 'width:150px'), $optOrg));
$els[] = array(makeElement('kodekelompok', 'label', $_SESSION['lang']['kodekelompok']), makeElement('kodekelompok', 'text', '', array('style' => 'width:100px', 'maxlength' => '5', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('keterangan', 'label', $_SESSION['lang']['keterangan']), makeElement('keterangan', 'text', '', array('style' => 'width:250px', 'maxlength' => '45', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('nokounter', 'label', $_SESSION['lang']['nokounter']), makeElement('nokounter', 'text', '0', array('style' => 'width:70px', 'maxlength' => '11', 'onkeypress' => 'return angka_doang(event)')));
# Fields
$fieldStr = '##kodeorg##kodekelompok##keterangan##nokounter';
$fieldArr = explode("##", substr($fieldStr, 2, strlen($fieldStr) - 2));
# Button
$els['btn'] = array(genFormBtn($fieldStr, 'keu_5kelompokjurnal', "##kodeorg##kodekelompok"));
# Generate Field
echo genElTitle($_SESSION['lang']['kodekelompok'] . " " . $_SESSION['lang']['jurnal'], $els);
echo "</div><br /><br /><br /><br /><br /><br /><br /><br />";
#=======End Form============
echo "\r\n<fieldset style=width=30px;float:left;>\r\n<legend style='font-weight:bold'>Reset Counter</legend>\r\n<table cellpading=1 border=0>\r\n<tr><td><select id=kodePt name=kodePt style='width:150px;'>" . $optPt . "</select><button class=mybutton onclick=\"resetJurnal()\">" . $_SESSION['lang']['save'] . "</button>\r\n</table>\r\n</fieldset><br /><br /><br /><br />";
#=======Table===============
# Display Table
echo "<div style='clear:both;float:left'>";
echo masterTable($dbname, 'keu_5kelompokjurnal');
echo "</div>";
?>
</td>
		</tr>
		<tr>
			<td><?php 
echo $_SESSION['lang']['sumberbibit'];
?>
</td>
			<td><?php 
echo makeElement('sumber', 'select', '', array('style' => 'width:150px'), $optSumber);
?>
</td>
		</tr>
		<tr>
			<td><?php 
echo makeElement('btnPreview', 'btn', $_SESSION['lang']['preview'], array('onclick' => 'preview()'));
?>
</td>
		</tr>
	</table>
</fieldset>

<?php 
CLOSE_BOX();
OPEN_BOX();
?>

<fieldset>
	<legend><b><?php 
echo $_SESSION['lang']['preview'];
?>
 }
 if (!empty($param['sYm'])) {
     $sPo .= " and a.tanggal like '%" . $param['sYm'] . "%'";
 }
 $sPo .= " order by a.tanggal asc";
 $qPo = mysql_query($sPo) or die(mysql_error($conn));
 $key = $no = 0;
 while ($rPo = mysql_fetch_assoc($qPo)) {
     // Cek Track Pelunasan
     $sBayar = "select distinct sum(jumlah) as jmlhKas from " . $dbname . ".keu_kasbankdt where keterangan1='" . $rPo['noinvoice'] . "'";
     $resBayar = fetchData($sBayar);
     $sisa = $rPo['nilaiinvoice'] - $resBayar[0]['jmlhKas'];
     if ($sisa > 0) {
         $no += 1;
         $dat .= "<tr class='rowcontent'>";
         $dat .= "<td>" . makeElement('inv_' . $key, 'checkbox', '', array('class' => 'inv-chk', 'invNo' => $rPo['noinvoice'], 'sisa' => $sisa)) . "</td>";
         $dat .= "<td>" . $rPo['noinvoice'] . "</td>";
         $dat .= "<td>" . $rPo['nokontrak'] . "</td>";
         $dat .= "<td>" . $optNmsupp[$rPo['kodecustomer']] . "</td>";
         $dat .= "<td>" . $rPo['namabarang'] . "</td>";
         $dat .= "<td align=right>" . number_format($rPo['nilaiinvoice'], 2) . "</td>";
         $dat .= "<td align=right>" . number_format($rPo['nilaippn'], 2) . "</td>";
         $dat .= "<td align=right>" . number_format($resBayar[0]['jmlhKas'], 2) . "</td>";
         $dat .= "<td align=right>" . number_format($sisa, 2) . "</td>";
         $key++;
     }
 }
 // while
 setIt($rJmlh['jmlhKas'], 0);
 setIt($rCek['jmlhinvoice'], 0);
 $dat .= "</tbody></table></div></fieldset>";
Example #16
0
$optOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', $whereOrg, '1');
$optAktif['1'] = $_SESSION['lang']['aktif'];
$optAktif['0'] = $_SESSION['lang']['tidakaktif'];
//#======End Select Prep======
#=======Form============
echo "<div style='margin-bottom:30px'>";
$els = array();
# Fields
$els[] = array(makeElement('kodeorg', 'label', $_SESSION['lang']['kodeorg']), makeElement('kodeorg', 'select', '', array('style' => 'width:250px'), $optOrg));
$els[] = array(makeElement('kelompok', 'label', $_SESSION['lang']['kelompok']), makeElement('kelompok', 'select', '', array('style' => 'width:250px', 'onchange' => 'cekAkun()'), $optKlpKeg));
$els[] = array(makeElement('noakun', 'label', $_SESSION['lang']['noakun']), makeElement('noakun', 'select', '', array('style' => 'width:250px', 'onchange' => 'cekAkun();ambilkegiatan()'), $optAkun));
$els[] = array(makeElement('kodekegiatan', 'label', $_SESSION['lang']['kodekegiatan']), makeElement('kodekegiatan', 'text', '', array('style' => 'width:60px', 'maxlength' => '9', 'disabled' => 'disabled')));
$els[] = array(makeElement('namakegiatan', 'label', $_SESSION['lang']['namakegiatan']), makeElement('namakegiatan', 'text', '', array('style' => 'width:250px', 'maxlength' => '80')));
$els[] = array(makeElement('namakegiatan1', 'label', $_SESSION['lang']['namakegiatan'] . "(EN)"), makeElement('namakegiatan1', 'text', '', array('style' => 'width:250px', 'maxlength' => '80')));
$els[] = array(makeElement('satuan', 'label', $_SESSION['lang']['satuan']), makeElement('satuan', 'text', '', array('style' => 'width:250px', 'maxlength' => '8')));
$els[] = array(makeElement('status', 'label', $_SESSION['lang']['status']), makeElement('status', 'select', '', array('style' => 'width:250px'), $optAktif));
# Fields
$fieldStr = '##kodeorg##kodekegiatan##namakegiatan##namakegiatan1##kelompok##satuan##noakun##status';
//$fieldArr = explode("##",substr($fieldStr,2,strlen($fieldStr)-2));
# Button
$els['btn'] = array(genFormBtn($fieldStr, 'setup_kegiatan', "##kodekegiatan##kodeorg##kelompok", null, null, null, null, '##', '##kodekegiatan'));
//$optKlp = makeOption($dbname,'setup_klpkegiatan',"kodeklp,noakun",
//					 "kodeorg in ('".array_keys($optOrg)."')");
$qKlp = selectQuery($dbname, 'setup_klpkegiatan', 'kodeorg,kodeklp,noakun', "kodeorg in ('" . implode("','", array_keys($optOrg)) . "')");
$resKlp = fetchData($qKlp);
$optKlp = array();
foreach ($resKlp as $row) {
    $optKlp[$row['kodeorg']][$row['kodeklp']] = $row['noakun'];
}
# Generate Field
echo genElTitle($_SESSION['lang']['kegiatan'], $els);
     $table .= "<td>" . $_SESSION['lang']['lewatmatang'] . "</td>";
     $table .= "<td colspan=3>Action</td>";
     $table .= "</tr>";
     $table .= "</thead>";
     $table .= "<tbody id='detailBody'>";
     $table .= "<tr id='detail_tr' class='rowcontent'>";
     $table .= "<td>" . makeElement("blok", 'select', '', array('style' => 'width:150px', 'onchange' => "getBjr()"), $optBlok) . "<img src=images/search.png class=dellicon onclick=\"searchBrg('" . $_SESSION['lang']['find'] . " " . $_SESSION['lang']['blok'] . "','<fieldset><legend>" . $_SESSION['lang']['find'] . "</legend>" . $_SESSION['lang']['blok'] . "<input type=text class=myinputtext id=no_brg><button class=mybutton onclick=findBrg()>" . $_SESSION['lang']['find'] . "</button></fieldset><div id=container></div><input type=hidden id=kdafd value=" . $kdOrg . " />',event)\"; /><input type=hidden id=oldBlok name=oldBlok value='' /></td>";
     //array('style'=>'width:150px','onchange'=>""),$optBlok)."<input type=hidden id=oldBlok name=oldBlok value='' /></td>";
     $table .= "<td>" . makeElement("bjr", 'textnum', '0', array('style' => 'width:80px', 'onkeypress' => 'return angka_doang(event)', 'maxlength' => '5', 'disabled' => 'true')) . "</td>";
     $table .= "<td>" . makeElement("jjng", 'textnum', '0', array('style' => 'width:80px', 'onkeypress' => 'return angka_doang(event)', 'maxlength' => '5')) . "</td>";
     $table .= "<td>" . makeElement("brondln", 'textnum', '0', array('style' => 'width:80px', 'onkeypress' => 'return angka_doang(event)', 'maxlength' => '5')) . "</td>";
     $table .= "<td hidden>" . makeElement("kgwb", 'textnum', '0', array('style' => 'width:135px', 'onkeypress' => 'return angka_doang(event)', 'maxlength' => '5')) . "</td>";
     $table .= "<td>" . makeElement("mnth", 'textnum', '0', array('style' => 'width:30px', 'onkeypress' => 'return angka_doang(event)', 'maxlength' => '5', 'disabled' => 'true')) . "</td>";
     $table .= "<td>" . makeElement("bsk", 'textnum', '0', array('style' => 'width:30px', 'onkeypress' => 'return angka_doang(event)', 'maxlength' => '5', 'disabled' => 'true')) . "</td>";
     $table .= "<td>" . makeElement("mtng", 'textnum', '0', array('style' => 'width:30px', 'onkeypress' => 'return angka_doang(event)', 'maxlength' => '5', 'disabled' => 'true')) . "</td>";
     $table .= "<td>" . makeElement("lwtmtng", 'textnum', '0', array('style' => 'width:30px', 'onkeypress' => 'return angka_doang(event)', 'maxlength' => '5', 'disabled' => 'true')) . "</td>";
     # Add, Container Delete
     $table .= "<td><img id='detail_add' title=" . $_SESSION['lang']['save'] . " class=zImgBtn onclick=\"addDetail()\" src='images/save.png'/>";
     $table .= "&nbsp;<img id='detail_delete' /></td>";
     $table .= "</tr>";
     $table .= "<tr><td colspan=10><font color=red>KG WB di isi untuk Kebun yang belum memiliki Mill (Pabrik)</font></td></tr>";
     $table .= "</tbody>";
     //  $table .= "</table>";
     echo $table;
     break;
 case 'detail_add':
     $lokasi = $_SESSION['empl']['lokasitugas'];
     $lokasi = substr($lokasi, 0, 4);
     $entry_by = $_SESSION['standard']['userid'];
     #Check Header
     if ($data['jjng'] == '' or $data['brondolan'] == '' or $data['bjr'] == '') {
     $query = "select distinct a.kodesegment,a.namasegment from " . $dbname . ".keu_5segment a\r\n\t\t\t\t\tleft join " . $dbname . ".keu_5proporsisegment b on a.kodesegment=b.kodesegment\r\n\t\t\t\t\twhere b.kodeblok='" . $blok . "' or a.kodesegment = '" . $defaultSegment . "'";
     $res = fetchData($query);
     $optSegment = array();
     foreach ($res as $row) {
         $optSegment[$row['kodesegment']] = $row['namasegment'];
     }
     # Prepare New
     $i = $param['numRow2'] + 1;
     $row = "<td>" . makeElement('blokalokasi_' . $param['numRow1'] . '_' . $i, 'select', '', array(), $optBlok) . "</td>";
     $row .= "<td>" . makeElement('kodesegment_' . $param['numRow1'] . '_' . $i, 'select', '', array(), $optSegment) . "</td>";
     $row .= "<td>" . makeElement('tanggal_' . $param['numRow1'] . '_' . $i, 'date') . "</td>";
     $row .= "<td>" . makeElement('matauang_' . $param['numRow1'] . '_' . $i, 'text', $param['matauang'], array('disabled' => 'disabled')) . "</td>";
     $row .= "<td>" . makeElement('hkrealisasi_' . $param['numRow1'] . '_' . $i, 'textnum', 0) . "</td>";
     $row .= "<td>" . makeElement('hasilkerjarealisasi_' . $param['numRow1'] . '_' . $i, 'textnum', 0, array('onkeyup' => "calJumlah(" . $param['numRow1'] . "," . $i . ")")) . "</td>";
     $row .= "<td>" . makeElement('jumlahrealisasi_' . $param['numRow1'] . '_' . $i, 'textnum', 0, array('onchange' => 'this.value=remove_comma(this);this.value = _formatted(this)')) . "</td>";
     $row .= "<td>" . makeElement('jjgkontanan_' . $param['numRow1'] . '_' . $i, 'textnum', 0, array('onchange' => 'this.value=remove_comma(this);this.value = _formatted(this)', 'disabled' => 'disabled')) . "</td>";
     $row .= "<td><img id='btn_" . $param['numRow1'] . "_" . $i . "' class='zImgBtn' ";
     $row .= "src='images/" . $_SESSION['theme'] . "/plus.png' ";
     $row .= "onclick=\"addData(" . $param['numRow1'] . "," . $i . ",'" . $_SESSION['theme'] . "')\">&nbsp;";
     $row .= "<img id='btnDel_" . $param['numRow1'] . '_' . $i . "' class='zImgBtn' ";
     $row .= "src='images/" . $_SESSION['theme'] . "/delete.png' style='display:none'";
     $row .= "onclick='deleteData(" . $param['numRow1'] . "," . $i . ")'>&nbsp;";
     $row .= "<img id='btnPost_" . $param['numRow1'] . '_' . $i . "' class='zImgBtn' ";
     $row .= "src='images/" . $_SESSION['theme'] . "/posting.png' ";
     $row .= "onclick=\"postingData(" . $param['numRow1'] . "," . $i . ",'" . $_SESSION['theme'] . "')\" style='display:none'>&nbsp;";
     $row .= "<img id='btnRev_" . $param['numRow1'] . '_' . $i . "' class='zImgBtn' style='display:none'";
     $row .= "src='images/" . $_SESSION['theme'] . "/zoom.png' ";
     $row .= "onclick=\"revisiData(" . $param['numRow1'] . "," . $i . ",'" . $_SESSION['theme'] . "')\">";
     $row .= "</td>";
     echo $row;
 }
		<td><?php 
echo $_SESSION['lang']['satuan'];
?>
</td>
	</tr></thead>
	<tbody id=bodySearch>
		<?php 
$i = 0;
foreach ($data as $key => $row) {
    ?>
		<?php 
    if (isset($optData[$row['nopo']][$row['nopp']][$row['kodebarang']]) and $row['jumlahpesan'] > $optData[$row['nopo']][$row['nopp']][$row['kodebarang']] or !isset($optData[$row['nopo']][$row['nopp']][$row['kodebarang']])) {
        ?>
		<tr class=rowcontent>
			<td><?php 
        echo makeElement('po_' . $i, 'checkbox', 0);
        ?>
</td>
			<td id="nopo_<?php 
        echo $i;
        ?>
"><?php 
        echo $row['nopo'];
        ?>
</td>
			<td id="kodebarang_<?php 
        echo $i;
        ?>
"><?php 
        echo $row['kodebarang'];
        ?>
function formHeader($mode, $data)
{
    global $dbname;
    //print_r($data);
    //exit("Error");
    # Default Value
    if (empty($data)) {
        $data['kodeorg'] = '';
        $data['notransaksi'] = '0';
        $data['tanggal'] = '';
        $data['divisi'] = '';
        $data['koderekanan'] = '';
        $data['matauang'] = '';
    }
    # Disabled Primary
    if ($mode == 'edit') {
        $disabled = 'disabled';
    } else {
        $disabled = '';
    }
    # Options
    $whereOrg = "kodeorganisasi='" . $data['kodeorg'] . "'";
    $optOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', $whereOrg);
    $whereDiv = "kodeorganisasi='" . $data['divisi'] . "'";
    $optDiv = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', $whereDiv, '0', true);
    $optDiv[''] = 'Project';
    $optSup = makeOption($dbname, 'log_5supplier', 'supplierid,namasupplier', "supplierid='" . $data['koderekanan'] . "'");
    #khusus jika project
    if (substr($data['divisi'], 0, 2) == 'AK' or substr($data['divisi'], 0, 2) == 'PB') {
        $optDiv = makeOption($dbname, 'project', 'kode,nama', "kode='" . $data['divisi'] . "' and posting=0");
    }
    $els = array();
    $els[] = array(makeElement('kodeorg', 'label', $_SESSION['lang']['kebun']), makeElement('kodeorg', 'select', $data['kodeorg'], array('style' => 'width:150px', 'disabled' => 'disabled'), $optOrg));
    $els[] = array(makeElement('notransaksi', 'label', $_SESSION['lang']['notransaksi']), makeElement('notransaksi', 'text', $data['notransaksi'], array('style' => 'width:150px', 'disabled' => 'disabled')));
    $els[] = array(makeElement('tanggal', 'label', $_SESSION['lang']['tanggal']), makeElement('tanggal', 'text', $data['tanggal'], array('style' => 'width:150px', 'disabled' => 'disabled')));
    $els[] = array(makeElement('divisi', 'label', $_SESSION['lang']['subunit']), makeElement('divisi', 'select', $data['divisi'], array('style' => 'width:150px', 'disabled' => 'disabled'), $optDiv));
    $els[] = array(makeElement('koderekanan', 'label', $_SESSION['lang']['koderekanan']), makeElement('koderekanan', 'select', $data['koderekanan'], array('style' => 'width:150px', 'disabled' => 'disabled'), $optSup));
    $els[] = array(makeElement('matauang', 'label', ''), makeElement('matauang', 'hidden', $data['matauang'], array('style' => 'width:150px', 'disabled' => 'disabled')));
    return genElementMultiDim($_SESSION['lang']['header'], $els, 2);
}
function createTabDetail($id, $data)
{
    global $dbname;
    global $conn;
    //echo "<button class=mybutton onclick=addNewRow('detailBody',true)>Add Details</button><br />";
    $table = "<b>" . $_SESSION['lang']['notransaksi'] . "</b> : " . makeElement("detail_kode", 'text', $id, array('disabled' => 'disabled', 'style' => 'width:150px'));
    $table .= "<table id='ppDetailTable'>";
    # Header
    $table .= "<thead>";
    $table .= "<tr>";
    $table .= "<td>" . $_SESSION['lang']['kodebarang'] . "</td>";
    $table .= "<td>" . $_SESSION['lang']['namabarang'] . "</td>";
    $table .= "<td>" . $_SESSION['lang']['satuan'] . "</td>";
    $table .= "<td>" . $_SESSION['lang']['jumlah'] . "</td>";
    $table .= "<td>" . $_SESSION['lang']['keterangan'] . "</td>";
    //    $table .= "<td>"."<a href=# onclick=addNewRow(detailBody,true)><img src='images\newfile.png'></a>"."</td>";
    $table .= "<td colspan=3>Action</td>";
    $table .= "</tr>";
    $table .= "</thead>";
    # Data
    $table .= "<tbody id='detailBody'>";
    $i = 0;
    #======= Display Data =======
    if ($data != array()) {
        foreach ($data as $key => $row) {
            $sbrg = "select * from " . $dbname . ".log_5masterbarang where kodebarang='" . $row['kodebarang'] . "'";
            $qbrg = mysql_query($sbrg) or die(mysql_error());
            $res = mysql_fetch_assoc($qbrg);
            $table .= "<tr id='detail_tr_" . $key . "' class='rowcontent'>";
            $table .= "<td>" . makeElement("kd_brg_" . $key . "", 'txt', $row['kodebarang'], array('style' => 'width:120px', 'disabled' => 'disabled', 'class=myinputtext')) . "<input type=hidden value='" . $row['kodebarang'] . "' name=skd_brg_" . $key . " id=skd_brg_" . $key . " /></td>";
            $table .= "<td>" . makeElement("nm_brg_" . $key . "", 'txt', $res['namabarang'], array('style' => 'width:120px', 'disabled' => 'disabled', 'class=myinputtext')) . "</td>";
            $table .= "<td>" . makeElement("sat_" . $key . "", 'txt', $row['satuan'], array('style' => 'width:70px', 'disabled' => 'disabled', 'class=myinputtext')) . "<img src=images/search.png class=dellicon title=" . $_SESSION['lang']['find'] . " onclick=\"searchBrg('" . $_SESSION['lang']['findBrg'] . "','<fieldset><legend>" . $_SESSION['lang']['findnoBrg'] . "</legend>Find<input type=text class=myinputtext id=no_brg><button class=mybutton onclick=findBrg()>Find</button></fieldset><div id=container></div><input type=hidden id=nomor name=nomor value=" . $key . ">',event)\";></td>";
            $table .= "<td>" . makeElement("jmlh_" . $key . "", 'textnum', $row['jumlah'], array('style' => 'width:70px', 'onkeypress' => 'return angka_doang(event)')) . "</td>";
            $table .= "<td>" . makeElement("ket_" . $key . "", 'text', $row['keterangan'], array('style' => 'width:130px', 'onkeypress' => 'return tanpa_kutip(event)')) . "</td>";
            $table .= "<td><img id='detail_edit_" . $key . "' title='Edit' class=zImgBtn onclick=\"editDetail('" . $key . "')\" src='images/001_45.png'/>";
            $table .= "&nbsp;<img id='detail_delete_" . $key . "' title='Hapus' class=zImgBtn onclick=\"deleteDetail('" . $key . "')\" src='images/delete_32.png'/></td>";
            $table .= "</tr>";
            $i = $key;
        }
        $i++;
    }
    #======= New Row ===========
    $table .= "<tr id='detail_tr_" . $i . "' class='rowcontent'>";
    $table .= "<td>" . makeElement("kd_brg_" . $i . "", 'txt', '', array('style' => 'width:120px', 'disabled' => 'disabled', 'class=myinputtext')) . "<input type=hidden id=skd_brg_" . $i . " name=skd_brg_" . $i . " /></td>";
    $table .= "<td>" . makeElement("nm_brg_" . $i . "", 'txt', '', array('style' => 'width:120px', 'disabled' => 'disabled', 'class=myinputtext')) . "</td>";
    $table .= "<td>" . makeElement("sat_" . $i . "", 'txt', '', array('style' => 'width:70px', 'disabled' => 'disabled', 'class=myinputtext')) . "<img src=images/search.png class=dellicon title=" . $_SESSION['lang']['find'] . " onclick=\"searchBrg('" . $_SESSION['lang']['findBrg'] . "','<fieldset><legend>" . $_SESSION['lang']['findnoBrg'] . "</legend>Find<input type=text class=myinputtext id=no_brg><button class=mybutton onclick=findBrg()>Find</button></fieldset><input type=hidden id=nomor name=nomor value=" . $i . "><div id=container></div>',event)\";></td>";
    //$table .= "<td>".makeElement("sat_".$i."",'select',$row['satuan'],array('style'=>'width:70px','class=myinputtext'),$optSatuan)."</td>";
    $table .= "<td>" . makeElement("jmlh_" . $i . "", 'textnum', '', array('style' => 'width:70px', 'onkeypress' => 'return angka_doang(event)')) . "</td>";
    $table .= "<td>" . makeElement("ket_" . $i . "", 'text', '', array('style' => 'width:130px', 'onkeypress' => 'return tanpa_kutip(event)', 'maxlength' => '45')) . "</td>";
    # Add, Container Delete
    $table .= "<td><img id='detail_add_" . $i . "' title='Simpan' class=zImgBtn onclick=\"addDetail('" . $i . "')\" src='images/save.png'/>";
    $table .= "&nbsp;<img id='detail_delete_" . $i . "' /></td>";
    $table .= "</tr>";
    $table .= "</tbody>";
    $table .= "</table>";
    echo $table;
}
         $t++;
     }
     for ($y = 0; $y < 60;) {
         if (strlen($y) < 2) {
             $y = "0" . $y;
         }
         $mnt .= "<option value=" . $y . " " . ($y == 00 ? 'selected' : '') . ">" . $y . "</option>";
         $y++;
     }
     $table .= "<tr id='detail_tr' class='rowcontent'>";
     $table .= "<td>" . makeElement("krywnId", 'select', '', array('style' => 'width:150px'), $optKry) . "</td>";
     $table .= "<td><select id=tpLmbr>" . $optLmbr2 . "</select></td>";
     $table .= "<td><select id=jmId name=jmId >" . $jm . "</select>:<select id=mntId name=mntId >" . $mnt . "</select></td>";
     $table .= "<td>" . makeElement("uang_mkn", 'textnum', 0, array('style' => 'width:100px', 'onkeypress' => 'return angka_doang(event)', 'maxlength' => '10', 'onblur' => "chngeFormat()", 'onfocus' => "normal_number_1()")) . "</td>";
     $table .= "<td>" . makeElement("uang_trnsprt", 'textnum', 0, array('style' => 'width:100px', 'onkeypress' => 'return angka_doang(event)', 'maxlength' => '10', 'onblur' => "chngeFormat()", 'onfocus' => "normal_number_2()")) . "</td>";
     $table .= "<td>" . makeElement("uang_lbhjm", 'textnum', 0, array('style' => 'width:100px', 'onkeypress' => 'return angka_doang(event)', 'maxlength' => '10', 'onblur' => "chngeFormat()", 'onfocus' => "normal_number_3()")) . "</td>";
     # Add, Container Delete
     $table .= "<td><img id='detail_add' title='Simpan' class=zImgBtn onclick=\"addDetail()\" src='images/save.png'/>";
     $table .= "&nbsp;<img id='detail_delete' /></td>";
     $table .= "</tr>";
     $table .= "</tbody>";
     $table .= "</table>";
     echo $table;
     break;
 case 'loadDetail':
     $sDt = "select * from " . $dbname . ".sdm_lemburdt where kodeorg='" . $kdOrg . "' and tanggal='" . $tgl . "'";
     $qDt = mysql_query($sDt) or die(mysql_error());
     $totum = $totut = $totle = 0;
     while ($rDet = mysql_fetch_assoc($qDt)) {
         $sNm = "select namakaryawan from " . $dbname . ".datakaryawan where karyawanid='" . $rDet['karyawanid'] . "'";
         $qNm = mysql_query($sNm) or die(mysql_error());
Example #23
0
if ($_SESSION['empl']['subbagian'] == '') {
    $whereCont = "tipetransaksi='PNN'";
} else {
    $whereCont = "tipetransaksi='PNN' and updateby='" . $_SESSION['standard']['userid'] . "'";
}
$whereContArr = array();
$whereContArr[] = array('tipetransaksi', 'PNN');
#=== Prep Control & Search
$ctl = array();
# Control
$tmpWhere = json_encode($whereContArr);
$jsWhere = str_replace('"', "'", $tmpWhere);
$ctl[] = "<div align='center'><img class=delliconBig src=images/" . $_SESSION['theme'] . "/addbig.png title='" . $_SESSION['lang']['new'] . "' onclick=\"showAdd('" . $tipeVal . "')\"><br><span align='center'>" . $_SESSION['lang']['new'] . "</span></div>";
$ctl[] = "<div align='center'><img class=delliconBig src=images/" . $_SESSION['theme'] . "/list.png title='" . $_SESSION['lang']['list'] . "' onclick=\"defaultList('" . $tipeVal . "')\"><br><span align='center'>" . $_SESSION['lang']['list'] . "</span></div>";
# Search
$ctl[] = "<fieldset><legend><b>" . $_SESSION['lang']['find'] . "</b></legend>" . makeElement('sNoTrans', 'label', $_SESSION['lang']['notransaksi']) . makeElement('sNoTrans', 'text', '') . makeElement('sFind', 'btn', $_SESSION['lang']['find'], array('onclick' => "searchTrans('" . $tipe . "','" . $tipeVal . "')")) . "</fieldset>";
#=== Table Aktivitas
# Header
$header = array($_SESSION['lang']['nomor'], $_SESSION['lang']['organisasi'], $_SESSION['lang']['tanggal'], $_SESSION['lang']['nikmandor'], $_SESSION['lang']['nikmandor1'], $_SESSION['lang']['keraniproduksi'], $_SESSION['lang']['keranimuat'], 'updateby');
# Content
$cols = "notransaksi,kodeorg,tanggal,nikmandor,nikmandor1,nikasisten,keranimuat,jurnal,updateby";
$query = selectQuery($dbname, 'kebun_aktifitas', $cols, $whereCont . " and kodeorg='" . $_SESSION['empl']['lokasitugas'] . "'", "tanggal desc, notransaksi desc", false, 10, 1);
$data = fetchData($query);
$totalRow = getTotalRow($dbname, 'kebun_aktifitas', $whereCont);
if (!empty($data)) {
    $whereKarRow = "karyawanid in (";
    $notFirst = false;
    foreach ($data as $key => $row) {
        if ($row['jurnal'] == 1) {
            $data[$key]['switched'] = true;
        }
Example #24
0
function formHeader($mode, $data)
{
    global $dbname;
    # Default Value
    if (empty($data)) {
        $data['notransaksi'] = '';
        $data['kodeorg'] = $_SESSION['empl']['lokasitugas'];
        $data['noakun'] = '';
        $data['tanggal'] = '';
        $data['tipetransaksi'] = '';
        $data['jumlah'] = '0';
        $data['matauang'] = 'IDR';
        $data['kurs'] = '1';
        $data['cgttu'] = '';
        $data['keterangan'] = '';
        $data['yn'] = '0';
        $data['oldNoakun'] = '';
        $data['hutangunit'] = 0;
        $data['pemilikhutang'] = '';
        $data['nocek'] = '';
        $data['noakunhutang'] = '';
    } else {
        $data['jumlah'] = number_format($data['jumlah'], 2);
    }
    # Disabled Primary
    if ($mode == 'edit') {
        $disabled = 'disabled';
    } else {
        $disabled = '';
    }
    # Options
    $whereJam = " kasbank=1 and detail=1 and (pemilik='" . $_SESSION['empl']['tipelokasitugas'] . "' or pemilik='GLOBAL' or pemilik='" . $_SESSION['empl']['lokasitugas'] . "')";
    $optMataUang = makeOption($dbname, 'setup_matauang', 'kode,matauang');
    $optOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', "kodeorganisasi='" . $_SESSION['empl']['lokasitugas'] . "'");
    if ($_SESSION['language'] == 'EN') {
        $optAkun = makeOption($dbname, 'keu_5akun', 'noakun,namaakun1', $whereJam);
    } else {
        $optAkun = makeOption($dbname, 'keu_5akun', 'noakun,namaakun', $whereJam);
    }
    $optTipe = array('M' => $_SESSION['lang']['masuk'], 'K' => $_SESSION['lang']['keluar']);
    $optCgt = getEnum($dbname, 'keu_kasbankht', 'cgttu');
    $optYn = array(0 => $_SESSION['lang']['belumposting'], 1 => $_SESSION['lang']['posting']);
    $wheredz = " kodeorganisasi != '" . $_SESSION['empl']['lokasitugas'] . "' and length(kodeorganisasi)=4";
    $wheredx = " (noakun like '211%' or noakun like '213%' or noakun like '212%') and length(noakun)=7";
    $optPemilikHutang = makeOption($dbname, 'organisasi', 'kodeorganisasi,kodeorganisasi', $wheredz);
    $optNoakunHutang = makeOption($dbname, 'keu_5akun', 'noakun,namaakun', $wheredx, '2');
    $optPemilikHutang[''] = '';
    ksort($optPemilikHutang);
    $optNoakunHutang[''] = '';
    ksort($optNoakunHutang);
    $optHutangUnit = array('0' => $_SESSION['lang']['ya'], '1' => $_SESSION['lang']['tidak']);
    //    echo "Warning: <pre>".print_r($optNoakunHutang).'</pre>';
    //    exit;
    $els = array();
    $els[] = array(makeElement('notransaksi', 'label', $_SESSION['lang']['notransaksi']), makeElement('notransaksi', 'text', $data['notransaksi'], array('style' => 'width:150px', 'maxlength' => '25', 'disabled' => 'disabled')));
    $els[] = array(makeElement('kodeorg', 'label', $_SESSION['lang']['unitkerja']), makeElement('kodeorg', 'select', $data['kodeorg'], array('style' => 'width:150px', $disabled => $disabled), $optOrg));
    $els[] = array(makeElement('noakun2a', 'label', $_SESSION['lang']['noakun']), makeElement('noakun2a', 'select', $data['noakun'], array('style' => 'width:150px'), $optAkun));
    //    $els[] = array(
    //	makeElement('noakun2a','label',$_SESSION['lang']['noakun']),
    //	makeElement('noakun2a','select',$data['noakun'],
    //	    array('style'=>'width:150px',$disabled=>$disabled),$optAkun)
    //    );
    //
    $els[] = array(makeElement('tanggal', 'label', $_SESSION['lang']['tanggal']), makeElement('tanggal', 'text', $data['tanggal'], array('style' => 'width:150px', 'readonly' => 'readonly', 'onchange' => "getKurs()", 'onmousemove' => 'setCalendar(this.id)')));
    $els[] = array(makeElement('matauang', 'label', $_SESSION['lang']['matauang']), makeElement('matauang', 'select', $data['matauang'], array('style' => 'width:150px', 'onchange' => "getKurs()"), $optMataUang));
    $els[] = array(makeElement('kurs', 'label', $_SESSION['lang']['kurs']), makeElement('kurs', 'textnum', $data['kurs'], array('style' => 'width:150px', 'disabled' => 'disabled', 'onkeyup' => 'cekKurs()')));
    $els[] = array(makeElement('tipetransaksi', 'label', $_SESSION['lang']['tipetransaksi']), makeElement('tipetransaksi', 'select', $data['tipetransaksi'], array('style' => 'width:150px', $disabled => $disabled), $optTipe));
    $els[] = array(makeElement('nocek', 'label', 'No. Bukti Bayar'), makeElement('nocek', 'text', $data['nocek'], array('style' => 'width:150px')));
    $els[] = array(makeElement('oldNoakun', 'hid', $data['noakun']));
    $els[] = array(makeElement('jumlah', 'label', $_SESSION['lang']['jumlah']), makeElement('jumlah', 'textnum', $data['jumlah'], array('style' => 'width:150px', 'onchange' => 'this.value=remove_comma(this);this.value = _formatted(this)')));
    $els[] = array(makeElement('cgttu', 'label', $_SESSION['lang']['cgttu']), makeElement('cgttu', 'select', $data['cgttu'], array('style' => 'width:150px'), $optCgt));
    $els[] = array(makeElement('keterangan', 'label', $_SESSION['lang']['keterangan']), makeElement('keterangan', 'text', $data['keterangan'], array('style' => 'width:150px', 'maxlength' => '85')));
    $els[] = array(makeElement('yn', 'label', $_SESSION['lang']['yn']), makeElement('yn', 'select', $data['yn'], array('style' => 'width:150px', 'disabled' => 'disabled'), $optYn));
    if ($data['hutangunit'] == 0) {
        $dis = 'disabled';
    } else {
        $dis = '';
    }
    //    $els[] = array(
    //	makeElement('hutangunit','label',$_SESSION['lang']['hutangunit']),
    //        makeElement('hutangunit','checkbox',$data['hutangunit'],
    //                array('onclick'=>"pilihhutang()")),
    //        makeElement('pemilikhutang','select',$data['pemilikhutang'],
    //	    array('style'=>'width:100px',$dis=>$dis),$optPemilikHutang),
    //        makeElement('noakunhutang','select',$data['noakunhutang'],
    //	    array('style'=>'width:100px',$dis=>$dis),$optNoakunHutang),
    //    );
    $els[] = array(makeElement('hutangunit', 'label', $_SESSION['lang']['hutangunit']), makeElement('hutangunit', 'checkbox', $data['hutangunit'], array('onclick' => "pilihhutang()")));
    $els[] = array(makeElement('pemilikhutang', 'label', $_SESSION['lang']['pemilikhutang']), makeElement('pemilikhutang', 'select', $data['pemilikhutang'], array('style' => 'width:150px', $dis => $dis), $optPemilikHutang));
    $els[] = array(makeElement('noakunhutang', 'label', $_SESSION['lang']['noakunhutang']), makeElement('noakunhutang', 'select', $data['noakunhutang'], array('style' => 'width:150px', $dis => $dis), $optNoakunHutang));
    if ($mode == 'add') {
        $els['btn'] = array(makeElement('addHead', 'btn', $_SESSION['lang']['save'], array('onclick' => "addDataTable()")));
    } elseif ($mode == 'edit') {
        $els['btn'] = array(makeElement('editHead', 'btn', $_SESSION['lang']['save'], array('onclick' => "editDataTable()")));
    }
    if ($mode == 'add') {
        return genElementMultiDim($_SESSION['lang']['addheader'], $els, 2);
    } elseif ($mode == 'edit') {
        return genElementMultiDim($_SESSION['lang']['editheader'], $els, 2);
    }
}
Example #25
0
?>
</td>
					<td><?php 
echo makeElement('sebar09', 'textnum', 1, array('style' => 'width:50px'));
?>
</td>
					<td><?php 
echo makeElement('sebar10', 'textnum', 1, array('style' => 'width:50px'));
?>
</td>
					<td><?php 
echo makeElement('sebar11', 'textnum', 1, array('style' => 'width:50px'));
?>
</td>
					<td><?php 
echo makeElement('sebar12', 'textnum', 1, array('style' => 'width:50px'));
?>
</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</fieldset>
<?php 
CLOSE_BOX();
OPEN_BOX();
?>
<fieldset><legend><?php 
echo $_SESSION['lang']['list'];
?>
Example #26
0
?>
</td>
<td>:</td>
<td><select id="idKbn" name="idKbn" style="width:150px;"><?php 
echo $optKbn;
?>
</select></td>
</tr>
<tr>
<td><?php 
echo $_SESSION['lang']['tahun'];
?>
</td>
<td>:</td>
<td><?php 
echo makeElement('tahun', 'select', date('Y'), array(), $optTahun);
?>
</td>
</tr>
<tr>
<td colspan="3" id="tmblHeader">
<button class=mybutton id='dtl_pem' onclick='previewData();'><?php 
echo $_SESSION['lang']['preview'];
?>
</button>
<button class=mybutton id='dtl_xls' onclick='detexcel(event);'><?php 
echo $_SESSION['lang']['excel'];
?>
</button>
</td>
</tr>
Example #27
0
//Detail Pekerjaan
$sjnskrj = "select * from " . $dbname . ".vhc_kegiatan order by noakun asc";
$qjnskrj = mysql_query($sjnskrj) or die(mysql_error());
$optJnsKerja = '';
while ($rjnskrj = mysql_fetch_assoc($qjnskrj)) {
    $optJnsKerja .= "<option value=" . $rjnskrj['kodekegiatan'] . ">" . $rjnskrj['noakun'] . " - " . $rjnskrj['namakegiatan'] . "</option>";
}
$slokTgs = "select kodeorganisasi,namaorganisasi from " . $dbname . ".organisasi where `tipe` NOT\nIN ('PT', 'BLOK', 'STATION', 'STENGINE','AFDELING')";
//IN ('PT', 'BLOK', 'HOLDING', 'STATION', 'STENGINE','AFDELING')";
$qlokTgs = mysql_query($slokTgs) or die(mysql_error());
$optLokTugas = '';
while ($rlokTgs = mysql_fetch_assoc($qlokTgs)) {
    $optLokTugas .= "<option value=" . $rlokTgs['kodeorganisasi'] . ">" . $rlokTgs['namaorganisasi'] . "</option>";
}
$frm[1] .= "<fieldset><legend>" . $_SESSION['lang']['vhc_detail_pekerjaan'] . "</legend>";
$frm[1] .= "<table cellspacing=1 border=0>\n<tr><td>" . $_SESSION['lang']['notransaksi'] . "</td><td>:</td><td>\n<input type=text id=no_trans_pekerjaan name=no_trans_pekerjaan disabled=disabled class=myinputtext style=width:150px; /></td></tr>\n<tr><td>" . $_SESSION['lang']['vhc_jenis_pekerjaan'] . "</td><td>:</td><td>\n<select id=jns_kerja name=jns_kerja onchange=getSatuan(this.value) style=width:150px;><option value=></option>" . $optJnsKerja . "</select>\n<input type=hidden name=old_jnskerja id=old_jnskerja />\n</td></tr>\n<tr><td>" . $_SESSION['lang']['alokasibiaya'] . "</td><td>:</td><td>\n<select id=lokasi_kerja name=lokasi_kerja  style=width:150px; onchange=\"getBlok('','')\"><option value=''>" . $_SESSION['lang']['pilihdata'] . "</option>" . $optLokTugas . "</select> \n<input type=hidden name=old_lokkerja id=old_lokkerja />\n</td></tr>\n<tr><td>&nbsp;</td><td>&nbsp;</td><td>\n<select id=blok name=blok  onchange=getSegment() style=width:150px; ><option value=''>" . $_SESSION['lang']['pilihdata'] . "</option></select> (* Obligatory if activity location on estate/Jika pekerjaan dilakukan di Kebun\n<input type=hidden name=old_blok id=old_blok />\n</td></tr>\n<tr><td>" . $_SESSION['lang']['segment'] . "</td><td>:</td>\n<td><input type=hidden name=oldSegment id=oldSegment />\n" . makeElement('kodesegment', 'searchSegment') . "</td>\n<tr><td>" . $_SESSION['lang']['prestasi'] . "</td><td>:</td>\n<td><input type=text class=myinputtextnumber id=brt_muatan name=brt_muatan maxlength=6 onkeypress=\"return angka_doang(event);\" style=width:150px; />&nbsp;<span id='satuan'></span></td> </tr>\n<tr><td>" . $_SESSION['lang']['jumlahrit'] . "</td><td>:</td><td>\n<input type=text class=myinputtextnumber id=jmlh_rit name=jmlh_rit maxlength=6 onkeypress=\"return angka_doang(event);\" style=width:150px; /></td></tr>\n<tr><td>" . $_SESSION['lang']['vhc_kmhm_awal'] . "</td><td>:</td><td>\n<input type=text class=myinputtextnumber id=kmhm_awal name=kmhm_awal maxlength=8 onkeypress=\"return angka_doang(event);\" style=width:150px; /></td></tr>\n<tr><td>" . $_SESSION['lang']['vhc_kmhm_akhir'] . "</td><td>:</td><td>\n<input type=text class=myinputtextnumber id=kmhm_akhir name=kmhm_akhir maxlength=8  onkeypress=\"return angka_doang(event);\" style=width:150px; /></td></tr>\n<tr><td>" . $_SESSION['lang']['satuan'] . "</td><td>:</td><td><select id=stn name=stn style=width:150px;>" . $optSatuanvhc . "</select></td></tr>\n<tr><td>" . $_SESSION['lang']['biaya'] . "</td><td>:</td><td>\n<input type=text class=myinputtextnumber id=biaya name=biaya maxlength=45 onkeypress=\"return angka_doang(event);\" style=width:150px; /> Rp</td></tr>\n\n<tr><td>" . $_SESSION['lang']['keterangan'] . "</td><td>:</td><td>\n<input type=text class=myinputtext id=ket name=ket maxlength=45 onkeypress=\"return tanpa_kutip(event);\" style=width:150px; /></td></tr>\n\n<tr><td colspan=3>\n<button class=mybutton onclick=save_pekerjaan() >" . $_SESSION['lang']['save'] . "</button>\n<button class=mybutton onclick=bersih_form_pekerjaan() >" . $_SESSION['lang']['cancel'] . "</button>\n<input type=hidden id=proses_pekerjaan name=proses_pekerjaan value=insert_pekerjaan />\n</table>";
$frm[1] .= "</fieldset>";
$frm[1] .= "<fieldset><legend>" . $_SESSION['lang']['datatersimpan'] . "</legend><table cellspacing=1 border=0>\n\t\t<thead>\n\t\t<tr class=\"rowheader\">\n\t\t<td>No.</td>\n\t\t<td>" . $_SESSION['lang']['notransaksi'] . "</td>\n\t\t<td>" . $_SESSION['lang']['vhc_jenis_pekerjaan'] . "</td>\n\t\t<td>" . $_SESSION['lang']['alokasibiaya'] . "</td>\n\t\t<td>" . $_SESSION['lang']['segment'] . "</td>\n\t\t<td>" . $_SESSION['lang']['jumlahrit'] . "</td>\n\t\t<td>" . $_SESSION['lang']['vhc_muatan'] . " (Ton)</td>\n        <td>" . $_SESSION['lang']['vhc_kmhm_awal'] . "</td>\n\t\t<td>" . $_SESSION['lang']['vhc_kmhm_akhir'] . "</td>\n\t\t<td>" . $_SESSION['lang']['satuan'] . "</td>\n\t\t<td>" . $_SESSION['lang']['biaya'] . " (Rp.)</td>\n\t\t<td>" . $_SESSION['lang']['keterangan'] . "</td>\n\t\t<td>Action</td>\n\t\t</tr></thead><tbody id=containPekerja>\n\t\t";
$frm[1] .= "</tbody></table></fieldset>";
//karyawan
$optKary = "<option value=''>" . $_SESSION['lang']['pilihdata'] . "</option>";
$arrPos = array("Operator", "Helper");
$optPosition = '';
foreach ($arrPos as $brs => $isi) {
    $optPosition .= "<option value=" . $brs . ">" . $isi . "</option>";
}
$frm[2] .= "<fieldset><legend>" . $_SESSION['lang']['vhc_detail_operator'] . "</legend>";
$frm[2] .= "<table cellspacing=1 border=0>\n<tr><td>" . $_SESSION['lang']['notransaksi'] . "</td><td>:</td><td>\n<input type=text id=no_trans_opt name=no_trans_opt disabled=disabled class=myinputtext style=width:150px; /></td></tr>\n<tr><td>" . $_SESSION['lang']['namakaryawan'] . "</td><td>:</td><td>\n<select id=kode_karyawan name=kode_karyawan style=width:150px; onchange=\"getUmr()\">" . $optKary . "</select></select>\n</td></tr>\n<tr><td>" . $_SESSION['lang']['vhc_posisi'] . "</td><td>:</td><td>\n<select id=posisi name=posisi style=width:150px;>" . $optPosition . "</select></select>\n</td></tr>\n<tr><td>" . $_SESSION['lang']['upahkerja'] . "</td><td>:</td><td>\n<input type=text id=uphOprt name=uphOprt class=myinputtextnumber style=width:150px; onkeypress='return angka_doang(event)' /> (* Obligatory if internal operator used/Harus di isi untuk karyawan internal</td></tr>\n<tr><td>" . $_SESSION['lang']['upahpremi'] . "</td><td>:</td><td>\n<input type=text id=prmiOprt name=prmiOprt class=myinputtextnumber style=width:150px; onkeypress='return angka_doang(event)' value=0 /></td></tr>\n<tr><td>" . $_SESSION['lang']['rupiahpenalty'] . "</td><td>:</td><td>\n<input type=text id=pnltyOprt name=pnltyOprt class=myinputtextnumber style=width:150px; onkeypress='return angka_doang(event)' value=0 /></td></tr>\n<tr><td colspan=3>\n<button class=mybutton onclick=save_operator() >" . $_SESSION['lang']['save'] . "</button>\n<button class=mybutton onclick=clear_operator() >" . $_SESSION['lang']['cancel'] . "</button>\n<input type=hidden name=prosesOpt id=prosesOpt value=insert_operator />\n\n</td></tr>\n</table>";
$frm[2] .= "</fieldset>";
$frm[2] .= "<fieldset><legend>" . $_SESSION['lang']['datatersimpan'] . "</legend><table cellspacing=1 border=0>\n\t\t<thead>\n\t\t<tr class=\"rowheader\">\n\t\t<td>No.</td>\n\t\t<td>" . $_SESSION['lang']['notransaksi'] . "</td>\n\t\t<td>" . $_SESSION['lang']['namakaryawan'] . "</td>\n\t\t<td>" . $_SESSION['lang']['vhc_posisi'] . "</td>\n\t\t<td>" . $_SESSION['lang']['upahkerja'] . "</td>\n\t\t<td>" . $_SESSION['lang']['upahpremi'] . "</td>\n\t\t<td>" . $_SESSION['lang']['rupiahpenalty'] . "</td>\n\t\t<td>Action</td>\n\t\t</tr></thead><tbody id=containOperator>\n\t\t<script>//load_data_operator()</script>\n\t\t";
$frm[2] .= "</tbody></table></fieldset>";
$data = fetchData($query);
?>
<button class=mybutton onclick="add2detail('pl')" style='margin-top:15px'>Add to Detail</button>
<div style="max-height:340px;overflow:auto">
<table cellpadding=1 cellspacing=1 border=0 class='sortable'>
	<thead><tr class=rowheader>
		<td>*</td>
		<td>No. Packing List</td>
	</tr></thead>
	<tbody id=bodySearch>
		<?php 
foreach ($data as $key => $row) {
    ?>
		<tr class=rowcontent>
			<td><?php 
    echo makeElement('pl_' . $key, 'checkbox', 0);
    ?>
</td>
			<td id="notransaksi_<?php 
    echo $key;
    ?>
"><?php 
    echo $row['notransaksi'];
    ?>
</td>
		</tr>
		<?php 
}
?>
	</tbody>
</table>
Example #29
0
$str = "select periode from " . $dbname . ".sdm_5periodegaji where kodeorg='" . $_SESSION['empl']['lokasitugas'] . "' and jenisgaji='B'\r\n          order by periode desc";
$res = mysql_query($str);
while ($bar = mysql_fetch_object($res)) {
    $optPeriod[$bar->periode] = $bar->periode;
}
if ($_SESSION['empl']['tipelokasitugas'] == 'KANWIL' || $_SESSION['empl']['bagian'] == 'IT') {
    $hrt = " induk='" . $_SESSION['org']['kodeorganisasi'] . "'";
} else {
    $hrt = " kodeorganisasi='" . $_SESSION['empl']['lokasitugas'] . "'";
}
$optOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', $hrt);
# Element
$els = array();
$els[] = array(makeElement('unit', 'label', $_SESSION['lang']['unit']), makeElement('kodeorg', 'select', '', array('style' => 'width:150px'), $optOrg));
$els[] = array(makeElement('periodegaji', 'label', $_SESSION['lang']['periodegaji']), makeElement('periodegaji', 'select', '', array('style' => 'width:150px'), $optPeriod));
$els['btn'] = array(makeElement('listBtn', 'btn', $_SESSION['lang']['list'], array('onclick' => "list()")));
$form = "";
$form .= "<h3 align='left'>" . $_SESSION['lang']['prosesgjbulanan'] . "</h3>";
$form .= genElementMultiDim($_SESSION['lang']['form'], $els, 1);
$form .= "<fieldset style='float:left;clear:left'><legend><b>" . $_SESSION['lang']['list'] . "</b>" . "</legend><div id='listContainer'></div></fieldset>";
/** View **/
echo open_body();
?>
<script languange=javascript1.2 src='js/sdm_prosesgjbulanan.js'></script>
<link rel=stylesheet type=text/css href='style/zTable.css'>
<?php 
include 'master_mainMenu.php';
OPEN_BOX();
echo $form;
CLOSE_BOX();
echo close_body();
function createTabEditDetail($id, $data)
{
    global $conn;
    global $dbname;
    //  $table .= "<table id='ppDetailTable'>";
    # Header
    $table = "<thead>";
    $table .= "<tr class=rowheader>";
    $table .= "<td>" . $_SESSION['lang']['nopp'] . "</td>";
    $table .= "<td>" . $_SESSION['lang']['kodebarang'] . "</td>";
    $table .= "<td>" . $_SESSION['lang']['namabarang'] . "</td>";
    $table .= "<td>" . $_SESSION['lang']['spesifikasi'] . "</td>";
    $table .= "<td>" . $_SESSION['lang']['jmlh_brg_blm_po'] . "</td>";
    $table .= "<td>" . $_SESSION['lang']['jmlhPesan'] . "</td>";
    $table .= "<td>" . $_SESSION['lang']['satuan'] . "</td>";
    $table .= "<td style='display:none'>" . $_SESSION['lang']['ongkoskirim'] . "/Brg</td>";
    $table .= "<td>" . $_SESSION['lang']['hargasatuan'] . "</td>";
    $table .= "<td>" . $_SESSION['lang']['subtotal'] . "</td>";
    $table .= "<td>Action</td>";
    $table .= "</tr>";
    $table .= "</thead>";
    # Data
    $table .= "<tbody id='detailBody'>";
    $i = 0;
    $jmlhPesan = 0;
    #======= Display Data =======
    if ($data != array()) {
        foreach ($data as $key => $row) {
            //get satuan dan nama barang di log_5masterbarang
            $ql = "select satuan,namabarang from " . $dbname . ".`log_5masterbarang` where `kodebarang`='" . $row['kodebarang'] . "'";
            //echo $ql;
            $qry = mysql_query($ql) or die(mysql_error());
            $res = mysql_fetch_assoc($qry);
            //get satuan konversi di log_5stkonversi
            $sSat = "select satuan from " . $dbname . ".log_5masterbarang where kodebarang='" . $row['kodebarang'] . "'";
            $qSat = mysql_query($sSat) or die(mysql_error());
            $rSat = mysql_fetch_assoc($qSat);
            $optSatuan = "<option value=" . $rSat['satuan'] . ">" . $rSat['satuan'] . "</option>";
            $where = " kodebarang='" . $row['kodebarang'] . "' and darisatuan='" . $res['satuan'] . "'";
            $sSknv = "select satuankonversi from " . $dbname . ".log_5stkonversi where " . $where . "";
            $qSknv = mysql_query($sSknv) or die(mysql_error());
            while ($rSknv = mysql_fetch_assoc($qSknv)) {
                $optSatuan .= "<option value=" . $rSknv['satuankonversi'] . ">" . $rSknv['satuankonversi'] . "</option>";
            }
            $optTest = makeOption($dbname, 'setup_matauang', 'kode,kodeiso');
            $sqpp = "select * from  " . $dbname . ".log_sudahpo_vsrealisasi_vw where nopp='" . $row['nopp'] . "' and kodebarang='" . $row['kodebarang'] . "'";
            $qpp = mysql_query($sqpp) or die(mysql_error());
            $rpp = mysql_fetch_assoc($qpp);
            $sub_tot = $row['jumlahpesan'] * $row['hargasbldiskon'] + $row['ongkangkut'];
            $sub_tot_nor = $row['jumlahpesan'] * $row['hargasbldiskon'];
            $sjmlh = "select sum(jumlahpesan) as jumlahPesan from " . $dbname . ".log_podt where kodebarang='" . $row['kodebarang'] . "' and nopp='" . $row['nopp'] . "'";
            //echo "warning:".$sjmlh;exit();
            $qjmlh = mysql_query($sjmlh) or die(mysql_error());
            $resjmlh = mysql_fetch_assoc($qjmlh);
            $sEdit = "select jumlahpesan from " . $dbname . ".log_podt where nopo='" . $id . "' and kodebarang='" . $row['kodebarang'] . "' and nopp='" . $row['nopp'] . "'";
            $qEdit = mysql_query($sEdit) or die(mysql_error());
            $rEdit = mysql_fetch_assoc($qEdit);
            $tmpil = $rpp['realisasi'] - $resjmlh['jumlahPesan'] + $rEdit['jumlahpesan'];
            //$r=$rpp['realisasi']-$resjmlh['jumlahPesan'];
            //echo "warning:".$tmpil."____".$r."___".$rEdit['jumlahpesan'];exit();
            if ($row['harganormal'] == 0) {
                $row['harganormal'] = $row['hargasatuan'];
            }
            $sMtUang = "select matauang from " . $dbname . ".log_poht where nopo = '" . $id . "' ";
            $qMtUang = mysql_query($sMtUang) or die(mysql_error($conn));
            $rMtUang = mysql_fetch_assoc($qMtUang);
            $strSat = "select satuanpp from " . $dbname . ".log_prapodt where nopp='" . $row['nopp'] . "' and kodebarang='" . $row['kodebarang'] . "'";
            $qrySat = mysql_query($strSat) or die(mysql_error());
            $resSat = mysql_fetch_object($qrySat);
            $table .= "<tr id='detail_tr_" . $key . "' class='rowcontent'>";
            $table .= "<td id='dtNopp_" . $key . "'>" . makeElement("rnopp_" . $key . "", 'txt', $row['nopp'], array('style' => 'width:120px', 'disabled' => 'disabled')) . "</td>";
            $table .= "<td id='dtKdbrg_" . $key . "'>" . makeElement("rkdbrg_" . $key . "", 'txt', $row['kodebarang'], array('style' => 'width:80px', 'disabled' => 'disabled')) . "</td>";
            $table .= "<td>" . makeElement("nm_brg_" . $key . "", 'txt', $res['namabarang'], array('style' => 'width:300px', 'disabled' => 'disabled')) . "</td>";
            $table .= "<td><textarea id=\"spek_brg_" . $key . "\" cols=\"25\" style=\"height:13px;\">" . $row['catatan'] . "</textarea></td>";
            $table .= "<td>" . makeElement("realisasi_" . $key . "", 'txt', $tmpil, array('style' => 'width:70px', 'onkeypress' => 'return angka_doang(event)', 'disabled' => 'disabled', 'class=myinputtext')) . "</td>";
            $table .= "<td>" . makeElement("jmlhDiminta_" . $key . "", 'textnum', $row['jumlahpesan'], array('style' => 'width:70px', 'onkeypress' => 'return angka_doang(event)', 'onblur' => "display_number('" . $key . "')", 'onkeyup' => "calculate('" . $key . "')")) . "</td>";
            $table .= "<td><select id=sat_" . $key . " style='width:70px'><option value=" . $resSat->satuanpp . ">" . $resSat->satuanpp . "</option></td>";
            if ($rMtUang['matauang'] == 'IDR') {
                $table .= "<td style='display:none'>" . makeElement("ongkos_angkut_" . $key . "", 'textnum', number_format($row['ongkangkut'], 2, '.', ','), array('style' => 'width:80px', 'disabled' => 'disabled')) . "</td>";
                $table .= "<td>" . makeElement("harga_satuan_" . $key . "", 'textnum', number_format($row['hargasbldiskon'], 2, '.', ','), array('style' => 'width:100px', 'onkeypress' => 'return angka_doang(event)', 'onkeyup' => "calculate('" . $key . "')", 'onblur' => "periksa_isi(this)", 'onblur' => "display_number('" . $key . "')", 'onfocus' => "normal_number('" . $key . "')")) . "<br>" . makeElement("hidden_harga_satuan_" . $key . "", 'hidden', number_format($row['hargasbldiskon'], 2, '.', ','), array('style' => 'width:100px;style:none')) . "</td>";
                $table .= "<td>" . makeElement("total_" . $key . "", 'textnum', number_format($sub_tot, 2, '.', ','), array('style' => 'width:100px', 'onkeypress' => 'return angka_doang(event)', 'disabled' => 'disabled')) . "<input type=hidden id=subTotal_" . $key . " value=" . $sub_tot_nor . " /></td>";
            } else {
                $table .= "<td style='display:none'>" . makeElement("ongkos_angkut_" . $key . "", 'textnum', $row['ongkangkut'], array('style' => 'width:80px', 'disabled' => 'disabled')) . "</td>";
                $table .= "<td>" . makeElement("harga_satuan_" . $key . "", 'textnum', $row['hargasbldiskon'], array('style' => 'width:100px', 'onkeypress' => 'return angka_doang(event)', 'onkeyup' => "calculate('" . $key . "')", 'onblur' => "periksa_isi(this)", 'onblur' => "display_number('" . $key . "')", 'onfocus' => "normal_number('" . $key . "')")) . "<br>" . makeElement("hidden_harga_satuan_" . $key . "", 'hidden', number_format($row['hargasbldiskon'], 2, '.', ','), array('style' => 'width:100px;display:none')) . "</td>";
                $table .= "<td>" . makeElement("total_" . $key . "", 'textnum', $sub_tot, array('style' => 'width:100px', 'onkeypress' => 'return angka_doang(event)', 'disabled' => 'disabled')) . "<input type=hidden id=subTotal_" . $key . " value=" . $sub_tot_nor . " /></td>";
            }
            $table .= "<td align=center><img id='detail_delete_" . $key . "' title='Hapus' class=zImgBtn onclick=\"deleteDetail('" . $key . "')\" src='images/delete_32.png'/></td>";
            $table .= "</tr>";
            $i = $key;
        }
        $i++;
    }
    $table .= "<tr><td>&nbsp;</td>\r\n            <td colspan=7 align=right>" . $_SESSION['lang']['subtotal'] . "</td>\r\n            <td><input type=text id=total_harga_po name=total_harga_po disabled  class=myinputtextnumber  style=width:100px /></td>\r\n        </tr>\r\n        <tr>\r\n            <td >&nbsp;</td>\r\n            <td colspan=7 align=right>" . $_SESSION['lang']['diskon'] . "</td>\r\n            <td><input type='text'  id='angDiskon' name='angDiskon' class='myinputtextnumber' style='width:100px' onkeyup='calculate_angDiskon()' onkeypress='return angka_doang(event)' onblur=\"getZero()\" /></td>\r\n        </tr>\r\n\t\t    <tr>\r\n            <td >&nbsp;</td>\r\n            <td colspan=7 align=right>" . $_SESSION['lang']['diskon'] . " (%)</td>\r\n            <td><input type='text'  id='diskon' name='diskon' class='myinputtextnumber' style='width:100px' onkeyup='calculate_diskon()' maxlength='5' onkeypress='return angka_doang(event)' onblur=\"getZero()\" /> </td>\r\n        </tr>\r\n\t\t<tr>\r\n            <td>&nbsp;</td>\r\n            <td style='vertical-align:top;' colspan=7 align=right>PBBKB</td>\r\n            <td><input type=text id='pbbkb' name='pbbkb' value=0 class='myinputtextnumber' style='width:100px' onkeyup='calculatePbbkb()' onkeypress='return angka_doang(event)' onblur=\"getZero()\" /></td>\r\n        </tr>\r\n\t\t<tr>\r\n            <td>&nbsp;</td>\r\n            <td style='vertical-align:top;' colspan=7 align=right>PPn (%)</td>\r\n            <td><input type=text id='ppN' name='ppN'  class='myinputtextnumber' style='width:100px' onkeyup='calculatePpn()'  maxlength='5'  onkeypress='return angka_doang(event)' onblur=\"getZero()\" />  <input type='hidden' id='ppn' name='ppn' class='myinputtext' onkeypress='return angka_doang(event)' style='width:100px' onblur=\"getZero()\" /><span id='hslPPn'> </span> </td>\r\n\t\t\t<td style='vertical-align:top;'><input type=checkbox id=chkPpn name=chkPpn onclick=\"checkChkPpn()\" /></td>\r\n        </tr>\r\n        <tr>\r\n            <td>&nbsp;</td>\r\n            <td style='vertical-align:top;' colspan=7 align=right>PPh (%)</td>\r\n            <td><input type=text id='ppH' name='ppH'  class='myinputtextnumber' style='width:100px' onkeyup='calculatePph()'  maxlength='5'  onkeypress='return angka_doang(event)' onblur=\"getZero()\" />  <input type='hidden' id='pph' name='pph' class='myinputtext' onkeypress='return angka_doang(event)' style='width:100px' onblur=\"getZero()\" /><span id='hslPPh'> </span> </td>\r\n        </tr>\r\n         <tr>\r\n            <td>&nbsp;</td>\r\n            <td colspan=7 align=right>" . $_SESSION['lang']['grnd_total'] . "</td>\r\n            <td><input type=text id='grand_total' name='grand_total' disabled  class='myinputtextnumber' style=width:100px /></td>\r\n        </tr><input type=hidden id='sub_total' name='sub_total' ><input type=hidden id='nilai_diskon' name='nilai_diskon'  />";
    $table .= "</tbody>";
    //   $table .= "</table> <br />";
    $sPoht = "select tanggalkirim,lokasipengiriman,syaratbayar,uraian,purchaser from " . $dbname . ".log_poht where nopo='" . $id . "' ";
    $qPoht = mysql_query($sPoht) or die(mysql_error());
    $rPoht = mysql_fetch_assoc($qPoht);
    //echo"warning:".$sPoht;exit();
    $snmkary = "select namakaryawan from " . $dbname . ".datakaryawan where karyawanid='" . $rPoht['purchaser'] . "'";
    $qnmkary = mysql_query($snmkary) or die(mysql_error());
    $rnmkary = mysql_fetch_assoc($qnmkary);
    echo $table . "###" . $rPoht['syaratbayar'] . "###" . $rPoht['uraian'] . "###" . $rPoht['uraian'];
}