Question: 1 ) Open the starter application ( zipped ) attached to this Assignment folder: a ) Evaluations Assignments Assignment 2 Part 2
Open the starter applicationzipped attached to this Assignment folder:
a EvaluationsAssignmentsAssignment Partinvoice.zip
Start the application and click the Calculate button without entering a subtotal or invoice date. An error message will be displayed indicating that the subtotal must be a number greater than zero.
Enter a valid subtotal and click the Calculate button again. This time, the discount and invoice total will be calculated, but no invoice date or due date will be displayed.
Code a function that formats the Date object thats passed to it in MMDDYYYY format and then returns the date string.
Add code to the click event handler for the Calculate button that gets the invoice date and creates a Date object from it
Add code that checks whether the invoice date is not equal to an empty string and whether the Date object is not a valid date. If so display an error message, clear the controls, move the focus to the Invoice Date text box, and return.
Add an if statement that checks whether the invoice date is equal to an empty string. If so use the current date as the default date. To do that, youll need to get the current date and format it using the function you coded in step
Add code that calculates the due date as days after the invoice date. Then, format that date.
Add code that sets the values of the Invoice Date and Due Date fields.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
