Transcript
Page 1: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

7/10/2015

Stock Management System Globsyn Summer School Project

A pl/sql Project

Using Oracle Forms Document sign date :Jul 17, 2015

Page 2: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 1

Group Members Soumyabrata Bhattacharyya, Jalpaiguri Govt. Engg. College

121010110046

Aritra Dutta, Jalpaiguri Govt. Engg. College

121010110007

Tanmay Sarkar, Jalpaiguri Govt. Engg. College

121010110113

Shailik Sarkar, Jalpaiguri Govt. Engg. College

121010110038

Arup Kumar Bala, Jalpaiguri Govt. Engg. college

121010110011

Document sign date :Jul 17, 2015

Page 3: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 2

Contents Contents ............................................................................................ 2

Acknowledgment ............................................................................. 4

o GROUP MEMBERS : ............................................................... 4

Project Objective .............................................................................. 5

The proposed system has the following objectives: ...................... 6

Project Scope .................................................................................... 6

Requirement Specification ............................................................... 8

o Domain Description : ................................................................ 8

o Problem Definition : .................................................................. 8

o Functional Requirements : ...................................................... 10

FUNCTIONALITIES OF OPERATOR: .............................. 11

FUNCTIONALITIES OF ADMINISTRATOR: .................. 11

o Hardware/Software Requirements : ........................................ 12

HARDWARE REQUIREMENTS: ........................................ 12

SOFTWARE REQUIREMENTS: ......................................... 12

Database Design ............................................................................. 13

o ER Diagram: ............................................................................ 13

o Table Description: ................................................................... 14

Document sign date :Jul 17, 2015

Page 4: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 3

Application Work-flow .................................................................. 16

Screenshots ..................................................................................... 18

Future Scope of Improvements ...................................................... 27

Code................................................................................................ 28

Certificate ....................................................................................... 53

o Certificate: ............................................................................... 53

o Certificate: ............................................................................... 54

o Certificate: ............................................................................... 55

o Certificate: ............................................................................... 56

o Certificate: ............................................................................... 57

Document sign date :Jul 17, 2015

Page 5: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 4

Acknowledgment

We take this opportunity to express our profound gratitude and

deep regards to our faculty Mr. Suman Aich for his exemplary

guidance, monitoring and constant encouragement throughout

the course of this project. The blessing, help and guidance given

by him to us, every now and then, shall carry us a long way in

the journey of life on which we are about to embark.

We had an outstanding team with excellent teamwork all

through the project and I am sure that each one of us will be

obliged to their fellow team mates for the mutual understanding

they showed and also for the valuable information shared by

them in their respective fields. I am grateful for their

cooperation during the period of this assignment.

o GROUP MEMBERS : NAME FORM NO.

Soumyabrata Bhattacharyya 26949

Aritra Dutta 26970

Tanmay Sarkar 28774

Shailik Sarkar 27687

Arup Kumar Bala 27744

Document sign date :Jul 17, 2015

Page 6: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 5

Project Objective “Adequate inventories facilitates production activities and help

to customer’s satisfaction by providing good service.”

Stock management is the function of understanding the stock

mix of a company and the different demands on that stock. The

demands are influenced by both external and internal factors and are

balanced by the creation of purchase order requests to keep supplies

at a reasonable or prescribed level.

A stock management system is the back bone of every retail concern,

whether it's a bricks and grocery shop, e-Commerce website, factory

outlet or pop-up concession.

From the smallest retail business to the biggest superstore, effective

stock control is essential. Finding the right products to sell, when to

sell them and not to be left with merchandise that's eating away at

your profit is a challenge for any business. Even the initial, small

holdover of old stock can cause a knock on effect when you have

an inefficient stock control system. Stock Management System

related software cum database is used to describe in detail the

products sold by a company. A transaction history is maintained

automatically so that detailed review of the receipts and

shipments of products is available throughout the system.

Document sign date :Jul 17, 2015

Page 7: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 6

The proposed system has the following objectives:

o The proposed system can be utilized for easy documenting

and accessing various data carriers such as forms, reports,

records etc.

o Automation makes the system to be user-friendly

o Accuracy and security of data will be more comfortable for

the organization.

o The proposed system must be menu oriented and should

provide user-friendly environment by including GUI tools

o Order management helps companies to avoid running out

of products or tying up too much capital in inventory.

o Service management

o The proposed software have two kinds of user,

Administrator and User.

Project Scope This Stock Management System is basically a manual system in

which the administrator (i.e., the HR, MD or the Manager) has to

fill up the details (both personal and professional) of the new

employees who will be working as the operators for this system.

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 8: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 7

The operator will be the prime user of this system whose job will

be to keep the stock organized and up to the level so that the

demands of the retailers are full filled without any delay and if

the stock is not up to level to fulfil the demands then his job will be

to place suitable order to the suppliers for the stock required.

The system helps the operator to create legitimate bills for the

retailers. So, this system makes this task very easy for the

operator and allows him to keep track on each and every import

and export of the stock.

This system helps a company to maintain the stock transaction

record as well as other details and also allows the operator to modify

the record.

This reduces the manual effort needed to manage the stock. This has

the following features:-

24 X 7 availability.

Better component design to get better performance at peak time.

Professional look and feel.

Secured data driven role based access.

Document sign date :Jul 17, 2015

Page 9: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 8

Requirement Specification

o Domain Description :

Stock management is an integral part of a successful business. Stock typically consist of goods, raw materials and finished products. Each of these elements translates into money for the business owner. The key to profitability is a carefully balanced stock. Stock management system provides you with accurate information on all aspects of stock, to manage and control stock in the most cost-effective manner possible. The main objective of stock management is keeping the customers satisfied by maintaining delivery schedules. A complete stock management solution includes controlling stock, tracking items, ensuring adequate supplies, increasing warehouse productivity, and significantly reducing paper flow. It provides the ability to track each step in the stock life cycle from the time you create a purchase order for your supplier to the moment you ship the product to your costumer.

o Problem Definition :

Stock management system is an offline Inventory Management

System used by all the operators (including the administrator) in

different warehouse of the company.

Document sign date :Jul 17, 2015

Page 10: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 9

The literary meaning of the word “Stock” is pile of goods. Every

enterprise needs stock for smooth running of its activities. It serves

as a link between production and distribution process. The

unforeseen fluctuation in demand and supply of goods also

necessitates the need for inventory. It also provides a cushion for

future price fluctuations.

The purpose of stock management is to ensure availability of

materials in sufficient quality and quantity as and when

required and also to minimize investment in inventories. Thus it

is very essential to have proper control and management of stock.

Inventories play vital role in operation of real estate’s industry. The

inventory ensures operational smoothness. In almost all the

organizations the substantial part of capital is invested in

inventories. Inventory refers to stock of products a firm that is for

sale and also the components that make up the product. Usually,

inventories constitute a major portion, about 60% of total current

assets. Hence, management of stock becomes crucial to the

successful management of overall working capital of a business

enterprise.

The management of stock is necessary for prevention of leakage,

spoilage, deterioration, obsolescence, wastage of materials.

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 11: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 10

It aims at improving material handling, saving in material cost,

increased production and large profits. The stock management is a

part of planning budget, which often falls within financial area. The

financial manager is playing an important role in determining the

nature performance of inventories. This system has enriched UI so

that the operator did not feel any operational difficulties.

o Functional Requirements :

The project title is Stock Management System. We have tried our

best to make the complicated process of Stock Management System

as simple as possible using Relational Database Technique &

Menu oriented interface.

We have tried to design the Project in such a way that user may not

have any difficulty in using this package & further expansion is

possible without much effort. Even though we cannot claim that

this work to be entirely exhaustive.

The main purpose of our exercise is to maintain the track of each

item present in the inventory in computerized way rather than

manually which is time consuming. This project will help the

company to identify the storage level of each item and thereby

ensure better service to the retailer by improving the former.

Document sign date :Jul 17, 2015

Page 12: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 11

There are two users who can access this Stock Management

System. It can be accessed both by the administrator (i.e., the HR,

MD or the Manager) and the Operator.

FUNCTIONALITIES OF OPERATOR: The functionalities of operators are the following

Operator will be able to add, update retailer information.

Operator can view details of retailers.

They will be able to delete retailers.

Operator will be able to see the details of supplier.

They will be able to add new supplier details.

They will be able to update supplier details.

Operator will be able to order new item according to demand.

Operator will be able to generate bill for the ordered item.

Operator will be able to add new batch of items to stock.

They can also remove batch from stock.

FUNCTIONALITIES OF ADMINISTRATOR:

Maintain debit history

Add or create operator

Provide username and password to user.

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 13: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 12

Update warehouse details.

View the sale records of different stores.

View retailer and supplier details.

See Transaction

Only admin can access this functionalities by proper authorization (username and password).

o Hardware/Software Requirements :

HARDWARE REQUIREMENTS: PROCESSORS : COREi3

RAM 2GB MINIMUM

HARDDISK :-500 GB

SOFTWARE REQUIREMENTS: OPERATING SYSTEM :- WINDOWS XP

PLATFORM :- ORACLE 10G EXPRESS EDITION

BROWSER:-Mozilla Firefox 2 or 2.2.0 above

MICROSOFT WORD

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 14: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 13

Database Design o ER Diagram:

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 15: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 14

o Table Description:

Entity Attributes Description Data Type & Length Null

Staff Staff ID Name FName LName DOB Address SEX PhoneNo roleID

username

password

Uniquely identifies a member staff First Name of Staff Last Name of Staff Date of Birth of Staff Home Address or contact address Gender Male M or Femal F Contact Phone Number Job Title ID, Foreign Key Unique to user, for login function Unique, encrypted,

5 varchar 15 varchar 15 varchar Date 30 varchar 1 char {M/F} 10 Digit number 5 var char, F-key 15 var char 8 to 15 var char

No No No No No No No N0

Role roleID

roleName

Descr

Uniquely identifies a staff role Job title of the staff Description of role

5 var char 15 var char 30 var char

No No No

Retailer

CID BRegNo Name Fname Lname Address Phone Email Staff ID

Uniquely identifies customer Customer PAN resgister Number Firsta name of customer Last name of customer Address of customer retail shop Contact phone of customer Email address of customer Staff who registers customer

5 var char 10 digit 15 var char 15 var char 30 var char 10 digit 15 var cha 5 varchar

No No No No No No Yes No

Order OrderID Staff ID CID ODate ErroMsg

Uniquely identifies each order Identifies the sales staff Customer id who orders Incoming order date Error message if happens

10 digit number 5 var char 5 var char Date 30 var char

No No No No Yes

Warehouse War_ID War_Name War_Addr Max_Cap Cnt_Items Bank_Balance

Uniquely Identifies Each warehouse Name of the warehouse Address of the warehouse Maximum capacity of the warehouse Count of items Bance in bank

Number 30 varchar2 100 varchar2 Number Number Number

No Yes No No No No

ODetail

OrderID BillNo ODetailID ProductID USP Size

OrdQuant DelQuant Discount Total DelDate OrdDate

Identifies order that came in Identifies the bill generated Identifies id for order details Identifies each product Unit price of each product unit Size of product Quantity of product ordered Quantity of product delivered Discounts involved Total amount of bill Order dispatch date Date when order came

10 digit number 10 digit number 5 var char 10 var char 5 digit S, M, L 6 digit 6digit number 3 digit number 7digit number Date Date

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 16: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 15

Payment BillNo Pay Type CrAmount CrDate DrAmount DrDate Balance

Identifies payment bill number Payment type, cash or bank Credited amount Credit date Debited amount Debit date Total balance (derived)

10 digit number 10 var char 7 digit number Date 7 digit number Date 7 digit number

No No Yes Yes Yes Yes

No

Bill_Generate Bill_ID Bill_Date Ret_ID Ret_Name Total_price Pay_Type

Unique ID of the bill Date of the bill generated Retailer ID of the retailer the bill belongs to Name of the retailer, the bill belongs to Total price in the bill Payment type that the retailer prefers

Number Date Number 50 varchar2 Number 10 varchar2

No Yes Yes Yes Yes Yes

Item ItemID PName PDescr CatID supplierID QPerUnit Uprice USP Uweight Usize Discount UInStock UInOrder ReOrLevel Note

Uniquely identifies product Product Name Product Description Identifies product category Identifies product supplier Product quantity per unit Product unit price Unit Selling price Product unit weight Product unit size, S, M, L Discount offered by supplier Product units in stock units in order from supplier Product margin for re-ordering Some note for product

10 var char 15 var char 50 var char 5 var char 5 var char 4 digit number 4 digit number 4 digit number 4 digit number 1 var char (S,M,L) 3 digit number Number Number Number 50 var char

No No No No No No No No No No Yes No No No Yes

Category CatID CatName Desc

identifies product category

name of the category category

description

5 var char 15 var char 50 var char

No No No

Batch Batch_ID Item_ID Item_Name No_of_Items

Unique ID of each batch Item ID of the items in the batch Item names of the items in the Batch Number of items in the batch

Number Number 50 varchar2 Number

Yes Yes Yes Yes

Supplier SupplierID ComName ConfName ConlName ConTitle Address Phone Fax Email PayMeth DisType

Uniquely identifies each supplier Supplier company name Contact person first name Contact person last name Cont person job title Address

of supplier Suppliers’ phone

number Fax number Email address Payment methods Discount type

5 var char 15 var char 15 var char 15 var char 10 var char 30 var char 10 digit number Number 30 varchar Var char 3 digit number

No No No No No No No Yes Yes No Yes

Document sign date :Jul 17, 2015

Page 17: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 16

Application Work-flow

TRANSACTION_HISTORY

Login

Admin Operator

EDIT_ADMIN

(Edit Personal Details Of Admin)

ADD_RETAILER

(New Retailer Addition)

CREATE_OPERATOR ADD_SUPPLIER

(Add new supplier)

SHOW_ITEMS ADD_ITEM_IMPROVED

(Add Items)

ADD_TYPE

(Add Or Update New Item Types In Warehouse)

ADD_TYPE

(Add Or Update New Item Types In Warehouse)

STOCK_RECORDS

(See All The Inputs And The Outputs In The Warehouse)

ADD_MULTIPLE_ITEMS

(Add Multiple Items Batch wise)

TRANSACTION_HISTORY

(See all the previous transaction history)

BILL_GENERATE

(Generate Bill For Items)

SEE_USERS

(See All Operators ,Suppliers ,Retailers)

SELECT_RETAILER_NAME_TO_UPDATE

(Update the details of a retailer)

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 18: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 17

SELECT_SUPPLIER_NAME_TO_UPDATE

(Update supplier details )

ENTER_ITEM_ID_FOR_UPDATE

(OLD)

SHOW_ITEMS

(view the details of a particular item)

SEE_EXPIRED

(See Expired Items)

SAVE_INFO

(Saves Operator's Information)

LOGOUT

(Logs Out And Goes To Login Page)

ADMIN_CHNG_PWD

(Change Admin Password)

Document sign date :Jul 17, 2015

Page 19: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 18

Screenshots

Document sign date :Jul 17, 2015

Page 20: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 19

Document sign date :Jul 17, 2015

Page 21: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 20

Document sign date :Jul 17, 2015

Page 22: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 21

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 23: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 22

Document sign date :Jul 17, 2015

Page 24: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 23

Document sign date :Jul 17, 2015

Page 25: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 24

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 26: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 25

Document sign date :Jul 17, 2015

Page 27: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 26

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 28: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 27

Future Scope of Improvements

For any system, present satisfaction in job is important, but it is also necessary to for see and visualizes the future scope.

Document sign date :Jul 17, 2015

Page 29: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 28

Future enhancement is necessary for the system as the limitations that cannot be denied today, can be overcome by better technologies.

In the future more software companies will hire this software program because nowadays the need for the speed in the day-to-day life has become essential.

As competition increases, companies by considering old version, they develop more efficient versions for individual success.

For example, in our project Asset tracking or Product identification can be the one feature we can add by applying use of bar code or other tracking criteria, such as serial number, lot number and revision number.

Forgot password feature in our software can be linked with

the user via mobile phone (SMS).

And there can be much more done as per the requirement

of our client.

Code

DROP TABLE ITEM;

DROP TABLE EMPLOYEE;

DROP TABLE SUPPLIER; DROP TABLE RETAILER;

DROP TABLE PURCHASE_SALE;

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 30: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 29

ITEM TABLE:-

CREATE TABLE ITEM(

ITEM_ID NUMBER(6) NOT NULL,

ITEM_NAME VARCHAR2(50) NOT NULL,

MAIN_TYPE VARCHAR2(20) NOT NULL,

SUB_TYPE VARCHAR2(30) NOT NULL,

BRAND VARCHAR2(30) NOT NULL,

CURRENT_STOCK NUMBER(4) NOT NULL,

MIN_STOCK NUMBER(4) NOT NULL,

MAX_STOCK NUMBER(4) NOT NULL,

EXP_DATE DATE,

ADDING_DATE DATE NOT NULL,

PRICE NUMBER(5) NOT NULL,

PRIMARY KEY(ITEM_ID)

);

INSERT INTO ITEM VALUES(

000001, 'LAPTOP', 'ELECTRONICS', 'COMPUTER', 'DELL',150, 50, 500, NULL, '01JAN-15', 40000);

INSERT INTO ITEM VALUES(

000002, 'LAPTOP', 'ELECTRONICS', 'COMPUTER', 'HP',150, 50, 500, NULL, '01-JAN15', 30000);

INSERT INTO ITEM VALUES(

000003, 'MOBILE', 'ELECTRONICS', 'MOBILE', 'HTC', 200,100,600 ,NULL, '01-JAN15', 20000);

INSERT INTO ITEM VALUES(

000004, 'JEANS', 'CLOTHING', 'TROUSER', 'LEE COOPER',500, 1000, 2000, NULL, '01-JAN-15', 2000);

INSERT INTO ITEM VALUES(

000005, 'BUTTER', 'FOODING', 'DAIRY PRODUCT', 'AMUL', 300,100, 1000, '30JAN-15','01-JAN-15', 100);

COMMIT;

EMPLOTEE TABLE:-

CREATE TABLE EMPLOYEE(

EMP_ID NUMBER(4) NOT NULL,

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 31: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 30

EMP_NAME VARCHAR2(50) NOT NULL,

EMP_PASS VARCHAR2(20) NOT NULL,

EMP_TYPE VARCHAR2(10) NOT NULL,

EMP_PH NUMBER(10) NOT NULL,

EMP_DETAILS VARCHAR2(100) NOT NULL,

PRIMARY KEY(EMP_ID)

);

INSERT INTO EMPLOYEE VALUES(

1001, 'SUPRIYA', 'PASSWORD1001', 'MANAGER', 9126837267, 'GLOBSYN,BP. PODDER');

INSERT INTO EMPLOYEE VALUES(

1002, 'ANIMESH', 'PASSWORD1002', 'WORKER', 8101655438, 'SECTOR 5,SALTLAKE');

INSERT INTO EMPLOYEE VALUES(

1003, 'SOUVIK', 'PASSWORD1003', 'WORKER',7872316864, 'MOTIJHEEL,DUMDUM');

COMMIT;

SUPPLIER TABLE:-

CREATE TABLE SUPPLIER(

SUP_ID NUMBER(4) NOT NULL,

SUP_NAME VARCHAR2(50) NOT NULL,

SUP_TYPE VARCHAR2(20) NOT NULL,

SUP_PH NUMBER(10) NOT NULL,

SUP_DETAILS VARCHAR2(50) NOT NULL,

PRIMARY KEY(SUP_ID)

);

INSERT INTO SUPPLIER

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 32: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 31

VALUES(0010,'MAYUKH','ELECTRONICS',9038237793,'BARASAT');

INSERT INTO SUPPLIER

VALUES(0020,'MOND','ELECTRONICS',9002168473,'PRIVATE ROAD,DUMDUM');

INSERT INTO SUPPLIER

VALUES(0030,'VINIT','FOODING',8158004625,'SOVABAJAR');

INSERT INTO SUPPLIER

VALUES(0040,'VIVEK','CLOTHING',7503331566,'BOROBAJAR');

COMMIT;

RETAILER TABLE:-

CREATE TABLE RETAILER(

RET_ID NUMBER(4) NOT NULL,

RET_NAME VARCHAR2(50) NOT NULL,

RET_TYPE VARCHAR2(20) NOT NULL,

RET_PH NUMBER(13) NOT NULL,

RET_DETAILS VARCHAR2(50) NOT NULL,

PRIMARY KEY(RET_ID)

);

INSERT INTO RETAILER VALUES(3010,'KHOSLA

ELECTRONICS','ELECTRONICS',987654321,'DHARMATAL');

INSERT INTO RETAILER VALUES(3020,'BIG BAJAAR','FOODING',8888844444,'CITY CENTER 2');

INSERT INTO RETAILER VALUES(3030,'SHOPPERS STOP','CLOTHING',987654321,'RAJARHAAT');

COMMIT;

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 33: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 32

SALE-PURCHASE TABLE:-

CREATE TABLE PURCHASE_SALE (

TRANS_ID NUMBER(6) NOT NULL,

ITEM_ID NUMBER(6) NOT NULL,

ITEM_NAME VARCHAR2(50) NOT NULL,

BRAND_NAME VARCHAR2(50) NOT NULL,

QUANTITY NUMBER(4) NOT NULL,

TRANS_DATE DATE NOT NULL,

PRICE NUMBER(9) NOT NULL,

TYPE VARCHAR2(50),

PRIMARY KEY (TRANS_ID)

);

INSERT INTO PURCHASE_SALE VALUES(

1,000001, 'LAPTOP','DELL',100,'12-JAN-15',40000000,'SALE');

INSERT INTO PURCHASE_SALE VALUES(

2,000001, 'LAPTOP','DELL',200,'01-JAN-15',80000000,'PURCHASE');

INSERT INTO PURCHASE_SALE VALUES(

3,000002, 'LAPTOP','HP',100, '10-JAN-15',30000000,'SALE');

INSERT INTO PURCHASE_SALE VALUES(

4,000002, 'LAPTOP','HP',200,'02-JAN-15',60000000,'PURCHASE');

INSERT INTO PURCHASE_SALE VALUES(

5,000003, 'MOBILE','HTC',100,'10-JAN-15',20000000,'SALE');

INSERT INTO PURCHASE_SALE VALUES(

6,000003, 'MOBILE','HTC',200,'2-JAN-15',40000000,'PURCHASE');

INSERT INTO PURCHASE_SALE VALUES(

7,000004, 'JEANS','LEE COOPER',100,'13-JAN-15',200000,'SALE');

INSERT INTO PURCHASE_SALE VALUES(

8,000004, 'JEANS','LEE COOPER',200,'03-JAN-15',400000,'PURCHASE');

INSERT INTO PURCHASE_SALE VALUES(

9,000005, 'BUTTER','AMUL',100,'7-JAN-15',10000,'SALE');

INSERT INTO PURCHASE_SALE VALUES(

Document sign date :Jul 17, 2015

Page 34: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 33

10,000005, 'BUTTER','AMUL',200,'3-JAN-15',20000,'PURCHASE'); commit;

LOGIN PAGE

LOGIN BUTTON

WHEN BUTTON PRESSED

LOGGING INTO ACCOUNT

DECLARE

CURSOR LOGIN_CURSOR IS SELECT EMP_ID,EMP_PASS FROM EMPLOYEE;

ID EMPLOYEE.EMP_ID%TYPE;

PASS EMPLOYEE.EMP_PASS%TYPE;

LOGIN_FLAG BOOLEAN:=FALSE;

BEGIN

OPEN LOGIN_CURSOR;

LOOP

FETCH LOGIN_CURSOR INTO ID, PASS; IF(:TEXT_ITEM4=ID AND :ITEM9=PASS)

THEN

MESSAGE('YOU ARE IN');

LOGIN_FLAG:=TRUE;

END IF;

EXIT WHEN LOGIN_CURSOR%NOTFOUND;

END LOOP;

CLOSE LOGIN_CURSOR;

IF(NOT LOGIN_FLAG)

THEN

MESSAGE('INVALID LOGIN');

END IF;

CLEAR_FORM;

END;

Document sign date :Jul 17, 2015

Page 35: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 34

FORGOT PASSWORD PAGE

GET PASSWORD BUTTON

WHEN BUTTON PRESSED

GETTING LOGIN DETAILS

DECLARE

CURSOR LOGIN_CURSOR IS SELECT

EMP_ID,EMP_NAME,EMP_PASS,EMP_PH FROM EMPLOYEE;

ID EMPLOYEE.EMP_ID%TYPE;

NAME EMPLOYEE.EMP_NAME%TYPE;

PASS EMPLOYEE.EMP_PASS%TYPE;

PH EMPLOYEE.EMP_PH%TYPE;

LOGIN_FLAG BOOLEAN:=FALSE;

BEGIN

OPEN LOGIN_CURSOR;

LOOP

FETCH LOGIN_CURSOR INTO ID, NAME,PASS,PH;

IF(:TEXT_ITEM5=ID AND :ITEM6=NAME AND :ITEM7=PH)

THEN

MESSAGE('YOUR PASSWORD IS '||PASS);

LOGIN_FLAG:=TRUE;

END IF;

EXIT WHEN LOGIN_CURSOR%NOTFOUND;

END LOOP;

CLOSE LOGIN_CURSOR;

IF(NOT LOGIN_FLAG)

THEN

MESSAGE('INVALID DATA');

END IF;

END;

-----------------------------------------------------------------------------------

ADMIN PANEL

Document sign date :Jul 17, 2015

Page 36: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 35

GO BUTTON

WHEN BUTTON PRESSED

GO TO

BEGIN

IF :RADIO_GROUP4='1' THEN

CALL_FORM('C:\project new\ITEMQUERY.FMX');

ELSIF :RADIO_GROUP4='2' THEN

CALL_FORM('C:\project new\SALERECORD.FMX');

ELSIF :RADIO_GROUP4='3' THEN

CALL_FORM('C:\project new\SUPPLIER.FMX');

ELSIF :RADIO_GROUP4='4' THEN

CALL_FORM('C:\project new\RETAILER.FMX');

ELSIF :RADIO_GROUP4='5' THEN

CALL_FORM('C:\project new\EMPLOYEE.FMX');

END IF;

END;

---------------------------------------------------------------------------------

USER PANEL

GO BUTTON

WHEN BUTTON PRESSED

GO TO

BEGIN

IF :RADIO_GROUP4='1' THEN

CALL_FORM('C:\project new\ITEMQUERY.FMX');

ELSIF :RADIO_GROUP4='2' THEN

CALL_FORM('C:\project new\SALEPURCHASE.FMX');

ELSIF :RADIO_GROUP4='3' THEN

CALL_FORM('C:\project new\Salerecord.FMX');

END IF;

Document sign date :Jul 17, 2015

Page 37: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 36

END; ---------------------------------------------------------------------------------

ITEM

PREVIOUS RECORD BUTTON DISPLAY BUTTON

WHEN BUTTON PRESSED

DISPLAY

EXECUTE_QUERY;

WHEN BUTTON PRESSED

PREVIOUS RECORD

PREVIOUS_RECORD;

NEXT RECORD BUTTON

WHEN BUTTON PRESSED

NEXT RECORD

NEXT_RECORD;

SAVE BUTTON

WHEN BUTTON PRESSED

SAVE

DECLARE

AL_ID ALERT;

AL_BUTTON NUMBER;

BEGIN

AL_ID:=FIND_ALERT('AL_SAVE');

AL_BUTTON:=SHOW_ALERT('AL_SAVE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

COMMIT_FORM;

MESSAGE('ITEM SAVED');

ELSE

GO_BLOCK('ITEM');

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 38: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 37

CLEAR_BLOCK('ITEM');

END IF;

END;

UPDATE BUTTON

WHEN BUTTON PRESSED

UPDATE

DECLARE

AL_ID ALERT;

AL_BUTTON NUMBER;

BEGIN

AL_ID:=FIND_ALERT('AL_UPDATE'); AL_BUTTON:=SHOW_ALERT('AL_UPDATE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

COMMIT_FORM;

MESSAGE('ITEM UPDATE');

ELSE

GO_BLOCK('ITEM');

END IF;

END;

DELETE BUTTON

WHEN BUTTON PRESSED

DELETE

DECLARE

AL_ID ALERT;

AL_BUTTON NUMBER;

BEGIN

AL_ID:=FIND_ALERT('AL_DELETE');

AL_BUTTON:=SHOW_ALERT('AL_DELETE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

DELETE_RECORD;

MESSAGE('ITEM DELETED');

Document sign date :Jul 17, 2015

Page 39: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 38

CLEAR_BLOCK('ITEM');

ELSE

GO_BLOCK('ITEM');

END IF;

END;

EXIT BUTTON

WHEN BUTTON PRESSED

EXIT

EXIT_FORM;

…………………………………………………………………………………………………………………………

ITEM QUERY

MAIN TYPE DROP DOWN LIST WHEN BUTTON PRESSED

NEW FORM INSTANCE

DECLARE

RG_MT RECORDGROUP;

STAT NUMBER;

RG_NAME VARCHAR2(30):='AAA';

BEGIN

RG_MT:=CREATE_GROUP_FROM_QUERY(RG_NAME,'SELECT

DISTINCT MAIN_TYPE MAIN ,TO_CHAR(MAIN_TYPE)MTYPE FROM

ITEM');

STAT:=POPULATE_GROUP(RG_MT); POPULATE_LIST('BLOCK47.MAINTYPE',RG_MT);

END;

MAIN TYPE DROP DOWN LIST

WHEN LIST CHANGED

DECLARE

STAT NUMBER;

BEGIN

STAT:=POPULATE_GROUP_WITH_QUERY('RG_SUB','SELECT

Document sign date :Jul 17, 2015

Page 40: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 39

DISTINCT SUB_TYPE SUB, TO_CHAR(SUB_TYPE) STYPE FROM ITEM WHERE ITEM.MAIN_TYPE='||''''||:BLOCK47.MAINTYPE||'''');

POPULATE_LIST('BLOCK47.SUBTYPE','RG_SUB');

GO_BLOCK('ITEM2');

SET_BLOCK_PROPERTY('ITEM2',ONETIME_WHERE,'ITEM.MAIN_TY

PE='||''''||:MAINTYPE||'''');

EXECUTE_QUERY(NO_VALIDATE);

END;

SUB TYPE DROP DOWN LIST

WHEN LIST CHANGED

GO_BLOCK('ITEM2'); SET_BLOCK_PROPERTY('ITEM2',ONETIME_WHERE,'ITEM.SUB_TYPE

='||''''||:SUBTYPE||'''');

EXECUTE_QUERY(NO_VALIDATE);

EXIT

WHEN BUTTON PRESSED

EXIT_FORM;

SUPPLIER

PREVIOUS RECORD BUTTON DISPLAY BUTTON

WHEN BUTTON PRESSED

DISPLAY

EXECUTE_QUERY;

WHEN BUTTON PRESSED

PREVIOUS RECORD

PREVIOUS_RECORD;

NEXT RECORD BUTTON

WHEN BUTTON PRESSED

Document sign date :Jul 17, 2015

Suman Aich
Group
Suman Aich
Line
Page 41: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 40

NEXT RECORD

NEXT_RECORD;

WHEN BUTTON PRESSED

FIND

GO_BLOCK('SUPPLIER');

SET_BLOCK_PROPERTY('SUPPLIER',ONETIME_WHERE,'SUPPLIER.SUP

_ID='||:SUP_ID);

EXECUTE_QUERY(NO_VALIDATE);

SAVE BUTTON

WHEN BUTTON PRESSED

SAVE

DECLARE

AL_ID ALERT;

AL_BUTTON NUMBER;

BEGIN

AL_ID:=FIND_ALERT('AL_SAVE');

AL_BUTTON:=SHOW_ALERT('AL_SAVE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

COMMIT_FORM;

MESSAGE('SUPPLIER SAVED');

ELSE

GO_BLOCK('SUPPLIER');

CLEAR_BLOCK(' SUPPLIER ');

END IF;

END;

UPDATE BUTTON

WHEN BUTTON PRESSED

UPDATE

DECLARE

AL_ID ALERT;

Document sign date :Jul 17, 2015

Page 42: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 41

AL_BUTTON NUMBER;

BEGIN

AL_ID:=FIND_ALERT('AL_UPDATE');

AL_BUTTON:=SHOW_ALERT('AL_UPDATE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

COMMIT_FORM;

MESSAGE(' SUPPLIER UPDATE');

ELSE

GO_BLOCK(' SUPPLIER ');

END IF;

END;

DELETE BUTTON

WHEN BUTTON PRESSED

DELETE

DECLARE

AL_ID ALERT;

AL_BUTTON NUMBER;

BEGIN

AL_ID:=FIND_ALERT('AL_DELETE');

AL_BUTTON:=SHOW_ALERT('AL_DELETE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

DELETE_RECORD;

MESSAGE(' SUPPLIER DELETED');

CLEAR_BLOCK(' SUPPLIER ');

ELSE

GO_BLOCK(' SUPPLIER ');

END IF;

END;

EXIT BUTTON

WHEN BUTTON PRESSED

EXIT

Document sign date :Jul 17, 2015

Page 43: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 42

EXIT_FORM;

RETAILER

PREVIOUS RECORD BUTTON DISPLAY BUTTON

WHEN BUTTON PRESSED

DISPLAY

EXECUTE_QUERY;

WHEN BUTTON PRESSED

PREVIOUS RECORD

PREVIOUS_RECORD;

NEXT RECORD BUTTON

WHEN BUTTON PRESSED

NEXT RECORD NEXT_RECORD;

WHEN BUTTON PRESSED

FIND

GO_BLOCK(‘RETAILER');

SET_BLOCK_PROPERTY('RETAILER',ONETIME_WHERE,'RETAILER.RET

_ID='||:RET_ID);

EXECUTE_QUERY(NO_VALIDATE);

SAVE BUTTON

WHEN BUTTON PRESSED

SAVE

DECLARE

AL_ID ALERT;

AL_BUTTON NUMBER;

BEGIN

Document sign date :Jul 17, 2015

Page 44: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 43

AL_ID:=FIND_ALERT('AL_SAVE');

AL_BUTTON:=SHOW_ALERT('AL_SAVE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

COMMIT_FORM;

MESSAGE('RETAILER SAVED');

ELSE

GO_BLOCK('RETAILER');

CLEAR_BLOCK(' RETAILER ');

END IF;

END;

UPDATE BUTTON

WHEN BUTTON PRESSED

UPDATE

DECLARE

AL_ID ALERT;

AL_BUTTON NUMBER;

BEGIN

AL_ID:=FIND_ALERT('AL_UPDATE');

AL_BUTTON:=SHOW_ALERT('AL_UPDATE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

COMMIT_FORM;

MESSAGE(' RETAILER UPDATE');

ELSE

GO_BLOCK(' RETAILER ');

END IF;

END;

DELETE BUTTON

WHEN BUTTON PRESSED

DELETE

DECLARE

AL_ID ALERT;

Document sign date :Jul 17, 2015

Page 45: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 44

AL_BUTTON NUMBER;

BEGIN

AL_ID:=FIND_ALERT('AL_DELETE');

AL_BUTTON:=SHOW_ALERT('AL_DELETE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

DELETE_RECORD;

MESSAGE(' RETAILER DELETED');

CLEAR_BLOCK(' RETAILER ');

ELSE

GO_BLOCK(' RETAILER ');

END IF;

END;

EXIT BUTTON

WHEN BUTTON PRESSED

EXIT

EXIT_FORM;

SUPPLIER

PREVIOUS RECORD BUTTON DISPLAY BUTTON

WHEN BUTTON PRESSED

DISPLAY

EXECUTE_QUERY;

WHEN BUTTON PRESSED

PREVIOUS RECORD

PREVIOUS_RECORD;

Document sign date :Jul 17, 2015

Page 46: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 45

NEXT RECORD BUTTON

WHEN BUTTON PRESSED

NEXT RECORD

NEXT_RECORD;

WHEN BUTTON PRESSED

FIND

GO_BLOCK('SUPPLIER');

SET_BLOCK_PROPERTY('SUPPLIER',ONETIME_WHERE,'SUPPLIER.SUP

_ID='||:SUP_ID);

EXECUTE_QUERY(NO_VALIDATE);

SAVE BUTTON

WHEN BUTTON PRESSED

SAVE

DECLARE

AL_ID ALERT;

AL_BUTTON NUMBER;

BEGIN

AL_ID:=FIND_ALERT('AL_SAVE');

AL_BUTTON:=SHOW_ALERT('AL_SAVE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

COMMIT_FORM;

MESSAGE('SUPPLIER SAVED');

ELSE

GO_BLOCK('SUPPLIER');

CLEAR_BLOCK(' SUPPLIER ');

END IF;

END;

UPDATE BUTTON

WHEN BUTTON PRESSED

Document sign date :Jul 17, 2015

Page 47: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 46

UPDATE

DECLARE

AL_ID ALERT;

AL_BUTTON NUMBER;

BEGIN

AL_ID:=FIND_ALERT('AL_UPDATE');

AL_BUTTON:=SHOW_ALERT('AL_UPDATE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

COMMIT_FORM;

MESSAGE(' SUPPLIER UPDATE');

ELSE

GO_BLOCK(' SUPPLIER ');

END IF;

END;

DELETE BUTTON

WHEN BUTTON PRESSED

DELETE

DECLARE

AL_ID ALERT;

AL_BUTTON NUMBER;

BEGIN

AL_ID:=FIND_ALERT('AL_DELETE');

AL_BUTTON:=SHOW_ALERT('AL_DELETE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

DELETE_RECORD;

MESSAGE(' SUPPLIER DELETED');

CLEAR_BLOCK(' SUPPLIER ');

ELSE

GO_BLOCK(' SUPPLIER ');

END IF;

END;

Document sign date :Jul 17, 2015

Page 48: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 47

EXIT BUTTON

WHEN BUTTON PRESSED

EXIT

EXIT_FORM;

EMPLOYEE

PREVIOUS RECORD BUTTON DISPLAY BUTTON

WHEN BUTTON PRESSED

DISPLAY

EXECUTE_QUERY;

WHEN BUTTON PRESSED

PREVIOUS RECORD

PREVIOUS_RECORD;

NEXT RECORD BUTTON

WHEN BUTTON PRESSED

NEXT RECORD

NEXT_RECORD;

WHEN BUTTON PRESSED

FIND

GO_BLOCK(‘EMPLOYEE');

SET_BLOCK_PROPERTY(' EMPLOYEE',ONETIME_WHERE,' EMPLOYEE.EMP_ID='||:EMP_ID);

EXECUTE_QUERY(NO_VALIDATE);

SAVE BUTTON

WHEN BUTTON PRESSED

SAVE

DECLARE

AL_ID ALERT;

Document sign date :Jul 17, 2015

Page 49: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 48

AL_BUTTON NUMBER;

BEGIN

AL_ID:=FIND_ALERT('AL_SAVE');

AL_BUTTON:=SHOW_ALERT('AL_SAVE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

COMMIT_FORM;

MESSAGE(‘EMPLOYEE SAVED');

ELSE

GO_BLOCK(' EMPLOYEE ');

CLEAR_BLOCK(' EMPLOYEE ');

END IF;

END;

UPDATE BUTTON

WHEN BUTTON PRESSED

UPDATE

DECLARE

AL_ID ALERT;

AL_BUTTON NUMBER;

BEGIN

AL_ID:=FIND_ALERT('AL_UPDATE');

AL_BUTTON:=SHOW_ALERT('AL_UPDATE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

COMMIT_FORM;

MESSAGE(' EMPLOYEE UPDATE');

ELSE

GO_BLOCK(' EMPLOYEE ');

END IF;

END;

DELETE BUTTON

WHEN BUTTON PRESSED

DELETE

Document sign date :Jul 17, 2015

Page 50: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 49

DECLARE

AL_ID ALERT;

AL_BUTTON NUMBER;

BEGIN

AL_ID:=FIND_ALERT('AL_DELETE');

AL_BUTTON:=SHOW_ALERT('AL_DELETE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

DELETE_RECORD;

MESSAGE(' EMPLOYEE DELETED'); CLEAR_BLOCK(' EMPLOYEE ');

ELSE

GO_BLOCK(' EMPLOYEE ');

END IF;

END;

EXIT BUTTON

WHEN BUTTON PRESSED

EXIT

EXIT_FORM;

SALE PURCHASE

… BUTTON

WHEN BUTTON PRESSED

BEGIN

LOOP

EXIT WHEN SHOW_LOV('LOV92');

MESSAGE('SELECT A VALUE FROM LIST');

END LOOP;

END;

SAVE BUTTON

DECLARE

AL_ID ALERT;

AL_BUTTON NUMBER;

Document sign date :Jul 17, 2015

Page 51: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 50

CURSOR ITEM_CURSOR IS SELECT

ITEM.ITEM_ID,ITEM.CURRENT_STOCK,ITEM.MAX_STOCK FROM ITEM;

CUR NUMBER(4);

MAXS NUMBER(4);

ITEMID NUMBER(6);

ITEM_FLAG BOOLEAN:=FALSE;

BEGIN

OPEN ITEM_CURSOR;

AL_ID:=FIND_ALERT('AL_SAVE');

AL_BUTTON:=SHOW_ALERT('AL_SAVE');

IF AL_BUTTON=ALERT_BUTTON1 THEN

LOOP

FETCH ITEM_CURSOR INTO ITEMID,CUR,MAXS;

IF(:ITEM_ID=ITEMID)THEN

IF :TYPE='SALE' THEN IF(:PURCHASE_SALE.QUANTITY

<=CUR)THEN

UPDATE ITEM SET

CURRENT_STOCK=CURRENT_STOCK-:PURCHASE_SALE.QUANT ITY WHERE ITEM_ID=:PURCHASE_SALE.ITEM_ID;

STANDARD.COMMIT;

COMMIT_FORM;

CLEAR_FORM;

ELSE

MESSAGE('LOW STOCK');

END IF;

ELSIF :TYPE='PURCHASE' THEN

IF((:PURCHASE_SALE.QUANTITY+CUR)<=MAXS)THEN

UPDATE ITEM SET

CURRENT_STOCK=CURRENT_STOCK+:PURCHASE_SALE.QUANT ITY WHERE ITEM_ID=:PURCHASE_SALE.ITEM_ID;

STANDARD.COMMIT;

COMMIT_FORM;

ELSE

Document sign date :Jul 17, 2015

Page 52: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 51

MESSAGE('TOTAL STOCK EXCEEDS

THE MAXIMUM STOCK');

END IF; END IF;

ITEM_FLAG:=TRUE;

END IF;

EXIT WHEN ITEM_CURSOR%NOTFOUND;

END LOOP;

CLOSE ITEM_CURSOR;

MESSAGE('saved');

IF(NOT ITEM_FLAG)

THEN

MESSAGE('ITEM ID NOT FOUND');

END IF;

ELSIF AL_BUTTON=ALERT_BUTTON2 THEN

MESSAGE('WE ARE IN FORM..');

END IF;

CLEAR_BLOCK;

END;

EXIT

WHEN BUTTON PRESSED

EXIT_FORM;

TRANSITION RECORD

TRANS_TYPE RADIO GROUP

WHEN RADIO CHANGED

BEGIN

Go_Block('PURCHASE_SALE'); IF :TYPE_TRANS = 'SALE' THEN

set_block_property('PURCHASE_SALE', onetime_where, '

PURCHASE_SALE.TRANS_DATE BETWEEN ' ||

''''||TO_DATE(:TEXT_ITEM15)||''''

|| ' AND ' ||

Document sign date :Jul 17, 2015

Page 53: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 52

''''||TO_DATE(:TEXT_ITEM16)||''''||'AND

PURCHASE_SALE.TYPE='||''''||:BLOCK7.TYPE_TRANS||''''); ELSIF :TYPE_TRANS='PURCHASE'THEN

set_block_property('PURCHASE_SALE', onetime_where, '

PURCHASE_SALE.TRANS_DATE BETWEEN ' ||

''''||TO_DATE(:TEXT_ITEM15)||'''' || ' AND ' ||

''''||TO_DATE(:TEXT_ITEM16)||''''||'AND

PURCHASE_SALE.TYPE='||''''||:BLOCK7.TYPE_TRANS||''''); ELSIF :TYPE_TRANS='ALL'THEN

set_block_property('PURCHASE_SALE', onetime_where, '

PURCHASE_SALE.TRANS_DATE BETWEEN ' || ''''||TO_DATE(:TEXT_ITEM15)||'''' || ' AND ' || ''''||TO_DATE(:TEXT_ITEM16)||'''');

END IF;

Execute Query(No_Validate);

END;

EXIT

WHEN BUTTON PRESSED

EXIT_FORM;

-----------------------------------------------------------------------------------

…………………………………………………………………………………………………………….

Document sign date :Jul 17, 2015

Page 54: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 53

Certificate

o Certificate:

THIS IS TO CERTIFY THAT Soumyabrata Bhattacharyya OF JALPAIGURI

GOVERNEMENT ENGINEERING COLLEGE HAS SUCCESSFULLY COMPLETED

THE PROJECT ON STOCK MANAGEMENT SYSTEM UNDER THE GUIDANCE

OF MR. SUMAN AICH USING ORACLE 10g FROM GLOBSYN FINISHING

SCHOOL IN SUMMER TRAINING PROGRAM.

----------------------------------------------------------

----

Mr. SUMAN AICH

Globsyn Finishing School

(BPPIMT)

Document sign date :Jul 17, 2015

Page 55: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 54

o Certificate:

THIS IS TO CERTIFY THAT Aritra Dutta OF JALPAIGURI GOVERNEMENT

ENGINEERING COLLEGE HAS SUCCESSFULLY COMPLETED THE PROJECT

ON STOCK MANAGEMENT SYSTEM UNDER THE GUIDANCE OF MR. SUMAN

AICH USING ORACLE 10g FROM GLOBSYN FINISHING SCHOOL IN SUMMER

TRAINING PROGRAM.

----------------------------------------------------------

----

Mr. SUMAN AICH

Globsyn Finishing School

(BPPIMT)

Document sign date :Jul 17, 2015

Page 56: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 55

o Certificate:

THIS IS TO CERTIFY THAT Tanmay Sarkar OF JALPAIGURI GOVERNEMENT

ENGINEERING COLLEGE HAS SUCCESSFULLY COMPLETED THE PROJECT

ON STOCK MANAGEMENT SYSTEM UNDER THE GUIDANCE OF MR. SUMAN

AICH USING ORACLE 10g FROM GLOBSYN FINISHING SCHOOL IN SUMMER

TRAINING PROGRAM.

----------------------------------------------------------

----

Mr. SUMAN AICH

Globsyn Finishing School

(BPPIMT)

Document sign date :Jul 17, 2015

Page 57: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 56

o Certificate:

THIS IS TO CERTIFY THAT Shailik Sarkar OF JALPAIGURI GOVERNEMENT

ENGINEERING COLLEGE HAS SUCCESSFULLY COMPLETED THE PROJECT

ON STOCK MANAGEMENT SYSTEM UNDER THE GUIDANCE OF MR. SUMAN

AICH USING ORACLE 10g FROM GLOBSYN FINISHING SCHOOL IN SUMMER

TRAINING PROGRAM.

----------------------------------------------------------

----

Mr. SUMAN AICH

Globsyn Finishing School

(BPPIMT)

Document sign date :Jul 17, 2015

Page 58: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 57

o Certificate:

THIS IS TO CERTIFY THAT Arup Kumar Bala OF JALPAIGURI GOVERNEMENT

ENGINEERING COLLEGE HAS SUCCESSFULLY COMPLETED THE PROJECT

ON STOCK MANAGEMENT SYSTEM UNDER THE GUIDANCE OF MR. SUMAN

AICH USING ORACLE 10g FROM GLOBSYN FINISHING SCHOOL IN SUMMER

TRAINING PROGRAM.

----------------------------------------------------------

----

Mr. SUMAN AICH

Globsyn Finishing School

(BPPIMT)

Document sign date :Jul 17, 2015

Page 59: BPPIMT(VIPRoad)-Oracle 11g PLSQL Programming With Forms-Gr4

P a g e | 58

Document sign date :Jul 17, 2015


Top Related