ACR_INVOICE_BATCH_LN.sql 4.52 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
-- Create table
create table ACR_INVOICE_BATCH_LN
(
  invoice_batch_ln_id      NUMBER not null,
  invoice_hd_id            NUMBER not null,
  line_type                VARCHAR2(30) not null,
  line_number              NUMBER,
  cashflow_id              NUMBER,
  cf_item                  NUMBER,
  cf_type                  NUMBER,
  product_id               NUMBER,
  product_name             VARCHAR2(2000),
  specification            VARCHAR2(2000),
  quantity                 NUMBER,
  uom                      VARCHAR2(30),
  price                    NUMBER,
  price_quantity           NUMBER,
  price_quantity_uom       VARCHAR2(30),
  net_price                NUMBER,
  tax_type_id              NUMBER,
  tax_type_rate            NUMBER,
  tax_included_flag        VARCHAR2(1),
  tax_amount               NUMBER,
  net_amount               NUMBER,
  total_amount             NUMBER,
  responsibility_center_id NUMBER,
  account_id               NUMBER,
  description              VARCHAR2(1000),
  ref_v01                  VARCHAR2(2000),
  ref_v02                  VARCHAR2(2000),
  ref_v03                  VARCHAR2(2000),
  ref_v04                  VARCHAR2(2000),
  ref_v05                  VARCHAR2(2000),
  ref_v06                  VARCHAR2(2000),
  ref_v07                  VARCHAR2(2000),
  ref_v08                  VARCHAR2(2000),
  ref_v09                  VARCHAR2(2000),
  ref_v10                  VARCHAR2(2000),
  ref_n01                  NUMBER,
  ref_n02                  NUMBER,
  ref_n03                  NUMBER,
  ref_n04                  NUMBER,
  ref_n05                  NUMBER,
  ref_n06                  NUMBER,
  ref_n07                  NUMBER,
  ref_n08                  NUMBER,
  ref_n09                  NUMBER,
  ref_n10                  NUMBER,
  ref_d01                  DATE,
  ref_d02                  DATE,
  ref_d03                  DATE,
  ref_d04                  DATE,
  ref_d05                  DATE,
  created_by               NUMBER,
  creation_date            DATE,
  last_updated_by          NUMBER,
  last_update_date         DATE,
  lease_channel            VARCHAR2(30)
);
60

61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
-- Add comments to the table
comment on table ACR_INVOICE_BATCH_LN
  is '应收发票行(行合并)';
-- Add comments to the columns
comment on column ACR_INVOICE_BATCH_LN.invoice_batch_ln_id
  is '发票行ID';
comment on column ACR_INVOICE_BATCH_LN.invoice_hd_id
  is '发票ID';
comment on column ACR_INVOICE_BATCH_LN.line_type
  is '行类型';
comment on column ACR_INVOICE_BATCH_LN.line_number
  is '行号';
comment on column ACR_INVOICE_BATCH_LN.cashflow_id
  is '现金流ID';
comment on column ACR_INVOICE_BATCH_LN.cf_item
  is '现金流项目';
comment on column ACR_INVOICE_BATCH_LN.cf_type
  is '现金流类型';
comment on column ACR_INVOICE_BATCH_LN.product_id
  is '商品ID';
comment on column ACR_INVOICE_BATCH_LN.product_name
  is '商品名称';
comment on column ACR_INVOICE_BATCH_LN.specification
  is '规格型号';
comment on column ACR_INVOICE_BATCH_LN.quantity
  is '数量';
comment on column ACR_INVOICE_BATCH_LN.uom
  is '计量单位';
comment on column ACR_INVOICE_BATCH_LN.price
  is '单价(金税能算就不使用)';
comment on column ACR_INVOICE_BATCH_LN.price_quantity
  is '价格数量(暂不需要)';
comment on column ACR_INVOICE_BATCH_LN.price_quantity_uom
  is '价格数量单位(暂不需要)';
comment on column ACR_INVOICE_BATCH_LN.net_price
  is '税前单价';
comment on column ACR_INVOICE_BATCH_LN.tax_type_id
  is '税种';
comment on column ACR_INVOICE_BATCH_LN.tax_type_rate
  is '税率';
comment on column ACR_INVOICE_BATCH_LN.tax_included_flag
  is '含税标志';
comment on column ACR_INVOICE_BATCH_LN.tax_amount
  is '税额';
comment on column ACR_INVOICE_BATCH_LN.net_amount
  is '税前金额';
comment on column ACR_INVOICE_BATCH_LN.total_amount
  is '含税金额';
comment on column ACR_INVOICE_BATCH_LN.responsibility_center_id
  is '责任中心';
comment on column ACR_INVOICE_BATCH_LN.account_id
  is '科目';
comment on column ACR_INVOICE_BATCH_LN.description
  is '行备注/行摘要';
comment on column ACR_INVOICE_BATCH_LN.created_by
  is '创建者';
comment on column ACR_INVOICE_BATCH_LN.creation_date
  is '创建日期';
comment on column ACR_INVOICE_BATCH_LN.last_updated_by
  is '最后更新者';
comment on column ACR_INVOICE_BATCH_LN.last_update_date
  is '最后更新日期';
comment on column ACR_INVOICE_BATCH_LN.lease_channel
  is '商业模式';
alter table ACR_INVOICE_BATCH_LN
  add constraint ACR_INVOICE_BATCH_LN_PK primary key (INVOICE_BATCH_LN_ID);
CREATE SEQUENCE ACR_INVOICE_BATCH_LN_s;