CREATE TABLE adempiere.JP_ContractContent
(
  --Window Mandatory
  JP_ContractContent_ID numeric(10,0) NOT NULL,
  JP_ContractContent_uu character varying(36) DEFAULT NULL::character varying,
  AD_Client_ID numeric(10,0) NOT NULL,
  AD_Org_ID numeric(10,0) NOT NULL,
  IsActive character(1) NOT NULL DEFAULT 'Y'::bpchar,
  Created timestamp without time zone NOT NULL DEFAULT now(),
  CreatedBy numeric(10,0) NOT NULL,
  Updated timestamp without time zone NOT NULL DEFAULT now(),
  UpdatedBy numeric(10,0) NOT NULL,

  --Doc Mandatory
  DocumentNo character varying(30) NOT NULL,
  DocStatus character(2) NOT NULL,
  DocAction character(2) NOT NULL,
  Processing character(1),
  Processed character(1) NOT NULL DEFAULT 'N'::bpchar,
  Posted character(1) NOT NULL DEFAULT 'N'::bpchar,
  IsApproved character(1) NOT NULL DEFAULT 'Y'::bpchar,
  ProcessedOn numeric,

  --Contract Content column
  JP_Contract_ID numeric(10,0) NOT NULL,
  JP_ContractContentT_ID numeric(10,0) NOT NULL,
  JP_Contract_Acct_ID numeric(10,0) NOT NULL,
  JP_PreContractContent_ID numeric(10,0) ,
  C_DocType_ID numeric(10,0) NOT NULL,
  DateDoc  timestamp without time zone NOT NULL DEFAULT now(),
  DateAcct timestamp without time zone NOT NULL DEFAULT now(),
  SalesRep_ID numeric(10,0),
  DocBaseType character(3) NOT NULL,
  JP_BaseDocDocType_ID numeric(10,0) NOT NULL,
  JP_CreateDerivativeDocPolicy character(2),
  JP_ContractCalender_ID numeric(10,0),
  JP_ContractProcDate_From  timestamp without time zone ,
  JP_ContractProcDate_To    timestamp without time zone ,
  JP_ContractProcess_ID numeric(10,0) ,
  DeliveryTime_Promised numeric(10,0) DEFAULT 0,
  IsSOTrx character(1) NOT NULL DEFAULT 'Y'::bpchar,

  Name character varying(120) NOT NULL,
  Description character varying(255),
  C_Opportunity_ID numeric(10,0) ,
  POReference character varying(20),

  C_BPartner_ID numeric(10,0) NOT NULL,

  C_BPartner_Location_ID numeric(10,0) NOT NULL,

  AD_User_ID numeric(10,0),


  --Status
  TotalLines numeric NOT NULL DEFAULT 0,

  JP_ContractProcStatus character(2) NOT NULL,
  IsAutomaticUpdateJP character(1) NOT NULL DEFAULT 'N'::bpchar,

  --Order Column
  M_Warehouse_ID numeric(10,0),

  JP_Locator_ID numeric(10,0) ,
  IsDropShip character(1) NOT NULL DEFAULT 'N'::bpchar,

  Dropship_BPartner_ID numeric(10,0),

  Dropship_Location_ID numeric(10,0),

  Dropship_User_ID numeric(10,0),

  DeliveryRule character(1) NOT NULL,

  PriorityRule character(1) NOT NULL,

  DeliveryViaRule character(1) NOT NULL,

  M_Shipper_ID numeric(10,0),

  M_FreightCategory_ID numeric(10,0),

  FreightCostRule character(1) NOT NULL,

  FreightAmt numeric DEFAULT 0,


  Bill_BPartner_ID numeric(10,0),

  Bill_Location_ID numeric(10,0),

  Bill_User_ID numeric(10,0),

  InvoiceRule character(1) NOT NULL,
  IsDiscountPrinted character(1) NOT NULL DEFAULT 'N'::bpchar,

  M_PriceList_ID numeric(10,0) NOT NULL,

  C_Currency_ID numeric(10,0) NOT NULL,

  C_ConversionType_ID numeric(10,0),

  PaymentRule character(1) NOT NULL,
  C_PaymentTerm_ID numeric(10,0) NOT NULL,


  C_Campaign_ID numeric(10,0),

  C_Project_ID numeric(10,0),

  C_Activity_ID numeric(10,0),
  AD_OrgTrx_ID numeric(10,0),

  User1_ID numeric(10,0),

  User2_ID numeric(10,0),




  IsTaxIncluded character(1) NOT NULL DEFAULT 'N'::bpchar,

  SendeMail character(1) NOT NULL DEFAULT 'N'::bpchar,
  OrderType character varying(2) ,
  JP_Estimation_ID numeric(10) DEFAULT NULL::numeric,
  DateOrdered timestamp without time zone,
  DatePromised timestamp without time zone,
  JP_Processing1 character(1) DEFAULT NULL::bpchar,
  DateInvoiced timestamp without time zone,
  JP_CountercontractContent_ID numeric(10,0) DEFAULT NULL::numeric,
  JP_ContractProcessMethod character varying(2) COLLATE pg_catalog."default" NOT NULL DEFAULT 'IC'::character varying,
  IsScheduleCreatedJP character(1) COLLATE pg_catalog."default" NOT NULL DEFAULT 'N'::bpchar,
  JP_processing2 character(1) COLLATE pg_catalog."default" DEFAULT NULL::bpchar,
  JP_processing3 character(1) COLLATE pg_catalog."default" DEFAULT NULL::bpchar,


  CONSTRAINT JP_ContractContent_pkey PRIMARY KEY (JP_ContractContent_ID)
)