ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Create declaration

  1. Check authentication_method_current

    SELECT authentication_method_current
    FROM declaration_requests
    WHERE id = {:id}
    
    1. If "type" = "OFFLINE"

      1.  set declaration status to "PENDING_VERIFICATION" “active”

      2. set reason to 'offline'

    2. if "type" = "OTP" - set declaration status to "ACTIVE"  “active”

    3. if "type" = "NA" - check parent_declaration_id, if not null than set declaration status to "ACTIVE" “active”

  2. Check persons 'no_tax_id' flag

    1. if 'no_tax_id'=true and parent_declaration_id is null

      1. set declaration status to "PENDING_VERIFICATION" “active”

      2. set reason to 'no_tax_id'

    2. if ‘no_tax_id’=true and parent_declaration_id is not null - set declaration status to "ACTIVE" “active”

  3. Create a new declaration by adding a new entity to the declarations table ops_db without declaration_id.

    1. if there is existing record in the declarations table with the same id and declaration_request_id, return ok to IL

  • No labels