[Koha-patches] [PATCH] fix for #2440 : acquisition recieve & item creation

Joshua Ferraro jmf at liblime.com
Fri Aug 8 13:43:48 CEST 2008


Hi Paul, Ryan,

What's the status on 2440 and 2351? can they be closed FIXED, if not,
are the must-fix prior to 3.0 (today)?

Josh

On Fri, Aug 01, 2008 at 09:28:25PM -0400, Ryan Higgins wrote:
> Hi Paul.
> 
> I think I understand your intent here:  to allow a separation of item
> creation from receiving (billing/acq).
> 
> A recent patch I submitted for this page and its successor in normal
> workflow ( parcel.pl )
> reports errors on any item records that were not created in the receiving
> step.
> 
> Your patch removes the capacity to receive multiple items, which is
> definitely not desired.
> All you should have to do  alter the " if( $quantityrec > 0 ) " conditional.
> 
> The question that needs to be answered is 'what is the appropriate behavior
> if item records are not
> created?' :
> 
> I think the answer is this:
> 1: (required)  allow the user to manually edit 'quantity received'
> (currently read-only field).
> 2: (optional)  add an onchange for 'quantity received' to show enough item
> record divs to add the holdings data if we have it.
> 3: (required)  add an onsubmit form checker that tests the number of unique
> barcodes against the number in 'quantity received',
>     and tells the user that if they say ok, item records will _not_ be
> created, but the acq module will register that the items
>     were received.  Most of this js code is already in place.
> 
> From my understanding, I think this will meet the needs that you express
> with this patch without breaking the expected
> behavior on our side.  Let me know if I was not sufficiently clear,
> misinterpreted your needs, or if you cannot accept the
> extra button click to verify that it's okay to modify the acq record without
> adding the holdings record(s).
> 
> Ryan
> 
> 
> 
> On Thu, Jul 31, 2008 at 8:19 AM, <paul.poulain at biblibre.com> wrote:
> 
> > From: Paul POULAIN <paul.poulain at biblibre.com>
> >
> > It has to be reintroduced, as some (most in France) libraries don't create
> > items on recieve, but after "equipment" step.
> > ---
> >  acqui/finishreceive.pl |   58
> > ++++++++++++++++++++++++-----------------------
> >  1 files changed, 30 insertions(+), 28 deletions(-)
> >
> > diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl
> > index 8cf8d4f..8cb5bf2 100755
> > --- a/acqui/finishreceive.pl
> > +++ b/acqui/finishreceive.pl
> > @@ -59,34 +59,36 @@ my $error_url_str;
> >
> >  if ($quantityrec > $origquantityrec ) {
> >        foreach my $bc (@barcode) {
> > -               my $item_hash = {
> > -                    "items.replacementprice" => $replacement,
> > -                    "items.price"            => $cost,
> > -                    "items.booksellerid"     => $supplierid,
> > -                    "items.homebranch"       => $branch[$cnt],
> > -                    "items.holdingbranch"    => $branch[$cnt],
> > -                    "items.barcode"          => $barcode[$cnt],
> > -                    "items.ccode"          => $ccode[$cnt],
> > -                    "items.itype"          => $itemtype[$cnt],
> > -                    "items.location"          => $location[$cnt],
> > -                    "items.enumchron"          => $enumchron[$cnt], #
> > FIXME : No integration here with serials module.
> > -                    "items.loan"             => 0,
> > -                                       };
> > -               $item_hash->{'items.cn_source'} =
> > C4::Context->preference('DefaultClassificationSource')
> > if(C4::Context->preference('DefaultClassificationSource') );
> > -               # FIXME : cn_sort is populated by
> > Items::_set_derived_columns_for_add , which is never called with
> > AddItemFromMarc .  Bug 2403
> > -        my $itemRecord = TransformKohaToMarc($item_hash);
> > -               $cnt++;
> > -               $item_hash =
> > TransformMarcToKoha(undef,$itemRecord,'','items');
> > -               # FIXME: possible race condition.  duplicate barcode check
> > should happen in AddItem, but for now we have to do it here.
> > -               my %err = CheckItemPreSave($item_hash);
> > -               if(%err) {
> > -                       for my $err_cnd (keys %err) {
> > -                               $error_url_str .= "&error=" . $err_cnd .
> > "&error_param=" . $err{$err_cnd};
> > -                       }
> > -                       $quantityrec--;
> > -               } else {
> > -                       AddItemFromMarc($itemRecord,$biblionumber);
> > -               }
> > +        if ($bc) {
> > +            my $item_hash = {
> > +                        "items.replacementprice" => $replacement,
> > +                        "items.price"            => $cost,
> > +                        "items.booksellerid"     => $supplierid,
> > +                        "items.homebranch"       => $branch[$cnt],
> > +                        "items.holdingbranch"    => $branch[$cnt],
> > +                        "items.barcode"          => $barcode[$cnt],
> > +                        "items.ccode"          => $ccode[$cnt],
> > +                        "items.itype"          => $itemtype[$cnt],
> > +                        "items.location"          => $location[$cnt],
> > +                        "items.enumchron"          => $enumchron[$cnt], #
> > FIXME : No integration here with serials module.
> > +                        "items.loan"             => 0,
> > +                        };
> > +            $item_hash->{'items.cn_source'} =
> > C4::Context->preference('DefaultClassificationSource')
> > if(C4::Context->preference('DefaultClassificationSource') );
> > +            # FIXME : cn_sort is populated by
> > Items::_set_derived_columns_for_add , which is never called with
> > AddItemFromMarc .  Bug 2403
> > +            my $itemRecord = TransformKohaToMarc($item_hash);
> > +            $cnt++;
> > +            $item_hash =
> > TransformMarcToKoha(undef,$itemRecord,'','items');
> > +            # FIXME: possible race condition.  duplicate barcode check
> > should happen in AddItem, but for now we have to do it here.
> > +            my %err = CheckItemPreSave($item_hash);
> > +            if(%err) {
> > +                for my $err_cnd (keys %err) {
> > +                    $error_url_str .= "&error=" . $err_cnd .
> > "&error_param=" . $err{$err_cnd};
> > +                }
> > +                $quantityrec--;
> > +            } else {
> > +                AddItemFromMarc($itemRecord,$biblionumber);
> > +            }
> > +        }
> >        }
> >
> >     # save the quantity received.
> > --
> > 1.5.3.2
> >
> > _______________________________________________
> > Koha-patches mailing list
> > Koha-patches at lists.koha.org
> > http://lists.koha.org/mailman/listinfo/koha-patches
> >
> 
> 
> 
> -- 
> Ryan Higgins
> 
> LibLime * Open-Source Solutions for Libraries
> Featuring KohaZOOM ILS
> 888-564-2457 x704

> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha.org
> http://lists.koha.org/mailman/listinfo/koha-patches




More information about the Koha-patches mailing list