/*
================================================================================
档案代号:ahb_file
档案名称:常用分摊传票单身档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table ahb_file
(
ahb00       varchar2(5) NOT NULL,    /*帐别                                   */
ahb000      varchar2(1) NOT NULL,    /*性质(1)固定金额常用传票                */
                                     /*        (2)固定比率分摊传票            */
                                     /*        (3)变动比率分摊传票            */
ahb01       varchar2(16) NOT NULL,   /*原始编号                               */
ahb02       number(5) NOT NULL,      /*项次                                   */
ahb03       varchar2(24),            /*科目编号                               */
ahb04       varchar2(80),            /*摘要                                   */
ahb05       varchar2(10),            /*部门                                   */
ahb06       varchar2(1),             /*借贷别                                 */
                                     /*借贷别(1.借/2.贷)                      */
ahb07       number(20,6),            /*异动金额 或比率                        */
                                     /*当aha000为1时本栏位为金额              */
                                     /*当aha000为2时本栏位为比率              */
                                     /*当aha000为3时本栏位为0                 */
ahb08       varchar2(10),            /*专案编号                               */
ahb11       varchar2(30),            /*异动码-1                               */
                                     /*异动码-1                (96/05/07)     */
ahb12       varchar2(30),            /*异动码-2                               */
                                     /*异动码-2                (96/05/07)     */
ahb13       varchar2(30),            /*异动码-3                               */
                                     /*异动码-3                (96/05/07)     */
ahb14       varchar2(30),            /*异动码-4                               */
ahb15       varchar2(10),            /*预算编号                               */
ahb16       varchar2(24),            /*变动比率分子科目                       */
ahb31       varchar2(30),            /*异动码-5                               */
                                     /*#FUN-5C0015                            */
ahb32       varchar2(30),            /*异动码-6                               */
                                     /*#FUN-5C0015                            */
ahb33       varchar2(30),            /*异动码-7                               */
                                     /*#FUN-5C0015                            */
ahb34       varchar2(30),            /*异动码-8                               */
                                     /*#FUN-5C0015                            */
ahb35       varchar2(30),            /*异动码-9                               */
                                     /*#FUN-5C0015                            */
ahb36       varchar2(30),            /*异动码-10                              */
                                     /*#FUN-5C0015                            */
ahb37       varchar2(30)             /*关系人异动码                           */
                                     /*#FUN-5C0015                            */
);

create        index ahb_02 on ahb_file (ahb03);
create unique index ahb_pk on ahb_file (ahb01,ahb02,ahb00,ahb000);
alter table ahb_file add  constraint ahb_pk primary key  (ahb01,ahb02,ahb00,ahb000) enable validate;
grant select on ahb_file to public;
grant index on ahb_file to public;
grant update on ahb_file to public;
grant delete on ahb_file to public;
grant insert on ahb_file to public;