kppnadministration /verak/insert_satkerpot.php

Language PHP Lines 168
MD5 Hash 749b0a93e678da49452ea6dba44369fa Estimated Cost $3,557 (why?)
Repository https://bitbucket.org/metamorph/kppnadministration.git View Raw File View Project SPDX
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?php
require "koneksi.php";
include "fungsi_rp.php";
$tgl		= $_POST['tgl'];
$bln		= $_POST['bln'];
$thn		= $_POST['thn'];
$tanggal	= "$thn-$bln-$tgl";
$Tgl		= $_POST['Tgl'];
$Bln		= $_POST['Bln'];
$Thn		= $_POST['Thn'];
$Tanggal	= "$Thn-$Bln-$Tgl";
$Akun		= $_POST['akun'];

//Akun 411
if($Akun=='411'){
	$qpjk	= mysql_query("SELECT DISTINCT a.kdsatker,a.nospm,a.kdakun,a.tgsp2d,a.nosp2d,a.kdsatkerb,SUBSTRING(b.kdnpwp,10,3) AS npwp,c.kd_satker AS kpp,c.kd_kpp AS kdkpp FROM m_spmmap a,m_spminfo b,t_kpp c WHERE a.nosp2d=b.nosp2d AND SUBSTRING(b.kdnpwp,10,3)=c.kd_kpp AND a.kdsatkerb='' AND LEFT(a.kdakun,3)='$Akun' AND a.tgsp2d BETWEEN '$tanggal' AND '$Tanggal' ORDER BY a.tgsp2d,a.kdsatker");
	$no	= 1;
	
	echo"<br /><h3><center><font face='verdana'>Insert Data Satker Pada Potongan Tanggal: $tgl-$bln-$thn s.d. $Tgl-$Bln-$Thn</font></center></h3>
		<br />
		<form action='inserting_satkerpot.php' method='post'>
		<table border='1' align='center' width='85%'>
		<tr height='50'>
			<th>No.</th>
			<th>Satker</th>
			<th>No.SPM</th>
			<th>Tgl.SP2D</th>
			<th>No.SP2D</th>
			<th>Akun</th>
			<th>Satkerb</th>
			<th>NPWP</th>
			<th>KPP</th>
		</tr>";
		
	while($rpjk	= mysql_fetch_array($qpjk)){
		$satker	= $rpjk['kdsatker'];
		$nospm	= $rpjk['nospm'];
		$akun		= $rpjk['kdakun'];
		$Tgsp2d	= $rpjk['tgsp2d'];
		$tgsp2d	= tgl($Tgsp2d);
		$nosp2d	= $rpjk['nosp2d'];
		$satkerb	= $rpjk['kdsatkerb'];
		$npwp		= $rpjk['npwp'];
		$kpp		= $rpjk['kpp'];
		$kdkpp	= $rpjk['kdkpp'];
		
		echo "<tr>
			<td align='center'>$no</td>
			<td align='center'><input type='text' name='kdsatker$no' value='$satker' size='4' maxlength='6' readonly='readonly' /></td>
			<td align='center'><input type='text' name='nospm$no' value='$nospm' size='4' maxlength='5' readonly='readonly' /></td>
			<td align='center'>$tgsp2d</td>
			<td align='center'><input type='text' name='nosp2d$no' value='$nosp2d' size='5' maxlength='7' readonly='readonly' /></td>
			<td align='center'>$akun</td>
			<td align='center'><input type='text' name='kdsatkerb$no' value='$satkerb' size='4' maxlength='6' readonly='readonly' /></td>
			<td align='center'>$npwp</td>
			<td align='center'><input type='text' name='kpp$no' value='$kpp' size='4' maxlength='6' readonly='readonly' /></td>
		</tr>";
		$no++;
		}
//jumlah banyaknya data akun 411
	echo"</table>
	<br />
	<input type='hidden' name='jumldata' value='$no-1;' />
	<input type='hidden' name='akun' value='$Akun' />
	<center><input type='submit' name='submit' value='Update' /></center>
	</form>";
	}
		
		
//Akun 423
elseif($Akun=='423' || $Akun=='511' || $Akun=='581' || $Akun=='815'){
	$qpnbp	= mysql_query("SELECT DISTINCT kdsatker,nospm,kdakun,tgsp2d,nosp2d,kdsatkerb FROM m_spmmap WHERE kdsatkerb='' AND LEFT(kdakun,3)='$Akun' AND tgsp2d BETWEEN '$tanggal' AND '$Tanggal' ORDER BY tgsp2d,kdsatker");
	$no		= 1;
	
	echo "<br /><h3><center><font face='verdana'>Insert Data Satker Pada Potongan Tanggal: $tgl-$bln-$thn s.d. $Tgl-$Bln-$Thn</font></center></h3>
		<br />
		<form action='inserting_satkerpot.php' method='post'>
		<table border='1' align='center' width='85%'>
		<tr height='50'>
			<th>No.</th>
			<th>Satker</th>
			<th>No.SPM</th>
			<th>Tgl.SP2D</th>
			<th>No.SP2D</th>
			<th>Akun</th>
			<th>Satkerb</th>
		</tr>";
	
	while($rpnbp= mysql_fetch_array($qpnbp)) {
		$satker	= $rpnbp['kdsatker'];
		$nospm	= $rpnbp['nospm'];		
		$akun		= $rpnbp['kdakun'];
		$Tgsp2d	= $rpnbp['tgsp2d'];
		$tgsp2d	= tgl($Tgsp2d);
		$nosp2d	= $rpnbp['nosp2d'];
		$satkerb	= $rpnbp['satkerb'];
		
		echo "<tr>
				<td align='center'>$no</td>
				<td align='center'><input type='text' name='kdsatker$no' value='$satker' size='4' maxlength='6' readonly='readonly' /></td>
				<td align='center'><input type='text' name='nospm$no' value='$nospm' size='4' maxlength='5' readonly='readonly' /></td>
				<td align='center'>$tgsp2d</td>
				<td align='center'><input type='text' name='nosp2d$no' value='$nosp2d' size='5' maxlength='7' readonly='readonly' /></td>
				<td align='center'>$akun</td>
				<td align='center'><input type='text' name='kdsatkerb$no' value='$satkerb' size='4' maxlength='6' readonly='readonly' /></td>
			</tr>";
	$no++;
		}
		
	//jumlah banyaknya data akun 423
	echo"</table>
	<br />
	<input type='hidden' name='jumldata' value='$no-1;' />
	<input type='hidden' name='akun' value='$Akun' />
	<center><input type='submit' name='submit' value='Update' /></center>
	</form>";
	}
	
//Akun 811
elseif($Akun=='811'){
	$qpfk		= mysql_query("SELECT DISTINCT kdsatker,nospm,kdakun,tgsp2d,nosp2d,kdsatkerb FROM m_spmmap WHERE kdsatkerb='' AND LEFT(kdakun,3)='$Akun' AND tgsp2d BETWEEN '$tanggal' AND '$Tanggal' ORDER BY tgsp2d,kdsatker");
	$no		= 1;
	
	echo "<br /><h3><center><font face='verdana'>Insert Data Satker Pada Potongan Tanggal: $tgl-$bln-$thn s.d. $Tgl-$Bln-$Thn</font></center></h3>
		<br />
		<form action='inserting_satkerpot.php' method='post'>
		<table border='1' align='center' width='85%'>
		<tr height='50'>
			<th>No.</th>
			<th>Satker</th>
			<th>No.SPM</th>
			<th>Tgl.SP2D</th>
			<th>No.SP2D</th>
			<th>Akun</th>
			<th>Satkerb</th>
		</tr>";
	
	while($rpfk= mysql_fetch_array($qpfk)) {
		$satker	= $rpfk['kdsatker'];
		$nospm	= $rpfk['nospm'];		
		$akun		= $rpfk['kdakun'];
		$Tgsp2d	= $rpfk['tgsp2d'];
		$tgsp2d	= tgl($Tgsp2d);
		$nosp2d	= $rpfk['nosp2d'];
		$satkerb	= $rpfk['satkerb'];
		
		echo "<tr>
				<td align='center'>$no</td>
				<td align='center'><input type='text' name='kdsatker$no' value='$satker' size='4' maxlength='6' readonly='readonly' /></td>
				<td align='center'><input type='text' name='nospm$no' value='$nospm' size='4' maxlength='5' readonly='readonly' /></td>
				<td align='center'>$tgsp2d</td>
				<td align='center'><input type='text' name='nosp2d$no' value='$nosp2d' size='5' maxlength='7' readonly='readonly' /></td>
				<td align='center'>$akun</td>
				<td align='center'><input type='text' name='kdsatkerb$no' value='$satkerb' size='4' maxlength='6' readonly='readonly' /></td>
			</tr>";
	$no++;
		}
		
	//jumlah banyaknya data akun 811
	echo"</table>
	<br />
	<input type='hidden' name='jumldata' value='$no-1;' />
	<input type='hidden' name='akun' value='$Akun' />
	<center><input type='submit' name='submit' value='Update' /></center>
	</form>";
	}
mysql_close($link);
?>
Back to Top