You are on page 1of 142

CONCEPTUAL AND LOGICAL

MODEL
HIRE PURCHASE MANAGEMENT SYSTEM

for

BOON MOTOR ENTERPRISE (K) SDN BHD

ANG MOON THIAK


UNIVERSITI UTARA MALAYSIA
MSc. (IT) 2009
CONCEPTUAL AND LOGICAL
MODEL
HIRE PURCHASE MANAGEMENT SYSTEM

A thesis submitted to the Graduate School in partial fulfillment of the requirements for
degree Master of Science (Information Technology)

UNIVERSITY UTARA MALAYSIA

by

Ang Moon Thiak

Copyright Ang Moon Thiak, November 2009, All Rights reserved


PERMISION TO USE

This thesis presents a partial fulfillment of the requirement for a postgraduate degree
from Universiti Utara Malaysia. I agree that the university library may make it freely available
for inspection. I further agree that the permission for copying of this thesis in any manner, in
whole or in part, for scholarly purposes may be granted by my supervisor or, in their absence
by the Assistant Vice Chancellor of the College of Arts and Sciences. It is understood that any
copying or publication or use of this thesis or parts thereof for financial gain shall not be
allowed without my written permission. It is also understood that due recognition shall be
given to me and to Universiti Utara Malaysia for any scholarly use which may be made of any
material from my thesis.

Requests for permission to copy or to make other use of materials in this thesis, in
whole or in part should be addressed to:

Assistant Vice Chancellor


College of Arts and Sciences
Universiti Utara Malaysia
06010 UUM Sintok
Kedah Darul Aman.

I
ABSTRACT

This project is regarding the designing of conceptual and logical model of Hire
Purchase Management System for Hire Purchase Company. The System will use client server
system to run daily operations and able to smooth up the daily operation and reduce the operation
cost as well. Prior to the development of the system, a study has been done so that the
organization can gain real benefits from adopting a suitable Hire Purchase System. So, a
Conceptual Model of the system has been made to simulate the model to determine the
effectiveness of the system. The prototype will be developed know as Boon Motor Hire Purchase
Management System (BMHPM). BMHPM able to control on the daily Hire Purchase transaction
and also management system.

Keywords: Boon Motor Hire Purchase Management System (BMHPM)

II
ACKNOWLEDGEMENTS

I would like to express my deepest gratitude to my supervisor, Prof Madya Md Zahir Bin
Mat Cha for his constructive suggestion, guidance, and consistence support during the
development of the project. I would also like to thank his continuous faith and support in me.
Without his encouragement and guidance, it will not be easy for me to reach this extend in
completion my report.
Secondly, I would like to thank all my dearest family members, especially to my parents,
brothers who have given me their full support in my study. Their full support remains the
mainstay for me in overcoming all the difficulties in completing this study. Next I would like to
thank all the lecturers who have taught me before throughout the Masters Degree course because
the knowledge they imparted have allowed me to be more knowledgeable and thus in a better
position to complete this research.
Lastly, I would like to thank all my friends who had given me support and helping me at
times of difficulties, especially thanks to Mr Ang Boon Wan who guiding me in the process of
completing this report.

III
TABLE OF CONTENTS

TITLE PAGE
PERMISSION TO USE…………………………………………………… I
ABSTRACT……………………………………………………………….. II
ACKNOWLEDGEMENTS………………………………………………. III
TABLE OF CONTENTS……………………………………………………IV
LIST OF FIGURES…………………………………………………………VI
LIST OF ABBREVIATIONS…………………………………………….. VII

CHPATER 1: INTRODUCTION………………………………………… 1
1.1 Problem Statement……………………………………………………2
1.2 Project’s Objective……………………………………………………2
1.3 Project’s Scope …………………………………………………… 3
1.4 Hardware and Software Requirement……………………………. 3
1.5 Summary………………………………………………………….. 4

CHAPTER 2: LITERATURE REVIEW …………………………………5


2.1 Conceptual Model……………………..………………………..……5
2.1.1 Conceptual Model in M5 Data Elements and Standard for 6
Drug Dictionaries………………………………………….
2.1.2 Conceptual Model of Web Service Reputation…………… 6
2.2 Logical Model…………………………………………………….. 8
2.3 Hire Purchase……………………………………………………… 10

CHAPTER 3: METHODOLOGY …………………………………….. 13


3.1 Rapid Application Development…………………………………. 13
3.2 Analysis …………………………….………. …………………… 15
3.3 Designing………………………………………………………….. 16
3.3.1 Traditional Model…………………………………………. 16
3.3.2 Conceptual Model Design…………………………………. 17

IV
3.3.3 Entity Relationship Diagram……………………………… 19
3.3.4 Logical Model Design……………………………………. 20
3.3.5 Relational Model For Logical Model ..…………………... 22
3.3.6 Interface Design…………………………………………… 23
3.3.7 Database Design..…………………………………………. 32
3.4 Prototyping …………………………… ……..… ………………… 40
3.5 Conclusion of Prototyping & Testing …..………………………… 40
3.6 Implementation……………………………………………………. 41
3.7 Summary………………………………………………………….. 41

CHAPTER4: SIGNIFICANCE/CONTRIBUTION ……………….…… 42

CHAPTER 5: CONCLUSION ……………………………………..…… 43


5.1 Problems and Limitation……………………………………….. 43
5.2 Recommendations and Future Development…………………… 44
5.3 Summary……………………………………………………….. 44

CHAPTER 6 : TIME SCHEDULE 45


REFERRENCE…………………………………………………………... 46
APPENDIX ……..……………….. ……………………………………….. 49

V
LIST OF FIGURES

Figure 2.1 Conceptual Model of an information system


Figure 2.2 Logical data model of a simple library system
Figure 3.0 Traditional Hire Purchase System for Boon Motor Enterprise (K)
Sdn Bhd
Figure 3.1 Conceptual model for Hire Purchase Management System
Figure 3.1.1 Rapid application development (RAD) Cycle
Figure 3.2 Entity Relationship Diagram for BMHPM
Figure 3.3 Logical Model Design for BMHPM
Figure 3.4 Relational Model for BMHPM
Figure 3.5 Login Menu
Figure 3.6 Hire Purchase Menu
Figure 3.6.1 Hire Purchase Menu(Search HP Info)
Figure 3.7 Hirer Menu
Figure 3.8 Staff Menu
Figure 3.9 Vehicle Menu
Figure 3.10 Sale Invoice Menu
Figure 3.11 View Menu
Figure 3.12 HP Receipt Menu
Figure 3.13 Database
Figure 3.14 Alamat Table
Figure 3.15 Banker Table
Figure 3.16 Cek Table
Figure 3.17 Customer Table
Figure 3.18 Fee Table
Figure 3.19 Fon Table
Figure 3.20 Hpor Table

VI
Figure 3.21 Hporno Table
Figure 3.22 hpoverdue Table
Figure 3.23 hppaytype Table
Figure 3.24 Negeri table
Figure 3.25 Poskod table
Figure 3.26 Staff table
Figure 3.27 Termcharge Table
Figure 3.28 Vehicle table

LIST OF TABLE
Table 1 Time Schedule

LIST OF ABBREVIATIONS

UUM University Utara Malaysia


HP Hire Purchase
IT Information Technology
(K) Kedah
Sdn Bhd Sendirian Berhad
BMHPS Boon Motor Hire Purchase System

VII
 

CHAPTER 1
1.0 INTRODUCTION
Hire Purchase is a system of acquiring goods on credit whereby the seller of the goods is
regarded as the dealer, the purchaser is regarded as the hirer and the finance company as the
owner. The ownership of the goods bought on hire purchase does not pass to the hirer at the
time of the hire purchase agreement or upon delivery of the goods. The ownership of the
goods remains in the finance company until the hirer has fully settled the price agreed upon in
the hire purchase agreement.

A hire purchase agreement, commonly known as H.P. agreement, in respect of the goods
must be in writing and printed in type of a size not smaller than the type known as 10-point
Times. Any oral agreement is not a valid hire purchase agreement.

The main legislation governing the hire purchase transactions in Malaysia is the Hire
Purchase Act 1967, which came into force on 11 April 1968 after hire purchase became an
increasingly popular method of acquisition.

Only the following goods can be bought on hire purchase in Malaysia:

- all consumer goods

- motor vehicles namely

• invalid carriages

• motor cycles

• motor cars including taxi cabs and hire cars

• goods vehicles where the maximum permissible laden weight does not exceed
2,540 kilograms buses, including stage buses

The most common type of hire purchase agreement in Malaysia is for the purchase of motor
vehicle.

In this study, conceptual model will integrated into the Hire Purchase system of Boon Motor
Enterprise (Kedah) Sdn. Bhd. The company is allocating in Alor Setar. Boon Motor
Enterprise (K) Sdn. Bhd. is establishing in 1977. The main business is to sell motorcycle.
1

 
 

Beside that, Boon Motor Enterprise (K) Sdn. Bhd. also has sold accessories of motorcycle,
service motorcycle, sale second hand motorcycle.

1.1 Problem Statement

At the moment, there is no Hire Purchase system being used in Boon Motor Enterprise
(Kedah) Sdn. Bhd. in order to manage daily business. As a result, few problems had occurred.
The manual system may give rise to some problem. Since all processes of recording data
have to do manually, the possibility of data lost is high. It is because some data may be lost
because of human carelessness, ambiguous handwriting and failing.

By using the manual system, the cost of management in long term is higher because the
company needs more stationery and furniture for keeping data. Beside that, the company
needs to hire more staff to manage all the transaction in the company.

Therefore, a tool is needed to improve the company’s services. The project aim is to provide
an alternative way to solve the company’s problem and increase the efficiency.

1.2 Objective

The Hire Purchase System is designed for a small business that desires a completely control
over the company’s transaction. The main objective of the study is to construct the
conceptual model for hire purchase management system. To achieve the main objective
below is some sub objectives.

i. To study and analysis the current system.

ii. To construct the conceptual model for hire purchase management system

iii. To develop a prototype.

 
 

1.3 Scope

The Hire Purchase System is developing for Boon Motor Enterprise (Kedah) Sdn. Bhd. This
system is purposely developing for Boon Motor Enterprise which is focuses on main users,
which are staff and manager. This system is developing base on the requirement of company.
The system only can access by authorized user in the organization. In this system, we have
internal control. The administrator needs to log in to Hire Purchase System in order to
manage the system. Each staffs have different username and password that use to login to the
system. The system can make sure that only the authorized person can login to the system.
The users who use the valid username and password, can login by press enter for one time.
But, if the users using wrong username. The manager can access all function in the system,
but the staff only can access certain part of the system.

Hire Purchase System

Manager Staff

Figure 1: Scope of Boon Motor Hire Purchase Management System(BMHPM)

1.4 Hardware and Software Requirement

Hardware Requirement

Hardware that has been use to develop BMHPM as list as below :

• Intel Pentium 4 CPU .2.0 GHz


• Hp LCD monitor
• Mouse and Keyboard
• Hp Laser Printer

 
 

Software Requirement

Software that has been use to develop BMHPM are list as below:

• Microsoft Windows XP service pack 2


• Microsoft Visual Basic 6.0
• Microsoft Office Access
• Microsoft Office Excel

1.5 Summary

Technological changing, over a relatively short period of time, has brought many companies
into the computerized system to centralize all the operating system. Since there is no any
complete computerized system in Boon Motor Enterprise (K) Sdn Bhd carried out for the hire
purchase management system, this project develops a prototype will capable to enhance the
company’s information systems integration and increases the quality of customer services.

 
 

CHAPTER 2
2.0 LITERATURE REVIEW

The Conceptual Model concept has been applied in different areas.

2.1 Conceptual Model

A Conceptual Model is a diagram of a set of relationships between certain factors that are
believed to impact or lead to a target condition (MSP Resource Portal, 2004). In other ways,
Conceptual Model represents 'concepts' (entities) and relationships between them. A
conceptual model is a formal model in which every entity being modeled in the real world
has a transparent and one-to-one correspondence to an object in the model (Gary F. Simons,
1994).

Conceptual modeling is a well known technique of data modeling, together with logical
modeling and physical modeling. The conceptual model is explicitly chosen to be
independent of implementation details, such as concurrency or data storage (Wikimedia
Foundation Inc., 2009).

The aim of Conceptual Model is to express the meaning of terms and concepts that use to
discuss the problem and to find the correct relationships between different concepts. The
conceptual model attempts to clarify the meaning of various usually ambiguous terms, and
ensure that problems with different interpretations of the terms and concepts cannot occur.
Such differing interpretations could easily cause the software projects that are based on the
interpretation of the concepts to fail (Wikimedia Foundation Inc., 2009).

Once the main concepts have been modeled, the model becomes a basis for subsequent
development of applications. The concepts of the conceptual model can be used as basis of
object-oriented design and implemented in program code, in particular as classes in object-
oriented languages.

A conceptual model can be described using various notations, such as UML or OMT for
object modelling, or IE or IDEF1X for Entity Relationship Modeling (Wikimedia Foundation

 
 

Inc., 2009). In UML notation, the conceptual model is described with a class diagram. In ER
notation, the conceptual model is described with an ER Diagram.

2.1.1 Conceptual Model in M5 Data Elements and Standards for Drug Dictionaries

It is desirable for regulators and pharmaceutical industry to engage in an intensive


information exchange during the drug development phase, the drug evaluation and approval
phase and the post-authorization phase. The standardization of medicinal product information
is regarded as one of the key elements of this information flow (U.S Food and Drug
Administration, 2009).

However, regulators in the ICH regions and observer countries have established their own
procedures and applications with standards that differ in data format, content, language and
applied terminology (U.S Food and Drug Administration, 2009).

Due to the lack of a common and harmonized approach, both regulators and pharmaceutical
industry are confronted with the following issues:

• No possibility to exchange medicinal product information between regulators and


industry in a structured and efficient way (U.S Food and Drug Administration,
2009).

• Difficulties to ensure data consistency and evaluate and comparing medicinal


product-related information

• Lack of consistency in the use of terminology in the health care community (U.S
Food and Drug Administration, 2009).

2.1.2 Conceptual Model of Web Service Reputation

Current Web services standards enable publishing service descriptions and finding services
on a match based on criteria such as method signatures or service category. This conceptual
model for reputation using which reputation information can be organized and shared and
service selection can be facilitated and automated (E. Michael Maximilien and Munindar P.
Singh, 2005).

 
 

A web service represents a set of functions addressing a particular domain. For instance, a
travel service might include functions to return a list of trips for a particular airline on a
specified date, time, origin and destination airport. For each service we can extract a series of
generic attributes and domain-specific attributes that apply to the service (E. Michael
Maximilien and Munindar P. Singh, 2005).

From this example and what we discussed before, it is clear that a conceptual model for the
reputation of a service must include the different categories of attributes that apply to a
service. The reputation of the service is a function of the various attributes that matters to a
specific agent. This is analogous to how various human real world services can appear to be
rated differently depending on the end user who is providing the rating (E. Michael
Maximilien and Munindar P. Singh, 2005).

For each domain, the attributes in that domain are important inputs to the overall rating and
reputation of a service. Some attributes are common across domains and some are specific to
domains. Each attribute has the following aspects.

• The value set for that attribute and it’s allowed range or enumeration. For instance, an
attribute such as failure rate or availability for a service can be expressed as a simple
percentage. The speed of service function execution could be instead a simple
bounded integer.

• The domains that this attributes belong to. For instance, is this a cross-domain
attribute or an attribute specific for a domain? And within each domain, some
attributes will be of greater importance than others—this can depend on some
standard definition of attributes for a domain.

• The weight of this attribute relative to its domain and the user preferences. This would
determine the impact of this attribute on the final decision regarding a provider (E.
Michael Maximilien and Munindar P. Singh, 2005).

 
 

An example conceptual model of a simple information system is shown below:

Figure 2.1: Conceptual model of an information system (Priestley, M.,London 1997)

2.2 Logical Model

A logical data model is a model that is not specific to a database that describes things about
which an organization wants to collect data, and the relationships among these things (IBM,
2000). A logical model contains representations of entities and attributes, relationships,
unique identifiers, subtypes and super types, and constraints between relationships (IBM,
2000).

A logical model also contains domain model objects, or reference one or more domain or
glossary models. After logical objects and relationships are defined in a logical data model,
the workbench can be use to transform the logical model into a database-specific physical
representation in the form of a physical data model (IBM, 2000).

Logical database design has the aim of creating a data model that is completely independent
from any particular database management system (DBMS) or software/hardware platform. A
conceptual model is typically needed before the logical model is constructed. If the system is
8

 
 

large, it is often the case that individual logical models are constructed for each user view or
area within the business. Then, these separate models are merged into a global logical data
model.(Computing_Students,2005).

An example logical data model of a simple library system is shown below:

Figure 2.2.1: Logical data model of a simple library system (Computing Students, 2005)

Reason to build Logical Data Model is:

• Helps users to understand the business data elements and requirements


• Provides foundation for designing a database (Wapedia, 2009)
• Facilitates avoidance of data redundancy to prevent data and business transaction
inconsistency
• Facilitates data re-use and sharing (Wapedia, 2009)
• Decreases development and maintenance time and cost (Wapedia, 2009)
• Confirms a logical process model and helps impact analysis. (Wapedia, 2009)

Benefits of Logical Modeling

• Clarifies functional specifications and avoids assumption (Wapedia, 2009)


• Confirms business requirements (Wapedia, 2009)
• Facilitates business process improvement (Wapedia, 2009)
• Becomes a template for the enterprise (Wapedia, 2009)

 
 

• Gathers metadata (Wapedia, 2009)


• Focuses communication for data analysis and project team members (Wapedia, 2009)
• Establishes a consistent naming scheme (Wapedia, 2009)

2.3 Hire Purchase

Hire Purchase (HP) is the hiring of goods with the option to buy the goods at the end of the
hire purchase term. If you take on HP financing, you are the hirer and financier is the owner.
As a hirer, you will have to repay the financier based on the agreed duration while you have
possession of the vehicle. When all the installments are paid up, ownership is then transferred
to you.

The benefit of this system is that hirer gain immediate use of the asset without having to pay
a large amount for it or without having to borrow a large amount. Hire purchase should be
distinguished from installments sale wherein property passes to the purchaser with the
payment of the first installments (Ramanujam K.M., 1995).

HP transactions are governed by the Hire Purchase Act (Hire Purchase Act. 1967 (Reverse -
1978) [Reprint - 2001]). The HP Act sets out the forms and contents of HP agreements, the
legal rights, duties, obligations of hirers and financiers. The HP Act is administered by the
Ministry of Domestic Trade and Consumer Affairs.

To be valid, HP agreements must be in writing and signed by both parties. They must clearly
set out the following information in a print that all can read without effort:

1. a clear description of the goods


2. the cash price for the goods
3. the HP price, i.e., the total sum that must be paid to hire and then purchase the goods
4. the deposit
5. the monthly installments (most states require that the applicable interest rate is
disclosed and regulate the rates and charges that can be applied in HP transactions)
and
6. a reasonably comprehensive statement of the parties' rights (sometimes including the
right to cancel the agreement during a "cooling-off" period).

10

 
 

7. The right of the hirer to terminate the contract when he feels like doing so with a valid
reason. (Wikipedia, 2009)

The hirer usually has the following rights:

1. To buy the goods at any time by giving notice to the owner and paying the balance of
the HP price less a rebate (each jurisdiction has a different formula for calculating the
amount of this rebate)
2. To return the goods to the owner — this is subject to the payment of a penalty to
reflect the owner's loss of profit but subject to a maximum specified in each
jurisdiction's law to strike a balance between the need for the buyer to minimize
liability and the fact that the owner now has possession of an obsolescent asset of
reduced value
3. With the consent of the owner, to assign both the benefit and the burden of the
contract to a third person. The owner cannot unreasonably refuse consent where the
nominated third party has good credit rating
4. Where the owner wrongfully repossesses the goods, either to recover the goods plus
damages for loss of quiet possession or to damages representing the value of the
goods lost.

Basically hirer has following rights-1-Rights of protection 2-Rights of notice 3-Rights of


repossession 4-Rights of Statement 5-Rights of excess amount

The owner usually has the right to terminate the agreement where the hirer defaults in paying
the installments or breaches any of the other terms in the agreement. This entitles the owner:

1. to forfeit the deposit

2. to retain the installments already paid and recover the balance due

3. to repossess the goods (which may have to be by application to a Court depending on


the nature of the goods and the percentage of the total price paid)

4. to claim damages for any loss suffered (Wikipedia, 2009).

11

 
 

The need to have a guarantor for HP financing would depend on the banking institution’s
credit assessment of your ability to repay the installments. If you default on your repayment,
the guarantor is liable for the unpaid portion of the HP financing and the interest due. A
person who agrees to be a guarantor will need to sign a letter of guarantee. He will also be
given a copy of the HP agreement within 14 days after the agreement is signed.

12

 
 

CHAPTER 3

3.0 METHODOLOGY

The methodology that used in this study is Rapid Application Development (RAD).

3.1 Rapid Application Development (RAD)

Rapid application development is a term originally used to describe a software development


process introduced by James Martin in 1991. Rapid Application Development (RAD) is a
software development methodology, which involves iterative development and the
construction of prototypes. It is a merger of various structured techniques, especially the data
driven Information Engineering with prototyping techniques to accelerate software systems
development (Wikipedia, 2009).

It is an approach to building computer systems which combines Computer-Assisted Software


Engineering (CASE) tools and techniques, user-driven prototyping, and stringent project
delivery time limits into a potent, tested, reliable formula for top-notch quality and
productivity. RAD drastically raises the quality of finished systems while reducing the time it
takes to build them (CASEMaker Inc. 1997-2000).

RAD restructures the process of building information systems and replaces hand-design and
coding processes. In addition to being more stable, Rapid Application Development is a more
capable process, as it is much faster and less error prone than hand coding. Traditional
development lifecycles are too slow and rigid to meet the business demands of today’s
economy. A new methodology must be implemented, one that allows organizations to build
software applications faster, better, and cheaper. RAD enables such development
(CASEMaker Inc. 1997-2000).

13

 
 

The concepts of RAD are:


• To more actively involve system users in the analysis, design and construction
activities

• To accelerate the requirements analysis and design phases through an iterative


construction approach

• To reduce the amount of time until the users begin to see a working system

• To use prototypes to their fullest potential (JS Consulting Group Inc., 2000-2009)

Figure 3.1.1: Rapid Application Development (RAD) Cycle (Officeware Corporation, 1996
- 1998)

RAD features these overriding characteristics:

• The focus is on delivering projects in small pieces. If you have a large project, you
need to look at ways to break it into smaller projects, each of which can be planned
and delivered individually. With a series of smaller projects, you can deliver each one
more quickly and in a less structured manner (Tom Mochal, 2001).
• Deliverables, including the final solution, are created using a repeating process of
analysis, design, construction, and testing. Prototypes are created early and evolved to
include more detail over time (Tom Mochal, 2001).
• RAD emphasizes reuse. This includes the reuse of code, processes, templates, and
tools. It is usually faster to assemble prebuilt components than to build everything
from scratch (Tom Mochal, 2001).

14

 
 

Rapid Application Development (RAD) Step:

3.2. Analysis

• Plan the work plan first. A Work plan describes the activities needed to complete
the project

• Capture the business requirements and gather the requirements at a high level.
Focus on the main features and functions to be delivered, as well as the overall
batch and online processes

• The requirements do not necessarily need to be formally approved by the customer,


since the RAD approach allows them to change over time (Tom Mochal, 2001).

• The first time through the analysis phase, you should still look ahead in the project
to plan the approach for some of the later activities. Since the RAD project is
smaller, you can probably bypass the high-level strategy documents and focus
directly on the lower-level documents

• If the project is small enough, the plans can be bypassed as well, with the lower-
level activities discussed with the customer and placed directly into the Workplan
(Tom Mochal, 2001).

15

 
 

3.3. Designing

3.3.1 Traditional Model

Figure 3.0 shows the traditional model for BMHPM. The HP card, payment
record, sale invoice record, customer information, hire purchase due date, staff information
and HP payment receipt records need to store in the book.

Book 
Record

HP Card  Payment  Hire Purchase  Staff HP Payment 


Record  Due Date Receipt

Sale Invoice Customer

Figure 3.0 Traditional Hire Purchase System for Boon Motor Enterprise (K) Sdn Bhd.

Presently, the hire purchase system has done all the work manually. All information is store
in a few record books. Therefore, the management will have to spend a lot of money to buy
books, stationery and hire many staff. This will increase the cost in management. Since all the
processes of recording data are doing manually, the possibility of data lost is high. It is
because some data may be lost because of ambiguous handwriting and failing. Sometimes,
data also keeping wrongly by the staffs. Records also can spill from the place or misplaced in
a different part of the file. The current system does not provide an efficient security because
anyone easy to access the company data without any permission. The lack of the security will
cause the company for losing their privacy. Besides that, the design of the books to store
information is simple; it can be easily changed by staff in the process of calculation of
amount installment and payment information.

16

 
 

3.3.2 Conceptual Model

Design

Figure 3.1 shows the conceptual model for BMHPM. The design of
conceptual model is based on the traditional hire purchase system shown at figure 3.0.

Figure 3.1 Conceptual model for Hire Purchase Management System

17

 
 

A Conceptual Model is a diagram of a set of relationships between certain factors that are
believed to impact or lead to a target condition.

In this conceptual model, first, user must login the system with authorized user id and
password, when login successful, system will display Hire Purchas Menu. If user needs to
insert new staff details, then he/she can add new staff information by Staff information form.
Besides that, user can add new invoice by Sale Invoice Form. Furthermore, user can add hirer
information, by Sale Invoice Form or Hirer Menu. In addition, user can also add vehicle
information by vehicle form or sale invoice form. User can view total loan, total monthly
loan, total yearly loan and total hirer loan by view form. After invoice created, user can view
hire purchase information and execute the HP document process such as print the HP
agreement, HP card, reminder, fourth schedule, repossession order and fifth schedule.
Moreover, user can also make purchase payment process, user can view the due date, overdue
interest amount, fully settlement amount, total collection, receipt and blacklist of hirer.

18

 
 

3.3.3 Entity Relationship Diagram(ERD)

BankInfo  HirerInfo  VehicleInfo 


BankCode   HirerCode  ChassisNo 
Branch     Manage  HirerName  Make 
1..* Model 
1..*
BankName  HirerPhone 
1..*
  HirerIC Manage     TypeOfBody 
YearMake 
EngineNo 
Manage    

SaleInvoiceInfo  1..1 1..1


Staff HirePurchaseInfo
SaleNo  Manage    
   Manage StaffNo  SaleNo 
CoverNoteNo 
Position  VehicleNo 
HirerCode  1..* 1..1 1..1 1..*
Salary  HirerCode 
SellingPrice 
StaffName TotalAmountDue 
Payment  1..1
TotalAmountPaid 
LoanAmount 
(optional, or) TotalAmountPayable 
ChassisNo 
CurrentBalance 
Manager

HpPaymentInfo 
ReceiptNo 
Manage     AmountPay 
PaymentType 
1..* SaleNo 
TotalOverdueInterest 
Rebate 
FullySettlement 

Figure 3.2 Entity Relationship Diagram For Boon Motor Hire Purchase Management
System(BMHPM)

19

 
 

3.3.4 Logical Model Design

banker  hppaytype  jual  hpor 

BankCode  ReceiptNo  SaleNo  ReceiptNo 


BankName  PayType  SaleDate  ReceiptDate 
ChassisNo 
Branch  ChequeNo  Amount 
CustomerCode 
BankCode SalePrice  SaleNo
Remark 
staff  CNote  hporno 
fee 
 
SaleNo  nohpor 
StaffId 
RoadTax  jualregno 
StaffName 
RegnFee 
Salary 
NoPlate  VehicleNo  hpoverdue 
EmployDate 
SaleNo 
Password  ReceiptNo 
jualhp  ReceiptDate 
termcharge  OverDue 
alamat  SaleNo 
SaleNo
HakMilik  faedah
Code 
InterestRate  HPMonth
Address  vehicle 
Payment  Kadar 
PostCode 
HPMonth 
ChassisNo 
HPType 
vehsub Model 
HakMilkNo 
EngineNo 
poskod 
Model  YearMake 
PostCode  negeri  Make  cc 
City    Body 
City  Oil
State 
personal  customer 

Code  fon  CustomerCode 


NewIc  CustomerName 
OldIc  Code 
BirthDate  HousePhone 
Gender  HandPhone 
Occupation  OfficePhone 
Status 

Figure 3.3 Logical Model Design for BMHPM

20

 
 

Logical model design has the aim of creating a data model that is completely independent
from any particular database management system (DBMS) or software/hardware platform. In
figure 3.2, the logical model contains 19 table, which are banker table, hppaytype table, jual
table, hpor table, hporno table, fon table, staff table, fee table, hpoverdue table, jualregno
table, jualhp table, personal table, customer table, negeri table, poskod table, alamat table,
vehsub table, termcharge table and vehicle table. This database had been normalizing.
Normalization is a process for evaluating and correcting table structures to minimize data
redundancies. Normalization help eliminate data anomalies. For example, address or
postcode of staff and customer are saving in same database which is alamat table. Besides
that, city or state of customer and staff also save in negeri table. The customer name is
separated in customer table and only 2 fields in the table; it is because when user needs to
search for customer information by customer name, system will retrieve data very fast.

21

 
 

3.3.5 Relational Model For Logical Model

banker  hppaytype  hpor 


jual 
BankCode{PK}  ReceiptNo{PK}  SaleNo{PK}  ReceiptNo{PK} 
BankName  PayType  SaleDate  ReceiptDate 
ChassisNo{FK} 
Branch  ChequeNo  Amount 
CustomerCode 
BankCode{FK} {FK}  SaleNo{FK}
SalePrice 
staff  Remark  hporno 
CNote 
  fee 
nohpor{PK} 
StaffId{PK}  SaleNo(PK) 
StaffName  jualregno 
RoadTax 
Salary 
RegnFee  VehicleNo{FK}  hpoverdue 
EmployDate 
NoPlate  SaleNo{PK} 
Password  ReceiptNo{PK} 
jualhp  ReceiptDate 
termcharge  OverDue 
alamat  SaleNo{PK} 
SaleNo{FK}
HakMilik  faedah 
Code{PK} 
InterestRate  HPMonth{PK}
Address  vehicle 
Payment  Kadar 
PostCode{FK} 
HPMonth{FK} 
ChassisNo{PK} 
HPType 
vehsub Model{FK} 
HakMilkNo 
EngineNo 
poskod 
Model{PK}  YearMake 
PostCode{PK}  negeri  Make  Cc 
City{FK}    Body  Colour 
City{PK}  Oil
State 
personal  customer 

Code{PK}  fon  CustomerCode{PK} 


NewIc  CustomerName 
Code{PK} 
OldIc 
HousePhone 
BirthDate 
HandPhone 
Gender 
OfficePhone 
Occupation 
Status 
Figure 3.4 Relational Model for BMHPM

22

 
 

3.3.6 Interface Design

Design a good interface is more effect when the user interacts with the Hire Purchase
system.

Login Menu

Figure 3.5 Login Menu

In this login menu, it has internal control. Each staffs have different username and password
that use to login to the system. The system can make sure that only the authorized person can
login to the system. The users who use the valid username and password, can login by press
enter for one time. But, if the users using wrong username or password more than three times,
the system will be automatically log out. Manager can access the entire menu in the system,
but general clerk can only access certain menu of this system. First, user needs to select
his/her name, after that he/she needs to insert the password, and then click the “Login”
button.

23

 
 

Hire Purchase Menu

Figure 3.6 Hire Purchase Menu

In this menu, user can check the hire purchase information of each vehicle by the vehicle
registration number. User can check amount installment, total installment pay, total month
paid, current balance, arrears of amount installment, total month due, total amount due, total
overdue interest, early settlement and total amount payable. Besides that, user can also search
the Hire Purchase information by using the hirer Name, hirer IcNo. Moreover, user is able to
print out the payment receipt, installment card, reminder, fourth schedule, RO or fifth
schedule.

24

 
 

Hire Purchase Menu

Figure 3.6.1 Hire Purchase Menu

User is able to search the Hire Purchase information by the vehicle registration number, hirer
.name, hirer IcNo

25

 
 

Hirer Menu

Figure 3.7 Hirer Menu

Hirer information of the company can be managed easily in the hirer menu. Users can add,
delete, and update the hirer details. Besides that, user is able to search the hirer information
by the hirer IC or hirer name.

26

 
 

Staff Menu

Figure 3.8 Staff Menu

Personal details of the company’s staffs will be record in this menu. New staff’s details can
be record in a systematic way. There have some internal control in this menu, staff can only
update owns information only, and he /she are not able to delete or update other staff details.
However, all staffs’ information can be updated and deleted easily by manager. Only
manager can delete staff information.

27

 
 

Vehicle Menu

Figure 3.9 Vehicle Menu

The vehicle information will be record in this menu. Users can add, delete, update and search
the data easily.

28

 
 

Sales Invoice Menu

Figure 3.10 Sale Invoice Menu

Users can create new invoice and record in the system. In addition, user is able to search
invoice by insert the vehicle registration number, hirer name, or hirer IC number.
Furthermore, user can also edit the invoice information such as invoice date, duration number
installment, chassis number, type of Hire Purchase. Furthermore, user is able to print out the
invoice, hire purchase agreement, second schedule, delivery report, authorized letter, keeping
vehicle registration card, hire purchase history card, consent of information summation for
hirer and guarantor.

29

 
 

View Menu

Figure 3.11 View Menu

In this Hire Purchase view menu, user is able to view hirer information, sale invoice, Hire
Purchase daily, monthly and yearly loan, and Hire Purchase payment information. Besides
that, in the Hire Purchase view menu, user can also view Hire Purchase information by IC
number or vehicle registration number.

30

 
 

Hire Purchase Payment Receipt Menu

Figure 3.12 HP Receipt Menu

Details of hire purchase payment for each vehicle will be saving to the database. User can
make payment and official receipt will be issue to hirer from this menu.

31

 
 

3.3.6 Database Design

Good design for database structure will make the system running smoothly and
quickly also to provide the data redundancy, it will reduce server overload.

Database

Figure 3.13 Database

Alamat Table

Figure 3.14 Alamat Table

The address of hirer, staff and bank will be saving into this table.
32

 
 

Banker table

Figure 3.15 Banker Table

Detail of bank information will be saving in this table.

Cek Table

Figure 3.16 Cek Table

Payment made by cheque will save into this table for record the cheque number and bank
code.Customer Table

33

 
 

Figure 3.17 Customer Table

This customer table is use for saving customer code and customer name.

Fee table

Figure 3.18 Fee Table

This table is use for saving sales number, road tax, registration fees, and no plate.

34

 
 

Fon table

Figure 3.19 Fon Table

This table is use for saving code, house phone, hand phone, office phone, and fax number.

Hpor Tablr

Figure 3.20 Hpor Table

This table is use for saving receipt number, receipt date, amount paid, and sales number.
35

 
 

hporno Table

Figure 3.21 Hporno Table

This table is use for saving HP receipt auto number

hpoverdue Table

Figure 3.22 hpoverdue Table

This table is use for saving receipt number, receipt date, over due amount, and sales number.

36

 
 

Hppaytype Table

Figure 3.23 hppaytype Table

This table is use for saving customer receipt number, type of payment and cheque number.

Negeri table

Figure 3.24 Negeri table

This table is use for saving city and state.

37

 
 

Poskod table

Figure 3.25 Poskod table

This table is use for saving post code, and city.

Staff table

Figure 3.26 Staff table

This table is use for saving staff id, staff name, salary and date of employ.

38

 
 

termcharge table

Figure 3.27 Termcharge Table

This table is use for saving interest, number installment, and rate of term charges.

Vehicle table

Figure 3.28 Vehicle table

This table is use for saving chassis number, model, engine number, year make, cc, and color.

39

 
 

3.4. Prototyping

• Utilize the requirements you received in the previous step

• At first, this may just be a series of screens that show how a business transaction is
processed. There may not be any database calls or business logic programmed
behind the screen shells.

• During this first pass, basic decisions also need to be made and tools to utilize, since
the prototype may lead directly to the solution.

• Repeat analysis and prototyping as necessary.

• When you’ve completed the initial prototype, you can use it to gather additional,
more detailed business requirements from the customer.

• Once you get the modified set of requirements, you update the prototype to reflect
the new set of requirements. When that prototype is completed, you take it back to
the customer again to revalidate requirements.

3.5. Conclusion of prototyping and Testing

• The project manager and customer need to agree on a fixed number of prototyping
iterations or else this cyclical process could go on forever.

• At that point, you will have two approaches to finish the project. First, if you
developed the prototypes with the final solution in mind, you need to finish the
design, programming, and testing of the solution using the prototype as the starting
point. In fact, depending on how much business logic you put into the last
prototype, you may find that your solution is close to being completed (Tom
Mochal, 2001).

• The other option is to throw away the prototype and begin developing the
production application from scratch. If you take this approach, it is imperative that
you don’t spend much effort on the prototype itself.

40

 
 

• In either case, the testing process still needs to be completed. The prototype may
have taken you through unit and integration testing, but you still need to system test
and gain user acceptance before the application can be implemented (Tom Mochal,
2001).

3.6. Implementation

• Normally, you do not prototype the implementation phase. So, the implementation
phase proceeds similarly to the waterfall method.

• The analysis/design/construction process is then applied in mini-cycles a number of


times until you get to an 80/20 solution. At that point, final construction and testing
is completed, and the solution is implemented (Tom Mochal, 2001).

3.7 Summary
This project is an adoption of UML and prototyping process. The phases in the methodology
involved analysis and quick design, prototyping, testing and implementation.

In prototyping, a small system will be developed adopting the entire methodology, the
developed system will be tested to verify that the new version of the system does meet the
stated functionality specifications and requirements.

41

 
 

CHAPTER 4

4.0 SIGNIFICANCE/CONTRIBUTION

This study will uncover the hidden information within the Cooperation data. It is designed to
eliminate redundant data, reduce errors and improve the system by appending practical
function to manage the loan payment. It will attempt help the Cooperation to better manage
the loan payment and meets the users’ satisfaction.

42

 
 

CHAPTER 5

5.0 CONCLUSION
This chapter reviews the overall progress of the project. It included the contribution,
problems and limitation encountered during the development especially the security aspects
and enhancement of the total system.

5.1 PROBLEMS AND LIMITATION


There have some limitation for the conceptual model. The first limitation is conceptual
models are not truth, they are simplified depictions of reality. The second limitation is the
conceptual models are not final, they provide a flexible framework that evolves as
understanding of the hire purchase system increases. The third limitation is the conceptual
models are not comprehensive, they focus only upon those “part” of hire purchase deemed
relevant while ignoring other important elements. A logical model only diagram expected
outcomes; however, unexpected outcomes may also occur in a program. It is important that
program staff and program evaluators monitor and address unexpected outcomes as well.
This BMHPM system enable user to manage all the records and data in systematic way.
Beside that, user can review or edit the existing records if need. This system also can help
staff and customer save the time while making the transaction. Beside that management of
Boon Motor Enterprise (Kedah) Sdn. Bhd. can retrieve and print out the hirer information and
historical transaction of any selected hirer. Hence the daily activities can be done more
efficiency and effectiveness; however, there are some problems and limitation encountered
during the development of the project, such as:
• The time given to build the whole system is only one semester or about 4 months.
Due to the time constraint, the system that was built can only be a prototype system.

• Although the prototype system is a client server-based system, it has not yet to be
tested in the real environment due to the time constraints.

43

 
 

5.2 Recommendations and Future Development


The work presented in this project has generated a number of ideas for future research. Future
design and development could be done based on the following consideration.\

i. Further development of the system should be continued to other departments that


are not included in the scope of the project to make the complete development
project for any Hire Purchase Company.
ii. Enhance the prototype system with the security features.

5.3 Summary
The major contribution of this project is to give advantage to Boon Motor Enterprise (K)
Sdn Bhd and also their users. When the system is further enhanced into higher scale, it is not
a high cost development project and does not cost high maintenance. There are some
limitations such as time constraint and real environment testing discovered during the
development of the project. To overcome these limitation, suggestion like enhance the
security features and further development of the complete system which cover all section in
the company have been recommended for the further development of this project.

44

 
 

CHAPTER 6

6.0 TIME SCHEDULE

The time schedule shows the timeline of the study.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Week
Task
System
requirement
Submit
proposal
Proposal
presentation
Design the
system
Implement the
system
Test the system
Draft of report
Final
Presentation
Submit final
report

Table 1: Time schedule

45

 
 

REFERENCES
AAOIFI. 1998. Accounting and Auditing Standards for Islamic Financial Institutions.
Manama: Accounting and Auditing Organization for Islamic Financial Institutions.

Abdul-Magid, M.F 1981. Theory of Islamic banking: accounting Implications. The


International Journal of Accounting Education and Research. 17(1) pp 79-102.

Adnan, M. A. and Gaffikin, M 1997. The Shariah, Islamic banks and accounting concepts
and practices. Proceedings of International Conference 1: Accounting, Commerce and
Finance: The Islamic perspective, Sydney, Australia: University of Western Sydney

Agrawal N.K. & P.L. Joshi, “Accounting for Leases”, the Chartered Accountant Aug., 1983,
page 92-97.

Ahmad, S. N. S. and Hamat, M. 1992. Accounting standards and Islamic banks. Accacmadia
(Malaysia). 11 (1), 46-61.

Ahmed, Eltegani Abdelgader. 1994. Accounting postulates and principles from an Islamic
Perspective. Review of Islamic Economics, Vol. 3 No. 2, pp. 1-18. Beekun, Rafik
Isa.1997. Islamic Business Ethics. Herdon VA. IIIT.

Bohman P. (2004). Cognitive disabilities part 1: we still know too little and we do even less.
Retrieved Jun 23, 2009, from
http://www.webaim.org/techniques/articles/cognitive_too_little/.

CASEMaker Inc. (1997-2000). What is Rapid Application Development? Retrieved 25 Jun


2009, from http://www.casemaker.com/download/products/totem/rad_wp.pdf

E. Michael Maximilien, Munindar P. Singh, Conceptual Model of Web Service Reputation,


Retrieved 25 Jun 2009, from
http://www.sigmod.org/record/issues/0212/SPECIAL/6.Maximilien-Singh.pdf

46

 
 

Gary F. Simons (1994). Conceptual modeling versus visual modeling: a technological key to
building consensus. Retrieved 25 Jun 2009, from
http://www.sil.org/cellar/ach94/ach94.html

Giorgos Zacharia and Pattie Maes. Trust management through reputation mechanisms.
Applied Artificial Intelligence, 14:881–907, 2000.

JS Consulting Group Inc (2000-2009). Rapid Application Development. Retrieved 25 Jun


2009, from http://www.jscgroup.com/rapid-application-development.html

McKinsey Corporation (1990), The Luxury Industry: An Asset for France, Paris: McKinsey.
Merton, Robert K. (1968), Social Theory and Social Structure, New York: Free Press.

MSP Resource Portal (2004). Multi Stakeholder Processes. Retrieved 25 Jun 2009, from
http://portals.wi.wur.nl/MSP/?Conceptual%20Modeling

Officeware Corporation, Rapid application Development, A Structured Approach to


Programming Modern Business Applications, Retrieved 25 Jun 2009, from
http://www.oware.com/Subpages/radmethodology.htm

Robert Delaney (2001). APA Citation Style. Retrieved from 25 Jun 2009, from
http://www.liu.edu/cwis/cwp/library/workshop/citapa.htm

Rowland, C. (2004). Cognitive disabilities part 2: conceptualizing design considerations.


Retrieved Jun 23, 2009, from http://www.webaim.org/techniques/
articles/conceptualize/.

Ramanujam K.M., R. Thennsyhi, “Accounting for Leases”, the Management Accountant,


Nov., 1995, page 850-852.

Tom Mochal (2001). Examining the life cycle of a RAD project. Retrieved 25 Jun 2009, from
http://articles.techrepublic.com.com/5100-10878_11-5035295.html

U.S Food and Drug Administration (2009), M5 Data Elements and Standards for Drug
Dictionaries, Retrieved 25 Jun 2009, from http://www.hc-sc.gc.ca/dhp-
mps/prodpharma/applic-demande/guide-
ld/ich/consultation/m5_step2notice_etape2avis_fig1-eng.php
47

 
 

Vanguard University and Douglas Degelman (1994-2009). APA Style Essentials (1994-
2009). Retrieved 25 Jun 2009, from
http://www.vanguard.edu/faculty/ddegelman/index.aspx?doc_id=796

Wikimedia Foundation, Inc (2009).Conceptual model (computer science).Retrieved 25 Jun


2009, from http://en.wikipedia.org/wiki/Conceptual_model_(computer_science)

Wikimedia Foundation, Inc., Conceptual Rapid application development, Retrieved 25 Jun


2009, from http://en.wikipedia.org/wiki/Rapid_application_development

Computing Students, Notes > Database Systems > Logical and Conceptual Data Models,
Retrieved 24 Sept 2009, from
http://www.computingstudents.com/notes/database_systems/logical_conceptual_data_
models.php

IBM InfoSphere Data Architect, Version 7.5.1, Logical data models, Retrieved 24 Sept 2009,
from
http://publib.boulder.ibm.com/infocenter/idm/v2r2/index.jsp?topic=/com.ibm.datatools
.logical.ui.doc/topics/clogmod.html

Wapedia, Wiki: Logical data model, Retrieved 24 Sept 2009, from


http://wapedia.mobi/en/Logical_data_model

Information modeling and relational databasesBy Terry Halpin, Tony Morgan

Priestley, M., Practical Object Oriented Design, McGraw-Hill, London, 1997.

http://www.hit.ac.il/staff/leonidM/information-systems/ch29.html

48

 
 

APPENDIX A

Use Case Diagram

Use Case Diagram for Administrator

View Invoice Print Invoice Login << include >> View Printed
<< include >>
Collection Collection Reminder

View HP Print HP
Collection Collection View Printed Ro
<< include >> << include >>

<< include >>


View Late << include >>
HP Payment View Posted Notice
<< include >>

View HP Manage Hirer


Information Information

<< include >>


View Invoice Manage Vehicle
information

View Bank Information


Manage Bank
Informaton
Administrator
View Vehicle Information

Manage Company
Information
View Staff Information

Manage Staff
View Hirer Information Information

View Loan Information Print Invoice


Receipt

Post Fifth Print RO Post Fourth Print Reminder Print HP


Schedule Schedule Make Invoice
Receipt Payment
<< include >> << include >> << include >> << include >>

Print Fifth View RO Print Fourth Print Invoice


View Reminder Make Hp
Schedule Schedule Payment
<< include >>
<< include >> << extend >>
View HP Payment

<< extend >>


View Fifth
Schedule View Fourth View HP View Hp Schedule
Schedule Information

Create Invoice

<< extend >> << extend >>

Edit Invoice View Invoice

49

 
 

Use Case Diagram for Manager

View HP Print HP Collection Login View Printed Reminder


Collection

View Printed RO
View Invoice Print Invoice Collection
Collection

<< include >> << include >>

View Loan Information View Posted Notice


<< include >>
<< include >>
<< include >>

View Late Manage Hirer


HP Payment Information

View HP Manage Vehicle


<< include >>
Information information

View Invoice Manage Bank


Informaton

Manager
View Staff Information
Manage Company
Information

View Bank Information


Manage Staff
Information

View Vehicle Information


Print Invoice
Delete Invoice Receipt

View Hirer Information

Post Fifth Print RO Post Fourth Print Reminder Print HP


Schedule Schedule Make Invoice Delete HP Delete Invoice
Receipt Payment receipt payment record
<< include >> << include >>
<< include >> << include >>

Print Fifth View RO Print Fourth View Reminder Print Invoice View HP View Invoice
Make Hp
Schedule Schedule Payment payment payment
<< include >>
<< include >>
<< include >>

<< extend >>

View Fifth << extend >>


View Fourth View HP View HP Payment View Invoice
Schedule Schedule Information

View Hp Schedule

Create Invoice

<< extend >> << extend >>

Edit Invoice View Invoice

50

 
 

Sequence Diagram

Sequence Diagram for Login Use Case(Administrator)

Login Panel : Login Manager : Katalaluan :


: Administrator
Login Panel Login Manager Katalaluan

Insert ID and Password ( )

Press Login Button ( )


Check ID and Password ( )
Get Password ( )
A1 : Press
Cancel

Display MDI Main Menu ( ) Verify Password ( )

E1 : Invalid ID
and Password

Sequence Diagram for Login Use Case (Manager)

Login Panel : Login Manager : Katalaluan :


: Manager Login Panel Login Manager Katalaluan

Insert ID and Password ( )

Press Login Button ( )


Check ID and Password ( )
Get Password ( )
A1 : Press
Cancel

Display MDI Main Menu ( ) Verify Password ( )

E1 : Invalid ID
and Password

51

 
 

Sequence Diagram for Manage Hirer Information Use Case (Administrator)

Hirer Information Panel : Hirer Information Manager : Pelanggan :


Hirer Information Panel Hirer Information Manager Pelanggan
: Administrator
Insert Data ( )
Hirer Information Panel : Hirer Information Manager : Pelanggan:
Press Save ButtonHirer
( ) Information Panel Hirer Information Manager Pelanggan
: Adminstrator Check Data ( )
Save Data ( )
Insert Data ( )

Press Save Button ( )


Check Data ( )
Save Data ( )

Insert Hirer Name or IC ( )

Press Search Button ( ) Check Data ( )


Retrieve Data ( )
Insert Hirer Name or IC ( )

Press Search Button ( ) Check Data ( ) E1 : Data


Retrieve DataNot
( ) Found
Verify Data ( )
Display Data ( )
E1 : Data
Not Found
Verify Data ( )
Display Data ( )
Insert Hirer Name or IC ( )

Press Delete Button ( )


Insert HIrer Code ( ) Check Data ( )
Retrieve Data ( )
Press Delete Button ( )
Check Data ( ) E2 : Data
Retrieve Data ( )
Not Found
Verify Data ( )
E2 : Data
Delete Not
Data ()
Found
Verify Data ( )

Delete Data ( )

Press Clear Button ( )


Send Request ( )

Press Clear Button ( )


Send Request ( )
Clear text ( )

Clear text ( )

Press Exit Button ( )


Send Request ( )
Press Exit Button ( )
Send Request ( )

Back to MDI Main Menu ( )

Back to MDI Main Menu ( )

52

 
 

Sequence Diagram for Manage Hirer Information Use Case (Manager)

Hirer Information Panel : Hirer Information Manager : Pelanggan:


Hirer Information Panel Hirer Information Manager Pelanggan
: Manager
Insert Data ( )

Press Save Button ( )


Check Data ( )
Save Data ( )

Insert Hirer Name or IC ( )

Press Search Button ( ) Check Data ( )


Retrieve Data ( )

E1 : Data
Not Found
Verify Data ( )
Display Data ( )

Insert HIrer Code ( )

Press Delete Button ( )


Check Data ( )
Retrieve Data ( )

E2 : Data
Not Found
Verify Data ( )

Delete Data ( )

Press Clear Button ( )


Send Request ( )

Clear text ( )

Press Exit Button ( )


Send Request ( )

Back to MDI Main Menu ( )

53

 
 

Sequence Diagram for Manage Staff Information Use Case (Administrator)

Staff Information Panel : Staff Information Manager : Pekerja :


Staff Information Panel Staff Information Manager Pekerja
: Administrator

Insert Data ( )

Press Save Button ( )


Check Data ( )
Save Data ( )

Insert Staff Name or IC ( )

Press Search Button ( ) Check Data ( )


Retrieve Data ( )

E1 : Data
Not Found
Verify Data ( )
Display Data ( )

Insert Staff Code ( )

Press Delete Button ( )


Check Data ( )
Retrieve Data ( )

E2 : Data
Not Found
Verify Data ( )

Delete Data ( )

Press Clear Button ( )


Send Request ( )

Clear text ( )

Press Exit Button ( )


Send Request ( )

Back to MDI Main Menu ( )

54

 
 

Sequence Diagram for Manage Staff Information Use Case (Manager)

Staff Information Panel : Staff Information Manager : Pekerja :


Staff Information Panel Staff Information Manager Pekerja
: Manager

Insert Data ( )

Press Save Button ( )


Check Data ( )
Save Data ( )

Insert Staff Name or IC ( )

Press Search Button ( ) Check Data ( )


Retrieve Data ( )

E1 : Data
Not Found
Verify Data ( )
Display Data ( )

Insert Staff Code ( )

Press Delete Button ( )


Check Data ( )
Retrieve Data ( )

E2 : Data
Not Found
Verify Data ( )

Delete Data ( )

Press Clear Button ( )


Send Request ( )

Clear text ( )

Press Exit Button ( )


Send Request ( )

Back to MDI Main Menu ( )

55

 
 

Sequence Diagram for Manage Vehicle Information Use Case (Administrator)

Vehicle Information Panel : Vehicle Information Manager : Kenderaan :


Vehicle Information Panel Vehicle Information Manager Kenderaan
:Administrator

Insert Data ( )

Press Save Button ( )


Check Data ( )
Save Data ( )

Insert Chassis No or Engine No ( )

Press Search Button ( ) Check Data ( )


Retrieve Data ( )

E1 : Data
Not Found
Verify Data ( )
Display Data ( )

Insert Chassis No ( )

Press Delete Button ( )


Check Data ( )
Retrieve Data ( )

E2 : Data
Not Found
Verify Data ( )

Delete Data ( )

Press Clear Button ( )


Send Request ( )

Clear text ( )

Press Exit Button ( )


Send Request ( )

Back to MDI Main Menu ( )

56

 
 

Sequence Diagram for Manage Vehicle Information Use Case (Manager)

Vehicle Information Panel : Vehicle Information Manager : Kenderaan :


Vehicle Information Panel Vehicle Information Manager Kenderaan
: Manager

Insert Data ( )

Press Save Button ( )


Check Data ( )
Save Data ( )

Insert Chassis No or Engine No ( )

Press Search Button ( ) Check Data ( )


Retrieve Data ( )

E1 : Data
Not Found
Verify Data ( )
Display Data ( )

Insert Chassis No ( )

Press Delete Button ( )


Check Data ( )
Retrieve Data ( )

E2 : Data
Not Found
Verify Data ( )

Delete Data ( )

Press Clear Button ( )


Send Request ( )

Clear text ( )

Press Exit Button ( )


Send Request ( )

Back to MDI Main Menu ( )

57

 
 

Sequence Diagram for Manage Bank Information Use Case (Administrator)

Bank Information Panel : Bank Information Manager : BankInfo :


Bank Information Panel Bank Information Manager BankInfo
:Administrator

Insert Data ( )

Press Save Button ( )


Check Data ( )
Save Data ( )

Insert Bank Name or Branch ( )

Press Search Button ( ) Check Data ( )


Retrieve Data ( )

E1 : Data
Not Found
Verify Data ( )
Display Data ( )

Insert Bank Code ( )

Press Delete Button ( )


Check Data ( )
Retrieve Data ( )

E2 : Data
Not Found
Verify Data ( )

Delete Data ( )

Press Clear Button ( )


Send Request ( )

Clear text ( )

Press Exit Button ( )


Send Request ( )

Back to MDI Main Menu ( )

58

 
 

Sequence Diagram for Manage Bank Information Use Case (Manager)

Bank Information Panel : Bank Information Manager : BankInfo :


Bank Information Panel Bank Information Manager BankInfo
: Manager

Insert Data ( )

Press Save Button ( )


Check Data ( )
Save Data ( )

Insert Bank Name or Branch ( )

Press Search Button ( ) Check Data ( )


Retrieve Data ( )

E1 : Data
Not Found
Verify Data ( )
Display Data ( )

Insert Bank Code ( )

Press Delete Button ( )


Check Data ( )
Retrieve Data ( )

E2 : Data
Not Found
Verify Data ( )

Delete Data ( )

Press Clear Button ( )


Send Request ( )

Clear text ( )

Press Exit Button ( )


Send Request ( )

Back to MDI Main Menu ( )

59

 
 

Sequence Diagram for Manage Company Information Use Case ( Administrator)

Company Information Panel : Company Information Manager : Syarikat :


Company Information Panel Company Information Manager Syarikat
: Administrator

Edit Data ( )

Press Save Button ( )


Check Data ( )
Save Data ( )

Press Clear Button ( )


Send Request ( )

Clear text ( )

Press Exit Button ( )


Send Request ( )

Back to MDI Main Menu ( )

60

 
 

Sequence Diagram for Manage Company Information Use Case (Manager)

Company Information Panel : Company Information Manager : Syarikat :


Company Information Panel Company Information Manager Syarikat
: Manager

Edit Data ( )

Press Save Button ( )


Check Data ( )
Save Data ( )

Press Clear Button ( )


Send Request ( )

Clear text ( )

Press Exit Button ( )


Send Request ( )

Back to MDI Main Menu ( )

61

 
 

Sequence Diagram for Print Invoice Receipt Use Case ( Administrator)

Invoice Info Panel : Invoice Payment Panel : Invoice Info Manager : Invois Payment Manager: Invois : InvoisBayar : Printer :
Invoice Info Panel Invoice Payment Panel Invoice Info Manager Invois Payment Manager Invois InvoisBayar Printer
: Administrator

Insert Data ( )

Press Save Button ( )


Check Data ( )
Save Data ( )

Insert Invoice No,Vehicle No, Hirer Name or IC ( )

Press Search Button ( )


Check Data ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( ) E1 : Record


Not Found

Press Clear Button ( ) Send Request ( )

Clear Text ( )

Press Exit Button ( )


Send Request ( )

Back to MDI Main Menu

Insert Invoice No ( )

Select Print Invoice Menu ( )


Send Request ( )

Verify Data ( )
Print Invoice ( )

Press Payment Button ( )


Send Request ( )

Display Invoice Payment Form ( )


Insert payment amount ( )

Press Save Button ( )


Check Data ( )
Save data ( )

Print Invoice Receipt ( )

62

 
 

Sequence Diagram for Print Invoice Receipt (Manager)


Invoice Info Panel : Invoice Payment Panel : Invoice Info Manager : Invois Payment Manager: Invois : InvoisBayar : Printer :
Invoice Info Panel Invoice Payment Panel Invoice Info Manager Invois Payment Manager Invois InvoisBayar Printer
:Manager

Insert Data ( )

Press Save Button ( )


Check Data ( )
Save Data ( )

Insert Invoice No,Vehicle No, Hirer Name or IC ( )

Press Search Button ( )


Check Data ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( ) E1 : Record


Not Found

Press Clear Button ( ) Send Request ( )

Clear Text ( )

Press Exit Button ( )


Send Request ( )

Back to MDI Main Menu

Insert Invoice No ( )

Select Print Invoice Menu ( )


Send Request ( )

Verify Data ( )
Print Invoice ( )

Press Payment Button ( )


Send Request ( )

Display Invoice Payment Form ( )


Insert payment amount ( )

Press Save Button ( )


Check Data ( )
Save data ( )

Print Invoice Receipt ( )

63

 
 

Sequence Diagram for Print HP Receipt Use Case ( Administrator)

HP Info Panel : HP Payment Panel : Hp Info Manager: HP Payment Manager : HPinfo : HPbayar : Printer :
HP Info Panel HP Payment Panel Hp Info Manager HP Payment Manager HPinfo HPbayar Printer
: Administrator

Insert Vehicle Number ( )

Press "Enter"
Check Vehicle Number ( )
Retrieve Data ( )

Display Data ( )
Verify Data ( )

Select Payment Date ( )

Press Payment Button


Send Request ( )

Display HP Payment Form ( )

Insert Payment Amount ( )

A1 : View A2 View HP
HP Schedule Payment Record

Press Save Button


Check Data ( )
Save Data ( )
Print HP Receipt ( )

Sequence Diagram for Print HP Receipt Use Case (Manager)

HP Info Panel : HP Payment Panel : Hp Info Manager: HP Payment Manager : HPinfo : HPbayar : Printer :
HP Info Panel HP Payment Panel Hp Info Manager HP Payment Manager HPinfo HPbayar Printer
:Manager

Insert Vehicle Number ( )

Press "Enter"
Check Vehicle Number ( )
Retrieve Data ( )

Display Data ( )
Verify Data ( )

Select Payment Date ( )

Press Payment Button


Send Request ( )

Display HP Payment Form ( )

Insert Payment Amount ( )

A1 : View A2 View HP
HP Schedule Payment Record

Press Save Button


Check Data ( )
Save Data ( )
Print HP Receipt ( )

64

 
 

Sequence Diagram for Print Reminder Use Case (Administrator)

Reminder Information Panel : Reminder Manager : Printer :


Reminder Information Panel Reminder Manager Printer
: Administrator

Select Date ( )
Send Request ( )

Display Late HP data ( )

Select Data ( )

Print Reminder

Sequence Diagram for Print Reminder Use Case (Manager)

Reminder Information Panel : Reminder Manager : Printer :


Reminder Information Panel Reminder Manager Printer
:Manager

Select Date ( )
Send Request ( )

Display Late HP data ( )

Select Data ( )

Print Reminder

65

 
 

Sequence Diagram for Post Fourth Schedule Use Case (Administrator)


Fourth Schedule Panel : Fourth Schedule Manager : Post Information Panel : Post Information Manager : Suratkirim : Printer :
Fourth Schedule Panel : Fourth Schedule Manager Post Information Panel Post Information Manager Suratkirim : Printer
: Administrator

Select Date ( )
Send Request ( )

Display Late HP data ( )

Select Data ( )

Print Fourth Schedule

Insert Post Number and Post date ( )

Select Save Button ( )

Check Data ( )
Save Data ( )

Sequence Diagram for Post Fourth Schedule (Manager)

Fourth Schedule Panel : Fourth Schedule Manager : Post Information Panel : Post Information Manager : Suratkirim : Printer :
Fourth Schedule Panel : Fourth Schedule Manager Post Information Panel Post Information Manager Suratkirim : Printer
:Manager

Select Date ( )
Send Request ( )

Display Late HP data ( )

Select Data ( )

Print Fourth Schedule

Insert Post Number and Post date ( )

Select Save Button ( )

Check Data ( )
Save Data ( )

66

 
 

Sequence Diagram for Print RO Use Case (Administrator)

RO Information Panel : RO Manager : Printer :


RO Information Panel RO Manager Printer
:Administrator

Select Date ( )
Send Request ( )

Display Late HP data ( )

Select Data ( )

Print RO ( )

Sequence Diagram for Print RO Use Case (Manager)

RO Information Panel : RO Manager : Printer :


RO Information Panel RO Manager Printer
:Manager

Select Date ( )
Send Request ( )

Display Late HP data ( )

Select Data ( )

Print RO ( )

67

 
 

Sequence Diagram for Post Fifth Schedule ( Administrator)

Fifth Schedule Panel: Fifth Schedule Manager: Post Information Panel : Post Information Manager : Suratkirim : Printer :
Fifth Schedule Panel Fifth Schedule Manager Post Information Panel Post Information Manager Suratkirim : Printer
: Administrator

Select Date ( )
Send Request ( )

Display Late HP data ( )

Select Data ( )

Print Fifth Schedule ( )

Insert Post Number and Post date ( )

Select Save Button ( )

Check Data ( )
Save Data ( )

Sequence Diagram for Post Fifth Schedule (Manager)

Fifth Schedule Panel: Fifth Schedule Manager: Post Information Panel : Post Information Manager : Suratkirim : Printer :
Fifth Schedule Panel Fifth Schedule Manager Post Information Panel Post Information Manager Suratkirim : Printer
: Manager

Select Date ( )
Send Request ( )

Display Late HP data ( )

Select Data ( )

Print Fifth Schedule ( )

Insert Post Number and Post date ( )

Select Save Button ( )

Check Data ( )
Save Data ( )

68

 
 

Sequence Diagram for View Hirer Information Use Case (Administrator)

View Information Panel : View Information Manager : Pelanggan:


View Information Panel View Information Manager Pelanggan
: Administrator

Insert Hirer Name or IC ( )

Select Hirer Information option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

Sequence Diagram for View Hirer Information Use Case (Manager)

View Information Panel : View Information Manager : Pelanggan:


View Information Panel View Information Manager Pelanggan
: Manager

Insert Hirer Name or IC ( )

Select Hirer Information option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

69

 
 

Sequence Diagram for View Staff Information Use Case (Administrator)

View Information Panel : View Information Manager : Pekerja:


View Information Panel View Information Manager Pekerja
: Administrator

Insert Staff Name or Staff IC ( )

Select Staff Information option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

Sequence Diagram for View Staff Information Use Case (Manager)

View Information Panel : View Information Manager : Pekerja:


View Information Panel View Information Manager Pekerja
: Manager

Insert Staff Name or Staff IC ( )

Select Staff Information option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

70

 
 

Sequence Diagram for View Vehicle Information(Administrator)

View Information Panel : View Information Manager : Kenderaan:


View Information Panel View Information Manager Kenderaan
: Administrator

Insert Chassis No or Engine No ( )

Select Vehicle Information option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

Sequence Diagram for View Vehicle Information(Manager)

View Information Panel : View Information Manager : Kenderaan:


View Information Panel View Information Manager Kenderaan
: Manager

Insert Chassis No or Engine No ( )

Select Vehicle Information option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

71

 
 

Sequence Diagram for View Bank Information Use Case (Administrator)

View Information Panel : View Information Manager : BankInfo:


View Information Panel View Information Manager BankInfo
: Administrator

Insert Bank Name or Branch ( )

Select Bank Information option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

Sequence Diagram for View Bank Information Use Case (Manager)

View Information Panel : View Information Manager : BankInfo:


View Information Panel View Information Manager BankInfo
: Manager

Insert Bank Name or Branch ( )

Select Bank Information option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

72

 
 

Sequence Diagram for View Invoice Information Use Case (Administrator)

View Information Panel : View Information Manager : Invois:


View Information Panel View Information Manager Invois
: Administrator

Insert Invoice No, Vehicle No , Hirer Name or Hirer IC ( )

Select Search Invoice Information option button ( )

Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

Sequence Diagram for View Invoice Information Use Case (Manager)

View Information Panel : View Information Manager : Invois:


View Information Panel View Information Manager Invois
: Manager

Insert Invoice No, Vehicle No , Hirer Name or Hirer IC ( )

Select Search Invoice Information option button ( )

Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

73

 
 

Sequence Diagram for View HP Information Use Case (Administrator)

View Information Panel : View Information Manager : HPInfo:


View Information Panel View Information Manager HPinfo
: Administrator

Insert Invoice No, Vehicle No or Hirer Name ( )

Select HP Information option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

Sequence Diagram for View HP Information Use Case (Manager)

View Information Panel : View Information Manager : HPInfo:


View Information Panel View Information Manager HPinfo
: Manager

Insert Invoice No, Vehicle No or Hirer Name ( )

Select HP Information option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

74

 
 

Sequence Diagram for View Loan Information Use Case (Administrator)

View Information Panel : View Information Manager : HPInfo:


View Information Panel View Information Manager HPinfo
: Administrator

Insert both start date and end date ( )

Select Loan Information option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

Sequence Diagram for View Loan Information Use Case (Manager)

View Information Panel : View Information Manager : HPInfo:


View Information Panel View Information Manager HPinfo
: Manager

Insert both start date and end date ( )

Select Loan Information option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

75

 
 

Sequence Diagram for View Late HP Payment Information Use Case (Administrator)

View Information Panel : View Information Manager : HPbayar:


View Information Panel View Information Manager HPbayar
: Manager

Select Date Start( )

Select "Search Late Payment" option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

Sequence Diagram for View Late HP payment Information Use Case (Manager)

View Information Panel : View Information Manager : HPbayar:


View Information Panel View Information Manager HPbayar
: Manager

Select Date Start( )

Select "Search Late Payment" option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

76

 
 

Sequence Diagram for Print Hp Collection Use Case (Administrator)

View Information Panel : View Information Manager : Hpbayar: Printer:


View Information Panel View Information Manager Hpbayar Printer
: Administrator

Select Both Date Start and Date End( )

Select "Invoice Collection Information" option button ( )

Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

Print HP Collection Information ( )

Sequence Diagram for Print Hp Collection Use Case (Manager)

View Information Panel : View Information Manager : Hpbayar: Printer:


View Information Panel View Information Manager Hpbayar Printer
: Manager

Select Both Date Start and Date End( )

Select "Invoice Collection Information" option button ( )

Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

Print HP Collection Information ( )

77

 
 

Sequence Diagram for Print Invoice Collection Use Case (Administrator)


View Information Panel : View Information Manager : Invoisbayar: Printer:
View Information Panel View Information Manager Invoisbayar Printer
: Administrator

Select Both Date Start and Date End( )

Select "Invoice Collection Information" option button ( )

Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

Print Invoice Collection Information ( )

Sequence Diagram for Print Invoice Collection Use Case(Manager)

View Information Panel : View Information Manager : Invoisbayar: Printer:


View Information Panel View Information Manager Invoisbayar Printer
: Manager

Select Both Date Start and Date End( )

Select "Invoice Collection Information" option button ( )

Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )

Print Invoice Collection Information ( )

78

 
 

Sequence Diagram for View Printed Reminder Use Case(Administrator)

View Information Panel : View Information Manager : Cetakreminder:


View Information Panel View Information Manager Cetakreminder
: Administrator

Insert Vehicle Number ( )

Select "View Printed Reminder" option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )
Double Click the record in FlexGrid ( )
Send Request ( ) Retrieve Data ( )

Display Report ( )

Sequence Diagram for View Printed Reminder Use Case(Manager)

View Information Panel : View Information Manager : Cetakreminder:


View Information Panel View Information Manager Cetakreminder
: Manager

Insert Vehicle Number ( )

Select "View Printed Reminder" option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )
Double Click the record in FlexGrid ( )
Send Request ( ) Retrieve Data ( )

Display Report ( )

79

 
 

Sequence Diagram for View Printed RO Use Case(Administrator)

View Information Panel : View Information Manager : Cetakreminder:


View Information Panel View Information Manager Cetakreminder
: Administrator

Insert Vehicle Number ( )

Select "View Printed RO" option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )
Double Click the record in FlexGrid ( )
Send Request ( ) Retrieve Data ( )

Display Report ( )

Sequence Diagram for View Printed RO Use Case(Manager)

View Information Panel : View Information Manager : Cetakreminder:


View Information Panel View Information Manager Cetakreminder
: Manager

Insert Vehicle Number ( )

Select "View Printed RO" option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )
Double Click the record in FlexGrid ( )
Send Request ( ) Retrieve Data ( )

Display Report ( )

80

 
 

Sequence Diagram for View Posted Notice Use Case(Administrator)

View Information Panel : View Information Manager : Suratkirim:


View Information Panel View Information Manager Suratkirim
: Administrator

Insert Vehicle Number ( )

Select "View Posted Notice" option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )
Double Click the record in FlexGrid ( )
Send Request ( ) Retrieve Data ( )

Display Report ( )

Sequence Diagram for View Posted Notice Use Case(Manager)

View Information Panel : View Information Manager : Suratkirim:


View Information Panel View Information Manager Suratkirim
: Manager

Insert Vehicle Number ( )

Select "View Posted Notice" option button ( )


Send Request ( )
Retrieve Data ( )

Verify Data ( )

Display Data ( )
Double Click the record in FlexGrid ( )
Send Request ( ) Retrieve Data ( )

Display Report ( )

81

 
 

Sequence Diagram for Delete Invoice Use Case(Manager)

Invoice Information Panel: Invoice Information Manager: Invois:


Invoice Information Panel Invoice Information Manager Invois
: Manager

Insert Vehicle Number ( )

Press Enter ( )
Check Data ( )
Retrieve Data ( )

E1 : Data
Not Found

Verify Data ( )

Display Data ( )
Press "Delete" Button ( )
Send Request ( )
Delete Data ( )

82

 
 

Sequence Diagram for Delete Invoice Payment Record Use Case(Manager)

Invoice Info Panel: Invoice Info Manager: Payment Info Panel: Payment Manager: Invoisbayar:
Invoice Info Panel Invoice Info Manager Payment Info Panel Payment Manager Invoisbayar
: Manager

Insert Vehicle Number ( )

Press Enter ( )
Check Data ( )
Retrieve Data ( )

E1 : Data
Not Found

Verify Data ( )

Display Data ( )

Press "Payment" Button ( )


Send Request ( )

Display Payment Form ( )

Inert Receipt No and press enter ( )

Press "Delete" Button ( )


Send Request ( )
Delete Data ( )

83

 
 

Sequence Diagram for Delete HP Receipt Use Case(Manager)

HP Info Panel: HP Info Manager: HP Payment Panel: HP Payment Manager : Hpbayar:


HP Info Panel HP Info Manager HP Payment Panel HP Payment Manager Hpbayar
: Manager

Insert Vehicle Number ( )

Press Enter ( )
Check Data ( )
Retrieve Data ( )

E1 : Data
Not Found

Verify Data ( )

Display Data ( )
Select Payment Date ( )

Press "Payment" Button ( )

Send Request ( )

Display Payment Form ( )

Insert Receipt No and press enter ( )

Press "Delete" Button ( )


Send Request ( )
Delete Data ( )

84

 
 

CODDING 
 
Login Menu 
 
Private mNode As Node 
Private ChildNode As Node 
Dim cuba As Integer 
 
Function pangkalan() 
    Data1.DatabaseName = App.Path + "\db1.mdb" 
    Data2.DatabaseName = App.Path + "\db1.mdb" 
    gabung 
End Function 
 
Function gabung() 
    Data1.RecordSource = "select * from pword" 
    Data2.RecordSource = "select * from staff order by staffname" 
    Data1.Refresh 
    Data2.Refresh 
End Function 
 
Function AddNodes() 
    With TreeView1.Nodes 
        .Clear 
        Data2.Refresh 
        x = 1 
        Dim nodX As Node 
        Do Until Data2.Recordset.EOF 
            Set nodX = TreeView1.Nodes.Add(, , , Data2.Recordset![staffname], 1, 2) 
        Data2.Recordset.MoveNext 
        Loop 
    End With 
End Function 
 
Function batal() 
    Text1 = "" 
    Text2 = "" 
End Function 
 
Function masuk() 
    If Text1 = "" Then 
     MsgBox "Login Not allow,Please enter Staff ID and Password", vbCritical, "Login System" 
        Text1.SetFocus 
    Else 
        cuba = cuba + 1 
        If cuba < 3 Then 
            cariid = "code='" & Text1 & "'and password='" & Text2 & "'" 
            Data1.Refresh 
            With Data1.Recordset 'login table 
            .FindFirst cariid 
    If .NoMatch Then 
    MsgBox "Invalid Staff ID and Password,Please try again!", vbCritical, "Error Login System" 
                batal 
                Text1.SetFocus 
85

 
 

            Else 
                hpinfofrm.Show 
            End If 
            End With 
        Else 
            End 
        End If 
    End If 
End Function 
 
Private Sub Command1_Click() 
    masuk 
End Sub 
 
Private Sub Command2_Click() 
    batal 
    Text1.SetFocus 
End Sub 
 
Private Sub Command4_Click() 
If MsgBox("Are sure want to Logout system,Please Press [YES] for Logout", vbDefaultButton2 + vbExclamation 
+ vbYesNo, "Exit System") = vbYes Then 
        End 
    Else 
        Exit Sub 
    End If 
End Sub 
 
Private Sub Form_Load() 
    batal 
    Label12 = Format(Date, "ddddd") 
    Label6 = Format(Time, "hh:mm:ss") 
    pangkalan 
    AddNodes 
End Sub 
 
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then masuk: SendKeys vbTab 
End Sub 
 
Private Sub Timer1_Timer() 
    Label6 = Format(Time, "hh:mm:ss") 
End Sub 
 
 
 
 
 
 
 

86

 
 

Hirer Information 
 
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 
Function pangkalan() 
    Data1.DatabaseName = App.Path + "\db1.mdb" 
    Data2.DatabaseName = App.Path + "\db1.mdb" 
    Data3.DatabaseName = App.Path + "\db1.mdb" 
    Data4.DatabaseName = App.Path + "\db1.mdb" 
    Data5.DatabaseName = App.Path + "\db1.mdb" 
    Data6.DatabaseName = App.Path + "\db1.mdb" 
    Data7.DatabaseName = App.Path + "\db1.mdb" 
    gabung 
End Function 
 
Function gabung() 
    Data1.RecordSource = "select * from customer order by customername" 
    Data2.RecordSource = "select * from personal" 
    Data3.RecordSource = "select * from alamat order by code" 
    Data4.RecordSource = "select * from poskod order by postcode" 
    Data5.RecordSource = "select * from negeri order by state" 
    Data6.RecordSource = "select * from fon" 
    Data1.Refresh 
    Data2.Refresh 
    Data3.Refresh 
    Data4.Refresh 
    Data5.Refresh 
    Data6.Refresh 
End Function 
 
Function simpancustomer() 'customer table 
    If Text1 = "" Then 
        Text1.SetFocus 
    Else 
        carikod = "customercode='" & Text1 & "'" 
        With Data1.Recordset 
        .FindFirst carikod 
        If .NoMatch Then 
            .AddNew 
        Else 
            .Edit 
        End If 
        ![customercode] = Text1 
        ![customername] = Format(Text2, ">") 
        .Update 
        Data1.Refresh 
        simpanpersonal 
        simpanalamat 
        simpanfon 
        bar 
        batal 
        kombokerja 
        kombobandar 
        kombonegeri 
        Text1.SetFocus 

87

 
 

        End With 
    End If 
End Function 
 
Function simpanpersonal() 'table subinfo 
    carikod = "code='" & Text1 & "'" 
    With Data2.Recordset 
    .FindFirst carikod 
    If .NoMatch Then 
        .AddNew 
    Else 
        .Edit 
    End If 
    ![code] = Text1 
    If IsDate(Text5) Then 
    ![Birthdate] = Format(Text5, "ddddd") 
    End If 
    ![newic] = Text10 
    ![oldic] = Text11 
    ![Gender] = Text12 
    ![occupation] = Text13 
    ![statu] = Text16 
    .Update 
    End With 
    Data2.Refresh 
End Function 
 
Function simpanalamat() 'table alamat 
    carikod = "code='" & Text1 & "'" 
    With Data3.Recordset 
    .FindFirst carikod 
    If .NoMatch Then 
        .AddNew 
    Else 
        .Edit 
    End If 
    ![code] = Text1 
    ![Address] = Text3 
    ![postcode] = Text4 
    .Update 
     Data3.Refresh 
    simpanposkod 
    End With 
End Function 
 
Function simpanposkod() 'table poskod 
    caripkod = "postcode='" & Text4 & "'" 
    With Data4.Recordset 
    .FindFirst caripkod 
    If .NoMatch Then 
        .AddNew 
    Else 
        .Edit 
    End If 

88

 
 

    ![postcode] = Text4 
    ![City] = Text15 
    Data4.Refresh 
    simpannegeri 
    .Update 
    End With 
End Function 
 
Function simpannegeri() 'table negeri 
    carict = "city='" & Text15 & "'" 
    With Data5.Recordset 
    .FindFirst carict 
    If .NoMatch Then 
        .AddNew 
    Else 
        .Edit 
    End If 
    ![City] = Text15 
    ![State] = Text16 
    .Update 
    End With 
    Data5.Refresh 
End Function 
 
Function simpanfon() 'table fon 
    carikod = "code='" & Text1 & "'" 
    With Data6.Recordset 
    .FindFirst carikod 
    If .NoMatch Then 
        .AddNew 
    Else 
        .Edit 
    End If 
    ![code] = Text1 
    ![housephone] = Format(Text6, ">") 
    ![handphone] = Format(Text7, ">") 
    ![officephone] = Format(Text8, ">") 
    ![fax] = Format(Text9, ">") 
    .Update 
    Data6.Refresh 
    End With 
End Function 
 
Function lihatcustomer() 'customer table 
    If Text1 = "" Then 
        Text1.SetFocus 
    Else 
        Data1.Refresh 
        carikod = "customercode='" & Text1 & "'" 
        With Data1.Recordset 
        .FindFirst carikod 
        If .NoMatch Then 
            Text10.SetFocus 
        Else 

89

 
 

            Text1 = ![customercode] 
            Text2 = Format(![customername], ">") 
            lihatpersonal 
            lihatalamat 
            lihatfon 
        End If 
        End With 
    End If 
End Function 
 
Function lihatpersonal() 'table personal 
    Data2.Refresh 
    carikod = "code='" & Text1 & "'" 
    With Data2.Recordset 
    .FindFirst carikod 
    If .NoMatch Then 
    Else 
        Text1 = Format(![code], ">") 
        Text5 = Format(![Birthdate], "ddddd") 
        Text10 = Format(![newic], ">") 
        Text11 = Format(![oldic], ">") 
        Text12 = ![Gender] 
        Text13 = Format(![occupation], ">") 
        Text14 = ![statu] 
    End If 
    End With 
    Data2.Refresh 
End Function 
 
Function lihatalamat() 'table alamat 
    Data3.Refresh 
    carikod = "code='" & Text1 & "'" 
    With Data3.Recordset 
    .FindFirst carikod 
    If .NoMatch Then 
    Else 
        Text1 = ![code] 
        Text3 = ![Address] 
        Text4 = ![postcode] 
        lihatposkod 
    End If 
    End With 
End Function 
 
Function lihatposkod() 'table poskod 
    caripkod = "postcode='" & Text4 & "'" 
    Data4.Refresh 
    With Data4.Recordset 
    .FindFirst caripkod 
    If .NoMatch Then 
    Else 
        Text4 = ![postcode] 
        Text15 = ![City] 
        lihatnegeri 

90

 
 

    End If 
    End With 
End Function 
 
Function lihatnegeri() 'table negeri 
    Data5.Refresh 
    carict = "city='" & Text15 & "'" 
    With Data5.Recordset 
    .FindFirst carict 
    If .NoMatch Then 
    Else 
        Text15 = ![City] 
        Text16 = ![State] 
    End If 
    End With 
End Function 
 
Function lihatfon() 'table fon 
    Data6.Refresh 
    carikod = "code='" & Text1 & "'" 
    With Data6.Recordset 
    .FindFirst carikod 
    If .NoMatch Then 
    Else 
        Text1 = ![code] 
        Text6 = Format(![housephone], ">") 
        Text7 = Format(![handphone], ">") 
        Text8 = Format(![officephone], ">") 
        Text9 = Format(![fax], ">") 
    End If 
    End With 
End Function 
 
Function lihatnewic() 'table personal 
    Data2.Refresh 
    carinic = "newic='" & Text10 & "'" 
    With Data2.Recordset 
    .FindFirst carinic 
    If .NoMatch Then         
    Else 
        Text1 = Format(![code], ">") 
        Text5 = Format(![Birthdate], "ddddd") 
        Text10 = Format(![newic], ">") 
        Text11 = Format(![oldic], ">") 
        Text12 = ![Gender] 
        Text13 = Format(![occupation], ">") 
        Text14 = ![statu] 
        carikod = "customercode='" & Text1 & "'" 
        Data1.Refresh 
        With Data1.Recordset 
        .FindFirst carikod 
        If .NoMatch Then 
        Else 
            Text1 = ![customercode] 

91

 
 

            Text2 = ![customername] 
            lihatalamat 
            lihatfon 
        End If 
        End With 
    End If 
    End With 
End Function 
 
Function kp() 
    n = Mid(Text10, 12) 
    If n = "" Then 
    Else 
        nokp = Left(Text10, 6) 
        tahun = Left(nokp, 2) 
        bln = Left(nokp, 4) 
        bulan = Right(bln, 2) 
        hari = Right(nokp, 2) 
        Text5 = Format(Str(hari) + "/" + Str(bulan) + "/" + Str(tahun), "ddddd") 
        If Right(Text10, 1) Mod 2 = 0 Then 
            Text12 = "FEMALE" 
        Else 
            Text12 = "MALE" 
        End If 
    End If 
End Function 
 
Function lihatoldic() 'table personal 
    Data2.Refresh 
    carioic = "oldic='" & Text11 & "'" 
    With Data2.Recordset 
    .FindFirst carioic 
    If .NoMatch Then 
        Text13.SetFocus 
    Else 
        If ![oldic] = "" Then 
        Else 
            Text1 = ![code] 
            Text5 = Format(![Birthdate], "ddddd") 
            Text10 = ![newic] 
            Text12 = ![Gender] 
            Text13 = Format(![occupation], ">") 
            Text14 = ![statu] 
            carinic = "customercode='" & Text1 & "'" 
            Data1.Refresh 
            With Data1.Recordset 
            .FindFirst carinic 
            If .NoMatch Then 
            Else 
                Text1 = ![customercode] 
                Text2 = ![customername] 
            End If 
            End With 
            lihatalamat 

92

 
 

            lihatfon 
        End If 
    End If 
    End With 
End Function 
 
Function lihatgrid() 
    Data7.RecordSource = "select CustomerCode,CustomerName,NewIc " & _ 
                        "from customer,personal " & _ 
                        "where customer.customercode=personal.code " & _ 
                        "and customername like '" & Text2 & "*'order by customername" 
    Data7.Refresh 
End Function 
 
Function hapus() 
If Text1 = "" Then 
MsgBox "Delete not allow! Please enter Customer Code", vbCritical, "DELETE CUSTOMER INFORMATION" 
        Text1.SetFocus 
    Else 
        cari = "customercode='" & Text1 & "'" 
        Data1.Refresh 
        With Data1.Recordset 
        .FindFirst cari 
        If .NoMatch Then 
            Text1 = "" 
            Text1.SetFocus 
        Else 
del = "Please Press [YES] for DELETE Customer Record" 
If MsgBox(del, vbDefaultButton2 + vbYesNo, "DELETE CUSTOMER RECORD") = vbYes Then 
                .Delete 
                cariic = "code='" & Text1 & "'" 
                Data2.Refresh 
                With Data2.Recordset 'personal 
                .FindFirst cariic 
                If .NoMatch Then 
                Else 
                    .Delete 
                    Data2.Refresh 
                End If 
                End With 
                Data6.Refresh 
                With Data6.Recordset 'fon 
                .FindFirst cariic 
                If .NoMatch Then 
                Else 
                    .Delete 
                    Data6.Refresh 
                End If 
                End With 
                batal 
                Text1.SetFocus 
            Else 
                batal 
                Text1.SetFocus 

93

 
 

            End If 
        End If 
        End With 
        Data1.Refresh 
    End If 
End Function 
 
Function kombobandar() 
    Combo1.Clear 
    Data7.RecordSource = "select * from negeri order by city" 
    Data7.Refresh 
    With Data7.Recordset 
        Do Until .EOF 
            Combo1.AddItem ![City] 
        .MoveNext 
        Loop 
    End With 
End Function 
 
Function kombonegeri() 
    Combo2.Clear 
    Data7.RecordSource = "select distinct state from negeri order by state" 
    Data7.Refresh 
    With Data7.Recordset 
        Do Until .EOF 
            Combo2.AddItem ![State] 
        .MoveNext 
        Loop 
    End With 
    Data7.RecordSource = "negeri" 
    Data7.Refresh 
End Function 
 
Function kombokerja() 
    Combo4.Clear 
    Data7.RecordSource = "select distinct occupation from personal order by occupation" 
    Data7.Refresh 
    With Data7.Recordset 
        Do Until .EOF 
            Combo4.AddItem Format(![occupation], ">") 
        .MoveNext 
        Loop 
    End With 
    Data7.RecordSource = "personal" 
    Data7.Refresh 
End Function 
 
Function batal() 
    Text1 = "" 
    Text2 = "" 
    Text3 = "" 
    Text4 = "" 
    Text5 = "" 
End Function 

94

 
 

Private Sub cmdCancel_Click() 
    batal 
    Text1.SetFocus 
End Sub 
 
Private Sub cmdDelete_Click() 
    hapus 
    Text1.SetFocus 
End Sub 
 
Private Sub cmdSave1_Click() 
    simpancustomer 
    Text1.SetFocus 
End Sub 
 
Private Sub cmdSearch_Click() 
    lihatgrid 
End Sub 
 
Private Sub Command1_Click() 
    lihatnewic 
End Sub 
 
Private Sub Command5_Click() 
    lihatgrid 
End Sub 
 
Private Sub Command7_Click() 
    Unload Me 
End Sub 
 
Private Sub DTPicker1_CloseUp() 
    Text5 = Format(DTPicker1, "dd/mm/yyyy") 
    Text11.SetFocus 
End Sub 
 
Private Sub Form_Load() 
    batal 
    DTPicker1 = Format(Date, "dd/mm/yyyy") 
    pangkalan 
End Sub 
 
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then lihatcustomer 
End Sub 
 
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 

95

 
 

Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then lihatposkod: SendKeys vbTab 
End Sub 
 
Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then lihatnegeri: SendKeys vbTab 
End Sub 
 
Private Sub Text1_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text2_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text3_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text4_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text5_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

96

 
 

Hire Purchase Main Information 
 
Function pangkalan() 
    Data1.DatabaseName = App.Path + "\db1.mdb" 
    Data2.DatabaseName = App.Path + "\db1.mdb" 
    Data3.DatabaseName = App.Path + "\db1.mdb" 
    Data4.DatabaseName = App.Path + "\db1.mdb" 
    Data5.DatabaseName = App.Path + "\db1.mdb" 
    Data6.DatabaseName = App.Path + "\db1.mdb" 
    Data7.DatabaseName = App.Path + "\db1.mdb" 
    Data8.DatabaseName = App.Path + "\db1.mdb" 
    Data9.DatabaseName = App.Path + "\db1.mdb" 'sql 
    gabung 
End Function 
 
Function gabung() 
    Data1.RecordSource = "select * from jualregno" 
    Data2.RecordSource = "select * from jual" 
    Data3.RecordSource = "select * from jualhp" 
    Data4.RecordSource = "select * from vehicle" 
    Data5.RecordSource = "select * from vehsub" 
    Data6.RecordSource = "select * from personal" 
    Data7.RecordSource = "select * from hpor" 
    Data8.RecordSource = "select * from customer" 
    Data1.Refresh 
    Data2.Refresh 
    Data3.Refresh 
    Data4.Refresh 
    Data5.Refresh 
    Data6.Refresh 
    Data7.Refresh 
    Data8.Refresh 
End Function 
 
Function lihatvehicle() 
 If Text1 = "" Then 
 MsgBox "Please enter Vehicle No", vbCritical, "Search Hire Purchase Information" 
        Text1.SetFocus 
    Else 
                lihathp 
                Text2.SetFocus 
       End If 
End Function 
 
Function carijualhp() 
    carisno = "saleno=" & Label19 & "" 
    Data3.Refresh 
    With Data3.Recordset 'jualhp table 
    .FindFirst carisno 
    If .NoMatch Then 
    Else 
        Label26 = 0 
        kadar = ![interestrate] 
        Label27 = Format(![hptype], ">") 

97

 
 

        Label22 = Format(![payment], "fixed") 'down payment 
        Label26 = ![hpmonth] 'no instalment or duration 
        Label23 = Format(Label21 ‐ Label22, "fixed") 'amount loan 
Label24 = Format(Label23 * kadar / 100 * Label26 / 12, "fixed") 'interest amount for monthly 
        Label25 = Format(Val(Label23) + Val(Label24), "fixed") 'total amount payable 
        Label29 = Format(Val(Label25) / Val(Label26), "####0.00") 'amount instalment 
    End If 
    End With 
End Function 
 
Function lihatpelanggan() 
    carickod = "customercode='" & Text2 & "'" 
    Data8.Refresh 
    With Data8.Recordset 'customer table 
    .FindFirst carickod 
    If .NoMatch Then 
    Else 
        Text3 = ![customername] 
        carikod = "code='" & Text2 & "'" 
        Data6.Refresh 
        With Data6.Recordset 
        .FindFirst carikod 
        If .NoMatch Then 
        Else 
            Label49 = ![oldic] 
        End If 
        End With 
    End If 
    End With 
End Function 
 
Function kiradownpayment() 
    jumjualresit = 0 
    Data9.RecordSource = "select * from jualresit" 
    Data9.Refresh 
    With Data9.Recordset 'jualresit table 
    Do Until .EOF 
        If ![saleno] = Label19 Then 
            jumjualresit = jumjualresit + Val(![amountpay]) 
        End If 
    .MoveNext 
    Loop 
    End With 
    Label51 = Format(Label22 ‐ jumjualresit, "fixed") 'checking down payment overdue 
End Function 
 
Function kirasudahbayar() 
    jumbayar = 0 
    Data7.Refresh 
    With Data7.Recordset 
    Do Until .EOF 
        If ![saleno] = Label19 Then 
            jumbayar = jumbayar + Val(![amount]) 
        End If 

98

 
 

    .MoveNext 
    Loop 
    End With 
    Label40 = Format(jumbayar, "####0.00") 
    If Label40 = "0.00" Then 
        Label30 = 0 
    Else 
        bulansudahbayar = 0 
        bulansudahbayar = Label40 / Label29 'check number instalment pay 
        Dim x, titik As Integer 
        titik = 1 
        x = 0 
        For x = 1 To Len(bulansudahbayar) ' untuk mencari kedudukan titik perpuluhan 
        If Mid(bulansudahbayar, x, 1) = "." Then 
            titik = x 
            Exit For 
        End If 
        Next 
        jawapan = Mid(bulansudahbayar, 1, titik ‐ 1) 'bulanan tanpa titik 
        If jawapan = "" Then 
            Label30 = bulansudahbayar 
        Else 
            Label30 = jawapan 
        End If 
    End If 
    jumkenabayar = 0 
    jumkenabayar = Format(bulandue * Label29 ‐ Label40, "fixed") 
    bulanhutang = bulandue ‐ Val(Label30) 
    If bulanhutang <= 0 Then 
        Label45 = 0 
    Else 
        Label45 = bulanhutang 'bulandue ‐ label30 
    End If 
    If jumkenabayar <= 0 Then 
        Label33 = "0.00" 
    Else 
        Label33 = Format(jumkenabayar, "fixed") 
    End If 
End Function 
 
Function kirajumlahlewat() 
    jumodue = 0 
    Data9.RecordSource = "select * from hpoverdue" 
    Data9.Refresh 
    With Data9.Recordset 'hpoverdue table 
    Do Until .EOF 
        If ![saleno] = Label19 Then 
            jumodue = jumodue + Val(![overdue]) 
        End If 
    .MoveNext 
    Loop 
    End With 
    If jumodue <= 0 Then 
        Label35 = "0.00" 

99

 
 

    Else 
        Label35 = Format(jumodue, "fixed") 
    End If 
End Function 
 
Function kirajumlahhutang() 
    Label31 = Format(Label25 ‐ Label40, "fixed") 'current balance     
    bakihutang = Val(Label31) + Val(Label35) 'total balance include overdue 
    If bakihutang <= 0 Then 
        Label44 = "0.00" 
    Else 
        Label44 = Format(bakihutang, "fixed") 
    End If 
        If Val(Label40) = 0 Then 
 bulandue = DateDiff("m", Label41, Date) + 1 'kira bulan hutang untuk bulanan jika m=0 kena +1 
        Else 
            bulandue = DateDiff("m", Label41, Date) 
        End If 
    End If 
    If bulandue > Val(Label26) Then 'cari jika bulandue besar daripada no instalment 
        bulandue = Label26 'jika bulandue besar jadi bulandue mesti =label26(no instalment) 
    End If 
     jumkenabayar = 0 
    jumkenabayar = Format(bulandue * Label29 ‐ Label40, "fixed") 'kira jumlah hutang selapas tolak bulanan 
telah bayar 
    bulanhutang = bulandue ‐ Val(Label30) 'kira berapa bulan telah lewat 
    If bulanhutang <= 0 Then 
        Label45 = 0 'jika bulan tidak lewat 
    Else 
        Label45 = bulanhutang 'bulan telah lewat 
    End If 
    If jumkenabayar <= 0 Then 
        Label33 = "0.00" 
    Else 
        Label33 = Format(jumkenabayar, "fixed") 
    End If 
End Function 
 
Function lihathp() 
    carisno = "saleno=" & Label19 & "" 
    Data2.Refresh 
    With Data2.Recordset 'jual table 
    .FindFirst carisno 
 If .NoMatch Then 
 MsgBox "No such Vehicle No,Please try again", vbExclamation, "Search HP Information" 
        Text1.SetFocus 
    Else 
        Label20 = Format(![saledate], "ddddd") 
        Label21 = Format(![saleprice], "fixed") 
        Text2 = ![customercode] 
        casisno = ![chassisno] 
        caricno = "chassisno='" & casisno & "'" 
        Data4.Refresh 
        With Data4.Recordset 'vehicle table 

100

 
 

        .FindFirst caricno 
        If .NoMatch Then 
        Else 
        End If 
        End With 
        lihatpelanggan 
        carijualhp 
        lihatmula 
        kirasudahbayar 
        kirajumlahlewat 
        kirajumlahhutang 
        lihatdue 
    End If 
    End With 
End Function 
 
Function lihatmula() 
    hari = Day(Label20) 
    bulan = Month(Label20) 
    tahun = Year(Label20) 
    If Label27 = "MUSIM" Then 'cari tarikh mula untuk bayaran musim 
        bulan = bulan + 6 
        If bulan > 12 Then 
            bulan = bulan ‐ 12 
            tahun = tahun + 1 
        End If 
    Else 
        bulan = bulan + 1 'cari tarikh mula untuk bayaran bulanan 
        If bulan > 12 Then 
            tahun = tahun + 1 
            bulan = 1 
        End If 
    End If 
    If bulan = 2 Or bulan = 4 Or bulan = 6 Or bulan = 9 Or bulan = 11 Then 
        If hari > 30 Then 
            hari = 30 
        End If 
    Else 
        If hari > 30 Then 
            hari = 31 
        End If 
    End If 
    If bulan = 2 Then 
        If tahun Mod 4 = 0 Then 
            If hari > 29 Then 
                hari = 29 
            End If 
        Else 
            If hari > 28 Then 
                hari = 28 
            End If 
        End If 
    End If 
    Label41 = Format(Str(hari) + "/" + Str(bulan) + "/" + Str(tahun), "ddddd") 'commencing date 

101

 
 

End Function 
 
Function batal() 
    Text1 = "" 
    Text2 = "" 
    Text3 = "" 
    Label19 = "" 
    Label20 = "" 
    Label21 = "" 
    Label22 = "" 
    Label23 = "" 
    Label24 = "" 
    Label25 = "" 
    Label26 = "" 
    Label27 = "" 
    Label28 = "" 
    Label29 = "" 
    Label30 = "0" 
    Label31 = "" 
    Label32 = "" 
    Label33 = "0" 
    Label35 = "0" 
    Label40 = "0" 
    Label41 = "" 
    Label44 = "0" 
    Label45 = "0" 
    Label49 = "" 
    Label51 = "" 
End Function 
 
Private Sub cmdCancel_Click() 
    batal 
    m1.Visible = False 
    m2.Visible = False 
    Text1.SetFocus 
End Sub 
 
Private Sub cmdSearch_Click() 
    If Text2 = "" And Text3 = "" And Text1 <> "" Then 
        Data9.RecordSource = "select jualhp.SaleNo,VehicleNo,SaleDate,CustomerName " & _ 
                                "from jualhp,jualregno,jual,customer " & _ 
                                "where jualhp.saleno=jualregno.saleno " & _ 
                                "and jualhp.saleno=jual.saleno " & _ 
                                "and saletype='" & "HP" & "' " & _ 
                                "and jual.customercode=customer.customercode " & _ 
                                "and vehicleno='" & Text1 & "'order by jual.saleno" 
    ElseIf Text1 = "" And Text3 = "" And Text2 <> "" Then 
        Data9.RecordSource = "select jualhp.SaleNo,VehicleNo,SaleDate,CustomerName " & _ 
                                "from jualhp,jualregno,jual,customer " & _ 
                                "where jualhp.saleno=jualregno.saleno " & _ 
                                "and jualhp.saleno=jual.saleno " & _ 
                                "and saletype='" & "HP" & "' " & _ 
                                "and jual.customercode=customer.customercode " & _ 
                                "and customer.customercode='" & Text2 & "'order by vehicleno" 

102

 
 

    ElseIf Text1 = "" And Text2 = "" And Text3 <> "" Then 
        Data9.RecordSource = "select jualhp.SaleNo,VehicleNo,SaleDate,CustomerName " & _ 
                                "from jualhp,jualregno,jual,customer " & _ 
                                "where jualhp.saleno=jualregno.saleno " & _ 
                                "and jualhp.saleno=jual.saleno " & _ 
                                "and saletype='" & "HP" & "' " & _ 
                                "and jual.customercode=customer.customercode " & _ 
                                "and customer.customername like'" & Text3 & "*'order by vehicleno" 
    Else 
        Data9.RecordSource = "select jualhp.SaleNo,VehicleNo,SaleDate,CustomerName " & _ 
                                "from jualhp,jualregno,jual,customer " & _ 
                                "where jualhp.saleno=jualregno.saleno " & _ 
                                "and jualhp.saleno=jual.saleno " & _ 
                                "and saletype='" & "HP" & "' " & _ 
                                "and jual.customercode=customer.customercode order by vehicleno" 
    End If 
    Data9.Refresh 
    bil = Data9.Recordset.RecordCount 
    For i = 1 To bil 
        m1.TextMatrix(i, 0) = i 
    Next 
    kotak 
End Sub 
 
Private Sub Command1_Click() 
    If Text1 = "" Then 
        MsgBox "Process not allow,Please enter Vehicle No", vbCritical, "HP Payment" 
        Text1.SetFocus 
    Else 
        hporfrm.Show 
    End If 
End Sub 
 
Private Sub Command2_Click() 
    hirerfrm.Show 
End Sub 
 
Private Sub Command3_Click() 
    stafffrm.Show 
End Sub 
 
Private Sub Command4_Click() 
    vehiclefrm.Show 
End Sub 
 
Private Sub Command5_Click() 
    insuranfrm.Show 
End Sub 
 
Private Sub Command6_Click() 
    jualfrm.Show 
End Sub 
 
 

103

 
 

Private Sub Command7_Click() 
    Unload Me 
End Sub 
 
Private Sub Command8_Click() 
    viewhpfrm.Show 
End Sub 
 
Private Sub Form_Load() 
    batal 
    pangkalan 
End Sub 
 
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then lihatvehicle 
End Sub 
 
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 
Private Sub Text1_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text2_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text3_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

104

 
 

Hire Purchase Payment 
 
Function pangkalan() 
    Data1.DatabaseName = App.Path + "\db1.mdb" 
    Data2.DatabaseName = App.Path + "\db1.mdb" 
    Data3.DatabaseName = App.Path + "\db1.mdb" 
    Data4.DatabaseName = App.Path + "\db1.mdb" 
    Data5.DatabaseName = App.Path + "\db1.mdb" 
    Data6.DatabaseName = App.Path + "\db1.mdb" 
    gabung 
End Function 
 
Function gabung() 
    Data1.RecordSource = "select * from jualregno" 
    Data2.RecordSource = "select * from jual" 
    Data3.RecordSource = "select * from jualhp" 
    Data4.RecordSource = "select * from vehicle" 
    Data5.RecordSource = "select * from vehsub" 
    Data6.RecordSource = "select * from personal" 
    Data1.Refresh 
    Data2.Refresh 
    Data3.Refresh 
    Data4.Refresh 
    Data5.Refresh 
    Data6.Refresh 
End Function 
 
Function carijualhp() 
    carisno = "saleno=" & Label19 & "" 
    Data3.Refresh 
    With Data3.Recordset 'jualhp table 
    .FindFirst carisno 
    If .NoMatch Then 
    Else 
        Label26 = 0 
        kadar = ![interestrate] 
        Label27 = Format(![hptype], ">") 
        Label22 = Format(![payment], "fixed") 'down payment 
        Label26 = ![hpmonth] 'no instalment or duration 
        Label23 = Format(Label21 ‐ Label22, "fixed") 'amount loan 
Label24 = Format(Label23 * kadar / 100 * Label26 / 12, "fixed") 'interest amount for monthly 
        Label25 = Format(Val(Label23) + Val(Label24), "fixed") 'total amount payable 
        Label29 = Format(Val(Label25) / Val(Label26), "####0.00") 'amount instalment 
    End If 
    End With 
End Function 
 
Function lihatpelanggan() 
    carickod = "customercode='" & Text2 & "'" 
    Data8.Refresh 
    With Data8.Recordset 'customer table 
    .FindFirst carickod 
    If .NoMatch Then 
    Else 

105

 
 

        Text3 = ![customername] 
        carikod = "code='" & Text2 & "'" 
        Data6.Refresh 
        With Data6.Recordset 
        .FindFirst carikod 
        If .NoMatch Then 
        Else 
            Label49 = ![oldic] 
        End If 
        End With 
    End If 
    End With 
End Function 
 
Function kiradownpayment() 
    jumjualresit = 0 
    Data9.RecordSource = "select * from jualresit" 
    Data9.Refresh 
    With Data9.Recordset 'jualresit table 
    Do Until .EOF 
        If ![saleno] = Label19 Then 
            jumjualresit = jumjualresit + Val(![amountpay]) 
        End If 
    .MoveNext 
    Loop 
    End With 
    Label51 = Format(Label22 ‐ jumjualresit, "fixed") 'checking down payment overdue 
End Function 
 
Function kirasudahbayar() 
    jumbayar = 0 
    Data7.Refresh 
    With Data7.Recordset 
    Do Until .EOF 
        If ![saleno] = Label19 Then 
            jumbayar = jumbayar + Val(![amount]) 
        End If 
    .MoveNext 
    Loop 
    End With 
    Label40 = Format(jumbayar, "####0.00")  
    If Label40 = "0.00" Then 
        Label30 = 0 
    Else 
        bulansudahbayar = 0 
        bulansudahbayar = Label40 / Label29 'check number instalment pay 
        Dim x, titik As Integer 
        titik = 1 
        x = 0 
        For x = 1 To Len(bulansudahbayar) ' untuk mencari kedudukan titik perpuluhan 
        If Mid(bulansudahbayar, x, 1) = "." Then 
            titik = x 
            Exit For 
        End If 

106

 
 

        Next 
        jawapan = Mid(bulansudahbayar, 1, titik ‐ 1) 'bulanan tanpa titik 
        If jawapan = "" Then 
            Label30 = bulansudahbayar 
        Else 
            Label30 = jawapan 
        End If 
    End If 
    jumkenabayar = 0 
    jumkenabayar = Format(bulandue * Label29 ‐ Label40, "fixed") 
    bulanhutang = bulandue ‐ Val(Label30) 
    If bulanhutang <= 0 Then 
        Label45 = 0 
    Else 
        Label45 = bulanhutang 'bulandue ‐ label30 
    End If 
    If jumkenabayar <= 0 Then 
        Label33 = "0.00" 
    Else 
        Label33 = Format(jumkenabayar, "fixed") 
    End If 
End Function 
 
Function kirajumlahlewat() 
    jumodue = 0 
    Data9.RecordSource = "select * from hpoverdue" 
    Data9.Refresh 
    With Data9.Recordset 'hpoverdue table 
    Do Until .EOF 
        If ![saleno] = Label19 Then 
            jumodue = jumodue + Val(![overdue]) 
        End If 
    .MoveNext 
    Loop 
    End With 
    If jumodue <= 0 Then 
        Label35 = "0.00" 
    Else 
        Label35 = Format(jumodue, "fixed") 
    End If 
End Function 
 
Function kirajumlahhutang() 
    Label31 = Format(Label25 ‐ Label40, "fixed") 'current balance     
    bakihutang = Val(Label31) + Val(Label35) 'total balance include overdue 
    If bakihutang <= 0 Then 
        Label44 = "0.00" 
    Else 
        Label44 = Format(bakihutang, "fixed") 
    End If 
 If Val(Label40) = 0 Then 
 bulandue = DateDiff("m", Label41, Date) + 1 'kira bulan hutang untuk bulanan jika m=0 kena +1 
        Else 
            bulandue = DateDiff("m", Label41, Date) 

107

 
 

        End If 
    End If 
    If bulandue > Val(Label26) Then 'cari jika bulandue besar daripada no instalment 
        bulandue = Label26 'jika bulandue besar jadi bulandue mesti =label26(no instalment) 
    End If  
    jumkenabayar = 0 
    jumkenabayar = Format(bulandue * Label29 ‐ Label40, "fixed") 'kira jumlah hutang selapas tolak bulanan 
telah bayar 
    bulanhutang = bulandue ‐ Val(Label30) 'kira berapa bulan telah lewat 
    If bulanhutang <= 0 Then 
        Label45 = 0 'jika bulan tidak lewat 
    Else 
        Label45 = bulanhutang 'bulan telah lewat 
    End If 
    If jumkenabayar <= 0 Then 
        Label33 = "0.00" 
    Else 
        Label33 = Format(jumkenabayar, "fixed") 
    End If 
End Function 
 
Function lihathp() 
    carisno = "saleno=" & Label19 & "" 
    Data2.Refresh 
    With Data2.Recordset 'jual table 
    .FindFirst carisno 
    If .NoMatch Then 
     MsgBox "No such Vehicle No,Please try again", vbExclamation, "Search HP Information" 
        Text1.SetFocus 
    Else 
        Label20 = Format(![saledate], "ddddd") 
        Label21 = Format(![saleprice], "fixed") 
        Text2 = ![customercode] 
        casisno = ![chassisno] 
        caricno = "chassisno='" & casisno & "'" 
        Data4.Refresh 
        With Data4.Recordset 'vehicle table 
        .FindFirst caricno 
        If .NoMatch Then 
        Else 
            Label28 = ![model] 
        End If 
        End With 
        lihatpelanggan 
        carijualhp 
        lihatmula 
        kirasudahbayar 
        kirajumlahlewat 
        kirajumlahhutang 
        lihatdue 
    End If 
    End With 
End Function 
 

108

 
 

Function batal() 
    Text1 = "" 
    Text2 = "" 
    Text3 = "" 
End Function 
 
Private Sub cmdCancel_Click() 
    batal 
    Text1.SetFocus 
End Sub 
 
Private Sub cmdSearch_Click() 
    If Text2 = "" And Text3 = "" And Text1 <> "" Then 
        Data9.RecordSource = "select jualhp.SaleNo,VehicleNo,SaleDate,CustomerName " & _ 
                                "from jualhp,jualregno,jual,customer " & _ 
                                "where jualhp.saleno=jualregno.saleno " & _ 
                                "and jualhp.saleno=jual.saleno " & _ 
                                "and saletype='" & "HP" & "' " & _ 
                                "and jual.customercode=customer.customercode " & _ 
                                "and vehicleno='" & Text1 & "'order by jual.saleno" 
    ElseIf Text1 = "" And Text3 = "" And Text2 <> "" Then 
        Data9.RecordSource = "select jualhp.SaleNo,VehicleNo,SaleDate,CustomerName " & _ 
                                "from jualhp,jualregno,jual,customer " & _ 
                                "where jualhp.saleno=jualregno.saleno " & _ 
                                "and jualhp.saleno=jual.saleno " & _ 
                                "and saletype='" & "HP" & "' " & _ 
                                "and jual.customercode=customer.customercode " & _ 
                          "and customer.customercode='" & Text2 & "'order by vehicleno" 
    ElseIf Text1 = "" And Text2 = "" And Text3 <> "" Then 
        Data9.RecordSource = "select jualhp.SaleNo,VehicleNo,SaleDate,CustomerName " & _ 
                                "from jualhp,jualregno,jual,customer " & _ 
                                "where jualhp.saleno=jualregno.saleno " & _ 
                                "and jualhp.saleno=jual.saleno " & _ 
                                "and saletype='" & "HP" & "' " & _ 
                                "and jual.customercode=customer.customercode " & _ 
                      "and customer.customername like'" & Text3 & "*'order by vehicleno" 
    Else 
        Data9.RecordSource = "select jualhp.SaleNo,VehicleNo,SaleDate,CustomerName " & _ 
                                "from jualhp,jualregno,jual,customer " & _ 
                                "where jualhp.saleno=jualregno.saleno " & _ 
                                "and jualhp.saleno=jual.saleno " & _ 
                                "and saletype='" & "HP" & "' " & _ 
                      "and jual.customercode=customer.customercode order by vehicleno" 
    End If 
    Data9.Refresh 
End Sub 
 
Private Sub Command2_Click() 
    hirerfrm.Show 
End Sub 
 
Private Sub Command3_Click() 
    stafffrm.Show 
End Sub 

109

 
 

Private Sub Command4_Click() 
    vehiclefrm.Show 
End Sub 
 
Private Sub Command5_Click() 
    insuranfrm.Show 
End Sub 
 
Private Sub Command6_Click() 
    jualfrm.Show 
End Sub 
 
Private Sub Command7_Click() 
    Unload Me 
End Sub 
 
Private Sub Form_Load() 
    batal 
    pangkalan 
End Sub 
 
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then lihatvehicle 
End Sub 
 
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 
Private Sub Text1_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text2_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text3_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
 
 
 
 
 
 
 
 
 

110

 
 

Sale Information 
 
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 
Function pangkalan() 
    Data1.DatabaseName = App.Path + "\db1.mdb" 
    Data2.DatabaseName = App.Path + "\db1.mdb" 
    Data3.DatabaseName = App.Path + "\db1.mdb" 
    Data4.DatabaseName = App.Path + "\db1.mdb" 
    Data5.DatabaseName = App.Path + "\db1.mdb" 
    Data6.DatabaseName = App.Path + "\db1.mdb" 
    Data7.DatabaseName = App.Path + "\db1.mdb" 
    Data8.DatabaseName = App.Path + "\db1.mdb" 
    gabung 
End Function 
 
Function gabung() 
    Data1.RecordSource = "select * from jual order by saleno" 
    Data2.RecordSource = "select * from jualno" 
    Data3.RecordSource = "select * from jualhp" 
    Data4.RecordSource = "select * from jualregno" 
    Data5.RecordSource = "select * from fee" 
    Data6.RecordSource = "select * from termcharge" 
    Data1.Refresh 
    Data2.Refresh 
    Data3.Refresh 
    Data4.Refresh 
    Data5.Refresh 
    Data6.Refresh 
End Function 
 
Function simpanjual() 
    If Text1 = "" Then 
        MsgBox "Saving not allow,Please enter Sale No", vbCritical, "Saving Sale Information" 
        Text1.SetFocus 
    Else 
        cariin = "saleno=" & Text1 & "" 
        With Data1.Recordset 'jual table 
        .FindFirst cariin 
        If .NoMatch Then 
            .AddNew 
            With Data2.Recordset 'jualno table 
            .Edit 
                ![InvoiceNo] = Text1 
            .Update 
            End With 
            Data2.Refresh 
        Else 
            .Edit 
        End If 
        ![saleno] = Text1 
        ![saledate] = Format(Text2, "dd/mm/yyyy") 
        ![chassisno] = Text4 
        ![cnote] = Text5 
        ![saletype] = Format(Text6, ">") 

111

 
 

        ![saleprice] = Text13 
        ![remark] = Text17 
        ![customercode] = Label18 
        .Update 
        Data1.Refresh 
        If Text6 = "HP" Then 
            simpanjualhp 
        End If 
        simpanjualregno 
        simpanfee 
        bar 
        batal 
        Text1.SetFocus 
        End With 
    End If 
End Function 
 
Function simpanjualhp() 
    cariin = "saleno=" & Text1 & "" 
    With Data3.Recordset 'jualhp table 
    .FindFirst cariin 
    If .NoMatch Then 
        .AddNew 
    Else 
        .Edit 
    End If 
    ![saleno] = Text1 
    ![hpmonth] = Text7 
    ![interestrate] = Format(Text8, "fixed") 
    ![hakmilik] = Format(Text9, "fixed") 
    ![payment] = Format(Text14, "fixed") 
    ![hptype] = Format(Text18, ">") 
    .Update 
    Data3.Refresh 
    End With 
End Function 
 
Public Sub simpanjualregno() 
    carien = "saleno=" & Text1 & "" 
    With Data4.Recordset 'jualregno table 
    .FindFirst carien 
    If .NoMatch Then 
        .AddNew 
    Else 
        .Edit 
    End If 
        ![saleno] = Text1 
        ![vehicleno] = Text3 
        .Update 
    Data4.Refresh 
    End With 
End Sub 
 
 

112

 
 

Function simpanfee() 
    cariin = "saleno=" & Text1 & "" 
    With Data5.Recordset 'fee table 
    .FindFirst cariin 
    If .NoMatch Then 
        .AddNew 
    Else 
        .Edit 
    End If 
    ![saleno] = Text1 
    ![regnfee] = Text10 
    ![noplate] = Text11 
    ![roadtax] = Text12 
    .Update 
    Data5.Refresh 
    End With 
End Function 
 
Function lihatjual() 
If Text1 = "" Then 
 MsgBox "Searching not allow,Please enter Sale No", vbCritical, "Searching Sale Information" 
        Text1.SetFocus 
    Else 
        cariin = "saleno=" & Text1 & "" 
        Data1.Refresh 
        With Data1.Recordset 'jual table 
        .FindFirst cariin 
        If .NoMatch Then 
             
        Else 
            Text1 = ![saleno] 
            Text2 = Format(![saledate], "dd/mm/yyyy") 
            Text4 = ![chassisno] 
            Text5 = ![cnote] 
            Text6 = Format(![saletype], ">") 
            Text13 = ![saleprice] 
            Text17 = ![remark] 
            Label18 = ![customercode] 
            lihatjualhp 
            lihatjualregno 
            lihatfee 
            lihatterm 
            lihatcustomer 
            lihatvehicle 
        End If 
        End With 
    End If 
End Function 
 
Function lihatjualhp() 
    cariin = "saleno=" & Text1 & "" 
    Data3.Refresh 
    With Data3.Recordset 'jualhp table 
    .FindFirst cariin 

113

 
 

    If .NoMatch Then 
    Else 
        Text1 = ![saleno] 
        Text7 = ![hpmonth] 
        Text8 = Format(![interestrate], "fixed") 
        Text9 = Format(![hakmilik], "fixed") 
        Text14 = Format(![payment], "fixed") 
        Text18 = Format(![hptype], ">") 
    End If 
    End With 
End Function 
 
Public Sub lihatjualregno() 
    carien = "saleno=" & Text1 & "" 
    Data4.Refresh 
    With Data4.Recordset 'jualregno table 
    .FindFirst carien 
    If .NoMatch Then 
    Else 
        Text1 = ![saleno] 
        Text3 = ![vehicleno] 
    End If 
    End With 
End Sub 
 
Function lihatfee() 
    cariin = "saleno=" & Text1 & "" 
    Data5.Refresh 
    With Data5.Recordset 'fee table 
    .FindFirst cariin 
    If .NoMatch Then 
    Else 
        Text1 = ![saleno] 
        Text10 = ![regnfee] 
        Text11 = ![noplate] 
        Text12 = ![roadtax] 
    End If 
    End With 
End Function 
 
Function lihatterm() 
    cariin = "hpmonth=" & Text7 & "" 
    Data6.Refresh 
    With Data6.Recordset 'termcharge table 
    .FindFirst cariin 
    If .NoMatch Then 
    Else 
        Text19 = ![kadar] 
    End If 
    End With 
End Function 
 
 
 

114

 
 

Function lihatcustomer() 
    Data8.RecordSource = "select CustomerCode,CustomerName,NewIc " & _ 
                        "from customer,personal " & _ 
                        "where customer.customercode=personal.code " & _ 
                        "and (customercode='" & Label18 & "'or newic='" & Text16 & "')" 
    Data8.Refresh 
    carikod = "(customercode='" & Label18 & "' or newic='" & Text16 & "')" 
    With Data8.Recordset 'customer,personal tabel 
    .FindFirst carikod 
    If .NoMatch Then 
    Else 
        Label18 = Format(![customercode], ">") 
        Text15 = ![customername] 
        Text16 = ![newic] 
    End If 
    End With 
End Function 
 
Function lihatinsuran() 
    Data8.RecordSource = "select vehicleno,nett,insregno.cnote " & _ 
                        "from insharga,insregno " & _ 
                        "where insharga.cnote=insregno.cnote " & _ 
                        "and insregno.cnote='" & Text5 & "'" 
    Data8.Refresh 
    carikod = "cnote='" & Text5 & "'" 
    Data8.Refresh 
    With Data8.Recordset 'insharga table 
    .FindFirst carikod 
    If .NoMatch Then 
    Else 
        Text3 = Format(![vehicleno]) 
        Label12 = Format(![nett], "fixed") 
    End If 
    End With 
End Function 
 
Function lihatvehicle() 
    Data8.RecordSource = "select chassisno,model " & _ 
                        "from vehicle " & _ 
                        "where chassisno='" & Text4 & "'" 
    Data8.Refresh 
    carikod = "chassisno='" & Text4 & "'" 
    With Data8.Recordset 'vehicle table 
    .FindFirst carikod 
    If .NoMatch Then 
    Else 
        Label7 = ![model] 
    End If 
    End With 
End Function 
 
Function hapus() 
If Text1 = "" Then 
MsgBox "Delete not allow! Please enter Invoice No", vbCritical, "DELETE INVOICE INFORMATION" 

115

 
 

        Text1.SetFocus 
    Else 
        caricn = "Invoice_no=" & Text1 & "" 
        With Data3.Recordset 
        .FindFirst caricn 
        If .NoMatch Then 
            Exit Function 
        Else 
            del = "Please Press [YES] for Delete this Record" 
If MsgBox(del, vbDefaultButton2 + vbYesNo, "DELETE INVOICE INFORMATION") = vbYes Then 
                .Delete 
            Else 
                Text1.Enabled = True 
                batal 
                Text1.SetFocus 
            End If 
        End If 
        End With 
        Data3.Refresh 
    End If 
End Function 
 
Function batal() 
    Text1 = "" 
    Text2 = "" 
    Text3 = "" 
    Text4 = "" 
    Text5 = "" 
End Function 
 
Private Sub cmdCancel_Click() 
    batal 
    Text1.SetFocus 
End Sub 
 
Private Sub cmdSave1_Click() 
    simpanjual 
End Sub 
 
Private Sub cmdSearch_Click() 
    If Text3 <> "" And Text16 = "" Then 'search by vehicleno 
       Data8.RecordSource = "select jual.SaleNo,SaleDate,SalePrice,VehicleNo,NewIc,CustomerName,CNote " & _ 
                            "from jual,jualregno,customer,vehicle,personal " & _ 
                            "where jual.customercode=customer.customercode " & _ 
                            "and jual.saleno=jualregno.saleno " & _ 
                            "and jual.chassisno=vehicle.chassisno " & _ 
                            "and customer.customercode=personal.code " & _ 
                            "and vehicleno='" & Text3 & "'order by jual.saleno desc" 
    ElseIf Text3 = "" And Text16 <> "" Then 'search by newic 
        Data8.RecordSource = "select jual.SaleNo,SaleDate,SalePrice,VehicleNo,NewIc,CustomerName,CNote " & 

                            "from jual,jualregno,customer,vehicle,personal " & _ 
                            "where jual.customercode=customer.customercode " & _ 
                            "and jual.saleno=jualregno.saleno " & _ 

116

 
 

                            "and jual.chassisno=vehicle.chassisno " & _ 
                            "and customer.customercode=personal.code " & _ 
                            "and newic='" & Text16 & "' order by jual.saleno desc" 
    Else 'search all 
        Data8.RecordSource = "select 
jual.SaleNo,SaleDate,SalePrice,VehicleNo,NewIc,CustomerName,CNote,saletype " & _ 
                            "from jual,jualregno,customer,vehicle,personal " & _ 
                            "where jual.customercode=customer.customercode " & _ 
                            "and jual.saleno=jualregno.saleno " & _ 
                            "and customer.customercode=personal.code " & _ 
                            "and jual.chassisno=vehicle.chassisno order by jual.saleno" 
    End If 
    Data8.Refresh 
End Sub 
 
Private Sub Command1_Click() 
    With jualresitfrm 
        .Text3 = Text1 
        .Label9 = Text13 
        .Text7 = Text3 
        .Label11 = Label18 
        .Label21 = Text15 
        .lihatbayar 
        .Show 
    End With 
End Sub 
 
Private Sub Command2_Click() 
    Text1 = Data2.Recordset![InvoiceNo] + 1 
End Sub 
 
Private Sub Command3_Click() 
    Data8.RecordSource = "select CustomerCode,NewIc,CustomerName " & _ 
                        "from customer,personal " & _ 
                        "where customer.customercode=personal.code " & _ 
                        "and customername like '" & Text15 & "*'order by customername" 
    Data8.Refresh 
End Sub 
 
Private Sub Command6_Click() 
    Text14 = Format(Text14, "fixed") 
    Label14 = Format(Text13 ‐ Text14, "fixed") 
    If Text7 = "" Then 
        Label15 = "0.00" 
    Else 
            Label15 = Format(Val(Label14) * Val(Text8) / 100 * Val(Text7) / 12, "fixed") 
    End If 
    Label19 = Format(Val(Label14) + Val(Label15), "fixed") 
End Sub 
Private Sub Command7_Click() 
    hpinfofrm.Show 
    Unload Me 
End Sub 
 

117

 
 

Private Sub DTPicker1_CloseUp() 
    Text2 = Format(DTPicker1, "dd/mm/yyyy") 
    Text5.SetFocus 
End Sub 
 
Private Sub Form_Load() 
    batal 
    DTPicker1 = Format(Date, "dd/mm/yyyy") 
    pangkalan 
End Sub 
 
Function tarikh() 
    If Text2 = "" Then 
    Else 
        Text2 = Format(Text2, "dd/mm/yyyy") 
        tahun = Year(Text2) 
        bulan = Month(Text2) 
        hari = Day(Text2) 
        bulan = bulan + 1 
        If bulan > 12 Then 
            tahun = tahun + 1 
            bulan = 1 
        End If 
        If bulan = 4 Or bulan = 6 Or bulan = 9 Or bulan = 11 Then 
            If hari > 30 Then 
                hari = 30 
            End If 
        End If 
        If bulan = 2 Then 
            If tahun Mod 4 = 0 Then 
                If hari > 28 Then 
                    hari = 29 
                End If 
            Else 
                If hari > 28 Then 
                    hari = 28 
                End If 
            End If 
        End If 
        Label63 = Format(tb, "dd/mm/yyyy") 
    End If 
End Function 
 
Private Sub mnukeluar_Click() 
    Unload Me 
End Sub 
 
Private Sub mnuresit_Click() 
    salepayfrm.Show 
End Sub 
 
Private Sub mnusimpan_Click() 
    simpanjual 
End Sub 

118

 
 

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then lihatjual 
End Sub 
 
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 
Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then lihatvehicle: SendKeys vbTab 
End Sub 
 
Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then lihatinsuran: SendKeys vbTab 
End Sub 
 
Private Sub Text1_KeyPress(KeyAscii As Integer) 
    Keyascii=asc(ucase(chr((keyascii)))) 
    End If 
End Sub 
 
Private Sub Text3_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text4_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text5_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

119

 
 

Staff Information 
 
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 
Function pangkalan() 
    Data1.DatabaseName = App.Path + "\db1.mdb" 
    gabung 
End Function 
 
Function gabung() 
    Data1.RecordSource = "select * from staff order by staffname" 
    Data2.RecordSource = "select * from personal order by newic" 
    Data3.RecordSource = "select * from alamat order by code" 
    Data4.RecordSource = "select * from poskod order by postcode" 
    Data5.RecordSource = "select * from negeri order by state" 
    Data6.RecordSource = "select * from fon order by code" 
    Data7.RecordSource = "select * from pword" 
    Data1.Refresh 
    Data2.Refresh 
    Data3.Refresh 
    Data4.Refresh 
    Data5.Refresh 
    Data6.Refresh 
    Data7.Refresh 
End Function 
 
Function simpanstaff() 'staff table 
    If Text1 = "" Then 
 MsgBox "Saving not allow! Please enter Code", vbCritical, "SAVING STAFF INFORMATION" 
        Text1.SetFocus 
    Else 
        carikod = "staffId='" & Text1 & "'" 
        With Data1.Recordset 
        .FindFirst carikod 
        If .NoMatch Then 
            .AddNew 
        Else 
            .Edit 
        End If 
        ![staffid] = Text1 
        ![staffname] = Format(Text2, ">") 
        ![salary] = Format(Text8, "fixed") 
        ![employdate] = Format(Text10, "ddddd") 
        .Update 
        End With 
        Data1.Refresh 
        simpanpersonal 
        simpanalamat 
        simpanfon 
        simpanpword 
        bar 
        batal 
        kombocity 
        kombostate 
        kombokerja 

120

 
 

    End If 
End Function 
 
Function simpanpersonal() 
    carikod = "code='" & Text1 & "'" 
    With Data2.Recordset 
    .FindFirst carikod 
    If .NoMatch Then 
        .AddNew 
    Else 
        .Edit 
    End If 
    ![code] = Text1 
    ![newic] = Text9 
    ![Birthdate] = Format(Text5, "ddddd") 
    ![Gender] = Format(Text12, ">") 
    ![occupation] = Format(Text13, ">") 
    ![statu] = Format(Text14, ">") 
    .Update     
    End With 
    Data2.Refresh 
End Function 
 
Function simpanalamat() 
    carikod = "code='" & Text1 & "'" 
    With Data3.Recordset 
    .FindFirst carikod 
    If .NoMatch Then 
        .AddNew 
    Else 
        .Edit 
    End If 
    ![code] = Text1 
    ![Address] = Text3 
    ![postcode] = Text4 
    .Update 
    End With 
    Data3.Refresh 
    simpanposkod 
End Function 
 
Function simpanposkod() 
    caripkod = "postcode='" & Text4 & "'" 
    With Data4.Recordset 
    .FindFirst caripkod 
    If .NoMatch Then 
        .AddNew 
    Else 
        .Edit 
    End If 
    ![postcode] = Text4 
    ![City] = Text15 
    .Update 
    End With 

121

 
 

    Data4.Refresh 
    simpannegeri 
End Function 
 
Function simpannegeri() 
    carict = "city='" & Text15 & "'" 
    With Data5.Recordset 
    .FindFirst carict 
    If .NoMatch Then 
        .AddNew 
    Else 
        .Edit 
    End If 
    ![City] = Text15 
    ![State] = Text16 
    .Update 
    End With 
    Data5.Refresh 
End Function 
 
Function simpanfon() 
    carikod = "code='" & Text1 & "'" 
    With Data6.Recordset 
    .FindFirst carikod 
    If .NoMatch Then 
        .AddNew 
    Else 
        .Edit 
    End If 
    ![code] = Text1 
    ![housephone] = Format(Text6, ">") 
    ![handphone] = Format(Text7, ">") 
    .Update 
    End With 
    Data6.Refresh 
End Function 
 
Function simpanpword() 
    carikod = "code='" & Text1 & "'" 
    With Data7.Recordset 
    .FindFirst carikod 
    If .NoMatch Then 
        .AddNew 
    Else 
        .Edit 
    End If 
    ![code] = Text1 
    ![Password] = Text11 
    .Update 
    Data7.Refresh 
    End With 
End Function 
 
 

122

 
 

Function lihatstaff() 'staff table 
    If Text1 = "" Then 
MsgBox "Searching not allow! Please enter Code", vbCritical, "SEARCHING STAFF INFORMATION" 
        Text1.SetFocus 
    Else 
        Data1.Refresh 
        carikod = "staffid='" & Text1 & "'" 
        With Data1.Recordset 
        .FindFirst carikod 
        If .NoMatch Then 
            Text2.SetFocus 
        Else 
            Text1 = ![staffid] 
            Text2 = Format(![staffname], ">") 
            Text8 = Format(![salary], "fixed") 
            Text10 = Format(![employdate], "ddddd") 
            lihatalamat 
            lihatfon 
            lihatpword 
        End If 
        End With 
    End If 
End Function 
 
Function lihatpersonal() 
    Data2.Refresh 
    cariic = "code='" & Text1 & "'" 
    With Data2.Recordset 
    .FindFirst cariic 
    If .NoMatch Then         
    Else 
        Text1 = ![code] 
        Text5 = Format(![Birthdate], "ddddd") 
        Text9 = Format(![newic], ">") 
        Text12 = ![Gender] 
    End If 
    End With 
    Data2.Refresh 
End Function 
 
Function lihatnewic() 
    Data2.Refresh 
    cariic = "newic='" & Text9 & "'" 
    With Data2.Recordset 
    .FindFirst cariic 
    If .NoMatch Then 
        kp 
    Else 
        Text1 = ![code] 
        Text5 = Format(![Birthdate], "ddddd") 
        Text9 = ![newic] 
        Text12 = ![Gender] 
        Data1.Refresh 
        With Data1.Recordset 

123

 
 

        .FindFirst carikod 
        If .NoMatch Then 
        Else 
            Text1 = ![staffid] 
            Text2 = Format(![staffname], ">") 
            Text8 = Format(![salary], "fixed") 
            Text10 = Format(![employdate], "ddddd") 
        End If 
        End With 
    End If 
    End With 
    Data2.Refresh 
End Function 
 
Function lihatalamat() 
    Data3.Refresh 
    carikod = "code='" & Text1 & "'" 
    With Data3.Recordset 
    .FindFirst carikod 
    If .NoMatch Then         
    Else 
        Text1 = ![code] 
        Text3 = ![Address] 
        Text4 = ![postcode] 
        lihatposkod 
    End If 
    End With 
End Function 
 
Function lihatposkod() 
    caripkod = "postcode='" & Text4 & "'" 
    Data4.Refresh 
    With Data4.Recordset 
    .FindFirst caripkod 
    If .NoMatch Then         
    Else 
        Text4 = ![postcode] 
        Text15 = ![City] 
        lihatnegeri 
    End If 
    End With 
End Function 
 
Function lihatnegeri() 
    Data5.Refresh 
    carict = "city='" & Text15 & "'" 
    With Data5.Recordset 
    .FindFirst carict 
    If .NoMatch Then 
    Else 
        Text15 = ![City] 
        Text16 = ![State] 
    End If 
    End With 

124

 
 

    Data5.Refresh 
End Function 
 
Function lihatfon() 
    Data6.Refresh 
    carikod = "code='" & Text1 & "'" 
    With Data6.Recordset 
    .FindFirst carikod 
    If .NoMatch Then         
    Else 
        Text1 = ![code] 
        Text6 = Format(![housephone], ">") 
        Text7 = Format(![handphone], ">") 
    End If 
    End With 
End Function 
 
Function lihatpword() 
    Data7.Refresh 
    carikod = "code='" & Text1 & "'" 
    With Data7.Recordset 
    .FindFirst carikod 
    If .NoMatch Then         
    Else 
        Text1 = ![code] 
        Text11 = ![Password] 
    End If 
    End With 
End Function 
Function lihatgrid() 
 
Function hapus() 
If Text1 = "" Then 
MsgBox "Delete not allow! Please enter Staff ID", vbCritical, "DELETE STAFF INFORMATION" 
        Text1.SetFocus 
    Else 
        cari = "staffid='" & Text1 & "'" 
        Data1.Refresh 
        With Data1.Recordset 
        .FindFirst cari 
        If .NoMatch Then 
            Text1 = "" 
            Text1.SetFocus 
        Else 
            del = "Please Press [YES] for DELETE Staff Record" 
   If MsgBox(del, vbDefaultButton2 + vbYesNo, "DELETE STAFF RECORD") = vbYes Then 
                .Delete 
                batal 
                Text1.SetFocus 
            Else 
                batal 
                Text1.SetFocus 
                Exit Function 
            End If 

125

 
 

        End If 
        End With 
        Data1.Refresh 
    End If 
End Function 
 
Function kombocity() 
    Combo1.Clear 
    Data5.Refresh 
    With Data5.Recordset 
    Do Until .EOF 
        Combo1.AddItem ![City] 
    .MoveNext 
    Loop 
    End With 
End Function 
 
Function kombostate() 
    Combo2.Clear 
    Data5.RecordSource = "select distinct state from negeri order by state" 
    Data5.Refresh 
    With Data5.Recordset 
    Do Until .EOF 
        Combo2.AddItem ![State] 
    .MoveNext 
    Loop 
    End With 
    Data5.RecordSource = "select * from negeri order by city" 
    Data5.Refresh 
End Function 
 
Function kombokerja() 
    Combo4.Clear 
    Data2.RecordSource = "select distinct occupation from personal order by occupation" 
    Data2.Refresh 
    With Data2.Recordset 
    Do Until .EOF 
        Combo4.AddItem ![occupation] 
    .MoveNext 
    Loop 
    End With 
    Data2.RecordSource = "select * from personal" 
    Data2.Refresh 
End Function 
 
Function batal() 
    Text1 = "" 
    Text2 = "" 
    Text3 = "" 
    Text4 = "" 
    Text5 = "" 
End Function 
 
 

126

 
 

Private Sub cmdCancel_Click() 
    batal 
End Sub 
 
Private Sub cmdDelete_Click() 
    hapus 
End Sub 
 
Private Sub cmdSave1_Click() 
    simpanstaff 
End Sub 
 
Private Sub cmdSearch_Click() 
    lihatgrid 
End Sub 
 
Private Sub Command5_Click() 
    lihatgrid 
End Sub 
 
Private Sub Command7_Click() 
    Unload Me 
End Sub 
 
Private Sub DTPicker1_CloseUp() 
    Text5 = Format(DTPicker1, "dd/mm/yyyy") 
End Sub 
 
Private Sub DTPicker2_CloseUp() 
    Text10 = Format(DTPicker2, "ddddd") 
End Sub 
 
Private Sub Form_Load() 
    batal 
    DTPicker1 = Format(Date, "dd/mm/yyyy") 
    DTPicker2 = Format(Date, "dd/mm/yyyy") 
    pangkalan 
    kombokerja 
    kombocity 
    kombostate 
End Sub 
 
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then lihatstaff 
End Sub 
 
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 

127

 
 

Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then lihatposkod: SendKeys vbTab 
End Sub 
 
Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 
Private Sub Text1_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text2_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text3_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text4_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text5_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

128

 
 

Vehicle Information 
 
Function pangkalan() 
    Data1.DatabaseName = App.Path + "\db1.mdb" 
    Data2.DatabaseName = App.Path + "\db1.mdb" 
    Data3.DatabaseName = App.Path + "\db1.mdb" 
    gabung 
End Function 
 
Function gabung() 
    Data1.RecordSource = "select * from vehicle" 
    Data2.RecordSource = "select * from vehsub" 
    Data1.Refresh 
    Data2.Refresh 
End Function 
 
Function simpanvehicle() 
    If Text6 = "" Then 
    Else 
        cari = "chassisno='" & Text6 & "'" 
        With Data1.Recordset 'vehicle table 
        .FindFirst cari 
        If .NoMatch Then 
            .AddNew 
        Else 
            .Edit 
        End If 
            ![model] = Format(Text3, ">") 
            ![colour] = Format(Text4, ">") 
            ![chassisno] = Text6 
            ![engineno] = Text7 
            ![yearmake] = Text8 
            ![cc] = Text9 
            .Update 
            Data1.Refresh 
            simpanvehsub 
            bar 
            batal 
            kombomake 
            kombomodel 
            kombocolor 
            kombobody 
            Text2.SetFocus 
        End With 
    End If 
End Function 
 
Function simpanvehsub() 
    cari = "model='" & Text3 & "'" 
    With Data2.Recordset 'vehsub 
    .FindFirst cari 
    If .NoMatch Then 
        .AddNew 
    Else 

129

 
 

        .Edit 
    End If 
        ![body] = Text1 
        ![make] = Text2 
        ![model] = Text3 
        ![oil] = Text5 
        .Update 
        Data2.Refresh 
    End With 
End Function 
 
Function lihatvehicle() 
    If Text6 = "" Then 
        Text6.SetFocus 
    Else 
        caricn = "chassisno='" & Text6 & "'" 
        With Data1.Recordset 'vehicle 
        .FindFirst caricn 
        If .NoMatch Then 
            Text7.SetFocus 
        Else 
            Text3 = ![model] 
            Text4 = ![colour] 
            Text6 = ![chassisno] 
            Text7 = ![engineno] 
            Text8 = ![yearmake] 
            Text9 = ![cc] 
            lihatvehsub 
            Text7.SetFocus 
        End If 
        End With 
    End If 
End Function 
 
Function lihatvehsub() 
    cari = "model='" & Text3 & "'" 
    Data2.Refresh 
    With Data2.Recordset 'vehsub 
    .FindFirst cari 
    If .NoMatch Then 
    Else 
        Text1 = ![body] 
        Text2 = ![make] 
        Text3 = ![model] 
        Text5 = ![oil] 
    End If 
    End With 
End Function 
 
Function hapus() 
    If Text6 = "" Then 
  MsgBox "Delete not allow, Please enter Chassis No", vbCritical, "Delete Vehicle Information" 
        Text6.SetFocus 
    Else 

130

 
 

        del = "Are you sure Delete this record,Please [YES] for Delete this record" 
        If MsgBox(del, vbDefaultButton2 + vbYesNo + vbInformation, "") = vbYes Then 
            cariveh = "chassisno='" & Text6 & "'" 
            Data1.Refresh 
            With Data1.Recordset 
            .FindFirst cariveh 
            If .NoMatch Then 
            Else 
                .Delete 
                Data1.Refresh 
            End If 
            End With 
        Else 
            batal 
            Text1.SetFocus 
        End If 
    End If 
End Function 
 
Function kombobody() 
    Combo1.Clear 
    Data3.RecordSource = "select distinct body from vehsub order by body" 
    Data3.Refresh 
    With Data3.Recordset 
    Do Until .EOF 
        Combo1.AddItem ![body] 
    .MoveNext 
    Loop 
    End With 
End Function 
 
Function kombomake() 
    Combo2.Clear 
    Data3.RecordSource = "select distinct make from vehsub order by make" 
    Data3.Refresh 
    With Data3.Recordset 
    Do Until .EOF 
        Combo2.AddItem ![make] 
    .MoveNext 
    Loop 
    End With 
End Function 
 
Function kombomodel() 
    Combo3.Clear 
    Data3.RecordSource = "select * from vehsub order by model" 
    Data3.Refresh 
    With Data3.Recordset 
    Do Until .EOF 
    If ![make] = Text2 Then 
        Combo3.AddItem ![model] 
    End If 
    .MoveNext 
    Loop 

131

 
 

    End With 
End Function 
 
Function kombocolor() 
    Combo4.Clear 
    Data3.RecordSource = "select distinct colour from vehicle order by colour" 
    Data3.Refresh 
    With Data3.Recordset 
    Do Until .EOF 
        Combo4.AddItem ![colour] 
    .MoveNext 
    Loop 
    End With 
End Function 
 
Function batal() 
    Text1 = "" 
    Text2 = "" 
    Text3 = "" 
    Text4 = "" 
    Text5 = "" 
End Function 
 
Private Sub cmdCancel_Click() 
    batal 
End Sub 
 
Private Sub cmdDelete_Click() 
    hapus 
End Sub 
 
Private Sub cmdSave1_Click() 
    simpanvehicle 
End Sub 
 
Private Sub cmdSearch_Click() 
    If Text3 <> "" Then 
        Data3.RecordSource = "select ChassisNo,Model,EngineNo,YearMake,CC " & _ 
               "from vehicle  where model='" & Text3 & "'order by model" 
    Else 
Data3.RecordSource = "select ChassisNo,Model,EngineNo,YearMake,CC from vehicle order by model" 
    End If 
    Data3.Refresh 
End Sub 
 
Private Sub Command7_Click() 
    Unload Me 
End Sub 
 
Private Sub Form_Load() 
    batal 
    pangkalan 
    kombobody 
    kombomake 

132

 
 

    kombocolor 
End Sub 
 
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) ' 
    If KeyCode = 13 Then Text3.SetFocus 
End Sub 
 
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 
Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 
Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer) 
    If KeyCode = 13 Then SendKeys vbTab 
End Sub 
 
Private Sub Text1_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text2_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text3_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text4_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
Private Sub Text5_KeyPress(KeyAscii As Integer) 
    KeyAscii = Asc(UCase(Chr((KeyAscii)))) 
End Sub 
 
 
 
 
 
 
 
 
 

133

You might also like