Hermes & Invoicing

"Jason M. Felice" <[email protected]> Fri, 11 Mar 2005 12:30:55 -0500
Newsgroups gmane.comp.horde.hermes
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------080501010408040901080409
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit


I'm working out the invoicing stuff, and I'm posting this patch for 
feedback... mostly from Chuck, since I know he's looking for invoicing 
(but, feedback from anybody is welcome).

How does this look for invoice table structure?

-- 
 Jason M. Felice
 Cronosys, LLC <http://www.cronosys.com/>
 216.221.4600 x302


--------------080501010408040901080409
Content-Type: text/x-patch;
 name="foo.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="foo.diff"

Index: scripts/sql/hermes.sql
===================================================================
RCS file: /repository/hermes/scripts/sql/hermes.sql,v
retrieving revision 1.6
diff -u -r1.6 hermes.sql
--- scripts/sql/hermes.sql	11 Mar 2005 11:22:37 -0000	1.6
+++ scripts/sql/hermes.sql	11 Mar 2005 17:30:38 -0000
@@ -47,6 +47,35 @@
 );
 
 CREATE INDEX hermes_deliverables_client ON hermes_deliverables (client_id, deliverable_name);
+
+CREATE TABLE hermes_invoice_batches (
+    batch_id     INT NOT NULL,
+    batch_date   INT NOT NULL,
+    batch_closed SMALLINT NOT NULL DEFAULT 0,
+--
+    PRIMARY KEY (batch_id)
+);
+
+CREATE TABLE hermes_invoices (
+    invoice_id      INT NOT NULL,
+    batch_id        INT NOT NULL,
+    client_id       VARCHAR(250) NOT NULL,
+--
+    PRIMARY KEY (invoice_id)
+);
+
+CREATE TABLE hermes_invoice_items (
+    item_id          INT NOT NULL,
+    invoice_id       INT NOT NULL,
+    item_hours       NUMERIC(10,2),
+    item_rate        NUMERIC(10,2),
+    item_amount      NUMERIC(12,2) NOT NULL,
+    item_description TEXT NOT NULL,
+    item_note        TEXT NOT NULL,
+    deliverable_id   INT,
+--
+    PRIMARY KEY (item_id)
+);
  
 GRANT SELECT, INSERT, UPDATE, DELETE ON hermes_timeslices TO horde;
 GRANT SELECT, INSERT, UPDATE, DELETE ON hermes_jobtypes TO horde;

--------------080501010408040901080409
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-- 
hermes mailing list - Join the hunt: http://horde.org/bounties/#hermes
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]

--------------080501010408040901080409--