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

(-)a/installer/data/mysql/de-DE/mandatory/userpermissions.sql (+2 lines)
Lines 8-13 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
8
   ( 9, 'edit_catalogue', 'Katalogdaten bearbeiten (Titel- und Exemplardaten ändern)'),
8
   ( 9, 'edit_catalogue', 'Katalogdaten bearbeiten (Titel- und Exemplardaten ändern)'),
9
   ( 9, 'fast_cataloging', 'Schnellaufnahmen anlegen'),
9
   ( 9, 'fast_cataloging', 'Schnellaufnahmen anlegen'),
10
   ( 9, 'edit_items', 'Exemplare bearbeiten'),
10
   ( 9, 'edit_items', 'Exemplare bearbeiten'),
11
   (10, 'writeoff', 'Write off charges'),
12
   (10, 'remaining_permissions', 'Remaining updatecharges permissions'),
11
   (11, 'vendors_manage', 'Lieferanten verwalten'),
13
   (11, 'vendors_manage', 'Lieferanten verwalten'),
12
   (11, 'contracts_manage', 'Vereinbarungen verwalten'),
14
   (11, 'contracts_manage', 'Vereinbarungen verwalten'),
13
   (11, 'period_manage', 'Etats verwalten'),
15
   (11, 'period_manage', 'Etats verwalten'),
(-)a/installer/data/mysql/en/mandatory/userpermissions.sql (+2 lines)
Lines 8-13 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
8
   ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
8
   ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
9
   ( 9, 'fast_cataloging', 'Fast cataloging'),
9
   ( 9, 'fast_cataloging', 'Fast cataloging'),
10
   ( 9, 'edit_items', 'Edit Items'),
10
   ( 9, 'edit_items', 'Edit Items'),
11
   (10, 'writeoff', 'Write off charges'),
12
   (10, 'remaining_permissions', 'Remaining updatecharges permissions'),
11
   (11, 'vendors_manage', 'Manage vendors'),
13
   (11, 'vendors_manage', 'Manage vendors'),
12
   (11, 'contracts_manage', 'Manage contracts'),
14
   (11, 'contracts_manage', 'Manage contracts'),
13
   (11, 'period_manage', 'Manage periods'),
15
   (11, 'period_manage', 'Manage periods'),
(-)a/installer/data/mysql/es-ES/mandatory/userpermissions.sql (+2 lines)
Lines 8-13 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
8
   ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
8
   ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
9
   ( 9, 'fast_cataloging', 'Fast cataloging'),
9
   ( 9, 'fast_cataloging', 'Fast cataloging'),
10
   ( 9, 'edit_items', 'Edit Items'),
10
   ( 9, 'edit_items', 'Edit Items'),
11
   (10, 'writeoff', 'Write off charges'),
12
   (10, 'remaining_permissions', 'Remaining updatecharges permissions'),
11
   (11, 'vendors_manage', 'Manage vendors'),
13
   (11, 'vendors_manage', 'Manage vendors'),
12
   (11, 'contracts_manage', 'Manage contracts'),
14
   (11, 'contracts_manage', 'Manage contracts'),
13
   (11, 'period_manage', 'Manage periods'),
15
   (11, 'period_manage', 'Manage periods'),
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql (+2 lines)
Lines 8-13 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
8
   ( 9, 'edit_catalogue', 'Ajouter et modifier des notices au catalogue'),
8
   ( 9, 'edit_catalogue', 'Ajouter et modifier des notices au catalogue'),
9
   ( 9, 'fast_cataloging', 'Catalogage rapide'),
9
   ( 9, 'fast_cataloging', 'Catalogage rapide'),
10
   ( 9, 'edit_items', 'Modifier des exemplaires'),
10
   ( 9, 'edit_items', 'Modifier des exemplaires'),
11
   (10, 'writeoff', 'Write off charges'),
12
   (10, 'remaining_permissions', 'Remaining updatecharges permissions'),
11
   (13, 'edit_news', 'Ecrire des nouvelles pour l''OPAC et l''interface professionnelle'),
13
   (13, 'edit_news', 'Ecrire des nouvelles pour l''OPAC et l''interface professionnelle'),
12
   (13, 'label_creator', 'Créer des étiquettes à partir des données du catalogues et des adhérents'),
14
   (13, 'label_creator', 'Créer des étiquettes à partir des données du catalogues et des adhérents'),
13
   (13, 'edit_calendar', 'Définir les jours de fermeture de la bibliothèque'),
15
   (13, 'edit_calendar', 'Définir les jours de fermeture de la bibliothèque'),
(-)a/installer/data/mysql/it-IT/necessari/userpermissions.sql (+2 lines)
Lines 10-15 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
10
   ( 9, 'edit_catalogue', 'Cataloga (crea/modifica dati bibliografici e di copia)'),
10
   ( 9, 'edit_catalogue', 'Cataloga (crea/modifica dati bibliografici e di copia)'),
11
   ( 9, 'fast_cataloging', 'Catalogazione veloce'),
11
   ( 9, 'fast_cataloging', 'Catalogazione veloce'),
12
   ( 9, 'edit_items', 'Crea/modifica copie'),
12
   ( 9, 'edit_items', 'Crea/modifica copie'),
13
   (10, 'writeoff', 'Write off charges'),
14
   (10, 'remaining_permissions', 'Remaining updatecharges permissions'),
13
   (11, 'vendors_manage', 'Crea/modifica fornitori'),
15
   (11, 'vendors_manage', 'Crea/modifica fornitori'),
14
   (11, 'contracts_manage', 'Crea/modifica contratti'),
16
   (11, 'contracts_manage', 'Crea/modifica contratti'),
15
   (11, 'period_manage', 'Gestisci scadenze budgets'),
17
   (11, 'period_manage', 'Gestisci scadenze budgets'),
(-)a/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql (+2 lines)
Lines 28-33 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
28
   ( 9, 'edit_catalogue', 'Endre katalogen (Endre bibliografiske poster og eksemplaropplysninger)'),
28
   ( 9, 'edit_catalogue', 'Endre katalogen (Endre bibliografiske poster og eksemplaropplysninger)'),
29
   ( 9, 'fast_cataloging', 'Hurtigkatalogisering'),
29
   ( 9, 'fast_cataloging', 'Hurtigkatalogisering'),
30
   ( 9, 'edit_items', 'Endre eksmeplarer'),
30
   ( 9, 'edit_items', 'Endre eksmeplarer'),
31
   (10, 'writeoff', 'Write off charges'),
32
   (10, 'remaining_permissions', 'Remaining updatecharges permissions'),
31
   (11, 'vendors_manage', 'Administrere leverandører'),
33
   (11, 'vendors_manage', 'Administrere leverandører'),
32
   (11, 'contracts_manage', 'Administrere kontrakter'),
34
   (11, 'contracts_manage', 'Administrere kontrakter'),
33
   (11, 'period_manage', 'Administrere perioder'),
35
   (11, 'period_manage', 'Administrere perioder'),
(-)a/installer/data/mysql/pl-PL/mandatory/userpermissions.sql (+2 lines)
Lines 8-13 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
8
   ( 9, 'edit_catalogue', 'Edit catalogue'),
8
   ( 9, 'edit_catalogue', 'Edit catalogue'),
9
   ( 9, 'fast_cataloging', 'Szybkie katalogowanie'),
9
   ( 9, 'fast_cataloging', 'Szybkie katalogowanie'),
10
   ( 9, 'edit_items', 'Edit Items'),
10
   ( 9, 'edit_items', 'Edit Items'),
11
   (10, 'writeoff', 'Write off charges'),
12
   (10, 'remaining_permissions', 'Remaining updatecharges permissions'),
11
   (11, 'vendors_manage', 'Zarządzanei dostawcami'),
13
   (11, 'vendors_manage', 'Zarządzanei dostawcami'),
12
   (11, 'contracts_manage', 'Zarządzanie kontraktami'),
14
   (11, 'contracts_manage', 'Zarządzanie kontraktami'),
13
   (11, 'period_manage', 'Manage periods'),
15
   (11, 'period_manage', 'Manage periods'),
(-)a/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql (+2 lines)
Lines 32-37 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
32
   ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
32
   ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
33
   ( 9, 'fast_cataloging', 'Fast cataloging'),
33
   ( 9, 'fast_cataloging', 'Fast cataloging'),
34
   ( 9, 'edit_items', 'Edit Items'),
34
   ( 9, 'edit_items', 'Edit Items'),
35
   (10, 'writeoff', 'Write off charges'),
36
   (10, 'remaining_permissions', 'Remaining updatecharges permissions'),
35
   (11, 'vendors_manage', 'Manage vendors'),
37
   (11, 'vendors_manage', 'Manage vendors'),
36
   (11, 'contracts_manage', 'Manage contracts'),
38
   (11, 'contracts_manage', 'Manage contracts'),
37
   (11, 'period_manage', 'Manage periods'),
39
   (11, 'period_manage', 'Manage periods'),
(-)a/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql (+2 lines)
Lines 32-37 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
32
   ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
32
   ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
33
   ( 9, 'fast_cataloging', 'Fast cataloging'),
33
   ( 9, 'fast_cataloging', 'Fast cataloging'),
34
   ( 9, 'edit_items', 'Edit Items'),
34
   ( 9, 'edit_items', 'Edit Items'),
35
   (10, 'writeoff', 'Write off charges'),
36
   (10, 'remaining_permissions', 'Remaining updatecharges permissions'),
35
   (11, 'vendors_manage', 'Manage vendors'),
37
   (11, 'vendors_manage', 'Manage vendors'),
36
   (11, 'contracts_manage', 'Manage contracts'),
38
   (11, 'contracts_manage', 'Manage contracts'),
37
   (11, 'period_manage', 'Manage periods'),
39
   (11, 'period_manage', 'Manage periods'),
(-)a/installer/data/mysql/updatedatabase.pl (+8 lines)
Lines 6339-6344 if ( CheckVersion($DBversion) ) { Link Here
6339
   SetVersion ($DBversion);
6339
   SetVersion ($DBversion);
6340
}
6340
}
6341
6341
6342
$DBversion = "3.11.00.XXX";
6343
if ( CheckVersion($DBversion) ) {
6344
   $dbh->do("INSERT INTO permissions (module_bit, code, description) VALUES ('10', 'writeoff', 'Write off charges')");
6345
   $dbh->do("INSERT INTO permissions (module_bit, code, description) VALUES ('10', 'remaining_permissions', 'Remaining updatecharges permissions')");
6346
   print "Upgrade to $DBversion done (Bug 9448 - Add separate permission for writing off fees)\n";
6347
   SetVersion ($DBversion);
6348
}
6349
6342
=head1 FUNCTIONS
6350
=head1 FUNCTIONS
6343
6351
6344
=head2 TableExists($table)
6352
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-2 / +2 lines)
Lines 67-73 Link Here
67
    <td>
67
    <td>
68
    [% IF ( line.amountoutstanding > 0 ) %]
68
    [% IF ( line.amountoutstanding > 0 ) %]
69
        <input type="submit" name="pay_indiv_[% line.accountno %]" value="Pay" />
69
        <input type="submit" name="pay_indiv_[% line.accountno %]" value="Pay" />
70
        <input type="submit" name="wo_indiv_[% line.accountno %]" value="Write off" />
70
        [% IF CAN_user_updatecharges_writeoff %]<input type="submit" name="wo_indiv_[% line.accountno %]" value="Write off" />[% END %]
71
    [% END %]
71
    [% END %]
72
    <input type="hidden" name="itemnumber[% line.accountno %]" value="[% line.itemnumber %]" />
72
    <input type="hidden" name="itemnumber[% line.accountno %]" value="[% line.itemnumber %]" />
73
    <input type="hidden" name="description[% line.accountno %]" value="[% line.description %]" />
73
    <input type="hidden" name="description[% line.accountno %]" value="[% line.description %]" />
Lines 106-112 Link Here
106
</table>
106
</table>
107
<fieldset class="action">
107
<fieldset class="action">
108
<input type="submit" name="paycollect"  value="Pay amount" class="submit" />
108
<input type="submit" name="paycollect"  value="Pay amount" class="submit" />
109
<input type="submit" name="woall"  id="woall" value="Write off all" class="submit" />
109
[% IF CAN_user_updatecharges_writeoff %]<input type="submit" name="woall"  id="woall" value="Write off all" class="submit" />[% END %]
110
<input type="submit" name="payselected"  value="Pay selected" class="submit" />
110
<input type="submit" name="payselected"  value="Pay selected" class="submit" />
111
<a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
111
<a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrower.borrowernumber %]">Cancel</a>
112
</fieldset>
112
</fieldset>
(-)a/members/boraccount.pl (-1 / +1 lines)
Lines 42-48 my ($template, $loggedinuser, $cookie) Link Here
42
                            query => $input,
42
                            query => $input,
43
                            type => "intranet",
43
                            type => "intranet",
44
                            authnotrequired => 0,
44
                            authnotrequired => 0,
45
                            flagsrequired => {borrowers => 1, updatecharges => 1},
45
                            flagsrequired => {borrowers => 1, updatecharges => 'remaining_permissions'},
46
                            debug => 1,
46
                            debug => 1,
47
                            });
47
                            });
48
48
(-)a/members/mancredit.pl (-1 / +1 lines)
Lines 64-70 if ($add){ Link Here
64
					  query => $input,
64
					  query => $input,
65
					  type => "intranet",
65
					  type => "intranet",
66
					  authnotrequired => 0,
66
					  authnotrequired => 0,
67
					  flagsrequired => {borrowers => 1, updatecharges => 1},
67
					  flagsrequired => {borrowers => 1, updatecharges => 'remaining_permissions'},
68
					  debug => 1,
68
					  debug => 1,
69
					  });
69
					  });
70
					  
70
					  
(-)a/members/maninvoice.pl (-1 / +1 lines)
Lines 82-88 if ($add){ Link Here
82
					query => $input,
82
					query => $input,
83
					type => "intranet",
83
					type => "intranet",
84
					authnotrequired => 0,
84
					authnotrequired => 0,
85
					flagsrequired => {borrowers => 1, updatecharges => 1},
85
					flagsrequired => {borrowers => 1, updatecharges => 'remaining_permissions'},
86
					debug => 1,
86
					debug => 1,
87
					});
87
					});
88
					
88
					
(-)a/members/pay.pl (-1 / +2 lines)
Lines 45-56 our $input = CGI->new; Link Here
45
our $writeoff_sth;
45
our $writeoff_sth;
46
our $add_writeoff_sth;
46
our $add_writeoff_sth;
47
47
48
my $updatecharges_permissions = $input->param('woall') ? 'writeoff' : 'remaining_permissions';
48
our ( $template, $loggedinuser, $cookie ) = get_template_and_user(
49
our ( $template, $loggedinuser, $cookie ) = get_template_and_user(
49
    {   template_name   => 'members/pay.tmpl',
50
    {   template_name   => 'members/pay.tmpl',
50
        query           => $input,
51
        query           => $input,
51
        type            => 'intranet',
52
        type            => 'intranet',
52
        authnotrequired => 0,
53
        authnotrequired => 0,
53
        flagsrequired   => { borrowers => 1, updatecharges => 1 },
54
        flagsrequired   => { borrowers => 1, updatecharges => $updatecharges_permissions },
54
        debug           => 1,
55
        debug           => 1,
55
    }
56
    }
56
);
57
);
(-)a/members/paycollect.pl (-1 / +2 lines)
Lines 30-41 use C4::Branch; Link Here
30
30
31
my $input = CGI->new();
31
my $input = CGI->new();
32
32
33
my $updatecharges_permissions = $input->param('writeoff_individual') ? 'writeoff' : 'remaining_permissions';
33
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
34
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
34
    {   template_name   => 'members/paycollect.tmpl',
35
    {   template_name   => 'members/paycollect.tmpl',
35
        query           => $input,
36
        query           => $input,
36
        type            => 'intranet',
37
        type            => 'intranet',
37
        authnotrequired => 0,
38
        authnotrequired => 0,
38
        flagsrequired   => { borrowers => 1, updatecharges => 1 },
39
        flagsrequired   => { borrowers => 1, updatecharges => $updatecharges_permissions },
39
        debug           => 1,
40
        debug           => 1,
40
    }
41
    }
41
);
42
);
(-)a/members/printfeercpt.pl (-1 / +1 lines)
Lines 41-47 my ($template, $loggedinuser, $cookie) Link Here
41
                            query => $input,
41
                            query => $input,
42
                            type => "intranet",
42
                            type => "intranet",
43
                            authnotrequired => 0,
43
                            authnotrequired => 0,
44
                            flagsrequired => {borrowers => 1, updatecharges => 1},
44
                            flagsrequired => {borrowers => 1, updatecharges => 'remaining_permissions'},
45
                            debug => 1,
45
                            debug => 1,
46
                            });
46
                            });
47
47
(-)a/members/printinvoice.pl (-2 / +1 lines)
Lines 41-47 my ($template, $loggedinuser, $cookie) Link Here
41
                            query => $input,
41
                            query => $input,
42
                            type => "intranet",
42
                            type => "intranet",
43
                            authnotrequired => 0,
43
                            authnotrequired => 0,
44
                            flagsrequired => {borrowers => 1, updatecharges => 1},
44
                            flagsrequired => {borrowers => 1, updatecharges => 'remaining_permissions'},
45
                            debug => 1,
45
                            debug => 1,
46
                            });
46
                            });
47
47
48
- 

Return to bug 9448