Cash Payment Voucher ( CPV )

Screen Shoot Bukti Pembayaran Bank :

This is My code :

procedure printcpv

Local nday := Day(gljent.stanggal1.value)
Local nmonth := Month(gljent.stanggal1.value)
Local nyear := Year(gljent.stanggal1.value)
Local sflag := “U”
Local skd_wil := “10”

Local sHAL:=KEYPRESS:=TDEBET:=TKREDIT:=I:=XKRD:=XDBT:=0

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

sbln := strzero(nmonth,2)
snotran1 := (alltrim(gljent.snotran_txt.value))
snotran2 := (alltrim(gljent.snotran_txt.value))
xtanggal1 := gljent.stanggal1.value
xtanggal2 := gljent.stanggal1.value

nCOPIES := 1
baris := 40
shal := 0
mkolom := 40

cPrinter := GetPrinter()
If Empty (cPrinter)
Return
EndIf
SELECT PRINTER cPrinter ;
ORIENTATION PRINTER_ORIENT_PORTRAIT ;
PAPERSIZE PRINTER_PAPER_USER ;
PAPERLENGTH 140;
PAPERWIDTH 210;
COPIES nCOPIES ;
QUALITY PRINTER_RES_HIGH;
PREVIEW

START PRINTDOC NAME “Cash Payment Voucher”
START PRINTPAGE

SELECT GLTRAN2
SET ORDER TO 3
SET SOFTSEEK ON
SEEK DTOS(xTANGGAL1)
SET SOFTSEEK OFF

mPageNo:=0
kpageno := 0

DO WHILE .NOT. EOF() .AND. TANGGAL >= xTANGGAL1 .AND. TANGGAL =90 .OR. mPageNo=0
mPageNo++
kpageno = kpageno + mpageno
IF mPageNo>1

baris +=25
@ baris,160 PRINT “Dilanjutkan ke Halaman: “+LTRIM(STR(mPageNo)) size 10 bold Underline

baris := 40
mkolom := 40

END PRINTPAGE
START PRINTPAGE

ENDIF
kpageno := (kpageno/mpageno)

@ 03,10 PRINT “PT.KARYA SAKTI SENTOSA ” FONT “COURIER NEW” SIZE 13 bold Underline
@ 03,180 PRINT “Page: “+LTRIM(STR(mPageNo))
@ 09,10 PRINT “RUBBER PARTMANUFACTURING ” FONT “COURIER NEW” SIZE 8 bold
@ 12,10 PRINT “OFFICE : Jl. Industri Selatan XI Blok EE No. 10i Jababeka II” size 8
@ 15,10 print “Telp : (021) 898-41411” size 8
@ 18,10 print “Fax : (021) 898-41412” size 8
@ 09,125 print RECTANGLE ;
TO 23,200 ;
penwidth 0.1 ;
COLOR {197,197,255};
FILLED;
ROUNDED
@ 12,128 print “CASH PAYMENT VOUCHER” FONT “COURIER NEW” SIZE 16 BOLD
@ 18,143 print “NO. “+SNOTRAN1 FONT “COURIER NEW” SIZE 12 BOLD

@ 27,04 print RECTANGLE;
TO 37,200 ;
penwidth 0.1;
COLOR {197,197,255};
FILLED;
ROUNDED
@ 39,04 print RECTANGLE TO 95,200 penwidth 0.1 ROUNDED

@ 28,05 print ” NO.” FONT “COURIER NEW” SIZE 10 BOLD
@ 28,15 print ” NOMER REKENING” FONT “COURIER NEW” SIZE 10 BOLD
@ 28,60 print ” NAMA TRANSAKSI ” FONT “COURIER NEW” SIZE 10 BOLD
@ 28,125 print ” DEBET ” FONT “COURIER NEW” SIZE 10 BOLD
@ 28,170 print ” KREDIT” FONT “COURIER NEW” SIZE 10 BOLD

&& cetak garis vertical
@ 27, 15 PRINT LINE TO 95,15 PENWIDTH 0.1
@ 27, 55 PRINT LINE TO 95,55 PENWIDTH 0.1
@ 27,120 PRINT LINE TO 95,120 PENWIDTH 0.1
@ 27,160 PRINT LINE TO 95,160 PENWIDTH 0.1

ENDIF

@ 100,04 print RECTANGLE TO 130,120 penwidth 0.1 ROUNDED
@ 123,04 PRINT LINE TO 123,120 PENWIDTH 0.1
@ 125,06 PRINT ” Prepared By, Check By, Accounting By, Approved By,”
@ 100,130 print RECTANGLE ;
TO 120,200 ;
penwidth 0.1;
COLOR {192,192,192};
FILLED;
ROUNDED
@ 110,130 PRINT LINE TO 110,200 PENWIDTH 0.1
SELECT GLTRAN2
IF SKD_WIL == KD_WIL .AND. NOTRAN >= SNOTRAN1 .AND. NOTRAN <= SNOTRAN2 .AND. FLAG == SFLAG .AND. SUBSTR(NOTRAN,1,2)#"20"

SNOTRAN := NOTRAN
STGL := TANGGAL
I := 0
FL := 0

SELECT GLTRAN2
DO WHILE .NOT. EOF() .AND. SFLAG+SKD_WIL+DTOS(STGL)+SNOTRAN == FLAG+KD_WIL+DTOS(TANGGAL)+NOTRAN .AND. BARIS <=89

I := I + 1
L := STR(I,1,0)

SNOREK := NOREK
STPTRAN := TPTRAN
SNOURUT := NOURUT
SKETERNG := KETERNG1

SELECT GLTRAN2
IF STPTRAN == "D"
SDEBET := JUMLAH
SKREDIT := 0
TDEBET := TDEBET + SDEBET
XDBT := XDBT + SDEBET
ELSE
SKREDIT := JUMLAH
SDEBET := 0
TKREDIT := TKREDIT + SKREDIT
XKRD := XKRD + SKREDIT
ENDIF

SELECT GLMAS
SEEK SNOREK
SNMREK := NMREK

BARIS := BARIS + 5

SHAL := SHAL + 1
@ BARIS,07 PRINT Transform(shal,"9999") SIZE 8
@ baris,18 print sNOREK SIZE 8
@ BARIS,60 PRINT substr(sNmrek,1,35) SIZE 8
@ BARIS,150 PRINT IIF(SDEBET==0,"-",TRANSFORM(SDEBET,"999,999,999,999.99")) SIZE 8 RIGHT
@ baris,190 print IIF(SKREDIT==0,"-",TRANSFORM(SKREDIT,"999,999,999,999.99")) SIZE 8 RIGHT
// @ baris,220 print sketerng SIZE 8

SELECT GLTRAN2
SKIP
ENDDO
MKOLOM := 106
BARIS := 100
@ 100,30 PRINT LINE TO mkolom,30 PENWIDTH 0.1
@ 100,60 PRINT LINE TO mkolom,60 PENWIDTH 0.1
@ 100,90 PRINT LINE TO mkolom,90 PENWIDTH 0.1
@ 110,30 PRINT LINE TO mkolom,30 PENWIDTH 0.1
@ 110,60 PRINT LINE TO mkolom,60 PENWIDTH 0.1
@ 110,90 PRINT LINE TO mkolom,90 PENWIDTH 0.1

@ 120,30 PRINT LINE TO mkolom,30 PENWIDTH 0.1
@ 120,60 PRINT LINE TO mkolom,60 PENWIDTH 0.1
@ 120,90 PRINT LINE TO mkolom,90 PENWIDTH 0.1

@ 130,30 PRINT LINE TO mkolom,30 PENWIDTH 0.1
@ 130,60 PRINT LINE TO mkolom,60 PENWIDTH 0.1
@ 130,90 PRINT LINE TO mkolom,90 PENWIDTH 0.1

// BARIS++
IF SNOTRAN # NOTRAN
@ 102,140 print "TOTAL DEBET " BOLD
@ 112,140 print "TOTAL KREDIT " BOLD
@ 102,198 print TRANSFORM(XDBT,"999,999,999,999.99") SIZE 12 RIGHT BOLD
@ 112,198 print TRANSFORM(XKRD,"999,999,999,999.99") SIZE 12 RIGHT BOLD
XDBT := XKRD := 0
baris := 40
ENDIF

ELSE
SELECT GLTRAN2
DbSkip()

ENDIF
ENDDO
select gltran2
dbsetorder(1)

END PRINTPAGE
END PRINTDOC
select gltran1
dbsetorder(1)

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: