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

Re: Receiving inventory is not working.



Thanks. 

Looking through the code it looks like an issue with your database schema not being fully upgraded as expected.  Please try to run the following commands via psql:

ALTER TABLE ar DISABLE TRIGGER ALL;
ALTER TABLE ap DISABLE TRIGGER ALL;

ALTER TABLE ap ADD COLUMN crdate date;
ALTER TABLE ar ADD COLUMN crdate date;

UPDATE ap SET crdate=transdate;
UPDATE ar SET crdate=transdate;

COMMENT ON COLUMN ap.crdate IS
$$ This is for recording the AR/AP creation date, which is always that date, when the invoice created. This is different, than transdate or duedate.
This kind of date does not effect on ledger/financial data, but for administrative purposes in Hungary, probably in other countries, too.
Use case:
if somebody pay in cash, crdate=transdate=duedate
if somebody will receive goods T+5 days and have 15 days term, the dates are the following:  crdate: now,  transdate=crdate+5,  duedate=transdate+15.
There are rules in Hungary, how to fill out a correct invoice, where the crdate and transdate should be important.$$;

COMMENT ON COLUMN ar.crdate IS
$$ This is for recording the AR/AP creation date, which is always that date, when the invoice created. This is different, than transdate or duedate.
This kind of date does not effect on ledger/financial data, but for administrative purposes in Hungary, probably in other countries, too.
Use case:
if somebody pay in cash, crdate=transdate=duedate
if somebody will receive goods T+5 days and have 15 days term, the dates are the following:  crdate: now,  transdate=crdate+5,  duedate=transdate+15.
There are rules in Hungary, how to fill out a correct invoice, where the crdate and transdate should be important.$$;

ALTER TABLE ar ENABLE TRIGGER ALL;
ALTER TABLE ap ENABLE TRIGGER ALL;

Normally these run as a transaction and would all succeed or fail.  It sounds like they failed.  Running them separately should bring everything up to a current state.




On Wed, Jan 29, 2014 at 6:55 AM, M Lubratt <..hidden..> wrote:
Thanks, Chris!  That part is now working again and I see my error now.  I did encounter the following regression on 1.3.37-rc3 when I tried to view a specific invoice.

From the Apache error.log:

[Wed Jan 29 08:46:24 2014] [error] [client 192.168.1.108] Math::BigInt: couldn't load specified math lib(s), fallback to Math::BigInt::Calc at LedgerSMB/Form.pm line 61., referer: http://192.168.1.127/ledgersmb/ap.pl?login=mpl&action="">
[Wed Jan 29 08:46:27 2014] [error] [client 192.168.1.108] DBD::Pg::st execute failed: ERROR:  column a.crdate does not exist, referer: http://192.168.1.127/ledgersmb/ap.pl
[Wed Jan 29 08:46:27 2014] [error] [client 192.168.1.108] LINE 12:                                 a.on_hold, a.crdate, referer: http://192.168.1.127/ledgersmb/ap.pl
[Wed Jan 29 08:46:27 2014] [error] [client 192.168.1.108]                                                     ^ at LedgerSMB/Form.pm line 2630., referer: http://192.168.1.127/ledgersmb/ap.pl
[Wed Jan 29 08:46:27 2014] [error] [client 192.168.1.108] DBD::Pg::st execute failed: ERROR:  current transaction is aborted, commands ignored until end of transaction block at LedgerSMB.pm line 833., referer: http://192.168.1.127/ledgersmb/ap.pl
[Wed Jan 29 08:46:27 2014] [error] [client 192.168.1.108] 2014/01/29 08:46:27 - ERROR - LedgerSMB::dberror LedgerSMB.pm (1099) -- Logging SQL State 25P02, error 7, string ERROR:  current transaction is aborted, commands ignored until end of transaction block, referer: http://192.168.1.127/ledgersmb/ap.pl
[Wed Jan 29 08:46:27 2014] [error] [client 192.168.1.108] Can't use string ("LedgerSMB::Setting") as a HASH ref while "strict refs" in use at LedgerSMB.pm line 941., referer: http://192.168.1.127/ledgersmb/ap.pl
[Wed Jan 29 08:46:27 2014] [error] [client 192.168.1.108] Compilation failed in require at /usr/local/ledgersmb/ir.pl line 7., referer: http://192.168.1.127/ledgersmb/ap.pl
[Wed Jan 29 08:46:27 2014] [error] [client 192.168.1.108] Premature end of script headers: ir.pl, referer: http://192.168.1.127/ledgersmb/ap.pl

-Mark


On Tue, Jan 28, 2014 at 8:49 PM, Chris Travers <..hidden..> wrote:
On the AR/AP transaction reports, I see your bug report.  This was fixed in 1.3.37-rc1 I think.  I am getting 1.3.37-rc3 out today and am hoping for a full release on Monday if no other regressions are found.

Best Wishes,
Chris Travers


On Tue, Jan 28, 2014 at 6:44 PM, Chris Travers <..hidden..> wrote:



On Tue, Jan 28, 2014 at 3:12 PM, M Lubratt <..hidden..> wrote:
Good afternoon!

I'm trying to receive inventory.  I used the Shipping | Receive screen.  When I try to look at the current inventory, the received inventory doesn't show up.

Correct.  Inventory numbers are not adjusted until invoices are posted.  You have to invoice.  Then the inventory will show up.

This is necessary because otherwise, the old SQL-Ledger code can't handle very well what happens when you combine an invoice for received goods with line items for additional ones.  In theory this shouldn't happen frequently, but in practice it does and was throwing the onhand numbers off.
 
 Then I went to the Report | Inventory Activity report.  That report shows all of the inventory I received is showing sold.

I don't think that can happen.  these reports only hit the invoice table.  If you click through you should get a list of ar or ap invoices with the relevant portions.
 
 I'm at a loss for how this happened.  I'm trying to run AP and AR reports to see if there's a weird transaction that happened, but those report aren't working for me under LSMB 1.3.36.

What is happening there?  

Does anyone have a suggestion?

Thanks!
Mark

Perl 5.14.2
LSMB 1.3.36
Ubuntu 12.04.4


------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users




--
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor lock-in.



--
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor lock-in.

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users



------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users




--
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor lock-in.
http://www.efficito.com/learn_more.shtml
------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users