Lines 86-98
if ( $method eq 'updateconfirm' and $houseboundprofile ) {
Link Here
|
86 |
# We have received the input from the profile edit form. We must save the |
86 |
# We have received the input from the profile edit form. We must save the |
87 |
# changes, and return to simple display. |
87 |
# changes, and return to simple display. |
88 |
$houseboundprofile->set({ |
88 |
$houseboundprofile->set({ |
89 |
day => $input->param('day') // q{}, |
89 |
day => scalar $input->param('day') // q{}, |
90 |
frequency => $input->param('frequency') // q{}, |
90 |
frequency => scalar $input->param('frequency') // q{}, |
91 |
fav_itemtypes => $input->param('fav_itemtypes') // q{}, |
91 |
fav_itemtypes => scalar $input->param('fav_itemtypes') // q{}, |
92 |
fav_subjects => $input->param('fav_subjects') // q{}, |
92 |
fav_subjects => scalar $input->param('fav_subjects') // q{}, |
93 |
fav_authors => $input->param('fav_authors') // q{}, |
93 |
fav_authors => scalar $input->param('fav_authors') // q{}, |
94 |
referral => $input->param('referral') // q{}, |
94 |
referral => scalar $input->param('referral') // q{}, |
95 |
notes => $input->param('notes') // q{}, |
95 |
notes => scalar $input->param('notes') // q{}, |
96 |
}); |
96 |
}); |
97 |
my $success = eval { return $houseboundprofile->store }; |
97 |
my $success = eval { return $houseboundprofile->store }; |
98 |
push @messages, { type => 'error', code => 'error_on_profile_store' } |
98 |
push @messages, { type => 'error', code => 'error_on_profile_store' } |
Lines 103-115
if ( $method eq 'updateconfirm' and $houseboundprofile ) {
Link Here
|
103 |
# save it, and return to simple display. |
103 |
# save it, and return to simple display. |
104 |
$houseboundprofile = Koha::Patron::HouseboundProfile->new({ |
104 |
$houseboundprofile = Koha::Patron::HouseboundProfile->new({ |
105 |
borrowernumber => $patron->borrowernumber, |
105 |
borrowernumber => $patron->borrowernumber, |
106 |
day => $input->param('day') // q{}, |
106 |
day => scalar $input->param('day') // q{}, |
107 |
frequency => $input->param('frequency') // q{}, |
107 |
frequency => scalar $input->param('frequency') // q{}, |
108 |
fav_itemtypes => $input->param('fav_itemtypes') // q{}, |
108 |
fav_itemtypes => scalar $input->param('fav_itemtypes') // q{}, |
109 |
fav_subjects => $input->param('fav_subjects') // q{}, |
109 |
fav_subjects => scalar $input->param('fav_subjects') // q{}, |
110 |
fav_authors => $input->param('fav_authors') // q{}, |
110 |
fav_authors => scalar $input->param('fav_authors') // q{}, |
111 |
referral => $input->param('referral') // q{}, |
111 |
referral => scalar $input->param('referral') // q{}, |
112 |
notes => $input->param('notes') // q{}, |
112 |
notes => scalar $input->param('notes') // q{}, |
113 |
}); |
113 |
}); |
114 |
my $success = eval { return $houseboundprofile->store }; |
114 |
my $success = eval { return $houseboundprofile->store }; |
115 |
push @messages, { type => 'error', code => 'error_on_profile_create' } |
115 |
push @messages, { type => 'error', code => 'error_on_profile_create' } |
Lines 130-140
if ( $method eq 'updateconfirm' and $houseboundprofile ) {
Link Here
|
130 |
# We have received input for editing a visit. We must store and return to |
130 |
# We have received input for editing a visit. We must store and return to |
131 |
# simple display. |
131 |
# simple display. |
132 |
$visit->set({ |
132 |
$visit->set({ |
133 |
borrowernumber => $input->param('borrowernumber') // q{}, |
133 |
borrowernumber => scalar $input->param('borrowernumber') // q{}, |
134 |
appointment_date => dt_from_string($input->param('date') // q{}), |
134 |
appointment_date => dt_from_string($input->param('date') // q{}), |
135 |
day_segment => $input->param('segment') // q{}, |
135 |
day_segment => scalar $input->param('segment') // q{}, |
136 |
chooser_brwnumber => $input->param('chooser') // q{}, |
136 |
chooser_brwnumber => scalar $input->param('chooser') // q{}, |
137 |
deliverer_brwnumber => $input->param('deliverer') // q{}, |
137 |
deliverer_brwnumber => scalar $input->param('deliverer') // q{}, |
138 |
}); |
138 |
}); |
139 |
my $success = eval { return $visit->store }; |
139 |
my $success = eval { return $visit->store }; |
140 |
push @messages, { type => 'error', code => 'error_on_visit_store' } |
140 |
push @messages, { type => 'error', code => 'error_on_visit_store' } |
Lines 144-154
if ( $method eq 'updateconfirm' and $houseboundprofile ) {
Link Here
|
144 |
# We have received input for creating a visit. We must store and return |
144 |
# We have received input for creating a visit. We must store and return |
145 |
# to simple display. |
145 |
# to simple display. |
146 |
my $visit = Koha::Patron::HouseboundVisit->new({ |
146 |
my $visit = Koha::Patron::HouseboundVisit->new({ |
147 |
borrowernumber => $input->param('borrowernumber') // q{}, |
147 |
borrowernumber => scalar $input->param('borrowernumber') // q{}, |
148 |
appointment_date => dt_from_string($input->param('date') // q{}), |
148 |
appointment_date => dt_from_string($input->param('date') // q{}), |
149 |
day_segment => $input->param('segment') // q{}, |
149 |
day_segment => scalar $input->param('segment') // q{}, |
150 |
chooser_brwnumber => $input->param('chooser') // q{}, |
150 |
chooser_brwnumber => scalar $input->param('chooser') // q{}, |
151 |
deliverer_brwnumber => $input->param('deliverer') // q{}, |
151 |
deliverer_brwnumber => scalar $input->param('deliverer') // q{}, |
152 |
}); |
152 |
}); |
153 |
my $success = eval { return $visit->store }; |
153 |
my $success = eval { return $visit->store }; |
154 |
push @messages, { type => 'error', code => 'error_on_visit_create' } |
154 |
push @messages, { type => 'error', code => 'error_on_visit_create' } |