Add documentation headers across system modules
This commit is contained in:
@@ -64,6 +64,14 @@ void CustomerMenu::viewServiceHistory()
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
Function: selectInvoiceFromUserForPayment (static helper)
|
||||
Description: Lists all pending invoices for the customer and allows selection by index.
|
||||
Parameters:
|
||||
- currentInvoices: util::Map<std::string, const Invoice*>&, map of customer invoices
|
||||
Returns:
|
||||
- std::string: ID of the selected invoice, or empty string if none selected
|
||||
*/
|
||||
static std::string selectInvoiceFromUserForPayment(const util::Map<std::string, const Invoice*>& currentInvoices)
|
||||
{
|
||||
int currentIndex = 1, choice;
|
||||
@@ -118,6 +126,14 @@ static std::string selectInvoiceFromUserForPayment(const util::Map<std::string,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Function: selectPaymentMode (static helper)
|
||||
Description: Allows the customer to select a payment mode (ONLINE or OFFLINE).
|
||||
Parameters:
|
||||
- None
|
||||
Returns:
|
||||
- util::PaymentMode: Selected payment mode
|
||||
*/
|
||||
static util::PaymentMode selectPaymentMode()
|
||||
{
|
||||
int choice;
|
||||
@@ -140,6 +156,15 @@ static util::PaymentMode selectPaymentMode()
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Function: completePayments
|
||||
Description: Allows the customer to complete pending payments for invoices.
|
||||
Validates invoice selection and payment mode before completing payment.
|
||||
Parameters:
|
||||
- None
|
||||
Returns:
|
||||
- void
|
||||
*/
|
||||
void CustomerMenu::completePayments()
|
||||
{
|
||||
util::clear();
|
||||
@@ -155,6 +180,17 @@ void CustomerMenu::completePayments()
|
||||
std::cout << "Payment completed successfully.\n";
|
||||
}
|
||||
|
||||
/*
|
||||
Function: displayInvoices (static helper)
|
||||
Description: Displays detailed information for all invoices associated with the customer,
|
||||
including booking details, technician, discount, total amount, payment status, and items used.
|
||||
Parameters:
|
||||
- currentUserInvoices: util::Map<std::string, const Invoice*>, customer’s invoices
|
||||
Returns:
|
||||
- void
|
||||
Throws:
|
||||
- std::runtime_error if a null invoice is encountered
|
||||
*/
|
||||
static void displayInvoices(util::Map<std::string, const Invoice*> currentUserInvoices)
|
||||
{
|
||||
if (currentUserInvoices.getSize() == 0)
|
||||
@@ -206,6 +242,14 @@ static void displayInvoices(util::Map<std::string, const Invoice*> currentUserIn
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Function: viewInvoices
|
||||
Description: Displays invoices associated with the customer by calling displayInvoices.
|
||||
Parameters:
|
||||
- None
|
||||
Returns:
|
||||
- void
|
||||
*/
|
||||
void CustomerMenu::viewInvoices()
|
||||
{
|
||||
util::clear();
|
||||
|
||||
Reference in New Issue
Block a user