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

(-)a/Koha/Item.pm (-8 / +8 lines)
Lines 124-134 sub store { Link Here
124
        my %updated_columns = $self->_result->get_dirty_columns;
124
        my %updated_columns = $self->_result->get_dirty_columns;
125
        return $self->SUPER::store unless %updated_columns;
125
        return $self->SUPER::store unless %updated_columns;
126
126
127
        # Retreive the item for comparison if we need to
127
        # Retrieve the item for comparison if we need to
128
        my $pre_mod_item = $self->get_from_storage
128
        my $pre_mod_item = (
129
          if ( exists $updated_columns{itemlost}
129
                 exists $updated_columns{itemlost}
130
            or exists $updated_columns{withdrawn}
130
              or exists $updated_columns{withdrawn}
131
            or exists $updated_columns{damaged} );
131
              or exists $updated_columns{damaged}
132
        ) ? $self->get_from_storage : undef;
132
133
133
        # Update *_on  fields if needed
134
        # Update *_on  fields if needed
134
        # FIXME: Why not for AddItem as well?
135
        # FIXME: Why not for AddItem as well?
Lines 785-791 sub renewal_branchcode { Link Here
785
    $self->_set_found_trigger
786
    $self->_set_found_trigger
786
787
787
Finds the most recent lost item charge for this item and refunds the patron
788
Finds the most recent lost item charge for this item and refunds the patron
788
appropriatly, taking into account any payments or writeoffs already applied
789
appropriately, taking into account any payments or writeoffs already applied
789
against the charge.
790
against the charge.
790
791
791
Internal function, not exported, called only by Koha::Item->store.
792
Internal function, not exported, called only by Koha::Item->store.
Lines 837-843 sub _set_found_trigger { Link Here
837
    my $patron = Koha::Patrons->find( $accountline->borrowernumber );
838
    my $patron = Koha::Patrons->find( $accountline->borrowernumber );
838
    return $self
839
    return $self
839
      unless $patron;  # Patron has been deleted, nobody to credit the return to
840
      unless $patron;  # Patron has been deleted, nobody to credit the return to
840
                       # FIXME Should not we notify this somehwere
841
                       # FIXME Should not we notify this somewhere
841
842
842
    my $account = $patron->account;
843
    my $account = $patron->account;
843
844
844
- 

Return to bug 18501