Project

General

Profile

Actions

Task #19828

open

Silverline: Enhance Charges Template to Support Sales Amount

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

Status:
New
Priority:
Normal
Assignee:
-
Start date:
04/30/2026
Due date:
04/30/2026 (about 4 months late)
% Done:

84%

Estimated time:
16:00 h
Spent time:
GitLab ID:
4351
GitLab Milestone:
GitLab Ticket Number:
1489
GitLab Time Logged:
48600
Lock Timeline Date:
No
gitlab project trace:

Description

Modify the existing Shipment Charges Template screen so that users can define both:

  • Cost Amount
  • Sales Amount

The template should continue to work based on the existing criteria:

  • Cargo Type
  • Shipment Line
  • Container Type
  • Type of Shipment
  • Effective Date Range
  • Status

Functional Requirements

Update Charges Template Popup

  1. Rename:
    • Amount → Cost Amount
  2. Add new field:
    • Sales Amount (Textbox & Label)
  3. Add checkbox:
    • Apply Profit Margin
  4. Save Sales Amount in the database.

Profit Margin Logic

  • When checkbox is checked:

    Sales Amount = Cost Amount + (Configured Profit Margin %)

  • Profit margin % is retrieved from Company Configuration

  • Calculated value is displayed in the Sales Amount textbox.

  • Sales Amount remains editable by the user.

Example logic:

Sales Amount = Cost Amount + configured profit margin

Unit of Measure

The Unit of Measure logic should remain the same for both cost and sales charges.

Validation Rules

System must allow:

  • Cost only
  • Sales only
  • Both

:exclamation: Validation:

  • At least one of the two must be filled

The system must allow the following cases:

Cost Amount Sales Amount Allowed
Filled Filled Yes
Filled Empty Yes
Empty Filled Yes
Empty Empty No, if charge line is being saved

This is required because some charges may apply only as cost, while others may apply only as sales.

Acceptance Criteria

  • User can enter Cost and/or Sales Amount
  • Profit margin auto-calculates Sales Amount
  • Sales Amount is editable even after calculation
  • System saves both values successfully

Scenario 1 – Template Supports Cost and Sales

Given user opens Charges Template
When adding or updating a charge
Then system displays:

  • Cost Amount
  • Sales Amount
  • Profit Margin checkbox

Scenario 2 – Profit Margin Calculation

Given~~ user enters Cost Amount
And Profit Margin checkbox is checked
When configured profit margin exists
Then Sales Amount is calculated automatically
And Sales Amount remains editable.~~

Scenario 3 – Manual Sales Amount

Given user does not tick Profit Margin
When user enters Sales Amount manually
Then system saves the Sales Amount successfully.

Scenario 4 – Cost Only Charge

Given Cost Amount is filled
And Sales Amount is empty
When user saves the charge
Then system saves the charge successfully.

Scenario 5 – Sales Only Charge

Given Cost Amount is empty
And Sales Amount is filled
When user saves the charge
Then system saves the charge successfully.

Technical Notes

  • Add new DB column: SalesAmount
  • Ensure backward compatibility for existing templates
  • Default existing records → SalesAmount = NULL

GitLab Sync Log

[{"id": "44043", "author": "Ra-ees Peeroo", "hours": 7.0, "created": "2026-05-11T09:32:01.951Z", "log_date": "2026-05-07", "comment": "Imported from GitLab by @Ra-ees Peeroo on 2026-05-11T09:32:01.951Z: 7h-(7.0)h spend at: 2026-05-07", "status": "active", "deleted_by": "", "redmine_entry_id": 13517}, {"id": "44330", "author": "Ra-ees Peeroo", "hours": 0.5, "created": "2026-05-14T06:49:12.474Z", "log_date": "2026-05-11", "comment": "Imported from GitLab by @Ra-ees Peeroo on 2026-05-14T06:49:12.474Z: 30m-(0.5)h spend at: 2026-05-11", "status": "active", "deleted_by": "", "redmine_entry_id": 13594}, {"id": "44318", "author": "Ra-ees Peeroo", "hours": 6.0, "created": "2026-05-14T06:43:13.311Z", "log_date": "2026-05-12", "comment": "Imported from GitLab by @Ra-ees Peeroo on 2026-05-14T06:43:13.311Z: 6h-(6.0)h spend at: 2026-05-12", "status": "active", "deleted_by": "", "redmine_entry_id": 13595}, {"id": "44309", "author": "Ra-ees Peeroo", "hours": 7.0, "created": "2026-05-14T06:29:00.769Z", "log_date": "2026-05-12", "comment": "Imported from GitLab by @Ra-ees Peeroo on 2026-05-14T06:29:00.769Z: 7h-(7.0)h spend at: 2026-05-12", "status": "deleted", "deleted_by": "44317", "redmine_entry_id": 13596}]

Actions #1

Updated by Redmine Admin 4 months ago

  • GitLab Sync Log updated (diff)
Actions #2

Updated by Redmine Admin 4 months ago

  • Description updated (diff)
Actions #3

Updated by Redmine Admin 4 months ago

  • Estimated time changed from 0:00 h to 6:00 h
Actions #4

Updated by Redmine Admin 4 months ago

  • Estimated time changed from 6:00 h to 16:00 h
Actions #5

Updated by Redmine Admin 4 months ago

  • % Done changed from 0 to 43
  • GitLab Time Logged changed from 0 to 25200
Actions #6

Updated by Redmine Admin 4 months ago

  • GitLab Sync Log updated (diff)
Actions #7

Updated by Redmine Admin 4 months ago

  • % Done changed from 43 to 84
  • GitLab Time Logged changed from 25200 to 48600
Actions #8

Updated by Redmine Admin 4 months ago

  • GitLab Sync Log updated (diff)
Actions

Also available in: Atom PDF