Jeff Kowalczyk | 4 Jun 2009 06:38
Picon
Favicon

Tidy Pg-database.sql with pg_dump -F p?

Along similar lines to perltidy cleanups done previously, I would like to
work up a commit normalizing the handwritten trunk/sql/Pg-database.sql
source using pg_dump --format=p as a starting point.

This would be a large and noisy diff, so anyone with an uncommitted
branch would have difficulty merging afterward.

On the other hand, the pg_dump formatted SQL is much easier to
read, debug and accept patches against, IMO.

Thoughts?

Jeff

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
Jeff Kowalczyk | 8 Jun 2009 23:21
Picon
Favicon

trunk: load contrib functions cluster-wide or local to company database?

When running the requisite steps to add contrib functions to a
new-database company file for trunk (1.3):

  $ createdb -U postgres -O ledgersmb mycompany ; 
  $ createlang -U postgres plpgsql -d mycompany ; 
  $ psql -U postgres -d mycompany -f /usr/share/postgresql-8.3/contrib/tsearch2.sql
  $ psql -U postgres -d mycompany -f /usr/share/postgresql-8.3/contrib/tablefunc.sql
  $ psql -U postgres -d mycompany -f /usr/share/postgresql-8.3/contrib/pg_trgm.sql

It seems like the functions are being installed to a cluster-wide
namespace location. The following error messages are returned:

  psql:/usr/share/postgresql-8.3/contrib/tsearch2.sql:8: ERROR:  type "tsvector" already exists
  psql:/usr/share/postgresql-8.3/contrib/tsearch2.sql:9: ERROR:  type "tsquery" already exists
  psql:/usr/share/postgresql-8.3/contrib/tsearch2.sql:10: ERROR:  type "gtsvector" already exists
  psql:/usr/share/postgresql-8.3/contrib/tsearch2.sql:11: ERROR:  type "gtsq" already exists
  psql:/usr/share/postgresql-8.3/contrib/tsearch2.sql:18: ERROR:  function "lexize" already exists
with same argument types
  psql:/usr/share/postgresql-8.3/contrib/tsearch2.sql:24: ERROR:  function "lexize" already exists
with same argument types
  psql:/usr/share/postgresql-8.3/contrib/tsearch2.sql:30: ERROR:  function "lexize" already exists
with same argument types
  ...

IIRC, and I can't find the conversation in the #ledgersmb logs to support
it, the recommendation was that the contrib functions were to be loaded
local to each company database, for isolation and re-deployment purposes.

Should psql be run with a different 'search_path', in order to install
these functions to the mycompany database only?
(Continue reading)

Chris Travers | 9 Jun 2009 17:33

Re: trunk: load contrib functions cluster-wide or local to company database?



On Mon, Jun 8, 2009 at 2:21 PM, Jeff Kowalczyk <jtk-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:
When running the requisite steps to add contrib functions to a
new-database company file for trunk (1.3):

 $ createdb -U postgres -O ledgersmb mycompany ;
 $ createlang -U postgres plpgsql -d mycompany ;
 $ psql -U postgres -d mycompany -f /usr/share/postgresql-8.3/contrib/tsearch2.sql
 $ psql -U postgres -d mycompany -f /usr/share/postgresql-8.3/contrib/tablefunc.sql
 $ psql -U postgres -d mycompany -f /usr/share/postgresql-8.3/contrib/pg_trgm.sql

It seems like the functions are being installed to a cluster-wide
namespace location. The following error messages are returned:


Hmmm...  Try twice with a clean template1 and see if the issue is a past failure.

To clean template1:

UPDATE pg_database SET istemplate = FALSE where datname = 'template1';
DROP DATABASE template1;
CREATE DATABASE template1 WITH TEMPLATE template0;
UPDATE pg_database SET istemplate = TRUE where datname = 'template1';

Then try again twice.

Best Wishes,
Chris Travers
 


 psql:/usr/share/postgresql-8.3/contrib/tsearch2.sql:8: ERROR:  type "tsvector" already exists
 psql:/usr/share/postgresql-8.3/contrib/tsearch2.sql:9: ERROR:  type "tsquery" already exists
 psql:/usr/share/postgresql-8.3/contrib/tsearch2.sql:10: ERROR:  type "gtsvector" already exists
 psql:/usr/share/postgresql-8.3/contrib/tsearch2.sql:11: ERROR:  type "gtsq" already exists
 psql:/usr/share/postgresql-8.3/contrib/tsearch2.sql:18: ERROR:  function "lexize" already exists with same argument types
 psql:/usr/share/postgresql-8.3/contrib/tsearch2.sql:24: ERROR:  function "lexize" already exists with same argument types
 psql:/usr/share/postgresql-8.3/contrib/tsearch2.sql:30: ERROR:  function "lexize" already exists with same argument types
 ...

IIRC, and I can't find the conversation in the #ledgersmb logs to support
it, the recommendation was that the contrib functions were to be loaded
local to each company database, for isolation and re-deployment purposes.

Should psql be run with a different 'search_path', in order to install
these functions to the mycompany database only?

 /* $PostgreSQL: pgsql/contrib/tsearch2/tsearch2.sql.in,v 1.4 2007/11/28 19:33:04 tgl Exp $ */

 -- Adjust this setting to control where the objects get created.
 SET search_path = public;

 -- These domains are just to catch schema-qualified references to the
 -- old data types.
 CREATE DOMAIN tsvector AS pg_catalog.tsvector;
 CREATE DOMAIN tsquery AS pg_catalog.tsquery;
 CREATE DOMAIN gtsvector AS pg_catalog.gtsvector;
 CREATE DOMAIN gtsq AS pg_catalog.text;

 --dict interface
 CREATE FUNCTION lexize(oid, text)
       RETURNS _text
       as 'ts_lexize'
       LANGUAGE INTERNAL
       RETURNS NULL ON NULL INPUT;
 ...

Thanks,
Jeff


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ledger-smb-devel mailing list
Ledger-smb-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ledger-smb-devel mailing list
Ledger-smb-devel@...
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
Chris Travers | 12 Jun 2009 01:22

For those working on trunk

Revision 2639 moves the information formerly stored in "chart" to a very different and much more normalized structure.

If you are running trunk, you will either need to reinstall, or else:

1)  Run the attached sql file.  This migrates data into the new tables, creates views for backwards compatibility, etc.
2) Re-run the sql/modules/chart.sql and sql/modules/Account.sql scripts.

Until this is done, you will be unable to update chart of accounts entries.  However, the rest of the application should continue to work as expected.

Best Wishes,
Chris Travers

Attachment (chart_changes.sql): application/octet-stream, 4898 bytes
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ledger-smb-devel mailing list
Ledger-smb-devel@...
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
Schmiechen | 12 Jun 2009 03:59
Favicon

accepting payments from email

Is anyone interested in setting up a invoice email template for accepting 
payments on invoices via paypal merchant services? Or writing a how to? Or 
chipping in on the cost of writing one.
I have been looking over paypal.pl and the old sql-ledger shopping cart code. 
We cant take payments on sales orders just invoices. Not to mention our 
customers dont need a shopping cart.
Paypal has a email invoices thing for outlook and qb I was thinking something 
along those lines.

-- 
Sincerely
Turtle

_________________________________________

FYI the .asc file is a digital signature
see http://en.wikipedia.org/wiki/Pretty_Good_Privacy for more info.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ledger-smb-devel mailing list
Ledger-smb-devel@...
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
Chris Travers | 12 Jun 2009 05:13

Chart of Accounts Status

I have converted nearly all of the charts to the new format.  The only exceptions are the Czech and the French chart of accounts sets which are not converting cleanly.

Best Wishes,
Chris Travers

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ledger-smb-devel mailing list
Ledger-smb-devel@...
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
Darren Wiebe | 12 Jun 2009 05:08
Favicon

Re: accepting payments from email

I can't contribute very much but I'd gladly contribute something.  How 
much work would this be?

Darren Wiebe
darren@...

Schmiechen wrote:
> Is anyone interested in setting up a invoice email template for accepting 
> payments on invoices via paypal merchant services? Or writing a how to? Or 
> chipping in on the cost of writing one.
> I have been looking over paypal.pl and the old sql-ledger shopping cart code. 
> We cant take payments on sales orders just invoices. Not to mention our 
> customers dont need a shopping cart.
> Paypal has a email invoices thing for outlook and qb I was thinking something 
> along those lines.
>
>   
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing 
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ledger-smb-devel mailing list
> Ledger-smb-devel@...
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
>   

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
Schmiechen | 12 Jun 2009 06:52
Favicon

Sort orders by partnumber?

Any clues how I can make orders & invoices sort by partnumber instead of 
running number?
Like adding something like a $form->{sortby} ||= "partnumber";
to affect the display of a form not just the printing?
OE.pm, io.pl or oe.pl?
-- 
Sincerely
Turtle

_________________________________________

FYI the .asc file is a digital signature
see http://en.wikipedia.org/wiki/Pretty_Good_Privacy for more info.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ledger-smb-devel mailing list
Ledger-smb-devel@...
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
Stroller | 12 Jun 2009 18:37
Picon

Re: accepting payments from email


On 12 Jun 2009, at 02:59, Schmiechen wrote:

> Is anyone interested in setting up a invoice email template for  
> accepting
> payments on invoices via paypal merchant services? Or writing a how  
> to? Or
> chipping in on the cost of writing one.
> I have been looking over paypal.pl and the old sql-ledger shopping  
> cart code.
> We cant take payments on sales orders just invoices. Not to mention  
> our
> customers dont need a shopping cart.
> Paypal has a email invoices thing for outlook and qb I was thinking  
> something
> along those lines.

Am not familiar with the email invoices thing for outlook, but it  
should be straight-forward to change the HTML email invoice (or even  
the PDF one??) to include a PayPal link.

Using the PayPal "button creator" I get this link for requesting a 

payment:

https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=foo%40bar%2ecom&lc=US&item_name=Invoice%201234&amount=99%2e99&currency_code=USD&button_subtype=products&bn=PP%2dBuyNowBF%3abtn_buynowCC_LG%2egif%3aNonHostedGuest

<https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=foo%40bar%2ecom&lc=US&item_name=Invoice%201234&amount=99%2e99&currency_code=USD&button_subtype=products&bn=PP%2dBuyNowBF%3abtn_buynowCC_LG%2egif%3aNonHostedGuest 
 >

This is for a payment of $99.99 to foo@... (your address) against  
invoice 1234.

It _should_ be easy to have LedgerSMB insert the appropriate amount &  
invoice number, and create a URL from the invoice template.

Of course, this doesn't mark the payment as made on your LedgerSMB  
system, but that is probably a bunch more complicated.

Stroller.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
Chris Travers | 14 Jun 2009 20:36

Chart of Accounts Status on Trunk

Hi all;

I have corrected a number of load issues on the charts of accounts.  As of now, every CoA file loads on trunk.  Offending tax lines have been deleted, and some invalid chart linkages have been corrected, as have some errors in my conversion.

Many of the CoA scripts require minor changes to be optimal, and a few (the Czech and French CoA's come to mind) are likely to require more changes before we get to 2.0.

One other point is that the CoA scripts must be loaded at some point after Account.sql.  Otherwise required functions/rules/etc. are not in place.

Best Wishes,
Chris Travers

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ledger-smb-devel mailing list
Ledger-smb-devel@...
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel

Gmane