Archived
A full cashup now records, per payment method, how much of the expected takings is in the bank, still on hand (cash) or pending (on the card report or with a POP), and writes off what was lost to card fees, bank charges or a shortfall. Whatever is left is shown as unaccounted; closing with an unaccounted amount is allowed after a warning. Pending money can be marked received or written off after the event is closed, without reopening it. Reopening starts the next cashup from the last one. Write-offs come off net profit and show as "Bank & card charges" in the cashup, finance and profit reports. The reports page also moves to the shared back link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 lines
948 B
JavaScript
16 lines
948 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const { getEventCashup, getCashByRecordedUser, savePersonCash, saveEventCashupDraft, closeEvent, reopenEvent, resolvePending, getCashupAudit } = require('../controllers/cashupController');
|
|
const { protect, supervisor, admin } = require('../middleware/authMiddleware');
|
|
|
|
router.get('/audit', protect, supervisor, getCashupAudit);
|
|
router.get('/event/:eventId', protect, supervisor, getEventCashup);
|
|
router.get('/event/:eventId/cash-by-user', protect, supervisor, getCashByRecordedUser);
|
|
router.put('/event/:eventId/person-cash/:userId', protect, supervisor, savePersonCash);
|
|
router.put('/event/:eventId/draft', protect, admin, saveEventCashupDraft);
|
|
router.post('/event/:eventId/close', protect, admin, closeEvent);
|
|
router.post('/event/:eventId/reopen', protect, admin, reopenEvent);
|
|
router.post('/lines/:lineId/pending', protect, admin, resolvePending);
|
|
|
|
module.exports = router;
|