Semoga ngga salah, blm dicoba di VB nih
 
 
Function Upah_lembur (Jml_Jam as integer, Tarif_Lembur as double) as
double
 
            If jml_jam <= 1 then
                        Upah_lembur = (Tarif_lembur * 1.5 * jml_jam)
            Elseif jml_jam <=8 then
                        Upah_lembur = (tarif_lembur * 1.5 * jml_jam) +
(tarif_lembur * 2 * (jml_jam - 1))
            Else                                            
                        Upah_lembur = (tarif_lembur * 1.5 * jml_jam) +
(tarif_lembur * 2 * (jml_jam - 1)) + (tarif_lembur * 5 * (jml_jam -8))
            End if
 
End function
 
-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Gege Nugroho
Sent: Thursday, September 13, 2007 9:22 PM
To: [EMAIL PROTECTED]
Subject: [Programmer-VB] [ASK] VB - Ambil jam Lembur
 
Guys...........
Sori lagih nih gwe punya masalah mengenai jam lembur di program gwe.
Kondisinya gini :
Apabila gwe dah mendapatkan data nilai jam lembur setiap karyawan, namun
ada perhitungan mengenai jam pertama kali sekian, jam kedua dan
seterusnya kali sekian, kayak gini :
 
Jika gwe dapet 3 jam lembur, trus diperhitungkan :
1 jam pertama dikali 1,5
jam berikutnya dikali 2
diatas 8 jam dikali 5
 
Logikanya begimane?
 
Trims ye........
 
Dari yang lagi bingung ngitung lemburan
Gege


Regards
Gege Nugroho
  
  _____  

Luggage? GPS? Comic books? 
Check out fitting gifts
<http://us.rd.yahoo.com/evt=48249/*http:/search.yahoo.com/search?fr=oni_
on_mail&p=graduation+gifts&cs=bz>  for grads at Yahoo! Search.
 
  _____  

* 


“This e-mail (including any attachments) is intended solely for the addressee 
and could contain information that is confidential; If you are not the intended 
recipient, you are hereby notified that any use, disclosure, copying or 
dissemination of this e-mail and any attachment is strictly prohibited and you 
should immediately delete it. This message does not necessarily reflect the 
views of Bank Indonesia. Although this e-mail has been checked for computer 
viruses, Bank Indonesia accepts no liability for any damage caused by any virus 
and any malicious code transmitted by this e-mail. Therefore, the recipient 
should check again for the risk of viruses, malicious codes, etc as a result of 
e-mail transmission through Internet”

Kirim email ke