View | Details | Raw Unified | Return to bug 24252
Collapse All | Expand All

(-)a/Koha/Account/Line.pm (-1 / +47 lines)
Lines 110-115 sub debit_type { Link Here
110
    return Koha::Account::DebitType->_new_from_dbic( $rs );
110
    return Koha::Account::DebitType->_new_from_dbic( $rs );
111
}
111
}
112
112
113
=head3 credit_offsets
114
  
115
  my $credit_offsets = $accountline->credit_offsets;
116
  my $credit_offsets = $accountline->credit_offsets( $cond, $attr);
117
118
Return the credit_offsets linked to this account line if some exist.
119
Search conditions and attributes may be passed if you wish to filter 
120
the resultant resultant resultset.
121
122
=cut
123
124
sub credit_offsets {
125
    my ( $self, $cond, $attr ) = @_;
126
    my $rs;
127
    if ( defined($cond) || defined($attr) ) {
128
        $rs =
129
          $self->_result->search_related( 'account_offsets_credits', $cond,
130
            $attr );
131
    }
132
    else {
133
        $rs = $self->_result->account_offsets_credits;
134
    }
135
    return unless $rs;
136
    return Koha::Account::Offsets->_new_from_dbic($rs);
137
}
138
139
=head3 debit_offsets
140
141
Return the debit_offsets linked to this account line if some exist
142
143
=cut
144
145
sub debit_offsets {
146
    my ( $self, $cond, $attr ) = @_;
147
    my $rs;
148
    if ( defined($cond) || defined($attr) ) {
149
        $rs =
150
          $self->_result->search_related( 'account_offsets_debits', $cond,
151
            $attr );
152
    }
153
    else {
154
        $rs = $self->_result->account_offsets_debits;
155
    }
156
    return unless $rs;
157
    return Koha::Account::Offsets->_new_from_dbic($rs);
158
}
159
113
=head3 void
160
=head3 void
114
161
115
  $payment_accountline->void();
162
  $payment_accountline->void();
116
- 

Return to bug 24252