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

Re: POS Screen - Errors when posting an invoice



..hidden.. wrote on 05/31/2008 
03:57:01 PM:

> "Chris Travers" <..hidden..> 
> Sent by: ..hidden..
> 
> 05/31/2008 03:57 PM
> 
> Please respond to
> ..hidden..
> 
> To
> 
> ..hidden..
> 
> cc
> 
> Subject
> 
> Re: [Ledger-smb-users] POS Screen - Errors when posting an invoice
> 
> On Thu, May 29, 2008 at 6:35 PM,  <..hidden..> wrote:
> 
> >
> >
> > Yes.  Here are the errors I received.  I cut out some misc. items from 
the
> > log that were not relevant.
> >
> > ..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 exist  setval
> > --------
> >
> >
> > psql:tatyleebackup.sql:92: ERROR:  relation "session_session_id_seq" 
does
> > not exist  setval
> 
> >
> >
> > psql:tatyleebackup.sql:120: ERROR:  insert or update on table 
"acc_trans"
> > violates 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"
> >
> 
> Hmm... Your backup/restore procedure is hosed-- stuff is restored in
> the wrong order.  Which version of PostgreSQL are you running?
> 
> Also some tables like defaults have differnet column names, so just
> doing a data dump/restore may create problems (this is not the only
> thing happening here though).
> 
> Best Wishes,
> Chris Travers
> 
> Best Wishes,
> Chris Travers
> 
> 
-------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Ledger-smb-users mailing list
> ..hidden..
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-users

First off, the backup I generated was from a SQL-Ledger migrated database. 
 In otherwords, this was done after I followed the LedgerSMB steps to 
migrate, and then tried restoring back into a new LedgerSMB database. 
Secondly, for some reason I don't see my updated information in the 
mailing list archives so not sure if you are getting them.  Here is the 
latest.  I think I have solved many of the issues resulting from the 
SQL-Ledger to LedgerSMB migration and want to post my steps here for 
others who have similar issues.  The main blocking issue was "ERROR: 
permission denied for relation ar".  In addition, it appears that there is 
a bug in Pg-upgrade-2.6.17-2.6.18.sql which names a sequence incorrectly. 
Here are the steps I have taken so far to resolve my issues.

1. Conected to my database via psql and issues the following command: 
"alter table acctrans_entry_id_seq RENAME TO acc_trans_entry_id_seq;".  It 
appears that Pg-upgrade-2.6.17-2.6.18.sql incorrectly names this sequence.

2. Via pgAdmin, I created individual backups (tar files) of the following 
tables
 
        - ar
        - parts
        - partstax

3.  Dropped the following tables

        - ar
        - parts (needed to use Drop Cascaded)
        - partstax

4.  Restored the following tables in order using the following command

        pg_restore -d <database name> <backup tar name>  (i.e. pg_restore 
-d tatylee partstax_backup.tar)

        - ar
        - parts
        - partstax

I can now post Sales invoices from the POS screen and no longer get the 
permission denied for relation error.  I still have one issue currently 
that I am aware of.  When I click the Print and Post button, although the 
sale gets posted, the receipt gets displayed in the browser window instead 
of being sent to the receipt printer.  Not sure if this is related, but I 
commented out the following line in my pos.conf.pl as advised to correct 
another issue.  Could this be related?

# Removed this as advised by Chris Travers to resolve a performance issue 
with updates on the POS screen- SLM 05/28/2008
#${'LedgerSMB::Sysconfig::printer'}{'Printer'} = "utils/pos/directnet.pl 
$pos_config{rp_host} $pos_config{rp_proto} $pos_config{rp_port}";

I would appreciate any help trying to resolve the receipt printing issue. 
I do have the printers setup ledgersmb.conf and can send print jobs via 
`lpr -P Star_TSP643U file.txt' using the command line from a Unix shell so 
I know this works outside of LedgerSMB.  In addition, SQL-Ledger is still 
installed on the same machine and I have no problems printing from there.  
This is LedgerSMB specific.

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!"