From aa82ca8ad1112b9c41797ab48ac1a5bcd6a32956 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Mon, 29 Apr 2013 12:11:31 +0200 Subject: [PATCH] custumer property exempt_vat --- hsarback/database/data.sql | 4 ++-- hsarback/database/schema.sql | 1 + hsarback/src/de/hsadmin/mods/cust/Customer.java | 11 +++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hsarback/database/data.sql b/hsarback/database/data.sql index 90ff719..7f4c048 100644 --- a/hsarback/database/data.sql +++ b/hsarback/database/data.sql @@ -61,8 +61,8 @@ INSERT INTO component (basepacket_id, basecomponent_id, min_quantity, max_quanti -- -- Table: business_partner -- -INSERT INTO business_partner (member_id, member_code, member_since, shares_signed, free, indicator_vat) - VALUES (10000, 'hsh00-hsh', current_date, 0, TRUE, 'NET'); +INSERT INTO business_partner (member_id, member_code, member_since, shares_signed, free, indicator_vat, exempt_vat) + VALUES (10000, 'hsh00-hsh', current_date, 0, TRUE, 'NET', FALSE); -- -- table: contact diff --git a/hsarback/database/schema.sql b/hsarback/database/schema.sql index 60ba901..33d435f 100644 --- a/hsarback/database/schema.sql +++ b/hsarback/database/schema.sql @@ -122,6 +122,7 @@ CREATE TABLE business_partner ( uid_vat character varying(20), free boolean NOT NULL, indicator_vat character varying(20) NOT NULL, + exempt_vat boolean NOT NULL, CONSTRAINT ckc_member_id_business CHECK (((member_id >= 10000) AND (member_id <= 99999))), CONSTRAINT ckc_shares_signed_business CHECK ((shares_signed >= 0)), CONSTRAINT ckt_business_partner CHECK ( ( ((member_since IS NULL) AND (member_until IS NULL)) OR ((member_since IS NOT NULL) AND (member_until IS NULL)) OR ((member_since IS NOT NULL) AND (member_until IS NOT NULL) AND (member_since < member_until)) ) AND ((member_code)::text ~~ 'hsh00-%'::text)), diff --git a/hsarback/src/de/hsadmin/mods/cust/Customer.java b/hsarback/src/de/hsadmin/mods/cust/Customer.java index 5d9c987..41d2a5a 100644 --- a/hsarback/src/de/hsadmin/mods/cust/Customer.java +++ b/hsarback/src/de/hsadmin/mods/cust/Customer.java @@ -79,6 +79,9 @@ public class Customer extends AbstractEntity implements Serializable { @Column(name = "free", nullable = false) private boolean free = false; + @Column(name = "exempt_vat", nullable = false) + private boolean exemptVAT = false; + @Column(name = "indicator_vat", nullable = false) @Basic @Enumerated(EnumType.STRING) @@ -304,4 +307,12 @@ public class Customer extends AbstractEntity implements Serializable { public void setIndicatorVAT(IndicatorVAT indicatorVAT) { this.indicatorVAT = indicatorVAT; } + + public boolean isExemptVAT() { + return exemptVAT; + } + + public void setExemptVAT(boolean exemptVAT) { + this.exemptVAT = exemptVAT; + } }