Skip to main content
Skip table of contents

Financials - AP Payment Stuck in Pending Status

🤔 Problem

The client was unable to submit AP Payments and they kept getting ‘stuck’ in Pending status. Attempts to cancel and recreate the payment (PY 9318) resulted in the same issue. Previous payments to the same vendor/employee had no issues.

🌱 Solution

  • Root Cause: The AP Payment was not released, preventing it from being marked as paid.

  • Solution: Release the AP Payment under Accounts Payable → Release AP Payments. If the payment is stuck, reset its status to 'Draft' and retry the process.

image-20250916-181919.png
  • Validation: Internal replication confirmed that releasing the payment allows it to be marked as paid.

Logic in Code - Since the AP Payment was greater than zero, it should be applied the pending status.

CODE
  def posting_attributes object
    attrs = if object.is_void == true
      {
        posted_date: Date.today,
        status: "Voided",
        reject_reason: nil,
      }
    elsif object.remittance_type == "AP" && object.payment_amount.abs < 1e-6 # fuzzy equals zero
      {
        posted_date: Date.today,
        status: "Paid",
        reject_reason: nil,
      }
    else
      {
        posted_date: Date.today,
        status: "Pending",
        reject_reason: nil,
      }
    end
    attrs
  end

📎 Related articles

WESS-16774

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.