Jumat, Februari 27, 2009
PHP : Bilangan Prima
$c = $_POST[txtakhir];
$p="prima_prima";
$b="bukan prima";
for($a==1;$a<=$c;$a++)
{
if($a == 1) echo $a." ".$b."
";
elseif(($a==2)($a==3)($a==5)($a==7)) echo $a." ".$p."
";
else cek($a);
}
function cek()
{
global $a,$b,$p;
if(($a%2==0)($a%3==0)($a%5==0)($a%7==0)) echo $a." ".$b."
";
else echo $a." ".$p."
";
}
Rabu, Februari 18, 2009
Senin, Februari 16, 2009
ASP.Net : Encrypt
[WebMethod]
public string Encrypt(string toEncrypt)
{
byte[] keyArray;
byte[] toEncryptArray = UTF8Encoding.UTF8.GetBytes(toEncrypt);
System.Configuration.AppSettingsReader settingsReader = new AppSettingsReader();
// Get the key from config file
string key = "HondaKey";
MD5CryptoServiceProvider hashmd5 = new MD5CryptoServiceProvider();
keyArray = hashmd5.ComputeHash(UTF8Encoding.UTF8.GetBytes(key));
hashmd5.Clear();
TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider();
tdes.Key = keyArray;
tdes.Mode = CipherMode.ECB;
tdes.Padding = PaddingMode.PKCS7;
ICryptoTransform cTransform = tdes.CreateEncryptor();
byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length);
tdes.Clear();
return Convert.ToBase64String(resultArray, 0, resultArray.Length);
}
ASP.Net : Decrypt
[WebMethod]
public string Decrypt(string cipherString)
{
byte[] keyArray;
byte[] toEncryptArray = Convert.FromBase64String(cipherString);
System.Configuration.AppSettingsReader settingsReader = new AppSettingsReader();
//Get your key from config file to open the lock!
string key = "HondaKey";
MD5CryptoServiceProvider hashmd5 = new MD5CryptoServiceProvider();
keyArray = hashmd5.ComputeHash(UTF8Encoding.UTF8.GetBytes(key));
hashmd5.Clear();
TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider();
tdes.Key = keyArray;
tdes.Mode = CipherMode.ECB;
tdes.Padding = PaddingMode.PKCS7;
ICryptoTransform cTransform = tdes.CreateDecryptor();
byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length);
tdes.Clear();
return UTF8Encoding.UTF8.GetString(resultArray);
}
ASP.Net : koneksi ke database SQL
[WebMethod]
public bool MyConnection()
{
//connection to server
// ditambah fungsi decrypt pada connecting string
string strCon = "xG2InqSpM9K9imPkVdrZ7mzmnW/uLX7nC6ooId0kssXilyYK1At2qnWqzo5w747LpmF4e/lb7mAynqGZC/BCJZaxapd7B7rIoJkH9KUx9Y6PctmceL95+f2xrQ/GQiIW5GnmXkVn/MvWVex3GslaB4usmiMuAdjBjlfbzSCx0AE=";
objcon = new SqlConnection(Decrypt(strCon).ToString());
try
{
objcon.Open();
return true;
}
catch
{
return false;
}
}
PHP & PostGre : Koneksi Select
$conn_string = "host=localhost dbname=testing user=test password= test";
$conn = pg_connect($conn_string);
//$conn=pg_Connect("dbname=testing");
if (!$conn){
echo "Error Koneksi";
}else {
$sql = "select * from testah";
$result =pg_query($conn, $sql);
while ($row = pg_fetch_array($result)){
echo $row["id"]. " - " . $row["nama"] . " - " . $row["alamat"] . "
";
}
}
hasilnya :
2 - alisyahbanas - jl. japati no. 1
1 - sentots - jl. arwana no. 1
Jumat, Februari 13, 2009
PHP & Mysql : PHP select
if (!$conn){
echo "Error Koneksi";
}else {
mysql_select_db("sistem_kuliah",$conn);
$sql = "select * from mahasiswa";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)){
echo $row["nim"]. "-" . $row["nama"] . "
";
}
}
hasilnya :
0180000536-andri
0280000254-tung desem
085555-indira
0925000-adi
0925000-adi
PHP & Mysql : PHP insert
if (!$conn){
echo "Error Koneksi";
}else {
mysql_select_db("sistem_kuliah",$conn);
$sql = "insert into mahasiswa (nim,nama)
values ('0925000', 'adi')";
mysql_query($sql,$conn);
echo " data insert 1 row";
}
PHP & Mysql : Koneksi PHP ke MySQL (2)
// kneksi 2 : konseksi dengan pesan error , penggunaan fungsi if
$conn=mysql_connect ("localhost","root","");
if ($conn){
echo "
Koneksi Berhasil";
}else {
echo "Koneksi Gagal";
}
?>
hasilnya :
Koneksi Berhasil
PHP & Mysql : Koneksi PHP ke MySQL (1)
//koneksi 1 : koneksi ke mysql yang benar dengan konsisi password kosong
$conn = mysql_connect ("localhost","root","");
echo $conn;
echo "
";
// koneksi 1 : jika salah koneksi akan muncul pesan error atau error handling
$conn= mysql_connect ("localhost","root","salah") or die ("error connection");
?>
hasilnya :
untuk conn pertama yang berhasil akan muncul :
"Resource id #2"
untuk conn ke 2 karena passwordnya salah maka akan muncul :
"Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in C:\xampp\htdocs\hari4\koneksi1.php on line 9
error connection"
SQL : Insert, Update data, delete data dan tambah field
ALTER TABLE `mahasiswa` ADD `value` INT( 5 ) NULL DEFAULT '0';
insert :
INSERT INTO `sistem_kuliah`.`mahasiswa` (
`nim` ,
`nama` ,
`alamat` ,
`angkatan` ,
`status` ,
`value`
)
VALUES (
'085555', 'indira', 'jl. sunter II', '2008', 'aktif', '5'
);
update data:
UPDATE `sistem_kuliah`.`mahasiswa`
SET `status` = 'tidak aktif'
WHERE `nim`= '0180000536';
delete:
DELETE FROM [tabel]
WHERE [kondisi];
Mysql : View pada Mysql 5.0.41
D:\its me\xampp\mysql\bin>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.41-community-nt MySQL Community Edition (GPL)
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql> create database forum;
Query OK, 1 row affected (0.00 sec)
mysql> use forum;
Database changed
mysql> create table barang(kode_barang char(3) not null primary key default’0′,n
ama_barang char(30),harga_barang int);
Query OK, 0 rows affected (0.09 sec)
mysql> insert into barang values(’001′,’mobil’,50000000);
Query OK, 1 row affected (0.05 sec)
mysql> create table jual(tgl date,kode char(3),jml_jual int);
Query OK, 0 rows affected (0.09 sec)
mysql> insert into jual values(’2007-01-01′,’001′,3);
Query OK, 1 row affected (0.00 sec)
mysql> create view jualan_view as select DATE_FORMAT(b.tgl,’%d %M %Y’) as tgl,b.kode,a.nama_barang, a.harga_barang,b.jml_jual,(a.harga_barang*b.jml_jual) as total from jual b, barang a where
b.kode=a.kode_barang;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from jualan_view;
==========================================
| tgl | kode | nama_barang | harga_barang | jml_jual | total |
===========================================
| 01 January 2007 | 001 | mobil | 50000000 | 3 | 150000000 |
+———————–+——+————-+————–+———-+
1 row in set (0.00 sec)
PHP & Mysql : Paging dengan SQL
SELECT
WHERE [kondisi]
ORDER BY [kolom] [asc/desc]
GROUP BY [kolom]
LIMIT [offset] , [row]
// untuk paging dalam php menggunakan SQL
$jmlsatupage = 5;
$pageno = $_get["p"];
$query= "select * from a limit "
.(($pageno * $jmlsatupage) - ($pageno -1) . ","
. ($pageno *$jmlsatupage );
-- eksekusi $query
mysql_query($query,$conn);
//$conn untuk variable koneksi php.. (lihat judul PHP : Koneksi (3))
PHP : CLASS
{
var $items;
//item in our shopping cart
// ada $num articles of $artnr to the cart
function add_item ($artnr, $num)
{ $this->items[$artnr]+= $num;
}
//take $num article of $artnr out of the cart
function remove_item($artnr,$num)
{
if($this->items[$artnr]>$num)
{
$this->items[$artnr]-=$num; return true;
}
else
{
return false;
}
}
}
//how to use it?
$cart = new Cart;
echo "test";
$cart->add_item("10",1);
?>
Rabu, Februari 11, 2009
PHP palindrom
$word = abcfcba;
if ($word == strrev ($word)) {
echo 'The word is a palindrome';
} else {
echo 'This is not a palindrome';
}
//palindrom array
$arr = array('a','h','a');
if(count($arr) % 2) {
$stopat = ((count($arr) - 1) / 2) - 1;
} else {
$stopat = count($arr) / 2;
}
echo "
". $stopat;
$ispalarr = 0;
for($i = 0; $i < $stopat; $i++) {
if($arr[$i] == $arr[count($arr) - ($i + 1)]) {
echo "
masuk ke for";
$ispalarr = 1;
}
}
echo "
". $ispalarr;
echo "
";
if($ispalarr == 0) {
echo " The array is not a palindrome array.";
} else {
echo "The array is a palindrome array.";
}
?>
ORA : permasalahan rekap TAX
1. form1721_a1_upper.rep
2. form1721_a1_lower.rep
solusi
file : spt_pph21_1721_a1_3_upper.rep date 23-3-2004 05.40
perubahan :
file master adalah spt_pph21_1721_A_upper_3_2004.rdf
- dihapuskannya kolom pph ditanggung pemerintah
- npwp membuat jadi bermasalah pada tampilan karena ukuran kolom npwp yang terlalu kecil (type Expand)
- parameter npwp di report pada properti--> general layout -->vertikal = fixed
(sebelumnya expand), fixed yang dimaksud jika data npwp terlalu lebar dari kolom maka akan di
potong.
- perapihan lebar kolom pada report pph21 upper tersebut sesuai data
- pengecilan font pada data (menjadi courier new 7pt )
- eksekusi file rep : cntr+T
file kemudian disimpan dengan nama :
file master adalah spt_pph21_1721_A_upper_3_2009.rdf
* begitu pula dengan format file lower
spt_pph21_1721_A_lower_3_2009.rdf
Jumat, Februari 06, 2009
PHP Counter kunjungan
ini juga diajarin di hari ke 3...
$filename = "filecounter.txt";
// untuk membuat counter bertambah setiap page di klik
$count_my_page = ($filename);
$count = file($count_my_page);
$count[0] ++;
$fp = fopen($count_my_page , "w");
fputs($fp , "$count[0]");
fclose($fp);
echo $count[0];
// end conter
// melihat IP yang sama melihat page kita, perhitungan mengunakan IP
$filename2 = "ipcounter.txt";
// file harus dibedakan dengan diatas diakrenakan untuk menuliskan log ipyang read
//memaasukkan no IP komputer yang browse ke dalam file ipcounter.txt
$count_my_address = ($_SERVER['REMOTE_ADDR']);
$f=fopen($filename2,"a");
fwrite($f," \r\n\n ".$count_my_address);
fclose($f);
// end -- membuka file dan menuliskan ke file ipcounter
// menghitung jumlah ip yang telah di simpan pada ipcounter.txt
$count = file($filename2);
$counter = 0;
while (list($line_num, $line) = each($count))
{
if(trim($line)== $count_my_address) {
++$counter;
}
}
echo "Anda telah mengunjungi kami sebanyak ", $counter. "kali";
?>
PHP predifine dan FOR
but karena hari pertama loading nya masih lama + hari ke dua nya ngak hadir secara hujan! hehehe soo hari ketiga harus diteken dikit nich isi kepala untuk bisa in progress!!!!
hari ini belajar predifine, sama sedikit ngejar hari kedua yaitu fungsi FOR :
predifine ini bertujuan untuk mengetahui seperti IP , PORT dari user yang mengunjungi web kita.
echo $_SERVER['HTTP_HOST']. "";
echo $_SERVER['REMOTE_ADDR']. "";
echo $_SERVER['SERVER_PORT']. "
" ;
echo $_SERVER['HTTP_ACCEPT']. "
";
//in iuntuk ngejar pertemuan ke 2 ttg if, switch , for dan while...
// lucu juga sich karena ini biasnya gw yang ngajar logika berfikir.. but jalanin aja dech... hitung2 ng-refresh isi kepala lagi dengan logika algoritma!! YES WE CAN
$i=0;
$y=0;
for ($y=1;$y<=5;$y++)
{
for ($i=1;$i<=$y;$i++)
{
echo "*";
}
echo "
";
}
?>
-----------
Rabu, Februari 04, 2009
ORA : kolom NPWP dan penandatanganan
tetapi sebanarnya sudah ada table yang fieldnya berisi NPWP yaitu di herru_employments
- dicoba untuk ditambahkan data NPWP ke dalam field NPWP
dengan
update herru_employments set npwp= :npwp
where gendat_nrp = :nrp
and gendat_vend_vnd_code = :perush;
dan saat run report... berhasil npwpnya muncul...
sekarang maslahnya, bagaimana isi 300 data npwp ke dalam table tanpa harus input 1 per 1 ?
ask my wife!!!!! she have a brillian answer!!! please ...
solusi :
melakukan pembuatan syntax pada excell dengan penggabungan syntax1&syntax2&syntax3 yang dihubungan dengan data yang dibutuhkan seperti Gendat_nrp dan NPWP
- lalu dari excell di paste by value ke notepad
- dari notepad.. si save menjadi NPWP.SQL
- buka SQLPLUS pada deskstop
- lakukan perintah @d:/npwp.sql; di dalam board sql>
"progressssssss"
"done"
... row update!
- commit;
- cek data dengan select statement
select gendat_nrp, npwp from herru_employments
where gendat_nrp = :nrp
and gendat_vend_vnd_code = :perush ;
- setelah keluar semua dan yakin... alhamdulillah
- run report... dan MUNCUL
thanks god
ORA : Tanggal Keluar Karyawan Oracle
select a.GENDAT_NRP, a.EMP_STATUS, b.REF_NAME, a.EMP_STATUS_DATE
from HERRU_EMPLOYMENTS a, HERRU_References b
where GENDAT_NRP= :gendat
and b.ref_code = a. emp_status
-- update tanggal keluar
update HERRU_EMPLOYMENTS
set EMP_STATUS_DATE= :mmhhyy
where GENDAT_NRP= :gendat
ORA : honorarium, natura, iuran THT, PPH 21 dipotong masa sebelumnya
d.ref_name "Status Kepegawaian", a.MARITAL_STATUS "Status Kawin",a.GENDER "Jenis Kelamin",
a.DEPENDANT_OF_CHILD "Jumlah Anak", decrypt(a.nrp,e.amount) "Upah",
decrypt(a.nrp,f.amount) "Tunjangan Lain"
from herru_general_datas a, herru_employments b, herru_references c, herru_references d,
herru_taxes e, herru_taxes f
where b.gendat_nrp=a.nrp and c.ref_code=b.POSITION and d.ref_code=b.EMP_STATUS
and e.gendat_nrp=a.nrp and e.res_code='SP01' and to_char(e.PAYRESULT_DATE,'YYYY') = :vYEAR
and f.gendat_nrp=a.nrp and f.res_code='SP03' and to_char(f.PAYRESULT_DATE,'YYYY') = :vYEAR
order by a.nrp asc;
-- mulai dari A4-A5
select a.NRP, decrypt(a.nrp,c.amount) "Honorarium", decrypt(a.nrp,d.amount) "Premi Asuransi"
from herru_general_datas a, herru_employments b, herru_taxes c, herru_taxes d
where b.gendat_nrp=a.nrp
and c.gendat_nrp=a.nrp and c.res_code='SP04'and to_char(c.PAYRESULT_DATE,'YYYY') = :vYEAR
and d.gendat_nrp=a.nrp and d.res_code='SP05'and to_char(d.PAYRESULT_DATE,'YYYY') = :vYEAR
order by a.nrp asc;
-- mulai dari A6,A8
select a.NRP, decrypt(a.nrp,c.amount) "Natura", decrypt(a.nrp,d.amount) "Tantiem,Bonus"
from herru_general_datas a, herru_employments b, herru_taxes c, herru_taxes d
where b.gendat_nrp=a.nrp
and c.gendat_nrp=a.nrp and c.res_code='SP06'and to_char(c.PAYRESULT_DATE,'YYYY') = :vYEAR
and d.gendat_nrp=a.nrp and d.res_code='SP08'and to_char(d.PAYRESULT_DATE,'YYYY') = :vYEAR
order by a.nrp asc;
-- mulai dari A12,A15
select a.NRP, decrypt(a.nrp,c.amount) "Iuran THT", decrypt(a.nrp,d.amount) "Penghasilan Net"
from herru_general_datas a, herru_employments b, herru_taxes c, herru_taxes d
where b.gendat_nrp=a.nrp
and c.gendat_nrp=a.nrp and c.res_code='SP12'and to_char(c.PAYRESULT_DATE,'YYYY') = :vYEAR
and d.gendat_nrp=a.nrp and d.res_code='SP15'and to_char(d.PAYRESULT_DATE,'YYYY') = :vYEAR
order by a.nrp asc;
-- mulai dari A20,A24
select a.NRP, decrypt(a.nrp,c.amount) "PPH21 Dipotong Masa Sebelumnya",
decrypt(a.nrp,d.amount) "PPH21 Terpotong & Terlunasi"
from herru_general_datas a, herru_employments b, herru_taxes c, herru_taxes d
where b.gendat_nrp=a.nrp
and c.gendat_nrp=a.nrp and c.res_code='SP20'and to_char(c.PAYRESULT_DATE,'YYYY') = :vYEAR
and d.gendat_nrp=a.nrp and d.res_code='SP21'and to_char(d.PAYRESULT_DATE,'YYYY') = :vYEAR
order by a.nrp asc;
ORA : Menampilkan Data Gaji Pokok dan Tanggal Berlaku Karyawan (All)
--
select a.nrp NRP, a.name NAMA, b.grade GOLONGAN, b.GRADE_DATE "Tanggal Berlaku Gol",
decrypt(b.gendat_nrp,salary) "GAJI POKOK (GP)",
b.salary_date "Tanggal Berlaku GP"
from herru_general_datas a,
herru_employments b where b.gendat_nrp=a.nrp and
substr(b.grade,0,1) in ('1','2','3')
order by a.nrp asc;
ORA : Gaji Pokok dan Tanggal Berlaku Karyawan Berdasarkan Tahun Grade
--
select a.nrp NRP, a.name NAMA, b.grade GOLONGAN, b.GRADE_DATE "Tanggal Berlaku Gol",
decrypt(b.gendat_nrp,salary) "GAJI POKOK (GP)",
b.salary_date "Tanggal Berlaku GP"
from herru_general_datas a,
herru_employments b where b.gendat_nrp=a.nrp and
substr(b.grade,0,1) in ('1','2','3')
and to_char(b.GRADE_DATE,'YYYY') = :tahun
order by a.nrp asc;
ORA: Gaji Pokok dan Tanggal Berlaku Karyawan Berdasarkan Tahun&Bulan Grade
--
select a.nrp NRP, a.name NAMA, b.grade GOLONGAN, b.GRADE_DATE "Tanggal Berlaku Gol",
decrypt(b.gendat_nrp,salary) "GAJI POKOK (GP)",
b.salary_date "Tanggal Berlaku GP"
from herru_general_datas a,
herru_employments b where b.gendat_nrp=a.nrp and
substr(b.grade,0,1) in ('1','2','3')
and to_char(b.GRADE_DATE,'MM') = :bulan
and to_char(b.GRADE_DATE,'YYYY') = :tahun
order by a.nrp asc;
ORA : adjusment SPT PT.HERRU
-- SELECT no 6
select gendat_NRP,decrypt(:NRP,amount) --into varamount
from herru_taxes
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP06'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS';
-- UPDATE NO 6
Update herru_taxes set amount =encrypt(:NRP,:Vmount)
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP06'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS';
-- SELECT no 7
select gendat_NRP,decrypt(:NRP,amount) --into varamount
from herru_taxes
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP07'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS';
-- UPDATE NO 7
Update herru_taxes set amount =encrypt(:NRP,:Vmount)
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP07'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS';
-- SELECT no 9
select gendat_NRP,decrypt(:NRP,amount) --into varamount
from herru_taxes
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP09'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS';
-- UPDATE NO 9
Update herru_taxes set amount =encrypt(:NRP,:Vmount)
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP09'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS';
-- Lihat data No.10 sebelumnya
select gendat_NRP,decrypt(:NRP,amount) --into varamount
from herru_taxes
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP10'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
-- Update NO. 10
Update herru_taxes set amount =encrypt(:NRP,:Vmount)
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP10'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
--**************************************************
-- Lihat data No.13 sebelumnya
select gendat_NRP,decrypt(:NRP,amount) --into varamount
from herru_taxes
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP13'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
-- Update No. 13
Update herru_taxes set amount =encrypt(:NRP,:Vmount)
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP13'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
--******************************************************
-- Lihat data No.14 sebelumnya
select gendat_NRP,decrypt(:NRP,amount) --into varamount
from herru_taxes
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP14'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
-- Update No.14
Update herru_taxes set amount =encrypt(:NRP,:Vmount)
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP14'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
--********************************************************
-- Lihat data No.16 sebelumnya
select gendat_NRP,decrypt(:NRP,amount) --into varamount
from herru_taxes
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP16' and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
-- Update No.16
Update herru_taxes set amount =encrypt(:NRP,:Vmount)
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP16'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
--*****************************************************
-- Lihat data No.17 sebelumnya
select gendat_NRP,decrypt(:NRP,amount) --into varamount
from herru_taxes
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP17'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
-- Update No.17
Update herru_taxes set amount =encrypt(:NRP,:Vmount)
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP17'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
--************************************************************
-- Lihat data No.18 sebelumnya
select gendat_NRP,decrypt(:NRP,amount) --into varamount
from herru_taxes
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP18'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
-- Update No.18
Update herru_taxes set amount =encrypt(:NRP,:Vmount)
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP18'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
--************************************************************
-- Lihat data No.19 sebelumnya
select gendat_NRP,decrypt(:NRP,amount) --into varamount
from herru_taxes
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP19'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
-- Update No.19
Update herru_taxes set amount =encrypt(:NRP,:Vmount)
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP19'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
--************************************************************
-- Lihat data No.21 sebelumnya
select gendat_NRP,decrypt(:NRP,amount) --into varamount
from herru_taxes
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP21'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'
-- Update No.21
Update herru_taxes set amount =encrypt(:NRP,:Vmount)
where gendat_nrp = :NRP
and gendat_vend_vnd_code = :perush
and res_code = 'SP21'
and to_char(payresult_date,'YYYY') = :tahun
and res_mode = 'MDSS'