Created attachment 137252 [details] Documentation Bug31115 Additional fields for invoices Created attachment 142210 [details] [review] Bug 31115: Add support for additional fields for invoices This patch adds support for additional fields for invoices. A new option is added to the 'Additional fields' admin page, for the 'aqinvoices' table. Adding/editing invoices now supports this additional fields. To test: 1. Apply this patches 2. Verify the original test plan works => SUCCESS: It does! 3. Sign off :-D Sponsored-by: The Research University in the Helmholtz Association (KIT) Created attachment 142211 [details] [review] Bug 31115: Add invoice fields manage link This patch adds a link on the acquisitions page for reaching the additional fields config for invoices in an easy way. Sponsored-by: The Research University in the Helmholtz Association (KIT) Created attachment 142212 [details] [review] Bug 31115: Add additional_attributes support to GetInvoices This patch adds support for searching additional_fields when retrieving invoices using C4::Acquisition::Invoices. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Acquisition.t => SUCCESS: Tests pass! 3. Sign off :-D Sponsored-by: The Research University in the Helmholtz Association (KIT) Created attachment 142213 [details] [review] Bug 31115: Add additional field filtering for invoice search This patch adds support for filtering invoice searches on additional fields. To test: 1. Generate additional fields for invoices 2. Have invoices with additional fields 3. Use invoice searching and play with filtering by additional fields. => SUCCESS: It works! 4. Sign off :-D Sponsored-by: The Research University in the Helmholtz Association (KIT) Created attachment 142250 [details] [review] Bug 31115: Add support for additional fields for invoices This patch adds support for additional fields for invoices. A new option is added to the 'Additional fields' admin page, for the 'aqinvoices' table. Adding/editing invoices now supports this additional fields. To test: 1. Apply this patches 2. Verify the original test plan works => SUCCESS: It does! 3. Sign off :-D Sponsored-by: The Research University in the Helmholtz Association (KIT) Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Created attachment 142251 [details] [review] Bug 31115: Add invoice fields manage link This patch adds a link on the acquisitions page for reaching the additional fields config for invoices in an easy way. Sponsored-by: The Research University in the Helmholtz Association (KIT) Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Created attachment 142252 [details] [review] Bug 31115: Add additional_attributes support to GetInvoices This patch adds support for searching additional_fields when retrieving invoices using C4::Acquisition::Invoices. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Acquisition.t => SUCCESS: Tests pass! 3. Sign off :-D Sponsored-by: The Research University in the Helmholtz Association (KIT) Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Created attachment 142253 [details] [review] Bug 31115: Add additional field filtering for invoice search This patch adds support for filtering invoice searches on additional fields. To test: 1. Generate additional fields for invoices 2. Have invoices with additional fields 3. Use invoice searching and play with filtering by additional fields. => SUCCESS: It works! 4. Sign off :-D Sponsored-by: The Research University in the Helmholtz Association (KIT) Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Created attachment 142533 [details] [review] Bug 31115: Add support for additional fields for invoices This patch adds support for additional fields for invoices. A new option is added to the 'Additional fields' admin page, for the 'aqinvoices' table. Adding/editing invoices now supports this additional fields. To test: 1. Apply this patches 2. Verify the original test plan works => SUCCESS: It does! 3. Sign off :-D Sponsored-by: The Research University in the Helmholtz Association (KIT) Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Created attachment 142534 [details] [review] Bug 31115: Add invoice fields manage link This patch adds a link on the acquisitions page for reaching the additional fields config for invoices in an easy way. Sponsored-by: The Research University in the Helmholtz Association (KIT) Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Created attachment 142535 [details] [review] Bug 31115: Add additional_attributes support to GetInvoices This patch adds support for searching additional_fields when retrieving invoices using C4::Acquisition::Invoices. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Acquisition.t => SUCCESS: Tests pass! 3. Sign off :-D Sponsored-by: The Research University in the Helmholtz Association (KIT) Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Created attachment 142536 [details] [review] Bug 31115: Add additional field filtering for invoice search This patch adds support for filtering invoice searches on additional fields. To test: 1. Generate additional fields for invoices 2. Have invoices with additional fields 3. Use invoice searching and play with filtering by additional fields. => SUCCESS: It works! 4. Sign off :-D Sponsored-by: The Research University in the Helmholtz Association (KIT) Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Created attachment 142537 [details] [review] Bug 31115: (QA follow-up) Remove hr The hr created a visible white line with a darker background and doesn't make sense here style wise. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Created attachment 142538 [details] [review] Bug 31115: (QA follow-up) Use more specific permission for sidebar link Moves from any acq permission to edit_invoices. Manage order baskets uses order_manage, to this is supposed to make things a little more consistent. Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> 1) Unit tests pass 2) QA tools pass 3) Permission check / links in navigation + [% IF CAN_user_acquisition && CAN_user_parameters_manage_additional_fields %] + <li> + <a href="/cgi-bin/koha/admin/additional-fields.pl?tablename=aqinvoices">Manage invoice fields</a> + </li> + [% END %] [% IF CAN_user_acquisition_order_manage && CAN_user_parameters_manage_additional_fields %] The new link for additional invoice fields will need "any acq permission" + the specific administration permission. The old link for additional basket fields uses the more specific permission "order_manage". I've provided a follow-up using edit_invoices for the first link to make things a bit more consistent. I could also imagine merging the links into "Manage additional fields" might be logical a next step, as we also have bug 11844 hopefully moving soon. 4) Tiny follow up for strange hr Feel free to omit or push at your preference :) I set the background to a darker color for better contrast and that made it show up as a strange white line. Pushed to master for 22.11. Nice work everyone, thanks! Enhancement will not be backported to 22.05.x series |
This new feature adds the ability to define additional fields to store information about vendor invoices in the acquisition module. For further information see attached documentation. Test plan: 1. Create a Vendor (under Acquisition -> New Vendor). 2. Create a Basket 3. Apply patch. 4. Visit Additional fields under administration, and verify that the option for invoices exists 5. Create at least four fields for aqinvoice for each combination of searchable/not-searchable and with/without an authorized value. 6. Create a Vendor invoice (-> Receive shipment) , and verify that all fields are visible and correctly save. 7. Edit the invoice, verifying that changes to these additional fields are saved. 8. Search the invoice by using an additional field (Acquisitions > Invoices) 9. Verify that only the searchable fields show in the form, and that their contents may be searched.