Issue #19981:backport fix to 4.0.4


git-svn-id: http://svn.code.sf.net/p/postbooks/code/xtuple/branches/from_40x@14675 ea1a15ef-c238-0410-93cb-fa28e9f07733
Issue #20288:backport fix to 4.0.4


git-svn-id: http://svn.code.sf.net/p/postbooks/code/xtuple/branches/from_40x@14677 ea1a15ef-c238-0410-93cb-fa28e9f07733
Issue #20369:backport fix to 4.0.4


git-svn-id: http://svn.code.sf.net/p/postbooks/code/xtuple/branches/from_40x@14679 ea1a15ef-c238-0410-93cb-fa28e9f07733
Issue #20454:backport to 4.0.4


git-svn-id: http://svn.code.sf.net/p/postbooks/code/xtuple/branches/from_40x@14689 ea1a15ef-c238-0410-93cb-fa28e9f07733
Issue #19682:backport fix to 4.0.4


git-svn-id: http://svn.code.sf.net/p/postbooks/code/xtuple/branches/from_40x@14691 ea1a15ef-c238-0410-93cb-fa28e9f07733