From cd6e03e8769ad6f5bf8529f808c26166e785d3fa Mon Sep 17 00:00:00 2001 From: Amit Gupta Date: Mon, 10 Jun 2013 13:33:22 +0530 Subject: [PATCH 1/4] Bug 10412 - The ability to update Acquisitions with credit notes, with the option to link to an existing invoice. To Test: 1) Create a basket. 2) Create some orders underbakset and close the basket. 3) Receive the shipment give invoice number. 4) For entering creditnote against bookseller click on invoices link on left hand side. 5) Search invoice number,title,author,isbn etc. 6) Click on Credit note link. 7) Enter credit amount, date, notes etc and click on Save button. 8) You can edit and delete also. --- C4/Budgets.pm | 13 ++ C4/Creditnote.pm | 148 ++++++++++++++++++++ acqui/acqui-home.pl | 18 ++- acqui/creditnote.pl | 120 ++++++++++++++++ acqui/editcreditnote.pl | 103 ++++++++++++++ admin/aqbudgets.pl | 19 ++- .../prog/en/modules/acqui/acqui-home.tt | 3 + .../prog/en/modules/acqui/creditnote.tt | 132 +++++++++++++++++ .../prog/en/modules/acqui/editcreditnote.tt | 63 +++++++++ .../prog/en/modules/acqui/invoices.tt | 2 + .../prog/en/modules/admin/aqbudgets.tt | 5 +- 11 files changed, 615 insertions(+), 11 deletions(-) create mode 100644 C4/Creditnote.pm create mode 100755 acqui/creditnote.pl create mode 100755 acqui/editcreditnote.pl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/acqui/creditnote.tt create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/acqui/editcreditnote.tt diff --git a/C4/Budgets.pm b/C4/Budgets.pm index 2c78284..58b6584 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -41,6 +41,7 @@ BEGIN { &DelBudget &GetBudgetSpent &GetBudgetOrdered + &GetBudgetCredited &GetBudgetName &GetPeriodsCount &GetChildBudgetsSpent @@ -357,6 +358,18 @@ sub GetBudgetOrdered { return $sum; } +# ------------------------------------------------------------------- +sub GetBudgetCredited { + my ($budget_id) = @_; + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare(qq| + SELECT SUM(amountcredit) AS sum FROM aqcreditnotes + WHERE budget_id = ? + |); + $sth->execute($budget_id); + return $sth->fetchrow_array; +} + =head2 GetBudgetName my $budget_name = &GetBudgetName($budget_id); diff --git a/C4/Creditnote.pm b/C4/Creditnote.pm new file mode 100644 index 0000000..098a1d9 --- /dev/null +++ b/C4/Creditnote.pm @@ -0,0 +1,148 @@ +package C4::Creditnote; + +# Copyright 2013 Amit Gupta (amitddng135@gmail.com) +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + +use strict; +use warnings; +use C4::Context; + +use vars qw($VERSION @ISA @EXPORT); + +BEGIN { + # set the version for version checking + $VERSION = 3.07.00.049; + require Exporter; + @ISA = qw(Exporter); + @EXPORT = qw( + &AddCreditnote &ModCreditnote &Creditnote &ShowCreditnoteid + &DelCreditnote + + ); +} + + +=head3 AddCreditnote + +Create a new creditnote and return its id. + +=cut + +sub AddCreditnote { + my ($booksellerid, $invoiceid, $vendorrefid, $amountcredit, $creditdate, $notes, $budget_id) = @_; + my $dbh = C4::Context->dbh; + my $query = qq| + INSERT INTO aqcreditnotes + (booksellerid, invoiceid, vendorrefid, amountcredit, creditdate, notes, budget_id) + VALUES (?,?,?,?,?,?,?) |; + + my $sth = $dbh->prepare($query); + $sth->execute( $booksellerid,$invoiceid,$vendorrefid,$amountcredit,$creditdate,$notes,$budget_id); +} + +=head3 ModCreditnote + +Modify an creditnote, creditnote_id is mandatory. + +Return undef if it fails. + +=cut + +sub ModCreditnote { + my ($vendorrefid,$amountcredit,$creditdate,$notes,$budget_id,$creditnote_id) = @_; + my $dbh = C4::Context->dbh; + my $query = qq| + UPDATE aqcreditnotes + SET vendorrefid = ?, amountcredit = ?, creditdate = ?, notes = ?, budget_id = ? + WHERE creditnote_id=? + |; + my $sth = $dbh->prepare($query); + $sth->execute($vendorrefid,$amountcredit,$creditdate,$notes,$budget_id,$creditnote_id); +} + +=head3 Creditnote + +Show all results against booksellerid and invoiceid + +=cut + +sub Creditnote { + my ($booksellerid, $invoiceid) = @_; + my $dbh = C4::Context->dbh; + my $query = qq| + SELECT * FROM aqcreditnotes + WHERE booksellerid = ? AND invoiceid = ? + |; + my $sth = $dbh->prepare($query); + my @results; + $sth->execute($booksellerid, $invoiceid); + return $sth->fetchall_arrayref( {} ); +} + +=head3 ShowCreditnoteid + +Show particular result against creditnote_id + +=cut + +sub ShowCreditnoteid { + my ($creditnote_id) = @_; + my $dbh = C4::Context->dbh; + my $query = " + SELECT * FROM aqcreditnotes + WHERE creditnote_id = ? + "; + my $sth=$dbh->prepare($query); + $sth->execute($creditnote_id); + return $sth->fetchrow_hashref; +} + +=head3 DelCreditnote + + &DelCreditnote($creditnote_id,$booksellerid,$invoiceid); + +Deletes the creditnote that has creditnote_id field $creditnote_id in the aqcreditnotes table. + +=over + +=item C<$creditnote_id> is the primary key of the creditnote in the aqcreditnotes table. + +=back + +=cut + +sub DelCreditnote { + my ($creditnote_id,$booksellerid,$invoiceid) = @_; + my $dbh = C4::Context->dbh; + my $query = qq| + DELETE FROM aqcreditnotes + WHERE creditnote_id = ? AND booksellerid = ? AND invoiceid = ? + |; + my $sth = $dbh->prepare($query); + $sth->execute($creditnote_id,$booksellerid,$invoiceid); + $sth->finish; +} + +1; +__END__ + +=head1 AUTHOR + +Amit Gupta + +=cut \ No newline at end of file diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index 5688452..41d0d1d 100755 --- a/acqui/acqui-home.pl +++ b/acqui/acqui-home.pl @@ -85,11 +85,13 @@ my $totspent = 0; my $totordered = 0; my $totcomtd = 0; my $totavail = 0; +my $totcredit = 0; my $total_active = 0; my $totspent_active = 0; my $totordered_active = 0; my $totavail_active = 0; +my $totavail_credit = 0; my @budget_loop; foreach my $budget ( @{$budget_arr} ) { @@ -112,29 +114,35 @@ foreach my $budget ( @{$budget_arr} ) { } $budget->{'budget_ordered'} = GetBudgetOrdered( $budget->{'budget_id'} ); - $budget->{'budget_spent'} = GetBudgetSpent( $budget->{'budget_id'} ); + $budget->{'budget_spent'} = GetBudgetSpent( $budget->{'budget_id'} ); + $budget->{'budget_credit'} = GetBudgetCredited( $budget->{'budget_id'} ); if ( !defined $budget->{budget_spent} ) { $budget->{budget_spent} = 0; } if ( !defined $budget->{budget_ordered} ) { $budget->{budget_ordered} = 0; } + if ( !defined $budget->{budget_credit} ) { + $budget->{budget_credit} = 0; + } $budget->{'budget_avail'} = - $budget->{'budget_amount'} - ( $budget->{'budget_spent'} + $budget->{'budget_ordered'} ); + ($budget->{'budget_amount'} + $budget->{'budget_credit'})- ( $budget->{'budget_spent'} + $budget->{'budget_ordered'} ); $total += $budget->{'budget_amount'}; $totspent += $budget->{'budget_spent'}; $totordered += $budget->{'budget_ordered'}; $totavail += $budget->{'budget_avail'}; + $totcredit += $budget->{'budget_credit'}; if ($budget->{budget_period_active}){ $total_active += $budget->{'budget_amount'}; $totspent_active += $budget->{'budget_spent'}; $totordered_active += $budget->{'budget_ordered'}; $totavail_active += $budget->{'budget_avail'}; + $totavail_credit += $budget->{'budget_credit'}; } - for my $field (qw( budget_amount budget_spent budget_ordered budget_avail ) ) { + for my $field (qw( budget_amount budget_spent budget_ordered budget_avail budget_credit ) ) { $budget->{$field} = $num_formatter->format_price( $budget->{$field} ); } @@ -150,10 +158,12 @@ $template->param( totordered => $num_formatter->format_price($totordered), totcomtd => $num_formatter->format_price($totcomtd), totavail => $num_formatter->format_price($totavail), - total_active => $num_formatter->format_price($total_active), + totcredit => $num_formatter->format_price($totcredit), + total_active => $num_formatter->format_price($total_active), totspent_active => $num_formatter->format_price($totspent_active), totordered_active => $num_formatter->format_price($totordered_active), totavail_active => $num_formatter->format_price($totavail_active), + totavail_credit => $num_formatter->format_price($totavail_credit), suggestions_count => $suggestions_count, ); diff --git a/acqui/creditnote.pl b/acqui/creditnote.pl new file mode 100755 index 0000000..79f4b90 --- /dev/null +++ b/acqui/creditnote.pl @@ -0,0 +1,120 @@ +#!/usr/bin/perl + +# Copyright 2013 Amit Gupta(amitddng135@gmail.com) +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +=head1 NAME + +creditnote.pl + +=head1 DESCRIPTION + +creditnote details + +=cut + +use strict; +use warnings; + +use CGI; +use C4::Auth; +use C4::Output; +use C4::Acquisition; +use C4::Bookseller qw/GetBookSellerFromId/; +use C4::Creditnote; +use C4::Budgets; +use C4::Dates qw/format_date format_date_in_iso/; + +my $input = new CGI; +my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( + { + template_name => 'acqui/creditnote.tmpl', + query => $input, + type => 'intranet', + authnotrequired => 0, + flagsrequired => { 'acquisition' => '*' }, + debug => 1, + } +); + +my $invoiceid = $input->param('invoiceid'); +my $booksellerid = $input->param('booksellerid'); +my $vendorrefid = $input->param('vendorrefid'); +my $amountcredit = $input->param('amountcredit'); +my $budget_id = $input->param('budget_id') || 0; +my $creditdate = C4::Dates->new($input->param('creditdate'))->output('iso'); +my $notes = $input->param('notes'); +my $creditnote_id = $input->param('creditnote_id'); +my $op = $input->param('op'); + +my $details = GetInvoiceDetails($invoiceid); +my $bookseller = GetBookSellerFromId($booksellerid); + +# build budget list +my $budget_loop = []; +my $budgets = GetBudgetHierarchy; +foreach my $r (@{$budgets}) { + push @{$budget_loop}, { + b_id => $r->{budget_id}, + b_txt => $r->{budget_name}, + b_active => $r->{budget_period_active}, + b_sel => ( $r->{budget_id} == $budget_id ) ? 1 : 0, + }; +} + +@{$budget_loop} = + sort { uc( $a->{b_txt}) cmp uc( $b->{b_txt}) } @{$budget_loop}; + +my $script_name = "/cgi-bin/koha/acqui/creditnote.pl?booksellerid=$booksellerid&invoiceid=$invoiceid"; + +my $results = Creditnote($booksellerid, $invoiceid); +my @creditloop = (); +foreach my $credit (@$results) { + my $budget_name = GetBudget($credit->{'budget_id'}); + push @creditloop, { + creditnote_id => $credit->{'creditnote_id'}, + vendorrefid => $credit->{'vendorrefid'}, + amountcredit => sprintf( "%.2f", $credit->{'amountcredit'}), + creditdate => format_date($credit->{'creditdate'}), + notes => $credit->{'notes'}, + budget => $budget_name->{'budget_name'}, + }; + } + + +if ($op eq 'add'){ + AddCreditnote($booksellerid, $invoiceid, $vendorrefid, $amountcredit, $creditdate, $notes, $budget_id); + print $input->redirect($script_name); + exit; +} + +if ($op eq 'delete'){ + DelCreditnote($creditnote_id,$booksellerid,$invoiceid); + print $input->redirect($script_name); + exit; +} + +$template->param( + invoiceid => $invoiceid, + invoicenumber => $details->{'invoicenumber'}, + suppliername => $bookseller->{'name'}, + booksellerid => $booksellerid, + creditloop => \@creditloop, + budget_loop => $budget_loop, +); + + +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/acqui/editcreditnote.pl b/acqui/editcreditnote.pl new file mode 100755 index 0000000..a8fef32 --- /dev/null +++ b/acqui/editcreditnote.pl @@ -0,0 +1,103 @@ +#!/usr/bin/perl + +# Copyright 2013 Amit Gupta(amitddng135@gmail.com) +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +=head1 NAME + +creditnote.pl + +=head1 DESCRIPTION + +creditnote details + +=cut + +use strict; +use warnings; + +use CGI; +use C4::Auth; +use C4::Output; +use C4::Acquisition; +use C4::Bookseller qw/GetBookSellerFromId/; +use C4::Creditnote; +use C4::Budgets; +use C4::Dates qw/format_date format_date_in_iso/; + +my $input = new CGI; +my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( + { + template_name => 'acqui/editcreditnote.tmpl', + query => $input, + type => 'intranet', + authnotrequired => 0, + flagsrequired => { 'acquisition' => '*' }, + debug => 1, + } +); + +my $invoiceid = $input->param('invoiceid'); +my $booksellerid = $input->param('booksellerid'); +my $creditnote_id = $input->param('creditnote_id'); +my $vendorrefid = $input->param('vendorrefid'); +my $amountcredit = $input->param('amountcredit'); +my $budget_id = $input->param('budget_id'); +my $creditdate = C4::Dates->new($input->param('creditdate'))->output('iso'); +my $notes = $input->param('notes'); + +my $op = $input->param('op'); + +my $creditdetail = &ShowCreditnoteid($creditnote_id); +my $details = GetInvoiceDetails($invoiceid); +my $bookseller = GetBookSellerFromId($booksellerid); + +# build budget list +my $budget_loop = []; +my $budgets = GetBudgetHierarchy; +foreach my $r (@{$budgets}) { + push @{$budget_loop}, { + b_id => $r->{budget_id}, + b_txt => $r->{budget_name}, + b_active => $r->{budget_period_active}, + b_sel => ( $r->{budget_id} == $creditdetail->{'budget_id'} ) ? 1 : 0, + }; +} + +@{$budget_loop} = + sort { uc( $a->{b_txt}) cmp uc( $b->{b_txt}) } @{$budget_loop}; + +if ($op eq 'edit'){ + ModCreditnote($vendorrefid, $amountcredit, $creditdate,$notes,$budget_id, $creditnote_id); + print $input->redirect("/cgi-bin/koha/acqui/creditnote.pl?booksellerid=$booksellerid&invoiceid=$invoiceid"); + exit; + } + +$template->param( + invoiceid => $invoiceid, + invoicenumber => $details->{'invoicenumber'}, + suppliername => $bookseller->{'name'}, + booksellerid => $booksellerid, + creditnote_id => $creditnote_id, + amountcredit => sprintf("%.2f",$creditdetail->{'amountcredit'}), + creditdate => format_date($creditdetail->{'creditdate'}), + vendorrefid => $creditdetail->{'vendorrefid'}, + notes => $creditdetail->{'notes'}, + budget_loop => $budget_loop, +); + + +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl index f7dcc75..07c22a1 100755 --- a/admin/aqbudgets.pl +++ b/admin/aqbudgets.pl @@ -276,14 +276,14 @@ if ($op eq 'add_form') { my $toggle = 0; my @loop; my $period_total = 0; - my ( $period_alloc_total, $base_spent_total ); + my ( $period_alloc_total, $base_spent_total, $base_credit_total); #This Looks WEIRD to me : should budgets be filtered in such a way ppl who donot own it would not see the amount spent on the budget by others ? foreach my $budget (@budgets) { #Level and sublevels total spent - $budget->{'total_levels_spent'} = GetChildBudgetsSpent($budget->{"budget_id"}); - + $budget->{'total_levels_spent'} = GetChildBudgetsSpent($budget->{"budget_id"}); + $budget->{'budget_credit'} = GetBudgetCredited($budget->{"budget_id"}); # PERMISSIONS unless(CanUserModifyBudget($borrowernumber, $budget, $staffflags)) { $budget->{'budget_lock'} = 1; @@ -303,7 +303,8 @@ if ($op eq 'add_form') { # adds to total - only if budget is a 'top-level' budget $period_alloc_total += $budget->{'budget_amount_total'} if $budget->{'depth'} == 0; $base_spent_total += $budget->{'budget_spent'}; - $budget->{'budget_remaining'} = $budget->{'budget_amount'} - $budget->{'total_levels_spent'}; + $base_credit_total += $budget->{'budget_credit'}; + $budget->{'budget_remaining'} = ($budget->{'budget_amount'} + $budget->{'budget_credit'}) - $budget->{'total_levels_spent'}; # if amount == 0 dont display... delete $budget->{'budget_unalloc_sublevel'} @@ -312,13 +313,14 @@ if ($op eq 'add_form') { $budget->{'remaining_pos'} = 1 if $budget->{'budget_remaining'} > 0; $budget->{'remaining_neg'} = 1 if $budget->{'budget_remaining'} < 0; - for (grep {/total_levels_spent|budget_spent|budget_amount|budget_remaining|budget_unalloc/} keys %$budget){ + for (grep {/total_levels_spent|budget_spent|budget_amount|budget_remaining|budget_unalloc|budget_credit/} keys %$budget){ $budget->{$_} = $num->format_price( $budget->{$_} ) if defined($budget->{$_}) } # Value of budget_spent equals 0 instead of undefined value $budget->{"budget_spent"} = $num->format_price(0) unless defined($budget->{"budget_spent"}); - + $budget->{"budget_credit"} = $num->format_price(0) unless defined($budget->{"budget_credit"}); + my $borrower = &GetMember( borrowernumber=>$budget->{budget_owner_id} ); $budget->{"budget_owner_name"} = $borrower->{'firstname'} . ' ' . $borrower->{'surname'}; $budget->{"budget_borrowernumber"} = $borrower->{'borrowernumber'}; @@ -355,6 +357,10 @@ if ($op eq 'add_form') { if ($base_spent_total) { $base_spent_total = $num->format_price($base_spent_total); } + + if ($base_credit_total) { + $base_credit_total = $num->format_price($base_credit_total); + } $template->param( else => 1, @@ -362,6 +368,7 @@ if ($op eq 'add_form') { budget_period_total => $budget_period_total, period_alloc_total => $period_alloc_total, base_spent_total => $base_spent_total, + base_credit_total => $base_credit_total, branchloop => \@branchloop2, ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt index 34aa8e9..361551f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -120,6 +120,7 @@ $(document).ready(function() { Amount Ordered Spent + Credited Avail @@ -133,6 +134,7 @@ $(document).ready(function() { [% total %][% total_active %] [% totordered %][% totordered_active %] [% totspent %][% totspent_active %] + [% totavail_credit %][% totavail_credit %] [% totavail %][% totavail_active %] @@ -159,6 +161,7 @@ $(document).ready(function() { [% loop_budge.budget_amount %] [% loop_budge.budget_ordered %] [% loop_budge.budget_spent %] + [% loop_budge.budget_credit %] [% loop_budge.budget_avail %] [% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/creditnote.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/creditnote.tt new file mode 100644 index 0000000..1519d1e --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/creditnote.tt @@ -0,0 +1,132 @@ +[% USE KohaDates %] + +[% INCLUDE 'doc-head-open.inc' %] +Koha › Acquisitions › Invoice +[% INCLUDE 'doc-head-close.inc' %] +[% INCLUDE 'calendar.inc' %] + + +[% INCLUDE 'datatables-strings.inc' %] + + + + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'acquisitions-search.inc' %] + + + + +
+ +
+
+
+ [% IF ( modified ) %] +
+

Invoice has been modified

+
+ [% END %] +

Invoice: [% invoicenumber %]

+

Vendor: [% suppliername %]

+
+ + + +
+
    +
  1. [% invoicenumber %]
  2. +
  3. [% suppliername %]
  4. +
  5. +
  6. +
  7. + +
  8. +
  9. +
  10. +
  11. +
  12. +
  13. + + +
+
+ +
+
+

Credit details

+ [% IF creditloop.size %] + + + + + + + + + + + + + [% FOREACH credit IN creditloop %] + + + + + + + + + + + [% END %] +
Vendor reference idAmount creditCredit dateBudgetNotes
[% credit.vendorrefid %][% credit.amountcredit %][% credit.creditdate %][% credit.budget %][% credit.notes %]EditDelete
+ [% ELSE %] +

No credit details yet

+ [% END %] +
+
+
+ [% INCLUDE 'acquisitions-menu.inc' %] +
+
+[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/editcreditnote.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/editcreditnote.tt new file mode 100644 index 0000000..a39c2a6 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/editcreditnote.tt @@ -0,0 +1,63 @@ +[% USE KohaDates %] +[% INCLUDE 'doc-head-open.inc' %] +Koha › Acquisitions › Creditnote +[% INCLUDE 'doc-head-close.inc' %] +[% INCLUDE 'calendar.inc' %] + + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'acquisitions-search.inc' %] + + + +
+ +
+
+
+

Invoice: [% invoicenumber %]

+

Vendor: [% suppliername %]

+
+ + + + +
+
    +
  1. [% invoicenumber %]
  2. +
  3. [% suppliername %]
  4. +
  5. +
  6. +
  7. + +
  8. +
  9. +
  10. +
  11. +
  12. +
  13. + +
+
+ +
+
+
+
+
+ [% INCLUDE 'acquisitions-menu.inc' %] +
+
+[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt index 52d2ecc..698f14f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt @@ -50,6 +50,7 @@ $(document).ready(function() { Billing date Received biblios Received items + Creditnote Status   @@ -66,6 +67,7 @@ $(document).ready(function() { [% invoice.receivedbiblios %] [% invoice.receiveditems %] + Credit note [% IF invoice.closedate %] Closed on [% invoice.closedate | $KohaDates %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt index 7df04f3..0e324c8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt @@ -239,8 +239,9 @@ Fund name Total
allocated Base-level
allocated - Base-level
spent + Base-level
spent Total sublevels
spent + Base-level
credited Base-level
remaining   Actions @@ -253,6 +254,7 @@ [% base_alloc_total %] [% base_spent_total %] [% base_spent_total %] + [% base_credit_total %] [% base_remaining_total %] @@ -272,6 +274,7 @@ [% budge.budget_amount %] [% budge.budget_spent %] [% budge.total_levels_spent %] + [% budge.budget_credit %] [% IF ( budge.remaining_pos ) %] [% ELSIF ( budge.remaining_neg ) %] -- 1.7.9.5