Acq: When creating invoices, let the user know if they're repeating an ID user/kmlussier/create-inv-ident-signoff
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 1 Oct 2012 17:53:27 +0000 (13:53 -0400)
committerKathy Lussier <klussier@masslnc.org>
Tue, 16 Oct 2012 21:09:26 +0000 (17:09 -0400)
commit58c4839953c7784b54d968798661763bd1f5c950
treee584926dace944aa01e5fa62453d5d2b1f15f281
parente50d4cef406bee50dbb5ea780a0f06807736e38f
Acq: When creating invoices, let the user know if they're repeating an ID

Invoices have a field for Vendor Invoice ID, which is required to be
unique for invoices associated with a given provider (vendor).  In
practice users may mistakenly try to create an invoice more than once, so
this gives them an indication that a given Vnedor Invoice ID has already
been used before they fill out the whole invoice.

Users do have to have the fields labeled "Vendor Invoice ID",
"Provider", and "Receiver" filled out before validation can occur (the
last field is needed because of how permissions are checked when
searching for invoices).

It is still possible to see a database error at save time if another
invoice is created between the time you started yours and the time
somebody else saved theirs.

Also, while we're at it, this commit gets rid of acq/invoice/common.js
and moves its last function into acq/invoice/view.js, since both are
actually used only by the one interface.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/acq/invoice/view.tt2
Open-ILS/web/js/dojo/openils/acq/nls/acq.js
Open-ILS/web/js/dojo/openils/widget/EditPane.js
Open-ILS/web/js/ui/default/acq/invoice/common.js [deleted file]
Open-ILS/web/js/ui/default/acq/invoice/view.js