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

(-)a/Koha/Acquisition/Order.pm (-1 / +2 lines)
Lines 77-82 sub store { Link Here
77
77
78
    # if these parameters are missing, we can't continue
78
    # if these parameters are missing, we can't continue
79
    for my $key (qw( basketno quantity biblionumber budget_id )) {
79
    for my $key (qw( basketno quantity biblionumber budget_id )) {
80
        next if $key eq 'biblionumber' && ($self->orderstatus // q{}) eq 'cancelled'; # cancelled order might have biblionumber NULL
80
        croak "Cannot insert order: Mandatory parameter $key is missing"
81
        croak "Cannot insert order: Mandatory parameter $key is missing"
81
          unless $self->$key;
82
          unless $self->$key;
82
    }
83
    }
Lines 158-163 sub cancel { Link Here
158
                    payload => { biblio => $biblio, reason => $error }
159
                    payload => { biblio => $biblio, reason => $error }
159
                }
160
                }
160
            ) if $error;
161
            ) if $error;
162
            $self->biblionumber(undef) unless $error; # constraint cleared biblionumber in db already
161
        }
163
        }
162
        else {
164
        else {
163
165
164
- 

Return to bug 32417