Stock Report

Screen Shoot

This Coding with minigui extended

#include “minigui.ch”
#include “miniprint.ch”
#define BOX 6

procedure winprt4()

cwarna := {255,255,255}

if !iswindowactive (winprt4)

SET DATE ITALIA
SET DELETE ON
set browsesync on
set century on
set navigation extended

Define window winprt4 ;
at 30,30 ;
Width 680 ;
Height 400 ;
TITLE “Print Kartu Persediaan Group Produk” ;
on init bukawinprt4();
ON RELEASE dbcloseall();
child ;
NOSYSMENU
backcolor cwarna

ON KEY ESCAPE ACTION ThisWindow.Release

DRAW GRADIENT IN WINDOW winprt4 AT 0,0 TO 500,50;
VERTICAL BORDER BOX ;
BEGINCOLOR {197,128,128,} ;
ENDCOLOR {197,255,255}

DRAW PANEL ;
IN WINDOW winprt4 ;
AT 10,60 ;
TO 350,650

@ 40,85 label stran_lbl value ‘Wilayah Transaksi’;
width 200 ;
font “arial” size 12;
transparent

@ 40,380 textbox stran2_txt;
font “arial” size 11 ;
fontcolor {128,0,0} ;
BOLD;
width 200 ;
READONLY

@ 70,85 label skdwil_lbl value ‘Wilayah Stock ‘;
font “arial” size 12;
transparent

@ 70,380 textbox nmwil_txt ;
font “arial” size 11 ;
fontcolor {128,0,0} ;
BOLD;
width 200 ;
READONLY

@ 100,85 LABEL PRODUK1_LBL VALUE ‘Kode Produk ‘;
font “arial” size 12 ;
transparent

@ 130,240 textbox nmbrg1_txt ;
font “arial” size 11 ;
fontcolor {128,0,0} ;
BOLD;
width 340 ;
READONLY

@ 160,85 LABEL PRODUK2_LBL VALUE ‘Kode Produk ‘;
font “arial” size 12 ;
transparent

@ 190,240 textbox nmbrg2_txt ;
font “arial” size 11;
fontcolor {128,0,0} ;
BOLD;
width 340 ;
READONLY

@ 220,85 label stgl1_lbl Value ‘Tanggal ‘;
font “arial” size 12 ;
width 150 ;
height 30 ;
transparent

@ 250,85 label stgl2_lbl Value ‘Tanggal ‘;
font “arial” size 12 ;
width 150 ;
height 30 ;
transparent

@ 40, 240 btntextbox stran_txt ;
font “arial” size 12 ;
width 100 ;
action (playbeep(),cari_tran())

@ 70, 240 btntextbox skdwil_txt ;
font “arial” size 12 ;
width 100 ;
action (playbeep(),cari_kdwil())

@ 100,240 btntextbox PRODUK1_txt ;
font “arial” size 12 ;
width 100 ;
action (playbeep(),cetakbarang())

@ 160,240 btntextbox PRODUK2_txt ;
font “arial” size 12 ;
width 100
// action (playbeep(),cetakbarang2())

define datepicker stanggal1
row 220
col 240

end datepicker

define datepicker stanggal2
row 250
col 240

end datepicker

@ 290,200 LABEL PROGRES_LBL VALUE ‘Proses Exsport ‘;
font “arial” size 10 ;
transparent

@ 310,100 progressbar progress_1;
range 1,100;
width 350 height 26

@ 230,550 buttonex BK3;
caption ‘Exsport &XLS ‘;
height 30 ;
width 80 ;
BACKCOLOR {128,255,0};
on click { winprt4xls(),DBFwinprt4()}

@ 270,550 buttonex BK4;
caption ‘Ke &Printer’;
height 30 ;
width 80 ;
BACKCOLOR {128,255,0};
on click { playbeep(),kartustock() }

@ 310,550 buttonex BK5;
caption ‘Ke &P D F ‘;
height 30 ;
width 80 ;
BACKCOLOR {128,255,0};
on click { playbeep(),graph(),SALGRAP1() }

end window

winprt4.progress_1.value := 0

center window winprt4
activate window winprt4

Endif
return nil

PROCEDURE bukawinprt4

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

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

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

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

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

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

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

winprt4.stran_txt.setfocus

RETURN

Static Function kartustock()

Local SKD_WIL1 := (alltrim(winprt4.sTRAN_txt.value))
Local nday := Day(winprt4.stanggal1.value)
Local nmonth := Month(winprt4.stanggal1.value)
Local nyear := Year(winprt4.stanggal1.value)

Local i, nCOPIES, lijn, periode
Local cPrinter, bladnum

SMNT1 := strzero(nmonth,2)

sKDBRG1 :=(alltrim(winprt4.PRODUK1_txt.value))
sKDBRG2 :=(alltrim(winprt4.PRODUK1_txt.value))

stanggal1 := winprt4.stanggal1.value
stanggal2 := winprt4.stanggal2.value

nCOPIES :=1
baris := 40
shal := 0
mkolom := 54 &&45

cPrinter := GetPrinter()
If Empty (cPrinter)
Return
EndIf

SELECT PRINTER cPrinter ;
ORIENTATION PRINTER_ORIENT_LANDSCAPE ;
PAPERSIZE PRINTER_PAPER_LEGAL ;
COPIES nCOPIES ;
QUALITY PRINTER_RES_HIGH;
PREVIEW

START PRINTDOC name “winprt4bar”
START PRINTPAGE

mPageNo:=0
kpageno := 0

BWHILE := { || KDBRG >= SKDBRG1 .AND. KDBRG =100 .OR. mPageNo=0
mPageNo++
kpageno = kpageno + mpageno

IF mPageNo>1
&& cetak garis vertical halaman
@ baris,03 print line to baris,292 penwidth 0.1
baris += 4
@ baris,55 PRINT “Lanjut ke Halaman: “+LTRIM(STR(mPageNo))
baris := 40
mkolom := 54

END PRINTPAGE
START PRINTPAGE

ENDIF
kpageno := (kpageno/mpageno)

@ 05,10 PRINT cCompanyname FONT “COURIER NEW” SIZE 13 bold Underline
@ 05,180 PRINT “Page: “+LTRIM(STR(mPageNo))
@ 12,10 PRINT cKLU FONT “COURIER NEW” SIZE 6 bold
@ 15,10 PRINT cAlamatcompany size 8
@ 18,10 print cPhonecompany size 8
@ 21,10 print cFaxcompany size 8

@ 24,128 print “LAPORAN KARTU STOCK BARANG” FONT “COURIER NEW” SIZE 18 BOLD

@ 35,05 print ” NO.” FONT “COURIER NEW” SIZE 10 BOLD
@ 35,25 print ” NAMA BARANG ” FONT “COURIER NEW” SIZE 10 BOLD
@ 35,140 print ” SALDO AWAL ” FONT “COURIER NEW” SIZE 10 BOLD
@ 35,195 print ” MASUK ” FONT “COURIER NEW” SIZE 10 BOLD
@ 35,245 print ” KELUAR” FONT “COURIER NEW” SIZE 10 BOLD
@ 35,290 print ” SALDO AKHIR ” FONT “COURIER NEW” SIZE 10 BOLD

&& cetak garis vertical

ENDIF

SKDBRG := KDBRG

SELECT INVTBL
SEEK SKDBRG
SNMBRG := NMBRG
SSATUAN := SATUAN
SKEMASAN := KEMASAN
Sbesar := besar
SPACK1 := PACK1
SPACK2 := PACK2
sw := 0

SELECT INVMAS

SREM := RTRIM(SKEMASAN)+”/”+LTRIM(TRANSFORM(SPACK1,”9999″))+” “+RTRIM(SSATUAN)

DO WHILE .NOT. EOF() .AND. BARIS = STANGGAL1 .AND. TANGGAL <= STANGGAL2)
// .AND. BARIS = STANGGAL1 .AND. TANGGAL<=STANGGAL2))
SELECT INVMAS
DbSkiP()

// ENDIF
SELECT INVMAS
ENDDO
SELECT INVMAS
ENDDO
END PRINTPAGE
END PRINTDOC

RETURN Nil

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: