Payment creation and invoice detail page fixes

Creating a payment now saves the correct date and shows it in the payments list. The invoice detail Edit link and the order edit page no longer fail with an undefined record ID.

Two user-visible bugs in the billing flows were resolved.

Payment date entered at creation time is now stored correctly and displayed in the payments list; the date field uses a proper date picker control

Invoice detail Edit link and the order edit page were broken when the record ID was not yet resolved; both now await the ID before rendering