The Cheque module provides the functionality to create cheques by using a specified module. It requires the banks’ plugin to be enabled.
End Points
Cheque (/accounts2/cheque)
| Title | / |
| Method | POST |
| URL | POST /accounts2/cheque |
| Description | Create a new cheque |
| Body Parameters (POST) | { data: { amount: number (The cheque balance or amount) bankId: number (The ID of the bank to create the cheque against) chequeType: string (The cheque type, one of “EFT”, “EXPENSE”, “PAYROLL” or “PAYMENT”) memo: string? (Any other comments to add) chequeDate: Date (The date to mark the cheque with) documentDate: Date (The document date to save against cheque) } } PS: Don’t ask me why two dates, I don’t know either. |
| Response | Status Code: 200 { success: boolean } |
| Requires Auth | YES |
| Title | /:id |
| Method | PATCH |
| URL | PATCH /accounts2/cheque/:id |
| Description | Update a cheque by ID |
| Body Parameters (POST) | { data: { amount: number (The cheque balance or amount) bankId: number (The ID of the bank to create the cheque against) chequeType: string (The cheque type, one of “EFT”, “EXPENSE”, “PAYROLL” or “PAYMENT”) memo: string? (Any other comments to add) chequeDate: Date (The date to mark the cheque with) documentDate: Date (The document date to save against cheque) } } |
| Response | Status Code: 200 { success: boolean } |
| Requires Auth | YES |
| Title | / |
| Method | GET |
| URL | GET /accounts2/cheque |
| Description | Retrieves cheques as specified in the query |
| Query Parameters | { take: number? (The number of records to retrieve) skip: number? (The number of records to skip from start) } PS: Used for pagination |
| Response | Status Code: 200 { id: number amount: number bank: { id: number name: number } chequeType: string chequeDate: Date isVoid: boolean chequeNumber: number (unique) } |
| Requires Auth | YES |
| Title | /:id |
| Method | GET |
| URL | GET /accounts2/cheque/:id |
| Description | Get cheque details by ID |
| Response | { id: number amount: number bank: { id: string name: string } chequeType: string chequeDate: Date documentDate: Date } |
| Requires Auth | YES |
| Title | /:id |
| Method | DELETE |
| URL | DELETE /accounts2/cheque/:id |
| Description | Void cheque by its ID |
| Response | { success: boolean } |
| Requires Auth | YES |
| Title | /reconcile/:id |
| Method | POST |
| URL | POST /accounts2/cheque/reconcile/:id |
| Description | Reconciles a cheque by setting its reconcillation_date to current date time. |
| Response | { success: boolean } |
| Requires Auth | YES |
Reports:
GP_VCHER_PL/:id
Prints a cheque by its ID.
User Guide:
How to create a cheque:
For Developers:
Cheques are from the cheque table, banks are from the banks’ table.