Create accounting script
Accounting scripts tell the Pismo platform the details of an accounting entry and how it’s generated. For example, when a certain amount of money is credited to an account or a purchase is confirmed, the platform knows it's necessary to produce an accounting entry.
Create a script
To create an accounting script, use these fields in Create an accounting script.
Parameter | Description |
---|---|
program_id | The ID of the program from your org. |
event_type_id | The ID of the accounting event type. |
entry_type_id | The ID of the entry type the platform generates by the accounting script. |
entry_name | The name of the accounting entry. |
debit_accounting_account_id | The ID of the debit accounting account. |
credit_accounting_account_id | The ID of the credit accounting account. |
cost_center | The object with details about the cost center in your organization. Only create a cost center object if your organization requires it. If you need to create one, see Cost center object parameters. |
processing_code | The ISO transaction processing code. |
If you don’t need to create a cost center object, then enter 0 in the required fields.
Cost center object parameters
You can include cost centers in the accounting script to improve its management. This is helpful when you need to create an accounting script for revenue and another for expense. To include cost centers, use these parameters.
Parameter | Description |
---|---|
program_id | The ID number of the program from your org. |
event_type_id | The ID number of the accounting event type. |
entry_type_id | The ID of the entry type. This entry type comes from the accounting script. |
debit_org | Your org’s debit accounting account. |
credit_org | Your org’s credit accounting account. |
debit_cost | The cost center’s debit accounting account. |
credit_cost | The cost center’s credit accounting account. |
deactivated_at | The deactivation date of the cost center. Only use this field if your org’s cost center has been deactivated. |
Example
This response shows a created accounting script with cost centers.
{
"id": 812046,
"program_id": 1,
"event_type_id": 101,
"entry_type_id": 101,
"entry_name": "interest",
"debit_accounting": {
"id": 1,
"description": "ACCOUNTING ACCOUNT CREATION TEST",
"cosif": "161200000006",
"account": "123123132-x",
"program_id": 0,
"created_at": "2021-07-22T00:37:20Z",
"deactivated_at": null
},
"credit_accounting": {
"id": 1,
"description": "ACCOUNTING ACCOUNT CREATION TEST",
"cosif": "161200000006",
"account": "123123132-x",
"program_id": 0,
"created_at": "2021-07-22T00:37:20Z",
"deactivated_at": null
},
"cost_center": {
"debit_org": "TN-ORG1",
"credit_org": "TN-ORG2",
"debit_cost": "C1",
"credit_cost": "C2",
"deactivated_at": null
},
"processing_code": "00",
"deactivated_at": null
}
Search for script
To search for an accounting script:
- Use Get accounting script.
- Enter the accounting script’s ID in the accountingScriptId field. To get this ID, use the
id
from an existing accounting script.
Example
This response shows a searched accounting script with cost centers.
{
"id": 54542,
"program_id": 499,
"event_type_id": 121,
"entry_type_id": 2212,
"entry_name": "interest",
"debit_accounting": {
"id": 54645,
"description": "INSTALLMENT PURCHASE ISSUER - STOCK - CHARGES",
"cosif": "161200000008",
"account": "1320003002002",
"program_id": 62,
"created_at": "2018-12-21T10:44:05Z",
"deactivated_at": null
},
"credit_accounting": {
"id": 54646,
"description": "(-) PURCHASE IN INSTALLMENTS ISSUER - STOCK - CHARGES",
"cosif": "161200000011",
"account": "1320003002003",
"program_id": 62,
"created_at": "2018-12-21T10:44:05Z",
"deactivated_at": null
},
"cost_center": {
"debit_org": "487892",
"credit_org": "487892",
"debit_cost": "487892",
"credit_cost": "487892",
"deactivated_at": null
},
"processing_code": "",
"deactivated_at": null
}
Deactivate a script
To deactivate an accounting script:
- Use Deactivate accounting script.
- Enter the accounting script’s ID in the accountingScriptId field. To get this ID, use the
id
from the accounting script you want to deactivate.
Example
This response shows a deactivated accounting script with cost centers.
{
"id": 0,
"program_id": 0,
"event_type_id": 0,
"entry_type_id": 0,
"entry_name": "string",
"debit_accounting": {
"id": 1,
"description": "SAMPLE ACCOUNT",
"cosif": "161200000006",
"account": "123123132-x",
"program_id": 12,
"created_at": "2021-10-10T10:10:00.000Z",
"deactivated_at": "2021-10-10T10:10:00.000Z"
},
"credit_accounting": {
"id": 1,
"description": "SAMPLE ACCOUNT",
"cosif": "161200000006",
"account": "123123132-x",
"program_id": 12,
"created_at": "2021-10-10T10:10:00.000Z",
"deactivated_at": "2021-10-10T10:10:00.000Z"
},
"cost_center": {
"debit_org": "999999",
"credit_org": "999999",
"debit_cost": "999999",
"credit_cost": "999999",
"deactivated_at": "2021-10-10T10:10:00.000Z"
},
"processing_code": "string",
"deactivated_at": "2022-06-14T21:05:46.365Z"
}
Updated 10 months ago