Table of Contents



pears.IQacAllocation

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

Description

Allocates payments against invoices in cash accounting.

Columns

Column Type Null Default Comment
AllocationDocumentID char(8) NOT NULL
AllocatedDocumentID char(8) NOT NULL
AllocatedLineNumber smallint NOT NULL
AllocatedAmount numeric(12,2) NOT NULL
AllocatedVAT numeric(12,2) NOT NULL
AllocationDate date NOT NULL

Primary Key

Foreign Keys

Constraint Columns References Delete/update action
Journal AllocatedDocumentID, AllocatedLineNumber pears.IQacJournal (DocumentID, LineNumber) NOT NULL;
IQacDocument AllocationDocumentID pears.IQacDocument (DocumentID) NOT NULL;

Referenced By

Indexes

Triggers

Original SQL

-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."IQacAllocation"
-- Table comment: Allocates payments against invoices in cash accounting.
-- Statement count: 4
 
CREATE TABLE "pears"."IQacAllocation" (
    "AllocationDocumentID"           CHAR(8) NOT NULL
   ,"AllocatedDocumentID"            CHAR(8) NOT NULL
   ,"AllocatedLineNumber"            SMALLINT NOT NULL
   ,"AllocatedAmount"                NUMERIC(12,2) NOT NULL
   ,"AllocatedVAT"                   NUMERIC(12,2) NOT NULL
   ,"AllocationDate"                 DATE NOT NULL
   ,PRIMARY KEY ("AllocationDocumentID" ASC,"AllocatedDocumentID" ASC,"AllocatedLineNumber" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."IQacAllocation" IS 
	'Allocates payments against invoices in cash accounting.'
GO
 
 
ALTER TABLE "pears"."IQacAllocation"
    ADD NOT NULL FOREIGN KEY "Journal" ("AllocatedDocumentID" ASC,"AllocatedLineNumber" ASC)
    REFERENCES "pears"."IQacJournal" ("DocumentID","LineNumber")
GO
 
 
ALTER TABLE "pears"."IQacAllocation"
    ADD NOT NULL FOREIGN KEY "IQacDocument" ("AllocationDocumentID" ASC)
    REFERENCES "pears"."IQacDocument" ("DocumentID")
GO