Entry Delivery Order

Screen Shoot DELIVERY ORDER ;

This is coding with minigui extended

#include “minigui.ch”
#include “inkey.ch”
#include “miniprint.ch”

*** Desain & Program By : Supriadi
*** Dated : Januari, 2009

#define program “Delivery Order ”

procedure warsent()

//Local snorut
//Local snorek
//Local kode := “SJ”
local hurufwarsent := { 255,255,255 }
local warnawarsent := {255,255,255 }
Local bColor := { || iif( recno()/2 == int( recno()/2 ) , { 255,255,255 } , { 197,240,240 } ) }
Local cimage := { || iif( recno()/2 == int( recno()/2 ) , ’01.bmp’,’02.bmp’ ) }
Local inputcolor := { 192,197,255 }

if !iswindowactive (arsent)
set delete on
set browsesync on
set century on
set navigation extended
set date italia

Define window arsent ;
at 30,40 ;
Width 960 ;
Height 550 ;
title ”;
on init (bukawarsent(),arsent2());
child ;
nosysmenu ;
nomaximize;
NOMINIMIZE;
backcolor warnawarsent

DEFINE TOOLBAR TOOLBAR_1 BUTTONSIZE 85,40 FLAT BORDER

BUTTON NEW;
picture ‘E:\soalgui\bmp\append.bmp’;
CAPTION ‘&Tambah’;
tooltip ‘Penambahan Data baru ‘;
ACTION arsentintran1()

BUTTON SEARCH ;
picture ‘E:\soalgui\bmp\cari.bmp’;
CAPTION ‘&search’;
tooltip ‘Tombol ini berfungsi untuk cari database ‘;
action { playbeep(),carisj(),showarsent() }

BUTTON HAPUS ;
picture ‘E:\soalgui\bmp\HAPUS.bmp’;
CAPTION ‘&Delete’;
tooltip ‘Tombol ini berfungsi untuk menghapus database ‘;
action hapusarsent()

BUTTON EDIT ;
picture ‘E:\soalgui\bmp\EDIT.bmp’;
CAPTION ‘E D I &I T’;
tooltip ‘Tombol ini berfungsi untuk modifikasi/edit database ‘;
ACTION if(kunci(),aktif(),nil)

BUTTON printer;
picture ‘E:\soalgui\bmp\printer.bmp’;
TOOLTIP ‘Pilihan anda untuk cetak data’ ;
CAPTION ‘&CetakData’;
ACTION printdo()

BUTTON Keluar;
picture ‘E:\soalgui\bmp\cancel.bmp’;
TOOLTIP ‘Pilihan anda untuk cetak data’ ;
CAPTION ‘&Keluar’ ;
ACTION keluararsent()

END TOOLBAR

@ 68,15 frame arsent_frm;
caption “Entry Delivery Order Form “;
BACKCOLOR WARNAwarsent ;
width 950 ;
height 150

@ 225,15 frame arsent2_frm;
caption “Data Transaksi”;
BACKCOLOR WARNAwarsent ;
width 950 ;
height 480

@ 90,20 LABEL sKdwil_lbl VALUE ‘Kode Wilayah ‘;
font “arial narrow” size 12 bold;
backcolor warnawarsent

@ 90,320 LABEL sNosj_LBL VALUE ‘No. Surat Jalan ‘;
font “arial narrow” size 12 bold ;
backcolor warnawarsent

@ 90,680 LABEL sTglDOl_lbl VALUE ‘Tanggal ‘;
font “arial narrow” size 12 bold;
backcolor warnawarsent

@ 120,320 LABEL sNoorder_LBL VALUE ‘Nomer Order ‘;
font “arial narrow” size 12 bold ;
backcolor warnawarsent

@ 120,680 LABEL sTglOP_lbl VALUE ‘Tanggal ‘;
font “arial narrow” size 12 bold;
backcolor warnawarsent

@ 120,20 label sketer_lbl Value ‘Nama Pelanggan’;
font “arial narrow” size 12 bold ;
backcolor warnawarsent

@ 150,320 Label Gudang_lbl Value ‘Gudang ‘;
font “arial narrow” size 12 bold ;
backcolor warnawarsent

@ 150,550 label svat_lbl Value ‘PPN ‘;
font “arial narrow” size 12 bold ;
backcolor warnawarsent

@ 150,680 label sterm_lbl Value ‘Term ‘;
font “arial narrow” size 12 bold ;
backcolor warnawarsent

@ 180,440 label smata_lbl Value ‘Mata Uang ‘;
font “arial narrow” size 12 bold ;
backcolor warnawarsent

@ 180,680 label sKURS_lbl Value ‘Kurs Uang ‘;
font “arial narrow” size 12 bold ;
backcolor warnawarsent

Define combobox kd_wil

row 90
col 140
Item {“Accounting”,”Aktiva”,”Finished Goods”,”Raw Material”,”Produksi”,”Packing”,”Lain-lain”}
value 1

end combobox

@ 90,420 textbox snosj_txt font “Time new roman” size 12 ;
WIDTH 170 ;
Readonly

define datepicker stglDO
row 90
col 780
backcolor {197,255,197}

end datepicker

@ 120,420 textbox snoorder_txt font “Time new roman” size 12 ;
WIDTH 170 ;
Readonly

DEFINE IMAGE cariOP
ROW 120
COL 600
WIDTH 20
HEIGHT 30
picture ‘E:\soalgui\bmp\cari.bmp’
END IMAGE

define datepicker stglOP
row 120
col 780
backcolor {197,255,197}

end datepicker

Define combobox sgudang

row 150
col 420
Item {“Finished Goods”,”Raw Material”,”Packaging”,”Work in Process”,”Riject”}
value 1
end combobox

@ 120,140 textbox sKDPT_txt ;
font “Time new roman ” size 11 ;
width 80 ;
MAXLENGTH 6;
readonly

@ 150,600 textbox sppn_txt ;
font “Time new roman ” size 11 ;
width 60 ;
readonly ;
numeric inputmask “999”

@ 150,780 textbox sTERM_txt font “Time new roman” size 12 ;
WIDTH 60;
READONLY;
numeric inputmask “999”

@ 180,530 textbox smata_txt ;
font “Time new roman ” size 11 ;
width 60;
READONLY

@ 180,780 textbox skurs_txt ;
width 120 ;
font “Time New Roman” size 12 ;
numeric inputmask “99,999.99” ;

@ 150,20 textbox sNMPT_txt ;
font “Time new roman ” size 11 ;
FONTCOLOR {255,0,0};
BOLD ;
width 280;
READONLY

@ 180,20 textbox sALAMAT_txt ;
font “Time new roman ” size 11 ;
FONTCOLOR {255,0,0};
width 400;
READONLY

@ 570,670 frame arsent3_frm;
BACKCOLOR WARNAwarsent ;
width 260 ;
height 80

Define browse warsent_browse
row 250
col 50
width 880
height 400
headers {”,’Kode’,’Nomer DO ‘,’No.Seqno’,’No.Urut’,’Kode Barang ‘,’Nama Barang’,’Jumlah Kirim’}
widths {40,60,150,80,80,100,250,130}
workarea INTRAN2
fields{”,’INTRAN2->kode’,’INTRAN2->nonota’,’intran2->seqno’,’intran2->nourut’,’INTRAN2->kdbrg’,’INVTBL->nmbrg’,’Transform(INTRAN2->quantk,”999,999.99″)’}
image { ’03.bmp’,’02.bmp’ }
DYNAMICBACKCOLOR { bcolor,bColor, bcolor, bColor, bColor, bColor, bColor,bcolor }
JUSTIFY { BROWSE_JTFY_LEFT,BROWSE_JTFY_LEFT,BROWSE_JTFY_LEFT, BROWSE_JTFY_LEFT, BROWSE_JTFY_LEFT,BROWSE_JTFY_LEFT,BROWSE_JTFY_LEFT,BROWSE_JTFY_RIGHT}
lock .T.
allowdelete .t.

END BROWSE

end window
maximize window arsent
activate window arsent

Endif

return nil

PROCEDURE BUKAwarsent

LOCAL SKODE := “SJ”
LOCAL STPTRAN := “K”

RddSetDefault(“DBFNTX”) //standar clipper-harbour
request dbfntx

IF OPENTABLES(cDRV+”TBLWMAS”,.F.)
SET INDEX TO (cDRV+”TBLWMAS”)
ELSE
RETURN
ENDIF

IF OPENTABLES(cDRV+”TBLCMAS”,.F.)
SET INDEX TO (cDRV+”TBLCMAS”),(cDRV+”TBLCMAS1″)
ELSE
RETURN
ENDIF

IF OPENTABLES(cDRV+”BANKMAS”,.F.)
SET INDEX TO (cDRV+”BANKMAS”)
ELSE
RETURN
ENDIF

IF .NOT. OPENTABLES(cDRV+”GLTBL”,.F.)
RETURN
ENDIF
DbGoTop()

IF OPENTABLES(cDRV+”INVMAS”,.F.)
SET INDEX TO (cDRV+”INVMAS”)
ELSE
RETURN
ENDIF

IF OPENTABLES(cDRV+”INVTBL”,.F.)
SET INDEX TO (cDRV+”INVTBL”),(cDRV+”INVTBL1″)
ELSE
RETURN
ENDIF

IF .NOT. OPENTABLES(cDRV+”DINTRAN1″,.F.)
RETURN
ENDIF

IF OPENTABLES(cDRV+”INTRAN4″,.F.)
SET INDEX TO (cDRV+”INTRAN4″)
ELSE
RETURN
ENDIF

IF OPENTABLES(cDRV+”INTRAN3″,.F.)
SET INDEX TO (cDRV+”INTRAN31″),(cDRV+”INTRAN3″)
ELSE
RETURN
ENDIF

IF OPENTABLES(cDRV+”PIMAS”,.F.)
SET INDEX TO (cDRV+”PIMAS”)
ELSE
RETURN
ENDIF

IF OPENTABLES(cDRV+”PIDET”,.F.)
SET INDEX TO (cDRV+”PIDET”)
ELSE
RETURN
ENDIF

IF OPENTABLES(cDRV+”INTRAN2″,.F.)
SET INDEX TO (cDRV+”INTRAN2″),(cDRV+”INTRAN21″),(cDRV+”INTRAN23″),(cDRV+”INTRAN22″)
ELSE
RETURN
ENDIF

IF OPENTABLES(cDRV+”INTRAN1″,.F.)
SET INDEX TO (cDRV+”INTRAN1″),(cDRV+”INTRAN11″),(cDRV+”INTRAN12″),(cDRV+”INTRAN1R”),(cDRV+”INTRAN17″),(cDRV+”INTRAN13″),(cDRV+”INTRAN15″),(cDRV+”INTRAN1A”)
ELSE
RETURN
ENDIF

SELECT INTRAN1
DbSeek(SKODE)

RETURN
procedure keluararsent

LocaL SDEBET := 0
Local SKREDIT := 0

tblwmas->(dbclosearea())
tblcmas->(dbclosearea())
bankmas->(dbclosearea())
gltbl->(dbclosearea())
invmas->(dbclosearea())
invtbl->(dbclosearea())
dintran1->(dbclosearea())
intran4->(dbclosearea())
intran3->(dbclosearea())
pimas->(dbclosearea())
pidet->(dbclosearea())
intran2->(dbclosearea())
intran1->(dbclosearea())
release window arsent

return

Procedure arsentintran1
aktifarsent()

arsent.kd_wil.value := 1
arsent.snotran_txt.value := “”
arsent.snotran_txt.setfocus
arsent.warsent_browse.refresh

arsent.stanggal1.value := date()

return

procedure hapusarsent

If MsgYesNo ( ‘Yakin dihapus ‘,’Konfirmasi Jawaban’)

If kunciarsent()
intran2->(dbdelete())
arsent.warsent_browse.refresh

EndIf
EndIf

return

Function kunciarsent()

Local RetVal

If intran2->(RLock())
RetVal := .t.
Else
MsgExclamation (‘Data Tidak dapat dihapus’,’Konfirmasi Data Dikunci’)
RetVal := .f.
EndIf

Return RetVal

Static procedure oraaktif

arsent.kd_wil.enabled := .F.
arsent.snosj_txt.enabled := .F.
arsent.stglDO.enabled := .F.
arsent.snoorder_txt.enabled := .F.
arsent.stglOP.enabled := .F.

Return

Static procedure aktifarsent

arsent.kd_wil.enabled := .T.
arsent.snosj_txt.enabled := .T.
arsent.stglDO.enabled := .T.
arsent.snoorder_txt.enabled := .T.
arsent.stglOP.enabled := .T.

Return

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: