Project

General

Profile

Bug #3071

Implement Add Voucher UI and Frontend API Integration

Added by Yashaditya Singh about 2 hours ago. Updated about 1 hour ago.

Status:
New
Priority:
Normal
Start date:
09/07/2026
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

Implement the frontend Add Voucher screen for accounting voucher entry.

Scope:
- Add Voucher screen for:
- Cash Payment (CP)
- Cash Receipt (CR)
- Bank Payment (BP)
- Bank Receipt (BR)
- Journal (JV)
- Contra (CT)

Frontend requirements:
- Load Voucher Type and Transaction Mode options from:
GET /api/v1/station/accounting/metadata
- Load/search active ledgers for Particulars from:
GET /api/v1/station/ledgers?search={text}
- Implement dynamic Transaction Mode behavior based on Voucher Type:
- Cash Payment / Cash Receipt → CASH
- Bank Payment / Bank Receipt → CHEQUE / NEFT / RTGS / UPI
- Journal / Contra → hide Transaction Mode and related fields
- Show/hide and validate Instrument No. and Cheque Issuer Bank based on Transaction Mode.
- Implement voucher line table with:
- S.No.
- Debit/Credit selector
- Particulars / Ledger
- Debit Amount
- Credit Amount
- Ensure each row has either Debit or Credit amount, not both.
- Maintain running Total Debit and Total Credit.
- Disable Submit when Debit and Credit totals are not equal.
- Apply client-side validation before API submission.

Submit flow:
- Use:
POST /api/v1/station/accounting/vouchers/submit
- Voucher must be created and posted in a single API call.
- On successful response, display the generated Voucher Number (voucherNo).

Document upload:
- Upload documents only after successful voucher creation using the returned voucher ID.
- Use:
POST /api/v1/station/accounting/vouchers/{id}/attachments
- Support multiple files.
- Allowed formats:
.jpg, .jpeg, .png, .bmp, .pdf
- Maximum file size: 5 MB per file.
- Implement attachment list/download/delete where required.

Error handling:
- Display backend validation/error messages returned by the API to the user.

Reference UI:
Follow the provided Add Voucher reference screens and UI specification while keeping the backend API flow as defined above.

Note:
- Do not use the old Draft → Post flow for this screen.
- Add Voucher uses the single-submit API and the voucher is posted immediately.

Also available in: Atom PDF