Project

General

Profile

Actions

Task #19547

open

Task #19803: Sprint Planning for 27/04/2026 - 11/05/2026

MCL/CPW - Allow De-allocation of Advance Payment Balance

Added by Redmine Admin 5 months ago. Updated 3 months ago.

Status:
New
Priority:
High
Assignee:
-
Start date:
03/17/2026
Due date:
03/17/2026 (about 5 months late)
% Done:

40%

Estimated time:
5:00 h
Spent time:
GitLab ID:
4021
GitLab Milestone:
GitLab Ticket Number:
1289
GitLab Time Logged:
7200
Lock Timeline Date:
No
gitlab project trace:
Sprint Planning for 27/04/2026 - 11/05/2026

Description

MCL/CPW has requested the ability to de-allocate (reverse) unused advance balances from one client and allow reallocation to another client.

This requirement arises from operational scenarios where advance payments are initially recorded under one client but later need to be reassigned due to changes in consignee details.

Business Scenario

  1. An advance payment is recorded under Client X
  2. Part of the advance is used for invoicing
  3. A remaining balance exists under Client X
  4. For a new consignment for same client:
    • A different consignee (Client Y) is declared
    • The invoice will be issued under Client Y
  5. User requests:
    • De-allocation of the remaining balance from Client X
    • Reallocation via a new advance payment under Client Y

Current Behavior

  • Advance payments:
    • Are tied to a specific client
    • Are reduced when used in receipting
  • There is no functionality to reverse or de-allocate unused balances

Approach: Adjustment-Based De-allocation

Introduce a "De-allocate Balance" action within the existing Advance Payment screen modal.

Functional Behavior

1. De-allocation Action

  • Add button: "De-allocate Balance" in Advance Payment view modal
  • Visible only when available advance balance > 0

2. User Input

  • De-allocation amount (≤ available balance)
  • Mandatory: Reason / remarks

3. System Processing

  • System will:
    • Deduct the entered amount from Client X’s advance balance
    • Record a negative adjustment transaction
    • Update the balance immediately

4. Reallocation Flow

  • User will then:
    • Create a new advance payment under Client Y using existing functionality

UI/UX Requirements

  • Add De-allocate Balance button in Advance Payment modal
  • Confirmation dialog:
    • "Are you sure you want to de-allocate this amount from this client’s advance balance?"
  • Keep consistency with current design system

Functional Requirements

  • Validation:
    • De-allocation must apply only to unused balance. Amounts already consumed in receipting/invoicing must not be reversible through this function.
    • De-allocation amount must not exceed available balance
  • Data integrity:
    • Already allocated/used amounts must remain unaffected
  • Audit trail/Activity log
    • Log transaction as Advance De-allocation with:
      • Client reference
      • de-allocated amount and remaining balance after de-allocation
      • User who performed the action
      • Timestamp
      • Reason
  • Permissions:
    • Restrict to authorized roles—authority-based (e.g., Finance/Admin)

Acceptance Criteria

  • "De-allocate Balance" button is visible when balance > 0
  • User can input a valid de-allocation amount
  • System prevents over-deallocation
  • Confirmation dialog is displayed
  • Advance balance is reduced correctly
  • Adjustment transaction is recorded for audit
  • No impact on previously allocated invoice amounts
  • User can subsequently create a new advance under another client

GitLab Sync Log

[{"id": "42997", "author": "Avisham", "hours": 2.0, "created": "2026-04-24T06:40:17.394Z", "log_date": "2026-04-22", "comment": "Imported from GitLab by @Avisham on 2026-04-24T06:40:17.394Z: 2h-(2.0)h spend at: 2026-04-22", "status": "active", "deleted_by": "", "redmine_entry_id": 13299}]

Actions #1

Updated by Redmine Admin 5 months ago

  • GitLab Sync Log updated (diff)
Actions #2

Updated by Redmine Admin 4 months ago

  • % Done changed from 0 to 40
  • Estimated time changed from 0:00 h to 5:00 h
  • GitLab Time Logged changed from 0 to 7200
Actions #3

Updated by Redmine Admin 4 months ago

  • GitLab Sync Log updated (diff)
Actions #4

Updated by Redmine Admin 4 months ago

  • Parent task set to #19803
  • gitlab project trace set to Sprint Planning for 27/04/2026 - 11/05/2026
Actions

Also available in: Atom PDF