Tungsten Automation

Kofax MarkView 10.5.0 Fix Pack 3

Build date: March 28, 2025

© 2025 Tungsten Automation. All rights reserved.
Use is subject to license terms.

New and enhanced features

This fix pack includes the following new and enhanced features delivered in Fix Pack 2.

Feature Request 21724: PO shipment number for multiple shipments

In Kofax Transformation Modules validation, it is now possible to specify a value for the Shipment number for each PO line.

Feature Request 21634: Credit memo matching

In Kofax Transformation Modules validation, it is now possible to enter a negative quantity.

Applies to

Only use the instructions in this ReadMe file if your MarkView solution includes KTM project and you have not upgraded the KTM project files to the 10.5.0.2 version.

Files included

File name Version
KofaxMarkView-10.5.0.3.zip 10.5.0.3
ReadMe-KofaxMarkView_KTMProject-10.5.0.3.htm 10.5.0.3
ReadMe-KofaxMarkView-10.5.0.3.htm N/A

Install this fix pack

This fix pack contains manual steps to update the KTM project.
Note that in some cases the following changes modify KTM script code.
If you have any customizations in these functions, you need to integrate your customizations into the new product code.
Before performing the instructions listed in this ReadMe file:

  1. Install Kofax Transformation Modules 7.1.0 or newer.

  2. Install MarkView KTM Project Files 10.5.0.0 (see the associated Kofax MarkView 10.5.0 product documentation).

Upgrade KTM project

Enhancement Request 2104030, Feature Request 21724: Implement PO Shipment number for PO with multiple shipments in KTM validation

To apply changes without performing a full KTM project upgrade:

  1. In the Project builder application, open Project Settings.
  2. On the Tables tab, in the Column Pool section, add a new PO Shipment Number column.
  3. Double-click the LineItems row in the Table Models section.
  4. In the Available Columns section, select the PO Shipment Number row and click Assign.
  5. Close all windows and save the project.
  6. Go to the Kofax Markview Export Connector installation folder and open the KofaxCapture82ImportServer.xslt file in a text editor.
  7. Navigate to the <xsl:template match="kfx:DOCUMENTFIELD[@NAME='Total Price']"> node.
  8. Add the following text:

    <xsl:with-param name="poshipmentnum" select="../kfx:DOCUMENTFIELD[@NAME='PO Shipment Number']/@VALUE"/>

    after

    <xsl:with-param name="linebilloflading" select="../kfx:DOCUMENTFIELD[@NAME='Bill Of Lading']/@VALUE"/>

  9. Navigate to the <xsl:template name="divide"> node.
  10. Add the following text:

    <xsl:param name="poshipmentnum"/>

    after

    <xsl:param name="linebilloflading"/>

  11. Add the following text:

    <xsl:call-template name="make-element">
       <xsl:with-param name="name" select="'PO Shipment Number'"/>
       <xsl:with-param name="delimiter" select="$delimiter"/>
       <xsl:with-param name="value" select="$poshipmentnum"/>
    </xsl:call-template>

    after

    <xsl:call-template name="make-element">
       <xsl:with-param name="name" select="'Bill of Lading'"/>
       <xsl:with-param name="delimiter" select="$delimiter"/>
       <xsl:with-param name="value" select="$linebilloflading"/>
    </xsl:call-template>

  12. Navigate to the <xsl:when test="contains($amount,$delimiter)"> node.
  13. Add the following text:

    <xsl:with-param name="poshipmentnum" select="substring-after($poshipmentnum,$delimiter)"/>

    after

    <xsl:with-param name="linebilloflading" select="substring-after($linebilloflading,$delimiter)"/>

  14. Save the file.

After changing the project in any way:

  1. Open the Kofax Capture Administration application.
  2. Select MarkView Invoice Batch Class.
  3. Click Synchronize Kofax Transformation Project.
  4. In the first screen, click Next without any changes.
  5. In the second step, select the PO Shipment Number row under the LineItems parent item.
  6. Click Create a new index field with name of the extraction field and assign it (the second button in the action buttons area).
  7. Click Next. In the next screen, click Synchronize.

  8. Publish the MarkView Invoice batch class.

Enhancement Request 1175277, Feature Request 21634: Support credit memos matching in KTM validation.

To apply changes without performing a full KTM project upgrade:

  1. In the Project builder application, open Project Settings.
  2. On the Formatting tab, double-click the Amounts field.

    A window appears.

  3. Select Allow negative amounts and click OK.
  4. On the Formatting tab, double-click the Quantity field.

    A window appears.

  5. Select Allow negative amounts and Allow empty field.

    Click OK.

  6. On the Formatting tab, click Add.

    A window appears.

  7. In the Name field, type "TableAmtCustom" and select the Script Formatter type.

    Click OK.

  8. In the Field data type list, select the Double / Amount type.

    Click OK.

  9. In the Project Settings window, click OK.
  10. In the Project Tree section, expand the Invoice branch, click the blue eye icon to reveal the hidden elements. Expand Fields and Invoice_FieldGroup.

    In the list of fields, select LineItems.

  11. In the Details section that opens, find the Total Price field.

    In the Formatting column, select TableAmtCustom.

  12. In the Invoice - Script code, make the following changes:
    1. Locate the Private Sub TableAmount_FormatDoubleField(ByVal FieldText As String, FormattedText As String, ErrDescription As String, ValidFormat As Boolean, ByRef DoubleVal As Double, ByRef DoubleFormatted As Boolean) subroutine and after it, add a new one:

      Private Sub CustomTableAmt_FormatDoubleField(ByVal FieldText As String, ByRef FormattedText As String, ByRef ErrDescription As String, ByRef ValidFormat As Boolean, ByRef DoubleVal As Double, ByRef DoubleFormatted As Boolean)
         '# Variables
         Dim oAmount As New CscXDocField
         Dim sAmountFormatter As String
         Dim sDecimalDelimeter As String
         Dim sAltDelimeter As String
         Dim nDelimeterPosition As Integer
         Dim nAltPositionDelim As Integer

         'UHHS
         Dim AmtType As String
         If Left(FieldText, 1) = "-" Then
            FieldText = Replace(FieldText, "-", "")
            AmtType = "Negative"
         Else
            AmtType = "Positive"
         End If

         '# Take care of OCR errors (noise)
         Dim symbol As String
         FieldText = Trim(FieldText)
         For Each symbol In Split("^ > < ´ ~ ! / * : ; \ ' # $ £ %")
            FieldText = Replace(FieldText, symbol, "")
         Next

         '# Determine which formatter should be used
         If Len(FieldText) <> 0 Then
            '# Determine the default decimal delimeter, which has been set in the formatter 'Amounts'
            Project.FieldFormatters.ItemByName("Amounts").FormatFieldText("0.00", sDecimalDelimeter, "")
            sDecimalDelimeter = Mid(sDecimalDelimeter, Len(sDecimalDelimeter) - 2, 1)

            '# Find the position of the decimal delimeter
            nDelimeterPosition = InStrRev(FieldText, sDecimalDelimeter)
            '# In case if the default decimal delimeter is not equal to FieldText decimal delimeter,
            '# we should try to find another/alternative delimeter.
            If sDecimalDelimeter = "." Then
               sAltDelimeter = ","
            Else
               sAltDelimeter = "."
            End If
            nAltPositionDelim = InStrRev(FieldText, sAltDelimeter)

            '# The correct decimal delimeter should be located in the right side of the string
            If nDelimeterPosition < nAltPositionDelim Then
               nDelimeterPosition = nAltPositionDelim
               sDecimalDelimeter = sAltDelimeter
            End If
            '# The KTM Formatters have a limitation when the "Require decimal delimeter" option is selected.
            '# The limitation is related to number of digits which are located before or after decimal delimeter. There are should be
            '# at least 2 digits from one side (e.g. 00.1 or 1.50 etc) in the FieldText. To resolve the limitation the FieldText
            '# should be formatted depend on decimal delimeter position.
            If nDelimeterPosition <= 0 Then
               FieldText = FieldText & sDecimalDelimeter & "00"
            Else
               FieldText = "00" & FieldText
            End If

            '# Recalculate decimal delimeter position after formatting string
            nDelimeterPosition = InStrRev(FieldText, sDecimalDelimeter)

            '# Determine Formatter which should be run for FieldText using rules below:
            '# 1. If FieldText has 3 digit after decimal delimeter, the Amounts3Decimals should be used.
            '# 2. If FieldText has more than 3 digit after decimal delimeter, the Amounts4Decimals should be used.
            '# 3. In all other cases the Amounts formatter will be used.
            If nDelimeterPosition = Len(FieldText) - 3 Then
               sAmountFormatter = "Amounts3Decimals"
            ElseIf nDelimeterPosition < Len(FieldText) - 3 Then
               sAmountFormatter = "Amounts4Decimals"
            Else
               sAmountFormatter = "Amounts"
            End If
         Else
            FieldText = "0.00"
         End If
         '# Format the amount
         If sAmountFormatter <> "" Then
            oAmount.Text = FieldText
            Project.FieldFormatters.ItemByName(sAmountFormatter).FormatField oAmount
            FormattedText = oAmount.Text
            ValidFormat = oAmount.DoubleFormatted
            DoubleVal = oAmount.DoubleValue
            DoubleFormatted = oAmount.DoubleFormatted
            ErrDescription = oAmount.ErrorDescription
         Else
            Project.FieldFormatters.ItemByName("Amounts").FormatFieldText(FieldText, FormattedText, ErrDescription)
            ValidFormat = False
         End If
         'UHHS
         If AmtType = "Negative" Then
            FieldText = "-" & FieldText
            FormattedText = "-" & FormattedText
         End If
      End Sub

    2. Locate the Private Sub ValidationForm_AfterTableCellConfirmed(ByVal pXDoc As CASCADELib.CscXDocument, ByVal pField As CASCADELib.CscXDocField, ByVal RowIndex As Long, ByVal ColumnIndex As Long) subroutine. Inside it, find the "End Select" line and add the following code right after it:

      Dim sColumnName As String
      Dim row As CscXDocTableRow

      Select Case pField.Name
         Case "LineItems"
            Set row = pField.Table.Rows.ItemByIndex(RowIndex)
            sColumnName = row.Cells.ItemByIndex(ColumnIndex).ColumnName
            Select Case sColumnName
               Case "Total Price"
                  If Left(row.Cells.ItemByName("Total Price").Text,1) = "-" Then
                     row.Cells.ItemByName("Quant").Text = "-"&row.Cells.ItemByName("Quant").Text
                  Else
                     row.Cells.ItemByName("Quant").Text = Replace(row.Cells.ItemByName("Quant").Text,"-","")
                  End If
            End Select
      End Select

    3. Locate the Private Sub LineItem_Validate(ValItems As CASCADELib.CscXDocValidationItems, pXDoc As CASCADELib.CscXDocument, ErrDescription As String, ValidField As Boolean) subroutine and inside it, locate the following lines of code:

      Select Case UCase(pXDoc.Fields.ItemByName("DocumentType").Text)
         Case "NON-PO INVOICE", "PRE-APPROVED INVOICE"
            If UCase(Project.ScriptVariables.ItemByName("AfterExtractDeleteLineItems").Value) = UCase("True") Then
               ValidField = True
               Exit Sub
            End If

         Case "PO INVOICE"
            If UCase(Project.ScriptVariables.ItemByName("DeletePOInvoiceLineItems").Value) = UCase("True") Then
               ValidField = True
               Exit Sub
            End If
      End Select

      If UCase(Project.ScriptVariables.ItemByName("ProjectType").Value) = UCase("Oracle") Then
         If Val(ValItems.Item("Quantity").Text) = 0 And Val(ValItems.Item("TotalPrice").Text) <> 0 Or _
            (Val(ValItems.Item("Quantity").Text) = 0 And Val(ValItems.Item("TotalPrice").Text) = 0) Then
            ValidField = True
            Exit Sub
         End If
      End If

      Replace with:

      '# If the document Type is non PO INVOICE or PRE APPROVED then ValidField = True
      If UCase(Project.ScriptVariables.ItemByName("AfterExtractDeleteLineItems").Value) = UCase("True") Then
         Select Case UCase(pXDoc.Fields.ItemByName("DocumentType").Text)
            Case "NON-PO INVOICE", "PRE-APPROVED INVOICE"
               ValidField = True
               Exit Sub
         End Select
      End If

      If UCase(Project.ScriptVariables.ItemByName("ProjectType").Value) <> "SAP" Then
         If UCase(pXDoc.Fields.ItemByName("DocumentType").Text) = "PO INVOICE" And Val(ValItems.Item("Quantity").Text) = 0 And _
            Val(ValItems.Item("TotalPrice").Text) <> 0 Then
            ValidField = True
            Exit Sub
         End If
      End If

      Find the following lines of code in this subroutine:

      '* Quantity * Unit Price ((100 - Discount) / 100) = LineItemTotal
      'If Abs((oQuantity.DoubleValue / oUnitOfQuantity.DoubleValue) * (oUnitPrice.DoubleValue) * ((100 - oDiscount.DoubleValue) / 100) - oTotalPrice.DoubleValue) < 0.01 Then
      If Val(ValItems.Item("UnitOfQuantity").Text) <> 0 Then
         If Abs(((oQuantity.DoubleValue / oUnitOfQuantity.DoubleValue) * oUnitPrice.DoubleValue) - Abs(oTotalPrice.DoubleValue) ) < 0.01 Then
            ValidField = True
         Else
            ValidField = False
            ErrDescription = Project.ScriptVariables.ItemByName("ErrDescription_LineItem").Value
         End If
      Else
         ValidField = False
         ErrDescription = Project.ScriptVariables.ItemByName("ErrDescription_LineItem").Value
      End If

      Replace with:

      '* Quantity * Unit Price ((100 - Discount) / 100) = LineItemTotal
      'If Abs((oQuantity.DoubleValue / oUnitOfQuantity.DoubleValue) * (oUnitPrice.DoubleValue) * ((100 - oDiscount.DoubleValue) / 100) - oTotalPrice.DoubleValue) < 0.01 Then
      'UHHS CSS13
      'If Abs(((oQuantity.DoubleValue / oUnitOfQuantity.DoubleValue) * oUnitPrice.DoubleValue) - Abs(oTotalPrice.DoubleValue) ) < 0.01 Then
      If (oQuantity.DoubleValue / oUnitOfQuantity.DoubleValue) * oUnitPrice.DoubleValue - oTotalPrice.DoubleValue < 0.01 Then
         ValidField = True
      Else
         ValidField = False
         ErrDescription = Project.ScriptVariables.ItemByName("ErrDescription_LineItem").Value
      End If

  13. Save your project.

  14. Resynchronize your project and republish the corresponding batch classes.