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

Re: Internal Server Error - LedgerSMB 1.3.37



 
 
----------------eredeti üzenet-----------------
Feladó: "Arne Hanssen" 
Címzett: ..hidden.. 
Dátum: Sat, 15 Feb 2014 16:03:25 +0100
-------------------------------------------------
 
> 
> acmedb=# ALTER TABLE ap ADD crdate date;
> ALTER TABLE
> acmedb=# ALTER TABLE ar ADD crdate date;
> ALTER TABLE
> 
> Stille error message. Did setup.pl again. Still error message. Filled in 
> 'Invoice Created' field with same date as 'Invoice Date' (tried that 
> also before I asked for help), and then it worked. Thanks a lot! :-)
> 
> I didn't have to to that before. Is this something new? I'm okay with 
> that, but out of curiosity: what's difference / purpose of two date 
> fields for Invoice? (Or may I wish for automatic copying value from 
> 'Invoice Date' if 'Invoice Created' is left blank?)
> 

Hi,

Here is the comment of this field from the sql file:
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.';


In fact, there are rules, which describe, when will be an invoice valid or invalid, typically made by the government.

Some rules:
1. The government created the rule to include the creation date. Without that, impossible to use this software.
2. The government created the rule, creation date must be +/- 15 days from transdate. Without crdate, it is nearly impossible (or just very-very inconvenient and unpractical) to track and include this information in all invoices (AR/AP).
3. Without this kind of rules, it is easy to issue a new invoice in middle of December with transdate/due date for 11 months ago, January, which could be 3 tax period earlier. Plus, without this information it is possible to start some law things against that customer by a cheater: I issue a new invoice in December in 2013, but I set transdate to January in 2013 and I go to the court of justice
because my customer did not pay in time (January?).

In fact, creation date should be a useful plus information in most of the case, in same countries it is a have-to information, otherwise this software simply useless.

This modification initiated by myself with helps from Chris, after we discussed this situation. It seemed safe enough to commit.

May I ask what is the version of your Postgresql server?
And an other ask, could you check your content of the sql/modules/Fixes.sql? Near to the end you should see this part, which should run at rebuild process:

BEGIN;
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;

COMMIT;

Bye,
István








------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users