Bugzilla – Attachment 43302 Details for
Bug 14931
Remove C4::Dates from files admin/aq*.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF]Bug 14931 - Remove C4::Dates from files admin/aq*.pl
SIGNED-OFFBug-14931---Remove-C4Dates-from-files-ad.patch (text/plain), 5.68 KB, created by
Héctor Eduardo Castro Avalos
on 2015-10-09 16:15:21 UTC
(
hide
)
Description:
[SIGNED-OFF]Bug 14931 - Remove C4::Dates from files admin/aq*.pl
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2015-10-09 16:15:21 UTC
Size:
5.68 KB
patch
obsolete
>From f3cd9c8f8784a5828d6ee69465708684a3df5bbe Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Wed, 30 Sep 2015 18:50:42 +0200 >Subject: [PATCH] [SIGNED-OFF]Bug 14931 - Remove C4::Dates from files > admin/aq*.pl > >This patch removes C4::Dates from: > >- admin/aqbudgets.pl >- admin/aqplan.pl >- admin/aqcontract.pl > >To test: > >- Apply patch > >- Go to Home > Adminstration > Budgets > All funds > (admin/aqbudgets.pl) >- Verify that everything displays as before > >- Edit one of the funds and click on 'Planning - Plan by months' > (admin/aqplan.pl) >- Verify that planning works as before > >- Go to Home > Acquisitions, search for an active vendor and view the vendor >- Click on 'Contracts' at the left > (admin/aqcontract.pl) >- Create and edit contracts and verify that it works OK. > (Note: there is no help for this page, see Bug 14929) > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >Works as advertised. Tested with dateformat syspref >Dates in planning by months not needed to be on iso format, aqplan.pl >uses instead Date::Calc >--- > admin/aqbudgets.pl | 1 - > admin/aqcontract.pl | 22 +++++++++++----------- > admin/aqplan.pl | 1 - > 3 files changed, 11 insertions(+), 13 deletions(-) > >diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl >index 364d512..2d85fdc 100755 >--- a/admin/aqbudgets.pl >+++ b/admin/aqbudgets.pl >@@ -27,7 +27,6 @@ use List::Util qw/min/; > use Koha::Database; > use C4::Auth qw/get_user_subpermissions/; > use C4::Branch; # GetBranches >-use C4::Dates qw/format_date format_date_in_iso/; > use C4::Auth; > use C4::Acquisition; > use C4::Budgets; >diff --git a/admin/aqcontract.pl b/admin/aqcontract.pl >index daf8fb4..6deec5b 100755 >--- a/admin/aqcontract.pl >+++ b/admin/aqcontract.pl >@@ -26,8 +26,8 @@ use CGI qw ( -utf8 ); > use C4::Context; > use C4::Auth; > use C4::Output; >-use C4::Dates qw/format_date format_date_in_iso/; > use C4::Contract; >+use Koha::DateUtils; > > use Koha::Acquisition::Bookseller; > >@@ -71,8 +71,8 @@ if ( $op eq 'add_form' ) { > contractnumber => $contract->{contractnumber}, > contractname => $contract->{contractname}, > contractdescription => $contract->{contractdescription}, >- contractstartdate => format_date( $contract->{contractstartdate} ), >- contractenddate => format_date( $contract->{contractenddate} ), >+ contractstartdate => output_pref({ dt => dt_from_string( $contract->{contractstartdate} ), dateonly => 1 }), >+ contractenddate => output_pref({ dt => dt_from_string( $contract->{contractenddate} ), dateonly => 1 }), > ); > } else { > $template->param( >@@ -95,8 +95,8 @@ elsif ( $op eq 'add_validate' ) { > > if ( $is_a_modif ) { > ModContract({ >- contractstartdate => format_date_in_iso( $input->param('contractstartdate') ), >- contractenddate => format_date_in_iso( $input->param('contractenddate') ), >+ contractstartdate => output_pref({ dt => dt_from_string( $input->param('contractstartdate') ), dateformat => 'iso', dateonly => 1 }), >+ contractenddate => output_pref({ dt => dt_from_string( $input->param('contractenddate') ), dateformat => 'iso', dateonly => 1 }), > contractname => $input->param('contractname'), > contractdescription => $input->param('contractdescription'), > booksellerid => $input->param('booksellerid'), >@@ -107,8 +107,8 @@ elsif ( $op eq 'add_validate' ) { > contractname => $input->param('contractname'), > contractdescription => $input->param('contractdescription'), > booksellerid => $input->param('booksellerid'), >- contractstartdate => format_date_in_iso( $input->param('contractstartdate') ), >- contractenddate => format_date_in_iso( $input->param('contractenddate') ), >+ contractstartdate => output_pref({ dt => dt_from_string( $input->param('contractstartdate') ), dateformat => 'iso', dateonly => 1 }), >+ contractenddate => output_pref({ dt => dt_from_string( $input->param('contractenddate') ), dateformat => 'iso', dateonly => 1 }), > }); > } > >@@ -127,8 +127,8 @@ elsif ( $op eq 'delete_confirm' ) { > contractnumber => $$contract{contractnumber}, > contractname => $$contract{contractname}, > contractdescription => $$contract{contractdescription}, >- contractstartdate => format_date( $$contract{contractstartdate} ), >- contractenddate => format_date( $$contract{contractenddate} ), >+ contractstartdate => output_pref({ dt => dt_from_string( $$contract{contractstartdate} ), dateonly => 1 }), >+ contractenddate => output_pref({ dt => dt_from_string( $$contract{contractenddate} ), dateonly => 1 }), > ); > > # END $OP eq DELETE_CONFIRM >@@ -156,8 +156,8 @@ if ( $op eq 'list' ) { > > # format dates > for ( @contracts ) { >- $$_{contractstartdate} = format_date($$_{contractstartdate}); >- $$_{contractenddate} = format_date($$_{contractenddate}); >+ $$_{contractstartdate} = output_pref({ dt => dt_from_string( $$_{contractstartdate} ), dateonly => 1 }); >+ $$_{contractenddate} = output_pref({ dt => dt_from_string( $$_{contractenddate} ), dateonly => 1 }), > } > > $template->param(loop => \@contracts); >diff --git a/admin/aqplan.pl b/admin/aqplan.pl >index 082faeb..e155bd6 100755 >--- a/admin/aqplan.pl >+++ b/admin/aqplan.pl >@@ -26,7 +26,6 @@ use CGI qw ( -utf8 ); > use List::Util qw/min/; > use Date::Calc qw/Delta_YMD Easter_Sunday Today Decode_Date_EU/; > use Date::Manip qw/ ParseDate UnixDate DateCalc/; >-use C4::Dates qw/format_date format_date_in_iso/; > use Text::CSV_XS; > > use C4::Acquisition; >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14931
:
42977
|
43302
|
43427
|
43956
|
44101
|
44103
|
44104
|
44105
|
44107