-UPDATE pkghead SET pkghead_version = '4.7.0Beta2' WHERE pkghead_name = 'xt';
+UPDATE pkghead SET pkghead_version = '4.7.0' WHERE pkghead_name = 'xt';
WHERE ( (apopen_doctype='V')
AND (apopen_id=pApopenid) );
IF (NOT FOUND) THEN
- RAISE EXCEPTION 'Cannot Void Voucher #% as apopen not found', pApopenid;
+ RAISE EXCEPTION 'Cannot Void Voucher Id % as apopen not found [xtuple: voidAPOpenVoucher, -10, %]',
+ pApopenid, pApopenid;
END IF;
-- Cache Voucher Infomation
LEFT OUTER JOIN pohead ON (vohead_pohead_id = pohead_id)
WHERE (vohead_number=_n.apopen_docnumber);
IF (NOT FOUND) THEN
- RAISE EXCEPTION 'Cannot Void Voucher #% as vohead not found', _n.apopen_docnumber;
+ RAISE EXCEPTION 'Cannot Void Voucher #% as vohead not found [xtuple: voidAPOpenVoucher, -20, %]',
+ _n.apopen_docnumber, _n.apopen_docnumber;
+ END IF;
+
+-- Check for APApplications
+ SELECT apapply_id INTO _test
+ FROM apapply
+ WHERE (apapply_target_apopen_id=_n.apopen_id)
+ LIMIT 1;
+ IF (FOUND) THEN
+ RAISE EXCEPTION 'Cannot Void Voucher #% as applications exist [xtuple: voidAPOpenVoucher, -30, %]',
+ _n.apopen_docnumber, _n.apopen_docnumber;
END IF;
_glDate := COALESCE(_p.vohead_gldistdate, _p.vohead_distdate);
AND (expcat_liability_accnt_id=lb.accnt_id)
AND (expcat_id=_g.poitem_expcat_id) );
IF (NOT FOUND) THEN
- RAISE EXCEPTION 'Cannot Void Voucher #% due to unassigned G/L Accounts.', _p.vohead_number;
+ RAISE EXCEPTION 'Cannot Void Voucher #% due to unassigned G/L Accounts [xtuple: voidAPOpenVoucher, -40, %]',
+ _p.vohead_number, _p.vohead_number;
END IF;
ELSE
SELECT pp.accnt_id AS pp_accnt_id,
AND (costcat_liability_accnt_id=lb.accnt_id)
AND (costcat_id=_g.costcatid) );
IF (NOT FOUND) THEN
- RAISE EXCEPTION 'Cannot Void Voucher #% due to unassigned G/L Accounts.', _p.vohead_number;
+ RAISE EXCEPTION 'Cannot Void Voucher #% due to unassigned G/L Accounts [xtuple: voidAPOpenVoucher, -50, %]',
+ _p.vohead_number, _p.vohead_number;
END IF;
END IF;
WHERE ( (findAPAccount(vohead_vend_id)=0 OR accnt_id > 0) -- G/L interface might be disabled
AND (vohead_id=_p.vohead_id) );
IF (NOT FOUND) THEN
- RAISE EXCEPTION 'Cannot Void Voucher #% due to an unassigned A/P Account.', _p.vohead_number;
+ RAISE EXCEPTION 'Cannot Void Voucher #% due to an unassigned A/P Account [xtuple: voidAPOpenVoucher, -60, %]',
+ _p.vohead_number, _p.vohead_number;
END IF;
PERFORM postGLSeries(_sequence, pJournalNumber);
SELECT postAPCreditMemoApplication(_apopenid) INTO _result;
IF (_result < 0) THEN
- RAISE EXCEPTION 'Credit application failed with result %.', _result;
+ RAISE EXCEPTION 'Credit application failed with result % [xtuple: voidAPOpenVoucher, -70, %]',
+ _result, _result;
END IF;
-- Reopen all of the P/O Items that were closed by this Voucher
-SELECT setMetric('ServerVersion', '4.7.0Beta2');
+SELECT setMetric('ServerVersion', '4.7.0');
"author": "xTuple <dev@xtuple.com>",
"name": "xtuple",
"description": "xTuple Enterprise Resource Planning Mobile-Web client",
- "version": "4.7.0-beta2",
+ "version": "4.7.0",
"repository": {
"type": "git",
"url": "https://github.com/xtuple/xtuple.git"
"googleapis": "~0.4.6"
},
"engines": {
- "node": "^0.10"
+ "node": "0.10.32"
},
"main": "node-datasource/main.js",
"scripts": {
# Usage: ./scripts/release_build.sh 4 5 0-beta
echo "BUILDING RELEASE "$MAJ"."$MIN"."$PAT""
-git fetch XTUPLE
-git checkout XTUPLE/$MAJ"_"$MIN"_"x
+#git fetch XTUPLE
+#git checkout XTUPLE/$MAJ"_"$MIN"_"x
rm -rf scripts/output
npm run-script build-basic-postbooks-package-sql
npm run-script build-basic-quickstart
cd ../private-extensions
-git fetch XTUPLE
-git checkout XTUPLE/$MAJ"_"$MIN"_"x
+#git fetch XTUPLE
+#git checkout XTUPLE/$MAJ"_"$MIN"_"x
npm run-script build-basic-manufacturing-package-sql
npm run-script build-basic-manufacturing-empty
cd scripts/output
tar -zcvf manufacturing-install-$MAJ$MIN$PAT.gz manufacturing-install-$MAJ$MIN$PAT/
+#enterprise upgrade
+cd ../../
+mkdir scripts/output/enterprise-upgrade-$MAJ$MIN$PAT
+cp scripts/xml/ent_package.xml scripts/output/enterprise-upgrade-$MAJ$MIN$PAT/package.xml
+cp scripts/output/postbooks_upgrade.sql scripts/output/enterprise-upgrade-$MAJ$MIN$PAT
+cp scripts/output/inventory_upgrade.sql scripts/output/enterprise-upgrade-$MAJ$MIN$PAT
+cp scripts/output/distribution_upgrade.sql scripts/output/enterprise-upgrade-$MAJ$MIN$PAT
+cp scripts/output/manufacturing_upgrade.sql scripts/output/enterprise-upgrade-$MAJ$MIN$PAT
+cd scripts/output
+tar -zcvf enterprise-upgrade-$MAJ$MIN$PAT.gz enterprise-upgrade-$MAJ$MIN$PAT/
+
+#enterprise install
+cd ../../
+mkdir scripts/output/enterprise-install-$MAJ$MIN$PAT
+cp scripts/xml/ent_package.xml scripts/output/enterprise-install-$MAJ$MIN$PAT/package.xml
+cp scripts/output/postbooks_upgrade.sql scripts/output/enterprise-install-$MAJ$MIN$PAT
+cp scripts/output/inventory_basic_install.sql scripts/output/enterprise-install-$MAJ$MIN$PAT
+cp scripts/output/inventory_upgrade.sql scripts/output/enterprise-install-$MAJ$MIN$PAT
+cp scripts/output/distribution_basic_install.sql scripts/output/enterprise-install-$MAJ$MIN$PAT
+cp scripts/output/distribution_upgrade.sql scripts/output/enterprise-install-$MAJ$MIN$PAT
+cp scripts/output/manufacturing_basic_install.sql scripts/output/enterprise-install-$MAJ$MIN$PAT
+cp scripts/output/manufacturing_upgrade.sql scripts/output/enterprise-install-$MAJ$MIN$PAT
+cd scripts/output
+tar -zcvf enterprise-install-$MAJ$MIN$PAT.gz enterprise-install-$MAJ$MIN$PAT/
+
ADMIN=admin
PORT=5432
-HOST=xtuple-vagrant
+HOST=localhost
DB_LIST="postbooks_demo empty quickstart distempty distquickstart mfgempty mfgquickstart mfgdemo";
for DB in $DB_LIST ; do
rm -rf scripts/output/inventory_upgrade.sql
rm -rf scripts/output/manufacturing-install-$MAJ$MIN$PAT/
rm -rf scripts/output/manufacturing-upgrade-$MAJ$MIN$PAT/
+rm -rf scripts/output/enterprise-upgrade-$MAJ$MIN$PAT/
+rm -rf scripts/output/enterprise-install-$MAJ$MIN$PAT/
rm -rf scripts/output/manufacturing_basic_install.sql
rm -rf scripts/output/manufacturing_upgrade.sql
-<package id = "distribution-install-470beta2"
- version = "4.7.0Beta2"
+<package id = "distribution-install-470"
+ version = "4.7.0"
developer = "xTuple"
descrip = "load PostBooks resources"
updater = "2.2.4" >
<prerequisite type = "query"
name = "Checking for too-new xTuple ERP database version" >
- <query>SELECT NOT fetchMetricText('ServerVersion') >= '4.7.0Beta2' AND fetchMetricText('ServerVersion') != '4.7.0';</query>
- <message>This package may not be applied to a database newer than 4.7.0Beta.
+ <query>SELECT NOT fetchMetricText('ServerVersion') >= '4.8.0' AND fetchMetricText('ServerVersion') != '4.7.0';</query>
+ <message>This package may not be applied to a database newer than 4.7.0Beta2.
</message>
</prerequisite>
-<package id = "distribution-upgrade-470beta2"
- version = "4.7.0Beta2"
+<package id = "distribution-upgrade-470"
+ version = "4.7.0"
developer = "xTuple"
descrip = "load PostBooks resources"
updater = "2.2.4" >
<prerequisite type = "query"
name = "Checking for too-new xTuple ERP database version" >
- <query>SELECT NOT fetchMetricText('ServerVersion') >= '4.7.0Beta2' AND fetchMetricText('ServerVersion') != '4.7.0';</query>
- <message>This package may not be applied to a database newer than 4.7.0Beta.
+ <query>SELECT NOT fetchMetricText('ServerVersion') >= '4.8.0' AND fetchMetricText('ServerVersion') != '4.7.0';</query>
+ <message>This package may not be applied to a database newer than 4.7.0Beta2.
</message>
</prerequisite>
--- /dev/null
+<package id = "enterprise-install-470"
+ version = "4.7.0"
+ developer = "xTuple"
+ descrip = "load PostBooks resources"
+ updater = "2.2.4" >
+
+ <prerequisite type = "query"
+ name = "Checking xTuple Edition" >
+ <query>SELECT fetchMetricText('Application') = 'PostBooks';</query>
+ <message>This package must be applied to a PostBooks database.</message>
+ </prerequisite>
+
+ <prerequisite type = "query"
+ name = "Checking for too-old xTuple ERP database version" >
+ <query>SELECT fetchMetricText('ServerVersion') > '4.4.';</query>
+ <message>This package must be applied to a 4.4+ database.
+ </message>
+ </prerequisite>
+
+ <prerequisite type = "query"
+ name = "Checking for too-new xTuple ERP database version" >
+ <query>SELECT NOT fetchMetricText('ServerVersion') >= '4.8.0' AND fetchMetricText('ServerVersion') != '4.7.0';</query>
+ <message>This package may not be applied to a database newer than 4.7.0Beta2.
+ </message>
+ </prerequisite>
+
+ <prerequisite type = "query"
+ name = "Checking for mobile-enabled schemas" >
+ <query>SELECT NOT EXISTS(SELECT 1 FROM pg_namespace WHERE nspname = 'xm');</query>
+ <message>This package may not be applied to a mobile-enabled database. Please see your system administrator or contact xTuple.
+ </message>
+ </prerequisite>
+
+ <script file="postbooks_upgrade.sql" />
+ <script file="inventory_basic_install.sql" />
+ <script file="inventory_upgrade.sql" />
+ <script file="distribution_basic_install.sql" />
+ <script file="distribution_upgrade.sql" />
+ <script file="manufacturing_basic_install.sql" />
+ <script file="manufacturing_upgrade.sql" />
+
+</package>
--- /dev/null
+<package id = "enterprise-upgrade-470"
+ version = "4.7.0"
+ developer = "xTuple"
+ descrip = "load PostBooks resources"
+ updater = "2.2.4" >
+
+ <prerequisite type = "query"
+ name = "Checking xTuple Edition" >
+ <query>SELECT fetchMetricText('Application') = 'Standard';</query>
+ <message>This package must be applied to a Manufacturing Edition database.</message>
+ </prerequisite>
+
+ <prerequisite type="query"
+ name ="Checking xtmfg package" >
+ <query>SELECT TRUE FROM pkghead WHERE pkghead_name = 'xtmfg';</query>
+ <message>This package must be applied to an xTuple ERP database that already contains the xtmfg package.</message>
+ </prerequisite>
+
+ <prerequisite type="query" name="Checking xtmfg Package Version">
+ <query>SELECT TRUE FROM pkghead WHERE pkghead_name = 'xtmfg' AND (pkghead_version >= '4.4');</query>
+ <message>This package must be applied against the 4.4+ version of the xtmfg package.</message>
+ </prerequisite>
+
+ <prerequisite type = "query"
+ name = "Checking for too-old xTuple ERP database version" >
+ <query>SELECT fetchMetricText('ServerVersion') > '4.4.';</query>
+ <message>This package must be applied to a 4.4+ database.
+ </message>
+ </prerequisite>
+
+ <prerequisite type = "query"
+ name = "Checking for too-new xTuple ERP database version" >
+ <query>SELECT NOT fetchMetricText('ServerVersion') >= '4.8.0' AND fetchMetricText('ServerVersion') != '4.7.0';</query>
+ <message>This package may not be applied to a database newer than 4.7.0Beta2.
+ </message>
+ </prerequisite>
+
+ <prerequisite type = "query"
+ name = "Checking for mobile-enabled schemas" >
+ <query>SELECT NOT EXISTS(SELECT 1 FROM pg_namespace WHERE nspname = 'xm');</query>
+ <message>This package may not be applied to a mobile-enabled database. Please see your system administrator or contact xTuple.
+ </message>
+ </prerequisite>
+
+ <script file="postbooks_upgrade.sql" />
+ <script file="inventory_upgrade.sql" />
+ <script file="distribution_upgrade.sql" />
+ <script file="manufacturing_upgrade.sql" />
+
+</package>
-<package id = "postbooks-upgrade-470beta2"
- version = "4.7.0Beta2"
+<package id = "postbooks-upgrade-470"
+ version = "4.7.0"
developer = "xTuple"
descrip = "load PostBooks resources"
updater = "2.2.4" >
<prerequisite type = "query"
name = "Checking for too-new xTuple ERP database version" >
- <query>SELECT NOT fetchMetricText('ServerVersion') >= '4.7.0Beta2' AND fetchMetricText('ServerVersion') != '4.7.0';</query>
- <message>This package may not be applied to a database newer than 4.7.0Beta.
+ <query>SELECT NOT fetchMetricText('ServerVersion') >= '4.8.0' AND fetchMetricText('ServerVersion') != '4.7.0';</query>
+ <message>This package may not be applied to a database newer than 4.7.0Beta2.
</message>
</prerequisite>
-<package id = "manufacturing-install-470beta2"
- version = "4.7.0Beta2"
+<package id = "manufacturing-install-470"
+ version = "4.7.0"
developer = "xTuple"
descrip = "load PostBooks resources"
updater = "2.2.4" >
<prerequisite type = "query"
name = "Checking for too-new xTuple ERP database version" >
- <query>SELECT NOT fetchMetricText('ServerVersion') >= '4.7.0Beta2' AND fetchMetricText('ServerVersion') != '4.7.0';</query>
- <message>This package may not be applied to a database newer than 4.7.0Beta.
+ <query>SELECT NOT fetchMetricText('ServerVersion') >= '4.8.0' AND fetchMetricText('ServerVersion') != '4.7.0';</query>
+ <message>This package may not be applied to a database newer than 4.7.0Beta2.
</message>
</prerequisite>
-<package id = "manufacturing-upgrade-470beta2"
- version = "4.7.0Beta2"
+<package id = "manufacturing-upgrade-470"
+ version = "4.7.0"
developer = "xTuple"
descrip = "load PostBooks resources"
updater = "2.2.4" >
</message>
</prerequisite>
-<prerequisite type = "query"
- name = "Checking for too-new xTuple ERP database version" >
-<query>SELECT NOT fetchMetricText('ServerVersion') >= '4.7.0Beta2' AND fetchMetricText('ServerVersion') != '4.7.0';</query>
+ <prerequisite type = "query"
+ name = "Checking for too-new xTuple ERP database version" >
+ <query>SELECT NOT fetchMetricText('ServerVersion') >= '4.8.0' AND fetchMetricText('ServerVersion') != '4.7.0';</query>
<message>This package may not be applied to a database newer than 4.7.0Beta2.
</message>
-</prerequisite>
-
+ </prerequisite>
<prerequisite type = "query"
name = "Checking for mobile-enabled schemas" >