<message>This package requires that XWD 240 package to be installed before continuing.</message>
</prerequisite>
+ <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) = 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.
+ </message>
+ </prerequisite>
+
+ <prerequisite type="query" name="Checking xwd Package Version">
+ <query>SELECT TRUE FROM pkghead WHERE pkghead_name = 'xwd' AND (pkghead_version ~* '2.4');</query>
+ <message>This package must be applied against the 2.4.0 version of the xwd package.</message>
+ </prerequisite>
+
<script file="postbooks_upgrade.sql" />
<script file="inventory_upgrade.sql" />
<script file="distribution_upgrade.sql" />