WorkFerret/tables/invoice

From Woozle Writes Code
< WorkFerret‎ | tables
Revision as of 02:35, 29 January 2010 by Woozle (talk | contribs) (Created page with '==About== * '''History''': ** '''2010-01-28''' Adapted from MS Access version * '''Fields''': ** '''InvcSeq''' is used to generate the invoice number. I'm thinking [invc ID [zero…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • History:
    • 2010-01-28 Adapted from MS Access version
  • Fields:
    • InvcSeq is used to generate the invoice number. I'm thinking [invc ID [zero-padded]]-[invc pfx]-[InvcSeq] would be sortable and would provide a validity check (i.e. nobody could just make one up because of the ID).

SQL

<mysql>DROP TABLE IF EXISTS `invoice`; CREATE TABLE `invoice` (

 `ID`          INT(4)       NOT NULL AUTO_INCREMENT,
 `ID_Proj`     INT(4)       NOT NULL COMMENT "Project to which this invoice applies",
 `InvcSeq`     VARCHAR(7)   NOT NULL COMMENT "Invoice sequence number",
 `TotalAmt`    DECIMAL(9,2) NOT NULL COMMENT "total amount billed",
 `WhenCreated` DATETIME     NOT NULL COMMENT "when the invoice was created",
 `WhenSent`    DATETIME DEFAULT NULL COMMENT "when the invoice was sent out to the client",
 `WhenPaid`    DATETIME DEFAULT NULL COMMENT "when payment was received on this invoice",
 `WhenVoid`    DATETIME DEFAULT NULL COMMENT "when this invoice was cancelled or otherwise nullified",
  PRIMARY KEY(`ID`)

) ENGINE=MyISAM;</mysql>