19 vAPI_ar_batch_commit_to_history
Run a batch and commit to history.
If a problem is found (Error Code: BATCH_RUN_ERROR), the line_number information for the problem transaction is returned.
Inputs:
| Input Name |
Required |
Type |
Max Length |
Details |
| $arg_array |
YES |
ASSOC |
-- |
Details follow: |
| $arg_array / company_id |
YES |
INT |
-- |
references: company_master.company_id |
| $arg_array / batch_id |
YES |
STRING |
32 |
references: ar_batch.batch_id |
| $arg_array / lock_owner |
YES |
STRING |
16 |
references: ar_batch.lock_owner |
| $dbconn |
YES |
DBHANDLE |
-- |
Database Connection |
Outputs:
| Output Name |
Type |
Details |
| $record |
ASSOC |
line_number is the key. Details follow: |
| $record / payment_reference |
STRING |
references: ar_batch.payment_reference |
| $record / amount |
NUMERIC |
references: ar_batch.amount |
| $record / record_type |
STRING |
references: ar_batch.record_type |
|
|
Possible Values: |
|
|
* CREDMEM |
|
|
* CREDREDIST |
|
|
* DEBMEM |
|
|
* DISCOUNT |
|
|
* DISTRIB |
|
|
* PAYMENT |
|
|
* WRITEOFF |
| $record / error_code |
STRING |
Possible Values: |
|
|
* PAYMENT_PARTIAL_DISTRIB: A PAYMENT record wasn't fully distributed |
|
|
* INVALID_SRC_INVOICE: A src invoice # is invalid |
|
|
* INVALID_INV_INVOICE: A inv invoice # is invalid |
|
|
* INVALID_SRC_INV_INVOICE: Both src and inv invoice #s are invalid |
Error Codes:
| NO_PERMISSION |
Permission denied to user |
| PGQUERY |
Failed SQL query |
| BATCH_LOCKED |
Requested Batch is locked by another user |
| BATCH_RUN_ERROR |
An error exists in the batch that will prevent it from running. $record is returned for this error code |
| INVALID_RECORD_TYPE |
Supplied Record Type is invalid |
Called API Functions:
arAPI:vAPI_check_ar_batch_lock
arAPI:vAPI_check_ar_batch_for_run
arAPI_internal:vAPI_ar_batch_commit_payment_line
arAPI_internal:vAPI_ar_batch_commit_distrib_line
arAPI_internal:vAPI_ar_batch_commit_credmem_line
arAPI_internal:vAPI_ar_batch_commit_debmem_line
arAPI_internal:vAPI_ar_batch_commit_credredist_line
arAPI_internal:vAPI_ar_batch_commit_writeoff_line
arAPI_internal:vAPI_ar_batch_commit_discount_line
Return to:
AR_API Reference
There are no comments on this page. [Add comment]