Cetak Faktur Pajak

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

procedure ppnprn

if !iswindowactive (ppnprn)

set browsesync on
set navigation extended

Define window ppnprn         ;
at 45,60                    ;
width 420                    ;
height 370                   ;
icon ‘d:\soalgui\bmp\demo.ico’;
title ‘PT.YOKATTA INDONESIA ‘ ;
on init openfileppnprn();
on release closefileppnprn();
child ;
nomaximize;
NOMINIMIZE

DEFINE BKGBRUSH newBrush SOLID IN PPNPRN COLOR BLUE

@ 20,30 frame bingkai1ppnprn ;
caption ‘Form Cetak Faktur Pajak  ‘ ;
width 350 ;
transparent ;
fontcolor {0,255,87};
height 280

@   50,50 label uangmuka_lbl  Value “Uang Muka Yang DiTerima : ” ;
width  300 ;
font ” arial” size 12;
transparent ;
fontcolor { 0,255,197 }

@ 150,50 label snonota1_lbl  value  “No.Faktur  “;
font ” arial” size 12;
transparent ;
fontcolor { 0,255,197 }

@ 200,50 label snonota2_lbl  value  “No.Faktur  “;
font ” arial” size 12;
transparent ;
fontcolor { 0,255,197 };

@ 100,50 textbox uangmuka_txt font “arial” size 12 ;
width 250                                        ;
numeric inputmask ’9,999,999,999.99′

@ 150,150 btntextbox snonota1_txt font “arial” size 12;
width 150 ;
maxlength 15;
action snonota1_ppn();
on enter {snonota1_ppn()}

@ 200,150 btntextbox snonota2_txt font “arial” size 12;
width 150 ;
maxlength 15;
action snonota2_ppn();
on enter snonota2_ppn()

DEFINE IMAGE KUNCI1
ROW 250
COL 320
WIDTH 20
HEIGHT 30
PICTURE ‘D:\YOKATA\ICO\PRINT.ICO’
WHITEBACKGROUND .F.
ON CLICK { PRINTPPN() }
END IMAGE

@ 250,230 buttonex  KUNCI;
caption ‘Ceta&k Data ‘;
height 30   ;
width  80 ;
on click { printppn() }

end window
center window ppnprn
activate window ppnprn

endif

Return

PROCEDURE openfileppnprn

local skode      := “FP”
local stptran    := “”

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

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

IF opentables(cDRV+”GLTBL”,.F.)
ELSE
RETURN
ENDIF

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

IF opentables(cDRV+”INVTBL”,.F.)
SET INDEX TO (cDRV+”INVTBL”)
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
intran1->(dbsetorder(1))
dbseek(skode)
RETURN

PROCEDURE closefileppnprn
close all
RETURN

PROCEDURE metu_ppnprn

release window ppnprn

RETURN

procedure SNONOTA1_PPN
do while .t.
codeppn(“ppnprn”,”snonota1_txt”)
exit
enddo
return

procedure SNONOTA2_PPN
do while .t.
codeppn(“ppnprn”,”snonota2_txt”)
exit
enddo
return

Function codeppn(cForm, cTextBtn)

Local cppn := “”

cppn := Getcodeppn(Getproperty(cForm,cTextBtn,”Value”))
If !empty(cppn)
Setproperty(cForm,cTextBtn,”Value”,cppn)
EndIf

Return

Function Getcodeppn(nValue)

Local cppn:= “”,nReg := 1
intran1->(dbsetorder(1))
set filter to intran1->kode == “FP”

if !empty(nValue)
nValue := recno()
Seek Alltrim(str(nValue))
if !eof()
nReg := Recno()
endif
endif

DEFINE WINDOW Form_Faktur;
AT 0,0 ;
WIDTH 480 HEIGHT 460 ;
TITLE ‘DAFTAR FAKTUR PENJUALAN’ ;
MODAL NOSIZE

@300,5 frame pilih_ppnprn ;
width 380 ;
height 100

@ 320,10 label cnonotafak_lbl value ‘ Masukan Nomer Faktur Pajak Yang Di cari’;
font “arial” size 16 ;
width 500;
transparent blink;
fontcolor{0,255,0}

@ 350,10 textbox cnonotafak_txt;
width 350 ;
on change {search_ppnprn() };
on enter  {search_ppnprn() }

@ 5,5 BROWSE Browse_Faktur   ;
WIDTH 380               ;
HEIGHT 290              ;
HEADERS { ‘kode’ , ‘Nomer Faktur’,’Tanggal’,’Mata Uang’ } ;
WIDTHS { 30,140,100,30 } ;
WORKAREA intran1 ;
FIELDS { ‘intran1->kode’,’intran1->nonota’,’intran1->tanggal’,’intran1->mata’} ;
VALUE nReg ;
READONLY {.t.,.t.,.t.,.t.} ;
Justify {BROWSE_JTFY_LEFT , BROWSE_JTFY_CENTER} ;
ON DBLCLICK ( cppn:=intran1->NONOTA,ThisWindow.Release ) ;
TOOLTIP “Pilihlah Nomer Faktur yang anda inginkan “

ON KEY ESCAPE ACTION ThisWindow.Release
END WINDOW

CENTER WINDOW Form_faktur

ACTIVATE WINDOW Form_faktur

Return cppn

function  search_ppnprn

local cCarifak:= (“FP”+AllTrim(form_faktur.cnonotafak_txt.value))
local nPanjang := len(cCarifak)

select intran1
set order to 1
dbselectarea(“intran1″)
dbseek(cCarifak)

If found()

If intran1->(DbSeek(cCarifak))
form_faktur.browse_faktur.value := intran1->(recno())
Else
MsgExclamation(‘Nomer Faktur penjualan tidak ada’)
EndIf
else
msginfo(“nomer yg anda cari bukan Faktur  penjualan”,”Konfirmasi bukan nomer Faktur”)

EndIf
Return

Function printppn()

Local SKODE    := “FP”
Local CSETUJU  := gltbl->tanggung &&”  M A R S O N O   “
Local CJABATAN := gltbl->jabatan  &&” D i r e k t u r  “
Local snonota1 := ppnprn.snonota1_txt.value
Local snonota2 := ppnprn.snonota2_txt.value
Local HAL:=KEYPRESS:=TSLDEBET:=TSLKREDIT:=TMTDEBET:=TMTKREDIT:=TBLDEBET:=TBLKREDIT:=0
Local MTDEBET:=MTKREDIT:=SLDEBET:=SLKREDIT:=BLDEBET:=BLKREDIT:=0
Local tnrk:=tnrd:=trlk:=trld:=tsld:=tslk:=0
Local i, nCOPIES, lijn, periode, shal,mPageNo , sjumlah,MKOLOM
Local cPrinter, bladnum
local DP := ppnprn.uangmuka_txt.value

GTOT         := 0
gtotbetaald  := 0
gtotopen     := 0
sjumlah      := 0
baris := 125
mkolom := 125
shal  := 0
nCOPIES :=1
mkolom  := 60

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

SELECT PRINTER cPrinter ;
ORIENTATION PRINTER_ORIENT_PORTRAIT ;
PAPERSIZE   PRINTER_PAPER_USER ;
PAPERLENGTH 275;
PAPERWIDTH  210;
COPIES      nCOPIES ;
QUALITY     PRINTER_RES_HIGH;
PREVIEW

START PRINTDOC NAME “PPN”
START PRINTPAGE

SELECT INTRAN1
SET SOFTSEEK ON
SEEK SKODE+SNONOTA1
SET SOFTSEEK OFF

mPageNo:=0
kpageno := 0

do while .not. eof()  .and. skode == kode .and. ;
nonota >= snonota1 .and. nonota <= snonota2

SELECT INTRAN1
SNONOTA    := NONOTA
SORDER     := ORDER
SMATA      := MATA
SKURS      := KURS
STGL_ORDER := TGL_ORDER
SSRJLN     := SRJLN
SKD_WIL    := KD_WIL
STGL_SRJLN := TGL_SRJLN
STANGGAL   := TANGGAL
STHN       := SUBSTR(DTOS(STANGGAL),1,4)
SBULAN     := SUBSTR(DTOS(STANGGAL),5,2)
STGL       := SUBSTR(DTOS(STANGGAL),7,2)
SKD_PT     := KD_PT
SPOCUST    := POCUST
SNOSERI    := NOSERI
DO CASE
CASE MONTH(TANGGAL) == 1
CMONTH := “January  “
CASE MONTH(TANGGAL) == 2
CMONTH := “February “
CASE MONTH(TANGGAL) == 3
CMONTH := “Maret    “
CASE MONTH(TANGGAL) == 4
CMONTH := “April    “
CASE MONTH(TANGGAL) == 5
CMONTH := “M e i    “
CASE MONTH(TANGGAL) == 6
CMONTH := “J u n i  “
CASE MONTH(TANGGAL) == 7
CMONTH := “J u l i  “
CASE MONTH(TANGGAL) == 8
CMONTH := “Agustus  “
CASE MONTH(TANGGAL) == 9
CMONTH := “September”
CASE MONTH(TANGGAL) == 10
CMONTH := “Oktober  “
CASE MONTH(TANGGAL) == 11
CMONTH := “November “
CASE MONTH(TANGGAL) == 12
CMONTH := “Desember “
ENDCASE

SELECT TBLCMAS
DBSEEK(“L”+SKD_WIL+SKD_PT)
SKETERNG   := TBLCMAS->NM_PT
SKETERNG1  := TBLCMAS->ALAMAT1
SKETERNG2  := TBLCMAS->ALAMAT2
SKETERNG3  := TBLCMAS->ALAMAT3
SKETERNG4  := TBLCMAS->ALAMAT4
SKETERNG5  := TBLCMAS->ALAMAT5
SSUB_MAP   := TBLCMAS->SUB_MAP
SNPWP      := TBLCMAS->NPWP

SELECT INTRAN1
STERM      := TERM
SSALES     := SALES
SJTEMPO    := JTEMPO
SDISC      := DISC
STIME      := TIME()
SDATE      := DATE()
SPPN       := PPN

SELECT TBLWMAS
SEEK  “W”+SKD_WIL
SNM_WIL := NM_WIL

SEEK “M”+SSALES
SNMSALES := NM_WIL

@ 11,65 print ” FAKTUR PAJAK ” FONT “COURIER NEW” SIZE 18 BOLD
@ 07,125 print “Lembar 1 : Untuk Pembeli BKP/Penerima JKP sebagai Bukti Pajak Masukan”  FONT “COURIER NEW” SIZE 5 bold
@ 10,125 print “Lembar 2 : Untuk PKP yg menerbitkan Faktur Pajak sbg bukti Pajak Keluaran” FONT “COURIER NEW” SIZE 5 bold
@ 20,09 print line to 20,200 penwidth 0.1
@ 25,15 print ” Kode dan Nomor Seri Faktur Pajak :”
@ 25,80 print snoseri  FONT “COURIER NEW” SIZE 8 bold
//  @ 25,165 print sorder FONT “COURIER NEW” SIZE 8 bold
@ 30,09 print line to 30,200 penwidth 0.1
@ 35,15 print ” Pengusaha Kena Pajak “
@ 40,09 print line to 40,200 penwidth 0.1
@ 45,15 print ” N a m a         “
@ 45,64 PRINT ” : PT. YOKATTA INDONESIA ” BOLD
@ 50,15 print ” Alamat          “
@ 50,64 print ” : Jl. Industri Selatan XI Blok.EE/10 ”  BOLD
@ 55,64 print ” : Kawasan Industri Jababeka II Cikarang Selatan” BOLD
@ 60,15 print ” N.P.W.P.        “
@ 60,64 print ” : 02.418.355.0-413.000 ” BOLD
@ 65,09 print line to 65,200 penwidth 0.1
@ 70,15 print ” Pembeli Barang Kena Pajak / Penerima Jasa Kena Pajak “
@ 75,09 print line to 75,200 penwidth 0.1
@ 83,15 print ” N a m a         “
@ 83,64 PRINT ” : “+sketerng BOLD
@ 88,15 print ” Alamat          “
@ 88,64 PRINT ” : “+sketerng1    BOLD
@ 93,64 print ” : “+sketerng2    bold
@ 98,15 print ” N.P.W.P         “
@ 98,64 PRINT ” : “+snpwp  BOLD
@105,09 print line to 105,200 penwidth 0.1

&& Judul Halaman
IF SMATA == “I”
@110,10  print ” NO. ” FONT “COURIER NEW” SIZE 8
@115,10  print ” Urut” FONT “COURIER NEW” SIZE 8
@110,30  print ” Nama Barang Kena Pajak  / Jasa Kena Pajak ” FONT “COURIER NEW” SIZE 8
@110,140 print ” Harga Jual / Penggantian / Uang ” FONT “COURIER NEW” SIZE 8
@115,140 print ”       Muka / Termin (Rp.)        ” FONT “COURIER NEW” SIZE 8
@120,09 print line to 120,200 penwidth 0.1
ELSE
@110,10  print ” NO. ” FONT “COURIER NEW” SIZE 8
@115,10  print ” Urut” FONT “COURIER NEW” SIZE 8
@110,30  print ” Nama Barang Kena Pajak  / Jasa Kena Pajak ” FONT “COURIER NEW” SIZE 8
@107,123 print ”   Harga Jual/Penggantian/Uang Muka/Termin” FONT “COURIER NEW” SIZE 8
@111,123 print line to 111,200 penwidth 0.1
@115,128 print ”  Valas *))             (Rp.)        ” FONT “COURIER NEW” SIZE 8
@120,09 print line to 120,200 penwidth 0.1
ENDIF

&& cetak garis vertical
IF SMATA == “I”
@  20, 09 PRINT LINE TO 250,09 PENWIDTH 0.1
@ 105, 23 PRINT LINE TO 170,23 PENWIDTH 0.1
@ 105,128 PRINT LINE TO 195,128 PENWIDTH 0.1
@  20,200 PRINT LINE TO 250,200 PENWIDTH 0.1
ELSE
@  20, 09 PRINT LINE TO 248,09 PENWIDTH 0.1
@ 105, 23 PRINT LINE TO 170,23 PENWIDTH 0.1
@ 105,123 PRINT LINE TO 195,123 PENWIDTH 0.1
@ 111,158 PRINT LINE TO 195,158 PENWIDTH 0.1
@  20,200 PRINT LINE TO 248,200 PENWIDTH 0.1

ENDIF

SELECT INTRAN2
SEEK “SJ”+SORDER
DO WHILE .NOT. EOF() .AND. “SJ”+SORDER == KODE+NONOTA
SKDBRG  := KDBRG
SHARGA  := STR(HARGA,14,4)
IF VAL(SHARGA) == 0
SBONUS := ” Bonus Penjualan”
ELSE
SBONUS := ”                “
ENDIF

SQUANTK := QUANTK-QUANTKR
SQUANTP := QUANTP-QUANTPR
SKORT   := KORT   // IIF(KORT>100,HARGA/KORT,KORT)
XKORT   := IIF(KORT>100,KORT,VAL(SHARGA)*(KORT/100))
SELECT INVTBL
SEEK SKDBRG
SNMBRG    := NMBRG
SSATUAN   := SATUAN
SKEMASAN  := KEMASAN
SPACK2    := PACK2
SNOPROD   := NOPROD

SELECT INTRAN2
SQTY    := SQUANTK*SPACK2+SQUANTP
XHARGA  := VAL(SHARGA)-KORT
STOTAL  := XHARGA*SQTY
SJUMLAH := SJUMLAH + STOTAL

shal := shal + 1
BARIS := BARIS + 5
mkolom++
LTEM := .F.

IF BARIS >= 170 .AND. “SJ”+SORDER == KODE+NONOTA
LTEM := .T.
BARIS := 125
mkolom := 125
@ 11,65 print ” FAKTUR PAJAK ” FONT “COURIER NEW” SIZE 18 BOLD
@ 07,125 print “Lembar 1 : Untuk Pembeli BKP/Penerima JKP sebagai Bukti Pajak Masukan”  FONT “COURIER NEW” SIZE 5 bold
@ 10,125 print “Lembar 2 : Untuk PKP yg menerbitkan Faktur Pajak sbg bukti Pajak Keluaran” FONT “COURIER NEW” SIZE 5 bold
@ 20,09 print line to 20,200 penwidth 0.1
@ 25,15 print ” Kode dan Nomor Seri Faktur Pajak :”
@ 25,80 print snoseri  FONT “COURIER NEW” SIZE 8 bold
@ 25,165 print sorder FONT “COURIER NEW” SIZE 8 bold
@ 30,09 print line to 30,200 penwidth 0.1
@ 35,15 print ” Pengusaha Kena Pajak “
@ 40,09 print line to 40,200 penwidth 0.1
@ 45,15 print ” N a m a         “
@ 45,64 PRINT ” : PT. YOKATTA INDONESIA ” BOLD
@ 50,15 print ” Alamat          “
@ 50,64 print ” : Jl. Industri Selatan XI Blok.EE/10 ”  BOLD
@ 55,64 print ” : Kawasan Industri Jababeka II Cikarang Selatan” BOLD
@ 60,15 print ” N.P.W.P.        “
@ 60,64 print ” : 02.418.355.0-413.000 ” BOLD
@ 65,09 print line to 65,200 penwidth 0.1
@ 70,15 print ” Pembeli Barang Kena Pajak / Penerima Jasa Kena Pajak “
@ 75,09 print line to 75,200 penwidth 0.1
@ 83,15 print ” N a m a         “
@ 83,64 PRINT ” : “+sketerng BOLD
@ 88,15 print ” Alamat          “
@ 88,64 PRINT ” : “+sketerng1    BOLD
@ 93,64 print ” : “+sketerng2    bold
@ 98,15 print ” N.P.W.P         “
@ 98,64 PRINT ” : “+snpwp  BOLD
@105,09 print line to 105,200 penwidth 0.1

&& Judul Halaman
IF SMATA == “I”
@110,10  print ” NO. ” FONT “COURIER NEW” SIZE 8
@115,10  print ” Urut” FONT “COURIER NEW” SIZE 8
@110,30  print ” Nama Barang Kena Pajak  / Jasa Kena Pajak ” FONT “COURIER NEW” SIZE 8
@110,140 print ” Harga Jual / Penggantian / Uang ” FONT “COURIER NEW” SIZE 8
@115,140 print ”       Muka / Termin (Rp.)        ” FONT “COURIER NEW” SIZE 8
@120,09 print line to 120,200 penwidth 0.1
ELSE
ENDIF

ENDIF
IF SMATA == “I”
@ BARIS,12  PRINT LTRIM(STR(SHAL)) FONT “COURIER NEW” SIZE 8
@ baris,30  print snmbrg   FONT “COURIER NEW” SIZE 8
@ baris,82  print snoprod  FONT “COURIER NEW” SIZE 8
@ baris,105 print Transform(sqty,”9,999,999″) FONT “COURIER NEW” SIZE 8
@ baris,128 print Transform(xharga,”999,999,999.99″)   FONT “COURIER NEW” SIZE 8
@ baris,170 print Transform(stotal,”9,999,999,999.99″)   FONT “COURIER NEW” SIZE 8
ELSE
@ BARIS,12  PRINT LTRIM(STR(SHAL)) FONT “COURIER NEW” SIZE 8
@ baris,30  print snmbrg   FONT “COURIER NEW” SIZE 8
@ baris,82  print snoprod  FONT “COURIER NEW” SIZE 8
@ baris,105 print Transform(sqty,”9,999,999″) FONT “COURIER NEW” SIZE 8
@ baris,136 print Transform(stotal,”9,999,999.999″)   FONT “COURIER NEW” SIZE 8
ENDIF

SELECT INTRAN2
DbSkip()
ENDDO
IF SMATA == “I”
XST := SJUMLAH-(SDISC+DP)
XPPN:= (SPPN/100)*XST
XTTL:= XST+XPPN
ELSE
XSTD  := SJUMLAH-(SDISC+DP)    && TOTAL DOLLAR
XPPND := (SPPN/100)*XSTD         && 10% DOLLAR
XTTLD := XSTD-XPPND
SDPP   := XSTD * SKURS    && total Nilai * kurs
TDPP  := (SPPN/100) * XSTD     && ppn 10% DOLLAR
TDPR  := (SPPN/100) * SDPP      && PPN 10% RUPIAH
ENDIF

DO WHILE BARIS < 170
@ BARIS,1 PRINT “”
baris++
mkolom++
ENDDO
IF SMATA == “I”

@ baris,09 print line to baris,200 penwidth 0.1
@ baris,15 print ” Harga Jual / Penggantian / Uang Muka / Termin *)”
@ baris,38 print ” xxxxxxxxxxxxxxxxxxxxxxxxxxxx”
@ BARIS,140 PRINT “Rp.” FONT “COURIER NEW” SIZE 8
@ BARIS,170 PRINT trans(sjumlah,”9,999,999,999.99″) FONT “COURIER NEW” SIZE 8
baris := baris + 5
mkolom++

@ baris,09 print line to baris,200 penwidth 0.1
@ baris,15 print ” Dikurangi Potongan Harga”
@ BARIS,140 PRINT “Rp.” FONT “COURIER NEW” SIZE 8
@ BARIS,170 PRINT trans(sDISC  ,”9,999,999,999.99″) FONT “COURIER NEW” SIZE 8

baris := baris + 5
mkolom++
@ baris,09 print line to baris,200 penwidth 0.1
@ baris,15  print ” Dikurangi Uang Muka Yang Telah Di Terima “
@ BARIS,140 PRINT “Rp.” FONT “COURIER NEW” SIZE 8
@ baris,170 print trans(DP    ,”9,999,999,999.99″) FONT “COURIER NEW” SIZE 8
baris := Baris + 5
mkolom++
@ baris,09 print line to baris,200 penwidth 0.1
@ baris,15  print ” Dasar Pengenaan Pajak “
@ BARIS,140 PRINT “Rp.” FONT “COURIER NEW” SIZE 8
@ BARIS,170 PRINT trans(XST    ,”9,999,999,999.99″) FONT “COURIER NEW” SIZE 8
baris := baris + 5
mkolom++
@ baris,09 print line to baris,200 penwidth 0.1
@ baris,15  print ” PPN = 10% x Dasar Pengenaan Pajak “
@ BARIS,140 PRINT “Rp.” FONT “COURIER NEW” SIZE 8
@ BARIS,170 PRINT trans(XPPN   ,”9,999,999,999.99″) FONT “COURIER NEW” SIZE 8
baris := baris + 5
mkolom++
@ baris,09 print line to baris,200 penwidth 0.1
BARIS += 5
mkolom++
@ baris,15 print “Pajak Penjualan Atas Barang Mewah”
baris += 5
mkolom := 240

&& TAMPILAN PPnBM

@ baris,15 print line to baris,100 penwidth 0.1
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1

@ baris,15 print ”   TARIF                    DPP                     PPnBM      “
baris +=5
mkolom++
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1

@ baris,15 print line to baris,100 penwidth 0.1
baris +=5
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1
@ baris,15 print ” ……………… %    Rp. …………………   Rp. …………………”  + ”                          Cikarang, “+STGL+” “+cmonth+” “+STHN
baris +=5
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1
@ baris,15 print ” ……………… %    Rp. …………………   Rp. …………………”
baris +=5
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1
@ baris,15 print ” ……………… %    Rp. …………………   Rp. …………………”
baris +=5
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1
@ baris,15 print ” ……………… %    Rp. …………………   Rp. …………………”
baris +=5
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1
@ baris,15 print line to baris,100 penwidth 0.1
BARIS +=5
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1
@ baris,15 print ”     J U M L A H “
@ baris,129 print csetuju FONT “COURIER NEW” SIZE 9 bold
baris +=5
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1

@ baris,15 print line to baris,100 penwidth 0.1
baris +=5
@ baris,09 print line to baris,200 penwidth 0.1
baris +=3
@ baris,15 print “*) Coret yang tidak perlu”

ELSE

@ baris,09 print line to baris,200 penwidth 0.1
@ baris,15 print ” Harga Jual / Penggantian / Uang Muka / Termin *)”
@ baris,38 print ” xxxxxxxxxxxxxxxxxxxxxxxxxxxx”
@ BARIS,125 PRINT “USD.” FONT “COURIER NEW” SIZE 8
@ BARIS,136 PRINT trans(sjumlah,”9,999,999.999″) FONT “COURIER NEW” SIZE 8
baris := baris + 5
mkolom++

@ baris,09 print line to baris,200 penwidth 0.1
@ baris,15 print ” Dikurangi Potongan Harga”
@ BARIS,125 PRINT “USD.” FONT “COURIER NEW” SIZE 8
@ BARIS,136 PRINT trans(sDISC  ,”9,999,999.999″) FONT “COURIER NEW” SIZE 8

baris := baris + 5
mkolom++
@ baris,09 print line to baris,200 penwidth 0.1
@ baris,15  print ” Dikurangi Uang Muka Yang Telah Di Terima “
@ BARIS,125 PRINT “USD.” FONT “COURIER NEW” SIZE 8
@ baris,136 print trans(DP    ,”9,999,999.999″) FONT “COURIER NEW” SIZE 8
baris := Baris + 5
mkolom++
@ baris,09 print line to baris,200 penwidth 0.1
@ baris,15  print ” Dasar Pengenaan Pajak “
@ BARIS,125 PRINT “USD.” FONT “COURIER NEW” SIZE 8
@ BARIS,136 PRINT trans(XSTD   ,”9,999,999.999″) FONT “COURIER NEW” SIZE 8
@ BARIS,163 PRINT “Rp.” FONT “COURIER NEW” SIZE 8
@ BARIS,170 PRINT trans(SDPP   ,”9,999,999,999.99″) FONT “COURIER NEW” SIZE 8

baris := baris + 5
mkolom++
@ baris,09 print line to baris,200 penwidth 0.1
@ baris,15  print ” PPN = 10% x Dasar Pengenaan Pajak “
@ BARIS,125 PRINT “USD.” FONT “COURIER NEW” SIZE 8
@ BARIS,136 PRINT trans(TDPP   ,”9,999,999.999″) FONT “COURIER NEW” SIZE 8
@ BARIS,163 PRINT “Rp.” FONT “COURIER NEW” SIZE 8
@ BARIS,170 PRINT trans(TDPR   ,”9,999,999,999.99″) FONT “COURIER NEW” SIZE 8
baris := baris + 5
mkolom++
@ baris,09 print line to baris,200 penwidth 0.1
BARIS += 5
mkolom++
@ baris,15 print “Pajak Penjualan Atas Barang Mewah”
@ baris,135 print ” Cikarang, “+STGL+” “+cmonth+” “+STHN
baris += 4
mkolom := 240

&& TAMPILAN PPnBM

@ baris,15 print line to baris,100 penwidth 0.1
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1

@ baris,15 print ”   TARIF                    DPP                     PPnBM      “
baris +=5
mkolom++
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1

@ baris,15 print line to baris,100 penwidth 0.1
baris +=5
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1
@ baris,15 print ” ……………… %    Rp. …………………   Rp. …………………”
baris +=5
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1
@ baris,15 print ” ……………… %    Rp. …………………   Rp. …………………”
baris +=5
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1
@ baris,15 print ” ……………… %    Rp. …………………   Rp. …………………”
baris +=5
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1
@ baris,15 print ” ……………… %    Rp. …………………   Rp. …………………”
@ baris,135 print csetuju FONT “COURIER NEW” SIZE 9 bold
baris +=5
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1
@ baris,15 print line to baris,100 penwidth 0.1
BARIS +=3
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1
@ baris,15 print ”     J U M L A H “
baris +=4
@ baris, 15 PRINT LINE TO mkolom,15 PENWIDTH 0.1
@ baris, 70 PRINT LINE TO mkolom,70 PENWIDTH 0.1
@ baris,100 PRINT LINE TO mkolom,100 PENWIDTH 0.1
@ baris,40 PRINT LINE TO mkolom,40 PENWIDTH 0.1

@ baris,15 print line to baris,100 penwidth 0.1
baris += 2
@ baris,50 print ” Kurs : Rp.”+TRANSFORM(skurs,”999,999.99″)+” / 1 USD” FONT “COURIER NEW” SIZE 8  bold
baris += 5
@ baris,09 print line to baris,200 penwidth 0.1
baris +=2
@ baris,15 print “*) Coret yang tidak perlu”  FONT “COURIER NEW” SIZE 6
BARIS +=3
@ BARIS,15 PRINT “*)) Di isi jika penyerahan memakai mata uang asing” FONT “COURIER NEW” SIZE 6

ENDIF

IF “SJ”+SORDER <> KODE+NONOTA
BARIS   := 125
mkolom  := 125
SHAL    :=  0
SJUMLAH := 0
END PRINTPAGE
START PRINTPAGE
ENDIF

SELECT INTRAN1
DbSkip()
ENDDO

END PRINTPAGE
END PRINTDOC

RETURN Nil

6 Tanggapan

  1. puyeng Pak lihat coding na heheee……lihatnya sepele faktur pajak tapi tnyata codingnya…????

    • Ustadzah Elkotieb

      Ya programer memang kerjaan yg bikin puyeng isi kepala , minimal dng melihat coding tsb bisa menghargai proses ciptanya ( Hak Cipta ) dan jangan memakai bajakan dong !!!!! he..he..hee

  2. Senantiasa terkagum-kagum pada kemampuan programer ‘text base’, yang tekun menyusun baris kode mulai puluhan, ratusan bahkan ribuan hingga jutaan baris untuk menyelesaikan pekerjaan yang keliatannya sepele…
    Tambahin dikit lagi kang, agar bisa mencetak FP untuk transaksi VALAS (US,Yen, Euro, dll), pastinya akan bertambah sipppppppp…..
    Huebatttttt !

    • Dear suhu
      pak moel

      Makasih pak moel atas masukannya , untuk FP baru dng mata uang IDR & USD dan nanti jika ada permintaan dari customer ke mata uang EURO dan YEN ya harus dibikinin he..he..he

      Pak Moel , sebenarnya minigui sudah suport dng CRYSTAL REPORT dan IDE GUI , cuma sayangnya saya kadang lebih enjoy dengan command line dan untuk selanjutnya saya mencoba pakai IDE ( beberapa menu dah 100% pakai IDE )

      Makasih pak ,

  3. waah ikutan puyeng Gun liat koding dan koding, tapi asik pula si

  4. Memang lebih oke kl pake program, tp kl blom punya bs memanfaatkan Mc.Excel walau hanya sebagian yg msh mampu tuk diotomatisasikan, sesuai kemampuan yg ada.

Tinggalkan Balasan

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

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Ikuti

Get every new post delivered to your Inbox.

%d bloggers like this: