View | Details | Raw Unified | Return to bug 5354
Collapse All | Expand All

(-)a/installer/data/mysql/updatedatabase.pl (+6 lines)
Lines 4923-4928 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
4923
    SetVersion($DBversion);
4923
    SetVersion($DBversion);
4924
}
4924
}
4925
4925
4926
$DBversion = "3.07.00.XXX";
4927
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4928
    $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES('SubscriptionDuplicateDroppedInput','','','List of fields which must not be rewritten when a subscription is duplicated (Separated by semicolon)','Free')");
4929
    print "Upgrade to $DBversion done (Add System Preferences SubscriptionDuplicateDroppedInput)\n";
4930
    SetVersion($DBversion);
4931
}
4926
4932
4927
=head1 FUNCTIONS
4933
=head1 FUNCTIONS
4928
4934
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref (+3 lines)
Lines 47-49 Serials: Link Here
47
              simplified: a summary
47
              simplified: a summary
48
              full: a full list
48
              full: a full list
49
        - of the serial issues.
49
        - of the serial issues.
50
    -
51
        - List of fields which must not be rewritten when a subscription is duplicated (Separated by semicolon)
52
        - pref: SubscriptionDuplicateDroppedInput
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt (+10 lines)
Lines 944-949 $(document).ready(function() { Link Here
944
    $('#numberpattern').change( function() { 
944
    $('#numberpattern').change( function() { 
945
        reset_num_pattern(); 
945
        reset_num_pattern(); 
946
    });
946
    });
947
948
    var node;
949
    [% FOREACH field IN dont_export_field_loop %]
950
        node = $("#[% field.fieldid %]");
951
        if ( $(node).is('input') || $(node).is('textarea') ) {
952
            $(node).val("");
953
        } else if ( $(node).is('select') ) {
954
            $(node).find("option:first").attr('selected','selected');
955
        }
956
    [% END %]
947
});
957
});
948
//]]>
958
//]]>
949
</script>
959
</script>
(-)a/serials/subscription-add.pl (-1 / +6 lines)
Lines 113-118 if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { Link Here
113
                    firstacquiyear => substr($firstissuedate,0,4),
113
                    firstacquiyear => substr($firstissuedate,0,4),
114
                    );
114
                    );
115
    }
115
    }
116
117
    if ( $op eq 'dup' ) {
118
        my $dont_copy_fields = C4::Context->preference('SubscriptionDuplicateDroppedInput');
119
        my @fields_id = map { fieldid => $_ }, split ';', $dont_copy_fields;
120
        $template->param( dont_export_field_loop => \@fields_id );
121
    }
116
}
122
}
117
123
118
my $onlymine=C4::Context->preference('IndependantBranches') &&
124
my $onlymine=C4::Context->preference('IndependantBranches') &&
119
- 

Return to bug 5354