Bugzilla – Attachment 67899 Details for
Bug 15685
Allow creation of items (AcqCreateItem) to be customizable per-basket
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15685: Implement needed changes in Koha::Edifact::Order
Bug-15685-Implement-needed-changes-in-KohaEdifactO.patch (text/plain), 2.61 KB, created by
Jonathan Druart
on 2017-10-10 20:47:25 UTC
(
hide
)
Description:
Bug 15685: Implement needed changes in Koha::Edifact::Order
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-10-10 20:47:25 UTC
Size:
2.61 KB
patch
obsolete
>From 0988b5bdbde714624dd15add7c73f1f36b518696 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 10 Nov 2016 14:01:37 +0000 >Subject: [PATCH] Bug 15685: Implement needed changes in Koha::Edifact::Order > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Edifact/Order.pm | 22 ++++++++++++++++++---- > 1 file changed, 18 insertions(+), 4 deletions(-) > >diff --git a/Koha/Edifact/Order.pm b/Koha/Edifact/Order.pm >index 03811284a5..05169a509c 100644 >--- a/Koha/Edifact/Order.pm >+++ b/Koha/Edifact/Order.pm >@@ -338,6 +338,8 @@ sub name_and_address { > sub order_line { > my ( $self, $linenumber, $orderline ) = @_; > >+ my $basket = Koha::Acquisition::Order->find( $orderline->ordernumber )->basket; >+ > my $schema = $self->{schema}; > if ( !$orderline->biblionumber ) > { # cannot generate an orderline without a bib record >@@ -374,7 +376,7 @@ sub order_line { > # we dont currently support this in koha > # GIR copy-related data > my @items; >- if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) { >+ if ( $basket->effective_create_items eq 'ordering' ) { > my @linked_itemnumbers = $orderline->aqorders_items; > > foreach my $item (@linked_itemnumbers) { >@@ -402,7 +404,15 @@ sub order_line { > if ( $orderline->order_vendornote ) { > $ol_fields->{servicing_instruction} = $orderline->order_vendornote; > } >- $self->add_seg( gir_segments( $ol_fields, @items ) ); >+ $self->add_seg( >+ gir_segments( >+ { >+ basket => $basket, >+ ol_fields => $ol_fields, >+ items => \@items >+ } >+ ) >+ ); > > # TBD what if #items exceeds quantity > >@@ -507,7 +517,11 @@ sub imd_segment { > } > > sub gir_segments { >- my ( $orderfields, @onorderitems ) = @_; >+ my ($params) = @_; >+ >+ my $basket = $params->{basket}; >+ my $orderfields = $params->{ol_fields}; >+ my @onorderitems = @{ $params->{items} }; > > my $budget_code = $orderfields->{budget_code}; > my @segments; >@@ -515,7 +529,7 @@ sub gir_segments { > foreach my $item (@onorderitems) { > my $seg = sprintf 'GIR+%03d', $sequence_no; > $seg .= add_gir_identity_number( 'LFN', $budget_code ); >- if ( C4::Context->preference('AcqCreateItem') eq 'ordering' ) { >+ if ( $basket->effective_create_items eq 'ordering' ) { > $seg .= > add_gir_identity_number( 'LLO', $item->homebranch->branchcode ); > $seg .= add_gir_identity_number( 'LST', $item->itype ); >-- >2.11.0
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 15685
:
47783
|
55094
|
55096
|
57390
|
57392
|
57395
|
57424
|
57425
|
57426
|
57427
|
64918
|
64919
|
64920
|
64921
|
64922
|
65119
|
65120
|
65121
|
65122
|
65895
|
65896
|
65897
|
65898
|
65899
|
65900
|
66119
|
66120
|
66121
|
66122
|
66123
|
66124
|
67638
|
67639
|
67640
|
67641
|
67642
|
67643
|
67644
|
67645
|
67646
|
67647
|
67689
|
67690
|
67691
|
67692
|
67693
|
67694
|
67695
|
67696
|
67697
|
67698
|
67884
|
67898
| 67899 |
67900
|
67901
|
67902
|
67903
|
67904
|
67905
|
67906
|
67907
|
67908
|
67909
|
67910
|
67911