Edit transaksi dinamis dan tabel dinamis

Ahmad Syaifullah · Jul 19, 2012
pertanyaan ane skrang berhubungan dengan pertanyaan punya om "Idr Ibrahim" 21 Juni 2012.
dgn judul "transaksi dinamis dengan dropdown dinamis dan tabel dinamis".
Maaf ya om di pinjem source code PHP nya.
<?php
session_start();
include("connect.php");
include("set_cal.php");
$today=date("Y-m-d");
$sql=mysql_query('SELECT MAX(nomor_surat) FROM surat_jalan');
$nota=mysql_fetch_array($sql);
$no_surat=$nota[0]+1;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="JavaScript" src="jquery.js"></script>
<script>
 
function addTableRow(jQtable){
jQtable.each(function(){
var $table = $(this);
var n = parseInt(document.getElementById('nomor').value) + 1;
var brg = document.getElementById('barang').value;
var qty = document.getElementById('qty').value;
if (qty<=0) {
alert('QTY tidak boleh kosong atau minus');
}
else {
var brgs= brg.split('#');
var tds = '<tr>';
tds += '<td align=center>'+brgs[0]+'<input type="hidden" name="brg['+n+']" value="'+brgs[0]+'" /></td>';
tds += '<td>'+brgs[1]+'</td>';
tds += '<td align=center>'+qty+'<input type="hidden" name="qty['+n+']" id="qty['+n+']" value="'+qty+'" /></td>';
tds += '<td align=center class="delete" onClick="$(this).parent().remove(); minTotal('+qty+')"><a href="javascript:void(0)">Hapus</a></td>';
tds += '</tr>';
if($('tbody', this).length > 0){
$('tbody', this).append(tds);
}else {
$(this).append(tds);
}
document.getElementById('nomor').value = n;
}
});
}
 
function hitTotal() {
var no = parseInt(document.getElementById('nomor').value);
var tQty = parseInt(document.getElementById('total').innerHTML);
var lastQty = parseInt(document.getElementById('qty['+no+']').value);
tQty += lastQty;
document.getElementById('total').innerHTML = tQty;
}
 
function minTotal(qty) {
var tQty = parseInt(document.getElementById('total').innerHTML);
tQty -= parseInt(qty);
document.getElementById('total').innerHTML = tQty;
}
 
function deleteAllRows() {
$('#myTable tbody').remove();
document.getElementById('total').innerHTML = 0;
}
</script>
</head>
 
<body>
<form id="forms" method="POST" onSubmit="return submitForm('<?=$_SERVER['PHP_SELF'];?>')">
<table width="50%">
<?php
$msg="FORM SURAT JALAN";
if ($msg!='') {
echo "
<tr>
<td> </td>
<td> </td>
<td align = 'left' ><h1> $msg </h1></td>
</tr>";
}
?>
<tr>
<td> </br></td>
</tr>
<tr>
<td> No. Surat</td>
<td> : </td>
<td> <input type='text' name='no_surat' value='<?php echo"$no_surat";?>'> </td>
</tr>
<tr>
<td> Tanggal </td>
<td> : </td>
<td> <input name="tgl_surat" type="text" value="<?php echo $today ?>" readonly="true"> </td>
</tr>
<tr>
<td> No. Kode 7</td>
<td> : </td>
<td> <input type='text' name='nomor_kode7' value=''> </td>
</tr>
<tr>
<td>Tanggal Kode 7</td>
<td> : </td>
<td>
<input type='text' name='date' value=''>
</td>
</tr>
<tr>
<td>Dikirim Kepada</td>
<td> : </td>
<td>
<input type='text' name='kepada' value=''>
</td>
</tr>
<tr>
<td>Kendaraan No.Pol / pengemudi</td>
<td> : </td>
<td>
<input type='text' name='pengemudi' value=''>
</td>
</tr>
<tr>
<td>untuk Keperluan</td>
<td> : </td>
<td>
<input type='text' name='keperluan' value=''>
</td>
</tr>
<tr>
<td>Yang Menerima</td>
<td> : </td>
<td>
<input type='text' name='penerima' value=''>
</td>
</tr>
<tr>
<td> Material</td>
<td> : </td>
<td>
<select name="barang" id="barang">
<?php
$qq = mysql_query("select * from master_material order by nama_material asc");
while ($d=mysql_fetch_array($qq))
{
echo "<option value='".$d[0]."#".$d[1]."#".$d[2]."'>".$d[1]." # ".$d[2]."</option>";
}
 
?>
</select> QTY <input type='text' name='qty' id='qty' size='2' >
<input type="button" name="tambah" value=" Tambahkan " id="tambah" onClick="addTableRow($('#myTable')); hitTotal()" />
<input type='hidden' name='nomor' id='nomor' value='0' >
</td>
</tr>
<tr>
<td></td>
<td></td>
<td>
<table width="100%" border="1" style="border-collapse:collapse" id="myTable">
<thead>
<tr align="center">
<td>Kode</td>
<td>Nama</td>
<td>Qty</td>
<td>Act</td>
</tr>
</thead>
<tfoot>
<tr align="center">
<td colspan="2" align="right">Total</td>
<td id="total">0</td>
</tr>
</tfoot>
</table>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>
<input type='Submit' name='simpan' value=' Simpan ' onClick="myPopup2()"/>
<input type='Reset' name='reset' value=' Reset ' onClick='deleteAllRows()' />
</td>
</tr>
</table>
</form>
 
<?php
if(isset($_POST['simpan']))
{
$_SESSION['no_surat']=$no_surat;
$tgl_surat = $today;
$no_kode7 = $_POST['nomor_kode7'];
$tgl_kode7 = $_POST['date'];
$kepada = $_POST['kepada'];
$pengemudi = $_POST['pengemudi'];
$keperluan = $_POST['keperluan'];
$penerima = $_POST['penerima'];
$barang = $_POST['barang'];
 
if (isset($no_kode7) && isset($tgl_kode7) && isset($kepada) && isset($pengemudi) && isset($keperluan) && isset($penerima) && isset($barang))
{
$insert=mysql_query("INSERT INTO surat_jalan
VALUES ($no_surat, '$tgl_surat', $no_kode7, '$tgl_kode7', '$kepada', '$pengemudi', '$keperluan','$penerima')");
if($insert)
{
foreach( $_POST['qty'] as $key => $val)
{
$brg = $_POST['brg'][$key];
$insert_surat_detail = mysql_query("INSERT INTO `detail_surat_jalan`(`nomor_surat`, `nomor_normalisasi`, `volume`) VALUES ('".$no_surat."','".$brg."', '".$val."')");
}
if($insert_surat_detail)
{
?>
<script language="javascript">
alert('Berhasil!');
document.location='word.php';
</script>
<?php
}
}
else
{
?>
<script language="javascript">
alert('Gagal');
document.location='pengadaan_bismillah.php';
</script>
<?php
}
}
else
{
?>
<script language="javascript">
alert('Tidak boleh ada field kosong');
document.location='pengadaan_bismillah.php';
</script>
<?php
}
//header("location:pengadaan_bismillah.php");
}
?>
<script type="text/javascript">
<!--
function myPopup2() {
<?php $no_surat = $_POST['no_surat']; ?>
window.open( "print.php?no_surat=<?php echo $no_surat ; ?>&bulan=<?php echo $bulan ; ?>&kepada=<?php echo $bulan_k7 ; ?>&nopol=<?php echo 1 ; ?>", "myWindow",
"status = 1, height = 700, width = 1000, resizable = 0" )
}
//-->
</script>
 
</body>
</html>
-- phpMyAdmin SQL Dump
-- version 3.4.5
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 21, 2012 at 08:44 AM
-- Server version: 5.5.16
-- PHP Version: 5.3.8
 
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
 
 
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
 
--
-- Database: `pengadaan`
--
 
-- --------------------------------------------------------
 
--
-- Table structure for table `detail_surat_jalan`
--
 
CREATE TABLE IF NOT EXISTS `detail_surat_jalan` (
`nomor_surat` INT(11) NOT NULL,
`nomor_normalisasi` INT(11) NOT NULL,
`volume` INT(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
--
-- Dumping data for table `detail_surat_jalan`
--
 
INSERT INTO `detail_surat_jalan` (`nomor_surat`, `nomor_normalisasi`, `volume`) VALUES
(8, 1, 123),
(8, 1, 123),
(9, 2, 11),
(9, 2, 111),
(10, 2, 11),
(10, 2, 111),
(11, 2, 1),
(11, 2, 112),
(11, 2, 11),
(12, 2190242, 1),
(12, 2190242, 1),
(12, 2190242, 1),
(13, 3050001, 1),
(15, 3050001, 1),
(16, 3050004, 1),
(17, 3050049, 11),
(18, 3050004, 1),
(19, 3050049, 1),
(20, 3050004, 1),
(21, 3050049, 2),
(22, 3050001, 12),
(23, 3050004, 1),
(24, 4120090, 1),
(25, 3050001, 1),
(26, 3050004, 1),
(27, 3050004, 1),
(28, 3050001, 1),
(29, 4120016, 1),
(30, 3050049, 1),
(31, 3050001, 1),
(31, 3050001, 1),
(31, 3050001, 1),
(32, 3050001, 1),
(32, 3050001, 1),
(32, 3050001, 1),
(33, 3050001, 1),
(33, 3050001, 1),
(33, 3050001, 1),
(34, 3110015, 22),
(34, 3110015, 1),
(34, 3110015, 3),
(34, 3110015, 4),
(34, 3110015, 4),
(35, 3050001, 1),
(36, 3050049, 1),
(36, 3050049, 1),
(36, 3050049, 1),
(36, 3050049, 1),
(36, 3050049, 1),
(37, 4120088, 1),
(37, 4120088, 2),
(37, 4120088, 4),
(38, 3050004, 1),
(38, 3050004, 1),
(38, 3050004, 1),
(38, 3050004, 1),
(38, 3050004, 1),
(39, 1, 0),
(39, 12, 0),
(39, 13, 0),
(40, 4120090, 1),
(40, 4120090, 1),
(40, 4120090, 1),
(41, 4120087, 1),
(41, 4120087, 1),
(41, 4120087, 12),
(42, 4120088, 11),
(42, 4120088, 11),
(43, 0, 1),
(43, 0, 1),
(43, 0, 1),
(45, 4120085, 1),
(45, 4120085, 1),
(45, 4120085, 1),
(45, 4120085, 1),
(45, 4120085, 1),
(46, 0, 1),
(46, 0, 1),
(46, 0, 1),
(46, 0, 1),
(46, 0, 1),
(47, 0, 1),
(47, 0, 1),
(47, 0, 1),
(48, 1, 1),
(48, 2, 1),
(49, 0, 2),
(49, 0, 2),
(50, 0, 1),
(50, 0, 1),
(50, 0, 1),
(51, 0, 1),
(52, 0, 1),
(53, 0, 1),
(54, 1, 1),
(54, 1, 1),
(54, 0, 1),
(54, 0, 1),
(55, 1, 1),
(55, 1, 1),
(55, 0, 1),
(56, 1, 1),
(56, 2, 1),
(56, 0, 1),
(57, 1, 1),
(57, 2, 1),
(57, 0, 1),
(57, 0, 1);
 
-- --------------------------------------------------------
 
--
-- Table structure for table `master_material`
--
 
CREATE TABLE IF NOT EXISTS `master_material` (
`nomor_normalisasi` INT(11) NOT NULL,
`nama_material` VARCHAR(50) NOT NULL,
`kelompok` VARCHAR(9) NOT NULL,
`volume` INT(11) NOT NULL,
`satuan` VARCHAR(9) NOT NULL,
PRIMARY KEY (`nomor_normalisasi`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
--
-- Dumping data for table `master_material`
--
 
INSERT INTO `master_material` (`nomor_normalisasi`, `nama_material`, `kelompok`, `volume`, `satuan`) VALUES
(1030010, 'TRF DIS;3P;160 kVA', 'GARDU', 0, 'U'),
(1030011, 'TRF DIS;3P;200 kVA', 'GARDU', 0, 'U'),
(1030013, 'TRF DIS;3P;250 Kva OD', 'GARDU', 0, 'U'),
(1030016, 'TRF DIS;3P;400 kVA', 'GARDU', 0, 'U'),
(1030062, 'TRF DIS;3P;100 Kva OD', 'GARDU', 0, 'U'),
(2010034, 'CB;K;20kV;630A;24kA;SPRING;3P;SF6 ( Recloser )', 'GARDU', 0, 'U'),
(2050045, 'CT;20kV;K;100-200/5-5A;0.2;;ID', 'SR', 9, 'B'),
(2050046, 'CT;20kV;K;10-20/5-5A;0.2;30VA;ID', 'SR', 0, 'B'),
(2050048, 'CT;20kV;K;125-250/5-5A;0.2;;ID', 'SR', 9, 'B'),
(2050067, 'CT;20kV;K;125-250/5-5A;0.2;;ID ( CT/TR MDI ) ', 'SR', 741, 'B'),
(2050070, 'CT;20kV;K;25-50/5-5A;0.2;;ID', 'SR', 0, 'B'),
(2050078, 'CT TR 400/5A', 'SR', 20, 'B'),
(2050082, 'CT TR 500/5A', 'SR', 3, 'B'),
(2050096, 'CT;380/220V;RING;100/5A;0.5;5VA;P', 'SR', 0, 'B'),
(2050103, 'CT;380/220V;RING;200/5A;0.5;5VA;P', 'SR', 0, 'B'),
(2050106, 'CT;380/220V;RING;250/5A;0.5;5VA;P', 'SR', 42, 'B'),
(2050107, 'CT;380/220V;RING;250/5A;1;5VA;P', 'SR', 150, 'B'),
(2050109, 'CT;380/220V;RING;300/5A;0.5;5VA;P', 'SR', 0, 'B'),
(2050110, 'CT;380/220V;RING;300/5A;1;5VA;P', 'SR', 150, 'B'),
(2050112, 'CT;380/220V;RING;400/5A;0.5;5VA;P', 'SR', 48, 'B'),
(2050124, 'CT;380/220V;RING;75/5A;0.5;5VA;P', 'SR', 45, 'B'),
(2050128, 'CT;380/220V;SQUARE;100/5A;0.5;5VA;P', 'SR', 606, 'B'),
(2050133, 'CT;380/220V;SQUARE;150/5A;0.5;5VA;P', 'SR', 435, 'B'),
(2050136, 'CT;380/220V;SQUARE;200/5A;0.5;5VA;P', 'SR', 7, 'B'),
(2050139, 'CT;380/220V;SQUARE;250/5A;0.5;5VA;P', 'SR', 777, 'B'),
(2050142, 'CT;380/220V;SQUARE;300/5A;0.5;5VA;P', 'SR', 236, 'B'),
(2050146, 'CT;380/220V;SQUARE;400/5A;0.5;5VA;P', 'SR', 186, 'B'),
(2050155, 'CT;380/220V;SQUARE;600/5A;0.5;5VA;P', 'SR', 72, 'B'),
(2050175, 'CT;380/220V;SQUARE;50/5A;0.5;5VA;P', 'SR', 30, 'B'),
(2050272, 'CT;20kV;K;100-200/5-5A;0.5;60VA;ID', 'SR', 3, 'B'),
(2050331, 'CT;20kV;K;20/5-5A;0.2;30VA;ID', 'SR', 3, 'B'),
(2050356, 'CT;20kV;K;40/5-5A;0.2;30VA;ID', 'SR', 3, 'B'),
(2050403, 'CT;20kV;K;100/5-5A;0.2;30VA;ID ( TR )', 'SR', 0, 'B'),
(2050423, 'CT TR 150/5A ', 'SR', 30, 'B'),
(2050424, 'CT;20kV;K;150/5-5A;0.2;30VA;ID ( TR )', 'SR', 6, 'B'),
(2050434, 'CT TR 200/5A ', 'SR', 41, 'B'),
(2050445, 'CT TR 250/5A ', 'SR', 36, 'B'),
(2050456, 'CT TR 300/5A', 'SR', 73, 'B'),
(2050500, 'CT TR ;20kV;K;100/5A', 'SR', 28, 'B'),
(2050502, 'CT TM ;20kV;K;10-20/5A', 'SR', 3, 'B'),
(2050511, 'CT TR ;20kV;K;400/5A.0,5;ID', 'SR', 3, 'B'),
(2050514, 'CT;380/220V;RING;100/5A;0.5;15VA;ID', 'SR', 1, 'B'),
(2050515, 'CT;380/220V;RING;1000/5A;0.5;15VA;ID', 'SR', 39, 'B'),
(2050516, 'CT;380/220V;RING;150/5A;0.5;15VA;ID', 'SR', 38, 'B'),
(2050518, 'CT;380/220V;RING;200/5A;0.5;15VA;ID', 'SR', 4, 'B'),
(2050519, 'CT;380/220V;RING;2000/5A;0.5;15VA;ID', 'SR', 3, 'B'),
(2050520, 'CT;380/220V;RING;250/5A;0.5;15VA;ID', 'SR', 7, 'B'),
(2050522, 'CT;380/220V;RING;300/5A;0.5;15VA;ID', 'SR', 0, 'B'),
(2050523, 'CT;380/220V;RING;400/5A;0.5;15VA;ID', 'SR', 3, 'B'),
(2050524, 'CT TR 50/5A', 'SR', 0, 'B'),
(2050526, 'CT TR 600/5A', 'SR', 0, 'B'),
(2050527, 'CT;380/220V;RING;75/5A;0.5;15VA;ID', 'SR', 3, 'B'),
(2070045, 'PT;20kV;K;;20000/V3-100/V3;0.5;50VA;OD', 'SR', 3, 'B'),
(2090004, 'ARRESTER 20 KV 10 KA', 'GARDU', 0, 'B'),
(2150003, 'CUB;ISO;LBS/IM SM6;24kV;630A;12.5kA;', 'GARDU', 9, 'B'),
(2150011, 'CUB;ISO;LBS/PM SM6;24kV;630A;12.5kA;', 'GARDU', 6, 'B'),
(2150040, 'CUB;N ISO;RMU(2LBS-TP);24kV;630A;12.5kA;', 'GARDU', 2, 'U'),
(2150056, 'CUB;N ISO;LBS MOTORIZE;24kV;630A;25kA;', 'GARDU', 5, 'SET'),
(2150090, 'CUB;N ISO;DM1-D;20kV;1250A;12.5kA;', 'GARDU', 0, 'SET'),
(2150095, 'CUB;ISO;LBS/DM SM6;24kV;630A;12.5kA;', 'GARDU', 3, 'SET'),
(2150126, 'CUB;N ISO;LBS MOTORIZE;24kV;630A;16kA;(2LBS)', 'GARDU', 3, 'SET'),
(2160050, 'CUB ACC;METERING;20KV;630A', 'GARDU', 2, 'SET'),
(2190026, 'kVARH 3P 20-60A ST', 'SR', 0, 'B'),
(2190028, 'kVARH 3P 220/380V 5-20A 3ST 4W', 'SR', 24, 'B'),
(2190029, 'kVARH 3P 5A ST', 'SR', 76, 'B'),
(2190045, 'kWH M;; 1P; 20-60A', 'SR', 171, 'B'),
(2190048, 'kWH M;; 1P; 5-20A', 'SR', 0, 'B'),
(2190052, 'kWH M;; 3P 20-60A; ST', 'SR', 0, 'B'),
(2190057, 'kWH M;; 3P; 5-20A DT', 'SR', 0, 'B'),
(2190060, 'kWH M;; 3P; 5A; ST', 'SR', 20, 'B'),
(2190063, 'kWH M;; 1P 5/20 A; COMBO MCB 4 A', 'SR', 0, 'B'),
(2190067, 'kWH M;; 1P 5/20 A; COMBO MCB 10 A', 'SR', 0, 'B'),
(2190068, 'kWH M;; 1P 5/20 A; COMBO MCB 16 A', 'SR', 0, 'B'),
(2190069, 'kWH M;; 1P 5/20 A; COMBO MCB 20 A', 'SR', 0, 'B'),
(2190070, 'kWH M;; 1P 5/20 A; COMBO MCB 2 A', 'SR', 0, 'B'),
(2190071, 'kWH M;; 1P 5/20 A; COMBO MCB 6 A', 'SR', 0, 'B'),
(2190089, 'kWH E;; 3P 220/350V 5A 1 4W', 'SR', 52, 'B'),
(2190090, 'kWH E;; 3P CLASS 0,5', 'SR', 2, 'B'),
(2190104, 'kWH E;; 3P 230V 10-100A 1 4W', 'SR', 1, 'B'),
(2190112, 'kWH E;; 3P 57,7/100V 5A 0,5 4W', 'SR', 0, 'B'),
(2190202, 'kWH E;; 3P 57,7/100V 5-10A 0,5 4W ( EDMI )', 'SR', 12, 'B'),
(2190204, 'kWH E;; 3P 57,7/100V 5-10A 1 4W ( WASION )', 'SR', 91, 'B'),
(2190209, 'kWH M;; 3P 220/380V 50-100A ST', 'SR', 3, 'B'),
(2190210, 'kWH M;; 3P; 5-20A; ST', 'SR', 0, 'B'),
(2190218, 'kWH E;; 3P 230/400V 5-80A 1 4W ( ITRON / CHANGSA )', 'SR', 52, 'B'),
(2190237, 'kWH M;; 1P 5/60 A; COMBO MCB 2 A', 'SR', 1806, 'B'),
(2190238, 'kWH M;; 1P 5/60 A; COMBO MCB 4 A', 'SR', 11686, 'B'),
(2190239, 'kWH M;; 1P 5/60 A; COMBO MCB 6 A', 'SR', 8122, 'B'),
(2190240, 'kWH M;; 1P 5/60 A; COMBO MCB 10 A', 'SR', 13863, 'B'),
(2190241, 'kWH M;; 1P 5/60 A; COMBO MCB 16 A', 'SR', 1018, 'B'),
(2190242, 'kWH M;; 1P 5/60 A; COMBO MCB 20 A', 'SR', 1006, 'B'),
(2190243, 'kWH E;; 1P; 5-60A; COMBO MCB 25 A ', 'SR', 1200, 'B'),
(2190252, 'kWH PR;; 3P 230/400V 5-80A 1 4W', 'SR', 56, 'B'),
(2190253, 'kWH M;; 3P 230/400V 5-10A 1 4W', 'SR', 215, 'B'),
(2190254, 'kWH M;; 1P 5/40 A; COMBO MCB 2 A ( DRUM )', 'SR', 0, 'B'),
(2190255, 'kWH M;; 1P 5/40 A; COMBO MCB 4 A ( DRUM )', 'SR', 0, 'B'),
(2190256, 'kWH M;; 1P 5/40 A; COMBO MCB 6 A ( DRUM )', 'SR', 0, 'B'),
(2190299, 'kWH M;; 3P 220/380V 5-10A 1 4W ( MTD )', 'SR', 69, 'B'),
(2200001, 'MODEM GSM 12V DC DIGITAL', 'SR', 0, 'B'),
(2200004, 'SEGEL PLASTIC', 'SR', 0, 'B'),
(2200005, 'TIMAH SEGEL ', 'SR', 0, 'B'),
(2200023, 'MODEM GSM 56 kbst', 'SR', 19, 'B'),
(2200029, 'KAWAT SEGEL ', 'SR', 13, 'B'),
(2230027, 'CLAMP;PG;AL;35mm2;2BOLT', 'GARDU', 522, 'B'),
(2230145, 'CLAMP;G;AL;70-150/70-150mm2;PRS', 'GARDU', 0, 'B'),
(2240001, 'FUSE TABUNG 16 A Kepala Kecil D21 mm', 'GARDU', 37, 'B'),
(2240003, 'FUSE TABUNG 25 A Kepala Kecil D21 mm', 'GARDU', 8, 'B'),
(2240005, 'FUSE;20/24kV;31.5A;TUBE;D21mm; Kepala Kecil', 'GARDU', 6, 'B'),
(2240009, 'FUSE;20/24kV;40A;TUBE;D21mm; Kepala Kecil', 'GARDU', 6, 'B'),
(2240012, 'FUSE TABUNG 43 A Kepala besar D24 mm', 'GARDU', 13, 'B'),
(2240013, 'FUSE;20/24kV;6.3A;TUBE;D21mm; Kepala Kecil', 'GARDU', 6, 'B'),
(2240015, 'FUSE;20/24kV;63A;TUBE;D21mm; Kepala Kecil', 'GARDU', 6, 'B'),
(2240016, 'FUSE;20/24kV;63A;TUBE;D24mm; Kepala Besar', 'GARDU', 9, 'B'),
(2240019, 'FUSE;20/24kV;80A;TUBE;D21mm; Kepala Kecil', 'GARDU', 6, 'B'),
(2240023, 'FUSE;380/220V;100A;SQUARE;0', 'GARDU', 79, 'B'),
(2240024, 'NH FUSE 100 A,SQUARE 1', 'GARDU', 993, 'B'),
(2240029, 'NH FUSE 125 A,SQUARE 1', 'GARDU', 240, 'B'),
(2240034, 'FUSE;380/220V;160A;SQUARE;0', 'GARDU', 63, 'B'),
(2240035, 'NH FUSE 160 A,SQUARE 1', 'GARDU', 734, 'B'),
(2240038, 'NH FUSE 200 A,SQUARE 1', 'GARDU', 640, 'B'),
(2240042, 'NH FUSE 224 A,SQUARE 1', 'GARDU', 311, 'B'),
(2240044, 'NH FUSE 250 A,SQUARE 1', 'GARDU', 74, 'B'),
(2240049, 'NH FUSE 315 A,SQUARE 2', 'GARDU', 367, 'B'),
(2240050, 'NH FUSE 355 A,SQUARE 2', 'GARDU', 497, 'B'),
(2240055, 'NH FUSE 400 A,SQUARE 2', 'GARDU', 207, 'B'),
(2240066, 'FUSE;380/220V;63A;SQUARE;0', 'GARDU', 182, 'B'),
(2240067, 'NH FUSE 63 A,SQUARE 1', 'GARDU', 652, 'B'),
(2240071, 'FUSE;380/220V;80A;SQUARE;0', 'GARDU', 168, 'B'),
(2240072, 'NH FUSE 80 A,SQUARE 1', 'GARDU', 838, 'B'),
(2240074, 'FUSE;20/24kV;10A;TUBE;D24mm; Kepala Besar', 'GARDU', 7, 'B'),
(2240077, 'FUSE;20/24kV;20A;TUBE;D24mm; Kepala Besar', 'GARDU', 5, 'B'),
(2240100, 'FUSE;380/220V;125A;SQUARE;0', 'GARDU', 226, 'B'),
(2240105, 'FUSE;380/220V;63A;SQUARE;00', 'GARDU', 144, 'B'),
(2240106, 'FUSE;380/220V;80A;SQUARE;00', 'GARDU', 185, 'B'),
(2240107, 'FUSE;380/220V;100A;SQUARE;00', 'GARDU', 252, 'B'),
(2240108, 'FUSE;380/220V;125A;SQUARE;00', 'GARDU', 42, 'B'),
(2240109, 'FUSE;380/220V;160A;SQUARE;00', 'GARDU', 301, 'B'),
(2240152, 'FUSE;20/24kV;20A;TUBE;D21mm', 'GARDU', 4, 'B'),
(2240155, 'FUSE;20/24kV;16A;TUBE;D21mm', 'GARDU', 1, 'B'),
(3030001, 'TIANG BETON 11/200 Dan', 'GARDU', 0, 'BTG'),
(3030006, 'TIANG BETON 13/350 Dan ', 'GARDU', 0, 'BTG'),
(3030049, 'TIANG BETON 11/350 Dan +EBC', 'GARDU', 0, 'BTG'),
(3030056, 'TIANG BETON 13/350 Dan + EBC', 'GARDU', 0, 'BTG'),
(3030067, 'TIANG BETON 9/200 Dan', 'GARDU', 0, 'BTG'),
(3040013, 'POLE ACC;ST PLATE 65X120mm', 'GARDU', 48, 'B'),
(3040023, 'POLE ACC;EXPANDING ANCHOR 5/8"', 'GARDU', 20, 'B'),
(3040098, 'POLE ACC;CLAMP GROUND ROD 5/8" ( Earthing Rod )', 'GARDU', 55, 'B'),
(3040188, 'POLE ACC;STAINLESS STEEL STRAP', 'GARDU', 0, 'B'),
(3040253, 'POLE ACC;GUY INSULATOR LV', 'GARDU', 4, 'B'),
(3040324, 'POLE ACC;YOKES/STOPING BUCKLE', 'GARDU', 0, 'B'),
(3040331, 'STEEL WIRE', 'JTM', 736000, 'M'),
(3040390, 'POLE ACC;TRAVERS;AFSPAN-I;U100X180', 'GARDU', 0, 'B'),
(3040391, 'POLE ACC;TRAVERS;AFSPAN-I;U100X2000', 'GARDU', 0, 'B'),
(3040393, 'POLE ACC;TRAVERS;AFSPAN-I;U100X3000', 'GARDU', 0, 'B'),
(3050001, 'AAAC 150 mm2', 'JTM', 95677, 'M'),
(3050004, 'AAAC 70 mm2', 'JTM', 0, 'M'),
(3050006, 'AAAC-S 150 mm2', 'JTM', 0, 'M'),
(3050009, 'AAAC-S 70 mm2', 'JTM', 0, 'M'),
(3050049, 'AAAC 240 mm2', 'JTM', 18619, 'M'),
(3060044, 'COND ACC;DOUBLE TIE; 150', 'JTM', 10071, 'B'),
(3060045, 'COND ACC;SIDE TIE; 150', 'JTM', 3184, 'B'),
(3060103, 'COND ACC;JOINT AL 240mm2 COMP', 'JTM', 30, 'B'),
(3060139, 'COND ACC;JOINT SLEEVE AL 150mm2 INSUL', 'JTM', 8, 'B'),
(3060145, 'JOINT SLEEVE AL 150 mm2 uk. Panjang', 'JTM', 768, 'B'),
(3060167, 'COND ACC;PREFORMED TIE 150mm2', 'JTM', 17824, 'B'),
(3060193, 'COND ACC;ALL BINDING WIRE 3.2mm2', 'JTM', 32, 'B'),
(3060194, 'COND ACC;ALL BINDING WIRE 6.0mm2', 'JTM', 0, 'B'),
(3060205, 'JOINT AL 35 mm2 INSUL + Heatshrink', 'JTR', 0, 'B'),
(3060206, 'JOINT AL 50 mm2 INSUL + Heatshrink', 'JTR', 0, 'B'),
(3060207, 'COND ACC;JOINT AL 70 mm2 INSUL ( Utk TIC )', 'JTR', 175, 'B'),
(3060211, 'COND ACC;JOINT ALCU 35mm2 INSUL', 'JTR', 24, 'B'),
(3060213, 'COND ACC;JOINT AL CU 70mm2 INSUL', 'GARDU', 2, 'B'),
(3060240, 'COND ACC;JOINT SLEEVE ALCU 70-50mm2', 'GARDU', 178, 'B'),
(3060265, 'COND ACC;JOINT AL 25mm2 INSUL', 'GARDU', 408, 'B'),
(3060266, 'COND ACC;JOINT AL 35-70mm2 COMP', 'GARDU', 48, 'B'),
(3060268, 'COND ACC;JOINT AL 70-150mm2', 'GARDU', 219, 'B'),
(3060278, 'COND ACC;JOINT AL CU 50-70mm2 INSUL', 'GARDU', 4, 'B'),
(3060279, 'COND ACC;JOINT ALCU 50-95mm2 INSUL', 'GARDU', 48, 'B'),
(3060280, 'COND ACC;JOINT ALCU 70-150mm2 INSUL', 'GARDU', 0, 'B'),
(3060283, 'COND ACC;JOINT AL CU 70-95mm2 INSUL', 'GARDU', 22, 'B'),
(3060285, 'COND ACC;JOINT ALCU 95mm2 INSUL', 'GARDU', 0, 'B'),
(3060286, 'COND ACC;JOINT CU 25mm2 INSUL', 'GARDU', 72, 'B'),
(3060290, 'COND ACC;JOINT SLEEVE AL CU 70-95mm2', 'GARDU', 9, 'B'),
(3070006, 'ISOLATOR;;PORC;20kV;LINEPOST;', 'JTM', 1370, 'B'),
(3070007, 'ISOLATOR TUMPU', 'JTM', 629, 'B'),
(3070030, 'ISOLATOR ASPAN', 'JTM', 0, 'SET'),
(3070036, 'ISOLATOR ASPAN', 'JTM', 0, 'SET'),
(3100060, 'STRAIN CLAMP 240 mm2', 'JTM', 24, 'B'),
(3100061, 'STRAIN CLAMP 150 mm2', 'JTM', 0, 'B'),
(3100062, 'STRAIN CLAMP 35-70 mm2', 'JTM', 0, 'B'),
(3100063, 'STRINGSET ACC;STRAIN CLAMP 70-150 mm2', 'JTM', 0, 'B'),
(3110010, 'CABLE PWR;N2XSY;1X35mm2;20kV;UG', 'JTM', 0, 'M'),
(3110015, 'CABLE NA2XSEYBY 3x240 mm2 : 20kV ; UG', 'JTM', 366, 'M'),
(3110016, 'CABLE NA2XSEYBY 3x300 mm2 ; 20kV ; UG', 'JTM', 9867, 'M'),
(3110025, 'KABEL TIC 2X10 mm2', 'SR', 612501, 'M'),
(3110026, 'KABEL TIC 2X16 mm2', 'SR', 40173, 'M'),
(3110038, 'KABEL TIC 3x35 + 1x25 mm', 'JTR', 0, 'M'),
(3110041, 'KABEL TIC 3x70 + 1x50 mm', 'JTR', 1327, 'M'),
(3110060, 'NYY;1x150 mm2', 'GARDU', 0, 'M'),
(3110061, 'NYY;1x240 mm2', 'GARDU', 0, 'M'),
(3110064, 'NYY;1x70 mm2', 'GARDU', 0, 'M'),
(3110065, 'NYY;1x95 mm2', 'GARDU', 1019, 'M'),
(3110086, 'CABLE POWER 3X150+1X95 20 KV', 'JTM', 4808, 'M'),
(3110185, 'CABLE PWR;NYY;4X35mm2;0.6/1kV;OH', 'GARDU', 616, 'M'),
(3120006, 'ELECTRICAL METC + CRB', 'JTR', 0, 'SET'),
(3120007, 'CABLE PWR ACC;CABLE SHOE AL 150mm2', 'JTR', 0, 'B'),
(3120009, 'CABLE PWR ACC;CABLE SHOE AL-CU 1H 240mm2', 'SR', 1, 'B'),
(3120012, 'CABLE PWR ACC;CABLE SHOE CU 120mm2', 'GARDU', 4, 'B'),
(3120013, 'CABLE PWR ACC;CABLE SHOE CU 150mm2', 'GARDU', 0, 'B'),
(3120017, 'CABLE PWR ACC;CABLE SHOE CU 50mm2', 'GARDU', 3, 'B'),
(3120018, 'CABLE PWR ACC;CABLE SHOE CU 95mm2', 'GARDU', 0, 'B'),
(3120033, 'CABLE PWR ACC;DEAD END ASSY ADJ 70mm', 'GARDU', 0, 'B'),
(3120036, 'FIXED ASSY 35 mm2', 'JTR', 0, 'SET'),
(3120037, 'FIXED ASSY 50 mm2', 'JTR', 0, 'SET'),
(3120038, 'FIXED ASSY 70 mm2', 'JTR', 0, 'SET'),
(3120056, 'LARGE ANGLE ASSY 35 mm', 'JTR', 0, 'SET'),
(3120057, 'LARGE ANGLE ASSY 50 mm', 'JTR', 0, 'SET'),
(3120058, 'LARGE ANGLE ASSY 70 mm', 'JTR', 0, 'SET'),
(3120060, 'CABLE PWR ACC;LINK 25X25mm', 'JTR', 22, 'B'),
(3120061, 'CABLE PWR ACC;LINK 25X50mm', 'JTR', 457, 'B'),
(3120067, 'CABLE PWR ACC;POLE MOUNTED FAULT DETECT', 'JTR', 66, 'B'),
(3120090, 'SUSPENSION ASSY 35 mm', 'JTR', 0, 'SET'),
(3120091, 'SUSPENSION ASSY 50 mm', 'JTR', 0, 'SET'),
(3120092, 'SUSPENSION ASSY 70 mm', 'JTR', 0, 'SET'),
(3120114, 'CABLE PWR ACC;CABLE SHOE CU 70mm2', 'JTR', 0, 'B'),
(3120121, 'CABLE PWR ACC;CABLE SHOE AL-CU 1H 240mm2', 'SR', 0, 'B'),
(3120122, 'CABLE PWR ACC;CABLE SHOE AL 70mm2', 'GARDU', 75, 'B'),
(3120126, 'SEPATU KABEL AL 35 + Heatshrink', 'GARDU', 0, 'B'),
(3120142, 'WEDGE CLAMP 2x(6-16) mm', 'SR', 91050, 'B'),
(3120154, 'SEPATU KABEL AL CU 35 + Heatshrink', 'GARDU', 0, 'B'),
(3120157, 'SEPATU KABEL AL CU 95 + Heatshrink', 'GARDU', 0, 'B'),
(3120158, 'CABLE PWR ACC;CABLE SHOE AL-CU 1H 120mm2', 'SR', 0, 'B'),
(3120161, 'CABLE PWR ACC;CABLE SHOE AL-CU 1H 240mm2', 'SR', 0, 'B'),
(3120188, 'SEPATU KABEL AL CU 150 + Heatshrink', 'GARDU', 0, 'B'),
(3120231, 'SEPATU KABEL CU 150 + Heatshrink', 'GARDU', 0, 'B'),
(3120232, 'CABLE PWR ACC;CABLE SHOE CU ID 1H 185mm2', 'SR', 56, 'B'),
(3120317, 'CABLE PWR ACC;STRAIN HOOK SR', 'SR', 3522, 'B'),
(3120330, 'STRAIN HOOK', 'SR', 8529, 'B'),
(3120363, 'CABLE PWR ACC;STRAIGHT JOINT 300mm2', 'SR', 1, 'B'),
(3130011, 'JOINT;1kV;AL-AL;35-35mm2;;1P;CONNECTOR', 'SR', 0, 'B'),
(3130017, 'JOINT;1kV;AL-AL;50-70mm2;;1P;CONECTOR', 'SR', 0, 'B'),
(3130027, 'JOINT;1kV;AL-CU;3X70+50-4X95mm2;;3P;PRHS', 'SR', 2, 'B'),
(3130037, 'JOINT;20kV;AL-AL;150-150mm2;;3P;PRHS', 'SR', 0, 'B'),
(3130038, 'JOINT;20kV;AL-AL;240-240mm2;;3P;PRHS', 'SR', 30, 'B'),
(3130055, 'JOINT;1kV;AL-CU;70-70mm2;;1P;PRS', 'SR', 0, 'B'),
(3130083, 'JOINT;1kV;CU-CU;10-16/10-16mm2;;3P;PRHS', 'SR', 800, 'B'),
(3130092, 'JOINT;20kV;AL-AL;240mm2;;1P;PRHS', 'SR', 0, 'B'),
(3130098, 'JOINT;20kV;AL-AL;150mm2;;3P;PR', 'SR', 0, 'B'),
(3140005, 'JOINT ACC;CONN AL-AL 150-240mm2', 'SR', 0, 'B'),
(3150066, 'TERMINASI INDOOR 3X150', 'JTM', 8, 'B'),
(3190002, 'CUT OUT ;20kV;6-100A;10kA;125kV', 'GARDU', 214, 'B'),
(3200001, 'FUSE LINK 20kV 100A', 'GARDU', 6, 'B'),
(3200002, 'FUSE LINK 20kV 10A', 'GARDU', 130, 'B'),
(3200003, 'FUSE LINK 20kV 12A', 'GARDU', 80, 'B'),
(3200004, 'FUSE LINK 20kV 15A', 'GARDU', 120, 'B'),
(3200005, 'FUSE LINK 20kV 20A', 'GARDU', 160, 'B'),
(3200007, 'FUSE LINK 20kV 25A', 'GARDU', 0, 'B'),
(3200008, 'FUSE LINK 20kV 2A', 'GARDU', 977, 'B'),
(3200009, 'FUSE LINK 20kV 30A', 'GARDU', 0, 'B'),
(3200010, 'FUSE LINK 20kV 3A', 'GARDU', 929, 'B'),
(3200011, 'FUSE LINK 20kV 40A', 'GARDU', 0, 'B'),
(3200012, 'FUSE LINK 20kV 50A', 'GARDU', 117, 'B'),
(3200015, 'FUSE LINK 20kV 6A', 'GARDU', 581, 'B'),
(3200017, 'FUSE LINK 20kV 8A', 'GARDU', 630, 'B'),
(3200018, 'FUSE LINK 20kV 5A', 'GARDU', 707, 'B'),
(3200023, 'FUSE LINK 20kV 4A', 'GARDU', 0, 'B'),
(3200026, 'FUSE LINK 20kV 32A', 'GARDU', 100, 'B'),
(3200031, 'CUT OUT ACC;FUSE LINK 20kV 125A', 'GARDU', 356, 'B'),
(3230003, 'CB;K;20kV;400A;24kA;SPRING;3P;SF6 ( Recloser )', 'GARDU', 0, 'U'),
(3250007, 'MCB;1P;10A', 'SR', 0, 'B'),
(3250008, 'MCB;1P;16A', 'SR', 2151, 'B'),
(3250010, 'MCB;1P;20A', 'SR', 1549, 'B'),
(3250011, 'MCB;1P;25A', 'SR', 0, 'B'),
(3250012, 'MCB;1P;2A', 'SR', 1075, 'B'),
(3250013, 'MCB;1P;35A', 'SR', 84, 'B'),
(3250015, 'MCB;1P;4A', 'SR', 1884, 'B'),
(3250016, 'MCB;1P;50A', 'SR', 0, 'B'),
(3250018, 'MCB;1P;6A', 'SR', 6608, 'B'),
(3250021, 'MCB;3P;20A', 'SR', 0, 'B'),
(3250022, 'MCB;3P;10A', 'SR', 16, 'B'),
(3250024, 'MCB;3P;16A', 'SR', 0, 'B'),
(3250025, 'MCB;3P;25A', 'SR', 0, 'B'),
(3250027, 'MCB;3P;35A', 'SR', 0, 'B'),
(3250029, 'MCB;3P;50A', 'SR', 0, 'B'),
(3250045, 'MCB;230/400V;1P;1.2A;50Hz;', 'SR', 54, 'B'),
(3260018, 'LVSB;DIST;3P;380V;630A;4LINE;OD', 'GARDU', 45, 'U'),
(3260022, 'LVSB;DIST;3P;380V;630A;4LINE;ID', 'GARDU', 0, 'U'),
(3260027, 'LVSB;DIST;3P;380V;250A;2LINE;OD', 'GARDU', 186, 'U'),
(3270026, 'TIME SWITCH MEC 220 20A 1CONT', 'GARDU', 0, 'B'),
(3270054, 'HRC FUSE BASE;6-160A;0', 'GARDU', 143, 'B'),
(3270055, 'HRC FUSE BASE 36-250A/I', 'GARDU', 94, 'SET'),
(3270056, 'GROUND PLAT 36-400A ( HRC FUSE BASE 250-355/II', 'GARDU', 131, 'SET'),
(3270057, 'HRC FUSE BASE;6-160A;00', 'GARDU', 83, 'B'),
(3280001, 'CONN;;H;AL;150-170/150-70mm2;PRS', 'SR', 0, 'B'),
(3280066, 'CCO 10-16 mm2 + Isolasi scooth', 'SR', 3161, 'B'),
(3280073, 'CCO 35-70 mm2 + Isolasi scooth', 'SR', 3920, 'B'),
(3280074, 'CONN;1kV;;AL;6-35/6-35mm2;PRS HS;WP', 'SR', 11650, 'B'),
(3280094, 'CONN;20kV;H;AL;35-35mm2;PRS;', 'SR', 0, 'B'),
(3280095, 'CONN;20kV;H;AL;50-70mm2;PRS;', 'SR', 0, 'B'),
(3280102, 'CCO 70-35 mm2 + Isolasi scooth', 'SR', 0, 'B'),
(3280104, 'CCO 16-16 mm2 + Isolasi scooth', 'SR', 40750, 'B'),
(3280106, 'CONN;1kV;;CU;16-16mm2;PRS HS;WP', 'SR', 2500, 'B'),
(3280109, 'CCO 35/16 mm2 + Heatshrink', 'SR', 78750, 'B'),
(3280113, 'CONN;20kV;H;AL;16-70mm2;PRS;', 'SR', 0, 'B'),
(3280117, 'CONN;20kV;H;AL-AL;150mm2;PRS;JUMPER;', 'SR', 0, 'B'),
(3280120, 'CONN;20kV;H;AL-AL;35=70mm2;PRS;JUMPER;', 'SR', 0, 'B'),
(3280129, 'CONN;20KV;LLC;AL;70-150mm2; BOLT', 'SR', 0, 'B'),
(3280134, 'CONN;20kV;CIRCLE;AL;70-150mm2;PRS;', 'SR', 0, 'B'),
(3280139, 'CONN;20kV;H;AL;70-70/70-70mm2;PRS;', 'SR', 0, 'B'),
(3280147, 'CONN;0.6/1kV;H;AL;16-35/16-35mm2;PRS;', 'SR', 610, 'B'),
(3280151, 'CONN;20kV;H;AL;35-70/35-70mm2;PRS;', 'SR', 0, 'B'),
(3280154, 'CONN;20kV;H;AL;70-150/120-240mm2;PRS;', 'SR', 0, 'B'),
(3280158, 'CONN;20kV;LLC;AL;35-70mm2;PRS;2BOLT', 'SR', 0, 'B'),
(3280182, 'CONN;20kV;H;AL;70-150mm2;PRS;', 'SR', 0, 'B'),
(3280185, 'CONN;20kV;H;AL;150-150mm2;PRS;', 'SR', 0, 'B'),
(4050002, 'INVERTER;220VAC-12VDC;;1P;', 'GARDU', 0, 'B'),
(4120013, 'BOX KWH FIBER', 'SR', 0, 'B'),
(4120016, 'BOX KWH PLAT', 'SR', 0, 'B'),
(4120027, 'OK 1 PHASA', 'SR', 4784, 'B'),
(4120049, 'OK 3 PHASA', 'SR', 0, 'B'),
(4120062, 'OK 1 PHASA', 'SR', 1880, 'B'),
(4120075, 'BOX;APPVI KHUSUS;ST PLATE 2mm;88X55X28cm', 'SR', 10, 'B'),
(4120084, 'BOX;APPIII MCCB 63A;PLAT 2mm;80X50X35cm', 'SR', 106, 'B'),
(4120085, 'BOX;APPIII MCCB 80A;PLAT 2mm;80X50X35cm', 'SR', 14, 'B'),
(4120086, 'BOX;APPIII MCCB 100A;PLAT 2mm;80X50X35cm', 'SR', 12, 'B'),
(4120087, 'BOX;APPIII MCCB 125A;PLAT 2mm;80X50X35cm', 'SR', 2, 'B'),
(4120088, 'BOX;APPIII MCCB 160A;PLAT 2mm;80X50X35cm', 'SR', 0, 'B'),
(4120089, 'BOX;APPIII MCCB 200A;PLAT 2mm;80X50X35cm', 'SR', 3, 'B'),
(4120090, 'BOX;APPIII MCCB 225A;PLAT 2mm;80X50X35cm', 'SR', 3, 'B'),
(4120091, 'BOX;APPIII MCCB 250A;PLAT 2mm;80X50X35cm', 'SR', 35, 'B'),
(4120092, 'BOX;APPIII MCCB 300A;PLAT 2mm;80X50X35cm', 'SR', 14, 'B'),
(4150061, 'TIME SWITCH MEKANIK', 'SR', 94, 'B'),
(4150062, 'PANEL ACC;MAIN SWITCH 400V 400A 3P', 'SR', 16, 'B'),
(4150063, 'PANEL ACC;MAIN SWITCH 400V 630A 3P', 'SR', 12, 'B'),
(4150073, 'PANEL ACC;MAIN SWITCH 400V 3P 200A', 'SR', 6, 'B'),
(4150074, 'PANEL ACC;MAIN SWITCH 400V 3P 250A', 'SR', 14, 'B'),
(4150075, 'PANEL ACC;MAIN SWITCH 400V 3P 500A', 'SR', 9, 'B'),
(4150077, 'PANEL ACC;MAIN SWITCH 400V 3P 800A', 'SR', 7, 'B'),
(4150080, 'PANEL ACC;MAIN SWITCH 400V 3P 1250A', 'SR', 0, 'B'),
(4190081, 'UNIV ACC;PLASTIC STRAP 200mm', 'SR', 50011, 'B'),
(4190260, 'UNIV ACC;GROUND ROD CU 1/2"X2500mm', 'SR', 0, 'B'),
(119023365, 'DOUBLE SIDE TIES 70 U/A2C', 'JTM', 0, 'B'),
(119050582, 'PREFORM TERMINATION GUY WIRE 70', 'JTM', 0, 'B'),
(657010001, 'TIANG BESI 7 M', 'GARDU', 0, 'BTG'),
(685070887, 'TIANG BETON 7/100 Dan', 'GARDU', 0, 'BTG'),
(695070228, 'TIANG BESI 9 M7', 'GARDU', 0, 'BTG');
 
-- --------------------------------------------------------
 
--
-- Table structure for table `surat_jalan`
--
 
CREATE TABLE IF NOT EXISTS `surat_jalan` (
`nomor_surat` INT(11) NOT NULL AUTO_INCREMENT,
`tgl_surat` DATE NOT NULL,
`nomor_kode7` INT(11) NOT NULL,
`tgl_kode7` DATE NOT NULL,
`kepada` CHAR(35) NOT NULL,
`pengemudi` VARCHAR(9) NOT NULL,
`keperluan` CHAR(35) NOT NULL,
`penerima` CHAR(35) NOT NULL,
PRIMARY KEY (`nomor_surat`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=58 ;
 
--
-- Dumping data for table `surat_jalan`
--
 
INSERT INTO `surat_jalan` (`nomor_surat`, `tgl_surat`, `nomor_kode7`, `tgl_kode7`, `kepada`, `pengemudi`, `keperluan`, `penerima`) VALUES
(1, '2012-06-18', 1, '2012-06-18', 'XXX', 'XXX', 'XXX', 'XXX'),
(2, '2012-06-18', 2, '2012-06-18', 'YYY', 'YYY', 'YYY', 'YYY'),
(3, '2012-06-19', 511, '2012-08-17', 'pa Haji', 'E771C', 'Rahasia', 'Ibrahim'),
(4, '2012-06-19', 1233, '2012-07-11', 'A', 'AAA', 'AAA', 'AAA'),
(5, '2012-06-19', 1231231, '2012-08-17', 'A', 'A223E', 'A', 'asd'),
(6, '2012-06-19', 1231231, '2012-07-11', 'AAA', 'AAA', 'AAA', 'AAA'),
(7, '2012-06-19', 1231231, '2012-08-17', 'asda', 'A223E', 'A', 'asd'),
(8, '2012-06-19', 511, '2012-07-11', 'A', 'A223E', 'A', 'A'),
(9, '2012-06-19', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(10, '2012-06-19', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(11, '2012-06-19', 512, '2012-07-11', 'BBB', 'BBB', 'BBB', 'BBB'),
(12, '2012-06-20', 1111, '2012-09-11', 'Ibrahim', 'A221E', 'Rahasia', 'Acong'),
(13, '2012-06-20', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(14, '2012-06-20', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(15, '2012-06-20', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(16, '2012-06-20', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(17, '2012-06-20', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(18, '2012-06-20', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(19, '2012-06-20', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(20, '2012-06-20', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(21, '2012-06-20', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(22, '2012-06-20', 1, '2012-07-11', 'asda', 'A223E', 'A', 'test'),
(23, '2012-06-20', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(24, '2012-06-20', 123456, '2012-07-11', 'Ibrahim', 'A223E', 'Rahasia', 'Izunk'),
(25, '2012-06-20', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(26, '2012-06-20', 512, '2012-07-11', 'Ibrahim', 'AAA', 'AAA', 'asd'),
(27, '2012-06-20', 123, '2012-07-11', 'AAA', 'A223E', 'AAA', 'AAA'),
(28, '2012-06-20', 111, '2012-07-11', 'AAA', 'AAA', 'AAA', 'AAA'),
(29, '2012-06-20', 123456, '2012-07-11', 'BBB', 'BBB', 'BBB', 'BBB'),
(30, '2012-06-21', 123456, '2012-07-11', 'AAA', 'A223E', 'AAA', 'AAA'),
(31, '2012-06-21', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(32, '2012-06-21', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(33, '2012-06-21', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(34, '2012-06-21', 12312523, '2012-07-11', 'IBRAHIM', 'A223E', 'Rahasia', 'Izunk'),
(35, '2012-06-21', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(36, '2012-06-21', 14, '2012-07-11', 'AAA', 'A223E', 'AAA', 'AAA'),
(37, '2012-06-21', 656, '2012-07-11', 'Ibrahim', 'A223E', 'Rahasia', 'Izunk'),
(38, '2012-06-21', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(39, '2012-06-21', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(40, '2012-06-21', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(41, '2012-06-21', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(42, '2012-06-21', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(43, '2012-06-21', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(44, '2012-06-21', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(45, '2012-06-21', 123456, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(46, '2012-06-21', 123456, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(47, '2012-06-21', 123456, '2012-07-11', 'asda', 'A223E', 'A', 'AAA'),
(48, '2012-06-21', 1231231, '2012-08-17', 'asda', 'A223E', 'A', 'asd'),
(49, '2012-06-21', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(50, '2012-06-21', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(51, '2012-06-21', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(52, '2012-06-21', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(53, '2012-06-21', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(54, '2012-06-21', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(55, '2012-06-21', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'AAA'),
(56, '2012-06-21', 1231231, '2012-07-11', 'asda', 'A223E', 'A', 'asd'),
(57, '2012-06-21', 1, '2012-07-11', 'asda', 'A223E', 'A', 'asd');
 
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

"Nah ane ada ngedit dikit,ane coba mau manggil data yg didatabase yg udah simpan dan coba di edit,jadi yg dlam tabelnya bisa berkurang dan bertambah. itu gimana yaaaa......tolong dibantu
Silahkan login untuk menjawab!
0
Loading...
Ellyx Christian · Jul 19, 2012 · 0 Suka · 0 Tidak Suka
pertama saya harus ingatkan kalau menyertakan kode sisipkan kode yang perlu saja, bagian bagian yang penting saja. kemudian saat menyertarkan sql jangan sertakan semua hasil export dari phpmyadmin, tidak usah menyertakan hingga ke komentar komentar, cukup struktur tabel, insert hanya 1,2 atau 3 data.

Kedua saya tidak mengerti pertanyaan mana yang kamu maksud? ada banyak orang yang bertanya disini, kalau ingin merujuk ke pertanyaan lain, sertakan juga link ke pertanyaan tersebut!

Ketiga saya tidak bisa menjawab karena kamu tidak menyertakan kode yang kamu sudah buat, jika sudah edit tinggal sertakan kodenya disini dan katakan bagian yang mana tidak berjalan atau error. Sebagai catatan orang2 yang menjawab disini bukan compiler yang punya banyak waktu menganalisa koding atau membuatkan sebuah kode.
0
Loading...
Ahmad Syaifullah · Jul 20, 2012 · 0 Suka · 0 Tidak Suka
trimakasih om....sebelumnya ane mohon maav atas ketidaknyamanannya.
baiklah saya cuma minta info dan bantuannya bagaimana jika code tersebut sya edit seperti brikut.
<table width="647" border="0">
        <tr>
          <td width="130" align="center">Nama
            <select name="cbonm" id="cbonm" onchange="cari(this.value)">
              <option value=" " selected="selected"> </option>
              <?php
			include "koneksi.php";
				$hasil = mysql_query("SELECT * FROM tbpeg");
				while($data=mysql_fetch_array($hasil)){
				echo "<option value='".$data[0]."-".$data[1]."'>$data[nama]</option>";
				}
			 ?>
            </select></td>
          <td width="180" align="center">Alamat
            <input name='txtalamat' type='text' id='txtalamat' size='20' readonly="readonly" /></td>
          <td width="180" align="center">Tlpsi
            <input name='txttlp' type='text' id='txttlp' size='20' readonly="readonly" /></td>
          <td width="240" align="center">Keterangan / Keterangan
            <textarea name="txtketerangan" id="txtketerangan"></textarea></td>
        </tr>
      </table>
      <p>
        <input type="button" name="tambah" value=" Tambahkan " id="tambah" onclick= "addTableRow($('#myTable'))" />
      </p>
      </fieldset>
      
      <fieldset>
      <table width="100%" border="1" style="border-collapse: collapse; font-family: 'Comic Sans MS', cursive;" id="myTable">
        <thead>
          <tr align="center">
            <td width="9%" bgcolor="#FFFFCC">Nip</td>
            <td width="19%" bgcolor="#FFFFCC">Nama</td>
            <td width="17%" bgcolor="#FFFFCC">Alamat</td>
            <td width="25%" bgcolor="#FFFFCC">Tlp</td>
            <td width="21%" bgcolor="#FFFFCC">Keterangan</td>
            <td width="9%" bgcolor="#FFFFCC">Act</td>
          </tr>
          <?php
			$rowset = mysql_query("SELECT * FROM detil_keg d inner join tbpeg p on d.nip=p.nip WHERE id='".$keg."' ORDER by p.alamat");
			while($q2 = mysql_fetch_array($rowset)){
				$jml = mysql_num_rows($rowset)
		?>

         <tr>
            <td align="center"><?php echo $q2['nip'];?></td>
            <td><?php echo $q2['nama'];?></td>
            <td><?php echo $q2['alamat'];?></td>
            <td><?php echo $q2['tlp'];?></td>
            <td><?php echo $q2['ket'];?></td>
            <td align="center" class="delete" onclick="$(this).parent().remove();"><a href="javascript:del()">Hapus</a></td>
          </tr>        
         
          <?php }?>
        </thead>
      </table>

jadi maksudnya, mau edit atau merubah data yg sudah disimpan di form transaksi tersebut, karena source yg punya saya sekarang hanya bisa menampikan saja, tapi pada saat di simpan/save, pada bagian tabel datanya ga bisa disimpan.(maksudnya ini seperti form transaksi pada program2 yg di toko,jadi transaksinya bisa di edit).
berikut source simpannya.
<?php
		
include "koneksi.php";

	  $sql = "UPDATE tbkeg SET jns='$jns',nm_keg='$nmkeg',tgl='$t[2]-$t[1]-$t[0]', ,kontak_p='$kontak',periode='$periode',ket='$ket WHERE id = '$id'";
	  $sql = "DELETE FROM detil_keg WHERE id = '$id'";
       $hasil = mysql_query($sql);   

	  			 $cbonm = $_POST['cbonm']; 
					foreach($_POST['nomor'] as $key => $val) {
						$q3 = "INSERT INTO detil_keg VALUES ('".$id."', '".$cbonm[$key]."', '".$val."')";
						$r1 = mysql_query($q3);
	   
    }

nah pada bagian simpannya detilnya itu ga bisa.(mohon dibantu)
(skli lagi maav ya om klo cara ngirim pertanyaan ane salah lagi)
0
Loading...
Ellyx Christian · Jul 20, 2012 · 0 Suka · 0 Tidak Suka
saya sedikit bingung dengan skrip yang dikasi, mungkin tutorial http://www.myphptutorials.com/tutorials/513/edit-delete-data-tabel-yang-berelasi bisa membantu
0
Loading...
Ahmad Syaifullah · Jul 21, 2012 · 0 Suka · 0 Tidak Suka
trimakasih om jawabannya.
memang itu maksud saya seperti yg ada di "Edit & Delete Data Tabel Berelasi Satu-ke-banyak".
Tapi masalah saya blum jg selesai nich maklum pemula, karena tabel yg ada di "Edit & Delete Data Tabel Berelasi Satu-ke-banyak" berbeda dengan yg ada disaya.
seperti ini pnya saya.
 <?php
$rowset = mysql_query("SELECT * FROM detil_keg d inner join tbpeg p on d.nip=p.nip WHERE id='".$keg."' ORDER by p.alamat");
while($q2 = mysql_fetch_array($rowset)){
$jml = mysql_num_rows($rowset)
?>
 
<tr>
<td align="center"><?php echo $q2['nip'];?></td>
<td><?php echo $q2['nama'];?></td>
<td><?php echo $q2['alamat'];?></td>
<td><?php echo $q2['tlp'];?></td>
<td><?php echo $q2['ket'];?></td>
<td align="center" class="delete" onclick="$(this).parent().remove();"><a href="javascript:del()">Hapus</a></td>
</tr>
 
<?php }?>

jadinya itu gimana?
0
Loading...
Ellyx Christian · Jul 21, 2012 · 0 Suka · 0 Tidak Suka
tablenya pasti berbeda, yang jelas kan sama2 relasi dari satu ke banyak. Jadi caranya ya sama juga.
0
Loading...
Ellyx Christian · Jul 21, 2012 · 0 Suka · 0 Tidak Suka
untuk edit data yang pasti perlu sebuah form, input field. Sedangkan kamu tidak membuat form itu, jadi mana mau datanya teredit.
 <?php
$rowset = mysql_query("SELECT * FROM detil_keg d inner join tbpeg p on d.nip=p.nip WHERE id='".$keg."' ORDER by p.alamat");
$i = 0;
while($q2 = mysql_fetch_array($rowset)){
$jml = mysql_num_rows($rowset)
?>
 
<tr>
<td align="center"><input type="text" name="nip[<?php echo $id?>]" value="<?php echo $q2['nip'];?>"/></td>
<td><input type="text" name="nama[<?php echo $id?>]" value="<?php echo $q2['nama'];?>"/></td>
<td><input type="text" name="alamat[<?php echo $id?>]" value="<?php echo $q2['alamat'];?>"/></td>
<td><input type="text" name="tlp[<?php echo $id?>]" value="<?php echo $q2['tlp'];?>"/></td>
<td><input type="text" name="ket[<?php echo $id?>]" value="<?php echo $q2['ket'];?>"/></td>
<td align="center" class="delete" onclick="$(this).parent().remove();"><a href="javascript:del()">Hapus</a></td>
</tr>
 
<?php }?>
0
Loading...
Ahmad Syaifullah · Jul 23, 2012 · 0 Suka · 0 Tidak Suka
oc om sipppppp......thanx yg banyak :):);)