Changeset 1834 for trunk/LATMOS-Accounts/lib/LATMOS/Accounts
- Timestamp:
- 08/29/16 12:28:13 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Employment.pm
r1832 r1834 296 296 }; 297 297 298 if (! $base->config("allow_pasted_employment")) { 298 299 # Completed contract are RO, we allow to still set lastday 299 foreach (qw(endcircuit firstday contratType department managerContact company)) { 300 $attrs->{$_}{ro} = sub { 301 my ($self) = $_[0]; 302 $self or return 0; 303 my $st = $self->get_attributes('state') || '0'; 304 return $st < 0 ? 1 : 0; 305 }; 300 foreach (qw(endcircuit firstday contratType department managerContact company)) { 301 $attrs->{$_}{ro} = sub { 302 my ($self) = $_[0]; 303 $self or return 0; 304 my $st = $self->get_attributes('state') || '0'; 305 return $st < 0 ? 1 : 0; 306 }; 307 } 306 308 } 307 309 $class->SUPER::_get_attr_schema($base, $attrs);
Note: See TracChangeset
for help on using the changeset viewer.