|
Lines 183-206
if ( $op eq 'insert' || $op eq 'modify' || $op eq 'save' || $op eq 'duplicate' )
Link Here
|
| 183 |
} |
183 |
} |
| 184 |
|
184 |
|
| 185 |
#############test for member being unique ############# |
185 |
#############test for member being unique ############# |
| 186 |
if (($op eq 'insert') and !$nodouble){ |
186 |
if ( ( $op eq 'insert' ) and !$nodouble ) { |
| 187 |
my $category_type_send=$category_type if ($category_type eq 'I'); |
187 |
my $category_type_send; |
| 188 |
my $check_category; # recover the category code of the doublon suspect borrowers |
188 |
if ( $category_type eq 'I' ) { |
| 189 |
# ($result,$categorycode) = checkuniquemember($collectivity,$surname,$firstname,$dateofbirth) |
189 |
$category_type_send = $category_type; |
| 190 |
($check_member,$check_category) = checkuniquemember( |
190 |
} |
| 191 |
$category_type_send, |
191 |
my $check_category; # recover the category code of the doublon suspect borrowers |
| 192 |
($newdata{surname} ? $newdata{surname} : $data{surname} ), |
192 |
# ($result,$categorycode) = checkuniquemember($collectivity,$surname,$firstname,$dateofbirth) |
| 193 |
($newdata{firstname} ? $newdata{firstname} : $data{firstname} ), |
193 |
( $check_member, $check_category ) = checkuniquemember( |
| 194 |
($newdata{dateofbirth} ? $newdata{dateofbirth} : $data{dateofbirth}) |
194 |
$category_type_send, |
| 195 |
); |
195 |
( $newdata{surname} ? $newdata{surname} : $data{surname} ), |
| 196 |
if(!$check_member){ |
196 |
( $newdata{firstname} ? $newdata{firstname} : $data{firstname} ), |
| 197 |
$nodouble = 1; |
197 |
( $newdata{dateofbirth} ? $newdata{dateofbirth} : $data{dateofbirth} ) |
| 198 |
} |
198 |
); |
| 199 |
# recover the category type if the borrowers is a doublon |
199 |
if ( !$check_member ) { |
|
|
200 |
$nodouble = 1; |
| 201 |
} |
| 202 |
|
| 203 |
# recover the category type if the borrowers is a doublon |
| 200 |
if ($check_category) { |
204 |
if ($check_category) { |
| 201 |
my $tmpborrowercategory=GetBorrowercategory($check_category); |
205 |
my $tmpborrowercategory = GetBorrowercategory($check_category); |
| 202 |
$check_categorytype=$tmpborrowercategory->{'category_type'}; |
206 |
$check_categorytype = $tmpborrowercategory->{'category_type'}; |
| 203 |
} |
207 |
} |
| 204 |
} |
208 |
} |
| 205 |
|
209 |
|
| 206 |
#recover all data from guarantor address phone ,fax... |
210 |
#recover all data from guarantor address phone ,fax... |
| 207 |
- |
|
|