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

(-)a/C4/Accounts.pm (-16 / +3 lines)
Lines 159-169 sub chargelostitem{ Link Here
159
    unless ($existing_charges) {
159
    unless ($existing_charges) {
160
        #add processing fee
160
        #add processing fee
161
        if ($processfee && $processfee > 0){
161
        if ($processfee && $processfee > 0){
162
            manualinvoice($borrowernumber, $itemnumber, $description, 'PF', $processfee, $processingfeenote, 1);
162
            manualinvoice($borrowernumber, $itemnumber, $description, 'PF', $processfee, $processingfeenote);
163
        }
163
        }
164
        #add replace cost
164
        #add replace cost
165
        if ($replacementprice > 0){
165
        if ($replacementprice > 0){
166
            manualinvoice($borrowernumber, $itemnumber, $description, 'L', $replacementprice, undef, 1);
166
            manualinvoice($borrowernumber, $itemnumber, $description, 'L', $replacementprice);
167
        }
167
        }
168
    }
168
    }
169
}
169
}
Lines 195-218 should be the empty string. Link Here
195
#
195
#
196
196
197
sub manualinvoice {
197
sub manualinvoice {
198
    my ( $borrowernumber, $itemnum, $desc, $type, $amount, $note, $skip_notify ) = @_;
198
    my ( $borrowernumber, $itemnum, $desc, $type, $amount, $note ) = @_;
199
    my $manager_id = 0;
199
    my $manager_id = 0;
200
    $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv;
200
    $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv;
201
    my $dbh      = C4::Context->dbh;
201
    my $dbh      = C4::Context->dbh;
202
    my $notifyid = 0;
203
    my $insert;
202
    my $insert;
204
    my $accountno  = getnextacctno($borrowernumber);
203
    my $accountno  = getnextacctno($borrowernumber);
205
    my $amountleft = $amount;
204
    my $amountleft = $amount;
206
    $skip_notify //= 0;
207
208
    if (   ( $type eq 'L' )
209
        or ( $type eq 'F' )
210
        or ( $type eq 'A' )
211
        or ( $type eq 'N' )
212
        or ( $type eq 'M' ) )
213
    {
214
        $notifyid = 1 unless $skip_notify;
215
    }
216
205
217
    my $accountline = Koha::Account::Line->new(
206
    my $accountline = Koha::Account::Line->new(
218
        {
207
        {
Lines 224-230 sub manualinvoice { Link Here
224
            accounttype       => $type,
213
            accounttype       => $type,
225
            amountoutstanding => $amountleft,
214
            amountoutstanding => $amountleft,
226
            itemnumber        => $itemnum || undef,
215
            itemnumber        => $itemnum || undef,
227
            notify_id         => $notifyid,
228
            note              => $note,
216
            note              => $note,
229
            manager_id        => $manager_id,
217
            manager_id        => $manager_id,
230
        }
218
        }
Lines 247-253 sub manualinvoice { Link Here
247
            description       => $desc,
235
            description       => $desc,
248
            accounttype       => $type,
236
            accounttype       => $type,
249
            amountoutstanding => $amountleft,
237
            amountoutstanding => $amountleft,
250
            notify_id         => $notifyid,
251
            note              => $note,
238
            note              => $note,
252
            itemnumber        => $itemnum,
239
            itemnumber        => $itemnum,
253
            manager_id        => $manager_id,
240
            manager_id        => $manager_id,
(-)a/C4/Members.pm (-46 lines)
Lines 68-74 BEGIN { Link Here
68
        &GetNoticeEmailAddress
68
        &GetNoticeEmailAddress
69
69
70
        &GetMemberAccountRecords
70
        &GetMemberAccountRecords
71
        &GetBorNotifyAcctRecord
72
71
73
        &GetBorrowersToExpunge
72
        &GetBorrowersToExpunge
74
73
Lines 814-864 sub GetMemberAccountBalance { Link Here
814
    return ( $total, $total - $other_charges, $other_charges);
813
    return ( $total, $total - $other_charges, $other_charges);
815
}
814
}
816
815
817
=head2 GetBorNotifyAcctRecord
818
819
  ($total, $acctlines, $count) = &GetBorNotifyAcctRecord($params,$notifyid);
820
821
Looks up accounting data for the patron with the given borrowernumber per file number.
822
823
C<&GetBorNotifyAcctRecord> returns a three-element array. C<$acctlines> is a
824
reference-to-array, where each element is a reference-to-hash; the
825
keys are the fields of the C<accountlines> table in the Koha database.
826
C<$count> is the number of elements in C<$acctlines>. C<$total> is the
827
total amount outstanding for all of the account lines.
828
829
=cut
830
831
sub GetBorNotifyAcctRecord {
832
    my ( $borrowernumber, $notifyid ) = @_;
833
    my $dbh = C4::Context->dbh;
834
    my @acctlines;
835
    my $numlines = 0;
836
    my $sth = $dbh->prepare(
837
            "SELECT * 
838
                FROM accountlines 
839
                WHERE borrowernumber=? 
840
                    AND notify_id=? 
841
                    AND amountoutstanding != '0' 
842
                ORDER BY notify_id,accounttype
843
                ");
844
845
    $sth->execute( $borrowernumber, $notifyid );
846
    my $total = 0;
847
    while ( my $data = $sth->fetchrow_hashref ) {
848
        if ( $data->{itemnumber} ) {
849
            my $item = Koha::Items->find( $data->{itemnumber} );
850
            my $biblio = $item->biblio;
851
            $data->{biblionumber} = $biblio->biblionumber;
852
            $data->{title}        = $biblio->title;
853
        }
854
        $acctlines[$numlines] = $data;
855
        $numlines++;
856
        $total += int(100 * $data->{'amountoutstanding'});
857
    }
858
    $total /= 100;
859
    return ( $total, \@acctlines, $numlines );
860
}
861
862
sub checkcardnumber {
816
sub checkcardnumber {
863
    my ( $cardnumber, $borrowernumber ) = @_;
817
    my ( $cardnumber, $borrowernumber ) = @_;
864
818
(-)a/C4/Overdues.pm (-56 lines)
Lines 50-57 BEGIN { Link Here
50
      &CalcFine
50
      &CalcFine
51
      &Getoverdues
51
      &Getoverdues
52
      &checkoverdues
52
      &checkoverdues
53
      &NumberNotifyId
54
      &AmountNotify
55
      &UpdateFine
53
      &UpdateFine
56
      &GetFine
54
      &GetFine
57
      &get_chargeable_units
55
      &get_chargeable_units
Lines 701-758 sub GetFine { Link Here
701
    return 0;
699
    return 0;
702
}
700
}
703
701
704
=head2 NumberNotifyId
705
706
    (@notify) = &NumberNotifyId($borrowernumber);
707
708
Returns amount for all file per borrowers
709
C<@notify> array contains all file per borrowers
710
711
C<$notify_id> contains the file number for the borrower number nad item number
712
713
=cut
714
715
sub NumberNotifyId{
716
    my ($borrowernumber)=@_;
717
    my $dbh = C4::Context->dbh;
718
    my $query=qq|    SELECT distinct(notify_id)
719
            FROM accountlines
720
            WHERE borrowernumber=?|;
721
    my @notify;
722
    my $sth = $dbh->prepare($query);
723
    $sth->execute($borrowernumber);
724
    while ( my ($numberofnotify) = $sth->fetchrow ) {
725
        push( @notify, $numberofnotify );
726
    }
727
    return (@notify);
728
}
729
730
=head2 AmountNotify
731
732
    ($totalnotify) = &AmountNotify($notifyid);
733
734
Returns amount for all file per borrowers
735
C<$notifyid> is the file number
736
737
C<$totalnotify> contains amount of a file
738
739
C<$notify_id> contains the file number for the borrower number and item number
740
741
=cut
742
743
sub AmountNotify{
744
    my ($notifyid,$borrowernumber)=@_;
745
    my $dbh = C4::Context->dbh;
746
    my $query=qq|    SELECT sum(amountoutstanding)
747
            FROM accountlines
748
            WHERE notify_id=? AND borrowernumber = ?|;
749
    my $sth=$dbh->prepare($query);
750
	$sth->execute($notifyid,$borrowernumber);
751
	my $totalnotify=$sth->fetchrow;
752
    $sth->finish;
753
    return ($totalnotify);
754
}
755
756
=head2 GetItems
702
=head2 GetItems
757
703
758
    ($items) = &GetItems($itemnumber);
704
    ($items) = &GetItems($itemnumber);
Lines 840-847 sub GetOverduesForBranch { Link Here
840
                items.location,
786
                items.location,
841
                items.itemnumber,
787
                items.itemnumber,
842
            itemtypes.description,
788
            itemtypes.description,
843
         accountlines.notify_id,
844
         accountlines.notify_level,
845
         accountlines.amountoutstanding
789
         accountlines.amountoutstanding
846
    FROM  accountlines
790
    FROM  accountlines
847
    LEFT JOIN issues      ON    issues.itemnumber     = accountlines.itemnumber
791
    LEFT JOIN issues      ON    issues.itemnumber     = accountlines.itemnumber
(-)a/circ/branchoverdues.pl (-38 lines)
Lines 35-61 use Data::Dumper; Link Here
35
 this module is a new interface, allow to the librarian to check all items on overdues (based on the acountlines type 'FU' )
35
 this module is a new interface, allow to the librarian to check all items on overdues (based on the acountlines type 'FU' )
36
 this interface is filtered by branches (automatically), and by location (optional) ....
36
 this interface is filtered by branches (automatically), and by location (optional) ....
37
37
38
 FIXME for this time, we have only four methods to notify :
39
 	- mail : work with a batch programm
40
 	- letter : for us, the letters are generated by an open-office program
41
 	- phone : Simple method, when the method 'phone' is selected, we consider, that the borrower as been notified, and the notify send date is implemented
42
 	- considered lost : for us if the document is on the third overduelevel,
43
44
 FIXME the methods are actually hardcoded for the levels : (maybe can be improved by a new possibility in overduerule)
45
46
 	level 1 : three methods are possible : - mail, letter, phone
47
 	level 2 : only one method is possible : - letter
48
 	level 3 : only methode is possible  : - Considered Lost
49
50
 	the documents displayed on this interface, are checked on three points
51
 	- 1) the document must be on accountlines (Type 'FU')
52
 	- 2) item issues is not returned
53
	- 3) this item as not been already notify
54
55
  FIXME: who is the author?
56
  FIXME: No privisions (i.e. "actions") for handling notices are implemented.
57
  FIXME: This is linked as "Overdue Fines" but the relationship to fines in GetOverduesForBranch is more complicated than that.
58
59
=cut
38
=cut
60
39
61
my $input       = new CGI;
40
my $input       = new CGI;
Lines 77-83 my $borrowernumber = $input->param('borrowernumber'); Link Here
77
my $itemnumber     = $input->param('itemnumber');
56
my $itemnumber     = $input->param('itemnumber');
78
my $method         = $input->param('method');
57
my $method         = $input->param('method');
79
my $overduelevel   = $input->param('overduelevel');
58
my $overduelevel   = $input->param('overduelevel');
80
my $notifyId       = $input->param('notifyId');
81
my $location       = $input->param('location');
59
my $location       = $input->param('location');
82
60
83
# FIXME: better check that borrowernumber is defined and valid.
61
# FIXME: better check that borrowernumber is defined and valid.
Lines 118-139 foreach my $num (@getoverdues) { Link Here
118
    $overdueforbranch{'itemnumber'}        = $num->{'itemnumber'};
96
    $overdueforbranch{'itemnumber'}        = $num->{'itemnumber'};
119
    $overdueforbranch{'cardnumber'}        = $num->{'cardnumber'};
97
    $overdueforbranch{'cardnumber'}        = $num->{'cardnumber'};
120
98
121
    # now we add on the template, the differents values of notify_level
122
    # FIXME: numerical comparison, not string eq.
123
    if ( $num->{'notify_level'} eq '1' ) {
124
        $overdueforbranch{'overdue1'}     = 1;
125
        $overdueforbranch{'overdueLevel'} = 1;
126
    }
127
    elsif ( $num->{'notify_level'} eq '2' ) {
128
        $overdueforbranch{'overdue2'}     = 1;
129
        $overdueforbranch{'overdueLevel'} = 2;
130
    }
131
    elsif ( $num->{'notify_level'} eq '3' ) {
132
        $overdueforbranch{'overdue3'}     = 1;
133
        $overdueforbranch{'overdueLevel'} = 3;
134
    }
135
    $overdueforbranch{'notify_id'} = $num->{'notify_id'};
136
137
    push( @overduesloop, \%overdueforbranch );
99
    push( @overduesloop, \%overdueforbranch );
138
}
100
}
139
101
(-)a/installer/data/mysql/kohastructure.sql (-2 lines)
Lines 2711-2718 CREATE TABLE `accountlines` ( Link Here
2711
  `amountoutstanding` decimal(28,6) default NULL,
2711
  `amountoutstanding` decimal(28,6) default NULL,
2712
  `lastincrement` decimal(28,6) default NULL,
2712
  `lastincrement` decimal(28,6) default NULL,
2713
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
2713
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
2714
  `notify_id` int(11) NOT NULL default 0,
2715
  `notify_level` int(2) NOT NULL default 0,
2716
  `note` text NULL default NULL,
2714
  `note` text NULL default NULL,
2717
  `manager_id` int(11) NULL,
2715
  `manager_id` int(11) NULL,
2718
  PRIMARY KEY (`accountlines_id`),
2716
  PRIMARY KEY (`accountlines_id`),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchoverdues.tt (-10 / +6 lines)
Lines 75-96 Link Here
75
                    <td align="center">
75
                    <td align="center">
76
                    [% IF ( overduesloo.overdue1 ) %]
76
                    [% IF ( overduesloo.overdue1 ) %]
77
                        [% IF ( overduesloo.borroweremail ) %]
77
                        [% IF ( overduesloo.borroweremail ) %]
78
                            <a href="branchoverdues.pl?action=add&amp;borrowernumber=[% overduesloo.borrowernumber %]&amp;itemnumber=[% overduesloo.itemnumber %]&amp;method=mail&amp;location=[% overduesloo.location %]&amp;overduelevel=[% overduesloo.overdueLevel %]&amp;notifyId=[% overduesloo.notify_id %]">Mail</a>
78
                            <a href="branchoverdues.pl?action=add&amp;borrowernumber=[% overduesloo.borrowernumber %]&amp;itemnumber=[% overduesloo.itemnumber %]&amp;method=mail&amp;location=[% overduesloo.location %]&amp;overduelevel=[% overduesloo.overdueLevel %]">Mail</a>
79
                        [% ELSE %]
79
                        [% ELSE %]
80
                            Mail
80
                            Mail
81
                        [% END %]
81
                        [% END %]
82
                            &nbsp;|&nbsp;
82
                            &nbsp;|&nbsp;
83
                            <a href="branchoverdues.pl?action=add&amp;borrowernumber=[% overduesloo.borrowernumber %]&amp;itemnumber=[% overduesloo.itemnumber %]&amp;method=phone&amp;location=[% overduesloo.location %]&amp;overduelevel=[% overduesloo.overdueLevel %]&amp;notifyId=[% overduesloo.notify_id %]">Phone</a>
83
                            <a href="branchoverdues.pl?action=add&amp;borrowernumber=[% overduesloo.borrowernumber %]&amp;itemnumber=[% overduesloo.itemnumber %]&amp;method=phone&amp;location=[% overduesloo.location %]&amp;overduelevel=[% overduesloo.overdueLevel %]">Phone</a>
84
                            &nbsp;|&nbsp;
84
                            &nbsp;|&nbsp;
85
                            <a href="branchoverdues.pl?action=add&amp;borrowernumber=[% overduesloo.borrowernumber %]&amp;itemnumber=[% overduesloo.itemnumber %]&amp;method=letter&amp;location=[% overduesloo.location %]&amp;overduelevel=[% overduesloo.overdueLevel %]&amp;notifyId=[% overduesloo.notify_id %]">Notice</a>
85
                            <a href="branchoverdues.pl?action=add&amp;borrowernumber=[% overduesloo.borrowernumber %]&amp;itemnumber=[% overduesloo.itemnumber %]&amp;method=letter&amp;location=[% overduesloo.location %]&amp;overduelevel=[% overduesloo.overdueLevel %]">Notice</a>
86
                    [% END %]
86
                    [% END %]
87
87
88
                    [% IF ( overduesloo.overdue2 ) %]
88
                    [% IF ( overduesloo.overdue2 ) %]
89
                        <a href="branchoverdues.pl?action=add&amp;borrowernumber=[% overduesloo.borrowernumber %]&amp;itemnumber=[% overduesloo.itemnumber %]&amp;method=letter&amp;location=[% overduesloo.location %]&amp;overduelevel=[% overduesloo.overdueLevel %]&amp;notifyId=[% overduesloo.notify_id %]">Notice</a>
89
                        <a href="branchoverdues.pl?action=add&amp;borrowernumber=[% overduesloo.borrowernumber %]&amp;itemnumber=[% overduesloo.itemnumber %]&amp;method=letter&amp;location=[% overduesloo.location %]&amp;overduelevel=[% overduesloo.overdueLevel %]">Notice</a>
90
                    [% END %]
90
                    [% END %]
91
91
92
                    [% IF ( overduesloo.overdue3 ) %]
92
                    [% IF ( overduesloo.overdue3 ) %]
93
                    <a href="branchoverdues.pl?action=add&amp;borrowernumber=[% overduesloo.borrowernumber %]&amp;itemnumber=[% overduesloo.itemnumber %]&amp;method=lost&amp;location=[% overduesloo.location %]&amp;overduelevel=[% overduesloo.overdueLevel %]&amp;notifyId=[% overduesloo.notify_id %]">Considered lost</a>
93
                    <a href="branchoverdues.pl?action=add&amp;borrowernumber=[% overduesloo.borrowernumber %]&amp;itemnumber=[% overduesloo.itemnumber %]&amp;method=lost&amp;location=[% overduesloo.location %]&amp;overduelevel=[% overduesloo.overdueLevel %]">Considered lost</a>
94
                    [% END %]
94
                    [% END %]
95
95
96
                    </td>
96
                    </td>
Lines 110-116 Link Here
110
                <th>Borrower</th>
110
                <th>Borrower</th>
111
                <th>Location</th>
111
                <th>Location</th>
112
                <th>Overdue status</th>
112
                <th>Overdue status</th>
113
                <th>Notified by</th>
114
                <th>Cancel</th>
113
                <th>Cancel</th>
115
            </tr>
114
            </tr>
116
                [% FOREACH todayoverduesloo IN todayoverduesloop %]
115
                [% FOREACH todayoverduesloo IN todayoverduesloop %]
Lines 150-161 Link Here
150
                                [% END %]
149
                                [% END %]
151
                            </b>
150
                            </b>
152
                        </td>
151
                        </td>
153
                        <td align="center">
154
                            <b>[% todayoverduesloo.notify_method %]</b>
155
                        </td>
156
152
157
                        <td>
153
                        <td>
158
                        <a href="branchoverdues.pl?action=remove&amp;borrowernumber=[% todayoverduesloo.borrowernumber %]&amp;itemnumber=[% todayoverduesloo.itemnumber %]&amp;method=phone&amp;location=[% todayoverduesloo.location %]&amp;notify_date=[% todayoverduesloo.notify_date %]">Cancel notification</a>
154
                        <a href="branchoverdues.pl?action=remove&amp;borrowernumber=[% todayoverduesloo.borrowernumber %]&amp;itemnumber=[% todayoverduesloo.itemnumber %]&amp;method=phone&amp;location=[% todayoverduesloo.location %]">Cancel notification</a>
159
                        </td>
155
                        </td>
160
                    </tr>
156
                    </tr>
161
                [% END %]
157
                [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (-4 lines)
Lines 112-119 function enableCheckboxActions(){ Link Here
112
    <input type="hidden" name="accountlines_id[% line.accountlines_id %]" value="[% line.accountlines_id %]" />
112
    <input type="hidden" name="accountlines_id[% line.accountlines_id %]" value="[% line.accountlines_id %]" />
113
    <input type="hidden" name="amountoutstanding[% line.accountlines_id %]" value="[% line.amountoutstanding %]" />
113
    <input type="hidden" name="amountoutstanding[% line.accountlines_id %]" value="[% line.amountoutstanding %]" />
114
    <input type="hidden" name="borrowernumber[% line.accountlines_id %]" value="[% line.borrowernumber %]" />
114
    <input type="hidden" name="borrowernumber[% line.accountlines_id %]" value="[% line.borrowernumber %]" />
115
    <input type="hidden" name="notify_id[% line.accountlines_id %]" value="[% line.notify_id %]" />
116
    <input type="hidden" name="notify_level[% line.accountlines_id %]" value="[% line.notify_level %]" />
117
    <input type="hidden" name="totals[% line.accountlines_id %]" value="[% line.totals %]" />
115
    <input type="hidden" name="totals[% line.accountlines_id %]" value="[% line.totals %]" />
118
    </td>
116
    </td>
119
    <td>
117
    <td>
Lines 145-152 function enableCheckboxActions(){ Link Here
145
    </td>
143
    </td>
146
    <td><input type="text" name="payment_note_[% line.accountlines_id %]" /></td>
144
    <td><input type="text" name="payment_note_[% line.accountlines_id %]" /></td>
147
    <td>[% line.accounttype %]</td>
145
    <td>[% line.accounttype %]</td>
148
    <td>[% line.notify_id %]</td>
149
    <td>[% line.notify_level %]</td>
150
    <td class="debit" style="text-align: right;">[% line.amount | $Price %]</td>
146
    <td class="debit" style="text-align: right;">[% line.amount | $Price %]</td>
151
    <td class="debit" style="text-align: right;">[% line.amountoutstanding | $Price %]</td>
147
    <td class="debit" style="text-align: right;">[% line.amountoutstanding | $Price %]</td>
152
</tr>
148
</tr>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt (-8 lines)
Lines 106-113 function moneyFormat(textObj) { Link Here
106
    <input type="hidden" name="itemnumber" id="itemnumber" value="[% itemnumber %]" />
106
    <input type="hidden" name="itemnumber" id="itemnumber" value="[% itemnumber %]" />
107
    <input type="hidden" name="description" id="description" value="[% description %]" />
107
    <input type="hidden" name="description" id="description" value="[% description %]" />
108
    <input type="hidden" name="accounttype" id="accounttype" value="[% accounttype %]" />
108
    <input type="hidden" name="accounttype" id="accounttype" value="[% accounttype %]" />
109
    <input type="hidden" name="notify_id" id="notify_id" value="[% notify_id %]" />
110
    <input type="hidden" name="notify_level" id="notify_level" value="[% notify_level %]" />
111
    <input type="hidden" name="amount" id="amount" value="[% amount %]" />
109
    <input type="hidden" name="amount" id="amount" value="[% amount %]" />
112
    <input type="hidden" name="amountoutstanding" id="amountoutstanding" value="[% amountoutstanding %]" />
110
    <input type="hidden" name="amountoutstanding" id="amountoutstanding" value="[% amountoutstanding %]" />
113
    <input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id %]" />
111
    <input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id %]" />
Lines 133-140 function moneyFormat(textObj) { Link Here
133
                [% individual_description %]
131
                [% individual_description %]
134
            </td>
132
            </td>
135
            <td>[% accounttype %]</td>
133
            <td>[% accounttype %]</td>
136
            <td>[% notify_id %]</td>
137
            <td>[% notify_level %]</td>
138
            <td class="debit">[% amount | format('%.2f') %]</td>
134
            <td class="debit">[% amount | format('%.2f') %]</td>
139
            <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
135
            <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
140
        </tr></tbody>
136
        </tr></tbody>
Lines 162-169 function moneyFormat(textObj) { Link Here
162
    <input type="hidden" name="itemnumber" id="itemnumber" value="[% itemnumber %]" />
158
    <input type="hidden" name="itemnumber" id="itemnumber" value="[% itemnumber %]" />
163
    <input type="hidden" name="description" id="description" value="[% description %]" />
159
    <input type="hidden" name="description" id="description" value="[% description %]" />
164
    <input type="hidden" name="accounttype" id="accounttype" value="[% accounttype %]" />
160
    <input type="hidden" name="accounttype" id="accounttype" value="[% accounttype %]" />
165
    <input type="hidden" name="notify_id" id="notify_id" value="[% notify_id %]" />
166
    <input type="hidden" name="notify_level" id="notify_level" value="[% notify_level %]" />
167
    <input type="hidden" name="amount" id="amount" value="[% amount %]" />
161
    <input type="hidden" name="amount" id="amount" value="[% amount %]" />
168
    <input type="hidden" name="amountoutstanding" id="amountoutstanding" value="[% amountoutstanding %]" />
162
    <input type="hidden" name="amountoutstanding" id="amountoutstanding" value="[% amountoutstanding %]" />
169
    <input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id %]" />
163
    <input type="hidden" name="accountlines_id" id="accountlines_id" value="[% accountlines_id %]" />
Lines 182-189 function moneyFormat(textObj) { Link Here
182
    <tbody><tr>
176
    <tbody><tr>
183
            <td>[% description %] [% title %]</td>
177
            <td>[% description %] [% title %]</td>
184
            <td>[% accounttype %]</td>
178
            <td>[% accounttype %]</td>
185
            <td>[% notify_id %]</td>
186
            <td>[% notify_level %]</td>
187
            <td class="debit">[% amount | format('%.2f') %]</td>
179
            <td class="debit">[% amount | format('%.2f') %]</td>
188
            <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
180
            <td class="debit">[% amountoutstanding | format('%.2f') %]</td>
189
        </tr></tbody>
181
        </tr></tbody>
(-)a/members/pay.pl (-17 lines)
Lines 134-154 sub add_accounts_to_template { Link Here
134
134
135
    my ( $total, undef, undef ) = GetMemberAccountRecords($borrowernumber);
135
    my ( $total, undef, undef ) = GetMemberAccountRecords($borrowernumber);
136
    my $accounts = [];
136
    my $accounts = [];
137
    my @notify   = NumberNotifyId($borrowernumber);
138
139
    my $notify_groups = [];
140
    for my $notify_id (@notify) {
141
        my ( $acct_total, $accountlines, undef ) =
142
          GetBorNotifyAcctRecord( $borrowernumber, $notify_id );
143
        if ( @{$accountlines} ) {
144
            my $totalnotify = AmountNotify( $notify_id, $borrowernumber );
145
            push @{$accounts},
146
              { accountlines => $accountlines,
147
                notify       => $notify_id,
148
                total        => $totalnotify,
149
              };
150
        }
151
    }
152
    borrower_add_additional_fields($borrower);
137
    borrower_add_additional_fields($borrower);
153
138
154
    $template->param(%$borrower);
139
    $template->param(%$borrower);
Lines 196-203 sub redirect_to_paycollect { Link Here
196
    $redirect .= get_for_redirect( 'description', "description$line_no", 0 );
181
    $redirect .= get_for_redirect( 'description', "description$line_no", 0 );
197
    $redirect .= get_for_redirect( 'title', "title$line_no", 0 );
182
    $redirect .= get_for_redirect( 'title', "title$line_no", 0 );
198
    $redirect .= get_for_redirect( 'itemnumber',   "itemnumber$line_no",   0 );
183
    $redirect .= get_for_redirect( 'itemnumber',   "itemnumber$line_no",   0 );
199
    $redirect .= get_for_redirect( 'notify_id',    "notify_id$line_no",    0 );
200
    $redirect .= get_for_redirect( 'notify_level', "notify_level$line_no", 0 );
201
    $redirect .= get_for_redirect( 'accountlines_id', "accountlines_id$line_no", 0 );
184
    $redirect .= get_for_redirect( 'accountlines_id', "accountlines_id$line_no", 0 );
202
    $redirect .= q{&} . 'payment_note' . q{=} . uri_escape_utf8( scalar $input->param("payment_note_$line_no") );
185
    $redirect .= q{&} . 'payment_note' . q{=} . uri_escape_utf8( scalar $input->param("payment_note_$line_no") );
203
    $redirect .= '&remote_user=';
186
    $redirect .= '&remote_user=';
(-)a/members/paycollect.pl (-5 lines)
Lines 85-92 if ( $individual || $writeoff ) { Link Here
85
    my $itemnumber  = $input->param('itemnumber');
85
    my $itemnumber  = $input->param('itemnumber');
86
    my $description  = $input->param('description');
86
    my $description  = $input->param('description');
87
    my $title        = $input->param('title');
87
    my $title        = $input->param('title');
88
    my $notify_id    = $input->param('notify_id');
89
    my $notify_level = $input->param('notify_level');
90
    $total_due = $amountoutstanding;
88
    $total_due = $amountoutstanding;
91
    $template->param(
89
    $template->param(
92
        accounttype       => $accounttype,
90
        accounttype       => $accounttype,
Lines 96-103 if ( $individual || $writeoff ) { Link Here
96
        title             => $title,
94
        title             => $title,
97
        itemnumber        => $itemnumber,
95
        itemnumber        => $itemnumber,
98
        individual_description => $description,
96
        individual_description => $description,
99
        notify_id         => $notify_id,
100
        notify_level      => $notify_level,
101
        payment_note    => $payment_note,
97
        payment_note    => $payment_note,
102
    );
98
    );
103
} elsif ($select_lines) {
99
} elsif ($select_lines) {
104
- 

Return to bug 10021