Use Resources and create services to streamline code.
When the invoice date is set and the delivery date is blank the delivery date should be set to the same date as the invoice date.