summaryrefslogtreecommitdiff
path: root/sql/modules/Customer.sql
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-20 19:43:27 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-20 19:43:27 +0000
commite783d17dd9470f2dc2868e05119ea5bdaf0d00aa (patch)
tree770bfad486cb81c8d2ca6782215026f09668bd9c /sql/modules/Customer.sql
parent8143605207345275a28029130b9491a2a31022c9 (diff)
A few more Customer improvements
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1882 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql/modules/Customer.sql')
-rw-r--r--sql/modules/Customer.sql7
1 files changed, 2 insertions, 5 deletions
diff --git a/sql/modules/Customer.sql b/sql/modules/Customer.sql
index 6071bc4a..7f2a8da0 100644
--- a/sql/modules/Customer.sql
+++ b/sql/modules/Customer.sql
@@ -54,10 +54,6 @@ CREATE OR REPLACE FUNCTION entity_credit_save (
) returns INT as $$
- -- does not require entity_class, as entity_class is a known given to be 1
-
- -- Maybe we should make this generic and pass through? -- CT
-
DECLARE
t_entity_class int;
new_entity_id int;
@@ -99,7 +95,7 @@ CREATE OR REPLACE FUNCTION entity_credit_save (
VALUES (
new_entity_id,
in_entity_class,
- in_discount,
+ in_discount / 100,
in_taxincluded,
in_creditlimit,
in_terms,
@@ -116,6 +112,7 @@ CREATE OR REPLACE FUNCTION entity_credit_save (
-- entity note class
insert into entity_note (note_class, note, ref_key, vector) VALUES (
1, in_notes, new_entity_id, '');
+
return new_entity_id;
ELSIF FOUND THEN