|
Lines 137-147
sub store {
Link Here
|
| 137 |
exists $updated_columns{itemlost} |
137 |
exists $updated_columns{itemlost} |
| 138 |
or exists $updated_columns{withdrawn} |
138 |
or exists $updated_columns{withdrawn} |
| 139 |
or exists $updated_columns{damaged} |
139 |
or exists $updated_columns{damaged} |
|
|
140 |
or exists $updated_columns{replacementprice} |
| 140 |
) ? $self->get_from_storage : undef; |
141 |
) ? $self->get_from_storage : undef; |
| 141 |
|
142 |
|
| 142 |
# Update *_on fields if needed |
143 |
# Update *_on fields if needed |
| 143 |
# FIXME: Why not for AddItem as well? |
144 |
# FIXME: Why not for AddItem as well? |
| 144 |
my @fields = qw( itemlost withdrawn damaged ); |
145 |
my @fields = qw( itemlost withdrawn damaged replacementprice ); |
| 145 |
for my $field (@fields) { |
146 |
for my $field (@fields) { |
| 146 |
|
147 |
|
| 147 |
# If the field is defined but empty or 0, we are |
148 |
# If the field is defined but empty or 0, we are |