Changeset 2324
- Timestamp:
- 12/16/19 14:20:13 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm
r2314 r2324 1746 1746 # If an employement apply we set the value to the user object 1747 1747 1748 $self-> computeEmploymentDate;1748 $self->_computeEmploymentDate; 1749 1749 1750 1750 my %attrsets = ( … … 1772 1772 if (my $res = $self->set_fields(%attrsets)) { 1773 1773 $self->ReportChange('Update', 'Attr %s updated to match Employment %s', join(', ', sort keys %attrsets), $currentemployment->id); 1774 $self->PostSetAttribute(); 1774 1775 return $res; 1775 1776 } … … 1780 1781 # No current employment, resetting values: 1781 1782 1782 return $self-> _resetEmployment;1783 return $self->resetEmployment; 1783 1784 } 1784 1785 1785 1786 } 1786 1787 1787 # Reset attribute value set by employment 1788 # except managerContact and expire 1789 1790 sub _resetEmployment { 1788 =head2 resetEmployment 1789 1790 Reset attribute value set by employment except managerContact and expire 1791 1792 =cut 1793 1794 sub resetEmployment { 1791 1795 my ($self) = @_; 1792 1796 1793 $self-> computeEmploymentDate;1797 $self->_computeEmploymentDate; 1794 1798 1795 1799 my %changes = ( … … 1835 1839 $self->base->log(LA_NOTICE, "Updating user %s to match unemployment", $self->id); 1836 1840 $self->ReportChange('Update', 'Update %s to match unemployment', join(', ', sort keys %changes)); 1841 $self->PostSetAttribute(); 1837 1842 return 1; 1838 1843 } else { … … 1845 1850 } 1846 1851 1847 =head2 computeEmploymentDate1852 =head2 _computeEmploymentDate 1848 1853 1849 1854 Compute and copy to user start and end employment date … … 1851 1856 =cut 1852 1857 1853 sub computeEmploymentDate {1858 sub _computeEmploymentDate { 1854 1859 my ($self) = @_; 1855 1860
Note: See TracChangeset
for help on using the changeset viewer.