SlideShare ist ein Scribd-Unternehmen logo
1 von 7
FOXPRO                                                  VSC/SHN


                          TRANSAKSI2 ONE TO MANY

Buat Tabel : Transaksi2

NAME               TYPE     WIDTH       KET
NO_FAKTUR          C        10                PRIMARY
TGL                DATE     8
JCUS               C        30
KD_PLG             C        5                 REGULAR
TOTALJUMBEL        N        10
TOTALJUMHA         N        10

Buat Tabel : Sementara

NAME               TYPE     WIDTH       KET
KD_BRG             C        5
NM_BRG             C        30
HRG_BRG            N        10
JUMBEL             N        10
JUMHA              N        10

DESAIN FORM




                                    1
FOXPRO                                                  VSC/SHN


LISTING PROGRAM

Form_______________________load
CLOSE ALL
SET DEFAULT TO quot;c:/LAB SORE/120123456quot;
*sesuaikan path penyimpanan

SELECT 1
USE barang
SET ORDER TO tag kd_brg

SELECT 2
USE pelanggan
SET ORDER to tag kd_plg

SELECT 3
USE transaksi2
SET ORDER TO tag no_faktur
*menset index di tabel transaksi2
SET RELATION TO kd_plg INTO pelanggan additive
*additive digunakan utk membaca lebih dari satu tabel

SELECT 4
USE sementara

SELECT 4
DELETE ALL
PACK

PUBLIC totalk, total as Currency
PUBLIC jbk,jb as numeric
totalk=0
jbk=0
*bersifat umum dapat digunakan dibeberapa sub

form______________________aktif
thisform.no_faktur.Enabled = .T.
thisform.optiongroup1.option1.Enabled = .T.
thisform.optiongroup1.option2.Enabled = .T.
thisform.kd_plg.Enabled = .T.
thisform.nm_plg.Enabled = .T.
thisform.alamat.Enabled = .T.
thisform.tel.Enabled= .T.
thisform.kd_brg.Enabled = .T.
thisform.jumbel.Enabled = .T.


                                      2
FOXPRO                                        VSC/SHN


form_________________________nonaktif
thisform.no_faktur.Enabled = .f.
thisform.tgl.Enabled = .F.
thisform.optiongroup1.option1.Enabled = .f.
thisform.optiongroup1.option2.Enabled = .f.
thisform.kd_plg.Enabled = .f.
thisform.nm_plg.Enabled = .f.
thisform.alamat.Enabled = .f.
thisform.tel.Enabled= .f.
thisform.kd_brg.Enabled = .f.
thisform.nm_brg.Enabled = .f.
thisform.hrg_brg.Enabled = .f.
thisform.jumbel.Enabled = .f.
thisform.jumha.Enabled = .F.
thisform.toba.Enabled = .F.

form___________________________bersih
thisform.no_faktur.Value=quot;quot;
thisform.optiongroup1.option1.Value =0
thisform.optiongroup1.option2.Value =0
thisform.kd_plg.Value=quot;quot;
thisform.nm_plg.Value=quot;quot;
thisform.alamat.Value=quot;quot;
thisform.tel.Value=quot;quot;
thisform.kd_brg.Value=quot;quot;
thisform.nm_brg.Value=quot;quot;
thisform.hrg_brg.Value=quot;quot;
thisform.jumbel.Value=quot;quot;
thisform.jumha.Value=quot;quot;
thisform.totaljuMBEL.Value=quot;quot;
thisform.totaljumhar.Value=quot;quot;
thisform.toba.Value=quot;quot;

form______________________________activate
thisform.bersih
thisform.nonaktif
thisform.cmdadd.SetFocus ()
SET DATE TO british
SET CENTURY on

SELECT 4
DELETE ALL
PACK
thisform.grid1.Refresh
thisform.grid1.RecordSource=quot;sementaraquot;


                                    3
FOXPRO                                        VSC/SHN


option1_______________________click
thisform.optiongroup1.option2.Enabled = .F.
THISFORM.kd_plg.SetFocus

Option2_______________________click
thisform.optiongroup1.option1.Enabled = .F.
thisform.kd_plg.Enabled = .F.
thisform.nm_plg.Enabled = .F.
thisform.alamat.Enabled= .F.
thisform.tel.Enabled = .F.
thisform.kd_brg.SetFocus

kd_plg_________________________keypress
LPARAMETERS nKeyCode, nShiftAltCtrl
SELECT 2
SET ORDER to tag kd_plg

IF NKEYCODE=13 THEN
IF SEEK(TRIM(thisform.kd_plg.Value))
thisform.nm_plg.Value=nm_plg
thisform.alamat.Value=alamat
thisform.tel.Value=telepon
thisform.nm_plg.Enabled = .F.
thisform.alamat.Enabled= .F.
thisform.tel.Enabled = .F.
thisform.kd_brg.SetFocus()
ELSE
MESSAGEBOX(quot;Kode Tidak Adaquot;,64,quot;Pesanquot;)
thisform.kd_plg.Value=quot;quot;
thisform.kd_plg.SetFocus()
thisform.nm_plg.Enabled = .F.
thisform.alamat.Enabled= .F.
thisform.tel.Enabled = .F.
ENDIF
ENDIF

Kd_brg_________________________Click
SELECT 1
IF SEEK(ALLTRIM(thisform.kd_brg.Value))then
thisform.nm_brg.Value=nm_brg
thisform.hrg_brg.Value=hrg_satuan
thisform.jumbel.SetFocus
ENDIF




                                     4
FOXPRO                                                VSC/SHN


Jumbel_____________________________keypress
LPARAMETERS nKeyCode, nShiftAltCtrl
IF NKEYCODE=13 THEN
b=thisform.hrg_brg.Value
c=VAL(thisform.jumbel.Value)
total=ROUND(b*c,0)
thisform.jumha.Value=total
total=thisform.jumha.Value
totalk=totalk+total
thisform.totaljumhar.Value =totalk
thisform.toba.Value=totalk

jb=ROUND(VAL(thisform.jumbel.Value),0)
jbk=jbk+jb
thisform.totaljumbel.Value=jbk

SELECT 4
APPEND BLANK
REPLACE kd_brg WITH thisform.kd_brg.Value
REPLACE nm_brg WITH thisform.nm_brg.Value
REPLACE hrg_brg WITH thisform.hrg_brg.Value
REPLACE jumbel WITH VAL(thisform.jumbel.Value)
REPLACE jumha WITH thisform.jumha.Value
thisform.Refresh
lagi=MESSAGEBOX(quot;Mau Input Data Lagiquot;,32+4,quot;Pesanquot;)
IF lagi=6 then
thisform.kd_brg.Value=quot;quot;
thisform.nm_brg.Value=quot;quot;
thisform.hrg_brg.Value=quot;quot;
thisform.jumbel.Value=quot;quot;
thisform.hrg_brg.Value=quot;quot;
thisform.totaljumbel.Value=quot;quot;
thisform.totaljumhar.Value=quot;quot;
thisform.kd_brg.SetFocus ()
ELSE
thisform.toba.Enabled = .F.
ENDIF
thisform.grid1.Refresh
thisform.grid1.RecordSource=quot;sementaraquot;
ENDIF

Cmdadd______________________________click
jbk=0
totalk=0
thisform.bersih
thisform.aktif

                                     5
FOXPRO                                              VSC/SHN


thisform.no_faktur.SetFocus ()
SELECT 4
DELETE ALL
PACK
thisform.grid1.Refresh
thisform.grid1.RecordSource=quot;sementaraquot;
thn=LTRIM(STR(YEAR(DATE())))
bln=LTRIM(STR(month(DATE())))

SELECT 3
IF RECCOUNT()<=0
nof='0001'
ELSE
GO bott
IF thn=LEFT(transaksi2.no_faktur,4) then
IF VAL(bln)=VAL(substr(transaksi2.no_faktur,5,2))
nolama=VAL(right(transaksi2.no_faktur,4))
no=nolama+1
DO case
CASE no<10
nof='000'+STR(no,1)
CASE no<100
nof='00'+STR(no,2)
CASE no<1000
nof='0'+STR(no,3)
OTHERWISE
nof=STR(no,4)
ENDCASE
ELSE
nof='0001'
ENDIF
ELSE
nof='0001'
ENDIF
ENDIF
IF VAL(bln)<10
bulan='0'+bln
else
bulan=bln
ENDIF
thisform.no_faktur.Value=thn+bulan+(nof)
thisform.tgL.Value=DATE()
thisform.Refresh




                                       6
FOXPRO                                                  VSC/SHN


cmdsave__________________________click
SELECT 3
APPEND BLANK
REPLACE no_faktur WITH thisform.no_faktur.Value
REPLACE tgl WITH thisform.tgl.Value
IF thisform.optiongroup1.option1.Value=1 then
REPLACE jcus WITH quot;Customerquot;
ELSE
REPLACE jcus WITH quot;Non Customerquot;
ENDIF
REPLACE kd_plg WITH thisform.kd_plg.Value
REPLACE totaljumbel WITH thisform.totaljumbel.Value
REPLACE totaljumha WITH thisform.totaljumhar.value
thisform.Refresh
thisform.nonaktif

cmdcancel____________________________click
thisform.nonaktif
thisform.bersih

SELECT 4
DELETE ALL
PACK
thisform.grid1.Refresh
thisform.grid1.RecordSource=quot;sementaraquot;

cmdbrow_________________________________click
SELECT 3
BROWSE

Cmdaexit________________________________________click
keluar=MESSAGEBOX(quot;Mo Keluarquot;,36,quot;Pesan Keluarquot;)
IF keluar=6 then
MESSAGEBOX(quot;Yakin Niy..quot;,0,quot;Konfirmasiquot;)
thisform.Release
ELSE
MESSAGEBOX(quot;Ups Ga Jadi Dech..!!quot;,16,quot;Batal Keluarquot;)
ENDIF




                         ** Selamat Mengerjakan **




                                    7

Weitere ähnliche Inhalte

Ähnlich wie Transaksi One To Many

The Ring programming language version 1.5.2 book - Part 55 of 181
The Ring programming language version 1.5.2 book - Part 55 of 181The Ring programming language version 1.5.2 book - Part 55 of 181
The Ring programming language version 1.5.2 book - Part 55 of 181Mahmoud Samir Fayed
 
The Ring programming language version 1.8 book - Part 63 of 202
The Ring programming language version 1.8 book - Part 63 of 202The Ring programming language version 1.8 book - Part 63 of 202
The Ring programming language version 1.8 book - Part 63 of 202Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 55 of 180
The Ring programming language version 1.5.1 book - Part 55 of 180The Ring programming language version 1.5.1 book - Part 55 of 180
The Ring programming language version 1.5.1 book - Part 55 of 180Mahmoud Samir Fayed
 
The Ring programming language version 1.5 book - Part 2 of 31
The Ring programming language version 1.5 book - Part 2 of 31The Ring programming language version 1.5 book - Part 2 of 31
The Ring programming language version 1.5 book - Part 2 of 31Mahmoud Samir Fayed
 
The Ring programming language version 1.5.2 book - Part 8 of 181
The Ring programming language version 1.5.2 book - Part 8 of 181The Ring programming language version 1.5.2 book - Part 8 of 181
The Ring programming language version 1.5.2 book - Part 8 of 181Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 58 of 189
The Ring programming language version 1.6 book - Part 58 of 189The Ring programming language version 1.6 book - Part 58 of 189
The Ring programming language version 1.6 book - Part 58 of 189Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 61 of 196
The Ring programming language version 1.7 book - Part 61 of 196The Ring programming language version 1.7 book - Part 61 of 196
The Ring programming language version 1.7 book - Part 61 of 196Mahmoud Samir Fayed
 
Report zcomprasreporte abap
Report zcomprasreporte abapReport zcomprasreporte abap
Report zcomprasreporte abapDavid Roque
 

Ähnlich wie Transaksi One To Many (10)

The Ring programming language version 1.5.2 book - Part 55 of 181
The Ring programming language version 1.5.2 book - Part 55 of 181The Ring programming language version 1.5.2 book - Part 55 of 181
The Ring programming language version 1.5.2 book - Part 55 of 181
 
The Ring programming language version 1.8 book - Part 63 of 202
The Ring programming language version 1.8 book - Part 63 of 202The Ring programming language version 1.8 book - Part 63 of 202
The Ring programming language version 1.8 book - Part 63 of 202
 
The Ring programming language version 1.5.1 book - Part 55 of 180
The Ring programming language version 1.5.1 book - Part 55 of 180The Ring programming language version 1.5.1 book - Part 55 of 180
The Ring programming language version 1.5.1 book - Part 55 of 180
 
The Ring programming language version 1.5 book - Part 2 of 31
The Ring programming language version 1.5 book - Part 2 of 31The Ring programming language version 1.5 book - Part 2 of 31
The Ring programming language version 1.5 book - Part 2 of 31
 
The Ring programming language version 1.5.2 book - Part 8 of 181
The Ring programming language version 1.5.2 book - Part 8 of 181The Ring programming language version 1.5.2 book - Part 8 of 181
The Ring programming language version 1.5.2 book - Part 8 of 181
 
The Ring programming language version 1.6 book - Part 58 of 189
The Ring programming language version 1.6 book - Part 58 of 189The Ring programming language version 1.6 book - Part 58 of 189
The Ring programming language version 1.6 book - Part 58 of 189
 
The Ring programming language version 1.7 book - Part 61 of 196
The Ring programming language version 1.7 book - Part 61 of 196The Ring programming language version 1.7 book - Part 61 of 196
The Ring programming language version 1.7 book - Part 61 of 196
 
Report zcomprasreporte abap
Report zcomprasreporte abapReport zcomprasreporte abap
Report zcomprasreporte abap
 
Program For Parsing2
Program For Parsing2Program For Parsing2
Program For Parsing2
 
Zmalv output type_v1.1
Zmalv output type_v1.1Zmalv output type_v1.1
Zmalv output type_v1.1
 

Kürzlich hochgeladen

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 

Kürzlich hochgeladen (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 

Transaksi One To Many

  • 1. FOXPRO VSC/SHN TRANSAKSI2 ONE TO MANY Buat Tabel : Transaksi2 NAME TYPE WIDTH KET NO_FAKTUR C 10 PRIMARY TGL DATE 8 JCUS C 30 KD_PLG C 5 REGULAR TOTALJUMBEL N 10 TOTALJUMHA N 10 Buat Tabel : Sementara NAME TYPE WIDTH KET KD_BRG C 5 NM_BRG C 30 HRG_BRG N 10 JUMBEL N 10 JUMHA N 10 DESAIN FORM 1
  • 2. FOXPRO VSC/SHN LISTING PROGRAM Form_______________________load CLOSE ALL SET DEFAULT TO quot;c:/LAB SORE/120123456quot; *sesuaikan path penyimpanan SELECT 1 USE barang SET ORDER TO tag kd_brg SELECT 2 USE pelanggan SET ORDER to tag kd_plg SELECT 3 USE transaksi2 SET ORDER TO tag no_faktur *menset index di tabel transaksi2 SET RELATION TO kd_plg INTO pelanggan additive *additive digunakan utk membaca lebih dari satu tabel SELECT 4 USE sementara SELECT 4 DELETE ALL PACK PUBLIC totalk, total as Currency PUBLIC jbk,jb as numeric totalk=0 jbk=0 *bersifat umum dapat digunakan dibeberapa sub form______________________aktif thisform.no_faktur.Enabled = .T. thisform.optiongroup1.option1.Enabled = .T. thisform.optiongroup1.option2.Enabled = .T. thisform.kd_plg.Enabled = .T. thisform.nm_plg.Enabled = .T. thisform.alamat.Enabled = .T. thisform.tel.Enabled= .T. thisform.kd_brg.Enabled = .T. thisform.jumbel.Enabled = .T. 2
  • 3. FOXPRO VSC/SHN form_________________________nonaktif thisform.no_faktur.Enabled = .f. thisform.tgl.Enabled = .F. thisform.optiongroup1.option1.Enabled = .f. thisform.optiongroup1.option2.Enabled = .f. thisform.kd_plg.Enabled = .f. thisform.nm_plg.Enabled = .f. thisform.alamat.Enabled = .f. thisform.tel.Enabled= .f. thisform.kd_brg.Enabled = .f. thisform.nm_brg.Enabled = .f. thisform.hrg_brg.Enabled = .f. thisform.jumbel.Enabled = .f. thisform.jumha.Enabled = .F. thisform.toba.Enabled = .F. form___________________________bersih thisform.no_faktur.Value=quot;quot; thisform.optiongroup1.option1.Value =0 thisform.optiongroup1.option2.Value =0 thisform.kd_plg.Value=quot;quot; thisform.nm_plg.Value=quot;quot; thisform.alamat.Value=quot;quot; thisform.tel.Value=quot;quot; thisform.kd_brg.Value=quot;quot; thisform.nm_brg.Value=quot;quot; thisform.hrg_brg.Value=quot;quot; thisform.jumbel.Value=quot;quot; thisform.jumha.Value=quot;quot; thisform.totaljuMBEL.Value=quot;quot; thisform.totaljumhar.Value=quot;quot; thisform.toba.Value=quot;quot; form______________________________activate thisform.bersih thisform.nonaktif thisform.cmdadd.SetFocus () SET DATE TO british SET CENTURY on SELECT 4 DELETE ALL PACK thisform.grid1.Refresh thisform.grid1.RecordSource=quot;sementaraquot; 3
  • 4. FOXPRO VSC/SHN option1_______________________click thisform.optiongroup1.option2.Enabled = .F. THISFORM.kd_plg.SetFocus Option2_______________________click thisform.optiongroup1.option1.Enabled = .F. thisform.kd_plg.Enabled = .F. thisform.nm_plg.Enabled = .F. thisform.alamat.Enabled= .F. thisform.tel.Enabled = .F. thisform.kd_brg.SetFocus kd_plg_________________________keypress LPARAMETERS nKeyCode, nShiftAltCtrl SELECT 2 SET ORDER to tag kd_plg IF NKEYCODE=13 THEN IF SEEK(TRIM(thisform.kd_plg.Value)) thisform.nm_plg.Value=nm_plg thisform.alamat.Value=alamat thisform.tel.Value=telepon thisform.nm_plg.Enabled = .F. thisform.alamat.Enabled= .F. thisform.tel.Enabled = .F. thisform.kd_brg.SetFocus() ELSE MESSAGEBOX(quot;Kode Tidak Adaquot;,64,quot;Pesanquot;) thisform.kd_plg.Value=quot;quot; thisform.kd_plg.SetFocus() thisform.nm_plg.Enabled = .F. thisform.alamat.Enabled= .F. thisform.tel.Enabled = .F. ENDIF ENDIF Kd_brg_________________________Click SELECT 1 IF SEEK(ALLTRIM(thisform.kd_brg.Value))then thisform.nm_brg.Value=nm_brg thisform.hrg_brg.Value=hrg_satuan thisform.jumbel.SetFocus ENDIF 4
  • 5. FOXPRO VSC/SHN Jumbel_____________________________keypress LPARAMETERS nKeyCode, nShiftAltCtrl IF NKEYCODE=13 THEN b=thisform.hrg_brg.Value c=VAL(thisform.jumbel.Value) total=ROUND(b*c,0) thisform.jumha.Value=total total=thisform.jumha.Value totalk=totalk+total thisform.totaljumhar.Value =totalk thisform.toba.Value=totalk jb=ROUND(VAL(thisform.jumbel.Value),0) jbk=jbk+jb thisform.totaljumbel.Value=jbk SELECT 4 APPEND BLANK REPLACE kd_brg WITH thisform.kd_brg.Value REPLACE nm_brg WITH thisform.nm_brg.Value REPLACE hrg_brg WITH thisform.hrg_brg.Value REPLACE jumbel WITH VAL(thisform.jumbel.Value) REPLACE jumha WITH thisform.jumha.Value thisform.Refresh lagi=MESSAGEBOX(quot;Mau Input Data Lagiquot;,32+4,quot;Pesanquot;) IF lagi=6 then thisform.kd_brg.Value=quot;quot; thisform.nm_brg.Value=quot;quot; thisform.hrg_brg.Value=quot;quot; thisform.jumbel.Value=quot;quot; thisform.hrg_brg.Value=quot;quot; thisform.totaljumbel.Value=quot;quot; thisform.totaljumhar.Value=quot;quot; thisform.kd_brg.SetFocus () ELSE thisform.toba.Enabled = .F. ENDIF thisform.grid1.Refresh thisform.grid1.RecordSource=quot;sementaraquot; ENDIF Cmdadd______________________________click jbk=0 totalk=0 thisform.bersih thisform.aktif 5
  • 6. FOXPRO VSC/SHN thisform.no_faktur.SetFocus () SELECT 4 DELETE ALL PACK thisform.grid1.Refresh thisform.grid1.RecordSource=quot;sementaraquot; thn=LTRIM(STR(YEAR(DATE()))) bln=LTRIM(STR(month(DATE()))) SELECT 3 IF RECCOUNT()<=0 nof='0001' ELSE GO bott IF thn=LEFT(transaksi2.no_faktur,4) then IF VAL(bln)=VAL(substr(transaksi2.no_faktur,5,2)) nolama=VAL(right(transaksi2.no_faktur,4)) no=nolama+1 DO case CASE no<10 nof='000'+STR(no,1) CASE no<100 nof='00'+STR(no,2) CASE no<1000 nof='0'+STR(no,3) OTHERWISE nof=STR(no,4) ENDCASE ELSE nof='0001' ENDIF ELSE nof='0001' ENDIF ENDIF IF VAL(bln)<10 bulan='0'+bln else bulan=bln ENDIF thisform.no_faktur.Value=thn+bulan+(nof) thisform.tgL.Value=DATE() thisform.Refresh 6
  • 7. FOXPRO VSC/SHN cmdsave__________________________click SELECT 3 APPEND BLANK REPLACE no_faktur WITH thisform.no_faktur.Value REPLACE tgl WITH thisform.tgl.Value IF thisform.optiongroup1.option1.Value=1 then REPLACE jcus WITH quot;Customerquot; ELSE REPLACE jcus WITH quot;Non Customerquot; ENDIF REPLACE kd_plg WITH thisform.kd_plg.Value REPLACE totaljumbel WITH thisform.totaljumbel.Value REPLACE totaljumha WITH thisform.totaljumhar.value thisform.Refresh thisform.nonaktif cmdcancel____________________________click thisform.nonaktif thisform.bersih SELECT 4 DELETE ALL PACK thisform.grid1.Refresh thisform.grid1.RecordSource=quot;sementaraquot; cmdbrow_________________________________click SELECT 3 BROWSE Cmdaexit________________________________________click keluar=MESSAGEBOX(quot;Mo Keluarquot;,36,quot;Pesan Keluarquot;) IF keluar=6 then MESSAGEBOX(quot;Yakin Niy..quot;,0,quot;Konfirmasiquot;) thisform.Release ELSE MESSAGEBOX(quot;Ups Ga Jadi Dech..!!quot;,16,quot;Batal Keluarquot;) ENDIF ** Selamat Mengerjakan ** 7