JmgPayStatAdjustBalance.adjustBalance Method [AX 2012]

Creates an adjustment for the specified worker, such that the entered value is equal to the balance.

private void adjustBalance(JmgEmployee _jmgEmployee)

Run On

Called

Parameters

_jmgEmployee
Type: JmgEmployee Table
A JmgEmployee record, which refers to the employee for which to create an adjustment.

The following example demonstrates the use of this method.

// From \Classes\JmgPayStatAdjustBalance\run 
  
public void run() 
{ 
    QueryRun    qr; 
    JmgEmployee jmgEmployee; 
 
    super(); 
  
    qr = this.queryRun(); 
  
    ttsbegin; 
    while (qr.next()) 
    { 
        jmgEmployee = qr.get(tablenum(JmgEmployee)); 
  
        switch (type) 
        { 
            case JmgPayStatBalanceAdjustmentType::OpeningBalance: 
                this.adjustOpeningBalance(jmgEmployee); 
                break; 
            case JmgPayStatBalanceAdjustmentType::Balance: 
                this.adjustBalance(jmgEmployee); 
                break; 
            case JmgPayStatBalanceAdjustmentType::Adjustment: 
                this.setAdjustment(jmgEmployee); 
                break; 
        } 
    } 
    ttscommit; 
}

Community Additions

ADD
Show: