Bugzilla – Attachment 10932 Details for
Bug 8456
Capture the invoice number, price, date of a subscription
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Capture the invoice number, price, date of a subscription
0002-Bug-8456-Capture-the-invoice-number-price-date-of-a-.patch (text/plain), 4.93 KB, created by
Amit Gupta
on 2012-07-18 12:01:56 UTC
(
hide
)
Description:
Capture the invoice number, price, date of a subscription
Filename:
MIME Type:
Creator:
Amit Gupta
Created:
2012-07-18 12:01:56 UTC
Size:
4.93 KB
patch
obsolete
>From b5b84d83e7c9c0c42f4800d2f0b601c6ac076a9c Mon Sep 17 00:00:00 2001 >From: Amit Gupta <amit.gupta@osslabs.biz> >Date: Wed, 18 Jul 2012 17:17:47 +0530 >Subject: [PATCH 2/2] Bug 8456 - Capture the invoice number, price, date of a subscription > >To Test: >Create an order using a subscription. This order is different from regular orders in that it is for a serial subscription, not for a book. >When receiving, the item add function does not work as it does in the case of books. Here no item is added since items are added from serials module. But invoice, invoice date, actual cost is captured when receiving. > >Two cases here: >1) Systempreferences "AcqCreateItem" is set to "receiving an order" > When receiving this message is displayed instead of the usual add item fields -- "This order is for a serial subscription. Items are added in the serial module." >2) Systempreferences "AcqCreateItem" is set to "placing an order" >When ordering this message is displayed instead of the usual add item fields -- "This order is for a serial subscription. Items are added in the serial module." >--- > acqui/neworderempty.pl | 12 ++++++++---- > acqui/orderreceive.pl | 8 +++++++- > .../prog/en/modules/acqui/neworderempty.tt | 5 +++++ > .../prog/en/modules/acqui/orderreceive.tt | 4 ++++ > 4 files changed, 24 insertions(+), 5 deletions(-) > >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index 85d9739..69f6916 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -317,10 +317,14 @@ if (C4::Context->preference('AcqCreateItem') eq 'ordering' && !$ordernumber) { > unless($marc) { > $template->param('NoACQframework' => 1); > } >- $template->param( >- AcqCreateItemOrdering => 1, >- UniqueItemFields => C4::Context->preference('UniqueItemFields'), >- ); >+ unless($subscriptionid){ >+ $template->param( >+ AcqCreateItemOrdering => 1, >+ UniqueItemFields => C4::Context->preference('UniqueItemFields'), >+ ); >+ } else { >+ $template->param( subscription => 1,); >+ } > } > # Get the item types list, but only if item_level_itype is YES. Otherwise, it will be in the item, no need to display it in the biblio > my @itemtypes; >diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl >index 85168d5..aa28a59 100755 >--- a/acqui/orderreceive.pl >+++ b/acqui/orderreceive.pl >@@ -93,6 +93,8 @@ my $datereceived = $input->param('datereceived'); > $datereceived = $datereceived ? C4::Dates->new($datereceived, 'iso') : C4::Dates->new(); > > my $bookseller = GetBookSellerFromId($booksellerid); >+my $sub = GetOrder($ordernumber); >+my $subscriptionid = $sub->{'subscriptionid'}; > my $input_gst = ($input->param('gst') eq '' ? undef : $input->param('gst')); > my $gst= $input_gst // $bookseller->{gstrate} // C4::Context->preference("gist") // 0; > my $results = SearchOrder($ordernumber,$search); >@@ -121,10 +123,14 @@ if ( $count == 1 ) { > > my $AcqCreateItem = C4::Context->preference('AcqCreateItem'); > if ($AcqCreateItem eq 'receiving') { >- $template->param( >+ unless($subscriptionid){ >+ $template->param( > AcqCreateItemReceiving => 1, > UniqueItemFields => C4::Context->preference('UniqueItemFields'), > ); >+ } else { >+ $template->param( subscription => 1,); >+ } > } elsif ($AcqCreateItem eq 'ordering') { > my $fw = ($acq_fw) ? 'ACQ' : ''; > my @itemnumbers = GetItemnumbersFromOrder($order->{ordernumber}); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >index fd1a93f..57b8aae 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >@@ -383,6 +383,11 @@ $(document).ready(function() > > </fieldset> > [% END %][%# IF (AcqCreateItemOrdering) %] >+ [% IF (subscription) %] >+ <p class="required"> >+ This order is for a serial subscription. Items are added in the serial module. >+ </p> >+ [% END %] > <fieldset class="rows"> > <legend>Accounting Details</legend> > <ol> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >index 821dcd3..5f60aa2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -234,6 +234,10 @@ > </table> > </div> > [% END %] >+ [% ELSIF (subscription) %] >+ <p class="required"> >+ This order is for a serial subscription. Items are added in the serial module. >+ </p> > [% END %] > <input type="hidden" name="biblionumber" value="[% biblionumber %]" /> > <input type="hidden" name="ordernumber" value="[% ordernumber %]" /> >-- >1.6.4.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8456
: 10932