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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc (-3 / +2 lines)
Lines 410-417 Link Here
410
410
411
            backends[ parts[0] ].get( parts[1], function( record ) {
411
            backends[ parts[0] ].get( parts[1], function( record ) {
412
                if ( !record.error ) {
412
                if ( !record.error ) {
413
                    var remove_control_num = [% IF Koha.Preference('autoControlNumber') == 'OFF' %] false [% ELSE %] true [% END %];
413
                    var remove_control_num = ([% IF Koha.Preference('autoControlNumber') == 'OFF' %] false [% ELSE %] true [% END %]) && (parts[0] === 'duplicate');
414
                    if( remove_control_num ){ record.removeField("001"); }
414
                    if remove_control_num { record.removeField("001"); }
415
                    if( parts[0] === 'duplicate' ) {
415
                    if( parts[0] === 'duplicate' ) {
416
                        let today = new Date();
416
                        let today = new Date();
417
                        record.field('008').subfield('@', today.toISOString().substring(2,10).replaceAll('-','') + record.field('008').subfield('@').substring(6));
417
                        record.field('008').subfield('@', today.toISOString().substring(2,10).replaceAll('-','') + record.field('008').subfield('@').substring(6));
418
- 

Return to bug 40584