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

(-)a/C4/Acquisition.pm (+82 lines)
Lines 56-61 BEGIN { Link Here
56
        &SearchOrder &GetHistory &GetRecentAcqui
56
        &SearchOrder &GetHistory &GetRecentAcqui
57
        &ModReceiveOrder &ModOrderBiblioitemNumber
57
        &ModReceiveOrder &ModOrderBiblioitemNumber
58
        &GetCancelledOrders
58
        &GetCancelledOrders
59
        &GetPayments
60
        &GetPendingpayments
61
        &AddPayments
59
62
60
        &NewOrderItem &ModOrderItem &ModItemOrder
63
        &NewOrderItem &ModOrderItem &ModItemOrder
61
64
Lines 158-163 sub GetBasket { Link Here
158
    return ( $basket );
161
    return ( $basket );
159
}
162
}
160
163
164
165
=head3 GetPayments
166
167
  $aqpayment = &GetPayments($bookseller,$order, $code, $chequeno);
168
169
get all payments informations in aqpayments for a given vendor
170
171
172
=cut
173
174
sub GetPayments {
175
    my ($bookseller,$code, $chequeno) = @_;
176
    my $dbh    = C4::Context->dbh;
177
    my @query_params = ();
178
    my $strsth ="
179
       SELECT aqpayments.booksellerinvoicenumber, aqpayments.chequeno,aqpayments.chequedate, aqpayments.notes FROM aqpayments LEFT JOIN aqorders ON aqpayments.booksellerinvoicenumber = aqorders.booksellerinvoicenumber LEFT JOIN aqbasket ON aqorders.basketno = aqbasket.basketno WHERE aqbasket.booksellerid = ?
180
    ";
181
    push @query_params, $bookseller;
182
183
    if ( defined $code ) {
184
        $strsth .= " AND aqpayments.booksellerinvoicenumber LIKE ? ";        
185
        push @query_params, "$code%";
186
    }
187
    
188
    if ( defined $chequeno ) {
189
        $strsth .= " AND aqpayments.chequeno LIKE ? ";    
190
        push @query_params, "$chequeno%";
191
    }
192
    
193
    $strsth .= "GROUP BY aqpayments.booksellerinvoicenumber ";    
194
195
    my $sth = $dbh->prepare($strsth);
196
197
    $sth->execute( @query_params );
198
    my $results = $sth->fetchall_arrayref({});
199
    $sth->finish;
200
    return @$results;
201
}
202
203
=head3 GetPendingpayments
204
205
  $aqpendingpayment = &GetPendingpayments($supplierid);
206
207
get all pending payments informations in aqpayments for a given vendor
208
209
=cut
210
211
sub GetPendingpayments {
212
    my ($supplierid) = @_;
213
    my $dbh = C4::Context->dbh;
214
    my $strsth = "
215
         SELECT DISTINCT(aqorders.booksellerinvoicenumber) AS booksellerinvoicenumber, aqorders.datereceived FROM aqorders LEFT JOIN aqbasket ON aqorders.basketno= aqbasket.basketno LEFT JOIN aqpayments ON aqorders.booksellerinvoicenumber = aqpayments.booksellerinvoicenumber
216
         WHERE aqbasket.booksellerid=? and aqorders.booksellerinvoicenumber IS NOT NULL AND aqpayments.booksellerinvoicenumber IS NULL";
217
    my @query_params = ( $supplierid );     
218
    my $sth = $dbh->prepare($strsth);
219
    $sth->execute( @query_params );
220
    my $results = $sth->fetchall_arrayref({});
221
    $sth->finish;
222
    return $results;
223
}
224
225
=head3 AddPayments
226
227
  $aqaddpayment = &GetPendingpayments($booksellerinvoicenumber,$chequeno,$chequedate,$notes);
228
229
save all the payments in aqpayments table for a given vendor
230
231
=cut
232
233
sub AddPayments {
234
    my ( $booksellerinvoicenumber, $chequeno,$chequedate,$notes)  = @_;
235
    my $dbh = C4::Context->dbh;
236
    my $query = qq|
237
            INSERT INTO aqpayments
238
                (booksellerinvoicenumber,chequeno,chequedate,notes)
239
            VALUES (?,?,?,?)    |;
240
    my $sth = $dbh->prepare($query);
241
    $sth->execute( $booksellerinvoicenumber,$chequeno,$chequedate,$notes);
242
}
161
#------------------------------------------------------------#
243
#------------------------------------------------------------#
162
244
163
=head3 NewBasket
245
=head3 NewBasket
(-)a/acqui/payment.pl (+84 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
#script to Payment Capture against vendor
4
#written by amit.gupta@osslabs.biz 09/06/2012
5
6
# Copyright 2012 Nucsoft Osslabs
7
#
8
# This file is part of Koha.
9
#
10
# Koha is free software; you can redistribute it and/or modify it under the
11
# terms of the GNU General Public License as published by the Free Software
12
# Foundation; either version 2 of the License, or (at your option) any later
13
# version.
14
#
15
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
16
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
17
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
18
#
19
# You should have received a copy of the GNU General Public License along
20
# with Koha; if not, write to the Free Software Foundation, Inc.,
21
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22
23
=head1 NAME
24
25
payments.pl
26
27
This script is used to capture payments against vendor.
28
29
=cut
30
31
use strict;
32
use warnings;
33
use CGI;
34
use C4::Auth;
35
use C4::Output;
36
37
use C4::Dates qw/format_date/;
38
use C4::Acquisition;
39
use C4::Bookseller qw/ GetBookSellerFromId /;
40
41
my $input          = CGI->new;
42
my $booksellerid     = $input->param('booksellerid');
43
my $startfrom      = $input->param('startfrom');
44
my $code           = $input->param('filter');
45
my $chequeno           = $input->param('chequeno');
46
47
48
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
49
    {   template_name   => 'acqui/payment.tmpl',
50
        query           => $input,
51
        type            => 'intranet',
52
        authnotrequired => 0,
53
        flagsrequired   => { acquisition => 'order_receive' },
54
        debug           => 1,
55
    }
56
);
57
58
my $bookseller = GetBookSellerFromId($booksellerid);
59
my @payments = GetPayments( $booksellerid, $code, $chequeno);
60
my $count_payments = @payments;
61
my @loop_received = ();
62
63
for (my $i = 0 ; $i < $count_payments ; $i++) {
64
    my %line;
65
    %line          = %{ $payments[$i] };
66
    $line{booksellerid} = $booksellerid;
67
    $line{chequedate} = format_date($line{chequedate});
68
    push @loop_received, \%line;
69
    
70
}
71
72
if ($count_payments) {
73
    $template->param( searchresults => \@loop_received, count => $count_payments, );
74
}
75
$template->param(    
76
    chequeno                 => $chequeno,
77
    name                     => $bookseller->{'name'},    
78
    datereceived_today       => C4::Dates->new()->output(),
79
    booksellerid             => $booksellerid,    
80
);
81
82
output_html_with_http_headers $input, $cookie, $template->output;
83
84
(-)a/acqui/payments.pl (+110 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
#script to Payment Capture against vendor
4
#written by amit.gupta@osslabs.biz 09/06/2012
5
6
# Copyright 2012 Nucsoft Osslabs
7
#
8
# This file is part of Koha.
9
#
10
# Koha is free software; you can redistribute it and/or modify it under the
11
# terms of the GNU General Public License as published by the Free Software
12
# Foundation; either version 2 of the License, or (at your option) any later
13
# version.
14
#
15
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
16
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
17
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
18
#
19
# You should have received a copy of the GNU General Public License along
20
# with Koha; if not, write to the Free Software Foundation, Inc.,
21
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22
23
=head1 NAME
24
25
payments.pl
26
27
This script is used to capture payments against vendor.
28
29
=cut
30
31
use strict;
32
use warnings; 
33
use C4::Auth;
34
use C4::Acquisition;
35
use C4::Bookseller qw/ GetBookSellerFromId /;
36
use CGI;
37
use C4::Output;
38
use C4::Dates qw/format_date format_date_in_iso/;
39
40
41
my $input=new CGI;
42
my $booksellerid=$input->param('booksellerid');
43
my $bookseller=GetBookSellerFromId($booksellerid);
44
my $chequeno=$input->param('chequeno') || '';
45
my $notes=$input->param('notes') || '';
46
my $op = $input->param('op');
47
48
my $datereceived =  ($input->param('op') eq 'new') ? C4::Dates->new($input->param('datereceived')) :  C4::Dates->new($input->param('datereceived'), 'iso') ;
49
$datereceived = C4::Dates->new() unless $datereceived;
50
51
my ($template, $loggedinuser, $cookie)
52
    = get_template_and_user({template_name => "acqui/payments.tmpl",
53
                query => $input,
54
                type => "intranet",
55
                authnotrequired => 0,
56
                flagsrequired => {acquisition => 'order_receive'},
57
                debug => 1,
58
});
59
60
my @parcelitems   = GetPayments($booksellerid);
61
my $countlines    = scalar @parcelitems;
62
my @loop_received = ();
63
64
for (my $i = 0 ; $i < $countlines ; $i++) {
65
    my %line;
66
    %line          = %{ $parcelitems[$i] };
67
    $line{booksellerid} = $booksellerid;
68
    $line{chequedate} = format_date($line{chequedate});
69
    push @loop_received, \%line;
70
    
71
}
72
73
my $pendingpayments = GetPendingpayments($booksellerid);
74
my $countpendings = scalar @$pendingpayments;
75
76
77
my @loop_orders = ();
78
for (my $i = 0 ; $i < $countpendings ; $i++) {
79
    my %line;
80
    %line = %{$pendingpayments->[$i]};    
81
    $line{datereceived} = format_date($line{datereceived});    
82
    push @loop_orders, \%line;
83
}
84
85
86
if ($op eq "saveall"){
87
    my @booksellerinvoicenumber = $input->param( 'booksellerinvoicenumber');
88
    my $chequedate = $input->param('date');
89
        foreach my $invoiceno(@booksellerinvoicenumber){
90
            next unless $invoiceno;
91
            AddPayments( $invoiceno, $chequeno,$chequedate,$notes);     
92
        }
93
    my $date = format_date($chequedate);
94
    print  $input->redirect("payments.pl?booksellerid=$booksellerid&op=new&notes=$notes&chequeno=$chequeno&datereceived=$date");
95
}
96
97
98
$template->param(
99
    chequeno               => $chequeno,
100
    notes                 => $notes,
101
    datereceived          => $datereceived->output('iso'),
102
    formatteddatereceived => $datereceived->output(),    
103
    booksellerid            => $booksellerid,
104
    name                  => $bookseller->{'name'},       
105
    loop_received         => \@loop_received,
106
    loop_orders           => \@loop_orders,
107
108
);
109
output_html_with_http_headers $input, $cookie, $template->output;
110
 
(-)a/installer/data/mysql/kohastructure.sql (+13 lines)
Lines 2846-2851 CREATE TABLE `quotes` ( Link Here
2846
  PRIMARY KEY (`id`)
2846
  PRIMARY KEY (`id`)
2847
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2847
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2848
2848
2849
--
2850
-- Table structure for table `aqpayments`
2851
--
2852
2853
DROP TABLE IF EXISTS aqpayments;
2854
CREATE TABLE `aqpayments` (
2855
  `booksellerinvoicenumber` mediumtext,
2856
  `chequeno` varchar(80) default NULL,
2857
  `chequedate` date default NULL, 
2858
  `notes` varchar(80) default NULL,
2859
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP   
2860
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2861
2849
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
2862
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
2850
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
2863
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
2851
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
2864
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
(-)a/installer/data/mysql/updatedatabase.pl (+13 lines)
Lines 5343-5348 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
5343
    SetVersion($DBversion);
5343
    SetVersion($DBversion);
5344
}
5344
}
5345
5345
5346
$DBversion ="3.09.00.XXX";
5347
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {   
5348
    $dbh->do("CREATE TABLE `aqpayments` (
5349
        `booksellerinvoicenumber` mediumtext,
5350
        `chequeno` varchar(80) default NULL,
5351
        `chequedate` date default NULL, 
5352
        `notes` varchar(80) default NULL,
5353
        `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP   
5354
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
5355
    print "Upgrade to $DBversion done (New table structure for aqpayments)\n";
5356
    SetVersion ($DBversion); 
5357
}
5358
5346
=head1 FUNCTIONS
5359
=head1 FUNCTIONS
5347
5360
5348
=head2 TableExists($table)
5361
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc (+1 lines)
Lines 26-31 Link Here
26
                { text: _("New basket"), url: "/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% booksellerid %]&op=add_form"},
26
                { text: _("New basket"), url: "/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% booksellerid %]&op=add_form"},
27
                { text: _("Baskets"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]"},
27
                { text: _("Baskets"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]"},
28
                { text: _("Basket groups"), url: "/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid %]"},
28
                { text: _("Basket groups"), url: "/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid %]"},
29
                { text: _("Payment"), url: "/cgi-bin/koha/acqui/payment.pl?booksellerid=[% booksellerid %]"},
29
            [% END %]
30
            [% END %]
30
            { text: _("Receive shipments"), url: "/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid %]" },
31
            { text: _("Receive shipments"), url: "/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% booksellerid %]" },
31
            [% IF ( basketno ) %]
32
            [% IF ( basketno ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt (+1 lines)
Lines 81-86 $(document).ready(function() { Link Here
81
                        [% END %]
81
                        [% END %]
82
                    [% END %]
82
                    [% END %]
83
                    <input type="button" value="Receive shipment" onclick="window.location.href='/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid %]'" />
83
                    <input type="button" value="Receive shipment" onclick="window.location.href='/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid %]'" />
84
                    <input type="button" value="Payment" onclick="window.location.href='/cgi-bin/koha/acqui/payment.pl?booksellerid=[% supplier.booksellerid %]'" />
84
                </span>
85
                </span>
85
                <div class="baskets">
86
                <div class="baskets">
86
                    [% IF ( supplier.loop_basket.size ) %]
87
                    [% IF ( supplier.loop_basket.size ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/payment.tt (+105 lines)
Line 0 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Acquisitions &rsaquo; Payments Details for vendor [% name %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'calendar.inc' %]
5
</head>
6
<body id="acq_payment" class="acq">
7
[% INCLUDE 'header.inc' %]
8
[% INCLUDE 'acquisitions-search.inc' %]
9
10
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>  &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a> &rsaquo; Payments Details for vendor [% name %]</div>
11
12
[% IF ( count ) %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc" class="yui-t7">[% END %]
13
   
14
<div id="bd">
15
<div id="yui-main">
16
<div class="yui-b">
17
18
<h1>Payments Details for vendor <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a></h1>
19
20
[% IF ( count ) %]
21
22
<div id="resultlist">
23
<!-- Search Results Table -->
24
25
<table class="small">
26
    <tr>        
27
        <th>Transaction Date</th>
28
        <th>Invoice number</th>
29
        <th>Chq No./DD No.</th>            
30
    </tr>
31
<!-- Actual Search Results -->
32
[% FOREACH searchresult IN searchresults %]
33
[% UNLESS ( loop.odd ) %]
34
    <tr class="highlight">
35
    [% ELSE %]
36
    <tr>
37
    [% END %]
38
    <td>[% searchresult.chequedate %]</td>
39
    <td>[% searchresult.booksellerinvoicenumber %]</td>
40
    <td>[% searchresult.chequeno %]</td>        
41
    </tr>
42
[% END %]
43
</table>
44
</div>
45
[% END %]
46
    <div id="payments_new_payment">
47
    <form method="get" action="payments.pl">
48
    <fieldset class="rows">
49
    <legend>Payment Details</legend>
50
    <ol><li>
51
        <label for="chequeno">Chq No./DD No</label>
52
        <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
53
        <input type="hidden" name="op" value="new" />
54
        <input type="text" size="20" id="chequeno" name="chequeno" />
55
        </li>
56
        <li>
57
        <label for="notes">Notes </label>                        
58
        <input type="text" size="20" id="notes" name="notes" />
59
        </li> 
60
        <li><label for="datereceived">Transaction Date: </label>
61
        <input type="text" id="datereceived" name="datereceived"  maxlength="10" size="10"  value="[% datereceived_today %]" />
62
        <img src="[% themelang %]/lib/calendar/cal.gif" id="datereceived_button" alt="Show Calendar" />
63
        <script language="JavaScript" type="text/javascript">
64
            Calendar.setup(
65
                 {
66
                        inputField : "datereceived",
67
                        ifFormat : "[% DHTMLcalendar_dateformat %]",
68
                        button : "datereceived_button"          }
69
            );
70
        </script>
71
        <div class="hint">[% INCLUDE 'date-format.inc' %]</div>	</li>
72
        </ol>
73
        </fieldset>
74
        <fieldset class="action"><input type="submit" class="button" value="Next" /> <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">Cancel</a></fieldset>
75
        </form>
76
    </div>
77
</div>
78
</div>
79
<div class="yui-b">
80
[% IF ( count ) %]<form method="get" action="payment.pl">
81
    <fieldset class="brief">
82
    <h4>Filter</h4>
83
        <ol>
84
            <li> <input type="hidden" name="booksellerid" value="[% booksellerid %]" /></li>
85
            <li><label for="filter">Invoice number:</label><input type="text" size="20" name="filter" value="[% filter %]" id="filter" /></li>
86
            <li><label for="chequeno">Chq No./DD No:</label><input type="text" size="20" name="chequeno" value="[% chequeno %]" id="chequeno" /></li>               
87
            <li><label for="orderby">Sort by :</label><select name="orderby" id="orderby">
88
                <option value="aqpayments.booksellerinvoicenumber">Invoice number</option>
89
                <option value="aqpayments.chequeno">Chq No./DD No number</option>
90
                <option value="aqpayments.booksellerinvoicenumber desc"> Invoice number reverse</option>
91
                <option value="aqpayments.chequeno desc"> Chq No./DD No reverse</option>
92
                </select><br />
93
                <label for="resultsperpage">Results per page :</label><select name="resultsperpage" id="resultsperpage">
94
                <option value="20">20</option>
95
                <option value="30">30</option>
96
                <option value="50">50</option>
97
                <option value="100">100</option>
98
                </select></li>
99
        </ol>
100
        <fieldset class="action"><input type="submit" class="button" value="Filter" /> <a href="/cgi-bin/koha/acqui/payment.pl?booksellerid=[% booksellerid %]">Clear</a></fieldset>
101
    </fieldset>
102
</form>[% END %]
103
</div>
104
</div>
105
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/payments.tt (-1 / +128 lines)
Line 0 Link Here
0
- 
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( date ) %]
3
            Receipt summary for [% name %] [% IF ( chequeno ) %]invoice [% chequeno %][% END %] on [% formatteddatereceived %][% ELSE %]Receive orders from [% name %][% END %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'greybox.inc' %]
6
<script type="text/javascript">
7
function selectAll () {
8
    $(".selection").attr("checked", "checked");
9
}
10
function clearAll () {
11
    $(".selection").removeAttr("checked");
12
}
13
function checkCheckBoxes() {
14
    var checkedItems = $(".selection:checked");
15
    if ($(checkedItems).size() == 0) {
16
        alert('Please select atleast one order.');
17
        return false;
18
    } else{     
19
   return true;
20
   }
21
}
22
</script>
23
24
</head>
25
<body id="acq_payment" class="acq">
26
[% INCLUDE 'header.inc' %]
27
[% INCLUDE 'acquisitions-search.inc' %]
28
29
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo;  [% IF ( datereceived ) %]
30
            Payments summary for <i>[% name %]</i> [% IF ( chequeno ) %]<i>[ [% chequeno %] ]</i>[% END %] on <i>[% formatteddatereceived %]</i>
31
        [% ELSE %]
32
            Receive orders from [% name %]
33
        [% END %]</div>
34
35
<div id="doc3" class="yui-t2">
36
<div id="bd">
37
<div id="yui-main">
38
<div class="yui-b">
39
40
<div id="acqui_payment_summary">
41
<p><strong>Chq No./DD No:</strong> [% chequeno %] <strong>Received by:</strong> [% loggedinusername %] <strong>Transaction Date:</strong> [% formatteddatereceived %]</p>
42
</div>
43
<div id="acqui_payment_search">
44
<h3>Pending Payments</h3>
45
[% IF ( loop_orders ) %]<table id="pendingp">
46
47
<form id="myform" action="/cgi-bin/koha/acqui/payments.pl" method="post" onsubmit="return checkCheckBoxes();">
48
<input type="hidden" name="op" value="saveall" />
49
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
50
<input type="hidden" name="booksellerinvoicenumber" value="[% loop_order.booksellerinvoicenumber %]" />
51
<input type="hidden" name="chequeno" value="[% chequeno %]" />
52
<input type="hidden" name="notes" value="[% notes %]" />
53
<input type="hidden" name="date" value="[% datereceived %]" />
54
<div id="toolbar"><a href="#" onclick="selectAll(); return false;">Select All</a> |
55
<a href="#" onclick="clearAll(); return false;">Clear All</a></div>
56
<thead>
57
    <tr>
58
        <th>&nbsp;</th>  
59
        <th>Invoice Number</th>
60
        <th>Invoice Date</th>                        
61
    </tr>
62
</thead>
63
64
    <tbody class="filterclass">
65
        [% FOREACH loop_order IN loop_orders %]
66
        [% UNLESS ( loop.odd ) %]
67
            <tr class="highlight">
68
        [% ELSE %]
69
            <tr>
70
        [% END %]
71
        <td><input type="checkbox" class="selection" name="booksellerinvoicenumber" value="[% loop_order.booksellerinvoicenumber %]"/></td>
72
        <td>[% loop_order.booksellerinvoicenumber %]</td>
73
        <td>[% loop_order.datereceived %]</td>                       
74
    </tr>
75
        [% END %]
76
    </tbody>
77
     </table><br />
78
<input type="submit" value="Save"/>
79
   </form>
80
[% ELSE %]There are no pending payments.[% END %]
81
</div>
82
<div id="acqui_paymentlist">
83
    <h3>Already Paid</h3>
84
   [% IF ( loop_received ) %]
85
   <form action="/cgi-bin/koha/acqui/payments.pl" method="get" name="orderform">
86
    <table id="paymentt">
87
    <thead>
88
    <tr>
89
    <th>Invoice Number</th>
90
        <th>Chq No./DD No </th>                       
91
        <th>Transaction Date</th>                       
92
        <th>Notes</th> 
93
    </tr>
94
    </thead>
95
    <tbody class="filterclass">
96
    [% FOREACH loop_receive IN loop_received %]
97
        [% UNLESS ( loop.odd ) %]
98
            <tr class="highlight">
99
        [% ELSE %]
100
            <tr>
101
        [% END %]
102
                <td>[% loop_receive.booksellerinvoicenumber %]</a>
103
                <td>[% loop_receive.chequeno %]</td>                                
104
                <td>[% loop_receive.chequedate %]</td>                                
105
                <td>[% loop_receive.notes %]</td>
106
            </tr>
107
    [% END %]
108
    </tbody>
109
    </table>
110
    </form>
111
    [% ELSE %]There are no received payments.[% END %]
112
</div>
113
114
<form action="payment.pl?booksellerid=[% booksellerid %]" method="post">
115
    <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
116
    <fieldset class="action">
117
        <input type="submit" value="Finish Payment" />
118
    </fieldset>
119
</form>
120
121
</div>
122
</div>
123
<div class="yui-b">
124
[% INCLUDE 'acquisitions-menu.inc' %]
125
</div>
126
</div>
127
[% INCLUDE 'intranet-bottom.inc' %]
128
 

Return to bug 7908