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;