|
Lines 427-432
sub NewSuggestion {
Link Here
|
| 427 |
my ($suggestion) = @_; |
427 |
my ($suggestion) = @_; |
| 428 |
|
428 |
|
| 429 |
$suggestion->{STATUS} = "ASKED" unless $suggestion->{STATUS}; |
429 |
$suggestion->{STATUS} = "ASKED" unless $suggestion->{STATUS}; |
|
|
430 |
$suggestion->{budgetid} ||= undef; |
| 430 |
|
431 |
|
| 431 |
my $rs = Koha::Database->new->schema->resultset('Suggestion'); |
432 |
my $rs = Koha::Database->new->schema->resultset('Suggestion'); |
| 432 |
return $rs->create($suggestion)->id; |
433 |
return $rs->create($suggestion)->id; |
|
Lines 449-454
sub ModSuggestion {
Link Here
|
| 449 |
my ($suggestion) = @_; |
450 |
my ($suggestion) = @_; |
| 450 |
return unless( $suggestion and defined($suggestion->{suggestionid}) ); |
451 |
return unless( $suggestion and defined($suggestion->{suggestionid}) ); |
| 451 |
|
452 |
|
|
|
453 |
$suggestion->{budgetid} ||= undef; |
| 454 |
|
| 452 |
my $rs = Koha::Database->new->schema->resultset('Suggestion')->find($suggestion->{suggestionid}); |
455 |
my $rs = Koha::Database->new->schema->resultset('Suggestion')->find($suggestion->{suggestionid}); |
| 453 |
my $status_update_table = 1; |
456 |
my $status_update_table = 1; |
| 454 |
eval { |
457 |
eval { |