[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: POS Screen - Errors when posting an invoice



I am still researching my issue and have come to the conclusion that the 
SQL-Ledger to LedgerSMB migration has screwed up my database.  I am hoping 
someone can help me fix this.

1.  I created two new datasets via the LedgerSMB admin.pl.  I then 
compared these two databases, via pgAdmin,  with my migrated SQL-Ledger 
database and noticed that my migrated SQL-Ledger database had one extra 
Sequence (session_session_id_seq) and one extra table (session).  I also 
noticed that one of my sequences is named "acctrans_entry_id_seq" in the 
SQL-Ledger database, while in my new LedgerSMB database it is called 
"acc_trans_entry_id_seq".

2.  I also did a pg_dump of my migrated SQL-Ledger database (i.e. 
tatylee).  The imported that data back into my new LedgerSMB test 
database.  See the error messages below.  If I login to LedgerSMB using 
the new dataset that I just imported data into, I am able to create a POS 
sale and upon clicking Print & Post, the sale does post.  The receipt 
doesn't get sent to the printer though and I have some other display 
anomalies.  At least I am not getting the permission error with the ar 
relation.

3.  Although some of the data appears to be in my test database after 
restoring my backup data into, I noticed other anomalies. For example, it 
doesn't appear that my data from the defaults table was included in my 
backup, therefore, it didn't get restored into my test database


..hidden..:~/data> pg_dump -a tatylee > tatyleebackup.sql
..hidden..:~/data> psql -d ledgersmbtest -f tatyleebackup.sql
SET
SET
SET
SET
psql:tatyleebackup.sql:15: ERROR:  relation "acctrans_entry_id_seq" does 
not exi
st
 setval
--------
  13661
(1 row)

 setval
--------
   1615
(1 row)

 setval
--------
      1
(1 row)

 setval
--------
      1
(1 row)

 setval
--------
     15
(1 row)

 setval
--------
   5901
(1 row)

 setval
--------
      1
(1 row)

 setval
--------
     45
(1 row)

 setval
--------
      1
(1 row)

 setval
--------
     43
(1 row)

psql:tatyleebackup.sql:92: ERROR:  relation "session_session_id_seq" does 
not ex
ist
 setval
--------
      1
(1 row)

 setval
--------
      1
(1 row)

 setval
--------
      1
(1 row)

psql:tatyleebackup.sql:120: ERROR:  insert or update on table "acc_trans" 
violat
es foreign key constraint "acc_trans_chart_id_fkey"
DETAIL:  Key (chart_id)=(10014) is not present in table "chart".
psql:tatyleebackup.sql:14190: ERROR:  duplicate key violates unique 
constraint "
chart_pkey"
CONTEXT:  COPY chart, line 1: "10001    1000    CURRENT ASSETS  H       A  
   f
"
psql:tatyleebackup.sql:15151: ERROR:  duplicate key violates unique 
constraint "
defaults_pkey"
CONTEXT:  COPY defaults, line 2: "audittrail    1"
psql:tatyleebackup.sql:15194: ERROR:  duplicate key violates unique 
constraint "
dpt_trans_pkey"
CONTEXT:  COPY dpt_trans, line 58: "10148       10081"
psql:tatyleebackup.sql:24676: ERROR:  relation "session" does not exist
psql:tatyleebackup.sql:24677: invalid command \.
psql:tatyleebackup.sql:25122: ERROR:  duplicate key violates unique 
constraint "
taxmodule_pkey"
CONTEXT:  COPY taxmodule, line 1: "1    Simple"
psql:tatyleebackup.sql:25131: ERROR:  duplicate key violates unique 
constraint "
transactions_pkey"
CONTEXT:  COPY transactions, line 1: "10148     ap"


Steven Marshall/Tekmerge wrote on 05/29/2008 01:55:44 PM:

> Steven Marshall/Tekmerge
> 05/29/2008 01:55 PM
> 
> To
> 
> ..hidden.., 
..hidden..
> 
> cc
> 
> Subject
> 
> Re: POS Screen - Errors when posting an invoice
> 
> OK.  I fixed the issue where I couldn't generate a PDF.  It turns 
> out that when I copied my settings from sql-ledger.conf to 
> ledgersmb.conf I had a typo in the following line:
> 
> WRONG:  PATH: /usr/local/texlive/2007/bin/i386-linux";
> CORRECT: PATH: /usr/local/texlive/2007/bin/i386-linux
> 
> This was due to ledgersmb using more of a ini format and I 
> accidentally didn't remove the ending ";.  So now I have PDF, latex,
> etc. working.  I am back to my original problem where I am getting 
> 1) The receipt is displayed in the browser window instead of being 
> sent to the receipt printer, and 2) DBD::Pg::st execute failed: 
> ERROR:  permission denied for relation ar seen both in the browser 
> and also in my postgresql logs.  Not sure, but I suspect that if I 
> can resolve the relation permission error that the other part will 
> also get resolved.  Any ideas?
> 
> Best Regards,
> Steven Marshall
> 
> Taty Lee Boutique
> 11705 Jones Bridge Rd., B206
> Alpharetta, GA 30005
> 770-410-6964
> 
> "Once you experience the stylish comfort of Brazilian-cut jeans, you
> will demand nothing less!"
> 
> >Steven Marshall/Tekmerge wrote on 05/28/2008 05:36:28 PM:
> 
> > Steven Marshall/Tekmerge 
> > 05/28/2008 05:36 PM
> > 
> > To
> > 
> > ..hidden.., ledger-smb-
> ..hidden..
> > 
> > cc
> > 
> > Subject
> > 
> > POS Screen - Errors when posting an invoice
> > 
> > I am having several issues trying to post an invoice via the POS Add
> > Invoice screen.  This is a recent SQL-Ledger to LedgerSMB migration.
> > When I create a sale and click on Print and Post, I get two issues.
> > 
> > 1. The receipt is displayed in the browser window instead of being 
> > sent to the receipt printer.  This worked with SQL-Ledger and I 
> > haven't done anything special from a configuration standpoint after 
> > the migration so maybe I missed something.
> > 
> > 2. I am getting a permission error as shown here:
> > 
> > DBD::Pg::st execute failed: ERROR:  permission denied for relation ar
> > Error!
> > 
> > INSERT INTO ar (invnumber, customer_id, employee_id)
> > VALUES ('Wed May 28 16:12:48 200821666', ?, ?)
> > ERROR: permission denied for relation ar
> > 
> > I have verified ownership and even did a "GRANT ALL on table ar to 
> > ledgersmb" just to make sure.   The permissions in psql show all 
> > permissions including Insert for ledgersmb.  I can go to AR/Reports/
> > Transactions and have no issues generating a report which is using 
> > the ar table.  I fear I am going to have to move back to SQL-Ledger 
> > if I can't get this corrected very quickly.  Anybody have any ideas 
> > on how to resolve this.
> > 
> > Best Regards,
> > Steven Marshall
> > 
> > Taty Lee Boutique
> > 11705 Jones Bridge Rd., B206
> > Alpharetta, GA 30005
> > 770-410-6964
> > 
> > "Once you experience the stylish comfort of Brazilian-cut jeans, you
> > will demand nothing less!"