Nama ERP DocsNama ERP Docs
Home
Namasoft.com
Data Model
GitHub
Home
Namasoft.com
Data Model
GitHub
  • Home

    • Search
    • Guides

      • Entity Flows
      • الفواتير والضرائب والخصومات
      • Supply Chain
      • e-commerce integration (Magento)
      • .
    • Examples
    • Reprocessing Transactions
    • Frequently Asked Questions
    • AI Generated Entity Flows Documentation

      • Core
      • Accounting Module
      • AI Module
      • Contracting Module
      • CRM Module
      • EGTax Reader Module
      • Freight Management System Module
      • Hospital Management System Module
      • HR Module

        • CalcBasicSalaryForNetSalary
        • EACalComponentFromLoan
        • EAChangeEmployeeStateFromFiringHandler
        • EAChangeEmployeeStateHandler
        • EAClearFromDateIfFromTimeEmpty
        • EAClearToDateIfToTimeEmpty
        • EACopySalaryStructureToJobOffer
        • EACopySalaryStructureToUpdateEmpInfo
        • EADSCNormalizeTimeAttendance
        • EAEmpAttendanceSysEntryCalculator
        • EAHealthInsuranceOfferReqAction
        • EALiptisSetComponentFromAnotherWithMax
        • EAMakeSingleCheckInCheckOutIfNeeded
        • EAOyoonWorkPlaceUpdateToUpdateInfo
        • EASalaryCostCalculator
        • EASalaryNormalizeAdditions
        • EASalaryNormalizeDeductions
        • EATimeAttendanceFromDBImportIntoDocument
        • EATimeAttendanceFromDBImporter
        • EATimeAttendanceSetDefaultFromTime
        • EATimeAttendanceSetDefaultToTime
        • EAUpdateEmployeeResidencyRenewDate
        • SetAttendanceToFixedTimeIfEmpty
        • TimeAttendanceAddExtraHoursToEmpty
        • TimeAttendanceRemoveEmptyTimeLines
        • .
      • e-commerce Integration Module
      • Manufacturing Module
      • POS Module
      • Real Estate Module
      • Service Center Module
      • Supply Chain Module
      • .
    • Release Notes

      • 2016
      • 2017
      • 2018
      • 2019
      • 2020
      • 2021
      • 2022
      • 2025
      • .
    • Video Tutorials

      • Supply Chain Videos
      • Report Wizard Videos
      • Human Resources Videos
      • .

EASalaryNormalizeAdditions

This document was generated using Claude.ai

Overview

Adjusts salary components when total deductions exceed additions, preventing negative net salary situations. Modifies the target component's base value to balance the salary calculation and ensure non-negative results.

When This Action Runs

Manual execution during salary processing when deductions outweigh additions, typically used to prevent negative salary situations by adjusting components like basic salary or allowances.

How It Works

  1. Calculates net total - Computes the sum of (additions - deductions) for specified component types
  2. Checks for negative balance - Determines if deductions exceed additions (negative total)
  3. Finds target component - Locates the salary line with the specified target component type
  4. Adjusts base value - Sets the target component's base value to the minimum of the deficit absolute value and original value
  5. Updates calculations - Recalculates addition/deduction amounts and salary totals
  6. Refreshes totals - Updates overall salary document totals after normalization

Parameters

Parameter 1: Target Component Type (Required) - Code of the salary component to adjust (e.g., "basic", "allowance")

Parameter 2: Components To Normalize (Required) - Comma-separated list of component type codes to include in balance calculation

Database Tables Affected

  • SalaryDocumentLine - Updates base value and recalculates addition/deduction amounts for target component
  • SalaryDocument - Updates total amounts after component normalization

Important Warnings

⚠️ Negative Balance Trigger

  • Action only executes when total calculated amount is negative (deductions > additions)
  • Positive or zero balances do not trigger any component adjustments
  • Normalization specifically targets deficit situations

⚠️ Target Component Requirements

  • Target component must exist in the salary document lines
  • Component must have valid component type configuration
  • Missing or invalid target components prevent normalization

⚠️ Base Value Modification

  • Permanently modifies the target component's base value
  • New base value is limited to the lesser of deficit amount or original value
  • Original component values are preserved before modification

⚠️ Component Type Filtering

  • Only components listed in Parameter 2 are included in balance calculation
  • Component type codes must match exactly (case-sensitive)
  • Invalid component codes are ignored in calculations

⚠️ Calculation Impact

  • Changes affect the entire salary calculation chain
  • Modified base values trigger recalculation of addition/deduction amounts
  • Salary totals are updated to reflect normalized component values

⚠️ Business Logic Dependencies

  • Assumes specific salary component structure and calculation rules
  • Component modification may affect other dependent calculations
  • Consider impact on tax calculations and benefit computations

⚠️ Parameter Validation

  • Both parameters are required for action execution
  • Missing parameters cause action failure
  • CSV format must be properly structured for component list

⚠️ Data Consistency

  • Ensures salary documents maintain non-negative net amounts
  • May mask underlying payroll configuration issues
  • Consider addressing root causes of excessive deductions

Module: hr

Full Class Name: com.namasoft.modules.humanresource.utils.clientscripts.EASalaryNormalizeAdditions

Related Actions:

  • EASalaryNormalizeDeductions - Normalizes salary components for positive balance situations
Edit On github
Last Updated:: 7/30/25, 2:51 AM
Prev
EASalaryCostCalculator
Next
EASalaryNormalizeDeductions