La mia presentazione

Post on 08-Jul-2015

475 views 3 download

description

In Un RiStOrAnTe....

Transcript of La mia presentazione

START

PA

N. TAVOLO

N. TAVOLO

ELAB

END

*

SF

*=n. tavolo<>-1

PA

EXIT

Tota=0, totb=0, totc=0, totd=0, tote=0, imptota=0, imptotb=0,

imptotc=0, imptotd=0, imptote=0, max=0, perca=0, percb=0, percc=0, percd=0,

perce=0, cop=1,5, tot=0, totinc=0, totimp=0, impor=0

ELAB

N. COMPONENTI

QUANTITA

PREZZO UNI.

TIPO

tota=tota+1 imptota=imptota+impor

totb=totb+1 imptotb=imptotb+impor

*

*

1 2

impor = prezzo uni.* quantità

*TIPO=A

*TIPO=B

1 2

*

*

totc=totc+1 imptotc=imptotc+impor

totd=totd+1 imptotd=imptotd+impor

tote=tote+1

imptote=imptote+impor

COPERTO = cop * quantità

totimp = totimp + impor

tot = tot + 1

CONTO = COPERTO + totimp

EXIT

*TIPO=C

*TIPO=D

totincasso = totincasso + CONTO

Max=impb

SF

3

Max=impc

Max=impd

Max=impe*

*

*

*

Max= impa

*max<impd

*max<impb

*max<impe

*max<impc

3

perca = (tota * tot) /100

percb = (totb * tot) /100

percc = (totc * tot) /100

perce = (tote * tot) /100

percd = (totd * tot) /100

Tota, totb, totc, totd, tote, imptota, imptotb, imptotc, imptotd, imptote, max, perca, percb, percc, percd, perce, cop=, tot, totinc, totimp, impor, conto

EXIT

• Private Sub cmdcalcola_Click()

• TxtNtavolo.Text = NC• While NT <> -1

• elab

• Wend

• stampefinali• End Sub

• Private Sub elab()• TxtNcomponenti.Text = NC• TxtQuantità.Text = QT• TxtPrezzounitario.Text = PU• TxtTipo.Text = TP• impor = PU * QT• If TP = a Then• tota = tota + 1• totimpa = totimpa + impor• Else• If TP = b Then• totb = totb + 1• totimpb = totimpb + impor• Else• If TP = c Then• totc = totc + 1• totimpc = totimpc + impor• Else• If TP = d Then• totd = totd + 1• totimpd = totimpd + impor• Else• If TP = e Then• tote = tote + 1• totimpe = totimpe + impor• Else• MsgBox "ERRORE TIPO DI PORTATA NON VALIDA"• End If• End If• End If• End If• End If• totimp = totimp + impor• tot = tot + 1• conto = cop + totimp• totinc = totinc + conto• End Sub

• Private Sub stampefinali()• If max < tota Then• max = tota• • Else• If max < totb Then• max = totb• • Else• If max < totc Then• max = totc• • Else• If max < totd Then• max = totd• • Else• If max < tote Then• max = tote• • End If• End If• End If• End If• End If•

• perc1 = tota * 100 / tot• perc2 = totb * 100 / tot• perc3 = totc * 100 / tot• perc4 = totd * 100 / tot• perc5 = tote * 100 / tot• MsgBox tot• MsgBox tota• MsgBox totb• MsgBox totc• MsgBox totd• MsgBox tote• MsgBox imptota• MsgBox imptotb• MsgBox imptotc• MsgBox imptotd• MsgBox imptote• MsgBox max• MsgBox cop• MsgBox perca• MsgBox percb• MsgBox percc• MsgBox percd• MsgBox perce• MsgBox conto• MsgBox totinc• MsgBox totimp• End Sub

• Public tot As Double• Public tota As Double• Public totb As Double• Public totc As Double• Public totd As Double• Public tote As Double• Public max As Double• Public totinc As Double• Public imptota As Double• Public imptotb As Double• Public imptotc As Double• Public imptotd As Double• Public imptote As Double• Public preca As Double• Public percb As Double• Public percc As Double• Public percd As Double• Public perce As Double• Public impor As Double• Public totimp As Double• Public cop As Double

• Public Sub PA()• tota = 0• totb = 0• totc = 0• totd = 0• tote = 0• max = 0• totinc = 0• imptota = 0• imptotb = 0• imptotc = 0• imptotd = 0• imptote = 0• perca = 0• percb = 0• percc = 0• percd = 0• perce = 0• cop = 1.5• End Sub