Question: 1 ) Open the starter application ( zipped ) attached to this Assignment folder: a ) Evaluations Assignments Assignment 2 Part 2

1) Open the starter application(zipped) attached to this Assignment folder:
a) Evaluations\Assignments\Assignment 2\Part2-invoice.zip
2) 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.
3) 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.
4) Code a function that formats the Date object thats passed to it in MM/DD/YYYY format and then returns the date string.
5) Add code to the click() event handler for the Calculate button that gets the invoice date and creates a Date object from it.
6) 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.
7) 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 4.
8) Add code that calculates the due date as 30 days after the invoice date. Then, format that date.
9) 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!