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

Re: SF.net SVN: ledger-smb:[6698] trunk/sql/modules/arap.sql



Hi Herman,

Just noticed this commit (I'm trying to review all commits, not just yours, it's just that this one drew my attention in particular):

On Tue, Jan 28, 2014 at 5:08 PM, <..hidden..> wrote:
Revision: 6698
          http://sourceforge.net/p/ledger-smb/code/6698
Author:   tshvr
Date:     2014-01-28 16:08:39 +0000 (Tue, 28 Jan 2014)
Log Message:
-----------
  mimic AA.pm,sub post_transaction in PLPGSQL function

Modified Paths:
--------------
    trunk/sql/modules/arap.sql

Modified: trunk/sql/modules/arap.sql
===================================================================
--- trunk/sql/modules/arap.sql  2014-01-28 15:01:05 UTC (rev 6697)
+++ trunk/sql/modules/arap.sql  2014-01-28 16:08:39 UTC (rev 6698)
@@ -185,7 +185,7 @@
  duedate=coalesce(in_duedate,'today');
  crdate=now();

- IF in_invnumber IS NULL THEN
+ IF in_invnumber IS NULL OR (length(trim(in_invnumber))=0) THEN
   select setting_increment::text INTO invnumber FROM setting_increment('vinumber');
  ELSE
   invnumber=in_invnumber;


As I don't know what problem you ran into, I'm missing a bit of context here, but in general it strikes me as odd to use a number of different values as "no value specified" indicators. Maybe in this case it's completely logical though. Could you explain a bit what you were running into, so I/we understand this change?


--
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.