/
CloseBookController.h
129 lines (109 loc) · 3.99 KB
/
CloseBookController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
//
// CloseBookController.h
// BicycleKitchenPOS
//
// Created by moody on 12/18/06.
// Copyright 2006 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "ProgressiveWindowController.h"
#import "Book.h"
@interface CloseBookController : ProgressiveWindowController {
//variables
NSMutableArray *checksArray;
NSMutableArray *cardsArray;
NSMutableArray *creditsArray;
NSMutableDictionary *formAndStepper;
// variables
IBOutlet NSTableView *checksTableView;
IBOutlet NSArrayController *checksArrayController;
IBOutlet NSTableView *cardsTableView;
IBOutlet NSArrayController *cardsArrayController;
IBOutlet NSForm *cashForm;
IBOutlet NSStepper *hundredsStepper;
IBOutlet NSStepper *fiftiesStepper;
IBOutlet NSStepper *twentiesStepper;
IBOutlet NSStepper *tensStepper;
IBOutlet NSStepper *fivesStepper;
IBOutlet NSStepper *twosStepper;
IBOutlet NSStepper *onesStepper;
IBOutlet NSTextField *hundredsTextField;
IBOutlet NSTextField *fiftiesTextField;
IBOutlet NSTextField *twentiesTextField;
IBOutlet NSTextField *tensTextField;
IBOutlet NSTextField *fivesTextField;
IBOutlet NSTextField *twosTextField;
IBOutlet NSTextField *onesTextField;
IBOutlet NSForm *totalsForm;
IBOutlet NSTextField *initialsTextField;
IBOutlet NSButton *cancelButton;
IBOutlet NSButton *printAndSaveButton;
IBOutlet NSButton *pulledStartingBalanceButton;
IBOutlet NSTextField *numCooksTextField;
IBOutlet NSStepper *numCooksStepper;
IBOutlet NSTextField *numHoursTextField;
IBOutlet NSStepper *numHoursStepper;
IBOutlet NSTextField *numVolunteerHours;
IBOutlet NSTableView *creditsTableView;
IBOutlet NSArrayController *creditsArrayController;
IBOutlet NSTextField *cashTotalsTextField;
IBOutlet NSTextField *numClientsTextField;
IBOutlet NSStepper *clientsStepper;
IBOutlet NSButton *verfiedChecksButton;
IBOutlet NSButton *verfiedCardsButton;
IBOutlet NSButton *verfiedCreditsButton;
IBOutlet NSButton *clientsFiveButton;
IBOutlet NSButton *clientsTenButton;
IBOutlet NSButton *clientsTwentyButton;
IBOutlet NSButton *clientsClearButton;
}
//proto-types
- (NSMutableArray *)checksArray;
- (void)setChecksArray:(NSArray *)arg;
- (NSMutableArray *)cardsArray;
- (void)setCardsArray:(NSMutableArray *)arg;
- (NSMutableDictionary *)formAndStepper;
- (void)setFormAndStepper:(NSDictionary *)arg;
- (NSMutableArray *)creditsArray;
- (void)setCreditsArray:(NSArray *)arg;
// prototypes
- (IBAction)hundredsStepperClicked:(id)sender;
- (IBAction)fiftiesStepperClicked:(id)sender;
- (IBAction)twentiesStepperClicked:(id)sender;
- (IBAction)tensStepperClicked:(id)sender;
- (IBAction)fivesStepperClicked:(id)sender;
- (IBAction)twosStepperClicked:(id)sender;
- (IBAction)onesStepperClicked:(id)sender;
- (IBAction)cancelButtonClicked:(id)sender;
- (IBAction)pulledStartingBalanceButtonClicked:(id)sender;
- (IBAction)numCooksStepperClicked:(id)sender;
- (IBAction)numHoursStepperClicked:(id)sender;
- (IBAction)printAndSaveButtonClicked:(id)sender;
- (IBAction)clientsStepperClicked:(id)sender;
- (IBAction)verfiedChecksButtonClicked:(id)sender;
- (IBAction)verfiedCardsButtonClicked:(id)sender;
- (IBAction)verfiedCreditsButtonClicked:(id)sender;
- (IBAction)clientsFiveButtonClicked:(id)sender;
- (IBAction)clientsTenButtonClicked:(id)sender;
- (IBAction)clientsTwentyButtonClicked:(id)sender;
- (IBAction)clientsClearButtonClicked:(id)sender;
// handlers
- (void)handleTextFieldChange:(NSNotification *)note;
- (void)doSetup;
- (void)setChecksCardsInvoicesAndTotals;
- (double)totalCash;
- (double)totalCheck;
- (double)totalCards;
- (double)totalCredits;
- (double)actualTotal;
- (double)expectedTotal;
- (double)variance;
- (NSArray *)arrayWithCell:(NSFormCell *)cell stepper:(NSStepper *)stepper
textField:(NSTextField *) tf scalar:(NSNumber *)num;
- (void)initFormsAndSteppers;
- (void)resetFormsAndSteppers;
- (void)setupButtons;
- (void)clearTextFields;
- (void)stepperClicked;
- (void)enableNextButtonWhenAppropriate:(NSTabViewItem *)item;
@end