====== pears.IQacParams ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Description ===== Default invoice settings ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **DBID** | char(2) | NOT NULL | | | | LastDocumentNumber | integer | NULL | | | | Name | char(50) | NULL | | | | Version | smallint | NULL | | | | CountryCode | char(3) | NOT NULL | | | | CurrencyCode | char(3) | NOT NULL | | | | VATNumber | char(20) | NULL | | | | ReserveNominalCode | char(12) | NULL | | | | LockDate | date | NULL | | | | LastPrintBatch | integer | NULL | | | | LastTransferBatch | integer | NULL | | | | CashAccounting | smallint | NULL | | | | DefaultVATCode | char(3) | NULL | | | | UnallocatedCashVATCode | char(3) | NULL | | | | DefaultPaymentMethod | char(3) | NULL | | | ===== Primary Key ===== * DBID ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | IQacCountry | CountryCode | [[database:tables:pears_iqaccountry|pears.IQacCountry (CountryCode)]] | NOT NULL; | | IQacCurrency | CurrencyCode | [[database:tables:pears_iqaccurrency|pears.IQacCurrency (CurrencyCode)]] | NOT NULL; | | IQacNominal | ReserveNominalCode | [[database:tables:pears_iqacnominal|pears.IQacNominal (NominalCode)]] | | | IQacPaymentMethod | DefaultPaymentMethod | [[database:tables:pears_iqacpaymentmethod|pears.IQacPaymentMethod (PaymentMethodCode)]] | | | IQacVATRate | DefaultVATCode | [[database:tables:pears_iqacvatrate|pears.IQacVATRate (VATCode)]] | | | IQacVATRate1 | UnallocatedCashVATCode | [[database:tables:pears_iqacvatrate|pears.IQacVATRate (VATCode)]] | | ===== Referenced By ===== * No incoming foreign keys found. ===== Indexes ===== * No indexes found. ===== Triggers ===== * No triggers found. ===== Original SQL ===== -- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."IQacParams" -- Table comment: Default invoice settings -- Statement count: 8 CREATE TABLE "pears"."IQacParams" ( "DBID" char(2) NOT NULL ,"LastDocumentNumber" integer NULL ,"Name" char(50) NULL ,"Version" smallint NULL ,"CountryCode" char(3) NOT NULL ,"CurrencyCode" char(3) NOT NULL ,"VATNumber" char(20) NULL ,"ReserveNominalCode" char(12) NULL ,"LockDate" date NULL ,"LastPrintBatch" integer NULL ,"LastTransferBatch" integer NULL ,"CashAccounting" smallint NULL ,"DefaultVATCode" char(3) NULL ,"UnallocatedCashVATCode" char(3) NULL ,"DefaultPaymentMethod" char(3) NULL ,PRIMARY KEY ("DBID" ASC) ) go COMMENT ON TABLE "pears"."IQacParams" IS 'Default invoice settings' go ALTER TABLE "pears"."IQacParams" ADD NOT NULL FOREIGN KEY "IQacCountry" ("CountryCode" ASC) REFERENCES "pears"."IQacCountry" ("CountryCode") go ALTER TABLE "pears"."IQacParams" ADD NOT NULL FOREIGN KEY "IQacCurrency" ("CurrencyCode" ASC) REFERENCES "pears"."IQacCurrency" ("CurrencyCode") go ALTER TABLE "pears"."IQacParams" ADD FOREIGN KEY "IQacNominal" ("ReserveNominalCode" ASC) REFERENCES "pears"."IQacNominal" ("NominalCode") go ALTER TABLE "pears"."IQacParams" ADD FOREIGN KEY "IQacPaymentMethod" ("DefaultPaymentMethod" ASC) REFERENCES "pears"."IQacPaymentMethod" ("PaymentMethodCode") go ALTER TABLE "pears"."IQacParams" ADD FOREIGN KEY "IQacVATRate" ("DefaultVATCode" ASC) REFERENCES "pears"."IQacVATRate" ("VATCode") go ALTER TABLE "pears"."IQacParams" ADD FOREIGN KEY "IQacVATRate1" ("UnallocatedCashVATCode" ASC) REFERENCES "pears"."IQacVATRate" ("VATCode") go