Lines 113-155
sub add_item {
Link Here
|
113 |
|
113 |
|
114 |
=head3 basket |
114 |
=head3 basket |
115 |
|
115 |
|
116 |
my $basket = Koha::Acquisition::Orders->find( $id )->basket; |
116 |
my $basket = $order->basket; |
117 |
|
117 |
|
118 |
Returns the basket associated to the order. |
118 |
Returns the I<Koha::Acquisition::Basket> object for the basket associated |
|
|
119 |
to the order. |
119 |
|
120 |
|
120 |
=cut |
121 |
=cut |
121 |
|
122 |
|
122 |
sub basket { |
123 |
sub basket { |
123 |
my ( $self ) = @_; |
124 |
my ( $self ) = @_; |
124 |
my $basket_rs = $self->_result->basketno; |
125 |
my $basket_rs = $self->_result->basket; |
125 |
return Koha::Acquisition::Basket->_new_from_dbic( $basket_rs ); |
126 |
return Koha::Acquisition::Basket->_new_from_dbic( $basket_rs ); |
126 |
} |
127 |
} |
127 |
|
128 |
|
128 |
=head3 fund |
129 |
=head3 fund |
129 |
|
130 |
|
130 |
my $fund = $order->fund |
131 |
my $fund = $order->fund; |
131 |
|
132 |
|
132 |
Returns the fund (aqbudgets) associated to the order. |
133 |
Returns the I<Koha::Acquisition::Fund> object for the fund (aqbudgets) |
|
|
134 |
associated to the order. |
133 |
|
135 |
|
134 |
=cut |
136 |
=cut |
135 |
|
137 |
|
136 |
sub fund { |
138 |
sub fund { |
137 |
my ( $self ) = @_; |
139 |
my ( $self ) = @_; |
138 |
my $fund_rs = $self->_result->budget; |
140 |
my $fund_rs = $self->_result->fund; |
139 |
return Koha::Acquisition::Fund->_new_from_dbic( $fund_rs ); |
141 |
return Koha::Acquisition::Fund->_new_from_dbic( $fund_rs ); |
140 |
} |
142 |
} |
141 |
|
143 |
|
142 |
=head3 invoice |
144 |
=head3 invoice |
143 |
|
145 |
|
144 |
my $invoice = $order->invoice |
146 |
my $invoice = $order->invoice; |
145 |
|
147 |
|
146 |
Returns the invoice associated to the order. |
148 |
Returns the I<Koha::Acquisition::Invoice> object for the invoice associated |
|
|
149 |
to the order. |
150 |
|
151 |
It returns B<undef> if no linked invoice is found. |
147 |
|
152 |
|
148 |
=cut |
153 |
=cut |
149 |
|
154 |
|
150 |
sub invoice { |
155 |
sub invoice { |
151 |
my ( $self ) = @_; |
156 |
my ( $self ) = @_; |
152 |
my $invoice_rs = $self->_result->invoiceid; |
157 |
my $invoice_rs = $self->_result->invoice; |
153 |
return unless $invoice_rs; |
158 |
return unless $invoice_rs; |
154 |
return Koha::Acquisition::Invoice->_new_from_dbic( $invoice_rs ); |
159 |
return Koha::Acquisition::Invoice->_new_from_dbic( $invoice_rs ); |
155 |
} |
160 |
} |
Lines 158-170
sub invoice {
Link Here
|
158 |
|
163 |
|
159 |
my $subscription = $order->subscription |
164 |
my $subscription = $order->subscription |
160 |
|
165 |
|
161 |
Returns the subscription associated to the order. |
166 |
Returns the I<Koha::Subscription> object for the subscription associated |
|
|
167 |
to the order. |
168 |
|
169 |
It returns B<undef> if no linked subscription is found. |
162 |
|
170 |
|
163 |
=cut |
171 |
=cut |
164 |
|
172 |
|
165 |
sub subscription { |
173 |
sub subscription { |
166 |
my ( $self ) = @_; |
174 |
my ( $self ) = @_; |
167 |
my $subscription_rs = $self->_result->subscriptionid; |
175 |
my $subscription_rs = $self->_result->subscription; |
168 |
return unless $subscription_rs; |
176 |
return unless $subscription_rs; |
169 |
return Koha::Subscription->_new_from_dbic( $subscription_rs ); |
177 |
return Koha::Subscription->_new_from_dbic( $subscription_rs ); |
170 |
} |
178 |
} |