diff --git a/components/questionnaire/forms/Form_4_Shareholders/index.js b/components/questionnaire/forms/Form_4_Shareholders/index.js
index c540277..24a6562 100644
--- a/components/questionnaire/forms/Form_4_Shareholders/index.js
+++ b/components/questionnaire/forms/Form_4_Shareholders/index.js
@@ -762,6 +762,14 @@ class Form_4_Shareholders extends QuestionnaireForm
{
for(let i in check)
{
+ if(check[i] === "identity_document.code")
+ {
+ if(parseInt(_get(founder_persons[f], "identity_document.doctype"), 10) !== 100000000)
+ {
+ continue;
+ }
+ }
+
const v = _get(founder_persons[f], check[i]);
if(check[i] === "telephone")
{
@@ -798,13 +806,18 @@ class Form_4_Shareholders extends QuestionnaireForm
}
}
+ if(parseInt(total_parts, 10) > 100)
+ {
+ errors[0].push(`founder_part_total`);
+ }
+
if(parseInt(_get(founder_persons[f], "identity_document.doctype"), 10) === 100000000 && errors.indexOf("identity_document.seria") < 0 && errors.indexOf("identity_document.docnumber") < 0)
{
const founder_document_check_response = await checkDocumentData({
seria: _get(founder_persons[f], "identity_document.seria"),
number: _get(founder_persons[f], "identity_document.docnumber"),
});
-
+
if(founder_document_check_response[0] !== undefined && founder_document_check_response[0].qc !== 0)
{
errors[f].push(`identity_document.invalid`);
@@ -814,11 +827,6 @@ class Form_4_Shareholders extends QuestionnaireForm
}
}
- if(parseInt(total_parts, 10) !== 100)
- {
- errors[0].push(`founder_part_total`);
- }
-
this.setState({ errors, loading: false }, () =>
{
window.scroll(0, 0);
@@ -883,6 +891,7 @@ class Form_4_Shareholders extends QuestionnaireForm
{
const { checking } = this.props;
const { founder_persons, client_contacts, loading, address, status, errors, } = this.state;
+ console.log("Form_4_Shareholders", { errors });
return (