</message>
</prerequisite>
- <prerequisite type = "query"
+ <prerequisite type = "query"
name = "Checking for duplicate Credit Card payments on Sales Orders" >
<query>
WITH counter AS (SELECT COUNT(*) AS freq
FROM payco
GROUP BY payco_ccpay_id, payco_cohead_id
ORDER BY 1)
- SELECT COALESCE(MAX(freq), 1) <= 1
+ SELECT (COALESCE(MAX(freq), 1) = 0 OR COALESCE(MAX(freq), 1) = 1)
FROM counter;
</query>
<message>There are duplicate payco_ccpay_id and payco_cohead_id on the payco table. Please see your system administrator or contact xTuple.