<UserStory> PAY002: Complete Payments </UserStory>
<Changes>
1. Integrated Controller with PaymentManagementService to support payment completion workflow.
2. Implemented PaymentManagementService::completePayment with validation for invoice ID, payment mode, and status update.
3. Enhanced CustomerMenu with helper functions to display pending invoices in tabular format and allow index-based selection.
4. Added CustomerMenu::selectPaymentMode to capture payment mode choice (OFFLINE/ONLINE).
5. Updated CustomerMenu::completePayments to handle invoice selection, payment mode input, and trigger payment completion via Controller.
6. Implemented notification logic to send confirmation to customers upon successful payment.
</Changes>
<Test>
Acceptance Criteria:
1. Payment status marked completed.
2. Confirmation message shown.
3. Confirmation notification sent.
Precondition:
1. Customer is logged into the system.
2. At least one pending invoice exists for the customer.
3. Datastore is available for storing invoices and updating payment status.
Steps:
1. Navigate to Customer menu and choose "Complete Payments".
- Verify that the system lists pending invoices with tabular details.
2. Select an invoice by index.
- Verify that the chosen invoice is retrieved correctly.
3. Enter payment mode (OFFLINE/ONLINE).
- Verify that the selected mode is applied to the invoice.
4. Confirm payment completion.
- Verify that the invoice status changes to COMPLETED.
- Verify that a confirmation message is displayed.
- Verify that a notification is sent to the customer.
</Test>
<Review>
Sreeja Reghukumar, please review
</Review>
<Changes>
1. Added State enum with ACTIVE and INACTIVE values in Enums.h.
2. Added state member, getter, and setter in User, Service, InventoryItem, and ComboPackage models.
3. Updated constructors to initialize model objects with ACTIVE state by default.
4. Added state string conversion helper functions in Enums.h.
5. Added default return values in Controller getter methods to complete stub implementations.
6. Added basic menu loop implementation in CustomerMenu and TechnicianMenu for handling user input.
</Changes>
Changes:
- Added stub implementations for Controller.cpp methods
- Fixed const issue in UserInterface methods (run, login, registerCustomer, handleOperation)
- Changed return types to use const pointers for read-only objects
- Updated maps and vectors to return const object pointers
- Fixed some function parameter names and signatures for consistency