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 Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
a97d3e9513
commit
e4cc11ee13
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue