Merge pull request #1835 from shackbarth/23257-qr-final
authorGil Moskowitz <gmoskowitz@xtuple.com>
Mon, 22 Sep 2014 16:30:30 +0000 (12:30 -0400)
committerGil Moskowitz <gmoskowitz@xtuple.com>
Mon, 22 Sep 2014 16:30:30 +0000 (12:30 -0400)
issue #23257: qr codes on fluentreports

29 files changed:
.travis.yml
enyo-client/database/source/delete_system_orms.sql
enyo-client/database/source/update_version.sql
enyo-client/database/source/wipe_views.sql [new file with mode: 0644]
enyo-client/database/source/xt/functions/pg_advisory_unlock.sql
enyo-client/database/source/xt/functions/trylock.sql
enyo-client/extensions/source/sales/database/source/manifest.js
enyo-client/extensions/source/sales/database/source/xt/tables/sharetype.sql
enyo-client/extensions/source/sales/database/source/xt/views/share_users_shipto_cust.sql [new file with mode: 0644]
foundation-database/public/functions/logout.sql
foundation-database/public/tables/metasql/billingSelections-detail.mql
foundation-database/public/tables/metric.sql
foundation-database/public/tables/report/BankrecHistory.xml
foundation-database/public/tables/setVersion.sql
foundation-database/public/trigger_functions/usrpriv.sql
lib/enyo-x/source/app.js
lib/enyo-x/source/en/strings.js
lib/enyo-x/source/views/transaction_list.js
lib/enyo-x/source/views/transaction_list_container.js
lib/orm/source/xt/javascript/data.sql
package.json
scripts/install_xtuple.sh
scripts/lib/build_database.js
scripts/lib/util/process_manifest.js
scripts/xml/distribution_install.xml
scripts/xml/distribution_package.xml
scripts/xml/postbooks_package.xml
scripts/xml/xtmfg_install.xml
scripts/xml/xtmfg_package.xml

index 10dcc2b..564ef54 100644 (file)
@@ -15,7 +15,3 @@ script:
   - "npm run-script test-datasource"
   - "npm run-script test"
   - "npm run-script jshint"
-
-  # test an upgrade from 4.4.0
-  - "wget http://sourceforge.net/projects/postbooks/files/03%20PostBooks-databases/4.4.0/postbooks_demo-4.4.0.backup"
-  - "./scripts/build_app.js -d upgrade_test -i -b ./postbooks_demo-4.4.0.backup"
index dc1cfbc..66ea976 100644 (file)
@@ -1,23 +1,10 @@
-DO $$
+do $$
  /* Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.
-     See www.xm.ple.com/CPAL for the full text of the software license. */
+    See www.xtuple.com/CPAL for the full text of the software license. */
 
-  var result,
-    viewname,
-    schemaname,
-    i;
-
-  sql = "select schemaname, viewname from pg_views where schemaname in ('xm','sys', 'xt');"
-  result = plv8.execute(sql);
-  for (i = 0; i < result.length; i++) {
-    viewname = result[i].viewname;
-    schemaname = result[i].schemaname;
-    plv8.execute('drop view if exists ' + schemaname + '.' + viewname + ' cascade;');
-  }
-
-  plv8.execute("select xt.js_init()");
-  plv8.execute("alter table xt.orm disable trigger orm_did_change");
+  plv8.execute("select xt.js_init();");
+  plv8.execute("alter table xt.orm disable trigger orm_did_change;");
   plv8.execute("delete from xt.orm where orm_json ~ '\"isSystem\":true';");
-  plv8.execute("alter table xt.orm enable trigger orm_did_change");
+  plv8.execute("alter table xt.orm enable trigger orm_did_change;");
 
 $$ language plv8;
index a23ed94..9d6b744 100644 (file)
@@ -1 +1 @@
-UPDATE pkghead SET pkghead_version = '4.7.0Beta' WHERE pkghead_name = 'xt';
+UPDATE pkghead SET pkghead_version = '4.7.0' WHERE pkghead_name = 'xt';
diff --git a/enyo-client/database/source/wipe_views.sql b/enyo-client/database/source/wipe_views.sql
new file mode 100644 (file)
index 0000000..2116aec
--- /dev/null
@@ -0,0 +1,16 @@
+do $$
+ /* Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.
+     See www.xm.ple.com/CPAL for the full text of the software license. */
+declare
+  sqlstring text;
+begin
+  select string_agg('drop view if exists ' || t.oid::regclass || ' cascade;', ' ') into sqlstring
+    from pg_class t
+    join pg_namespace n on n.oid = relnamespace
+   where relkind = 'v'
+     and nspname in ('xm','sys', 'xt');
+  if length(sqlstring) > 0 then
+    execute sqlstring;
+  end if;
+end
+$$;
index c892882..25c3b7a 100644 (file)
@@ -1,4 +1,8 @@
 create or replace function xt.pg_advisory_unlock(oid integer, id integer) returns boolean as $$
+  var sql = "select pg_catalog.pg_advisory_unlock($1, $2) as result;";
+  return plv8.execute(sql, [oid, id])[0].result;
+  /* temporary: let qt client use advisory locks but web client use xt.lock */
+
   var pid = plv8.execute("select pg_backend_pid() as pid;")[0].pid,
     username = plv8.execute("select geteffectivextuser() as username;")[0].username,
     sql = "select * from xt.lock where lock_table_oid = $1 and lock_record_id = $2 and lock_username = $3 and lock_pid = $4;",
index 0c73312..719607b 100644 (file)
@@ -1,4 +1,8 @@
 create or replace function xt.trylock(oid integer, id integer) returns boolean as $$
+  var sql = "select public.trylock($1, $2) as result;";
+  return plv8.execute(sql, [oid, id])[0].result;
+  /* temporary: let qt client use advisory locks but web client use xt.lock */
+
   var pid = plv8.execute("select pg_backend_pid() as pid;")[0].pid,
     data = Object.create(XT.Data),
     lock = data.tryLock(oid, id, {pid: pid});
index ce8ba77..a0938aa 100644 (file)
@@ -10,6 +10,7 @@
     "xt/views/share_users_shipto.sql",
     "xt/views/share_users_shipto_cntct.sql",
     "xt/views/share_users_shipto_addr.sql",
+    "xt/views/share_users_shipto_cust.sql",
     "xt/tables/sharetype.sql"
   ]
 }
index 69301f3..3e343bf 100644 (file)
@@ -54,6 +54,20 @@ insert into xt.sharetype (
   'username'
 );
 
+-- Customer that a Ship To is on CRM Account's users.
+delete from xt.sharetype where sharetype_tblname = 'share_users_shipto_cust';
+insert into xt.sharetype (
+  sharetype_nsname,
+  sharetype_tblname,
+  sharetype_col_obj_uuid,
+  sharetype_col_username
+) values (
+  'xt',
+  'share_users_shipto_cust',
+  'obj_uuid',
+  'username'
+);
+
 -- Sales Order CRM Account's users.
 delete from xt.sharetype where sharetype_tblname = 'share_users_cohead';
 insert into xt.sharetype (
diff --git a/enyo-client/extensions/source/sales/database/source/xt/views/share_users_shipto_cust.sql b/enyo-client/extensions/source/sales/database/source/xt/views/share_users_shipto_cust.sql
new file mode 100644 (file)
index 0000000..d852f1f
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * This view lists all postgres usernames that are associated with a CRM
+ * Account that owns a resource. That associaiton is either the main user
+ * account, owner's user account, customer's sale rep's user account or
+ * a shared access that has been specifically granted.
+ *
+ * This view can be used to determine which users have personal privilege
+ * access to a Customer that a Ship To is on based on what CRM Account the
+ * Ship To belongs to.
+ */
+
+select xt.create_view('xt.share_users_shipto_cust', $$
+
+  -- Customer that is for a Ship To CRM Account's users.
+  SELECT
+    shipto_cust_crmacct_id.obj_uuid::uuid AS obj_uuid,
+    username::text AS username
+  FROM (
+    SELECT
+      custinfo.obj_uuid,
+      crmacct.crmacct_id
+    FROM shiptoinfo
+    LEFT JOIN crmacct ON crmacct_cust_id = shipto_cust_id
+    LEFT JOIN custinfo ON cust_id = shipto_cust_id
+  ) shipto_cust_crmacct_id
+  LEFT JOIN xt.crmacct_users USING (crmacct_id)
+  WHERE 1=1
+    AND username IS NOT NULL
+    AND obj_uuid IS NOT NULL;
+
+$$, false);
index 1626bf2..5806fc8 100644 (file)
@@ -3,9 +3,16 @@ CREATE OR REPLACE FUNCTION logout() RETURNS integer AS $$
 -- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple. 
 -- See www.xtuple.com/CPAL for the full text of the software license.
 BEGIN
-  PERFORM pg_advisory_unlock(datid::integer, procpid)
+  IF (compareversion('9.2.0') <= 0)
+  THEN
+    PERFORM pg_advisory_unlock(datid::integer, pid)
      FROM pg_stat_activity
-    WHERE(procpid = pg_backend_pid());
+    WHERE(pid = pg_backend_pid());
+  ELSE
+    PERFORM pg_advisory_unlock(datid::integer, procpid)
+       FROM pg_stat_activity
+      WHERE(procpid = pg_backend_pid());
+  END IF;
 
   RETURN 0;
 END;
index 864b03b..66bfe7e 100644 (file)
@@ -1,8 +1,8 @@
 -- Group: billingSelections
 -- Name: detail
 -- Notes: used by dspBillingSelections
--- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.
--- See www.xtuple.com/CPAL for the full text of the software license.
+--        Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple.
+--        See www.xtuple.com/CPAL for the full text of the software license.
 
 SELECT cobmisc_id, cohead_id,
        cohead_number, cust_number, cust_name,
@@ -21,7 +21,7 @@ FROM cobmisc, cohead, custinfo, coitem, cobill
 WHERE ((cobmisc_cohead_id=cohead_id)
    AND (cohead_cust_id=cust_id)
    AND (coitem_cohead_id=cohead_id)
-   AND (cobill_coitem_id=coitem_id)
+   AND (cobill_coitem_id=coitem_id) AND (COALESCE(cobill_invcnum,0) = 0)
    AND (NOT cobmisc_posted))
 GROUP BY cobmisc_id, cohead_id, cohead_number, cust_number,
          cust_name, cobmisc_misc, cobmisc_freight, cobmisc_tax, cobmisc_payment
index 21c8615..f7ac35a 100644 (file)
@@ -2,3 +2,4 @@
 insert into metric (metric_name, metric_value)
 select 'UnifiedBuild', 'true'
 where not exists (select c.metric_id from metric c where c.metric_name = 'UnifiedBuild');
+
index 8ffe63e..151a654 100644 (file)
@@ -24,7 +24,7 @@
   <name>head</name>
   <sql>SELECT (bankaccnt_name || '-' || bankaccnt_descrip) AS f_bankaccnt,
        (formatDate(bankrec_opendate) || '-' || formatDate(bankrec_enddate)) AS f_bankrec,
-       bankrec_username AS f_username, formatDate(bankrec_created) AS f_created,
+       bankrec_username AS f_username, formatDate(bankrec_postdate) AS f_postdate,
        formatDate(bankrec_opendate) AS f_opendate,
        formatDate(bankrec_enddate) AS f_enddate,
        formatMoney(bankrec_openbal) AS f_openbal,
    <vcenter/>
    <data>
     <query>head</query>
-    <column>f_created</column>
+    <column>f_postdate</column>
    </data>
   </field>
   <label>
index bf8d03a..e66a56b 100644 (file)
@@ -1 +1 @@
-SELECT setMetric('ServerVersion', '4.7.0Beta');
+SELECT setMetric('ServerVersion', '4.7.0');
index 7ab0098..b35a826 100644 (file)
@@ -1,4 +1,4 @@
-CREATE OR REPLACE FUNCTION _usrprivTrigger() RETURNS TRIGGER AS $$
+CREATE OR REPLACE FUNCTION _usrprivTrigger() RETURNS TRIGGER AS $$
 -- Copyright (c) 1999-2014 by OpenMFG LLC, d/b/a xTuple. 
 -- See www.xtuple.com/CPAL for the full text of the software license.
 DECLARE
@@ -8,6 +8,13 @@ BEGIN
   -- This looks like a candidate for a foreign key but isn't.
   -- fkeys don't work if the foreign key value resides in a child of the 
   -- table and not the table itself.
+  IF (NOT EXISTS(SELECT usrpriv_id 
+                 FROM usrpriv, priv  
+                 WHERE ((usrpriv_priv_id=priv_id) AND (priv_name ='MaintainUsers')
+                        AND (usrpriv_username=geteffectivextuser())))) THEN
+    RAISE EXCEPTION 'User have no privileges to modify user privileges.';
+  END IF;                
+
   IF ((TG_OP = 'UPDATE' OR TG_OP = 'INSERT') AND
       (NOT EXISTS(SELECT priv_id
                   FROM priv
index bd18801..ff4a060 100644 (file)
@@ -44,7 +44,7 @@ white:true*/
     */
     handleKeyDown: function (inSender, inEvent) {
       var that = this,
-        keyCode = inEvent.keyCode,
+        keyCode = inEvent.which,
         exoticTransforms = {},
         numberShiftCharacters = ")!@#$%^&*(";
 
index 18236bf..bd06bbe 100644 (file)
@@ -139,6 +139,7 @@ strict:true, trailing:true, white:true */
     "_noDescription": "No Description",
     "_noDocumentFound": "No Document Found.",
     "_noEligibleActions": "No Eligible Actions",
+    "_noItemFound": "No item found",
     "_noOldPassword": "Please enter your old password",
     "_unsavedChanges": "You have unsaved changes.",
     "_saveYourWork?": "Do you want to save your work?"
index 99ea887..e371c11 100644 (file)
@@ -24,7 +24,8 @@ trailing:true, white:true, strict:false*/
     events: {
       onProcessingChanged: "",
       onOrderChanged: "",
-      onShipmentChanged: ""
+      onShipmentChanged: "",
+      onUpdateHeader: ""
     },
     handlers: {
       onBarcodeCapture: "captureBarcode"
@@ -48,7 +49,11 @@ trailing:true, white:true, strict:false*/
       });
       if (models.length > 0) {
         this.transact(models, true, true);
+      } else {
+        inEvent.noItemFound = true;
       }
+
+      this.doUpdateHeader(inEvent);
     },
     /**
         Helper function for transacting `transact` on an array of models.
index f1b9ac3..2116df4 100644 (file)
@@ -33,7 +33,8 @@ trailing:true, white:true, strict:false*/
       onListItemMenuTap: "showListItemMenu",
       onParameterChange: "requery",
       onProcessingChanged: "processingChanged",
-      onSelectionChanged: "selectionChanged"
+      onSelectionChanged: "selectionChanged",
+      onUpdateHeader: "updateHeader"
     },
     init: false,
     components: [
@@ -48,7 +49,7 @@ trailing:true, white:true, strict:false*/
             {kind: "onyx.Menu", name: "actionMenu"}
           ]}
         ]},
-        {classes: "xv-header", content: "_search".loc()},
+        {classes: "xv-header", name: "transactionListHeader", content: "_search".loc()},
         {kind: "XV.ScrollableGroupbox", name: "parameterScroller", classes: "xv-search-container", fit: true}
       ]},
       {name: "listPanel", kind: "FittableRows", components: [
@@ -270,6 +271,14 @@ trailing:true, white:true, strict:false*/
       for (i = 0; i < collection.length; i++) {
         collection.at(i).transactionDate = transDate;
       }
+    },
+    updateHeader: function (inSender, inEvent) {
+      if (inEvent.noItemFound) {
+        this.$.transactionListHeader.setContent("_noItemFound".loc() + ": " + inEvent.data);
+
+      } else if (this.$.transactionListHeader.getContent() !== "_search".loc()) {
+        this.$.transactionListHeader.setContent("");
+      }
     }
   };
 
index 0cacd18..ada5e1b 100644 (file)
@@ -1727,6 +1727,31 @@ select xt.install_js('XT','Data','xtuple', $$
       return ret;
     },
 
+    /**
+     * Get the current database server version.
+     * If the optional precision argument is passed, return the first prec
+     * fields of the full version number.
+     *
+     * @example
+     * var x   = getPgVersion(1),       // '9'
+     *     xy  = getPgVersion(2),       // '9.1'
+     *     xyz = getPgVersion(3),       // '9.1.3'
+     *     all = getPgVersion();        // '9.1.3'
+     *
+     * @param   {Number} proc - optional precision
+     * @returns {String} X[.Y[.Z]]
+     */
+    getPgVersion: function (prec) {
+      var q = plv8.execute("select setting from pg_settings " +
+                           "where name='server_version';"),
+          ret;
+      ret = q[0].setting;
+      if (typeof prec === 'number') {
+        ret = ret.split(".").slice(0,prec).join(".");
+      }
+      return ret;
+    },
+
     /**
      * Get the oid for a given table name.
      *
@@ -2399,12 +2424,14 @@ select xt.install_js('XT','Data','xtuple', $$
         lockExp,
         oid,
         pcheck,
+        pgver = 0 + XT.Data.getPgVersion(2),
         pid = options.pid || null,
-        pidSql = "select usename, procpid " +
+        pidcol = (pgver < 9.2) ? "procpid" : "pid",
+        pidSql = "select usename, {pidcol} " +
                  "from pg_stat_activity " +
                  "where datname=current_database() " +
                  " and usename=$1 " +
-                 " and procpid=$2;",
+                 " and {pidcol}=$2;",
         query,
         selectSql = "select * " +
                     "from xt.lock " +
@@ -2412,6 +2439,8 @@ select xt.install_js('XT','Data','xtuple', $$
                     " and lock_record_id = $2;",
         username = XT.username;
 
+      pidSql = pidSql.replace(/{pidcol}/g, pidcol);
+
       /* If passed a table name, look up the oid. */
       oid = typeof table === "string" ? this.getTableOid(table) : table;
 
index cf61b68..d848338 100644 (file)
@@ -2,7 +2,7 @@
   "author": "xTuple <dev@xtuple.com>",
   "name": "xtuple",
   "description": "xTuple Enterprise Resource Planning Mobile-Web client",
-  "version": "4.7.0-beta",
+  "version": "4.7.0",
   "repository": {
     "type": "git",
     "url": "https://github.com/xtuple/xtuple.git"
index ee2121b..b8ae265 100644 (file)
@@ -139,7 +139,10 @@ install_packages() {
   sudo add-apt-repository -y "deb http://apt.postgresql.org/pub/repos/apt/ ${DEBDIST}-pgdg main"
   sudo wget -qO- https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
   sudo apt-get -qq update 2>&1 | tee -a $LOG_FILE
-  sudo apt-get -q -y install curl build-essential libssl-dev postgresql-9.1 postgresql-server-dev-9.1 postgresql-contrib-9.1 postgresql-9.1-plv8 2>&1 | tee -a $LOG_FILE
+  sudo apt-get -q -y install curl build-essential libssl-dev \
+    postgresql-${PG_VERSION} postgresql-server-dev-${PG_VERSION} \
+    postgresql-contrib-${PG_VERSION} postgresql-${PG_VERSION}-plv8 2>&1 \
+    | tee -a $LOG_FILE
 
   if [ ! -d "/usr/local/nvm" ]; then
     sudo rm -f /usr/local/bin/nvm
@@ -154,10 +157,11 @@ install_packages() {
   sudo nvm alias xtuple $NODE_VERSION
 
   # use latest npm
-  npm install -fg npm@1.4.25
+  sudo npm install -fg npm@1.4.25
        # npm no longer supports its self-signed certificates
        log "telling npm to use known registrars..."
        npm config set ca ""
+        sudo chown -R $USER $HOME/.npm
 
   log "installing npm modules..."
   npm install --unsafe-perm 2>&1 | tee -a $LOG_FILE
@@ -189,7 +193,7 @@ setup_postgres() {
                return 1
        fi
 
-       PGDIR=/etc/postgresql/9.1/main
+       PGDIR=/etc/postgresql/${PG_VERSION}/main
 
   log "copying configs..."
        sudo cp $PGDIR/postgresql.conf $PGDIR/postgresql.conf.default
index 6f64695..8ae4296 100644 (file)
@@ -89,7 +89,8 @@ var  async = require('async'),
               baseName.indexOf('distribution') >= 0,
             registerExtension: isExtension,
             runJsInit: !isFoundation && !isLibOrm,
-            wipeViews: isApplicationCore && spec.wipeViews,
+            wipeViews: isFoundation && spec.wipeViews,
+            wipeOrms: isApplicationCore && spec.wipeViews,
             extensionLocation: isCoreExtension ? "/core-extensions" :
               isPublicExtension ? "/xtuple-extensions" :
               isPrivateExtension ? "/private-extensions" :
@@ -190,9 +191,8 @@ var  async = require('async'),
           return memo + script;
         }, "");
 
-        // Without this, when we delegate to exec psql the err var will not be set even
-        // on the case of error.
-        allSql = "\\set ON_ERROR_STOP TRUE;\n" + allSql;
+        // Without this, psql runs all input and returns success even if errors occurred
+        allSql = "\\set ON_ERROR_STOP TRUE\n" + allSql;
 
         winston.info("Applying build to database " + spec.database);
         credsClone.database = spec.database;
index 90f6030..44ed46a 100644 (file)
@@ -56,6 +56,19 @@ regexp:true, undef:true, strict:true, trailing:true, white:true */
     }
 
     if (options.wipeViews) {
+      // If we want to pre-emptively wipe out the views, the best place to do it
+      // is at the start of the core application code
+      fs.readFile(path.join(__dirname, "../../../enyo-client/database/source/wipe_views.sql"),
+          function (err, wipeSql) {
+        if (err) {
+          callback(err);
+          return;
+        }
+        extensionSql = wipeSql + extensionSql;
+        callback(null, extensionSql);
+      });
+
+    } else if (options.wipeOrms) {
       // If we want to pre-emptively wipe out the views, the best place to do it
       // is at the start of the core application code
       fs.readFile(path.join(__dirname, "../../../enyo-client/database/source/delete_system_orms.sql"),
index b82f1bd..0d32d93 100644 (file)
@@ -1,5 +1,5 @@
-<package id        = "distribution-install-460"
-         version   = "4.7.0Beta"
+<package id        = "distribution-install-470"
+         version   = "4.7.0"
          developer = "xTuple"
          descrip   = "load PostBooks resources"
          updater   = "2.2.4" >
@@ -19,8 +19,8 @@
 
   <prerequisite type = "query"
                 name = "Checking for too-new xTuple ERP database version" >
-    <query>SELECT NOT 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';</query>
+    <message>This package may not be applied to a database newer than 4.7.0.
     </message>
   </prerequisite>
 
index 9ff6ab6..0518ab7 100644 (file)
@@ -1,5 +1,5 @@
-<package id        = "distribution-upgrade-460"
-         version   = "4.7.0Beta"
+<package id        = "distribution-upgrade-470"
+         version   = "4.7.0"
          developer = "xTuple"
          descrip   = "load PostBooks resources"
          updater   = "2.2.4" >
@@ -19,8 +19,8 @@
 
   <prerequisite type = "query"
                 name = "Checking for too-new xTuple ERP database version" >
-    <query>SELECT NOT 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';</query>
+    <message>This package may not be applied to a database newer than 4.7.0.
     </message>
   </prerequisite>
 
index 041993b..464f2b8 100644 (file)
@@ -1,5 +1,5 @@
-<package id        = "postbooks-upgrade-460"
-         version   = "4.7.0Beta"
+<package id        = "postbooks-upgrade-470"
+         version   = "4.7.0"
          developer = "xTuple"
          descrip   = "load PostBooks resources"
          updater   = "2.2.4" >
@@ -19,8 +19,8 @@
 
   <prerequisite type = "query"
                 name = "Checking for too-new xTuple ERP database version" >
-    <query>SELECT NOT 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';</query>
+    <message>This package may not be applied to a database newer than 4.7.0.
     </message>
   </prerequisite>
 
index b6eb595..3d34014 100644 (file)
@@ -1,5 +1,5 @@
-<package id        = "manufacturing-install-460"
-         version   = "4.7.0Beta"
+<package id        = "manufacturing-install-470"
+         version   = "4.7.0"
          developer = "xTuple"
          descrip   = "load PostBooks resources"
          updater   = "2.2.4" >
@@ -19,8 +19,8 @@
 
   <prerequisite type = "query"
                 name = "Checking for too-new xTuple ERP database version" >
-    <query>SELECT NOT 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';</query>
+    <message>This package may not be applied to a database newer than 4.7.0.
     </message>
   </prerequisite>
 
index ff787b4..ef6ce2c 100644 (file)
@@ -1,5 +1,5 @@
-<package id        = "manufacturing-upgrade-460"
-         version   = "4.7.0Beta"
+<package id        = "manufacturing-upgrade-470"
+         version   = "4.7.0"
          developer = "xTuple"
          descrip   = "load PostBooks resources"
          updater   = "2.2.4" >
@@ -30,8 +30,8 @@
 
 <prerequisite type = "query"
                name = "Checking for too-new xTuple ERP database version" >
-<query>SELECT NOT 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';</query>
+    <message>This package may not be applied to a database newer than 4.7.0.
     </message>
 </prerequisite>