-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPayment.cpp
More file actions
120 lines (97 loc) · 2.25 KB
/
Copy pathPayment.cpp
File metadata and controls
120 lines (97 loc) · 2.25 KB
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
//Austin Nguyen
#include "Payment.h"
#include "AvailableRooms.h"
// Setters
void Payment::setPaymentID(int id) {
paymentID = id;
}
void Payment::setReservation(const Reservation& r) {
reservation = r;
// Auto-copy from Reservation
guestID = r.getGuestID();
paymentStatus = r.getPaymentStatus();
checkInDate = r.getCheckInDate();
checkOutDate = r.getCheckOutDate();
roomID = r.getRoomID();
// AUTO-LOAD BASE RATE from AvailableRooms map
try {
Room& room = AvailableRooms::lookup(roomID);
baseRate = room.getRoomType().baseRate;
}
catch (...) {
baseRate = 0.0f; // fallback in case lookup fails
}
}
void Payment::setGuestID(int id) {
guestID = id;
}
void Payment::setTotalPrice(float total) {
totalPrice = total;
}
void Payment::setPaymentDate(int date) {
paymentDate = date;
}
void Payment::setPaymentMethod(string m) {
paymentMethod = m;
}
void Payment::setPaymentStatus(string s) {
paymentStatus = s;
}
void Payment::setCurrency(const Currency& u) {
currency = u;
}
void Payment::setDiscount(const Discount& d) {
discount = d;
}
void Payment::setCheckInDate(const string& date) {
checkInDate = date;
}
void Payment::setCheckOutDate(const string& date) {
checkOutDate = date;
}
void Payment::setRoomID(int id) {
roomID = id;
}
void Payment::setBaseRate(float rate) {
baseRate = rate;
}
// Getters
int Payment::getPaymentID() const {
return paymentID;
}
Reservation Payment::getReservation() const {
return reservation;
}
int Payment::getGuestID() const {
return guestID;
}
float Payment::getTotalPrice() const {
return totalPrice;
}
float Payment::getBaseRate() const {
return baseRate;
}
int Payment::getPaymentDate() const {
return paymentDate;
}
string Payment::getPaymentMethod() const {
return paymentMethod;
}
string Payment::getPaymentStatus() const {
return paymentStatus;
}
string Payment::getCheckInDate() const {
return checkInDate;
}
string Payment::getCheckOutDate() const {
return checkOutDate;
}
int Payment::getRoomID() const {
return roomID;
}
Currency Payment::getCurrency() const {
return currency;
}
Discount Payment::getDiscount() const {
return discount;
}