{
  "@context": {
    "ixo": "https://w3id.org/ixo/ns/protocol/",
    "@id": "@type",
    "type": "@type",
    "@protected": true
  },
  "type": "ixo:entity#surveyTemplate",
  "question": {
    "title": "Fiat Payment Request",
    "description": "Claim Form to request a payment for Goods and/or Services provided",
    "pages": [
      {
        "name": "page1",
        "elements": [
          {
            "type": "text",
            "name": "schema:name",
            "title": "Full Name",
            "isRequired": true
          },
          {
            "type": "text",
            "name": "schema:email",
            "title": "Email",
            "isRequired": true,
            "inputType": "email"
          },
          {
            "type": "comment",
            "name": "schema:streetAddress",
            "title": "Street Address",
            "description": "Format: Building Number, Street, Area, City, Country, Post Code\nExample: 12b First Street,  Claremont, Cape Town, South Africa, 7708",
            "isRequired": true
          },
          {
            "type": "text",
            "name": "schema:identityNumber",
            "title": "National ID Number",
            "isRequired": true
          },
          {
            "type": "boolean",
            "name": "ixo:intent_submitDocument",
            "title": "Submit an Invoice",
            "isRequired": true
          },
          {
            "type": "boolean",
            "name": "ixo:intent_submitDocument_1",
            "title": "Submit Supporting Documentation",
            "isRequired": true
          }
        ],
        "title": "Personal Details",
        "description": "About the person/organization requesting payment"
      },
      {
        "name": "page2",
        "elements": [
          {
            "type": "text",
            "name": "schema:reference",
            "title": "Invoice Reference",
            "description": "Such as Invoice number",
            "isRequired": true
          },
          {
            "type": "text",
            "name": "schema:amount",
            "title": "Invoice Amount",
            "description": "Total in the Base Currency",
            "isRequired": true,
            "inputType": "number"
          },
          {
            "type": "tagbox",
            "name": "schema:currency_base",
            "title": "Base Currency",
            "description": "In which the costs have been incurred ",
            "isRequired": true,
            "choices": [
              "ZAR",
              "NGN",
              "USD",
              "CHF",
              "EUR"
            ],
            "maxSelectedChoices": 1,
            "minSelectedChoices": 1
          },
          {
            "type": "text",
            "name": "schema:date_dueDate",
            "title": "Payment Due Date",
            "isRequired": true,
            "inputType": "date"
          },
          {
            "type": "file",
            "name": "schema:document_invoice",
            "visibleIf": "{ixo:intent_submitDocument} = true",
            "title": "Invoice Upload",
            "isRequired": true,
            "waitForUpload": true,
            "needConfirmRemoveFile": true
          }
        ],
        "title": "Invoice Details",
        "description": "Document"
      },
      {
        "name": "umuzi:paymentDetails",
        "elements": [
          {
            "type": "dropdown",
            "name": "schema:country",
            "title": "Country",
            "isRequired": true,
            "choices": [
              {
                "value": "ZA",
                "text": "South Africa"
              },
              {
                "value": "NG",
                "text": "Nigeria"
              }
            ]
          },
          {
            "type": "checkbox",
            "name": "ixo:paymentCurrency",
            "visibleIf": "{schema:country} notempty",
            "title": "Payout Currency",
            "description": "This is set automatically from your country.",
            "setValueExpression": "iif({schema:country} = 'NG', 'NGN', iif({schema:country} = 'ZA', 'ZAR', ''))",
            "isRequired": true,
            "readOnly": true,
            "choices": [
              {
                "value": "NGN",
                "text": "NGN — Nigerian Naira"
              },
              {
                "value": "ZAR",
                "text": "ZAR — South African Rand"
              }
            ]
          },
          {
            "type": "text",
            "name": "org:bankName",
            "title": "Bank Name ",
            "isRequired": true
          },
          {
            "type": "text",
            "name": "schema:accountNumber",
            "title": "Bank Account Number",
            "isRequired": true
          }
        ],
        "title": "Your Payment Details",
        "description": "Please check that your bank details are correct. This is where your funds will be sent."
      },
      {
        "name": "page4",
        "elements": [
          {
            "type": "file",
            "name": "schema:document_additional",
            "visibleIf": "{ixo:intent_submitDocument_1} = true",
            "title": "Supporting Documents",
            "description": "Max 1.2 MB",
            "isRequired": true,
            "showCommentArea": true,
            "commentText": "Comments (optional)",
            "allowMultiple": true,
            "waitForUpload": true,
            "maxSize": 1248588,
            "needConfirmRemoveFile": true,
            "sourceType": "file-camera"
          },
          {
            "type": "comment",
            "name": "schema:description_additional",
            "title": "Notes",
            "description": "Any other information or requests you may wish to submit"
          }
        ],
        "title": "Additional Information",
        "description": "Supporting this Request"
      }
    ]
  }
}