TECHNOLOGICAL INSTITUTE OF THE PHILIPPINES Quezon City
COLLEGE OF INFORMATION TECHNOLOGY EDUCATION
A System Development Project entitled
CONVENIENCE STORE SALES AND INVENTORY SYSTEM WITH DSS In Partial Fulfillment of the Requirements for Advanced Internet Computing 2 (EWEB422L1)
by: Rodriguez, Sonny Jaylo Santos, Edrian D. Milan, Albin Kicco S.
Mrs. MELISSA P. PICONES-JUANILLO
Instructor
March 2011
1. The Problem and Its Background 1.1. Introduction Inventory is a difficult asset to control it arrives and departs the company daily, is scattered throughout the warehouse and production areas, may contain obsolete or scrap items, can involve a thousands of part numbers, can include items owned by suppliers or customers. Information has become as important as, or even more important than products. Businesses that don't understand this are at a loss to explain why, when their prices are lower, their products just as good, and their advertising spending higher.
1.2. Background of the Study The Convenience Store Sales and Inventory System with DSS is basically a point of sales system and inventory system that has a decision support system. The decision support system is the main key in the system. It provides decision making for the user to decide what to do. It has ordering of products, receiving of products, purchasing of products and generation of reports about the products.
1.3. Objectives of the Study Inventory control the computer keeps the store's inventory, so the POS terminals attached to it automatically update inventory with every sale or return. In multi-store environments the person at the PoS station can check stock in other stores if this store is out of stock. The central office knows at all times how much stock each store has. Reduced “Out of stock” low stock reports and purchase orders are produced automatically with enough lead time to receive goods. Loss prevention Record keeping is so thorough and reporting so clear that employee theft of either inventory or received cash, even if cleverly disguised, is detectable and traceable. Support both accounting and technical support people can call into the system and inspect the records for themselves. This greatly reduces the level of skill needed at the store to resolve accounting problems.
1.4. Significance of the Study The system Convenience Store Sales and Inventory System with DSS is a system that covers all
the things in selling a product. It provides the easiest way to trace or track the products and to ensure the balance of cost and profit of the store. It helps the store to have information in all the products it sells and control the flow of the marketing process. The system provides the basic needs from ordering up to generating reports and with the DSS (Decision Support System) it will help the store to trace the products in critical levels.
1.5. Scope and Limitation The system will covers all the main transaction of the sales system and inventory system like ordering of products, receiving of products, purchasing of products, generating of reports about the products and tracing the products that is in critical levels. The limitation of the system will be for standalone computers, convenience store products only and limited in some reports.
2. Systems Development Life Cycle 2.1. Systems
Planning Requirements Specification
2.2.
and
Business Policy
Ordering Schedule Ordering for the products from the suppliers must be not the current day but it can be advanced scheduling. Ordering in any suppliers can be process the day after the ordering date.
Retailing Price The price for every product will increase in 40% for the store to have income.
Qualification Employees Employees must be at least 18 years old and must have studied about management. For buyers of cigarettes and alcohols the customers must be 18 and above and must not wear uniforms from schools. Every bottle of beers have deposits of 5%.
1. The Problem and Its Background 1.1. Introduction Inventory is a difficult asset to control it arrives and departs the company daily, is scattered throughout the warehouse and production areas, may contain obsolete or scrap items, can involve a thousands of part numbers, can include items owned by suppliers or customers. Information has become as important as, or even more important than products. Businesses that don't understand this are at a loss to explain why, when their prices are lower, their products just as good, and their advertising spending higher.
1.2. Background of the Study The Convenience Store Sales and Inventory System with DSS is basically a point of sales system and inventory system that has a decision support system. The decision support system is the main key in the system. It provides decision making for the user to decide what to do. It has ordering of products, receiving of products, purchasing of products and generation of reports about the products.
1.3. Objectives of the Study Inventory control the computer keeps the store's inventory, so the POS terminals attached to it automatically update inventory with every sale or return. In multi-store environments the person at the PoS station can check stock in other stores if this store is out of stock. The central office knows at all times how much stock each store has. Reduced “Out of stock” low stock reports and purchase orders are produced automatically with enough lead time to receive goods. Loss prevention Record keeping is so thorough and reporting so clear that employee theft of either inventory or received cash, even if cleverly disguised, is detectable and traceable. Support both accounting and technical support people can call into the system and inspect the records for themselves. This greatly reduces the level of skill needed at the store to resolve accounting problems.
1.4. Significance of the Study The system Convenience Store Sales and Inventory System with DSS is a system that covers all
the things in selling a product. It provides the easiest way to trace or track the products and to ensure the balance of cost and profit of the store. It helps the store to have information in all the products it sells and control the flow of the marketing process. The system provides the basic needs from ordering up to generating reports and with the DSS (Decision Support System) it will help the store to trace the products in critical levels.
1.5. Scope and Limitation The system will covers all the main transaction of the sales system and inventory system like ordering of products, receiving of products, purchasing of products, generating of reports about the products and tracing the products that is in critical levels. The limitation of the system will be for standalone computers, convenience store products only and limited in some reports.
2. Systems Development Life Cycle 2.1. Systems
Planning Requirements Specification
2.2.
and
Business Policy
Ordering Schedule Ordering for the products from the suppliers must be not the current day but it can be advanced scheduling. Ordering in any suppliers can be process the day after the ordering date.
Retailing Price The price for every product will increase in 40% for the store to have income.
Qualification Employees Employees must be at least 18 years old and must have studied about management. For buyers of cigarettes and alcohols the customers must be 18 and above and must not wear uniforms from schools. Every bottle of beers have deposits of 5%.
2.3. PROJECT SCHEDULE February – March 2012 2nd Semester SY 2011-2012 System Title: Convenience Store Sales and Inventory System with DSS
February
Activities
1st Week
2nd Week
March
3rd Week
4th Week
1st Week
2nd Week
1. System Planning
Task Assignment Data Gathering (Business Policy) Chapter 1 2. System Analysis and Design
Analysis of the Requirements Creation of Diagrams Checking and Revision of Diagrams 3. System Development
Database Creation Coding Debugging 4. System Testing and Revisions
Unit Testing Initial P resentation resentation Revision of System and Documents Final P resentation resentation
2.4. WORK ASSIGNMENT 2nd Semester SY 2011-2012 System Title: Convenience Store Sales and Inventory System with DSS
System
DEVELOPERS
Documents
Tasks
Status
Tasks
Status
Programmer
Done
Diagrams
Done
Santos, Edrian D.
Quality Assurance
Done
Chapter 1
Done
Milan, Albin Kicco Sule
Quality Assurance, Reasercher
Done
Remaining Chapters
Done
Leader:
Rodriguez, Sonny Jaylo Members:
3rd Week
3. Systems Analysis and Design
3.3. Hierarchical Output
Input
Process
This is the part where the developers analyze the system with the context diagram, entity relationship diagram and hierarchical input process output, database design.
3.1. Context Diagram
Figure 3 HIPO
Figure 1 Context Diagram
3.4. Database Design
3.2. Entity Relationship Diagram
4. Systems Development and Testing 4.1. Development Tool SQL Plus used for creating, deleting, altering and querying tables.
Figure 2 ERD
Oracle Forms Builders used to create forms and modules for the system. Build all codes for all the modules. Oracle Reports Builders used to create reports that will be generated by the system. Builds template for the reports and codes for each report in the system.
5.2. Software Requirements 4.2. Backend The storehouse for the data in the system is Oracle 10g. It can manage large amount of data and can manipulate it freely with the oracle software like forms builder reports builder and SQL plus.
4.3. Testing Procedures The testing process for the system will be done in every module. First all the modules will test one by one if error occurs it will reprogram the module and test it again but if the module has no errors it will be connected to the main module for integration after the testing all the modules for the forms the next testing process will be the reports modules. It will connect to the forms module to test the connection between the forms and reports. The last testing process is for the whole system from the login up to main transaction and to generation of reports.
5.
User’s Manual
This part contains the specifications needed by the system in order to execute.
5.1. Hardware Requirements Requirements
For the system to be successfully developed, the following software we’re used: First, it needs a Windows XP OS or higher. The developers use Microsoft Virtual Box for faster installation of Oracle 10g with Windows XP operating system. Convenience Store Sales and Inventory System with DSS System is developed under Oracle 10g, Forms Builder and Oracle 10g, Reports Builder. The Oracle Database Configuration is also used to create and configure database. For adding data for table to be used, developers used SQL*Plus and for the creation of forms Oracle Forms builder was used.
5.3. Installation Guide To properly install the system the computer must meet all the requirements listed above. The installation process is very simple just install the oracle forms builder 10g and oracle reports builder 10g with the SQL plus and run the system named Convenience Store Sales and Inventory System with DSS. The system will function properly if the machine meets all the requirements.
Oracle will suitably run with the following hardware requirements: Oracle 10g PC Requirements:
Minimum
Hardware
Physical memory (RAM)
512 MB recommended
Virtual memory
Double amount RAM
Temp disk space
Hard disk space 1.5 GB
Video adapter
256 colors
CPU Processor
200 MHz minimum
the of
5.4. How to use the system First log in as the given username and password for admin use ADMIN as user and ADMIN as password for user use USER as user and USER as password. The admin has the privilege to view all users of the system and can alter them. After logging in the system will direct to the home module where in it has menus and list of existing pending process if ever like ordering, receiving and products that are in critical levels. First thing to do is to add products or suppliers for the system to hold information about the store. Go to menu select maintenance then add products, suppliers or even users then order products from the supplier using the ordering module in the menu after receive the ordered products and replenish the items in store. The purchasing module is in the transaction it can now sell the products that have been stock in the store. After all the process generate reports in the menu and add details in the reports generator and it will print the reports about the product base on the report selected.
6. Screenshots with Program
begin if :blklogin.logusername is null or :blklogin.logpass is null
Screen no: 1 Screen name: Log In Description: Allows the user to log in or open the system.
then set_alert_property('audit',alert_message_text,'All fields must be entered.'); n:=show_alert('audit'); :GLOBAL.counter1 := :GLOBAL.counter1 + 1; GO_ITEM('logusername'); Else select username, password,userid :blklogin.logusername, :blklogin.logpass,:GLOBAL.USERID
into
from userlist where (:blklogin.logusername=username :blklogin.logpass=userpass and userstatus 'TRUE');
and LIKE
CLEAR_FORM; call_form('c:\247\HOME.fmx',hide,do_replace); Object name: Trigger level: Form level Trigger name: When-new-from-instance select username into :blklogin.logusername from userlist where username = :blklogin.logusername; SET_ITEM_PROPERTY('BLKlogin.logname',visible, PROPERTY_true); select firstname||' '||midname||'. ' ||lastname into :blklogin.logname from userlist where username = :blklogin.logusername; exception when no_data_found then :blklogin.logname := null; SET_ITEM_PROPERTY('BLKlogin.logname',visible, PROPERTY_false); end;
end if; EXception when no_data_found then SET_ALERT_PROPERTY('audit',ALERT_MESSAG E_TEXT,'Username and Password not matched!'); n:= show_alert('audit'); if :blklogin.logname is null then clear_form(no_commit); :GLOBAL.counter1 := :GLOBAL.counter1 + 1; GO_ITEM('logusername'); Else :blklogin.logpass := null; :GLOBAL.counter1 := GO_ITEM('logpass');
:GLOBAL.counter1
+
1;
end if; If :GLOBAL.counter1=3 then SET_ALERT_PROPERTY('ERROR',ALERT_MESS AGE_TEXT,'Username and Password Not Found! Anauthorized Login .. 3 trial attempt... Exit form'); n:=show_alert('ERROR');
Object name: BTNCANCEL
exit_form(no_validate, no_rollback);
Trigger level: Item level
end if;
Trigger name: When-button-pressed
end;
exit_form; Screen no: 2 Object name: BTNOK
Screen name: Receiving Advice
Trigger level: Item level
Description: Allows the user to view or print the received ordered products from the suppliers.
Trigger name: When-button-pressed declare n number;
END IF; :SYSTEM.MESSAGE_LEVEL := v_message_level; CLEAR_MESSAGE; :bloCK34.RECUSERID:=:GLOBAL.USERID; SET_MENU_ITEM_PROPERTY('MENU1.HOME',E NABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.PRODU CTMANAGEMENT',ENABLED,PROPERTY_FALS E); SET_MENU_ITEM_PROPERTY('MENU1.REPORT S',ENABLED,PROPERTY_FALSE); Object name:
SET_MENU_ITEM_PROPERTY('MENU1.MAINTE NANCE',ENABLED,PROPERTY_FALSE);
Trigger level: Form level
SET_MENU_ITEM_PROPERTY('MENU1.LOGOU T',ENABLED,PROPERTY_FALSE);
Trigger name: When-new-form-instance DECLARE v_message_level PLS_INTEGER :SYSTEM.MESSAGE_LEVEL;
:=
LINE NUMBER;
END;
Object name: BTNBACK Trigger level: item level Trigger name: When-button-pressed
BEGIN
CALL_FORM('C:\247\FRMRECLIST.FMX',HIDE,D O_REPLACE); SELECT MAX(LINENO)
INTO LINE
Object name: RECPRINT
FROM RECEIVINGDETAIL
Trigger level: item level
WHERE RECID=:GLOBAL.RECID;
Trigger name: When-button-pressed
GO_BLOCK('BLKRECEIVINGADVICELIST');
DECLARE
select R.RECID, R.DELIVERYDOCNO, R.SUPPDESCRIPTION, R.RECSTATUS, R.DATERECEIVED, R.CREATEDBY into
PL_ID PARAMLIST;
:BLKRECEIVINGADVICELIST.RECID, :BLKRECEIVINGADVICELIST.DELIVERYDOCN O, :BLKRECEIVINGADVICELIST.SUPPDESCRIPTIO N, :BLKRECEIVINGADVICELIST.RECSTATUS, :BLKRECEIVINGADVICELIST.DATERE CEIVED,:BLKRECEIVINGADVICELIST.CREATE DBY from RECEIVINGLIST R where R.RECID = :GLOBAL.RECID;
V_REPORT_ID REPORT_OBJECT; V_REP_SERVER 'reportserver';
VARCHAR2(100)
:=
V_REPORT_JOB_ID VARCHAR2(25); V_SERVER_LENGTH NUMBER; V_REP_STATUS VARCHAR2(25); COMPUTER_NAME VARCHAR2(50) := 'localhost'; BEGIN PL_ID GET_PARAMETER_LIST('tmpdata');
:=
IF NOT ID_NULL(PL_ID) THEN IF LINE IS NOT NULL THEN Set_Block_Property('BLKRECEIVINGAD VICEDETAIL', DEFAULT_WHERE,'RECID =:GLOBAL.RECID'); GO_BLOCK('BLKRECEIVINGADVICEDETAIL'); EXECUTE_QUERY;
DESTROY_PARAMETER_LIST(PL_ID); END IF; PL_ID CREATE_PARAMETER_LIST('tmpdata'); ADD_PARAMETER(PL_ID, text_parameter, 'no');
:= 'paraform',
ADD_PARAMETER(PL_ID, 'P_RECID', text_parameter, :BLKRECEIVINGADVICELIST.RECID);
Object name: Trigger level: Form level Trigger name: When-new-form-instance begin
V_REPORT_ID := FIND_REPORT_OBJECT('RECEIVINGDETAIL');
select max(orderid) into :GLOBAL.orderid
V_REPORT_JOB_ID := RUN_REPORT_OBJECT(V_REPORT_ID, PL_ID);
from replenishmentorderlist;
V_SERVER_LENGTH := LENGTH(GET_REPORT_OBJECT_PROPERTY(V_ REPORT_ID,REPORT_SERVER));
:blkrepcorder.repcid:=1000000000;
V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ; WHILE
if :GLOBAL.orderid is null then else :blkrepcorder.repcid:=:GLOBAL.orderid+1; end if; :blKREPCORDER.REPUSERID:=:GLOBAL.userid; :blkrepcorder.repcordate:=sysdate;
V_REP_STATUS IN ('RUNNING','OPENING_REPORT','ENQUEUED')
:BLKREPcORDER.REPcDEDATE:=SYSDATE+1; :GLOBAL.repcordate:=:blkrepcorder.repcordate; :GLOBAL.repcdedate:=:blkrepcorder.repcdedate;
LOOP MESSAGE('RUNNING
:BLKREPCORDER.DATEDAY:=TO_CHAR(SYSD ATE,'MONTH DD, YYYY')||' '||TO_CHAR(SYSDATE,'DAY');
V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ;
SET_MENU_ITEM_PROPERTY('MENU1.HOME',E NABLED,PROPERTY_FALSE);
REPORT');
END LOOP;
WEB.SHOW_DOCUMENT('/reports/rwser vlet/getjobid'||SUBSTR(V_REPORT_JOB_ID,V_SER VER_LENGTH+2)||'?server='||V_Rep_Server,'_blank' ); END;
SET_MENU_ITEM_PROPERTY('MENU1.PRODU CTMANAGEMENT',ENABLED,PROPERTY_FALS E); SET_MENU_ITEM_PROPERTY('MENU1.REPORT S',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.MAINTE NANCE',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.LOGOU T',ENABLED,PROPERTY_FALSE); end;
Screen no: 3 Screen name: CREATE REPLENISHMENT ORDER
Object name: ORDRIGHT
Description: Allows the user to create new orders of products.
Trigger level: Item level Trigger name: When-button-pressed :blkrepcorder.repcordate:=:blkrepcorder.repcordate+1; :blkrepcoRder.repcDEdate:=:blkrepcorder.repcordate+ 1;
Object name: ORDLEFT Trigger level: Item level Trigger name: When-button-pressed :blkrepcorder.repcordate:=:blkrepcORDER.repcordate -1; :BLKREPCORDER.REPCDEDATE:=:BLKREPCOR DER.REPCORDATE+1;
Object name: REPADD
where TO_CHAR(POST.BUSINESSDATE,'DDMON-YY')=TO_DATE(SYSDATE,'DD-MON-YY')4
Trigger level: Item level Trigger name: When-button-pressed
GROUP BY POST.ITEMCODE;
declare CITEMCODE NUMBER;
cursor count3_cur is select p.ITEMCODE,SUM(p.TRANQTY) as c3qty
CQTY NUMBER;
from POSTRANSACTIONDETAIL p
C1ITEMCODE NUMBER; C1QTY NUMBER;
where TO_CHAR(p.BUSINESSDATE,'DD-MONYY')=TO_DATE(SYSDATE,'DD-MON-YY')-3
C2ITEMCODE NUMBER;
GROUP BY p.ITEMCODE;
C2QTY NUMBER;
cursor count4_cur is select po.ITEMCODE,SUM(po.TRANQTY) as c4qty
C3ITEMCODE NUMBER;
from POSTRANSACTIONDETAIL po
C3QTY NUMBER;
where TO_CHAR(po.BUSINESSDATE,'DD-MONYY')=TO_DATE(SYSDATE,'DD-MON-YY')-2
C4ITEMCODE NUMBER; C4QTY NUMBER;
GROUP BY po.ITEMCODE;
C5ITEMCODE NUMBER; C5QTY NUMBER;
cursor count5_cur is select pos.ITEMCODE,SUM(pos.TRANQTY) as c5qty
n number;
from POSTRANSACTIONDETAIL pos
btn number(2); ORDATE DATE;
where TO_CHAR(pos.BUSINESSDATE,'DD-MONYY')=TO_DATE(SYSDATE,'DD-MON-YY')-1
ORDDAY VARCHAR2(10);
GROUP BY pos.ITEMCODE;
CATMAX NUMBER; CATMID NUMBER;
BEGIN
v_message_level
SELECT MAX(CATID)
PLS_INTEGER := :SYSTEM.MESSAGE_LEVEL;
INTO CATMAX
cursor count_cur is select PM.ITEMCODE,PM.PRODQTY
FROM CATEGORY;
from PRODUCTMASTERLIST PM
SELECT MAX(ORDEREDDATE)
where PM.ITEMCODE IN (SELECT P.ITEMCODE FROM PRODUCT P
INTO ORDATE
WHERE P.SUPPID=33300 CATMID);
CATMID:=CATMAX/2;
AND
P.CATID
>
cursor countN_cur is select PM.ITEMCODE,PM.PRODQTY
FROM REPLENISHMENTORDERLIST; ORDDAY:=TO_CHAR(:BLKrepcorder.repcordate,'D Y');
from PRODUCTMASTERLIST PM
IF ORDDAY='SUN' THEN set_alert_property('PRODFILLUP',alert_message_text ,'no delivery for sunday');
where PM.ITEMCODE IN (SELECT P.ITEMCODE
n:=show_alert('PRODFILLUP');
FROM PRODUCT P
ELSIF THEN
WHERE P.SUPPID=33300 CATMID);
AND
P.CATID
<=
cursor count1_cur is select ITEMCODE,SUM(TRANQTY)as c1qty from POSTRANSACTIONDETAIL where TO_CHAR(BUSINESSDATE,'DD-MONYY')=TO_DATE(SYSDATE,'DD-MON-YY')-5 GROUP BY ITEMCODE; cursor count2_cur is select POST.ITEMCODE,SUM(POST.TRANQTY)as c2qty from POSTRANSACTIONDETAIL POST
:BLKrepcorder.repcordate
<=
ORDATE
set_alert_property('PRODFILLUP',alert_message_text ,'order date is already created'); n:=show_alert('PRODFILLUP'); ELSIF THEN
:BLKrepcorder.repcordate
<=
SYSDATE
set_alert_property('PRODFILLUP',alert_message_text ,'invalid! order date must be atleast one day after date today!! '); n:=show_alert('PRODFILLUP'); else IF show_alert('TRANSACTION')=alert_button1 then
INSERT INTO replenishmentorderlist (orderid,userid,datecreated,ordereddate,noofitems,total cost,totalretail,ordSTATUS,deliverydate) VALUES (:BLKrepcorder.repcid,:blkrepcorder.repuserid,sysdate ,:blkrepcorder.repcordate,
TION,0,0,P.MOQ,0,0,0,0,0,0,P.UNITCOST,P.UNITR ETAIL,0,0,P.SUPPID,:GLOBAL.DATECREATED FROM PRODUCT P WHERE P.SUPPID=33300 <=CATMID;
AND
CATID
FORMS_DDL('COMMIT');
0,0,0,'CREATED',:blkrepcorder.repcdedate);
open COUNTN_CUR;
FORMS_DDL('COMMIT');
LOOP
:GLOBAL.repcid:= :blkrepcorder.repcid;
fetch COUNTN_CUR into CITEMCODE,CQTY;
:GLOBAL.datecreated:=SYSDATE;
update REPLENISHMENTORDERDETAIL REP set COUNT=CQTY
IF ORDDAY ='TUE' OR ORDDAY = 'THU' OR ORDDAY = 'SAT' THEN
where REP.ORDERID =:GLOBAL.REPCID AND REP.ITEMCODE = CITEMCODE;
Insert into replenishmentorderdetail(orderid,itemcode,itemdescri ption,ORDERQTY,FINALORDER,MOQ,QTYRECE IVED,COUNT1,COUNT2,COUNT3,COUNT4,COU NT5,unitcost,unitretail,TOTALCOST,TOTALRETAI L,suppid,ordereddat
:SYSTEM.MESSAGE_LEVEL := v_message_level;
select :GLOBAL.REPCID,P.ITEMCODE,P.ITEMDESCRIP TION,0,0,P.MOQ,0,0,0,0,0,0,P.UNITCOST,P.UNITR ETAIL,0,0,P.SUPPID,:GLOBAL.DATECREATED FROM PRODUCT P WHERE CATMID;
P.SUPPID=33300
AND
CATID
>
FORMS_DDL('COMMIT');
CLEAR_MESSAGE; next_record; EXIT WHEN COUNTN_CUR%NOTFOUND; END LOOP; close COUNTN_CUR; END IF; :SYSTEM.MESSAGE_LEVEL := v_message_level; open COUNT1_CUR; LOOP
open COUNT_CUR;
fetch COUNT1_CUR into C1ITEMCODE,C1QTY;
LOOP
update REPLENISHMENTORDERDETAIL
fetch COUNT_CUR into CITEMCODE,CQTY;
set COUNT1=C1QTY
update REPLENISHMENTORDERDETAIL REP
where ITEMCODE=C1ITEMCODE ORDERID =:GLOBAL.REPCID;
set COUNT=CQTY where REP.ORDERID =:GLOBAL.REPCID AND REP.ITEMCODE = CITEMCODE; :SYSTEM.MESSAGE_LEVEL := v_message_level; CLEAR_MESSAGE; next_record; EXIT WHEN COUNT_CUR%NOTFOUND; END LOOP; close COUNT_CUR; ELSIF ORDDAY ='MON' OR ORDDAY = 'WED' OR ORDDAY = 'FRI' THEN Insert into replenishmentorderdetail(orderid,itemcode,itemdescri ption,ORDERQTY,FINALORDER,MOQ,QTYRECE IVED,COUNT1,COUNT2,COUNT3,COUNT4,COU NT5,unitcost,unitretail,TOTALCOST,TOTALRETAI L,suppid,ordereddate) select :GLOBAL.REPCID,P.ITEMCODE,P.ITEMDESCRIP
:SYSTEM.MESSAGE_LEVEL v_message_level;
AND :=
CLEAR_MESSAGE; next_record; EXIT WHEN COUNT1_CUR%NOTFOUND; END LOOP; close COUNT1_CUR; open COUNT2_CUR; LOOP fetch COUNT2_CUR into C2ITEMCODE,C2QTY; update REPLENISHMENTORDERDETAIL set COUNT2=C2QTY where ITEMCODE=C2ITEMCODE ORDERID =:GLOBAL.REPCID;
AND
:SYSTEM.MESSAGE_LEVEL := v_message_level; CLEAR_MESSAGE; next_record; EXIT WHEN COUNT2_CUR%NOTFOUND;
END LOOP; close COUNT2_CUR; FORMS_DDL('commit'); open COUNT3_CUR;
CLEAR_MESSAGE;
LOOP fetch COUNT3_CUR into C3ITEMCODE,C3QTY;
call_form('c:\247\frmorderdetailadd.fmx',HIDE,DO_R EPLACE);
update REPLENISHMENTORDERDETAIL
end if;
set COUNT3=C3QTY
\END IF;
where ITEMCODE=C3ITEMCODE ORDERID =:GLOBAL.REPCID;
AND
END;
:SYSTEM.MESSAGE_LEVEL := v_message_level;
BTNCLOSE
CLEAR_MESSAGE;
IF SHOW_ALERT('CLOSE') = ALERT_BUTTON1 THEN
next_record; EXIT WHEN COUNT3_CUR%NOTFOUND;
EXIT_FORM(NO_COMMIT);
END LOOP;
END IF;
close COUNT3_CUR; Screen no: 4 open COUNT4_CUR;
Screen name: CREATE RECEIVING ADVICE
LOOP
Description: Allows the user to create new receive products.
fetch COUNT4_CUR into C4ITEMCODE,C4QTY; update REPLENISHMENTORDERDETAIL set COUNT4=C4QTY where ITEMCODE=C4ITEMCODE AND ORDERID =:GLOBAL.REPCID; :SYSTEM.MESSAGE_LEVEL := v_message_level; CLEAR_MESSAGE; next_record; EXIT WHEN COUNT4_CUR%NOTFOUND; END LOOP;
Object name:
close COUNT4_CUR;
Trigger level: form level Trigger name: When-new-form-instance
open COUNT5_CUR;
DECLARE
LOOP
N NUMBER;
fetch COUNT5_CUR into C5ITEMCODE,C5QTY;
begin
update REPLENISHMENTORDERDETAIL
select max(recid)
set COUNT5=C5QTY where ITEMCODE=C5ITEMCODE ORDERID =:GLOBAL.REPCID;
into N AND
:SYSTEM.MESSAGE_LEVEL := v_message_level; CLEAR_MESSAGE; next_record; EXIT WHEN COUNT5_CUR%NOTFOUND; END LOOP; close COUNT5_CUR;
from receivinglist; IF N IS NULL THEN :GLOBAL.RECID:=1000000000; ELSE :GLOBAL.RECID:=N+1; END IF; :blkcreaterec.recuserid:=:GLOBAL.USERID;
:BLKCREATEREC.CREATERECID:=:GLOBAL.RE CID;
MESSAGE('You have not chosen a Supplier');
:blkcreaterec.createrecdate:=to_char(sysdate,'DD/Mon /YYYY');
else
:BLKCREATEREC.DATEDAY:=TO_CHAR(SYSD ATE,'MONTH DD, YYYY')||' '||TO_CHAR(SYSDATE,'DAY');
execute_query;
SET_MENU_ITEM_PROPERTY('MENU1.HOME',E NABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.PRODU CTMANAGEMENT',ENABLED,PROPERTY_FALS E);
MESSAGE('You have not chosen a Supplier'); next_block; end if; end; Object name: ORDRIGHT Trigger level: Item level
SET_MENU_ITEM_PROPERTY('MENU1.REPORT S',ENABLED,PROPERTY_FALSE);
Trigger name: When-button-pressed
SET_MENU_ITEM_PROPERTY('MENU1.MAINTE NANCE',ENABLED,PROPERTY_FALSE);
:blkCREATEREC.CREATERECDATE:=:blkCREAT EREC.CREATERECDATE+1;
SET_MENU_ITEM_PROPERTY('MENU1.LOGOU T',ENABLED,PROPERTY_FALSE);
end;
begin
end; Object name: BTNADD Object name: BTNSEARCH Trigger level: Item level Trigger name: When-button-pressed declare a_value_chosen BOOLEAN; n NUMBER; btn_loan ITEM; begin a_value_chosen := Show_Lov('lov26'); if not a_value_chosen then
Trigger level: Item level Trigger name: When-button-pressed declare n number; btn number(2); BEGIN IF :BLKcreaterec.createrecsupp IS NULL OR :BLKcreaterec.createrecdate IS NULL OR :BLKcreaterec.createrecno IS NULL THEN
MESSAGE('You have not chosen a Supplier');
set_alert_property('PRODFILLUP',alert_message_text ,'PLEASE FILLED UP COMPLETELY');
MESSAGE('You have not chosen a Supplier');
n:=show_alert('PRODFILLUP');
else
else IF show_alert('ADD')=alert_button1 then
next_block;
select firstname into
execute_query;
:global.nameid
end if;
from userlist
end;
where userid=:blkcreaterec.recuserid; :GLOBAL.RECID:= :blkcreaterec.createrecid;
Object name: ORDLEFT
INSERT INTO receivinglist
Trigger level: Item level
(RECID,DATERECEIVED,DELIVERYDOCNO, SUPPDESCRIPTION,noofitems,totalcost,totalretail,R ECSTATUS,CREATEDBY)
Trigger name: When-button-pressed declare a_value_chosen BOOLEAN; n NUMBER; btn_loan ITEM;
VALUES ( :BLKcreaterec.createrecid, :BLKcreaterec.createrecdate,
a_value_chosen := Show_Lov('lov26');
:BLKcreaterec.createrecno, :BLkcreaterec.createrecsupp,'0','0','0','CREATED',:GL OBAL.nameid);
if not a_value_chosen then
FORMS_DDL('COMMIT');
begin
CLEAR_MESSAGE; CALL_form('c:\247\frmreceivingadvicedetailadd.fmx' ,HIDE,DO_REPLACE); end if; END IF; END; Object name: BTNCANCEL Trigger level: Item level Trigger name: When-button-pressed EXIT_FORM;
:BLKCREATERET.DATEDAY:=TO_CHAR(SYSD ATE,'MONTH DD, YYYY')||' '||TO_CHAR(SYSDATE,'DAY'); SET_MENU_ITEM_PROPERTY('MENU1.HOME',E NABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.PRODU CTMANAGEMENT',ENABLED,PROPERTY_FALS E); SET_MENU_ITEM_PROPERTY('MENU1.REPORT S',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.MAINTE NANCE',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.LOGOU T',ENABLED,PROPERTY_FALSE); end;
Screen no: 5 Screen name: CREATE RETURN
Object name: BTNSEARCH
Description: Allows the user to create return products.
Trigger level: item level Trigger name: When-button-pressed declare a_value_chosen BOOLEAN; n NUMBER; btn_loan ITEM; begin a_value_chosen := Show_Lov('lov26'); if not a_value_chosen then
Object name: Trigger level: form level Trigger name: When-new form instance
MESSAGE('You have not chosen a Supplier'); MESSAGE('You have not chosen a Supplier'); else next_block; execute_query;
DECLARE N NUMBER;
end if; end;
begin select max(retid) into N from RETURNLIST; IF N IS NULL THEN :GLOBAL.RETID:=2000000000;
Object name: ORDLEFT Trigger level: item level Trigger name: When-button-pressed BEGIN
ELSE
:blkCREATERET.CREATERETDATE:=:blkCREAT ERET.CREATERETDATE-1;
:GLOBAL.RETID:=N+1;
END;
END IF; :blkcreatereT.reTuserid:=:GLOBAL.USERID;
Object name: ORDRIGHT
:BLKCREATERET.CREATERETID:=:GLOBAL.RE TID;
Trigger level: item level
:blkcreatereT.createreTdate:=to_char(sysdate,'DD/Mo n/YYYY');
begin
Trigger name: When-button-pressed :blkCREATERET.CREATERETDATE:=:blkCREAT ERET.CREATERETDATE+1;
end;
Screen no: 6
Object name: BTNADD
Screen name: CREATE RETURN LIST PRODUCT FOR REPLENISHMENT ORDER
Trigger level: item level Trigger name: When-button-pressed
OF
Description: Allows the user to view the products in critical level and ordered it from supplier.
declare n number; btn number(2); BEGIN IF :BLKcreatereT.createreTsupp IS NULL OR :BLKcreatereT.createreTdate IS NULL THEN set_alert_property('PRODFILLUP',alert_message_text ,'PLEASE FILLED UP COMPLETELY'); n:=show_alert('PRODFILLUP'); else IF show_alert('ADD')=alert_button1 then
Object name:
select firstname
Trigger level: form level
into
Trigger name: When-new form instance
:global.nameid
from userlist
DECLARE
where userid=:blkcreateret.retuserid;
v_message_level
:GLOBAL.RETID:= :blkcreatereT.createreTid;
PLS_INTEGER := :SYSTEM.MESSAGE_LEVEL;
INSERT INTO RETURNLIST (RETID,RETURNDATE,SUPPDESCRIPTION,noofit ems,totalcost,totalretail,RETSTATUS,CREATEDBY)
WHERE_STRING VARCHAR2(200);
VALUES (:BLKcreatereT.createreTid,:BLKcreatereT.createreT date,:BLkcreatereT.createreTsupp,'0','0','0','IN PROCESS',:GLOBAL.nameid); FORMS_DDL('COMMIT'); CLEAR_MESSAGE; CALL_form('c:\247\FRMRETURNADD.fmx',HIDE, DO_REPLACE); end if; END IF; END;
Object name: BTNCANCEL Trigger level: item level Trigger name: When-button-pressed EXIT_FORM;
LINE NUMBER; MAXCAT NUMBER; cursor CRI_CUR Is select ITEMCODE,ITEMDESCRIPTION,COUNT,COUNT 1,COUNT2,COUNT3,COUNT4,COUNT5,AVERAG E from CRITICAL; BEGIN SELECT COUNT(ITEMCODE) INTO LINE FROM CRITICAL; SELECT MAX(CATID) INTO MAXCAT FROM CATEGORY; :GLOBAL.MA:=MAXCAT/2; IF LINE > 0 THEN IF :GLOBAL.CRITICAL=3 THEN Set_Block_Property('CRITICAL',DEFAULT_WHER E,''); GO_BLOCK('CRITICAL'); EXECUTE_QUERY; ELSIF :GLOBAL.CRITICAL=1 THEN
Set_Block_Property('CRITICAL', DEFAULT_WHERE,'ITEMCODE P.ITEMCODE FROM PRODUCT P.CATID > :GLOBAL.MA)');
IN(SELECT P WHERE
SET_MENU_ITEM_PROPERTY('MENU1.LOGOU T',ENABLED,PROPERTY_FALSE); END;
GO_BLOCK('CRITICAL'); EXECUTE_QUERY;
Object name: BTNBATCH1
ELSIF :GLOBAL.CRITICAL =2 THEN
Trigger level: item level
Set_Block_Property('CRITICAL', DEFAULT_WHERE,'ITEMCODE P.ITEMCODE FROM PRODUCT P.CATID <= :GLOBAL.MA)');
Trigger name: When-button-pressed IN(SELECT P WHERE
EXECUTE_QUERY;
Set_Block_Property('CRITICAL', DEFAULT_WHERE,'ITEMCODE P.ITEMCODE FROM PRODUCT P.CATID > :GLOBAL.MA)');
END IF;
GO_BLOCK('CRITICAL');
GO_BLOCK('CRITICAL');
IN(SELECT P WHERE
EXECUTE_QUERY; :BLKC.BTN1:=TO_CHAR((TO_DATE(SYSDATE)5),'DY'); :BLKC.BTN2:=TO_CHAR((TO_DATE(SYSDATE)4),'DY'); :BLKC.BTN3:=TO_CHAR((TO_DATE(SYSDATE)3),'DY'); :BLKC.BTN4:=TO_CHAR((TO_DATE(SYSDATE)2),'DY'); :BLKC.BTN5:=TO_CHAR((TO_DATE(SYSDATE)1),'DY'); SET_ITEM_PROPERTY('CRITICAL.COUNT1',PR OMPT_TEXT,to_date(SYSDATE,'DD-MON-YY')5);
Object name: BTNBATCH2 Trigger level: item level Trigger name: When-button-pressed Set_Block_Property('CRITICAL', DEFAULT_WHERE,'ITEMCODE P.ITEMCODE FROM PRODUCT P.CATID <= :GLOBAL.MA)'); GO_BLOCK('CRITICAL'); EXECUTE_QUERY;
SET_ITEM_PROPERTY('CRITICAL.COUNT2',PR OMPT_TEXT,to_date(SYSDATE,'DD-MON-YY')4);
Object name: BTNCREATE
SET_ITEM_PROPERTY('CRITICAL.COUNT3',PR OMPT_TEXT,to_date(SYSDATE,'DD-MON-YY')3);
Trigger name: When-button-pressed
SET_ITEM_PROPERTY('CRITICAL.COUNT4',PR OMPT_TEXT,to_date(SYSDATE,'DD-MON-YY')2); SET_ITEM_PROPERTY('CRITICAL.COUNT5',PR OMPT_TEXT,to_date(SYSDATE,'DD-MON-YY')1); END IF;
IN(SELECT P WHERE
Trigger level: item level call_form('c:\247\FRMCREATEORDER.fmx',HIDE, DO_REPLACE); Object name: BTNPRINT Trigger level: item level Trigger name: When-button-pressed call_form('c:\247\FRMCREATEORDER.fmx',HIDE, DO_REPLACE);
:BLKC.rePuserid:=:GLOBAL.USERID; :BLKC.DATEDAY:=TO_CHAR(SYSDATE,'MONT H DD, YYYY')||' '||TO_CHAR(SYSDATE,'DAY');
Object name: BTNCLOSE
SET_MENU_ITEM_PROPERTY('MENU1.HOME',E NABLED,PROPERTY_FALSE);
Trigger name: When-button-pressed
SET_MENU_ITEM_PROPERTY('MENU1.PRODU CTMANAGEMENT',ENABLED,PROPERTY_FALS E); SET_MENU_ITEM_PROPERTY('MENU1.REPORT S',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.MAINTE NANCE',ENABLED,PROPERTY_FALSE);
Trigger level: item level EXIT_FORM:
Screen no: 6 Screen name: REPLENISHMENT ORDER DETAILS Description: Allows the user to view the products that was ordered from supplier and print it.
INTO :GLOBAL.DATECREATED FROM REPLENISHMENTORDERLIST WHERE ORDERID= :GLOBAL.REPCID; Set_Block_Property('BLKORDERDETAIL', DEFAULT_WHERE,'ORDERID :GLOBAL.REPCID AND FINALORDER > 0');
=
GO_BLOCK('BLKORDERDETAIL'); EXECUTE_QUERY;
Object name: Trigger level: form level Trigger name: When-new form instance DECLARE v_message_level PLS_INTEGER:= :SYSTEM.MESSAGE_LEVEL; ITEM NUMBER; RECLINE NUMBER; C1 VARCHAR2(10); C2 VARCHAR2(10); C3 VARCHAR2(10); C4 VARCHAR2(10); C5 VARCHAR2(10); BEGIN :blkorderlist.repuserid:=:GLOBAL.userid;
Set_Block_Property('RECEIVINGLIST', DEFAULT_WHERE,'DELIVERYDOCNO :GLOBAL.REPCID'); GO_BLOCK('RECEIVINGLIST'); EXECUTE_QUERY;
SET_MENU_ITEM_PROPERTY('MENU1.HOME',E NABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.PRODU CTMANAGEMENT',ENABLED,PROPERTY_FALS E); SET_MENU_ITEM_PROPERTY('MENU1.REPORT S',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.MAINTE NANCE',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.LOGOU T',ENABLED,PROPERTY_FALSE); END;
CLEAR_FORM(NO_COMMIT); GO_BLOCK('BLKORDERLIST');
Object name: BTNBACK
select orderID,userid,datecreated,ordereddate,noofitems,total cost,totalretail,ordstatus,deliverydate into
Trigger level: item level
:BLKorderlist.orderID, :blkorderlist.userid,:BLKorderlist.datecreated, :BLKorderlist.ordereddate, :BLKorderlist.noofitems,:BLKorderlist.totalcost,:blkor derlist.totalretail,:blkorderlist.ordstatus,:blkorderlist.de liverydate from REplenishmentorderlist where orderID = :GLOBAL.REPCID; SELECT MAX(RECID) INTO RECLINE FROM RECEIVINGLIST WHERE DELIVERYDOCNO=:GLOBAL.REPCID; IF RECLINE IS NOT NULL THEN SET_ITEM_PROPERTY('BTNUPLOADREP',VISIB LE,PROPERTY_FALSE);
=
Trigger name: When-button-pressed EXIT_FORM(NO_COMMIT);
Object name: BTNUPLOADREP Trigger level: item level Trigger name: When-button-pressed DECLARE v_message_level PLS_INTEGER:= :SYSTEM.MESSAGE_LEVEL; LINEN NUMBER(5); LINE1 NUMBER(5); IDREC NUMBER(20); N NUMBER(20); DESCRIP VARCHAR2(50); cursor LINE_CUR Is select ITEMDESCRIPTION
END IF;
from RECEIVINGDETAIL
SELECT DATECREATED
where RECID=N
ORDER BY ITEMDESCRIPTION ASC;
AND ITEMDESCRIPTION=DESCRIP;
BEGIN
:SYSTEM.MESSAGE_LEVEL v_message_level;
:GLOBAL.REPCID:=:BLKORDERLIST.ORDERID;
FORMS_DDL('COMMIT');
SELECT MAX(RECID)
CLEAR_MESSAGE;
INTO IDREC
next_record;
FROM RECEIVINGLIST;
LINEN:=LINEN+1;
N:=IDREC+1;
EXIT WHEN LINE_CUR%NOTFOUND;
IF SHOW_ALERT('UPLOADED')=ALERT_BUTTON1 THEN CLEAR_FORM(NO_COMMIT);
:=
END LOOP; CLOSE LINE_CUR; SELECT MAX(LINENO) INTO LINE1
INSERT INTO receivinglist(RECID,DATERECEIVED,DELIVERY DOCNO,SUPPDESCRIPTION,noofitems,totalcost,tot alretail,RECSTATUS,CREATEDBY) SELECT N,TO_CHAR(SYSDATE,'DD/Mon/YYYY'),ORDER ID,:RECEIVINGLIST.SUPPDESCRIPTION,
FROM RECEIVINGDETAIL WHERE RECID=N; UPDATE RECEIVINGDETAIL SET LINENO=LINENO-1 WHERE RECID=N AND LINENO=LINE1; FORMS_DDL('COMMIT'); IF SHOW_ALERT('UPLOAD')=ALERT_BUTTON1 THEN NULL;
noofitems,totalcost,totalretail,'CREATED',USERID FROM replenishmentorderlist
END IF;
WHERE ORDERID=:GLOBAL.REPCID;
:SYSTEM.MESSAGE_LEVEL := v_message_level;
FORMS_DDL('COMMIT');
CLEAR_MESSAGE;
:SYSTEM.MESSAGE_LEVEL v_message_level;
:=
CLEAR_MESSAGE; INSERT INTO RECEIVINGDETAIL(RECID,ITEMDESCRIPTION, QUANTITYRECEIVED, UNITCOST, UNITRETAIL, TOTALCOST, TOTALRETAIL)
CALL_FORM('C:\247\FRMORDERLIST.FMX',HID E,DO_REPLACE); END IF; :SYSTEM.MESSAGE_LEVEL := v_message_level; CLEAR_MESSAGE; END;
SELECT N,ITEMDESCRIPTION,FINALORDER,UNITCOST, UNITRETAIL,TOTALCOST,TOTALRETAIL
Object name: BTNPRINT
FROM REPLENISHMENTORDERDETAIL
Trigger name: When-button-pressed
WHERE ORDERID=:GLOBAL.REPCID
DECLARE
AND FINALORDER > 0;
PL_ID PARAMLIST;
FORMS_DDL('COMMIT');
V_REPORT_ID REPORT_OBJECT;
:SYSTEM.MESSAGE_LEVEL := v_message_level; CLEAR_MESSAGE;
V_REP_SERVER 'reportserver';
LINEN:=1;
V_REPORT_JOB_ID VARCHAR2(25);
open LINE_CUR;
V_SERVER_LENGTH NUMBER;
Trigger level: item level
VARCHAR2(100)
:=
LOOP
V_REP_STATUS VARCHAR2(25);
fetch LINE_CUR into DESCRIP;
COMPUTER_NAME VARCHAR2(50) := 'localhost';
UPDATE RECEIVINGDETAIL SET LINENO=LINEN WHERE RECID=N
BEGIN PL_ID := GET_PARAMETER_LIST('tmpdata');
IF NOT ID_NULL(PL_ID) THEN DESTROY_PARAMETER_LIST(PL_ID); END IF; PL_ID := CREATE_PARAMETER_LIST('tmpdata'); ADD_PARAMETER(PL_ID, text_parameter, 'no');
'paraform',
ADD_PARAMETER(PL_ID, 'P_ORDERID', text_parameter, :BLKORDERLIST.ORDERID); V_REPORT_ID:= FIND_REPORT_OBJECT('RPTORDERID'); V_REPORT_JOB_ID:= RUN_REPORT_OBJECT(V_REPORT_ID, PL_ID); V_SERVER_LENGTH:= LENGTH(GET_REPORT_OBJECT_PROPERTY(V_ REPORT_ID,REPORT_SERVER)); V_REP_STATUS:= REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ; WHILE V_REP_STATUS IN ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
Object name: Trigger level: form level Trigger name: When-new form instance declare v_message_level PLS_INTEGER := :SYSTEM.MESSAGE_LEVEL; REPSTAT VARCHAR2(11); C1 VARCHAR2(10); C2 VARCHAR2(10); C3 VARCHAR2(10); C4 VARCHAR2(10); C5 VARCHAR2(10);
MESSAGE('RUNNING REPORT');
BEGIN
V_REP_STATUS:= REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ;
:blkorderlist.repuserid:=:GLOBAL.userid;
END LOOP;
SET_MENU_ITEM_PROPERTY('MENU1.PRODU CTMANAGEMENT',ENABLED,PROPERTY_FALS E);
WEB.SHOW_DOCUMENT('/reports/rwservlet/getjob id'||SUBSTR(V_REPORT_JOB_ID,V_SERVER_LE NGTH+2)||'?server='||V_Rep_Server,'_blank'); END;
SET_MENU_ITEM_PROPERTY('MENU1.HOME',E NABLED,PROPERTY_FALSE);
SET_MENU_ITEM_PROPERTY('MENU1.REPORT S',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.MAINTE NANCE',ENABLED,PROPERTY_FALSE);
Object name: BTNREC Trigger level: item level
SET_MENU_ITEM_PROPERTY('MENU1.LOGOU T',ENABLED,PROPERTY_FALSE);
Trigger name: When-button-pressed
GO_BLOCK('BLKORDERLIST');
CALL_FORM('C:\247\FRMRECDETAIL.FMX',HID E,DO_REPLACE);
select orderID,userid,datecreated,ordereddate,noofitems,total cost,totalretail,ordstatus,deliverydate into
Screen no: 7
:BLKorderlist.orderID, :blkorderlist.userid,:BLKorderlist.datecreated, :BLKorderlist.ordereddate,
Screen name: REPLENISH ORDER DETAILS Description: Allows the user to view the products that were ordered from supplier and print it.
:BLKorderlist.noofitems,:BLKorderlist.totalcost,:blkor derlist.totalretail,:blkorderlist.ordstatus,:blkorderlist.de liverydate from REplenishmentorderlist where orderID = :GLOBAL.REPCID; :SYSTEM.MESSAGE_LEVEL := v_message_level; SELECT ORDSTATUS INTO REPSTAT
FROM REPLENISHMENTORDERLIST WHERE ORDERID=:GLOBAL.REPCID;
SET_ITEM_PROPERTY('BTNUPDATE',VISIBLE,P ROPERTY_FALSE);
SET_ITEM_PROPERTY('BLKORDERLIST.BTNUP LOAD',VISIBLE,PROPERTY_FALSE);
SET_ITEM_PROPERTY('BTNDELETE',VISIBLE,P ROPERTY_FALSE);
IF (TO_DATE(:BLKORDERLIST.ORDEREDDATE,'D D-MON-YY')TO_DATE(SYSDATE,'DD-MONYY')) >= 2 THEN
SET_ITEM_PROPERTY('BTNEDIT',VISIBLE,PRO PERTY_FALSE);
SET_ITEM_PROPERTY('BTNCRITICAL',VISIBLE, PROPERTY_FALSE); ELSE SET_ITEM_PROPERTY('BTNCRITICAL',VISIBLE, PROPERTY_TRUE); SET_ITEM_PROPERTY('BTNCRITICAL',ENABLE D,PROPERTY_TRUE); END IF;
END IF; END; When Window Close EXIT_FORM; Object name: BTNBACK Trigger level: item level Trigger name: When-button-pressed
:GLOBAL.DATECREATED:=:BLKORDERLIST.D ATECREATED; :BLKORDERLIST.BTN1:=TO_CHAR((TO_DATE(: GLOBAL.DATECREATED)-5),'DY'); :BLKORDERLIST.BTN2:=TO_CHAR((TO_DATE(: GLOBAL.DATECREATED)-4),'DY'); :BLKORDERLIST.BTN3:=TO_CHAR((TO_DATE(: GLOBAL.DATECREATED)-3),'DY'); :BLKORDERLIST.BTN4:=TO_CHAR((TO_DATE(: GLOBAL.DATECREATED)-2),'DY'); :BLKORDERLIST.BTN5:=TO_CHAR((TO_DATE(: GLOBAL.DATECREATED)-1),'DY');
CALL_FORM('C:\247\FRMORDERLIST.FMX',HID E,DO_REPLACE);
Object name: BTNUPLOAD Trigger level: item level Trigger name: When-button-pressed MESSAGE('A'); UPDATE REPLENISHMENTORDERLIST SET ORDSTATUS= 'IN PROCESS' WHERE ORDERID=:BLKORDERLIST.ORDERID;
SET_ITEM_PROPERTY('BLKORDERDETAIL.CO UNT1',PROMPT_TEXT,to_date(:GLOBAL.DATEC REATED,'DD-MON-YY')-5);
Object name: BTNCRITICAL
SET_ITEM_PROPERTY('BLKORDERDETAIL.CO UNT2',PROMPT_TEXT,to_date(:GLOBAL.DATEC REATED,'DD-MON-YY')-4);
Trigger level: item level
SET_ITEM_PROPERTY('BLKORDERDETAIL.CO UNT3',PROMPT_TEXT,to_date(:GLOBAL.DATEC REATED,'DD-MON-YY')-3);
UPDATE REPLENISHMENTORDERLIST
Trigger name: When-button-pressed SET ORDSTATUS= 'IN PROCCESS' WHERE ORDERID=:BLKORDERLIST.ORDERID;
SET_ITEM_PROPERTY('BLKORDERDETAIL.CO UNT4',PROMPT_TEXT,to_date(:GLOBAL.DATEC REATED,'DD-MON-YY')-2);
FORMS_DDL('COMMIT'); Set_Block_Property('BLKORDERDETAIL', DEFAULT_WHERE,'ORDERID = :GLOBAL.REPCID AND ITEMCODE IN(SELECT C.ITEMCODE FROM CRITICAL C)' );
SET_ITEM_PROPERTY('BLKORDERDETAIL.CO UNT5',PROMPT_TEXT,to_date(:GLOBAL.DATEC REATED,'DD-MON-YY')-1); Set_Block_Property('BLKORDERDETAIL', DEFAULT_WHERE,'ORDERID :GLOBAL.REPCID'); GO_BLOCK('BLKORDERDETAIL');
GO_BLOCK('BLKORDERDETAIL'); =
EXECUTE_QUERY;
EXECUTE_QUERY; SET_ITEM_PROPERTY('BTNUPLOAD',VISIBLE,P ROPERTY_TRUE);
:SYSTEM.MESSAGE_LEVEL := v_message_level;
SET_ITEM_PROPERTY('BTNUPLOAD',ENABLED ,PROPERTY_TRUE);
CLEAR_MESSAGE;
GO_ITEM('ORDERQTY');
IF REPSTAT = 'ORDERED' THEN
SET_ITEM_PROPERTY('BTNCRITICAL',VISIBLE, PROPERTY_FALSE);
SET_ITEM_PROPERTY('BTNCRITICAL',VISIBLE, PROPERTY_FALSE);
Object name: BTNPRINT
V_REPORT_JOB_ID:= RUN_REPORT_OBJECT(V_REPORT_ID, PL_ID);
Trigger level: item level
V_SERVER_LENGTH:= LENGTH(GET_REPORT_OBJECT_PROPERTY(V_ REPORT_ID,REPORT_SERVER));
Trigger name: When-button-pressed DECLARE PL_ID PARAMLIST; V_REPORT_ID REPORT_OBJECT; V_REP_SERVER 'reportserver';
VARCHAR2(100)
:=
V_REP_STATUS:= REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ; WHILE
MESSAGE('W');
V_REP_STATUS
IF (TO_DATE(:BLKORDERLIST.ORDEREDDATE,'D D-MON-YY')TO_DATE(SYSDATE,'DD-MONYY')) >= 2 THEN
IN ('RUNNING','OPENING_REPORT','ENQUEUED')
SET_ITEM_PROPERTY('BTNCRITICAL',VISIBLE, PROPERTY_FALSE);
LOOP MESSAGE('RUNNING REPORT');
MESSAGE('FHDFH');
V_REP_STATUS:= REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ;
ELSE
END LOOP;
SET_ITEM_PROPERTY('BTNCRITICAL',VISIBLE, PROPERTY_TRUE);
WEB.SHOW_DOCUMENT('/reports/rwservlet/getjob id'||SUBSTR(V_REPORT_JOB_ID,V_SERVER_LE NGTH+2)||'?server='||V_Rep_Server,'_blank');
SET_ITEM_PROPERTY('BTNCRITICAL',ENABLE D,PROPERTY_TRUE);
END;
MESSAGE('W'); END IF;
Object name: BTNDELETE
Set_Block_Property('BLKORDERDETAIL', DEFAULT_WHERE,'ORDERID :GLOBAL.REPCID');
=
Trigger level: item level Trigger name: When-button-pressed
GO_BLOCK('BLKORDERDETAIL');
if show_alert('DELETE')=alert_button1 then
EXECUTE_QUERY;
DELETE REPLENISHMENTORDERLIST
SET_ITEM_PROPERTY('BTNUPLOAD',VISIBLE,P ROPERTY_FALSE);
WHERE ORDERID=:BLKORDERLIST.ORDERID;
V_REPORT_JOB_ID VARCHAR2(25);
DELETE REPLENISHMENTORDERDETAIL
V_SERVER_LENGTH NUMBER;
WHERE ORDERID=:BLKORDERLIST.ORDERID;
V_REP_STATUS VARCHAR2(25);
forms_ddl('COMMIT');
COMPUTER_NAME VARCHAR2(50) := 'localhost';
clear_form(no_commit);
forms_ddl('COMMIT');
CLEAR_MESSAGE; BEGIN PL_ID := GET_PARAMETER_LIST('tmpdata');
call_form('c:\247\frmORDERLIST.fmx',hide,do_repla ce);
IF NOT ID_NULL(PL_ID) THEN
end if;
DESTROY_PARAMETER_LIST(PL_ID); END IF;
Object name: BTNUPLOAD
PL_ID := CREATE_PARAMETER_LIST('tmpdata');
Trigger level: item level
ADD_PARAMETER(PL_ID, text_parameter, 'no');
Trigger name: When-button-pressed
'paraform',
ADD_PARAMETER(PL_ID, 'P_ORDERID', text_parameter, :BLKORDERLIST.ORDERID); V_REPORT_ID:= FIND_REPORT_OBJECT('RPTORDERID');
DECLARE v_message_level PLS_INTEGER := :SYSTEM.MESSAGE_LEVEL; QTYREC NUMBER; BEGIN :GLOBAL.REPCID:=:BLKORDERLIST.ORDERID;
SELECT MAX(FINALORDER)
v_message_level
INTO QTYREC
PLS_INTEGER:= :SYSTEM.MESSAGE_LEVEL;
FROM REPLENISHMENTORDERDETAIL
cursor REPLIST_CUR Is select ORDERID,DATECREATED, ORDEREDDATE, NOOFITEMS, TOTALCOST,TOTALRETAIL, ORDSTATUS
WHERE ORDERID=:GLOBAL.REPCID; IF QTYREC > 0 THEN IF SHOW_ALERT('UPDATE')=ALERT_BUTTON1 THEN CLEAR_FORM(NO_COMMIT); UPDATE REPLENISHMENTORDERLIST SET ORDSTATUS= 'ORDERED' WHERE ORDERID=:GLOBAL.REPCID; FORMS_DDL('COMMIT'); :SYSTEM.MESSAGE_LEVEL := v_message_level; CLEAR_MESSAGE; IF SHOW_ALERT('UPDATED') = ALERT_BUTTON1 THEN CALL_FORM('C:\247\FRMORDERLIST.FMX',HID E,DO_REPLACE);
from REPLENISHMENTORDERLIST ORDER BY ORDEREDDATE DESC; BEGIN :blKsearch.REPlUSERID:=:GLOBAL.userid; select max(orderid) into :GLOBAL.lorderid from replenishmentorderlist; if :GLOBAL.lorderid IS NOT NULL THEN :SYSTEM.MESSAGE_LEVEL := v_message_level; CLEAR_MESSAGE;
END IF;
GO_BLOCK('BLKORDERLIST');
END IF;
EXECUTE_QUERY;
ELSE
CLEAR_MESSAGE;
IF SHOW_ALERT('EMPTY')=ALERT_BUTTON1 THEN
END IF; END;
GO_ITEM('ORDERQTY'); END IF;
Object name: BTNSEARCH
END IF;
Trigger level: item level
END;
Trigger name: When-button-pressed IF :BLKSEARCH.REPIDLIST IS NOT NULL THEN
Screen no: 8 Screen name: REPLENISH ORDER LIST Description: Allows the user to view the products that were ordered from supplier and print it.
Set_Block_Property('BLKORDERLIST', DEFAULT_WHERE,'ORDERID=:BLKSEARCH.RE PIDLIST'); GO_BLOCK('BLKORDERLIST'); EXECUTE_QUERY; ELSIF :BLKSEARCH.REPSTLIST IS NOT NULL AND :BLKSEARCH.REPFRLIST IS NOT NULL AND :BLKSEARCH.REPTOLIST IS NOT NULL THEN :GLOBAL.FR:=TO_DATE(:BLKSEARCH.REPFRLI ST,'DD-MON-YY'); :GLOBAL.TO:=TO_DATE(:BLKSEARCH.REPTOL IST,'DD-MON-YY'); IF :GLOBAL.FR = :GLOBAL.TO THEN
Object name: Trigger level: form level Trigger name: When-new form instance DECLARE
Set_Block_Property('BLKORDERLIST', DEFAULT_WHERE,'DATECREATED :GLOBAL.FR AND ORDSTATUS :BLKSEARCH.REPSTLIST'); GO_BLOCK('BLKORDERLIST'); EXECUTE_QUERY; ELSE
= =
Set_Block_Property('BLKORDERLIST', DEFAULT_WHERE,'(DATECREATED >=:GLOBAL.FR AND DATECREATED :GLOBAL.TO )AND ORDSTATUS :BLKSEARCH.REPSTLIST');
call_form('c:\247\FRMCREATEORDER.fmx',HIDE, DO_REPLACE); <= =
Object name: BTNVIEW
GO_BLOCK('BLKORDERLIST');
Trigger level: item level
EXECUTE_QUERY;
Trigger name: When-button-pressed
END IF;
:GLOBAL.REpcID := :BLKorderLIST.orderID;
ELSIF :BLKSEARCH.REPFRLIST IS NOT NULL AND :BLKSEARCH.REPTOLIST IS NOT NULL THEN
IF :BLKorderLIST.ORDSTATUS = 'AT STORE' then
:GLOBAL.FR:=TO_DATE(:BLKSEARCH.REPFRLI ST,'DD-MON-YY');
ELSE
:GLOBAL.TO:=TO_DATE(:BLKSEARCH.REPTOL IST,'DD-MON-YY');
CALL_form('c:\247\frmorderdetail.fmx',HIDE,DO_R EPLACE); CALL_form('c:\247\frmorderdetailadd.fmx',HIDE,DO _REPLACE); end if;
IF :GLOBAL.FR = :GLOBAL.TO THEN Set_Block_Property('BLKORDERLIST', DEFAULT_WHERE,'DATECREATED :GLOBAL.FR');
=
Screen no: 9 Screen name: HOME Description: Allows the user to view or select the given menus and pending list if ever.
GO_BLOCK('BLKORDERLIST'); EXECUTE_QUERY; ELSE Set_Block_Property('BLKORDERLIST', DEFAULT_WHERE,'DATECREATED >=:GLOBAL.FR AND DATECREATED :GLOBAL.TO');
<=
GO_BLOCK('BLKORDERLIST'); EXECUTE_QUERY; END IF; ELSIF :BLKSEARCH.REPSTLIST IS NOT NULL THEN Set_Block_Property('BLKORDERLIST', DEFAULT_WHERE,'ORDSTATUS=:BLKSEARCH. REPSTLIST'); GO_BLOCK('BLKORDERLIST'); EXECUTE_QUERY; END IF; Object name: BTNRESET Trigger level: item level Trigger name: When-button-pressed Set_Block_Property('BLKORDERLIST', DEFAULT_WHERE,''); GO_BLOCK('BLKORDERLIST'); EXECUTE_QUERY;
Object name: Trigger level: form level Trigger name: When-new form instance DECLARE CITEMCODE NUMBER; CQTY NUMBER; C1ITEMCODE NUMBER; C1QTY NUMBER; C2ITEMCODE NUMBER; C2QTY NUMBER; C3ITEMCODE NUMBER; C3QTY NUMBER; C4ITEMCODE NUMBER;
Object name: BTNRESET Trigger level: item level Trigger name: When-button-pressed
C4QTY NUMBER; C5ITEMCODE NUMBER; C5QTY NUMBER; AITEMCODE NUMBER;
AC NUMBER; AC1 NUMBER;
TO_CHAR(po.BUSINESSDATE,'DD-MONYY')=TO_DATE(SYSDATE,'DD-MON-YY')-2
AC2 NUMBER;
GROUP BY po.ITEMCODE;
AC3 NUMBER;
cursor count5_cur is select pos.ITEMCODE,SUM(pos.TRANQTY) as c5qty
AC4 NUMBER; AC5 NUMBER; AVE NUMBER;
from POSTRANSACTIONDETAIL pos where
ASUPP NUMBER;
TO_CHAR(pos.BUSINESSDATE,'DD-MONYY')=TO_DATE(SYSDATE,'DD-MON-YY')-1
QTYAVE NUMBER;
GROUP BY pos.ITEMCODE;
N NUMBER;
cursor AVE_cur is
N1 VARCHAR2(15);
select A.ITEMCODE,A.COUNT,A.COUNT1,A.COUNT2, A.COUNT3,A.COUNT4,A.COUNT5,A.SUPPID
MAXCAT NUMBER; ORDID NUMBER; ORDID1 NUMBER; ORD NUMBER; ORD1 NUMBER; ONDAY VARCHAR2(5); CITEM NUMBER; v_message_level PLS_INTEGER := :SYSTEM.MESSAGE_LEVEL; cursor count1_cur is select ITEMCODE,SUM(TRANQTY)as c1qty from POSTRANSACTIONDETAIL where TO_CHAR(BUSINESSDATE,'DD-MONYY')=TO_DATE(SYSDATE,'DD-MON-YY')-5 GROUP BY ITEMCODE; cursor count2_cur is select POST.ITEMCODE,SUM(POST.TRANQTY)as c2qty from POSTRANSACTIONDETAIL POST where TO_CHAR(POST.BUSINESSDATE,'DDMON-YY')=TO_DATE(SYSDATE,'DD-MON-YY')4 GROUP BY POST.ITEMCODE;
from CRITICAL A; BEGIN :SYSTEM.MESSAGE_LEVEL := v_message_level; CLEAR_MESSAGE; DELETE CRITICAL; FORMS_DDL('COMMIT'); Insert into CRITICAL(itemcode,itemdescription,COUNT,COUN T1,COUNT2,COUNT3,COUNT4,COUNT5,AVERA GE,suppid) select P.ITEMCODE,P.ITEMDESCRIPTION,P.PRODQTY ,0,0,0,0,0,0,P.SUPPID FROM PRODUCTMASTERLIST P WHERE P.SUPPID=33300; FORMS_DDL('COMMIT'); GO_ITEM('BTNCLOSE'); open COUNT1_CUR; LOOP fetch COUNT1_CUR into C1ITEMCODE,C1QTY; update CRITICAL set COUNT1=C1QTY
cursor count3_cur is select p.ITEMCODE,SUM(p.TRANQTY) as c3qty
where ITEMCODE=C1ITEMCODE ;
from POSTRANSACTIONDETAIL p
:SYSTEM.MESSAGE_LEVEL v_message_level;
where TO_CHAR(p.BUSINESSDATE,'DD-MONYY')=TO_DATE(SYSDATE,'DD-MON-YY')-3
CLEAR_MESSAGE; FORMS_DDL('COMMIT');
GROUP BY p.ITEMCODE; cursor count4_cur is select po.ITEMCODE,SUM(po.TRANQTY) as c4qty from POSTRANSACTIONDETAIL po where
next_record; EXIT WHEN COUNT1_CUR%NOTFOUND; END LOOP; close COUNT1_CUR; open COUNT2_CUR;
:=
LOOP
where ITEMCODE=C5ITEMCODE;
fetch COUNT2_CUR into C2ITEMCODE,C2QTY;
:SYSTEM.MESSAGE_LEVEL v_message_level;
update CRITICAL
CLEAR_MESSAGE;
set COUNT2=C2QTY
FORMS_DDL('COMMIT');
where ITEMCODE=C2ITEMCODE; :SYSTEM.MESSAGE_LEVEL v_message_level;
:=
:=
next_record; EXIT WHEN COUNT5_CUR%NOTFOUND;
CLEAR_MESSAGE
END LOOP;
FORMS_DDL('COMMIT');
close COUNT5_CUR;
next_record; open AVE_CUR;
EXIT WHEN COUNT2_CUR%NOTFOUND;
LOOP
END LOOP;
fetch AVE_CUR
close COUNT2_CUR;
into AITEMCODE,AC,AC1,AC2,AC3,AC4,AC5,ASUPP;
open COUNT3_CUR; LOOP fetch COUNT3_CUR into C3ITEMCODE,C3QTY; update CRITICAL
update CRITICAL set AVERAGE=AVE
set COUNT3=C3QTY
where ITEMCODE=AITEMCODE;
where ITEMCODE=C3ITEMCODE; :SYSTEM.MESSAGE_LEVEL v_message_level;
AVE:=(AC4+AC5)/2;
:=
FORMS_DDL('COMMIT'); QTYAVE:=AC-AVE;
CLEAR_MESSAGE;
IF QTYAVE >= 10 THEN
FORMS_DDL('COMMIT');
DELETE CRITICAL
next_record;
WHERE ITEMCODE=AITEMCODE;
EXIT WHEN COUNT3_CUR%NOTFOUND;
FORMS_DDL('COMMIT');
END LOOP;
END IF; :SYSTEM.MESSAGE_LEVEL := v_message_level;
close COUNT3_CUR;
CLEAR_MESSAGE;
open COUNT4_CUR; LOOP
next_record;
fetch COUNT4_CUR into C4ITEMCODE,C4QTY;
EXIT WHEN AVE_CUR%NOTFOUND;
update CRITICAL
END LOOP; close AVE_CUR;
set COUNT4=C4QTY where ITEMCODE=C4ITEMCODE; :SYSTEM.MESSAGE_LEVEL v_message_level;
:=
CLEAR_MESSAGE; FORMS_DDL('COMMIT'); next_record;
:BLKREC.TXTREC:=' RECEIVING ADVICE'; :BLKRET.TXTRET:=' ANNOUNCEMENT';
:BLKREP.TXTREP:=' REPLENISHMENT ORDER';
EXIT WHEN COUNT4_CUR%NOTFOUND;
:BLKREP.TXTREP1:=' ITEMS ';
END LOOP;
SELECT COUNT(RECID)
close COUNT4_CUR;
INTO N
open COUNT5_CUR;
RETURN
IN CRITICAL LEVEL
FROM RECEIVINGLIST
LOOP
WHERE RECSTATUS='CREATED';
fetch COUNT5_CUR into C5ITEMCODE,C5QTY;
:BLKREC.RECN:=' '||N||' UNPROCESSED';
update CRITICAL
SELECT COUNT(RETID)
set COUNT5=C5QTY
INTO N
FROM RETURNLIST
CALL_FORM('C:\247\FRMRECLIST.FMX',HIDE,D O_REPLACE);
WHERE RETSTATUS='IN PROCESS'; :BLKRET.RETN:=' '||N||' UNPROCESSED'; SELECT MAX(CATID)
Object name: BTNVIEW2
INTO MAXCAT
Trigger level: item level
FROM CATEGORY;
Trigger name: When-button-pressed
SELECT COUNT(ITEMCODE)
CALL_FORM('C:\247\FRMRETURNLIST.FMX',HI DE,DO_REPLACE);
INTO N FROM CRITICAL WHERE ITEMCODE IN (SELECT P.ITEMCODE FROM PRODUCT P WHERE P.CATID >(MAXCAT/2)); :BLKREP.REPORD1:=' '||N||' ITEM /BATCH 1'; SELECT COUNT(ITEMCODE)
Object name: BTNVIEW3 Trigger level: item level Trigger name: When-button-pressed CALL_FORM('C:\247\FRMORDERLIST.FMX',HID E,DO_REPLACE);
INTO N FROM CRITICAL
Object name: BTNVIEW4
WHERE ITEMCODE IN (SELECT P.ITEMCODE FROM PRODUCT P WHERE P.CATID <=(MAXCAT/2));
Trigger level: item level
:BLKREP.REPORD2:=' '||N||' ITEM /BATCH 2'; SELECT COUNT(ORDERID)
Trigger name: When-button-pressed :GLOBAL.CRITICAL:=1; call_form('c:\247\FRMCRITICAL.fmx',HIDE,DO_R EPLACE);
INTO N FROM REPLENISHMENTORDERLIST WHERE ORDSTATUS='IN ORDSTATUS='CREATED' ;
PROCESS'
OR
:BLKREP.REPN:=' '||N||' UNSEND'; :SYSTEM.MESSAGE_LEVEL := v_message_level; CLEAR_MESSAGE; SELECT COUNT(ITEMCODE)
Object name: BTNVIEW5 Trigger level: item level Trigger name: When-button-pressed :GLOBAL.CRITICAL:=2; call_form('c:\247\FRMCRITICAL.fmx',HIDE,DO_R EPLACE);
INTO CITEM FROM CRITICAL; IF CITEM > 0 THEN N1:=SHOW_ALERT('CRITICAL'); IF N1=ALERT_BUTTON1 THEN :GLOBAL.CRITICAL:=3; call_form('c:\247\FRMCRITICAL.fmx',HIDE,DO_R EPLACE); ELSIF N1=ALERT_BUTTON2 THEN call_form('c:\247\FRMCREATEORDER.fmx',HIDE, DO_REPLACE); END IF; END IF; END; Object name: BTNVIEW1 Trigger level: item level Trigger name: When-button-pressed
Object name: MNUHOME Trigger level: item level Trigger name: When-button-pressed call_form('C:\247\HOME.fmx',HIDE,DO_REPLACE) ;
Screen no: 10 Screen name: PRODUCT DETAIL Description: Allows the user to view or select the given menus and pending list if ever create or alter products.
INTO :PRODUCT.SUPPID,:PRODUCT.SUPPNAME from SUPPLIER WHERE SUPPID=:GLOBAL.SUPPID; IF SHOW_LOV('LOV_CATID') THEN SELECT MAX(ITEMCODE) INTO ITEMS FROM PRODUCT Object name: Trigger level: form level Trigger name: When-new form instance DECLARE ITEMS NUMBER;
WHERE SUPPID=:PRODUCT.SUPPID CATID=:PRODUCT.CATID;
AND
IF ITEMS IS NULL OR ITEMS = 0 THEN ITEMS:=:PRODUCT.CATID||:PRODUCT.SUPPID|| 100;
BEGIN
ELSE
IF :GLOBAL.SUPPADD=1 THEN
ITEMS:=ITEMS+1; END IF;
SET_ITEM_PROPERTY('PRODUCT.BTN SAVE',LABEL,'&Add'); SET_ITEM_PROPERTY('PRODUCT.BTN DELETE',LABEL,'&Cancel'); ELSIF :GLOBAL.SUPPADD=2 THEN
:PRODUCT.ITEMCODE:=ITEMS; GO_ITEM('PRODUCT.ITEMDESCRIPTION'); END IF; ELSE GO_ITEM('PRODUCT.BTNSAVE');
SET_ITEM_PROPERTY('PRODUCT.BTN PLUS', ENABLED, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTN SAVE',LABEL,'&Edit');
SET_ITEM_PROPERTY('PRODUCT.BTNSUPPID', ENABLED, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.SUPPNAME', VISIBLE, PROPERTY_FALSE);
SET_ITEM_PROPERTY('PRODUCT.BTNCATID', ENABLED, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTN PLUS', VISIBLE, PROPERTY_FALSE);
SET_ITEM_PROPERTY('PRODUCT.ITEMDESCRI PTION', ENABLED,PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTNSUPPID', VISIBLE, PROPERTY_FALSE);
SET_ITEM_PROPERTY('PRODUCT.MOQ', ENABLED,PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.CATNAME', VISIBLE, PROPERTY_FALSE);
SET_ITEM_PROPERTY('PRODUCT.UNITCOST', ENABLED,PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTNCATID', VISIBLE, PROPERTY_FALSE);
SET_ITEM_PROPERTY('PRODUCT.UNITRETAIL' , ENABLED,PROPERTY_TRUE); SET_ITEM_PROPERTY('PRODUCT.BTN SAVE',LABEL,'&Save'); SET_ITEM_PROPERTY('PRODUCT.BTN DELETE',LABEL,'&Cancel'); SELECT SUPPID,SUPPNAME
SET_ITEM_PROPERTY('PRODUCT.ITEMDESCRI PTION', ENABLED,PROPERTY_FALSE); SET_ITEM_PROPERTY('PRODUCT.MOQ', ENABLED,PROPERTY_FALSE); SET_ITEM_PROPERTY('PRODUCT.UNITCOST', ENABLED,PROPERTY_FALSE);
INTO ITEMS SET_ITEM_PROPERTY('PRODUCT.UNITRETAIL' , ENABLED,PROPERTY_FALSE); SELECT SUPPID,ITEMCODE,ITEMDESCRIPTION,UNITC OST,UNITRETAIL,CATID INTO :PRODUCT.SUPPID,:PRODUCT.ITEMCODE,:PRO DUCT.ITEMDESCRIPTION,:PRODUCT.UNITCOS T,:PRODUCT.UNITRETAIL, :PRODUCT.CATID from PRODUCT WHERE ITEMCODE=:GLOBAL.SUPPADD; CLEAR_MESSAGE; SELECT MOQ
FROM PRODUCT WHERE SUPPID=:PRODUCT.SUPPID CATID=:PRODUCT.CATID;
AND
IF ITEMS IS NULL OR ITEMS = 0 THEN ITEMS:=:PRODUCT.CATID||:PRODUCT.SUPPID|| 100; ELSE ITEMS:=ITEMS+1; END IF; :PRODUCT.ITEMCODE:=ITEMS; GO_ITEM('PRODUCT.ITEMDESCRIPTION'); END IF; END IF; END;
INTO :GLOBAL.MOQ FROM PRODUCT WHERE ITEMCODE=:GLOBAL.SUPPADD;
Object name: BTNCATID Trigger level: item level Trigger name: When-button-pressed
:PRODUCT.MOQ:=RTRIM(:GLOBAL.M OQ,'/pcsk'); END IF;
DECLARE ITEMS NUMBER; BEGIN
SET_MENU_ITEM_PROPERTY('MENU1.HOME',E NABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.PRODU CTMANAGEMENT',ENABLED,PROPERTY_FALS E); SET_MENU_ITEM_PROPERTY('MENU1.REPORT S',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.MAINTE NANCE',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.LOGOU T',ENABLED,PROPERTY_FALSE); END;
IF SHOW_LOV('LOV_CATID') THEN SELECT MAX(ITEMCODE) INTO ITEMS FROM PRODUCT WHERE SUPPID=:PRODUCT.SUPPID CATID=:PRODUCT.CATID;
AND
IF ITEMS IS NULL THEN ITEMS:=:PRODUCT.CATID||:PRODUCT.SUPPID|| 100; ELSE ITEMS:=ITEMS+1;
Object name: BTNSUPPID
END IF;
Trigger level: item level
:PRODUCT.ITEMCODE:=ITEMS;
Trigger name: When-button-pressed
GO_ITEM('PRODUCT.ITEMDESCRIPTION');
DECLARE
END IF;
ITEMS NUMBER;
END ;
BEGIN
Object name: BTNSAVE
IF SHOW_LOV('LOV_SUPPID') THEN
Trigger level: item level Trigger name: When-button-pressed
IF SHOW_LOV('LOV_CATID') THEN SELECT MAX(ITEMCODE)
DECLARE
LUPDATE VARCHAR2(10); PRODUCTITEM VARCHAR2(30); PCS VARCHAR2(5); BEGIN LUPDATE:=GET_ITEM_PROPERTY('BT NSAVE',LABEL); IF LUPDATE='&Edit' THEN
SET_ITEM_PROPERTY('PRODUCT.BTN SAVE',LABEL,'&Save'); IF SHOW_ALERT('SUPPID') ALERT_BUTTON1 THEN
=
GO_ITEM('PRODUCT.BTNSUPPID'); END IF;
SET_ITEM_PROPERTY('BTNSAVE',LAB EL,'&Update');
SET_ITEM_PROPERTY('PRODUCT.SUPPNAME', VISIBLE, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.SUPPNAME', VISIBLE, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTN PLUS', VISIBLE, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTN PLUS', VISIBLE, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTNSUPPID', VISIBLE, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTNSUPPID', VISIBLE, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.CATNAME', VISIBLE, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.CATNAME', VISIBLE, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTNCATID', VISIBLE, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTNCATID', VISIBLE, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTN PLUS', ENABLED, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTN PLUS', ENABLED, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTNSUPPID', ENABLED, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTNSUPPID', ENABLED, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTNCATID', ENABLED, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.BTNCATID', ENABLED, PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.ITEMDESCRI PTION', ENABLED,PROPERTY_TRUE);
SET_ITEM_PROPERTY('PRODUCT.ITEMDESCRI PTION', ENABLED,PROPERTY_TRUE); SET_ITEM_PROPERTY('PRODUCT.MOQ', ENABLED,PROPERTY_TRUE); SET_ITEM_PROPERTY('PRODUCT.CBOXMOQ', ENABLED,PROPERTY_TRUE); SET_ITEM_PROPERTY('PRODUCT.UNITCOST', ENABLED,PROPERTY_TRUE); SET_ITEM_PROPERTY('PRODUCT.UNITRETAIL' , ENABLED,PROPERTY_TRUE); CLEAR_MESSAGE; ELSIF LUPDATE= '&Add' THEN
SET_ITEM_PROPERTY('PRODUCT.MOQ', ENABLED,PROPERTY_TRUE); SET_ITEM_PROPERTY('PRODUCT.CBOXMOQ', ENABLED,PROPERTY_TRUE); SET_ITEM_PROPERTY('PRODUCT.UNITCOST', ENABLED,PROPERTY_TRUE); SET_ITEM_PROPERTY('PRODUCT.UNITRETAIL' , ENABLED,PROPERTY_TRUE); ELSIF :PRODUCT.SUPPID IS NULL :PRODUCT.ITEMDESCRIPTION IS NULL :PRODUCT.MOQ IS NULL :PRODUCT.UNITCOST IS NULL :PRODUCT.UNITRETAIL IS NULL :PRODUCT.CATID IS NULL THEN
AND AND AND AND AND
IF SHOW_ALERT('INC') ALERT_BUTTON1 THEN
=
GO_ITEM('PRODUCT.BTNSUPPID'); END IF; ELSIF :PRODUCT.SUPPID IS NULL :PRODUCT.ITEMDESCRIPTION IS NULL :PRODUCT.MOQ IS NULL :PRODUCT.UNITCOST IS NULL :PRODUCT.UNITRETAIL IS NULL :PRODUCT.CATID IS NULL THEN
OR OR OR OR OR
IF SHOW_ALERT('INC') ALERT_BUTTON1 THEN
=
GO_ITEM('PRODUCT.ITEMDESCRIPTI ON'); END IF; ELSIF :PRODUCT.SUPPID IS NULL :PRODUCT.ITEMDESCRIPTION IS NOT AND :PRODUCT.MOQ IS NOT NULL :PRODUCT.UNITCOST IS NOT NULL :PRODUCT.UNITRETAIL IS NOT NULL :PRODUCT.CATID IS NOT NULL THEN
AND NULL AND AND AND
IF SHOW_ALERT('SUPPID') = ALERT_BUTTON1 THEN GO_ITEM('PRODUCT.BTNSUPPID'); END IF; ELSIF :PRODUCT.SUPPID IS NOT NULL :PRODUCT.ITEMDESCRIPTION IS NULL :PRODUCT.MOQ IS NOT NULL :PRODUCT.UNITCOST IS NOT NULL :PRODUCT.UNITRETAIL IS NOT NULL :PRODUCT.CATID IS NOT NULL THEN
AND AND AND AND AND
IF SHOW_ALERT('ITEMDESCRIPTION') ALERT_BUTTON1 THEN
AND :PRODUCT.MOQ IS NOT NULL AND :PRODUCT.UNITCOST IS NULL AND :PRODUCT.UNITRETAIL IS NOT NULL AND :PRODUCT.CATID IS NOT NULL THEN IF SHOW_ALERT('UNITCOST') = ALERT_BUTTON1 THEN GO_ITEM('PRODUCT.UNITCOST'); END IF; ELSIF :PRODUCT.SUPPID IS NOT NULL AND :PRODUCT.ITEMDESCRIPTION IS NOT NULL AND :PRODUCT.MOQ IS NOT NULL AND :PRODUCT.UNITCOST IS NOT NULL AND :PRODUCT.UNITRETAIL IS NULL AND :PRODUCT.CATID IS NOT NULL THEN IF SHOW_ALERT('UNITRETAIL') ALERT_BUTTON1 THEN
=
GO_ITEM('PRODUCT.UNITRETAIL'); END IF; ELSIF :PRODUCT.SUPPID IS NOT NULL AND :PRODUCT.ITEMDESCRIPTION IS NOT NULL AND :PRODUCT.MOQ IS NOT NULL AND :PRODUCT.UNITCOST IS NOT NULL AND :PRODUCT.UNITRETAIL IS NOT NULL AND :PRODUCT.CATID IS NULL THEN SHOW_ALERT('CATID') THEN
IF = ALERT_BUTTON1
GO_ITEM('PRODUCT.CATID'); END IF;
=
ELSE IF LUPDATE = '&Save' THEN
GO_ITEM('PRODUCT.ITEMDESCRIPTI ON'); END IF; ELSIF :PRODUCT.SUPPID IS NOT NULL AND :PRODUCT.ITEMDESCRIPTION IS NOT NULL AND :PRODUCT.MOQ IS NULL AND :PRODUCT.UNITCOST IS NOT NULL AND :PRODUCT.UNITRETAIL IS NOT NULL AND :PRODUCT.CATID IS NOT NULL THEN SHOW_ALERT('MOQ') THEN
IF = ALERT_BUTTON1
GO_ITEM('PRODUCT.MOQ'); END IF; ELSIF :PRODUCT.SUPPID IS NOT NULL AND :PRODUCT.ITEMDESCRIPTION IS NOT NULL
SELECT COUNT(ITEMDESCRIPTION) INTO :GLOBAL.PRODUCTITEM FROM PRODUCT WHERE ITEMDESCRIPTION = :PRODUCT.ITEMDESCRIPTION;
IF :GLOBAL.PRODUCTITEM > 0 THEN IF SHOW_ALERT('DUPLICATE') ALERT_BUTTON1 THEN
=
NULL;
END IF;
END IF;
END IF;
ELSE
ELSIF LUPDATE= '&Update' THEN
IF SHOW_ALERT('SAVE')=ALERT_BUTTON1 THEN
IF SHOW_ALERT('UPDATE')=ALERT_BUTTON1 THEN
IF :PRODUCT.MOQ = 1 THEN
IF :PRODUCT.MOQ = 1 THEN
PCS:=:PRODUCT.MOQ||'PC'; ELSIF :PRODUCT.MOQ >
PCS:=:PRODUCT.MOQ||'PC';
1 THEN
ELSIF :PRODUCT.MOQ > 1 THEN
PCS:=:PRODUCT.MOQ||'PCS'; PCS:=:PRODUCT.MOQ||'PCS';
END IF; IF
:PRODUCT.MOQ
>
END IF;
0
THEN
IF
INSERT INTO PRODUCT(CATID, ITEMCODE, ITEMDESCRIPTION,MOQ,PACK,UNITCOST,UNI TRETAIL,SUPPID) VALUES(:PRODUCT.CATID, :PRODUCT.ITEMCODE, INITCAP(:PRODUCT.ITEMDESCRIPTION), PCS,:PRODUCT.CBOXMOQ, :PRODUCT.UNITCOST, :PRODUCT.UNITRETAIL, :PRODUCT.SUPPID );
:PRODUCT.MOQ
>
0
THEN UPDATE PRODUCT SET SUPPID = :PRODUCT.SUPPID, ITEMDESCRIPTION = INITCAP(:PRODUCT.ITEMDESCRIPTION), MOQ = PCS,PACK=:PRODUCT.CBOXMOQ, UNITCOST = :PRODUCT.UNITCOST, UNITRETAIL = :PRODUCT.UNITRETAIL, CATID = :PRODUCT.CATID WHERE :PRODUCT.ITEMCODE;
ITEMCODE
=
FORMS_DDL('COMMIT');
FORMS_DDL('COMMIT'); INSERT INTO PRODUCTMASTERLIST(ITEMCODE,PRODQTY, SUPPID, ITEMDESCRIPTION) VALUES(:PRODUCT.ITEMCODE,0,:PRODUCT.S UPPID,INITCAP(:PRODUCT.ITEMDESCRIPTION) );
UPDATE PRODUCTMASTERLIST SET ITEMDESCRIPTION INITCAP(:PRODUCT.ITEMDESCRIPTION)
=
WHERE :PRODUCT.ITEMCODE;
=
ITEMCODE
FORMS_DDL('COMMIT'); IF SHOW_ALERT('UPDATED') ALERT_BUTTON1 THEN
FORMS_DDL('COMMIT');
=
CLEAR_RECORD; SHOW_ALERT('SAVED') THEN
IF = ALERT_BUTTON1
CALL_FORM('C:\247\FRMPRODUCTLIST.FMX',H IDE,DO_REPLACE); END IF;
CALL_FORM('C:\247\FRMPRODUCTLIST.FMX',H IDE,DO_REPLACE); END IF; IF SHOW_ALERT('LESS')= ALERT_BUTTON1 THEN
ELSE IF SHOW_ALERT('LESS')= ALERT_BUTTON1 THEN GO_ITEM('MOQ');
GO_ITEM('MOQ');
END IF;
END IF;
END IF;
END IF;
END IF; END IF;
END IF; END;
SET_ITEM_PROPERTY('PRODUCT.BTNSUPPID', VISIBLE, PROPERTY_FALSE);
Object name: BTNDELETE
SET_ITEM_PROPERTY('PRODUCT.CATNAME', VISIBLE, PROPERTY_FALSE);
Trigger level: item level Trigger name: When-button-pressed
SET_ITEM_PROPERTY('PRODUCT.BTNCATID', VISIBLE, PROPERTY_FALSE);
DECLARE LUPDATE VARCHAR2(10); PRODUCTITEM VARCHAR2(30);
IF :GLOBAL.SUPPADD=1 OR :GLOBAL.SUPPADD=2 THEN
BEGIN LUPDATE:=GET_ITEM_PROPERTY('BT NDELETE',LABEL); IF LUPDATE='&Delete' THEN
SET_ITEM_PROPERTY('BTNSAVE',LABEL,'&Ad d'); ELSE
IF
:PRODUCT.ITEMCODE
IS
NULL
THEN IF SHOW_LOV('LOV_USER') THEN
SET_ITEM_PROPERTY('BTNSAVE',LAB EL,'&Edit'); END IF;
NULL;
CLEAR_FORM(NO_COMMIT);
END IF; ELSE
END IF; END;
IF SHOW_ALERT('DELETE')=ALERT_BUTTON1 THEN DELETE FROM PRODUCT WHERE :PRODUCT.ITEMCODE;
ITEMCODE=
FORMS_DDL('COMMIT'); IF SHOW_ALERT('DELETED') = ALERT_BUTTON1 THEN CLEAR_RECORD;
Object name: BTNCLOSE Trigger level: item level Trigger name: When-button-pressed IF SHOW_ALERT('CLOSE') = ALERT_BUTTON1 THEN EXIT_FORM; END IF; Screen no: 11 Screen name: PRODUCT LIST
CALL_FORM('C:\247\FRMPRODUCTLIS T.FMX',HIDE,DO_REPLACE); END IF; END IF; END IF; ELSIF LUPDATE='&Cancel' THEN SET_ITEM_PROPERTY('BTNDELETE',L ABEL,'&Delete'); SET_ITEM_PROPERTY('PRODUCT.SUP PNAME', VISIBLE, PROPERTY_FALSE); SET_ITEM_PROPERTY('PRODUCT.BTN PLUS', VISIBLE, PROPERTY_FALSE);
Description: Allows the user to view or add new product from the list.
Object name:
Object name: BTNACCOUNT
Trigger level: form level
Trigger level: item level
Trigger name: When-new form instance
Trigger name: When-button-pressed
GO_BLOCK('BLKPROD');
:GLOBAL.SUPPADD:=1;
EXECUTE_QUERY;
CALL_FORM('C:\247\FRMPRODUCTADD.FMX',H IDE,DO_REPLACE);
SET_MENU_ITEM_PROPERTY('MENU1.HOME',E NABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.PRODU CTMANAGEMENT',ENABLED,PROPERTY_FALS E);
Object name: BTNCLOSE
SET_MENU_ITEM_PROPERTY('MENU1.REPORT S',ENABLED,PROPERTY_FALSE);
Trigger name: When-button-pressed
SET_MENU_ITEM_PROPERTY('MENU1.MAINTE NANCE',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.LOGOU T',ENABLED,PROPERTY_FALSE);
Trigger level: item level IF SHOW_ALERT('CLOSE') = ALERT_BUTTON1 THEN EXIT_FORM(NO_COMMIT); END IF;
Screen no: 12
Object name: BTNSEARCH
Screen name: USER LIST
Trigger level: item level
Description: Allows the user to view or add new user from the list.
Trigger name: When-button-pressed IF :BLOCK3.PRODSEARCH IS NOT NULL THEN Set_Block_Property('BLKPROD', DEFAULT_WHERE,'CATID =:BLOCK3.PRODSEARCH ITEMDESCRIPTION :BLOCK3.PRODSEARCH');
OR LIKE
GO_BLOCK('BLKPROD'); EXECUTE_QUERY; END IF; Object name: Object name: BTNRESET Trigger level: item level Trigger name: When-button-pressed Set_Block_Property('BLKPROD', DEFAULT_WHERE,''); GO_BLOCK('BLKPROD');
Trigger level: form level Trigger name: When-new form instance Set_Block_Property('BLKUSER', DEFAULT_WHERE,'USERID <> 711000'); GO_BLOCK('BLKUSER'); EXECUTE_QUERY;
EXECUTE_QUERY;
SET_MENU_ITEM_PROPERTY('MENU1.HOME',E NABLED,PROPERTY_FALSE);
Object name: BTNVIEW
SET_MENU_ITEM_PROPERTY('MENU1.PRODU CTMANAGEMENT',ENABLED,PROPERTY_FALS E);
Trigger level: item level Trigger name: When-button-pressed :GLOBAL.SUPPADD:=:BLKPROD.ITEMCODE; CALL_FORM('C:\247\FRMPRODUCTADD.FMX',H IDE,DO_REPLACE);
SET_MENU_ITEM_PROPERTY('MENU1.REPORT S',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.MAINTE NANCE',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.LOGOU T',ENABLED,PROPERTY_FALSE);
Object name: BTNSEARCH Trigger level: item level Trigger name: When-button-pressed IF :BLKBTN.USERSEARCH IS NOT NULL THEN Set_Block_Property('BLKUSER', DEFAULT_WHERE,'USERID =:BLKBTN.USERSEARCH OR FIRSTNAME :BLKBTN.USERSEARCH OR LASTNAME :BLKBTN.USERSEARCH');
= =
Object name: Trigger level: form level
GO_BLOCK('BLKUSER');
Trigger name: When-new form instance
EXECUTE_QUERY;
DECLARE
END IF;
N NUMBER; BEGIN
Object name: BTNRESET
:USERLIST.HIREDATE:=SYSDATE;
Trigger level: item level
SELECT MAX(USERID)
Trigger name: When-button-pressed
INTO N
Set_Block_Property('BLKUSER', DEFAULT_WHERE,'USERID <> 711000');
FROM USERLIST; IF N IS NULL THEN
GO_BLOCK('BLKUSER');
:USERLIST.USERID := 711001;
EXECUTE_QUERY; :GLOBAL.SUSERID:=:USERLIST.USERID; ELSE
Object name: BTNVIEW
:USERLIST.USERID := N + 1;
Trigger level: item level Trigger name: When-button-pressed :GLOBAL.SUSERID:=:blkuser.userid; call_form('C:\247\FRMUSER.fmx',hide,do_replace);
:GLOBAL.SUSERID:=:USERLIST.USERI D; END IF; GO_ITEM('FIRSTNAME');
Object name: BTNACCOUNT
SELECT USERTYPE
Trigger level: item level
INTO :GLOBAL.UTYPE
Trigger name: When-button-pressed
FROM USERLIST
CALL_FORM('C:\247\FRMUSERADD.FMX',HIDE, DO_REPLACE);
WHERE USERID = :GLOBAL.USERID; IF :GLOBAL.UTYPE ='USER' THEN :USERLIST.ULIST:='USER';
Object name: BTNCLOSE Trigger level: item level Trigger name: When-button-pressed
SET_ITEM_PROPERTY('ULIST',ENABL ED,PROPERTY_FALSE); END IF;
EXIT_FORM;
Screen no: 13 Screen name: USER LIST ADD Description: Allows the user add new user from the list.
SET_MENU_ITEM_PROPERTY('MENU1.HOME',E NABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.PRODU CTMANAGEMENT',ENABLED,PROPERTY_FALS E); SET_MENU_ITEM_PROPERTY('MENU1.REPORT S',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.MAINTE NANCE',ENABLED,PROPERTY_FALSE);
SET_MENU_ITEM_PROPERTY('MENU1.LOGOU T',ENABLED,PROPERTY_FALSE);
IF SHOW_ALERT('LASTNAME') ALERT_BUTTON1 THEN
END;
=
GO_ITEM('USERLIST.LASTNAME'); Object name: BTNSAVE
END IF;
Trigger level: item level Trigger name: When-button-pressed DECLARE LNO NUMBER; BEGIN IF :USERLIST.LASTNAME IS AND :USERLIST.FIRSTNAME IS NULL :USERLIST.MIDNAME IS NULL :USERLIST.HIREDATE IS NULL :USERLIST.USERNAME IS NULL :USERLIST.USERPASS IS NULL :USERLIST.ULIST IS NULL THEN
NULL AND AND AND AND AND
IF SHOW_ALERT('INC') ALERT_BUTTON1 THEN
=
:USERLIST.LASTNAME := ''; :USERLIST.FIRSTNAME := '';
ELSIF :USERLIST.FIRSTNAME IS NULL AND :USERLIST.LASTNAME IS NOT NULL AND :USERLIST.MIDNAME IS NOT NULL AND :USERLIST.HIREDATE IS NOT NULL AND :USERLIST.USERNAME IS NOT NULL AND :USERLIST.USERPASS IS NOT NULL AND :USERLIST.ULIST IS NOT NULL THEN IF SHOW_ALERT('FIRSTNAME') ALERT_BUTTON1 THEN
=
GO_ITEM('USERLIST.FIRSTNAME'); END IF; ELSIF :USERLIST.MIDNAME IS NULL AND :USERLIST.LASTNAME IS NOT NULL AND :USERLIST.FIRSTNAME IS NOT NULL AND :USERLIST.HIREDATE IS NOT NULL AND :USERLIST.USERNAME IS NOT NULL AND :USERLIST.USERPASS IS NOT NULL AND :USERLIST.ULIST IS NOT NULL THEN IF SHOW_ALERT('MIDNAME') = ALERT_BUTTON1 THEN
:USERLIST.MIDNAME := ''; :USERLIST.HIREDATE := '';
GO_ITEM('USERLIST.MIDNAME'); END IF;
:USERLIST.USERNAME := ''; :USERLIST.USERPASS := ''; :USERLIST.ULIST
:=
''; END IF; ELSIF :USERLIST.LASTNAME IS NULL OR :USERLIST.FIRSTNAME IS NULL OR :USERLIST.MIDNAME IS NULL OR :USERLIST.HIREDATE IS NULL OR :USERLIST.USERNAME IS NULL OR :USERLIST.USERPASS IS NULL OR :USERLIST.ULIST IS NULL THEN IF SHOW_ALERT('INC') ALERT_BUTTON1 THEN
=
GO_ITEM('USERLIST.LASTNAME'); END IF; ELSIF :USERLIST.LASTNAME IS NULL AND :USERLIST.FIRSTNAME IS NOT NULL AND :USERLIST.MIDNAME IS NOT NULL AND :USERLIST.HIREDATE IS NOT NULL AND :USERLIST.USERNAME IS NOT NULL AND :USERLIST.USERPASS IS NOT NULL AND :USERLIST.ULIST IS NOT NULL THEN
ELSIF :USERLIST.USERNAME IS NULL AND :USERLIST.LASTNAME IS NOT NULL AND :USERLIST.FIRSTNAME IS NOT NULL AND :USERLIST.MIDNAME IS NOT NULL AND :USERLIST.HIREDATE IS NOT NULL AND :USERLIST.USERPASS IS NOT NULL AND :USERLIST.ULIST IS NOT NULL THEN IF SHOW_ALERT('USERNAME') ALERT_BUTTON1 THEN
=
GO_ITEM('USERLIST.MIDNAME'); END IF; ELSIF :USERLIST.USERPASS IS NULL AND :USERLIST.LASTNAME IS NOT NULL AND :USERLIST.FIRSTNAME IS NOT NULL AND :USERLIST.MIDNAME IS NOT NULL AND :USERLIST.HIREDATE IS NOT NULL AND :USERLIST.USERNAME IS NOT NULL AND :USERLIST.ULIST IS NOT NULL THEN IF SHOW_ALERT('USERPASS') = ALERT_BUTTON1 THEN GO_ITEM('USERLIST.USERPASS');
END IF; CALL_FORM('C:\247\FRMUSERLIST.FM X');
ELSE
END IF;
SELECT USERID, USERNAME INTO :USERLIST.USERNAME
:USERLIST.USERID,
END IF; END;
FROM USERLIST WHERE :USERLIST.USERID OR :USERLIST.USERNAME;
USERID USERNAME
IF SHOW_ALERT('DUPLICATE') ALERT_BUTTON1 THEN
= =
Object name: BTNDELETE Trigger level: item level Trigger name: When-button-pressed
=
NULL; END IF;
CLEAR_FORM(NO_COMMIT);
Object name: BTNCLOSE Trigger level: item level
END IF;
Trigger name: When-button-pressed IF SHOW_ALERT('CLOSE') = ALERT_BUTTON1 THEN
EXCEPTION WHEN NO_DATA_FOUND THEN IF SHOW_ALERT('SAVE')=ALERT_BUTTON1 THEN SELECT MAX(LINENO) INTO LNO FROM USERLIST;
EXIT_FORM; END IF;
Screen no: 14 Screen name: TRANSACTION Description: Allows the user to purchase products from the given categories.
IF LNO IS NULL THEN LNO:=1; ELSE LNO:=LNO+1; END IF; INSERT INTO USERLIST(USERID, LASTNAME, FIRSTNAME, MIDNAME, HIREDATE, USERNAME, USERPASS, USERTYPE, USERSTATUS, LINENO) VALUES(:USERLIST.USERID, INITCAP(:USERLIST.LASTNAME), INITCAP(:USERLIST.FIRSTNAME), INITCAP(:USERLIST.MIDNAME), :USERLIST.HIREDATE, :USERLIST.USERNAME, :USERLIST.USERPASS, :USERLIST.ULIST, 'TRUE', LNO );
Object name: Trigger level: form level Trigger name: When-new form instance DECLARE INDEX1 NUMBER;
FORMS_DDL('COMMIT');
CATNAMES1 VARCHAR2(30); CATIDS1 VARCHAR2(15);
SHOW_ALERT('SAVED') THEN
IF = ALERT_BUTTON1
CATNAMES VARCHAR2(30); CATIDS VARCHAR2(15); v_message_level PLS_INTEGER :SYSTEM.MESSAGE_LEVEL;
:=
DELETE_LIST_ELEMENT('LISTCAT1',INDEX11);
cursor CAT1_CUR Is select CATNAME,CATID from CATEGORY
:SYSTEM.MESSAGE_LEVEL v_message_level;
WHERE CATTYPE = 'Food' ORDER BY CATID ASC;
:=
CLEAR_MESSAGE; INDEX1:=1;
cursor CATNAME,CATID
CAT_CUR
Is
select
LOOP
from CATEGORY WHERE CATTYPE = 'Non-Food' ORDER BY CATID ASC;
fetch CAT_CUR into CATNAMES,CATIDS; ADD_LIST_ELEMENT('LISTCAT',INDEX1,CATN AMES,CATIDS);
BEGIN :SYSTEM.MESSAGE_LEVEL v_message_level;
open CAT_CUR;
:=
:SYSTEM.MESSAGE_LEVEL v_message_level;
:=
CLEAR_MESSAGE; next_record;
CLEAR_MESSAGE;
INDEX1:=INDEX1+1; SELECT MAX(RECEIPTNO)+1
EXIT WHEN CAT_CUR%NOTFOUND;
INTO :blKTRANS.payreceipt
END LOOP;
FROM POSTRANSACTIONLIST;
close CAT_CUR;
IF :blKTRANS.payreceipt IS NULL THEN :BLKTRANS.PAYRECEIPT
:=
:SYSTEM.MESSAGE_LEVEL v_message_level;
10000; END IF; :SYSTEM.MESSAGE_LEVEL v_message_level;
DELETE_LIST_ELEMENT('LISTCAT',INDEX11);
:=
:=
CLEAR_MESSAGE; go_item('listcat');
CLEAR_MESSAGE; GO_BLOCK('BLKCAT');
:GLOBAL.RECEIPT:=:blKTRANS.payreceipt;
GO_ITEM('LISTCAT1');
:BLKCAT.BTNCASHIER:=:GLOBAL.USERID;
INDEX1:=1;
:blKTRANS.PAYCASH:=0; :blKTRANS.PAYCHANGE:=0; :BLKTRANS.PAYTOTAL:=0;
open CAT1_CUR; LOOP
:BLKPOS.TTR:=0;
fetch CAT1_CUR into CATNAMES1,CATIDS1;
:BLKTRANS.DATEDAY:=TO_CHAR(SYSDATE,' DAY')||', '||TO_CHAR(SYSDATE,'MONTH DD, YYYY');
ADD_LIST_ELEMENT('LISTCAT1',INDEX1,CAT NAMES1,CATIDS1); :SYSTEM.MESSAGE_LEVEL v_message_level; CLEAR_MESSAGE; next_record; INDEX1:=INDEX1+1; EXIT WHEN CAT1_CUR%NOTFOUND; END LOOP; close CAT1_CUR;
:=
SET_MENU_ITEM_PROPERTY('MENU1.HOME',E NABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.PRODU CTMANAGEMENT',ENABLED,PROPERTY_FALS E); SET_MENU_ITEM_PROPERTY('MENU1.REPORT S',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.MAINTE NANCE',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.LOGOU T',ENABLED,PROPERTY_FALSE);
cursor POS_CUR Is select ITEMDESCRIPTION,TRANQTY,UNITRETAIL,TO TALRETAIL, LINENO
END ;
Object name: BTNUP Trigger level: item level Trigger name: When-button-pressed
from POSTRANSACTIONDETAIL where RECEIPTNO=:GLOBAL.RECEIPT ORDER BY LINENO DESC;
GO_ITEM('LINENO'); PREVIOUS_RECORD; BEGIN SELECT ITEMDESCRIPTION,UNITCOST,UNITRETAIL
SELECT PRODQTY
INTO :BLKCAT.ITEM,:BLKCAT.UNITCOST,:BLKCAT. UNITRETAIL
FROM PRODUCTMASTERLIST
INTO PRODQTY3 WHERE ITEMDESCRIPTION=:GLOBAL.ITEM;
FROM POSTRANSACTIONDETAIL WHERE RECEIPTNO=:BLKTRANS.PAYRECEIPT AND ITEMDESCRIPTION= :BLKPOS.ITEMDESCRIPTION; :GLOBAL.ITEM:=:BLKCAT.ITEM;
IF :BLKCAT.ITEM IS NULL THEN IF SHOW_ALERT('EMPTY')=ALERT_BUTTON1 THEN
:GLOBAL.UNITCOST:=:BLKCAT.UNITCOST;
go_item('LISTCAT1');
:GLOBAL.UNITRETAIL:=:BLKCAT.UNITRETAIL ;
END IF;
Object name: BTNDOWN Trigger level: item level Trigger name: When-button-pressed NEXT_RECORD; SELECT ITEMDESCRIPTION,UNITCOST,UNITRETAIL INTO :BLKCAT.ITEM,:BLKCAT.UNITCOST,:BLKCAT. UNITRETAIL FROM POSTRANSACTIONDETAIL WHERE RECEIPTNO=:BLKTRANS.PAYRECEIPT AND ITEMDESCRIPTION= :BLKPOS.ITEMDESCRIPTION; :GLOBAL.ITEM:=:BLKCAT.ITEM; :GLOBAL.UNITCOST:=:BLKCAT.UNITCOST; :GLOBAL.UNITRETAIL:=:BLKCAT.UNITRETAIL ; Object name: BTNPLUS Trigger level: item level Trigger name: When-button-pressed DECLARE
ELSE IF PRODQTY3 >= 1 THEN UPDATE POSTRANSACTIONDETAIL SET TRANQTY=TRANQTY+1 WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM; FORMS_DDL('COMMIT'); UPDATE POSTRANSACTIONDETAIL SET TOTALCOST=TOTALCOST+:GLOBAL.UNITCOS T,TOTALRETAIL=TOTALRETAIL+:GLOBAL.UN ITRETAIL WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM; FORMS_DDL('COMMIT'); UPDATE Productmasterlist SET PRODQTY=PRODQTY-1 WHERE :GLOBAL.ITEM;
ITEMDESCRIPTION
=
FORMS_DDL('COMMIT');
ITEM NUMBER(20); PRODQTY3 NUMBER; v_message_level PLS_INTEGER := :SYSTEM.MESSAGE_LEVEL; LN NUMBER;
Set_Block_Property('BLKPOS', DEFAULT_WHERE,'RECEIPTNO :GLOBAL.RECEIPT'); GO_BLOCK('BLKPOS');
=
EXECUTE_QUERY;
cursor POS_CUR Is select ITEMDESCRIPTION,TRANQTY,UNITRETAIL,TO TALRETAIL, LINENO
SELECT SUM(TOTALRETAIL)
from POSTRANSACTIONDETAIL
INTO :BLKTRANS.PAYTOTAL FROM POSTRANSACTIONDETAIL WHERE :GLOBAL.RECEIPT
RECEIPTNO
=
where RECEIPTNO=:GLOBAL.RECEIPT ORDER BY LINENO DESC;
GROUP BY RECEIPTNO; :BLKTRANS.PAYRECEIPT:=:GLOBAL.RECEIPT;
BEGIN
set_item_property('blktrans.btnclose',enabled,property _false);
SELECT PRODQTY
set_item_property('blktrans.btN1',enabled,property_T RUE);
FROM PRODUCTMASTERLIST
set_item_property('blktrans.btn5',enabled,property_TR UE);
INTO PRODQTY3 WHERE ITEMDESCRIPTION=:GLOBAL.ITEM;
set_item_property('blktrans.btn20',enabled,property_T RUE); set_item_property('blktrans.btn50',enabled,property_T RUE); set_item_property('blktrans.btn100',enabled,property_ TRUE); set_item_property('blktrans.btn500',enabled,property_ TRUE); set_item_property('blktrans.btn1000',enabled,property _TRUE); :BLKTRANS.DATEDAY:=TO_CHAR(SYSDATE,' MONTH DD, YYYY')||' '||TO_CHAR(SYSDATE,'DAY'); :blkcat.item:=:global.item;
IF :BLKCAT.ITEM IS NULL THEN IF SHOW_ALERT('EMPTY')=ALERT_BUTTON1 THEN go_item('LISTCAT1'); END IF; ELSE IF PRODQTY3 >= 1 THEN UPDATE POSTRANSACTIONDETAIL SET TRANQTY=TRANQTY+1 WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM;
else if show_alert('outstock')=alert_button1 then
FORMS_DDL('COMMIT'); UPDATE POSTRANSACTIONDETAIL
go_item('BTNSEARCH'); END IF; END IF; END IF; END;
SET TOTALCOST=TOTALCOST+:GLOBAL.UNITCOS T,TOTALRETAIL=TOTALRETAIL+:GLOBAL.UN ITRETAIL WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM; FORMS_DDL('COMMIT');
Object name: BTNMINUS Trigger level: item level
UPDATE Productmasterlist
Trigger name: When-button-pressed
SET PRODQTY=PRODQTY-1
DECLARE ITEM NUMBER(20); PRODQTY3 NUMBER; v_message_level PLS_INTEGER := :SYSTEM.MESSAGE_LEVEL; LN NUMBER;
WHERE :GLOBAL.ITEM;
ITEMDESCRIPTION
FORMS_DDL('COMMIT');
=
Set_Block_Property('BLKPOS', DEFAULT_WHERE,'RECEIPTNO :GLOBAL.RECEIPT');
=
GO_BLOCK('BLKPOS');
cursor POS_CUR Is select ITEMDESCRIPTION,TRANQTY,UNITRETAIL,TO TALRETAIL, LINENO from POSTRANSACTIONDETAIL
EXECUTE_QUERY;
where RECEIPTNO=:GLOBAL.RECEIPT
SELECT SUM(TOTALRETAIL)
ORDER BY LINENO DESC;
INTO :BLKTRANS.PAYTOTAL FROM POSTRANSACTIONDETAIL WHERE :GLOBAL.RECEIPT
RECEIPTNO
=
BEGIN SELECT PRODQTY
GROUP BY RECEIPTNO; :BLKTRANS.PAYRECEIPT:=:GLOBAL.RECEIPT;
INTO PRODQTY2
set_item_property('blktrans.btnclose',enabled,property _false);
FROM PRODUCTMASTERLIST
set_item_property('blktrans.btN1',enabled,property_T RUE); set_item_property('blktrans.btn5',enabled,property_TR UE); set_item_property('blktrans.btn20',enabled,property_T RUE); set_item_property('blktrans.btn50',enabled,property_T RUE); set_item_property('blktrans.btn100',enabled,property_ TRUE); set_item_property('blktrans.btn500',enabled,property_ TRUE); set_item_property('blktrans.btn1000',enabled,property _TRUE); :BLKTRANS.DATEDAY:=TO_CHAR(SYSDATE,' MONTH DD, YYYY')||' '||TO_CHAR(SYSDATE,'DAY'); :blkcat.item:=:global.item;
WHERE ITEMDESCRIPTION=:GLOBAL.ITEM; IF PRODQTY2 >= 1 THEN UPDATE POSTRANSACTIONDETAIL SET TRANQTY=TRANQTY-1 WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM; FORMS_DDL('COMMIT'); UPDATE POSTRANSACTIONDETAIL SET TOTALCOST=TOTALCOST:GLOBAL.UNITCOST,TOTALRETAIL=TOTALRE TAIL-:GLOBAL.UNITRETAIL WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM; FORMS_DDL('COMMIT');
else if show_alert('outstock')=alert_button1 then
UPDATE Productmasterlist SET PRODQTY=PRODQTY+1 WHERE :GLOBAL.ITEM;
go_item('BTNSEARCH'); END IF;
ITEMDESCRIPTION
=
FORMS_DDL('COMMIT');
END IF; END IF; END;
Set_Block_Property('BLKPOS', DEFAULT_WHERE,'RECEIPTNO :GLOBAL.RECEIPT'); GO_BLOCK('BLKPOS');
DECLARE ITEM NUMBER(20);
EXECUTE_QUERY;
PRODQTY2 NUMBER; v_message_level PLS_INTEGER := :SYSTEM.MESSAGE_LEVEL; LN NUMBER;
else if show_alert('outstock')=alert_button1 then
=
LN NUMBER; go_item('BTNSEARCH');
cursor POS_CUR Is select ITEMDESCRIPTION,TRANQTY,UNITRETAIL,TO TALRETAIL, LINENO
END IF;
from POSTRANSACTIONDETAIL
END IF; SELECT SUM(TOTALRETAIL)
where RECEIPTNO=:GLOBAL.RECEIPT
INTO :BLKTRANS.PAYTOTAL FROM POSTRANSACTIONDETAIL WHERE :GLOBAL.RECEIPT
RECEIPTNO
ORDER BY LINENO DESC; =
GROUP BY RECEIPTNO; :BLKTRANS.PAYRECEIPT:=:GLOBAL.RECEIPT; :blkcat.item:=:global.item; set_item_property('blktrans.btnclose',enabled,property _false); :BLKTRANS.DATEDAY:=TO_CHAR(SYSDATE,' MONTH DD, YYYY')||' '||TO_CHAR(SYSDATE,'DAY'); END;
BEGIN SELECT TRANQTY INTO ADDITEM FROM POSTRANSACTIONDETAIL WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION=:GLOBAL.ITEM; IF :BLKCAT.ITEM IS NULL THEN
Object name: BTNCANCEL Trigger level: item level
IF SHOW_ALERT('EMPTY')=ALERT_BUTTON1 THEN go_item('btngrocery');
Trigger name: When-button-pressed DELETE FROM POSTRANSACTIONDETAIL WHERE RECEIPTNO=:GLOBAL.RECEIPT; FORMS_DDL('COMMIT'); CLEAR_FORM(NO_COMMIT);
END IF; ELSE UPDATE Productmasterlist SET PRODQTY=PRODQTY+ADDITEM WHERE :GLOBAL.ITEM;
ITEMDESCRIPTION
:blKTRANS.PAYCASH:=0;
FORMS_DDL('COMMIT');
:blKTRANS.PAYCHANGE:=0;
DELETE
:BLKTRANS.POSQTY:=0;
FROM POSTRANSACTIONDETAIL
:BLKTRANS.PAYRECEIPT:=:GLOBAL.RECEIPT; :blkcat.item:=''; set_item_property('btnclose',enabled,property_TRUE) ; :BLKTRANS.DATEDAY:=TO_CHAR(SYSDATE,' MONTH DD, YYYY')||' '||TO_CHAR(SYSDATE,'DAY');
=
WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM; FORMS_DDL('COMMIT');
Set_Block_Property('BLKPOS', DEFAULT_WHERE,'RECEIPTNO :GLOBAL.RECEIPT');
Object name: BTNVOID
GO_BLOCK('BLKPOS');
Trigger level: item level
EXECUTE_QUERY;
=
Trigger name: When-button-pressed DECLARE
SELECT SUM(TOTALRETAIL)
ADDITEM NUMBER; ITEM NUMBER(20); v_message_level PLS_INTEGER := :SYSTEM.MESSAGE_LEVEL;
INTO :BLKTRANS.PAYTOTAL FROM POSTRANSACTIONDETAIL WHERE :GLOBAL.RECEIPT
RECEIPTNO
=
GROUP BY RECEIPTNO; :BLKTRANS.PAYRECEIPT:=:GLOBAL.RECEIPT;
IF PRODQTY1 :BLKTRANS.POSQTY THEN
>=
:blkcat.item:=:global.item; set_item_property('blktrans.btnclose',enabled,property _false);
SELECT TRANQTY
:BLKTRANS.DATEDAY:=TO_CHAR(SYSDATE,' MONTH DD, YYYY')||' '||TO_CHAR(SYSDATE,'DAY');
FROM POSTRANSACTIONDETAIL
END IF;
INTO TRAN WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM; UPDATE POSTRANSACTIONDETAIL
END;
SET TRANQTY=:BLKTRANS.POSQTY
Object name: BTNQTY Trigger level: item level
WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM; FORMS_DDL('COMMIT');
Trigger name: When-button-pressed UPDATE POSTRANSACTIONDETAIL
DECLARE ITEM NUMBER(20); PRODQTY1 NUMBER; TRAN NUMBER; v_message_level PLS_INTEGER := :SYSTEM.MESSAGE_LEVEL;
SET TOTALCOST=:GLOBAL.UNITCOST*:BLKTRANS .POSQTY WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM; FORMS_DDL('COMMIT');
LN NUMBER; cursor POS_CUR Is select ITEMDESCRIPTION,TRANQTY,UNITRETAIL,TO TALRETAIL, LINENO from POSTRANSACTIONDETAIL where RECEIPTNO=:GLOBAL.RECEIPT ORDER BY LINENO DESC;
UPDATE POSTRANSACTIONDETAIL SET TOTALRETAIL=:GLOBAL.UNITRETAIL*:BLKTR ANS.POSQTY WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM; FORMS_DDL('COMMIT');
BEGIN SELECT PRODQTY INTO PRODQTY1 FROM PRODUCTMASTERLIST WHERE ITEMDESCRIPTION=:GLOBAL.ITEM; IF :BLKCAT.ITEM IS NULL THEN IF SHOW_ALERT('EMPTY')=ALERT_BUTTON1 THEN go_item('btngrocery'); END IF; ELSE IF :BLKTRANS.POSQTY > 0 AND :BLKTRANS.POSQTY IS NOT NULL THEN
UPDATE Productmasterlist SET :BLKTRANS.POSQTY WHERE :GLOBAL.ITEM;
PRODQTY=PRODQTYITEMDESCRIPTION
=
FORMS_DDL('COMMIT'); UPDATE Productmasterlist SET PRODQTY=PRODQTY+TRAN WHERE :GLOBAL.ITEM;
ITEMDESCRIPTION
=
FORMS_DDL('COMMIT'); Set_Block_Property('BLKPOS', DEFAULT_WHERE,'RECEIPTNO :GLOBAL.RECEIPT'); GO_BLOCK('BLKPOS');
=
EXECUTE_QUERY;
LN NUMBER;
SELECT SUM(TOTALRETAIL)
cursor POS_CUR Is select ITEMDESCRIPTION,TRANQTY,UNITRETAIL,TO TALRETAIL, LINENO
INTO :BLKTRANS.PAYTOTAL
from POSTRANSACTIONDETAIL
FROM POSTRANSACTIONDETAIL WHERE :GLOBAL.RECEIPT
RECEIPTNO
=
where RECEIPTNO=:GLOBAL.RECEIPT
GROUP BY RECEIPTNO;
ORDER BY LINENO ASC;
else if show_alert('outstock')=alert_button1 then
BEGIN
go_item('posqty');
IF SHOW_LOV('LOVCAT') THEN end if; END IF;
:BLKCAT.CID:=:BLKCAT.LISTCAT1; :GLOBAL.RECEIPT:=:BLKTRANS.PAYRECEIPT; :GLOBAL.ITEM:=:BLKCAT.ITEM; :GLOBAL.UNITCOST:=:BLKCAT.UNITCOST;
:BLKTRANS.POSQTY:=0; :BLKTRANS.PAYRECEIPT:=:GLOBAL.RECEIPT; :blkcat.item:=:global.item; set_item_property('blktrans.btnclose',enabled,property _false); set_item_property('blktrans.btN1',enabled,property_T RUE);
:GLOBAL.UNITRETAIL:=:BLKCAT.UNITRETAIL ; SELECT MAX(LINENO) INTO LN FROM POSTRANSACTIONDETAIL WHERE RECEIPTNO=:GLOBAL.RECEIPT;
set_item_property('blktrans.btn5',enabled,property_TR UE);
IF LN IS NULL THEN
set_item_property('blktrans.btn20',enabled,property_T RUE);
ELSE
set_item_property('blktrans.btn50',enabled,property_T RUE);
END IF;
set_item_property('blktrans.btn100',enabled,property_ TRUE); set_item_property('blktrans.btn500',enabled,property_ TRUE); set_item_property('blktrans.btn1000',enabled,property _TRUE); :BLKTRANS.DATEDAY:=TO_CHAR(SYSDATE,' MONTH DD, YYYY')||' '||TO_CHAR(SYSDATE,'DAY'); END IF;
LN:=1; LN:=LN+1;
SELECT COUNT(ITEMCODE) INTO ITEM FROM POSTRANSACTIONDETAIL WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM; IF ITEM IS NULL OR ITEM = 0 THEN insert into postransactiondetail(RECEIPTNO,DATECREATED,I TEMCODE,ITEMDESCRIPTION,TRANQTY,BUSI NESSDATE
END IF; END; Object name: LISTCAT1 Trigger level: item level Trigger name: When-button-pressed DECLARE ITEM NUMBER(20); v_message_level PLS_INTEGER := :SYSTEM.MESSAGE_LEVEL;
,SUPPID,UNITCOST,UNITRETAIL,TOTALCOST, TOTALRETAIL,LINENO) SELECT :GLOBAL.RECEIPT,SYSDATE,P.ITEMCODE,P.IT EMDESCRIPTION,1,SYSDATE,P.SUPPID,P.UNIT COST,P.UNITRETAIL,P.UNITCOST*1,P.UNITRET AIL*1,LN FROM PRODUCT P
WHERE P.ITEMDESCRIPTION=:GLOBAL.ITEM;
:blkcat.item:=:global.item;
FORMS_DDL('COMMIT');
set_item_property('blktrans.btnclose',enabled,property _false);
UPDATE Productmasterlist
set_item_property('blktrans.btN1',enabled,property_T RUE);
SET PRODQTY=PRODQTY-1 WHERE :GLOBAL.ITEM;
ITEMDESCRIPTION
=
FORMS_DDL('COMMIT');
Set_Block_Property('BLKPOS', DEFAULT_WHERE,'RECEIPTNO :GLOBAL.RECEIPT');
set_item_property('blktrans.btn5',enabled,property_TR UE); set_item_property('blktrans.btn20',enabled,property_T RUE); set_item_property('blktrans.btn50',enabled,property_T RUE); set_item_property('blktrans.btn100',enabled,property_ TRUE);
=
GO_BLOCK('BLKPOS');
set_item_property('blktrans.btn200',enabled,property_ TRUE); set_item_property('blktrans.btn500',enabled,property_ TRUE);
EXECUTE_QUERY;
set_item_property('blktrans.btn1000',enabled,property _TRUE);
ELSE UPDATE POSTRANSACTIONDETAIL SET TRANQTY=TRANQTY+1,TOTALCOST=TOTALC OST+:GLOBAL.UNITCOST,TOTALRETAIL=TOT ALRETAIL+:GLOBAL.UNITRETAIL WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM;
:BLKTRANS.DATEDAY:=TO_CHAR(SYSDATE,' MONTH DD, YYYY')||' '||TO_CHAR(SYSDATE,'DAY'); GO_ITEM('POSQTY'); END IF; END;
FORMS_DDL('COMMIT'); UPDATE Productmasterlist SET PRODQTY=PRODQTY-1 WHERE :GLOBAL.ITEM;
ITEMDESCRIPTION
Object name: LISTCAT =
Trigger name: When-button-pressed
FORMS_DDL('COMMIT'); Set_Block_Property('BLKPOS', DEFAULT_WHERE,'RECEIPTNO :GLOBAL.RECEIPT');
Trigger level: item level DECLARE ITEM NUMBER(20);
=
v_message_level PLS_INTEGER := :SYSTEM.MESSAGE_LEVEL;
GO_BLOCK('BLKPOS');
LN NUMBER;
EXECUTE_QUERY; END IF;
cursor POS_CUR Is select ITEMDESCRIPTION,TRANQTY,UNITRETAIL,TO TALRETAIL, LINENO
SELECT SUM(TOTALRETAIL)
from POSTRANSACTIONDETAIL where RECEIPTNO=:GLOBAL.RECEIPT
INTO :BLKTRANS.PAYTOTAL FROM POSTRANSACTIONDETAIL WHERE :GLOBAL.RECEIPT
RECEIPTNO
GROUP BY RECEIPTNO;
ORDER BY LINENO ASC;
= BEGIN
:BLKCAT.CID:=:BLKCAT.LISTCAT; :BLKTRANS.PAYRECEIPT:=:GLOBAL.RECEIPT;
IF SHOW_LOV('LOVCAT') THEN
:GLOBAL.RECEIPT:=:BLKTRANS.PAYRECEIPT;
Set_Block_Property('BLKPOS', DEFAULT_WHERE,'RECEIPTNO :GLOBAL.RECEIPT');
:GLOBAL.ITEM:=:BLKCAT.ITEM; :GLOBAL.UNITCOST:=:BLKCAT.UNITCOST;
=
GO_BLOCK('BLKPOS');
:GLOBAL.UNITRETAIL:=:BLKCAT.UNITRETAIL ;
EXECUTE_QUERY; ELSE
SELECT MAX(LINENO) INTO LN
UPDATE POSTRANSACTIONDETAIL
FROM POSTRANSACTIONDETAIL
SET TRANQTY=TRANQTY+1,TOTALCOST=TOTALC OST+:GLOBAL.UNITCOST,TOTALRETAIL=TOT ALRETAIL+:GLOBAL.UNITRETAIL
WHERE RECEIPTNO=:GLOBAL.RECEIPT; IF LN IS NULL THEN LN:=1;
WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM;
ELSE
FORMS_DDL('COMMIT');
LN:=LN+1; END IF;
UPDATE Productmasterlist SET PRODQTY=PRODQTY-1
SELECT COUNT(ITEMCODE)
WHERE :GLOBAL.ITEM;
INTO ITEM FROM POSTRANSACTIONDETAIL WHERE RECEIPTNO=:GLOBAL.RECEIPT AND ITEMDESCRIPTION = :GLOBAL.ITEM;
ITEMDESCRIPTION
FORMS_DDL('COMMIT');
Set_Block_Property('BLKPOS', DEFAULT_WHERE,'RECEIPTNO :GLOBAL.RECEIPT');
IF ITEM IS NULL OR ITEM = 0 THEN insert into postransactiondetail(RECEIPTNO,DATECREATED,I TEMCODE,ITEMDESCRIPTION,TRANQTY,BUSI NESSDATE
=
=
GO_BLOCK('BLKPOS'); EXECUTE_QUERY; END IF; SELECT SUM(TOTALRETAIL)
,SUPPID,UNITCOST,UNITRETAIL,TOTALCOST, TOTALRETAIL,LINENO)
INTO :BLKTRANS.PAYTOTAL
SELECT :GLOBAL.RECEIPT,SYSDATE,P.ITEMCODE,P.IT EMDESCRIPTION,1,SYSDATE,P.SUPPID,P.UNIT COST,P.UNITRETAIL,P.UNITCOST*1,P.UNITRET AIL*1,LN
FROM POSTRANSACTIONDETAIL WHERE :GLOBAL.RECEIPT
RECEIPTNO
=
GROUP BY RECEIPTNO;
FROM PRODUCT P WHERE P.ITEMDESCRIPTION=:GLOBAL.ITEM;
:BLKTRANS.PAYRECEIPT:=:GLOBAL.RECEIPT;
FORMS_DDL('COMMIT');
:blkcat.item:=:global.item;
UPDATE Productmasterlist
set_item_property('blktrans.btnclose',enabled,property _false);
SET PRODQTY=PRODQTY-1 WHERE :GLOBAL.ITEM;
ITEMDESCRIPTION
FORMS_DDL('COMMIT');
=
set_item_property('blktrans.btN1',enabled,property_T RUE); set_item_property('blktrans.btn5',enabled,property_TR UE); set_item_property('blktrans.btn20',enabled,property_T RUE);
set_item_property('blktrans.btn50',enabled,property_T RUE);
PL_ID GET_PARAMETER_LIST('tmpdata');
set_item_property('blktrans.btn100',enabled,property_ TRUE); set_item_property('blktrans.btn200',enabled,property_ TRUE);
:=
IF NOT ID_NULL(PL_ID) THEN DESTROY_PARAMETER_LIST(PL_ID); END IF;
set_item_property('blktrans.btn500',enabled,property_ TRUE);
PL_ID CREATE_PARAMETER_LIST('tmpdata');
set_item_property('blktrans.btn1000',enabled,property _TRUE);
ADD_PARAMETER(PL_ID, text_parameter, 'no');
:BLKTRANS.DATEDAY:=TO_CHAR(SYSDATE,' MONTH DD, YYYY')||' '||TO_CHAR(SYSDATE,'DAY');
ADD_PARAMETER(PL_ID, 'P_RECEIPTNO', text_parameter, :BLKTRANS.PAYRECEIPT);
GO_ITEM('POSQTY'); END IF;
:= 'paraform',
V_REPORT_ID FIND_REPORT_OBJECT('PRINT');
:=
END;
V_REPORT_JOB_ID := RUN_REPORT_OBJECT(V_REPORT_ID, PL_ID);
Object name: BTNPAYMENT
V_SERVER_LENGTH := LENGTH(GET_REPORT_OBJECT_PROPERTY(V_ REPORT_ID,REPORT_SERVER));
Trigger level: item level
V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ;
Trigger name: When-button-pressed DECLARE
WHILE
PL_ID PARAMLIST;
V_REP_STATUS IN ('RUNNING','OPENING_REPORT','ENQUEUED')
V_REPORT_ID REPORT_OBJECT; V_REP_SERVER 'reportserver';
VARCHAR2(100)
:= LOOP
V_REPORT_JOB_ID VARCHAR2(25);
MESSAGE('RUNNING
V_SERVER_LENGTH NUMBER;
REPORT');
V_REP_STATUS VARCHAR2(25);
V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ;
COMPUTER_NAME VARCHAR2(50) := 'localhost';
END LOOP;
BEGIN if :blktrans.paycash = 0 OR :blktrans.paycash is null or :BLKTRANS.PAYCASH < :BLKTRANS.PAYTOTAL then if show_alert('short')=alert_button1 then
WEB.SHOW_DOCUMENT('/reports/rwser vlet/getjobid'||SUBSTR(V_REPORT_JOB_ID,V_SER VER_LENGTH+2)||'?server='||V_Rep_Server,'_blank' );
go_item('paycash'); end if;
CLEAR_FORM(NO_COMMIT);
else INSERT INTO POSTRANSACTIONLIST(RECEIPTNO,BUSINESS DATE,VATTAX,VATAMOUNT,TRANAMOUNT,C HANGEAMOUNT,PAIDAMOUNT,USERNAME) VALUES (:GLOBAL.RECEIPT,SYSDATE,:BLKTRANS.VAT TAX,:BLKTRANS.VATAMOUNT,:BLKTRANS.PA YTOTAL,:BLKTRANS.PAYCHANGE,:BLKTRAN S.PAYCASH,:GLOBAL.USERID); FORMS_DDL('COMMIT');
SELECT MAX(RECEIPTNO)+1 INTO :blKTRANS.payreceipt FROM POSTRANSACTIONLIST; :GLOBAL.RECEIPT:=:blKTRANS.payreceipt; :BLKCAT.BTNCASHIER:=:GLOBAL.USERID; :blKTRANS.PAYCASH:=0; :blKTRANS.PAYCHANGE:=0; :BLKTRANS.POSQTY:=0; :BLKTRANS.PAYTOTAL:=0;
:blkcat.item:=0; set_item_property('blktrans.btnclose',enabled,property _true); set_item_property('blktrans.BTNPAYMENT',enabled, property_FALSE); set_item_property('blktrans.BTN1',enabled,property_F ALSE); set_item_property('blktrans.BTN5',enabled,property_F ALSE); set_item_property('blktrans.BTN20',enabled,property_ FALSE); set_item_property('blktrans.BTN50',enabled,property_ FALSE);
Object name:
set_item_property('blktrans.BTN100',enabled,property _FALSE);
Trigger name: When-new form instance
set_item_property('blktrans.BTN200',enabled,property _FALSE); set_item_property('blktrans.BTN500',enabled,property _FALSE); set_item_property('blktrans.BTN1000',enabled,propert y_FALSE); :BLKTRANS.DATEDAY:=TO_CHAR(SYSDATE,' MONTH DD, YYYY')||' '||TO_CHAR(SYSDATE,'DAY');
Trigger level: form level IF :GLOBAL.SUPPADD=2 THEN SET_ITEM_PROPERTY('SUPPLIER.BTNSAVE',L ABEL,'&Save'); SET_ITEM_PROPERTY('SUPPLIER.BTN DELETE',LABEL,'&Cancel'); SET_ITEM_PROPERTY('BTNSEARCH',V ISIBLE,PROPERTY_FALSE);
IF SHOW_ALERT('PRINT')=ALERT_BUTTON1 THEN
:SUPPLIER.TRANS:='DIRECT'; GO_ITEM('SUPPNAME');
GO_ITEM('BTNCLOSE');
SELECT MAX(SUPPID)
END IF;
INTO :GLOBAL.SUPPID
END IF;
FROM SUPPLIER;
END;
IF :GLOBAL.SUPPID IS NULL THEN Object name: BTNCLEAR
:GLOBAL.SUPPID:=33300;
Trigger level: item level
:SUPPLIER.SUPPID:=:GLOBAL.SUPPID;
Trigger name: When-button-pressed
ELSE
:BLKTRANS.PAYCASH:=0;
:GLOBAL.SUPPID:=:GLOBAL.SUPPID+5; :SUPPLIER.SUPPID:=:GLOBAL.SUPPID;
Screen no: 15
END IF;
Screen name: SUPPLIER DETAIL Description: Allows the user to create new supplier details.
SET_ITEM_PROPERTY('BTNSEARCH',VISIBLE,P ROPERTY_FALSE); :SUPPLIER.TRANS:='DIRECT'; END IF; SET_MENU_ITEM_PROPERTY('MENU1.HOME',E NABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.PRODU CTMANAGEMENT',ENABLED,PROPERTY_FALS E); SET_MENU_ITEM_PROPERTY('MENU1.REPORT S',ENABLED,PROPERTY_FALSE);
SET_MENU_ITEM_PROPERTY('MENU1.MAINTE NANCE',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.LOGOU T',ENABLED,PROPERTY_FALSE);
SET_ITEM_PROPERTY('BTNSEARCH',V ISIBLE,PROPERTY_FALSE); :SUPPLIER.TRANS:='DIRECT'; GO_ITEM('SUPPNAME');
Object name: BTNSEARCH
SELECT MAX(SUPPID)
Trigger level: item level
INTO :GLOBAL.SUPPID
Trigger name: When-button-pressed
FROM SUPPLIER;
IF SHOW_LOV('LOV78') THEN
IF :GLOBAL.SUPPID IS NULL THEN :GLOBAL.SUPPID:=33305;
SET_ITEM_PROPERTY('BTNSAVE',LABEL,'&Up date'); SET_ITEM_PROPERTY('BTNDELETE',LABEL,'& Cancel'); SELECT SUPPID,SUPPNAME,SUPPCODE,SUPPADDRESS, CONTACTNO,SUPPTRANSACTION INTO :SUPPLIER.SUPPID,:SUPPLIER.SUPPNAME,:SUP PLIER.SUPPCODE,:SUPPLIER.SUPPADDRESS,:S UPPLIER.CONTACTNO,:SUPPLIER.SUPPTRANS ACTION FROM SUPPLIER
:SUPPLIER.SUPPID:=:GLOBAL.SUPPID; ELSE :GLOBAL.SUPPID:=:GLOBAL.SUPPID+5; :SUPPLIER.SUPPID:=:GLOBAL.SUPPID; END IF; ELSIF LUPDATE='&Edit' THEN IF SHOW_LOV('LOV78') THEN NULL; END IF; SET_ITEM_PROPERTY('SUPPLIER.BTNSAVE',L ABEL,'&Update');
WHERE SUPPID = :SUPPLIER.SUPPID; IF :SUPPLIER.SUPPID=33300 THEN :SUPPLIER.TRANS:='WAREHOUSE'; ELSE :SUPPLIER.TRANS:='DIRECT';
SET_ITEM_PROPERTY('SUPPLIER.BTNDELETE', LABEL,'&Cancel'); SET_ITEM_PROPERTY('BTNSEARCH',VISIBLE,P ROPERTY_TRUE);
END IF; SET_ITEM_PROPERTY('BTNSEARCH',ENABLED ,PROPERTY_TRUE);
END IF; Object name: BTNSAVE Trigger level: item level Trigger name: When-button-pressed DECLARE LUPDATE VARCHAR2(10); PRODUCTITEM VARCHAR2(30); SUPPLID NUMBER; BEGIN LUPDATE:=GET_ITEM_PROPERTY('BT NSAVE',LABEL); IF LUPDATE='&Add' THEN SET_ITEM_PROPERTY('SUPPLIER.BTN SAVE',LABEL,'&Save'); SET_ITEM_PROPERTY('SUPPLIER.BTN DELETE',LABEL,'&Cancel');
ELSIF :SUPPLIER.SUPPNAME IS NULL AND :SUPPLIER.SUPPADDRESS IS NULL AND :SUPPLIER.CONTACTNO IS NULL AND :SUPPLIER.TRANS IS NULL THEN IF SHOW_ALERT('INC') ALERT_BUTTON1 THEN
=
GO_ITEM('SUPPLIER.SUPPNAME'); END IF; ELSIF :SUPPLIER.SUPPNAME IS NULL OR :SUPPLIER.SUPPADDRESS IS NULL OR :SUPPLIER.CONTACTNO IS NULL OR :SUPPLIER.TRANS IS NULL THEN IF SHOW_ALERT('INC') = ALERT_BUTTON1 THEN GO_ITEM('SUPPLIER.SUPPNAME'); END IF; ELSIF :SUPPLIER.SUPPNAME IS NULL AND :SUPPLIER.SUPPADDRESS IS NOT NULL AND
:SUPPLIER.CONTACTNO IS NOT NULL AND :SUPPLIER.TRANS IS NOT NULL THEN IF SHOW_ALERT('SUPPNAME') ALERT_BUTTON1 THEN
IF SHOW_ALERT('SAVE')=ALERT_BUTTON1 THEN
= SUPPLIER(SUPPID, SUPPADDRESS, SUPPTRANSACTION)
GO_ITEM('SUPPLIER.SUPPNAME'); END IF; ELSIF :SUPPLIER.SUPPNAME IS NOT NULL AND :SUPPLIER.SUPPADDRESS IS NULL AND :SUPPLIER.CONTACTNO IS NOT NULL AND :SUPPLIER.TRANS IS NOT NULL THEN IF SHOW_ALERT('SUPPADDRESS') ALERT_BUTTON1 THEN
=
GO_ITEM('SUPPLIER.SUPPADDRESS');
INSERT INTO SUPPNAME,SUPPCODE, CONTACTNO,
VALUES(:SUPPLIER.SUPPID, INITCAP(:SUPPLIER.SUPPNAME),UPPER(:SUPP LIER.SUPPCODE), INITCAP(:SUPPLIER.SUPPADDRESS), :SUPPLIER.CONTACTNO, INITCAP(:SUPPLIER.TRANS)); FORMS_DDL('COMMIT');
END IF; ELSIF :SUPPLIER.SUPPNAME IS NOT NULL AND :SUPPLIER.SUPPADDRESS IS NOT NULL AND :SUPPLIER.CONTACTNO IS NULL AND :SUPPLIER.TRANS IS NOT NULL THEN IF SHOW_ALERT('CONTACTNO') ALERT_BUTTON1 THEN
=
GO_ITEM('SUPPLIER.CONTACTNO');
SHOW_ALERT('SAVED') THEN
IF ALERT_BUTTON1
=
IF :GLOBAL.SUPPADD=2 THEN CALL_FORM('C:\247\FRMPRODUCTADD.FMX',H IDE,DO_REPLACE); ELSE
END IF; ELSIF :SUPPLIER.SUPPNAME IS NOT NULL AND :SUPPLIER.SUPPADDRESS IS NOT NULL AND :SUPPLIER.CONTACTNO IS NOT NULL AND :SUPPLIER.TRANS IS NULL THEN IF SHOW_ALERT('TRANS') = ALERT_BUTTON1 THEN
CALL_FORM('C:\247\HOME.FMX',HIDE,DO_REP LACE);
END IF; END IF;
GO_ITEM('SUPPLIER.TRANS');
END IF;
END IF;
END IF; ELSIF
LUPDATE='&Update'
THEN
ELSE
IF SHOW_ALERT('UPDATE')=ALERT_BUTTON1 THEN
IF LUPDATE='&Save' THEN SELECT MAX(SUPPID) INTO SUPPLID FROM SUPPLIER WHERE
SUPPID
UPDATE SUPPLIER =
:SUPPLIER.SUPPID; IF SUPPLID > 0 THEN IF SHOW_ALERT('DUPLICATE') ALERT_BUTTON1 THEN NULL; END IF; ELSE
=
SET SUPPID = :SUPPLIER.SUPPID, SUPPNAME = INITCAP(:SUPPLIER.SUPPNAME),SUPPCODE=U PPER(:SUPPLIER.SUPPCODE), SUPPADDRESS =INITCAP(:SUPPLIER.SUPPADDRESS),CONTAC TNO = :SUPPLIER.CONTACTNO, SUPPTRANSACTION UPPER(:SUPPLIER.TRANS)
=
WHERE :SUPPLIER.SUPPID;
=
SUPPID
FORMS_DDL('COMMIT'); IF SHOW_ALERT('UPDATED') ALERT_BUTTON1 THEN
=
CLEAR_RECORD; CALL_FORM('C:\247\FRMSUPPLIER.FMX',HIDE, DO_REPLACE); SET_ITEM_PROPERTY('SUPPLIER.BTNSAVE',L ABEL,'&Edit');
SET_ITEM_PROPERTY('BTNSEARCH',V ISIBLE,PROPERTY_TRUE); SET_ITEM_PROPERTY('BTNSEARCH',E NABLED,PROPERTY_TRUE); CLEAR_FORM(NO_COMMIT); END IF; END;
END IF; END IF;
Object name: BTNCLOSE END IF;
Trigger level: item level
END IF;
Trigger name: When-button-pressed
END;
IF SHOW_ALERT('CLOSE') = ALERT_BUTTON1 THEN
Object name: BTNDELETE
EXIT_FORM(NO_COMMIT);
Trigger level: item level
END IF;
Trigger name: When-button-pressed Screen no: 16
DECLARE LUPDATE VARCHAR2(10);
Screen name: CATEGORY DETAIL
PRODUCTITEM VARCHAR2(30);
Description: Allows the user to create new category for the products details.
BEGIN LUPDATE:=GET_ITEM_PROPERTY('BT NDELETE',LABEL); IF LUPDATE='&Delete' THEN IF :supplier.suppid IS not NULL THEN IF SHOW_ALERT('DELETE')=ALERT_BUTTON1 THEN DELETE FROM supplier WHERE suppid= :supplier.suppid; FORMS_DDL('COMMIT'); IF SHOW_ALERT('DELETED') = ALERT_BUTTON1 THEN CLEAR_RECORD; END IF; END IF; END IF; ELSIF LUPDATE='&Cancel' THEN SET_ITEM_PROPERTY('BTNDELETE',L ABEL,'&Delete'); SET_ITEM_PROPERTY('BTNSAVE',LAB EL,'&Add');
Object name: Trigger level: form level Trigger name: When-new form instance SET_MENU_ITEM_PROPERTY('MENU1.HOME',E NABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.PRODU CTMANAGEMENT',ENABLED,PROPERTY_FALS E); SET_MENU_ITEM_PROPERTY('MENU1.REPORT S',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.MAINTE NANCE',ENABLED,PROPERTY_FALSE); SET_MENU_ITEM_PROPERTY('MENU1.LOGOU T',ENABLED,PROPERTY_FALSE);
Object name: BTNSEARCH :CATEGORY.CATNAME := '';
Trigger level: item level Trigger name: When-button-pressed
:CATEGORY.CATTYPE := '';
IF SHOW_LOV('LOV_CATEGORY') THEN
SELECT
SET_ITEM_PROPERTY('CATEGORY.BT NADD', ENABLED, PROPERTY_TRUE);
MAX(CATEGORY.CATID)
SET_ITEM_PROPERTY('CATEGORY.BT NUPDATE', ENABLED, PROPERTY_TRUE);
:CATEGORY.CATID
INTO FROM CATEGORY;
SET_ITEM_PROPERTY('CATEGORY.BT NDELETE', ENABLED, PROPERTY_TRUE);
IF :CATEGORY.CATID IS NULL THEN
END IF;
Object name: BTNADD
:CATEGORY.CATID := 10;
Trigger level: item level
ELSE
Trigger name: When-button-pressed IF SHOW_ALERT('ADD') = ALERT_BUTTON1 THEN
:CATEGORY.CATID :CATEGORY.CATID + 5; END IF;
CREATE_RECORD; SELECT MAX(CATEGORY.CATID)
GO_ITEM('CATEGORY.CATNAME');
INTO :CATEGORY.CATID
END IF;
FROM CATEGORY;
ELSIF :CATEGORY.CATNAME IS NULL OR :CATEGORY.CATTYPE IS NULL THEN
IF :CATEGORY.CATID IS NULL THEN
IF SHOW_ALERT('INC') ALERT_BUTTON1 THEN
:CATEGORY.CATID := 10;
=
SELECT
ELSE :CATEGORY.CATID :CATEGORY.CATID + 5;
:=
:=
MAX(CATEGORY.CATID) INTO :CATEGORY.CATID
END IF;
FROM CATEGORY; GO_ITEM('CATEGORY.CATNAME'); IF :CATEGORY.CATID IS NULL THEN
CLEAR_MESSAGE; SET_ITEM_PROPERTY('CATEGORY.BT NADD', ENABLED, PROPERTY_FALSE);
:CATEGORY.CATID := 10;
SET_ITEM_PROPERTY('CATEGORY.BT NUPDATE', ENABLED, PROPERTY_FALSE); SET_ITEM_PROPERTY('CATEGORY.BT NDELETE', ENABLED, PROPERTY_FALSE);
ELSE :CATEGORY.CATID :CATEGORY.CATID + 5;
END IF;
:=
END IF;
Object name: BTNSAVE
GO_ITEM('CATEGORY.CATNAME');
Trigger level: item level
END IF;
Trigger name: When-button-pressed BEGIN
ELSIF :CATEGORY.CATNAME IS NULL OR :CATEGORY.CATTYPE IS NULL THEN
IF :CATEGORY.CATNAME IS NULL AND :CATEGORY.CATTYPE IS NULL THEN
IF SHOW_ALERT('INC') ALERT_BUTTON1 THEN
IF SHOW_ALERT('INC') ALERT_BUTTON1 THEN
=
GO_ITEM('CATEGORY.CATNAME'); END IF;
=
ELSIF :CATEGORY.CATNAME IS NULL AND :CATEGORY.CATTYPE IS NOT NULL THEN
INSERT INTO CATEGORY(CATID, CATNAME, CATTYPE)
IF SHOW_ALERT('CATNAME') = ALERT_BUTTON1 THEN
VALUES(:CATEGORY.CATID, INITCAP(:CATEGORY.CATNAME), :CATEGORY.CATTYPE);
GO_ITEM('CATEGORY.CATNAME'); FORMS_DDL('COMMIT');
END IF; ELSIF :CATEGORY.CATTYPE IS NULL AND :CATEGORY.CATNAME IS NOT NULL THEN
SHOW_ALERT('SAVED') THEN
IF SHOW_ALERT('CATTYPE') = ALERT_BUTTON1 THEN
CLEAR_RECORD; SET_ITEM_PROPERTY('CATEGORY.BT NADD', ENABLED, PROPERTY_TRUE);
GO_ITEM('CATEGORY.CATTYPE'); END IF; ELSE
SET_ITEM_PROPERTY('CATEGORY.BT NUPDATE', ENABLED, PROPERTY_TRUE);
SELECT CATID, CATNAME INTO :CATEGORY.CATNAME
IF = ALERT_BUTTON1
:CATEGORY.CATID, SET_ITEM_PROPERTY('CATEGORY.BT NDELETE', ENABLED, PROPERTY_TRUE);
FROM CATEGORY WHERE :CATEGORY.CATID OR :CATEGORY.CATNAME;
CATID CATNAME
IF SHOW_ALERT('DUPLICATE') ALERT_BUTTON1 THEN
END IF;
= =
END IF; END;
= Object name: BTNUPDATE Trigger level: item level
NULL;
Trigger name: When-button-pressed
END IF;
IF :CATEGORY.CATID IS NULL THEN
END IF;
IF
SHOW_LOV('LOV_CATEGORY')
THEN
EXCEPTION
NULL;
WHEN NO_DATA_FOUND THEN END IF;
IF SHOW_ALERT('SAVE')=ALERT_BUTTON1 THEN
ELSIF :CATEGORY.CATNAME IS NULL AND :CATEGORY.CATTYPE IS NULL THEN IF SHOW_ALERT('INC') ALERT_BUTTON1 THEN
SELECT MAX(CATEGORY.CATID)
=
:CATEGORY.CATNAME := '';
INTO :CATEGORY.CATID
:CATEGORY.CATTYPE := ''; FROM CATEGORY; GO_ITEM('CATEGORY.CATNAME'); END IF;
IF :CATEGORY.CATID IS NULL THEN
ELSIF :CATEGORY.CATNAME IS NULL OR :CATEGORY.CATTYPE IS NULL THEN
:CATEGORY.CATID := 1;
IF SHOW_ALERT('INC') ALERT_BUTTON1 THEN
ELSE :CATEGORY.CATID :CATEGORY.CATID + 5; END IF;
:=
GO_ITEM('CATEGORY.CATNAME'); END IF;
=
ELSIF :CATEGORY.CATNAME IS NULL AND :CATEGORY.CATTYPE IS NOT NULL THEN IF SHOW_ALERT('CATNAME') ALERT_BUTTON1 THEN
=
END IF; END IF; END IF;
GO_ITEM('CATEGORY.CATNAME');
Object name: BTNCLOSE
END IF;
Trigger level: item level
ELSIF :CATEGORY.CATTYPE IS NULL AND :CATEGORY.CATNAME IS NOT NULL THEN IF SHOW_ALERT('CATTYPE') ALERT_BUTTON1 THEN
=
Trigger name: When-button-pressed IF SHOW_ALERT('CLOSE') = ALERT_BUTTON1 THEN EXIT_FORM; END IF;
GO_ITEM('CATEGORY.CATTYPE'); END IF;
Screen no: 17
ELSIF SHOW_ALERT('UPDATE')=ALERT_BUTTON1 THEN
Screen name: SALES PARAMETER Description: Allows the user to generate reports from sales.
UPDATE CATEGORY SET CATNAME = INITCAP(:CATEGORY.CATNAME), CATTYPE = :CATEGORY.CATTYPE WHERE CATID = :CATEGORY.CATID OR CATNAME = :CATEGORY.CATNAME; FORMS_DDL('COMMIT'); IF SHOW_ALERT('UPDATED') ALERT_BUTTON1 THEN
=
CLEAR_RECORD; Object name: BTNGENERATE
END IF;
Trigger level: item level
END IF;
Trigger name: When-button-pressed Object name: BTNDELETE
DECLARE
Trigger level: item level
PL_ID PARAMLIST; V_REPORT_ID REPORT_OBJECT;
Trigger name: When-button-pressed IF :CATEGORY.CATID IS NULL THEN IF
SHOW_LOV('LOV_CATEGORY')
V_REP_SERVER 'reportserver';
VARCHAR2(100)
:=
V_REPORT_JOB_ID VARCHAR2(25);
THEN
V_SERVER_LENGTH NUMBER;
NULL;
V_REP_STATUS VARCHAR2(25);
END IF;
COMPUTER_NAME VARCHAR2(50) := 'localhost';
ELSE IF SHOW_ALERT('DELETE')=ALERT_BUTTON1 THEN
BEGIN PL_ID GET_PARAMETER_LIST('tmpdata');
DELETE FROM CATEGORY WHERE :CATEGORY.CATID;
CATID
=
FORMS_DDL('COMMIT'); IF SHOW_ALERT('DELETED') = ALERT_BUTTON1 THEN CLEAR_RECORD;
:=
IF NOT ID_NULL(PL_ID) THEN DESTROY_PARAMETER_LIST(PL_ID); END IF; PL_ID CREATE_PARAMETER_LIST('tmpdata');
:=
ADD_PARAMETER(PL_ID, text_parameter, 'no');
'paraform',
ADD_PARAMETER(PL_ID, 'P_DATEFROM', text_parameter, :BLOCK6.TXTFROMDATE); ADD_PARAMETER(PL_ID, 'P_DATETO', text_parameter, :BLOCK6.TXTTODATE); ADD_PARAMETER(PL_ID, text_parameter, :BLOCK6.RANKLIST);
'P_RANK',
ADD_PARAMETER(PL_ID, text_parameter, :BLOCK6.CATLIST);
Object name: BTNUSER 'P_CAT',
Trigger level: item level Trigger name: When-button-pressed DECLARE PL_ID PARAMLIST;
V_REPORT_ID FIND_REPORT_OBJECT('ABCREPORT');
:=
V_REPORT_JOB_ID := RUN_REPORT_OBJECT(V_REPORT_ID, PL_ID);
V_REPORT_ID REPORT_OBJECT; V_REP_SERVER 'reportserver';
WHILE V_REP_STATUS IN ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
:=
V_REPORT_JOB_ID VARCHAR2(25);
V_SERVER_LENGTH := LENGTH(GET_REPORT_OBJECT_PROPERTY(V_ REPORT_ID,REPORT_SERVER)); V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ;
VARCHAR2(100)
V_SERVER_LENGTH NUMBER; V_REP_STATUS VARCHAR2(25); COMPUTER_NAME VARCHAR2(50) := 'localhost'; BEGIN PL_ID GET_PARAMETER_LIST('tmpdata');
:=
IF NOT ID_NULL(PL_ID) THEN DESTROY_PARAMETER_LIST(PL_ID);
MESSAGE('RUNNING REPORT'); V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ; END LOOP;
WEB.SHOW_DOCUMENT('/reports/rwser vlet/getjobid'||SUBSTR(V_REPORT_JOB_ID,V_SER VER_LENGTH+2)||'?server='||V_Rep_Server,'_blank' );
END IF; PL_ID CREATE_PARAMETER_LIST('tmpdata'); ADD_PARAMETER(PL_ID, text_parameter, 'no');
:= 'paraform',
ADD_PARAMETER(PL_ID, 'P_TITLE', text_parameter, 'LIST OF EMPLOYEES');
V_REPORT_ID FIND_REPORT_OBJECT('EMPLOYEES');
:=
END;
V_REPORT_JOB_ID := RUN_REPORT_OBJECT(V_REPORT_ID, PL_ID);
Screen no: 18
V_SERVER_LENGTH := LENGTH(GET_REPORT_OBJECT_PROPERTY(V_ REPORT_ID,REPORT_SERVER));
Screen name: INVENTORY REPORTS Description: Allows the user to generate reports from inventories.
V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ; WHILE V_REP_STATUS IN ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP MESSAGE('RUNNING REPORT'); V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ;
V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ; WHILE V_REP_STATUS IN ('RUNNING','OPENING_REPORT','ENQUEUED')
END LOOP; LOOP MESSAGE('RUNNING WEB.SHOW_DOCUMENT('/reports/rwser vlet/getjobid'||SUBSTR(V_REPORT_JOB_ID,V_SER VER_LENGTH+2)||'?server='||V_Rep_Server,'_blank' );
REPORT'); V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ;
END;
END LOOP;
Object name: BTNPROD Trigger level: item level DECLARE
WEB.SHOW_DOCUMENT('/reports/rwser vlet/getjobid'||SUBSTR(V_REPORT_JOB_ID,V_SER VER_LENGTH+2)||'?server='||V_Rep_Server,'_blank' );
PL_ID PARAMLIST;
END;
Trigger name: When-button-pressed
V_REPORT_ID REPORT_OBJECT; V_REP_SERVER 'reportserver';
VARCHAR2(100)
:=
Trigger level: item level
V_REPORT_JOB_ID VARCHAR2(25);
Trigger name: When-button-pressed
V_SERVER_LENGTH NUMBER;
DECLARE
V_REP_STATUS VARCHAR2(25); COMPUTER_NAME VARCHAR2(50) := 'localhost'; BEGIN PL_ID GET_PARAMETER_LIST('tmpdata');
Object name: BTNSUPPLIER
:=
PL_ID PARAMLIST; V_REPORT_ID REPORT_OBJECT; V_REP_SERVER 'reportserver';
VARCHAR2(100)
:=
V_REPORT_JOB_ID VARCHAR2(25); V_SERVER_LENGTH NUMBER;
IF NOT ID_NULL(PL_ID) THEN
V_REP_STATUS VARCHAR2(25); DESTROY_PARAMETER_LIST(PL_ID); END IF; PL_ID CREATE_PARAMETER_LIST('tmpdata');
:=
ADD_PARAMETER(PL_ID, text_parameter, 'no');
'paraform',
ADD_PARAMETER(PL_ID, text_parameter, 'LIST OF PRODUCTS');
'P_TITLE',
COMPUTER_NAME VARCHAR2(50) := 'localhost'; BEGIN PL_ID GET_PARAMETER_LIST('tmpdata');
:=
IF NOT ID_NULL(PL_ID) THEN DESTROY_PARAMETER_LIST(PL_ID); END IF;
V_REPORT_ID FIND_REPORT_OBJECT('PRODUCT');
:=
V_REPORT_JOB_ID := RUN_REPORT_OBJECT(V_REPORT_ID, PL_ID); V_SERVER_LENGTH := LENGTH(GET_REPORT_OBJECT_PROPERTY(V_ REPORT_ID,REPORT_SERVER));
PL_ID CREATE_PARAMETER_LIST('tmpdata');
:=
ADD_PARAMETER(PL_ID, text_parameter, 'no');
'paraform',
ADD_PARAMETER(PL_ID, text_parameter, 'LIST OF SUPPLIERS');
'P_TITLE',
V_REPORT_ID FIND_REPORT_OBJECT('SUPPLIER');
:=
PL_ID CREATE_PARAMETER_LIST('tmpdata');
:=
V_REPORT_JOB_ID := RUN_REPORT_OBJECT(V_REPORT_ID, PL_ID);
ADD_PARAMETER(PL_ID, text_parameter, 'no');
V_SERVER_LENGTH := LENGTH(GET_REPORT_OBJECT_PROPERTY(V_ REPORT_ID,REPORT_SERVER));
ADD_PARAMETER(PL_ID, 'P_TITLE', text_parameter, 'LIST OF CATEGORYS');
V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ; WHILE V_REP_STATUS IN ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP MESSAGE('RUNNING REPORT'); V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ; END LOOP;
'paraform',
V_REPORT_ID FIND_REPORT_OBJECT('CATEGORY');
:=
V_REPORT_JOB_ID := RUN_REPORT_OBJECT(V_REPORT_ID, PL_ID); V_SERVER_LENGTH := LENGTH(GET_REPORT_OBJECT_PROPERTY(V_ REPORT_ID,REPORT_SERVER)); V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ; WHILE V_REP_STATUS IN ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
WEB.SHOW_DOCUMENT('/reports/rwser vlet/getjobid'||SUBSTR(V_REPORT_JOB_ID,V_SER VER_LENGTH+2)||'?server='||V_Rep_Server,'_blank' ); END;
MESSAGE('RUNNING REPORT'); V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ; END LOOP;
Object name: BTNGENERATE Trigger level: item level Trigger name: When-button-pressed
WEB.SHOW_DOCUMENT('/reports/rwser vlet/getjobid'||SUBSTR(V_REPORT_JOB_ID,V_SER VER_LENGTH+2)||'?server='||V_Rep_Server,'_blank' );
DECLARE PL_ID PARAMLIST; V_REPORT_ID REPORT_OBJECT; V_REP_SERVER 'reportserver';
VARCHAR2(100)
END; := Object name: BTNSTOCK
V_REPORT_JOB_ID VARCHAR2(25);
Trigger level: item level
V_SERVER_LENGTH NUMBER;
Trigger name: When-button-pressed
V_REP_STATUS VARCHAR2(25); COMPUTER_NAME VARCHAR2(50) := 'localhost';
DECLARE PL_ID PARAMLIST; V_REPORT_ID REPORT_OBJECT;
BEGIN PL_ID GET_PARAMETER_LIST('tmpdata');
:=
IF NOT ID_NULL(PL_ID) THEN
V_REP_SERVER 'reportserver';
VARCHAR2(100)
:=
V_REPORT_JOB_ID VARCHAR2(25); V_SERVER_LENGTH NUMBER;
DESTROY_PARAMETER_LIST(PL_ID); END IF;
V_REP_STATUS VARCHAR2(25); COMPUTER_NAME VARCHAR2(50) := 'localhost';
BEGIN PL_ID GET_PARAMETER_LIST('tmpdata');
:=
IF NOT ID_NULL(PL_ID) THEN DESTROY_PARAMETER_LIST(PL_ID); END IF; PL_ID CREATE_PARAMETER_LIST('tmpdata'); ADD_PARAMETER(PL_ID, text_parameter, 'no');
:= 'paraform',
ADD_PARAMETER(PL_ID, 'P_TITLE', text_parameter, 'AVAILABLE STOCK OF PRODUCTS'); V_REPORT_ID FIND_REPORT_OBJECT('STOCK');
Object name: SALESREPORTMNU CALL_FORM('C:\247\FORMSREPORT\FRMMERC HANDISE.FMX',HIDE,DO_REPLACE);
:=
V_REPORT_JOB_ID := RUN_REPORT_OBJECT(V_REPORT_ID, PL_ID); V_SERVER_LENGTH := LENGTH(GET_REPORT_OBJECT_PROPERTY(V_ REPORT_ID,REPORT_SERVER)); V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ; WHILE
Object name: SALESREPORTMNU CALL_FORM('C:\247\FORMSREPORT\FRMSALE CATEGORY.FMX',HIDE,DO_REPLACE); Object name: SALESREPORTMNU CALL_FORM('C:\247\FORMSREPORT\FRMSALE PARAMETER.FMX',HIDE,DO_REPLACE);
Object name: SALESREPORTMNU
V_REP_STATUS IN ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP MESSAGE('RUNNING REPORT'); V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ; END LOOP; WEB.SHOW_DOCUMENT('/reports/rwser vlet/getjobid'||SUBSTR(V_REPORT_JOB_ID,V_SER VER_LENGTH+2)||'?server='||V_Rep_Server,'_blank' ); END;
CALL_FORM('C:\247\FORMSREPORT\FRMTOPN. FMX',HIDE,DO_REPLACE);
Object name: SALESREPORTMNU CALL_FORM('C:\247\FORMSREPORT\FRMPURC HASEREPORT.FMX',HIDE,DO_REPLACE);
Object name: RECEVIENGLOGMNU CALL_FORM('C:\247\FORMSREPORT\FRMRECEI VINGLOG.FMX',HIDE,DO_REPLACE);
Object name: RETURNMNU CALL_FORM('C:\247\FORMSREPORT\FRMRETU RNLOG.FMX',HIDE,DO_REPLACE);
Screen no: 19 Screen name: MENUS Description: Allows the user to select from the given menus.
Object name: INVENTORYREPORTMNU DECLARE PL_ID PARAMLIST; V_REPORT_ID REPORT_OBJECT; V_REP_SERVER 'reportserver';
VARCHAR2(100)
V_REPORT_JOB_ID VARCHAR2(25); V_SERVER_LENGTH NUMBER; V_REP_STATUS VARCHAR2(25);
:=
COMPUTER_NAME VARCHAR2(50) := 'localhost'; BEGIN PL_ID GET_PARAMETER_LIST('tmpdata');
:=
IF NOT ID_NULL(PL_ID) THEN DESTROY_PARAMETER_LIST(PL_ID); END IF; PL_ID CREATE_PARAMETER_LIST('tmpdata'); ADD_PARAMETER(PL_ID, text_parameter, 'no');
:= 'paraform',
ADD_PARAMETER(PL_ID, 'P_TITLE', text_parameter, 'TOTAL BALANCE OF UNPERCHASE');
V_REPORT_ID FIND_REPORT_OBJECT('BALANCE');
:=
V_REPORT_JOB_ID := RUN_REPORT_OBJECT(V_REPORT_ID, PL_ID); V_SERVER_LENGTH := LENGTH(GET_REPORT_OBJECT_PROPERTY(V_ REPORT_ID,REPORT_SERVER)); V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ; WHILE V_REP_STATUS IN ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP MESSAGE('RUNNING REPORT'); V_REP_STATUS := REPORT_OBJECT_STATUS(V_REPORT_JOB_ID) ; END LOOP;
WEB.SHOW_DOCUMENT('/reports/rwser vlet/getjobid'||SUBSTR(V_REPORT_JOB_ID,V_SER VER_LENGTH+2)||'?server='||V_Rep_Server,'_blank' ); END; Object name: LETTERSMNU CALL_FORM('C:\247\FORMSREPORT\FRMLETT ER.FMX',HIDE,DO_REPLACE);