From 00dc0523f835792e2228c84cc819e97d71fcb263 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 3 Oct 2019 12:22:47 +0100 Subject: [PATCH] Bug 23049: (follow-up) Impliment feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Séverine QUEUNE --- .../data/mysql/atomicupdate/bug_23049_debit.perl | 8 ++-- installer/data/mysql/kohastructure.sql | 6 +-- .../prog/en/modules/admin/debit_types.tt | 50 +++++++++++----------- 3 files changed, 31 insertions(+), 33 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_23049_debit.perl b/installer/data/mysql/atomicupdate/bug_23049_debit.perl index 9219a95..1494999 100644 --- a/installer/data/mysql/atomicupdate/bug_23049_debit.perl +++ b/installer/data/mysql/atomicupdate/bug_23049_debit.perl @@ -4,7 +4,7 @@ if ( CheckVersion($DBversion) ) { $dbh->do( qq{ CREATE TABLE IF NOT EXISTS account_debit_types ( - code varchar(16) NOT NULL, + code varchar(64) NOT NULL, description varchar(200) NULL, can_be_added_manually tinyint(4) NOT NULL DEFAULT '1', default_amount decimal(28, 6) NULL, @@ -16,7 +16,7 @@ if ( CheckVersion($DBversion) ) { $dbh->do( qq{ CREATE TABLE IF NOT EXISTS ac_debit_types_branches ( - debit_type_code VARCHAR(16), + debit_type_code VARCHAR(64), branchcode VARCHAR(10), FOREIGN KEY (debit_type_code) REFERENCES account_debit_types(code) ON DELETE CASCADE, FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE @@ -58,7 +58,7 @@ if ( CheckVersion($DBversion) ) { can_be_added_manually ) SELECT - SUBSTR(authorised_value, 1, 16), + SUBSTR(authorised_value, 1, 64), lib, authorised_value, 1 @@ -73,7 +73,7 @@ if ( CheckVersion($DBversion) ) { qq{ ALTER IGNORE TABLE accountlines ADD - debit_type varchar(16) DEFAULT NULL + debit_type varchar(64) DEFAULT NULL AFTER accounttype } diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index a70c5c2..0064348 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2627,7 +2627,7 @@ CREATE TABLE `cash_registers` ( DROP TABLE IF EXISTS `account_debit_types`; CREATE TABLE `account_debit_types` ( - `code` varchar(16) NOT NULL, + `code` varchar(64) NOT NULL, `default_amount` decimal(28,6) DEFAULT NULL, `description` varchar(200) DEFAULT NULL, `can_be_added_manually` tinyint(4) NOT NULL DEFAULT '1', @@ -2640,7 +2640,7 @@ CREATE TABLE `account_debit_types` ( DROP TABLE IF EXISTS `ac_debit_types_branches`; CREATE TABLE `ac_debit_types_branches` ( - `debit_type_code` VARCHAR(16), + `debit_type_code` VARCHAR(64), `branchcode` VARCHAR(10), FOREIGN KEY (`debit_type_code`) REFERENCES `account_debit_types` (`code`) ON DELETE CASCADE, FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE @@ -2660,7 +2660,7 @@ CREATE TABLE `accountlines` ( `amount` decimal(28,6) default NULL, `description` LONGTEXT, `accounttype` varchar(80) default NULL, - `debit_type` varchar(16) default NULL, + `debit_type` varchar(64) default NULL, `status` varchar(16) default NULL, `payment_type` varchar(80) default NULL, -- optional authorised value PAYMENT_TYPE `amountoutstanding` decimal(28,6) default NULL, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt index 1746564..16e056a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt @@ -6,18 +6,18 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Administration › [% IF op =='add_form' %] - Account types › + Debit types › [% IF debit_type.code %] - Modify account [% type %] type + Modify debit type [% ELSE %] - New account [% type %] type + New debit type [% END %] [% ELSE %] - [% IF op == 'delete_confirm' %] - Account types › Confirm deletion of account [% type %] type - [% ELSE %] - Account types - [% END %] + [% IF op == 'delete_confirm' %] + Debit types › Confirm deletion of debit type + [% ELSE %] + Debit types + [% END %] [% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -30,11 +30,11 @@ @@ -47,13 +47,13 @@
[% SWITCH m.code %] [% CASE 'error_on_saving' %] - An error occurred when saving this account type. + An error occurred when saving this debit type. [% CASE 'error_on_delete' %] - An error occurred when deleting this account type. Check the logs. + An error occurred when deleting this debit type. Check the logs. [% CASE 'success_on_saving' %] - Account type saved successfully. + Debit type saved successfully. [% CASE 'success_on_delete' %] - Account type deleted successfully. + Debit type deleted successfully. [% CASE %] [% m.code %] [% END %] @@ -62,9 +62,9 @@ [% IF op == 'add_form' %] [% IF debit_type %] -

Modify an account [% type %] type

+

Modify a debit type

[% ELSE %] -

New account [% type %] type

+

New debit type

[% END %]
@@ -73,20 +73,18 @@
  1. - + [% IF debit_type %] [% debit_type.code | html %] [% ELSE %] - Required. Maximum length is 16 letters + Required. Maximum length is 64 letters [% END %]
  2. - [% IF type == 'debit' %]
  3. - +
  4. - [% END %]
  5. Required @@ -125,12 +123,12 @@ [% IF op == 'delete_confirm' %]
    -

    Delete account [% type | html %] type "[% debit_type.description | html %]?"

    +

    Delete debit type "[% debit_type.description | html %]?"

    - + - +
    Account type code
    Debit type code [% debit_type.code | html %]
    Account type description
    Debit type description [% debit_type.description | html %]
    @@ -156,7 +154,7 @@ - + -- 2.7.4
    SystemAccount type codeCode Description Default amount Can be added manually