NetClose - Find bills with orphaned amortizations

Overview

An orphaned amortization is a NetClose Amortization record whose Source Transaction is a bill, but no line on that bill references it in the NetClose Amortization column. This happens when a user clears the amortization fields on a bill line or deletes the line after the amortization was created. NetClose doesn't delete the amortization when this happens. It stays on its current status and still names the bill as its source.

When you open a bill that has orphaned amortizations, NetClose shows this banner: "Orphaned Amortizations Detected - N amortization(s) are linked to this transaction but are not referenced on any transaction line." The banner only covers the bill you're viewing. To find every affected bill at once, use one of the methods below.

Prerequisites

  • A role that can view bills and NetClose Amortization records.
  • For Method 1, a role that can create saved searches.
  • For Method 2, a SuiteQL query tool installed in your account.

Step-by-step process

Method 1 - Saved search (no SQL tool needed)

  1. Navigate to Reports > Saved Searches > All Saved Searches > New, and select NetClose Amortization.
  2. Enter a search title, for example "Orphaned amortizations on bills".
  3. On the Criteria tab, on the Standard subtab, add:
    • Source Transaction is not empty
    • Source Transaction Fields... : Type is Bill
  4. On the Criteria tab, click the Summary subtab and add:
    • Summary Type: Sum
    • Field: Formula (Numeric)
    • Formula: CASE WHEN {custrecord_nact_amortization_source.custcol_nact_amortization} = {name} THEN 1 ELSE 0 END
    • Value: equal to 0
  5. On the Results tab, click Remove all, then add these columns:
    FieldSummary type
    Source Transaction
    NameGroup
    Formula (Numeric): CASE WHEN {custrecord_nact_amortization_source.custcol_nact_amortization} = {name} THEN 1 ELSE 0 ENDSum
    Any other desired fieldsGroup
  6. Click Save & Run.

Each row in the results is an orphaned amortization, and the Source Transaction column shows the bill it's linked to. The formula column shows 0 on every row by design: the summary criteria keeps only amortizations that no bill line references.

Method 2 - SuiteQL

If your account has a SuiteQL query tool, run the below query. If you have the Shared Transactions by Netgain SuiteApp, you can access the SuiteQL query tool via Netgain > Development > SuiteQL Editor.

SELECT
    t.id AS bill_internalid,
    t.tranid AS bill_reference_no,
    a.id AS amortization_internalid,
    a.name AS amortization_name
FROM customrecord_nact_amort a
JOIN transaction t ON t.id = a.custrecord_nact_amortization_source
LEFT JOIN transactionline tl ON tl.transaction = t.id AND tl.custcol_nact_amortization = a.id
WHERE t.type = 'VendBill' AND tl.id IS NULL

Each row is one orphaned amortization and returns four columns:

ColumnDescription
bill_internalidThe internal ID of the bill the amortization is linked to. Use it to open the bill.
bill_reference_noThe bill's Reference No. Blank if none was entered on the bill.
amortization_internalidThe internal ID of the orphaned amortization.
amortization_nameThe amortization number, for example AMRT0507.

Clean up an orphaned amortization

  1. Open the amortization from the search results.
  2. Confirm it isn't needed. If it's still Pending, click Delete.

Limitations / callouts

Related links


Was this article helpful?