# bow_approval.postapprovalcriteria: Bouw7 Package for approval operations that could not be mapped to a table.
bow_approval.postapprovalcriteria: Bouw7 Package for approval operations that could not be mapped to a table.
Create or update the approval criteria with the schema.Parameters of Procedure
The following parameters can be used to control the behaviour of the procedure `bow_approval.postapprovalcriteria`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values.
Value specification by position is done by listing all values from the first to the last needed value. For example: a `begin package.procedure(value1, value2, value3); end` on a procedure with four parameters will use the default value for the fourth parameter and the specified values for the first three.
Value specification by name is done by listing all values that require a value. For example with `begin package.procedure(name1 => value1, name3 => value3); end` on the same procedure will use the default values for the second and fourth parameters and the specified values for the first and third.
| Name | Data Type | Required | Default Value | Documentation |
|---|:---:|:---:|:---:|---|
| `id` | `int64` | ☐ | | ID of the criteria. |
| `name` | `string` | ☑ | | Name of the criteria. |
| `description` | `string` | ☐ | | Description of the criteria. |
| `id_2` | `int64` | ☐ | | ID of the approval workflow. |
| `name_2` | `string` | ☐ | | Name of the approval workflow. |
| `isRestricted` | `boolean` | ☐ | | Whether or not the criteria is restricted. |
| `approver1_id` | `int64` | ☐ | | ID of the approver. |
| `approver1_type` | `int64` | ☐ | | Approver type. |
| `approver1_reference_id` | `int64` | ☐ | | ID of the employee. |
| `approver1_reference_firstName` | `string` | ☐ | | First name of the employee. |
| `approver1_reference_lastName` | `string` | ☐ | | Last name of the employee. |
| `approver1_createdAt` | `datetime` | ☐ | | The creation time of the entity. |
| `approver1_createdBy` | `string` | ☐ | | The user that created the entity. |
| `approver1_updatedAt` | `datetime` | ☐ | | The last updated time of the entity. |
| `approver1_updatedBy` | `string` | ☐ | | The user that last updated the entity. |
| `approver2_id` | `int64` | ☐ | | ID of the approver. |
| `approver2_type` | `int64` | ☐ | | Approver type. |
| `approver2_reference_id` | `int64` | ☐ | | ID of the employee. |
| `approver2_reference_firstName` | `string` | ☐ | | First name of the employee. |
| `approver2_reference_lastName` | `string` | ☐ | | Last name of the employee. |
| `approver2_createdAt` | `datetime` | ☐ | | The creation time of the entity. |
| `approver2_createdBy` | `string` | ☐ | | The user that created the entity. |
| `approver2_updatedAt` | `datetime` | ☐ | | The last updated time of the entity. |
| `approver2_updatedBy` | `string` | ☐ | | The user that last updated the entity. |
| `approver3_id` | `int64` | ☐ | | ID of the approver. |
| `approver3_type` | `int64` | ☐ | | Approver type. |
| `approver3_reference_id` | `int64` | ☐ | | ID of the employee. |
| `approver3_reference_firstName` | `string` | ☐ | | First name of the employee. |
| `approver3_reference_lastName` | `string` | ☐ | | Last name of the employee. |
| `approver3_createdAt` | `datetime` | ☐ | | The creation time of the entity. |
| `approver3_createdBy` | `string` | ☐ | | The user that created the entity. |
| `approver3_updatedAt` | `datetime` | ☐ | | The last updated time of the entity. |
| `approver3_updatedBy` | `string` | ☐ | | The user that last updated the entity. |
| `approver4_id` | `int64` | ☐ | | ID of the approver. |
| `approver4_type` | `int64` | ☐ | | Approver type. |
| `approver4_reference_id` | `int64` | ☐ | | ID of the employee. |
| `approver4_reference_firstName` | `string` | ☐ | | First name of the employee. |
| `approver4_reference_lastName` | `string` | ☐ | | Last name of the employee. |
| `approver4_createdAt` | `datetime` | ☐ | | The creation time of the entity. |
| `approver4_createdBy` | `string` | ☐ | | The user that created the entity. |
| `approver4_updatedAt` | `datetime` | ☐ | | The last updated time of the entity. |
| `approver4_updatedBy` | `string` | ☐ | | The user that last updated the entity. |
| `approver5_id` | `int64` | ☐ | | ID of the approver. |
| `approver5_type` | `int64` | ☐ | | Approver type. |
| `approver5_reference_id` | `int64` | ☐ | | ID of the employee. |
| `approver5_reference_firstName` | `string` | ☐ | | First name of the employee. |
| `approver5_reference_lastName` | `string` | ☐ | | Last name of the employee. |
| `approver5_createdAt` | `datetime` | ☐ | | The creation time of the entity. |
| `approver5_createdBy` | `string` | ☐ | | The user that created the entity. |
| `approver5_updatedAt` | `datetime` | ☐ | | The last updated time of the entity. |
| `approver5_updatedBy` | `string` | ☐ | | The user that last updated the entity. |
| `createdAt` | `datetime` | ☐ | | The creation time of the entity. |
| `createdBy` | `string` | ☐ | | The user that created the entity. |
| `updatedAt` | `datetime` | ☐ | | The last updated time of the entity. |
| `updatedBy` | `string` | ☐ | | The user that last updated the entity. |
| `type` | `int64` | ☑ | | Criteria type. |
| `id_3` | `int64` | ☐ | | The ID of the branch. |
| `name_3` | `string` | ☐ | | The name of this branch |
| `code` | `string` | ☐ | | The code for this branch |
| `division_id` | `int64` | ☐ | | The ID of the division. |
| `division_description` | `string` | ☐ | | The description of the division. |
| `division_exactDivisionId` | `string` | ☐ | | The division ID of an Exact Online environment. |
| `division_glAccountCode` | `string` | ☐ | | A default general ledger account code to use for sales related items. |
| `division_glAccountCodePurchase` | `string` | ☐ | | A default general ledger account code to use for purchase related items. |
| `division_journalCode` | `string` | ☐ | | A default journal code to use for sales related items. |
| `division_journalCodePurchase` | `string` | ☐ | | A default journal code to use for purchase related items. |
| `division_salesInvoiceNumberPrefix` | `string` | ☐ | | The prefix (3 digits) used to generate invoice number range per division. |
| `id_4` | `int64` | ☐ | | The ID of the category. |
| `name_4` | `string` | ☐ | | The name of the category. |
| `code_2` | `string` | ☐ | | The code for the category. |
| `generalCostsPercentage` | `string` | ☐ | | The general costs percentage for the category. |
| `grossProfitMargin` | `string` | ☐ | | The gross profit margin for the category. |
| `createdAt_2` | `datetime` | ☐ | | The creation time of the entity. |
| `createdBy_2` | `string` | ☐ | | The user that created the entity. |
| `updatedAt_2` | `datetime` | ☐ | | The last updated time of the entity. |
| `updatedBy_2` | `string` | ☐ | | The user that last updated the entity. |
| `priceLowerBound` | `string` | ☐ | | The lower bound price of the criteria. The following 'operators' are available:
* cost < priceUpperBound in psuedo: priceLowerBound is NULL and priceUpperBound is not NULL.
* cost > priceLowerBound in psuedo: priceLowerBound is NOT NULL and priceUpperBound is NULL.
* cost = priceLowerBound in psuedo: priceLowerBound is NOT NULL and priceUpperBound is NOT NULL and EQUAL to each other.
* cost > priceLowerBound and cost < priceUpperBound in psuedo: priceLowerBound is NOT NULL and priceUpperBound is NOT NULL and NOT EQUAL to each other.
* |
| `priceUpperBound` | `string` | ☐ | | The upper bound price of the criteria. The following 'operators' are available:
* cost < priceUpperBound in psuedo: priceLowerBound is NULL and priceUpperBound is not NULL.
* cost > priceLowerBound in psuedo: priceLowerBound is NOT NULL and priceUpperBound is NULL.
* cost = priceLowerBound in psuedo: priceLowerBound is NOT NULL and priceUpperBound is NOT NULL and EQUAL to each other.
* cost > priceLowerBound and cost < priceUpperBound in psuedo: priceLowerBound is NOT NULL and priceUpperBound is NOT NULL and NOT EQUAL to each other.
* |
| `deliveryTicketMatchesInvoiceAmount` | `boolean` | ☑ | | Whether or not the delivery ticket price has to match the invoice amount. Only used in combination with type 0 (Purchase invoice). |
| `createdAt1` | `datetime` | ☐ | | The creation time of the entity. |
| `createdBy1` | `string` | ☐ | | The user that created the entity. |
| `updatedAt1` | `datetime` | ☐ | | The last updated time of the entity. |
| `updatedBy1` | `string` | ☐ | | The user that last updated the entity. |