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

(-)a/C4/Accounts.pm (-15 / +4 lines)
Lines 194-227 sub manualinvoice { Link Here
194
    my $manager_id = 0;
194
    my $manager_id = 0;
195
    $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv;
195
    $manager_id = C4::Context->userenv->{'number'} if C4::Context->userenv;
196
    my $dbh      = C4::Context->dbh;
196
    my $dbh      = C4::Context->dbh;
197
    my $notifyid = 0;
198
    my $insert;
197
    my $insert;
199
    my $accountno  = getnextacctno($borrowernumber);
198
    my $accountno  = getnextacctno($borrowernumber);
200
    my $amountleft = $amount;
199
    my $amountleft = $amount;
201
200
202
    if (   ( $type eq 'L' )
203
        or ( $type eq 'F' )
204
        or ( $type eq 'A' )
205
        or ( $type eq 'N' )
206
        or ( $type eq 'M' ) )
207
    {
208
        $notifyid = 1;
209
    }
210
211
    if ( $itemnum ) {
201
    if ( $itemnum ) {
212
        $desc .= ' ' . $itemnum;
202
        $desc .= ' ' . $itemnum;
213
        my $sth = $dbh->prepare(
203
        my $sth = $dbh->prepare(
214
            'INSERT INTO  accountlines
204
            'INSERT INTO  accountlines
215
                        (borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding, itemnumber,notify_id, note, manager_id)
205
                        (borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding, itemnumber, note, manager_id)
216
        VALUES (?, ?, now(), ?,?, ?,?,?,?,?,?)');
206
        VALUES (?, ?, now(), ?,?, ?,?,?,?,?,?)');
217
     $sth->execute($borrowernumber, $accountno, $amount, $desc, $type, $amountleft, $itemnum,$notifyid, $note, $manager_id) || return $sth->errstr;
207
     $sth->execute($borrowernumber, $accountno, $amount, $desc, $type, $amountleft, $itemnum, $note, $manager_id) || return $sth->errstr;
218
  } else {
208
  } else {
219
    my $sth=$dbh->prepare("INSERT INTO  accountlines
209
    my $sth=$dbh->prepare("INSERT INTO  accountlines
220
            (borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding,notify_id, note, manager_id)
210
            (borrowernumber, accountno, date, amount, description, accounttype, amountoutstanding, note, manager_id)
221
            VALUES (?, ?, now(), ?, ?, ?, ?,?,?,?)"
211
            VALUES (?, ?, now(), ?, ?, ?, ?,?,?,?)"
222
        );
212
        );
223
        $sth->execute( $borrowernumber, $accountno, $amount, $desc, $type,
213
        $sth->execute( $borrowernumber, $accountno, $amount, $desc, $type,
224
            $amountleft, $notifyid, $note, $manager_id );
214
            $amountleft, $note, $manager_id );
225
    }
215
    }
226
216
227
    if ( C4::Context->preference("FinesLog") ) {
217
    if ( C4::Context->preference("FinesLog") ) {
Lines 233-239 sub manualinvoice { Link Here
233
            description       => $desc,
223
            description       => $desc,
234
            accounttype       => $type,
224
            accounttype       => $type,
235
            amountoutstanding => $amountleft,
225
            amountoutstanding => $amountleft,
236
            notify_id         => $notifyid,
237
            note              => $note,
226
            note              => $note,
238
            itemnumber        => $itemnum,
227
            itemnumber        => $itemnum,
239
            manager_id        => $manager_id,
228
            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 685-742 sub GetFine { Link Here
685
    return 0;
683
    return 0;
686
}
684
}
687
685
688
=head2 NumberNotifyId
689
690
    (@notify) = &NumberNotifyId($borrowernumber);
691
692
Returns amount for all file per borrowers
693
C<@notify> array contains all file per borrowers
694
695
C<$notify_id> contains the file number for the borrower number nad item number
696
697
=cut
698
699
sub NumberNotifyId{
700
    my ($borrowernumber)=@_;
701
    my $dbh = C4::Context->dbh;
702
    my $query=qq|    SELECT distinct(notify_id)
703
            FROM accountlines
704
            WHERE borrowernumber=?|;
705
    my @notify;
706
    my $sth = $dbh->prepare($query);
707
    $sth->execute($borrowernumber);
708
    while ( my ($numberofnotify) = $sth->fetchrow ) {
709
        push( @notify, $numberofnotify );
710
    }
711
    return (@notify);
712
}
713
714
=head2 AmountNotify
715
716
    ($totalnotify) = &AmountNotify($notifyid);
717
718
Returns amount for all file per borrowers
719
C<$notifyid> is the file number
720
721
C<$totalnotify> contains amount of a file
722
723
C<$notify_id> contains the file number for the borrower number and item number
724
725
=cut
726
727
sub AmountNotify{
728
    my ($notifyid,$borrowernumber)=@_;
729
    my $dbh = C4::Context->dbh;
730
    my $query=qq|    SELECT sum(amountoutstanding)
731
            FROM accountlines
732
            WHERE notify_id=? AND borrowernumber = ?|;
733
    my $sth=$dbh->prepare($query);
734
	$sth->execute($notifyid,$borrowernumber);
735
	my $totalnotify=$sth->fetchrow;
736
    $sth->finish;
737
    return ($totalnotify);
738
}
739
740
=head2 GetItems
686
=head2 GetItems
741
687
742
    ($items) = &GetItems($itemnumber);
688
    ($items) = &GetItems($itemnumber);
Lines 824-831 sub GetOverduesForBranch { Link Here
824
                items.location,
770
                items.location,
825
                items.itemnumber,
771
                items.itemnumber,
826
            itemtypes.description,
772
            itemtypes.description,
827
         accountlines.notify_id,
828
         accountlines.notify_level,
829
         accountlines.amountoutstanding
773
         accountlines.amountoutstanding
830
    FROM  accountlines
774
    FROM  accountlines
831
    LEFT JOIN issues      ON    issues.itemnumber     = accountlines.itemnumber
775
    LEFT JOIN issues      ON    issues.itemnumber     = accountlines.itemnumber
(-)a/Koha/Schema/Result/Accountline.pm (-18 / +2 lines)
Lines 100-117 __PACKAGE__->table("accountlines"); Link Here
100
  default_value: current_timestamp
100
  default_value: current_timestamp
101
  is_nullable: 0
101
  is_nullable: 0
102
102
103
=head2 notify_id
104
105
  data_type: 'integer'
106
  default_value: 0
107
  is_nullable: 0
108
109
=head2 notify_level
110
111
  data_type: 'integer'
112
  default_value: 0
113
  is_nullable: 0
114
115
=head2 note
103
=head2 note
116
104
117
  data_type: 'text'
105
  data_type: 'text'
Lines 161-170 __PACKAGE__->add_columns( Link Here
161
    default_value => \"current_timestamp",
149
    default_value => \"current_timestamp",
162
    is_nullable => 0,
150
    is_nullable => 0,
163
  },
151
  },
164
  "notify_id",
165
  { data_type => "integer", default_value => 0, is_nullable => 0 },
166
  "notify_level",
167
  { data_type => "integer", default_value => 0, is_nullable => 0 },
168
  "note",
152
  "note",
169
  { data_type => "text", is_nullable => 1 },
153
  { data_type => "text", is_nullable => 1 },
170
  "manager_id",
154
  "manager_id",
Lines 221-228 __PACKAGE__->belongs_to( Link Here
221
);
205
);
222
206
223
207
224
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-01-26 17:18:34
208
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-18 12:07:23
225
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RCQohhphtg+0+RszpB4wLg
209
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xWKuMw9OAjF4HetRtdUfWQ
226
210
227
211
228
# You can replace this text with custom content, and it will be preserved on regeneration
212
# You can replace this text with custom content, and it will be preserved on regeneration
(-)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 2709-2716 CREATE TABLE `accountlines` ( Link Here
2709
  `amountoutstanding` decimal(28,6) default NULL,
2709
  `amountoutstanding` decimal(28,6) default NULL,
2710
  `lastincrement` decimal(28,6) default NULL,
2710
  `lastincrement` decimal(28,6) default NULL,
2711
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
2711
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
2712
  `notify_id` int(11) NOT NULL default 0,
2713
  `notify_level` int(2) NOT NULL default 0,
2714
  `note` text NULL default NULL,
2712
  `note` text NULL default NULL,
2715
  `manager_id` int(11) NULL,
2713
  `manager_id` int(11) NULL,
2716
  PRIMARY KEY (`accountlines_id`),
2714
  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 144-151 function enableCheckboxActions(){ Link Here
144
    </td>
142
    </td>
145
    <td><input type="text" name="payment_note_[% line.accountlines_id %]" /></td>
143
    <td><input type="text" name="payment_note_[% line.accountlines_id %]" /></td>
146
    <td>[% line.accounttype %]</td>
144
    <td>[% line.accounttype %]</td>
147
    <td>[% line.notify_id %]</td>
148
    <td>[% line.notify_level %]</td>
149
    <td class="debit" style="text-align: right;">[% line.amount | $Price %]</td>
145
    <td class="debit" style="text-align: right;">[% line.amount | $Price %]</td>
150
    <td class="debit" style="text-align: right;">[% line.amountoutstanding | $Price %]</td>
146
    <td class="debit" style="text-align: right;">[% line.amountoutstanding | $Price %]</td>
151
</tr>
147
</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