For the complete documentation index, see llms.txt. This page is also available as Markdown.

Script Editor

Logic ERP has improved the Script Editor for reports with variable columns - a group of columns that the report adds by itself, such as one column for each allowance and deduction in the Payroll Summary Report. A VB.NET formula can now go through all the columns of such a group, and Convert to VB.NET now converts PowerShell and VBScript formulas that do this.


What's new

  • Variable column groups in VB.NET formulas - a group shows in the Field List under its own name. In the formula it is written Arr_ followed by the group name, with spaces and symbols written as _ - for example the group ALLOW/DED is written Arr_ALLOW_DED. Each column of the group has a Name (the column's caption) and a Value.

  • Convert to VB.NET for PowerShell - a PowerShell formula that goes through a group with ForEach is now converted. Earlier this part was left out of the conversion.

  • Convert to VB.NET for VBScript - a column's Value is now read as a number, the same way PowerShell read it. A blank value counts as 0.

  • A group used as one value - when a VBScript formula uses a whole group where one value is expected, the conversion now lists it as a problem and leaves that line for you to correct, instead of converting it wrongly.

Example — Actual salary from net salary

The ACTUAL SALARY column adds the LOAN DEDUCT and TDS columns back to ORG NET SALARY and takes away BONUS and INCENTIVE. For an employee with ORG NET SALARY ₹18,234.67, LOAN DEDUCT ₹1,500.50, BONUS ₹3,000 and INCENTIVE ₹0.25, the formula below gives ₹16,734.92 - the same as the old PowerShell formula.

'#@VBNET
Dim TempLoanDeduct As Double = 0
Dim TempTDS As Double = 0
Dim TempBonus As Double = 0
Dim TempIncentive As Double = 0
Dim TmpVarCol As Object

For Each TmpVarCol In Arr_ALLOW_DED
    Dim ColValue As Double = Val(TmpVarCol.Value & "")
    If ColValue > 0 Then
        Select Case UCase(TmpVarCol.Name & "")
            Case "LOAN DEDUCT" : TempLoanDeduct = ColValue
            Case "TDS" : TempTDS = ColValue
            Case "BONUS" : TempBonus = ColValue
            Case "INCENTIVE" : TempIncentive = ColValue
        End Select
    End If
Next
ACTUAL_SALARY = Round(ORG_NET_SALARY + TempLoanDeduct + TempTDS - TempBonus - TempIncentive, 2)

Check after converting

  • In PowerShell, a check such as -gt 0 on a column's value compared it as text, so a negative value also passed. After conversion the check compares numbers, so negative values are left out. If a group can hold negative values, check the results of the converted formula, and change > 0 to <> 0 if they should be counted.


For more detailed information, Click Here