Вы находитесь на странице: 1из 23

Dimafelix, Librado Jr.

Macalindong, Rovick Dilag


Paredes, Nino

7Eleven Receipt System

Business Background

Philippine Seven Corporation (“PSC”) was registered


with the Securities and Exchange Commission (“SEC”) on
November 23, 1982. It acquired from Southland Corporation
(now Seven Eleven, Inc. or “SEI”) of Dallas, Texas the license
to operate 7-Eleven stores in the Philippines in December 13,
1982. Operations commenced with the opening of its first store
in February 29, 1984 at the corner of Kamias Road and EDSA
Quezon City, Metro Manila. Considering the country’s
economic condition at that time, the Company grew slowly in
its first few years of existence.

In July 28, 1988, PSC transferred the Philippine area license to


operate 7-Eleven stores to its affiliate, Phil-Seven Properties Corporation (“PSPC”), together
with some of its store properties. In exchange thereof, PSC received 47% of PSPC stock as
payment. Concurrent with the transfer, PSC entered into a sublicensing agreement with PSPC to
operate 7-Eleven stores in Metro Manila and suburbs. As part of PSPC’s main business, it
acquired or leased commercial properties and constructed retail store buildings, leasing the
buildings to PSC on long term basis together with most of the capital equipment used for store
operations. In effect, PSC concentrated on managing its stores and effectively took the role of a
pure retailer.

In May 2, 1996, the stockholders of both PSC and PSPC approved the merger of the two
companies to advance PSC group’s expansion. In October 30, 1996, SEC approved the merger
and PSPC was then absorbed by PSC as the surviving entity. With the consolidation of the
respective lines of business of PSC and PSPC, PSC’s retailing strengths were complemented by
PSPC’s property and franchise holdings. Their management as a single entity enhanced
operational efficiency and strengthened ability to raise capital for growth. PSC listed its shares
(SEVN) in the Philippine Stock Exchange and had its initial public offering in February 04,
1998. The shares were offered at the price of P4.40 per share from its par value of P1.00 per
share. In September 17, 1998, PSC established Convenience Distribution Inc. (“CDI”), a wholly
owned subsidiary, to provide logistics planning and services to its 7-Eleven stores.
With the effectivity of the Retail Trade Liberalization Act (R.A. 8762) on March 25, 2000,
foreign entities were allowed to invest in an existing retail company subject to the requirements
of the law. President Chain Store (Labuan) Holdings, Ltd. (PCSL), a Malaysian investment
holding company, purchased 119,575,008 common shares of PSC or 50.4% of PSC’s
outstanding capital stock at the price of P8.30 per share. The purchase was made under a tender
offer during October 9 to November 7, 2000. PCSL is affiliated with President Chain Store
Corporation, which is also the 7-Eleven licensee in Taiwan. This provided source for technical
support to strengthen PSC’s organizational structure and operating systems and pursue store
expansion plans. A new affiliate, Store Sites Holding, Inc., was also established on November 9,
2000, as the entity to own land properties. These land properties are leased to PSC by SSHI.

PSC’s area license to operate 7-Eleven Stores in the Philippines was renewed in August 31, 2007
for another term of 20 years, renewable every 10 years. The Renewal Area License Agreement
has been approved by and registered with the Intellectual Property Office as of September 25,
2007.
PSC initiated the establishment of PhilSeven Foundation, Inc. (PFI) in October 2, 2007 to
support its corporate social responsibility programs. PFI was granted a certificate of registration
by DSWD on August 6, 2010, after completing the 2-year operations requirement. BIR issued a
certificate of registration to PFI dated December 21, 2011 recognizing PFI as a done institution.
In October 10, 2013, PFI became a member of the League of Corporate Foundations, Inc. In July
08, 2016, DSWD issued a Certificate of Registration to PFI allowing it to expand its operations
from NCR to nationwide which is valid for 3 years.
As of December 31, 2017, the Company has a total of 2,670 direct hires and augments its
temporary needs during peak hours or season in the stores and the support services units with
cooperative members. There is no existing labor union in the company and collective bargaining
agreement. There is a PSC Employees’ Council which communicates to management the
employees concerns. There has been no strike or threat to strike from the employees for the past
three years.

The Company provides supplemental benefits or incentives to its employees such as: retirement
benefit plan, health card group life and and accident insurance plan, various employee programs
and recognition of top performing employees and service awards among others.

Recognizing the need of employees for growth, training and development programs are regularly
provided by PSC across all levels. For Senior Management and Officers, the company conducts a
Leadership Academy & Mentor’s Leadership Training Program with the objective in line with
the Company’s succession planning program. In-house trainings on skills, products, basic
negotiation, change management, retailer initiative and basic operating procedures are also
provided by the Company to employees. These are offered periodically based on annual training
calendar every month or quarterly. In-house trainings are designed to augment and develop the
employee skills and competencies.

The top risks in retail industry to which PSC belongs include increase in competition, brand
reputation and business operations/supply chain continuity. Meanwhile, the main risks arising
from the Company’s financial instruments are credit risk, liquidity risk, and interest rate risk.
The Audit Committee ensures the integrity of internal control activities, develops, oversees,
checks and preapproves financial management functions and systems in the areas of credit,
market, liquidity, operational, legal and other risks and crisis management. The Internal Audit
Division and the External Auditor directly report to the Audit Committee regarding the direction,
scope and coordination of audit and any related activities.
At year end, PSC is operating 2,285 stores, 1,224 of which are franchise stores and the remaining
1,061 are company-owned stores. The store franchise contracts have an average term of 5 years
each.

PSC continually observes the activities of its major competitors in line with its strategy to
maintain its leadership in the Convenience Store (“C-Store”) Industry. Entry of foreign brand C-
Stores increase in 2014 and a number of other generic or hybrid stores or grocery stores
including gas marts continue to be present. PSC has forged a non-exclusive tie-up with Chevron
Philippines Inc. in August 2009 for opening of 7-Eleven stores in selected Caltex gas stations
and there are 92 7-Eleven Stores as of 2017. The Company continues to sustain its leadership by
putting stores in strategic locations, carrying product assortment fit for such market.

7 Eleven is also known for their products that we can avail in their store only such as City
Blends, Slurpee, Gulp, Big Bite, 7-Fresh Siopao, Sundae, Busog Meals. They are also known as
the national meeting place of the Philippines for they are the place where all of the people is
comfortable to wait for someone. The Value Added tax paid by the consumers of 7 Eleven is
10.72%.
Picture1. Discussion Picture2. Fixing Bugs

How to Use the Program?

1. Enter username and password “cpe”.


2. Choose an option from the menu.
 [1] Start program.
o This will lead you to the menu.
o Choose item from the list of products.
o Choose an option from the sub menu.
o Enter quantity.
o Choose whether yes – add another item, no – proceed to payment.
o Enter amount of payment.
o The receipt will be printed.
o Choose an option
 [2] Inventory
o Enter administrator password “admin”.
o The system will show the lists of products with price and stocks.
 [1] View Receipt Again. (To view the receipt.)
 [2] Order Again. (To show the Available Products.)
 [3] Main Menu. (This will lead you back to the starting Menu.)
 [0] Close Program. (Terminate the program.)
 [3] Quit
o Close the program.
3. Order Cancellation

References
https://www.7-eleven.com.ph/corporate/our-company/corporate-history/
Program Codes

#include <iostream>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <conio.h>
#include <iomanip>
#include <ctime>

using namespace std;

void main_menu();
void invalid ();
void header();
void receipt_header();
void receipt_footer();
void cblend();
void slurpee();
void gulp();
void bigbite();
void siopao();
void doughnuts();
void sisig();
void tuna();
void giniling();
void outofstock();
void no_order();
void order_notexist();
void insuf_cash();
void warning();
int decode(char code[9999]);
int login();
int password();
float menu_display(float total);

int main()
{

if (login()!=1){ return 0; }

string item_name[100] = { /*0*/"City Blends Small",/*1*/"City Blends Medium",/*2*/"City Blends Large",/*3*/"Slurpee


Small",/*4*/"Slurpee Medium",
/*5*/"Slurpee Large", /*6*/"Gulp Small", /*7*/"Gulp Medium", /*8*/"Gulp Large", /*9*/"BB JumboClassic", /*10*/"BB
CreamyCheese",
/*11*/"BB QuezoDuo", /*12*/"BB SpicyHungarian", /*13*/"BB CheesyPepperdog", /*14*/"BB TJClassic", /*15*/"BB
TJCheesedog",
/*16*/"Budget Siopao", /*17*/"Premium Siopao", /*18*/"ChocoCake Doughnut", /*19*/"Bavarian Doughnut",
/*20*/"MisterDonut LongJohn",
/*21*/"ChocoCream Doughnut", /*22*/"Cookies&Cream Doughnut", /*23*/"BM Sisig", /*24*/"BM Jumbo Sisig",
/*25*/"BM TunaOmelette", /*26*/"BM Jumbo TunaOmelette", /*27*/"BM Giniling", /*28*/"BM Jumbo Giniling" };

float item_price[100]= { /*0*/20, /*1*/29, /*2*/39,/*3*/20,/*4*/25,/*5*/30, /*6*/12, /*7*/22, /*8*/33, /*9*/30, /*10*/30, /*11*/30,
/*12*/30, /*13*/30,
/*14*/30, /*15*/30, /*16*/29, /*17*/42, /*18*/22, /*19*/23, /*20*/24, /*21*/25, /*22*/30, /*23*/29, /*24*/49, /*25*/32,
/*26*/52,
/*27*/32, /*28*/52 } ;

int item_stock[100]= { /*0*/10, /*1*/10, /*2*/10,/*3*/10,/*4*/10,/*5*/10, /*6*/10, /*7*/10, /*8*/10, /*9*/10, /*10*/10, /*11*/10,
/*12*/10, /*13*/10,
/*14*/10, /*15*/10, /*16*/10, /*17*/10, /*18*/10, /*19*/10, /*20*/10, /*21*/10, /*22*/10, /*23*/10, /*24*/10, /*25*/10,
/*26*/10,
/*27*/10, /*28*/10 } ;
int rcpt_num = 1024998;

main_menu:
char code[9999];
int ctr, ctr1, pass;
cout <<fixed <<setprecision(2);

main_menu();
cin.getline( code, 9999 );
while (strlen(code)!=1){ invalid(); goto main_menu; }

switch (code[0]){
case '1': break;
case '2':
pass = password();
if (pass==1){ goto main_menu; }
else if (pass==2){
header();
cout << "\n\n\n\t\t\t\t\tSuspicious Activity Detected!";
goto close; }

inventory:
header();
cout << "\t\t || < INVENTORY > ||" <<endl;
cout << "\t\t ||=============================================================================||"
<<endl;
cout << "\t\t || ITEM NAME PRICE STOCK ||" <<endl;
for (ctr=0, ctr1=1; ctr<=28; ctr++, ctr1++){
cout << "\t\t || " <<right <<setw(2) <<ctr1 <<". " <<left <<setw(31) <<item_name[ctr];
cout <<right <<setw(10) <<item_price[ctr] ;
if (ctr<=8){ cout <<right <<setw(20) << "n/a" <<" ||" <<endl; }
else if (item_stock[ctr]==0){ cout <<right <<setw(25) << "out of stock" <<" ||" <<endl; }
else { cout <<right <<setw(20) <<item_stock[ctr] <<" ||" <<endl; } }
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] Close ||" <<endl;
cout << "\t\t #===============================================================================#"
<<endl;
cout << "\n\t\t Enter Command: ";
cin.getline( code, 9999 );
while ((strlen(code)!=1)||(code[0]!='0')){ invalid(); goto inventory; }
goto main_menu; break;
case '0':
header();
close:
cout << "\n\n\n\t\t\t\t\tLogging Out . . .\n\n\n\t\t\t\t\t";
system ("PAUSE");
header();
cout << "\n\n\n\t\t\t\t\tClosing Program . . .\n\n\n\t\t\t\t\t";
return 0; break;
default :
invalid();
goto main_menu;
}

menu:
int num = 0, qty, pcode, len = 0, item_qty[100], p_stock[100];
float vat_able, vat_tax, change, cash, price = 0, total = 0, item_total_price[100], product_price[100];
string product_code [100];

PCODE:
menu_display(total);
cin.getline( code, 9999 );
while (strlen(code)!=1){ invalid(); goto PCODE; }

switch (code[0]){
case '1': c1:
cblend();
cin.getline( code, 9999 );
while (strlen(code)!=1){ invalid(); goto c1; }
switch (code[0]){
case '1': pcode = 0; ctr = 0; break;
case '2': pcode = 1; ctr = 1; break;
case '3': pcode = 2; ctr = 2; break;
case '0': goto PCODE; break;
default : invalid(); goto c1; } break;
case '2': c2:
slurpee();
cin.getline( code, 9999 );
while (strlen(code)!=1){ invalid(); goto c2; }
switch (code[0]){
case '1': pcode = 3; ctr = 3; break;
case '2': pcode = 4; ctr = 4; break;
case '3': pcode = 5; ctr = 5; break;
case '0': goto PCODE; break;
default : invalid(); goto c2; } break;
case '3': c3:
gulp();
cin.getline( code, 9999 );
while (strlen(code)!=1){ invalid(); goto c3; }
switch (code[0]){
case '1': pcode = 6; ctr = 6; break;
case '2': pcode = 7; ctr = 7; break;
case '3': pcode = 8; ctr = 8; break;
case '0': goto PCODE; break;
default : invalid(); goto c3; } break;
case '4': c4:
bigbite();
cin.getline( code, 9999 );
while (strlen(code)!=1){ invalid(); goto c4; }
switch (code[0]){
case '1': pcode = 9; ctr = 9; break;
case '2': pcode = 10; ctr = 10; break;
case '3': pcode = 11; ctr = 11; break;
case '4': pcode = 12; ctr = 12; break;
case '5': pcode = 13; ctr = 13; break;
case '6': pcode = 14; ctr = 14; break;
case '7': pcode = 15; ctr = 15; break;
case '0': goto PCODE; break;
default : invalid(); goto c4; } break;
case '5': c5:
siopao();
cin.getline( code, 9999 );
while (strlen(code)!=1){ invalid(); goto c5; }
switch (code[0]){
case '1': pcode = 16; ctr = 16; break;
case '2': pcode = 17; ctr = 17; break;
case '0': goto PCODE; break;
default : invalid(); goto c5; } break;
case '6': c6:
doughnuts();
cin.getline( code, 9999 );
while (strlen(code)!=1){ invalid(); goto c6; }
switch (code[0]){
case '1': pcode = 18; ctr = 18; break;
case '2': pcode = 19; ctr = 19; break;
case '3': pcode = 20; ctr = 20; break;
case '4': pcode = 21; ctr = 21; break;
case '5': pcode = 22; ctr = 22; break;
case '0': goto PCODE; break;
default : invalid(); goto c6; } break;
case '7': c7:
sisig();
cin.getline( code, 9999 );
while (strlen(code)!=1){ invalid(); goto c7; }
switch (code[0]){
case '1': pcode = 23; ctr = 23; break;
case '2': pcode = 24; ctr = 24; break;
case '0': goto PCODE; break;
default : invalid(); goto c7; } break;
case '8': c8:
tuna();
cin.getline( code, 9999 );
while (strlen(code)!=1){ invalid(); goto c8; }
switch (code[0]){
case '1': pcode = 25; ctr = 25; break;
case '2': pcode = 26; ctr = 26; break;
case '0': goto PCODE; break;
default : invalid(); goto c8; } break;
case '9': c9:
giniling();
cin.getline( code, 9999 );
while (strlen(code)!=1){ invalid(); goto c9; }
switch (code[0]){
case '1': pcode = 27; ctr = 27; break;
case '2': pcode = 28; ctr = 28; break;
case '0': goto PCODE; break;
default : invalid(); goto c9; } break;
case '0': c0:
warning();
cin.getline( code, 9999 );
while (strlen(code)!=1){ invalid(); goto c0; }
code[0]=tolower(code[0]);
switch (code[0]){
case 'y':
for (num = 0; num<len; num++){
item_stock[p_stock[num]] += item_qty[num]; }
goto main_menu; break;
case 'n': goto PCODE; break;
default : invalid(); goto c0; } break;
case 'v': if (total==0){ no_order(); goto PCODE; }
goto order_list; break;
default : invalid(); goto PCODE;
}

QTY:
header();
cout << "\t\t || < QUANTITY > ||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || ||" <<endl;
cout << "\t\t || Product Description: "<<left <<setw(36) <<item_name[pcode] <<" ||" <<endl;
cout << "\t\t || ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] Cancel ||" <<endl;
cout << "\t\t #===============================================================================#" <<endl;
cout << "\n\t\t Enter Quantity: ";
cin.getline( code, 9999 );

while ((decode(code)!=0)){ invalid(); goto QTY; }


qty = atoi(code);
if (qty==0){ goto PCODE; }
else if (ctr<=8){ goto process; }
else if (item_stock[ctr]==0){ outofstock(); goto PCODE; }
else if ((item_stock[ctr] - qty)<0){
header();
cout << "\n\n\n";
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t || Stock Exceeded! ||" <<endl;
cout << "\t\t\t\t || (" <<right <<setw(2) <<item_stock[ctr] <<") available . . . ||" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\n\n\n\t\t\t\t ";
system ("PAUSE");
goto QTY; }
process:
price = (item_price[pcode])*qty;
total += price;
item_total_price[len] = price;
item_qty[len] = qty;
product_code[len] = item_name[pcode];
product_price[len] = item_price[pcode];
if (ctr>=9){ item_stock[ctr] -= qty;
p_stock[len] = ctr; }
len++;

order_list:
header();
cout << "\t\t || Total: " <<left <<setw(68) <<total <<"||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || < ORDER LIST > ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || No. Product Name Price Qty Total ||" <<endl;
cout << "\t\t || ||" <<endl;

for ( ctr = 0, ctr1=1; ctr<len; ctr++, ctr1++ ){


cout << "\t\t || " <<right <<setw(3) <<ctr1 <<". "<<left <<setw(31) <<product_code[ctr];
cout <<left <<setw(13) <<product_price[ctr];
cout <<left <<setw(5) <<item_qty[ctr] ;
cout <<right <<setw(9) <<item_total_price[ctr] << " ||" <<endl; }

cout << "\t\t || ||" <<endl;


cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [1] Cancel an Order || [2] Add another Order ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] Proceed to Payment ||" <<endl;
cout << "\t\t #===============================================================================#"
<<endl;
cout << "\n\t\t Enter Choice: ";
cin.getline( code, 9999 );
while (strlen(code)!=1){ invalid(); goto order_list; }

switch (code[0]){
case '1': {
cancel:
if (total==0){ len = 0; no_order(); goto PCODE; }
header();
cout << "\t\t || Total: " <<left <<setw(68) <<total <<"||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || < ORDER LIST > ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || No. Product Name Price Qty Total ||" <<endl;
cout << "\t\t || ||" <<endl;

for ( ctr = 0, ctr1=1; ctr<len; ctr++, ctr1++ ){


cout << "\t\t || >" <<right <<setw(3) <<ctr1 <<". "<<left <<setw(31) <<product_code[ctr];
cout <<left <<setw(13) <<product_price[ctr];
cout <<left <<setw(5) <<item_qty[ctr] ;
cout <<right <<setw(9) <<item_total_price[ctr] << " ||" <<endl; }

cout << "\t\t || ||" <<endl;


cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] Done ||" <<endl;
cout << "\t\t #===============================================================================#"
<<endl;
cout << "\n\t\t Enter the no. of the order to be cancelled: ";
cin.getline( code, 9999 );
while ((decode(code)!=0)){ invalid(); goto cancel; }
int c = atoi(code);
c--;
if (c>len-1){
order_notexist();
goto cancel; }
else if (c+1==0){ goto order_list; }
else{
total -= item_total_price[c];
item_stock[p_stock[c]] += item_qty[c];
while (c<len){
p_stock[c] = p_stock[c+1];
product_code[c] = product_code[c+1];
product_price[c] = product_price[c+1];
item_qty[c] = item_qty[c+1];
item_total_price[c] = item_total_price[c+1];
c++; }
len--;
goto cancel; } }
break;
case '2': {price = 0; qty = 0; goto PCODE; }
break;
case '0':
break;
default : invalid(); goto order_list; }

payment:
if (total==0){ no_order(); goto PCODE; }
header();
cout << "\t\t || Total: " <<left <<setw(68) <<total <<"||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || < ORDER LIST > ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || No. Product Name Price Qty Total ||" <<endl;
cout << "\t\t || ||" <<endl;

for ( num = 0, ctr=1; num<len; num++, ctr++ ){


cout << "\t\t || " <<right <<setw(3) <<ctr <<". "<<left <<setw(31) <<product_code[num];
cout <<left <<setw(13) <<product_price[num];
cout <<left <<setw(5) <<item_qty[num] ;
cout <<right <<setw(9) <<item_total_price[num] << " ||" <<endl; }

cout << "\t\t || ||" <<endl;


cout << "\t\t #===============================================================================#"
<<endl;
cout << "\n\t\t Enter Cash Amount: ";
cin.getline( code, 9999 );

while ((decode(code)!=0)){ invalid(); goto payment; }


cash = atof(code);
change = cash - total;

if (change<0){
insuf_cash();
goto payment; }

vat_tax = total*0.1072;
vat_able = total - vat_tax;

receipt:
receipt_header();
cout << "\t\t\t\t\t|| RCPT #" <<left <<setw(15) <<rcpt_num <<" RCPT_CNT#0 ||" <<endl;
cout << "\t\t\t\t\t|| STORE#0936 SN#:kSH20572 ||" <<endl;
cout << "\t\t\t\t\t|| MIN #: 15472659265825573 ||" <<endl;
cout << "\t\t\t\t\t|| STAFF/S: BSCpE-1201 ||" <<endl;
cout << "\t\t\t\t\t|| ||" <<endl;

for ( num = 0; num<len; num++ ){


cout << "\t\t\t\t\t|| " ;
cout <<left <<setw(25) <<product_code[num];
if (item_qty[num]>1){
cout <<" ||" << "\n\t\t\t\t\t|| ";
cout <<left <<setw(8) <<product_price[num] <<" X " ;
cout <<left <<setw(8) <<item_qty[num] ;}
cout <<right <<setw(11) <<item_total_price[num] << " ||" <<endl; }

cout << "\t\t\t\t\t|| ------------------------------------ ||" <<endl;


cout << "\t\t\t\t\t|| TOTAL : " <<right <<setw(27) <<total <<" ||" <<endl;
cout << "\t\t\t\t\t|| ||" <<endl;
cout << "\t\t\t\t\t|| CASH " <<right <<setw(27) <<cash <<" ||" <<endl;
cout << "\t\t\t\t\t|| CHANGE " <<right <<setw(27) <<change <<" ||" <<endl;
cout << "\t\t\t\t\t|| ||" <<endl;
cout << "\t\t\t\t\t|| VATable" <<right <<setw(27) <<vat_able <<" ||" <<endl;
cout << "\t\t\t\t\t|| VAT_Tax" <<right <<setw(27) <<vat_tax <<" ||" <<endl;

receipt_footer();

remarks:
header();
cout << "\n\n\n";
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\t\t\t\t || Thank You for Using This Program ||" <<endl;
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\t\t\t\t || [1] View Receipt Again ||" <<endl;
cout << "\t\t\t\t ||--------------------------------------||" <<endl;
cout << "\t\t\t\t || [2] Order Again ||" <<endl;
cout << "\t\t\t\t ||--------------------------------------||" <<endl;
cout << "\t\t\t\t || [3] Main Menu ||" <<endl;
cout << "\t\t\t\t ||--------------------------------------||" <<endl;
cout << "\t\t\t\t || [0] Close Program ||" <<endl;
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\n\t\t\t\t Enter Decision: ";
cin.getline( code, 9999 );

while (strlen(code)!=1){ invalid(); goto remarks; }

switch (code[0]){
case '1':
goto receipt; break;
case '2':
rcpt_num = rcpt_num*1.0203;
goto menu; break;
case '3':
rcpt_num = rcpt_num*1.1203;
goto main_menu; break;
case '0':
header();
cout << "\n\n\n\t\t\t\t\tLogging Out . . .\n\n\n\t\t\t\t\t";
system ("PAUSE");
header();
cout << "\n\n\n\t\t\t\t\tClosing Program . . .\n\n\n\t\t\t\t\t";
return 0; break;
default :
invalid();
goto remarks; }

} //end of int main

float menu_display(float total){


cout <<fixed <<setprecision(2);

system ("CLS");
cout << "\t\t #===============================================================================#" <<endl;
cout << "\t\t || 7-ELEVEN Receipt System ||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || Total: " <<left <<setw(68) <<total <<"||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || MENU: || || ||" <<endl;
cout << "\t\t || Drinks || Snacks || Busog Meals ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || || || ||" <<endl;
cout << "\t\t || [1] City Blends || [4] Big Bites || [7] Sisig ||" <<endl;
cout << "\t\t || || || ||" <<endl;
cout << "\t\t || [2] Slurpee || [5] Siopao || [8] Tuna Omelette ||" <<endl;
cout << "\t\t || || || ||" <<endl;
cout << "\t\t || [3] Gulp || [6] Doughnuts || [9] Giniling ||" <<endl;
cout << "\t\t || || || ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] Close || [v] View Order List ||" <<endl;
cout << "\t\t #===============================================================================#" <<endl;
cout << "\n\t\t Enter Code: ";
return (total);
}

int decode(char code[9999]){


int lenght, error;
lenght = (strlen(code))-1;

for ( error = 0 ;lenght>=0 ;lenght--){


if (!isdigit(code[lenght])) { error++ ;}
}
return (error);
}

int login(){
string username ;
char password[100] , ch;
int attempt = 5, login, ctr;

login :
ctr = -1;
while (ctr<=100){ password[ctr++]=0; }

if (attempt==0){ return 0;}


header();
cout << "\n WELCOME!!! \n\n";
cout << " Enter username: ";
getline(cin, username);
cout << " Enter Password: ";

for ( ctr=0; ; ctr++ ){


ch = getch();
if ((ch!=8)&&(ch!=13)){ password[ctr] = ch; }
else if (ch==8){ password[ctr-1]=0; ctr-=2;
if (ctr<-1){ ctr=-1; } }
else if (ch==13){ break; }
header();
cout << "\n WELCOME!!! \n\n";
cout << " Enter username: ";
cout << username <<endl;
cout << " Enter Password: ";
for ( int ctr1=0; ctr1<ctr+1; ctr1++){ cout << "*"; } }

if ((username!="cpe")||(strcmp(password, "cpe")!=0)){
attempt--;
header();
cout << "\n\n Invalid username or password!" <<endl;
cout << "\n\n Remaining attempts: " <<attempt ;
cout <<"\n\n ";
system ("PAUSE");
goto login; }
else {
header();
login = 1;
cout << "\n\n\n";
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t || LOGGED-IN SUCCESSFULLY! ||" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\n\n\n\t\t\t\t ";
system ("PAUSE");
return (login);}
}

int password(){
char password[100], ch;
int attempt = 5, pass, ctr ;

password :
ctr = -1;
while (ctr<=100){ password[ctr++]=0; }

if (attempt==0){ pass = 2; return(pass); }


header();
cout << "\t\t || ||" <<endl;
cout << "\t\t || FOR AUTHORIZED PERSONNEL ONLY! ||" <<endl;
cout << "\t\t || ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] BACK ||" <<endl;
cout << "\t\t #===============================================================================#\n"
<<endl;
cout << "\t\t Enter Password: ";

for ( ctr=0; ; ctr++ ){


ch = getch();
if ((ch!=8)&&(ch!=13)){ password[ctr] = ch; }
else if (ch==8){ password[ctr-1]=0; ctr-=2;
if (ctr<-1){ ctr=-1; } }
else if (ch==13){ break; }
header();
cout << "\t\t || ||" <<endl;
cout << "\t\t || FOR AUTHORIZED PERSONNEL ONLY! ||" <<endl;
cout << "\t\t || ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] BACK ||" <<endl;
cout << "\t\t #===============================================================================#\n"
<<endl;
cout << "\t\t Enter Password: ";
for ( int ctr1=0; ctr1<ctr+1; ctr1++){ cout << "*"; } }

if (strcmp(password, "admin")==0){
header();
cout << "\n\n\n";
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t || ACCESS GRANTED! ||" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\n\n\n\t\t\t\t ";
system ("PAUSE");
return 0;}
else {
if (strcmp(password, "0")==0){ pass = 1; return (pass);}
attempt--;
header();
cout << "\n\n Password is Incorrect!" <<endl;
cout << "\n\n Remaining attempts: " <<attempt ;
cout <<"\n\n ";
system ("PAUSE");
goto password; }
}

void receipt_header(){
time_t now = time(0);
char* dt = ctime (&now);
dt[strlen(dt)-1] = '\0';

system ("CLS");
cout << "\t\t\t\t\t#========================================#" <<endl;
cout << "\t\t\t\t\t|| 7-ELEVEN ||" <<endl;
cout << "\t\t\t\t\t|| ||" <<endl;
cout << "\t\t\t\t\t|| Philippine Seven Corporation ||" <<endl;
cout << "\t\t\t\t\t|| Owned & Operated by: Philippine ||" <<endl;
cout << "\t\t\t\t\t|| Seven Corporation ||" <<endl;
cout << "\t\t\t\t\t|| VATREGTIN #000-123-456-7890 ||" <<endl;
cout << "\t\t\t\t\t|| Brgy. Bucana, Nasugbu Batangas, ||" <<endl;
cout << "\t\t\t\t\t|| Nasugbu, Batangas, Philippines ||" <<endl;
cout << "\t\t\t\t\t|| Tel #: (63)09123456789 ||" <<endl;
cout << "\t\t\t\t\t|| ||" <<endl;
cout << "\t\t\t\t\t|| " <<setw(24) << dt << " ||" <<endl;
cout << "\t\t\t\t\t|| ||" <<endl;
}

void receipt_footer(){
cout << "\t\t\t\t\t|| Zero_Rated 0.00 ||" <<endl;
cout << "\t\t\t\t\t|| VAT-Exempted 0.00 ||" <<endl;
cout << "\t\t\t\t\t|| ||" <<endl;
cout << "\t\t\t\t\t|| Sold To:____________________________ ||" <<endl;
cout << "\t\t\t\t\t|| Name:_______________________________ ||" <<endl;
cout << "\t\t\t\t\t|| Address:____________________________ ||" <<endl;
cout << "\t\t\t\t\t|| TIN:________________________________ ||" <<endl;
cout << "\t\t\t\t\t|| ||" <<endl;
cout << "\t\t\t\t\t|| Philippine Seven Corporation ||" <<endl;
cout << "\t\t\t\t\t|| Brgy. Bucana, Nasugbu, Batangas ||" <<endl;
cout << "\t\t\t\t\t|| TIN: 123 456 789 000 ||" <<endl;
cout << "\t\t\t\t\t|| BIR Accr # ||" <<endl;
cout << "\t\t\t\t\t|| 123-123456789-000876-81027 ||" <<endl;
cout << "\t\t\t\t\t|| Accr Date: 08/29/2008-07/31/2020 ||" <<endl;
cout << "\t\t\t\t\t|| Permit #: ||" <<endl;
cout << "\t\t\t\t\t|| FP092019-911-01234567-00000 ||" <<endl;
cout << "\t\t\t\t\t|| ||" <<endl;
cout << "\t\t\t\t\t|| THIS RECEIPT SHALL BE VALID FOR ||" <<endl;
cout << "\t\t\t\t\t|| FIVE (5) YEARS FROM THE DATE OF ||" <<endl;
cout << "\t\t\t\t\t|| PERMIT TO USE ||" <<endl;
cout << "\t\t\t\t\t|| ||" <<endl;
cout << "\t\t\t\t\t|| - THIS IS AN UNOFFICIAL RECEIPT - ||" <<endl;
cout << "\t\t\t\t\t|| ------------------------------------ ||" <<endl;
cout << "\t\t\t\t\t|| *This is only an imitation made for ||" <<endl;
cout << "\t\t\t\t\t|| our project. Please don't take this ||" <<endl;
cout << "\t\t\t\t\t|| seriously. ||" <<endl;
cout << "\t\t\t\t\t#========================================#" <<endl;
cout << "\n\t\t\t\t\t";
system ("PAUSE");
}

void cblend(){
header();
cout << "\t\t || < COFFEE BLEND > ||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || SIZE || PRICE ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [1] Small || 20.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [2] Medium || 29.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [3] Large || 39.00 ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] Cancel ||" <<endl;
cout << "\t\t #===============================================================================#" <<endl;
cout << "\n\t\t Enter Size: ";
}

void slurpee(){
header();
cout << "\t\t || < SLURPEE > ||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || SIZE || PRICE ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [1] Small || 20.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [2] Medium || 25.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [3] Large || 30.00 ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] Cancel ||" <<endl;
cout << "\t\t #===============================================================================#" <<endl;
cout << "\n\t\t Enter Size: ";
}

void gulp(){
header();
cout << "\t\t || < GULP > ||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || SIZE || PRICE ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [1] Small || 12.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [2] Medium || 22.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [3] Large || 33.00 ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] Cancel ||" <<endl;
cout << "\t\t #===============================================================================#" <<endl;
cout << "\n\t\t Enter Size: ";
}

void bigbite(){
header();
cout << "\t\t || < BIG BITE > ||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || HOTDOG || PRICE ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [1] Jumbo Classic || 30.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [2] Creamy Cheese || 30.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [3] Quezo Duo || 30.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [4] Spicy Hungarian || 30.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [5] Cheesy Pepperdog || 30.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [6] TJ Classic || 30.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [7] TJ Cheesedog || 30.00 ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] Cancel ||" <<endl;
cout << "\t\t #===============================================================================#" <<endl;
cout << "\n\t\t Enter Choice: ";
}

void siopao(){
header();
cout << "\t\t || < SIOPAO > ||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || SIZE || PRICE ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [1] Budget || 29.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [2] Premium || 42.00 ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] Cancel ||" <<endl;
cout << "\t\t #===============================================================================#" <<endl;
cout << "\n\t\t Enter Size: ";
}

void doughnuts(){
header();
cout << "\t\t || < DOUGHNUTS > ||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || FLAVOR || PRICE ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [1] Choco Cake || 22.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [2] Bavarian || 23.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [3] Mister Donut Long John || 24.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [4] Choco Cream || 25.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [5] Cookies 'n Cream || 30.00 ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] Cancel ||" <<endl;
cout << "\t\t #===============================================================================#" <<endl;
cout << "\n\t\t Enter Choice: ";
}

void sisig(){
header();
cout << "\t\t || < SISIG > ||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || SIZE || PRICE ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [1] Regular || 29.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [2] Jumbo || 49.00 ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] Cancel ||" <<endl;
cout << "\t\t #===============================================================================#" <<endl;
cout << "\n\t\t Enter Size: ";
}

void tuna(){
header();
cout << "\t\t || < TUNA OMELETTE > ||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || SIZE || PRICE ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [1] Regular || 32.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [2] Jumbo || 52.00 ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] Cancel ||" <<endl;
cout << "\t\t #===============================================================================#" <<endl;
cout << "\n\t\t Enter Size: ";
}

void giniling(){
header();
cout << "\t\t || < GINILING > ||" <<endl;
cout << "\t\t ||=============================================================================||" <<endl;
cout << "\t\t || SIZE || PRICE ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [1] Regular || 32.00 ||" <<endl;
cout << "\t\t || || ||" <<endl;
cout << "\t\t || [2] Jumbo || 52.00 ||" <<endl;
cout << "\t\t ||-----------------------------------------------------------------------------||" <<endl;
cout << "\t\t || [0] Cancel ||" <<endl;
cout << "\t\t #===============================================================================#" <<endl;
cout << "\n\t\t Enter Size: ";
}

void main_menu(){
header();
cout << "\n\n\n";
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\t\t\t\t || WELCOME!!! ||" <<endl;
cout << "\t\t\t\t ||--------------------------------------||" <<endl;
cout << "\t\t\t\t || [1] Start Program ||" <<endl;
cout << "\t\t\t\t ||--------------------------------------||" <<endl;
cout << "\t\t\t\t || [2] Inventory (Admin Only) ||" <<endl;
cout << "\t\t\t\t ||--------------------------------------||" <<endl;
cout << "\t\t\t\t || [0] Quit ||" <<endl;
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\n\t\t\t\t Enter Decision: ";
}

void outofstock(){
header();
cout << "\n\n\n";
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t || Out of Stock! ||" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\n\n\n\t\t\t\t ";
system ("PAUSE");
}

void header(){
system("CLS");
cout << "\t\t #===============================================================================#" <<endl;
cout << "\t\t || 7-ELEVEN Receipt System ||" <<endl;
cout << "\t\t #===============================================================================#" <<endl;
}

void invalid (){


header();
cout << "\n\n\n";
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t || Invalid Input! ||" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\n\n\n\t\t\t\t ";
system ("PAUSE");
}
void no_order(){
header();
cout << "\n\n\n";
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t || Order List Empty! ||" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\n\n\n\t\t\t\t ";
system ("PAUSE");
}
void insuf_cash(){
header();
cout << "\n\n\n";
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t || Insufficient Cash! ||" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\n\n\n\t\t\t\t ";
system ("PAUSE");
}
void warning(){
header();
cout << "\n\n\n";
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\t\t\t\t || Going to main menu will delete ||" <<endl;
cout << "\t\t\t\t || all your current orders! ||" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t || Are you sure? ||" <<endl;
cout << "\t\t\t\t ||--------------------------------------||" <<endl;
cout << "\t\t\t\t || [y] YES || [n] NO ||" <<endl;
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\n\n\n\t\t Enter Choice :";
}
void order_notexist(){
header();
cout << "\n\n\n";
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t || Order Does Not Exist! ||" <<endl;
cout << "\t\t\t\t || ||" <<endl;
cout << "\t\t\t\t #========================================#" <<endl;
cout << "\n\n\n\t\t\t\t ";
system ("PAUSE");
}
7-Eleven Reciept System

Dimafelix, Librado Jr.


Macalindong, Rovick Dilag
Paredes, Niño

BS-CpE 1201

Вам также может понравиться