Bug 33864: Set default date in all acqcreateitem scenarios
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 30 May 2023 13:26:55 +0000 (10:26 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 31 May 2023 08:18:40 +0000 (10:18 +0200)
commit31c86e13afb678325044e1d6d5b9935b92da83de
treef41792963fdd47b7aec011dd34df4087dab3d5fb
parent5558b888330fae01d9bd4f45bd268204fcac0cc7
Bug 33864: Set default date in all acqcreateitem scenarios

On b0aab2aeef9a025d3907d0b723b5ea71eaf94542 the flatpickr default to
'today' was restored, but only for acqcreateitem='ordering'. This patch
moves the initialization to a different stop for broader reach.

To test:
1. Have 3 baskets on with each setting:
   - create_item = 'cateloguing'
   - create_item = 'ordering'
   - create_item = 'receiving'
2. Close those baskets
3. Go to 'Receive shipments'
4. Choose things from the 3 baskets and then 'Receive selected'
5. Navigate through the different orders
=> FAIL: Only the one that has items created on ordering has the date
filled by default
6. Apply this patch
7. Reload the page
8. Repeat 5
=> SUCCESS: Dates are pre-filled!
9. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt