	CREATE TABLE PACKING_FACILITY
	( 
	 PACK_CODE CHAR(5) NOT NULL, 
	 LINE_NO NUMBER(3,0) NOT NULL,
	 FACILITY_CODE CHAR(10) NOT NULL,
	 GROSS_WEIGHT NUMBER(14,3), 
	 NETT_WEIGHT NUMBER(14,3),  
	 TARE_WEIGHT NUMBER(14,3), 
	 PACK_TYPE VARCHAR2(3), 
	 LENGTH NUMBER(14,3), 
	 WIDTH NUMBER(14,3), 
	 HEIGHT NUMBER(14,3) 
	) ;
	ALTER TABLE PACKING_FACILITY 
	ADD (  CONSTRAINT PK_A_PACKFACILITY PRIMARY KEY ( PACK_CODE, LINE_NO, FACILITY_CODE )) ;
	 
	 CREATE TABLE PACKING_FILLER 
	 (
	  PACK_CODE CHAR(5) NOT NULL, 
	  LINE_NO NUMBER(3,0) NOT NULL, 
	  LOC_TYPE__PARENT CHAR(3) NOT NULL, 
	  MIN_WEIGHT NUMBER(14,3), 
	  MAX_WEIGHT NUMBER(14,3), 
	  MIN_VOLUME NUMBER(14,3),
	  MAX_VOLUME NUMBER(14,3), 
	  FILLER_WEIGHT NUMBER(14,3) 
	  ) ;
	  
	 ALTER TABLE PACKING_FILLER 
	 ADD ( CONSTRAINT PK_A_PACKFILLER PRIMARY KEY ( PACK_CODE, LINE_NO, LOC_TYPE__PARENT ));
	 
	 
	 Insert into OBJ_FORMS 
	(WIN_NAME,TITLE,OBJ_BROW_NAME,OBJ_EDIT_NAME,CROSS_UPDATE_EXPR,EXPR_FLD_INFO,TARGET_FLD_INFO,EXPR_COMMENT,FORM_NO,SCR_FLAG,AUTO_ACCEPT_SCAN,SCAN_FLAG,SCAN_METADATA,PROPERTY_INFO,SCAN_DELIMITER,COLUMN_ON_SAVE,AFTER_SAVE,EXT_SETUP,EXT_METADATA,EXT_COM,AUTO_ACCEPT_WEIGHDATA,FORM_TYPE,DISP_METADATA,PARENT_KEY_COL,QTY_COL,RATE_COL,ASSISTED_MODE,STORAGE_KEY_METADATA,SELECTION_MODE,DEFAULT_VIEW,AUTO_ADDON_ENTRY) 
	values 
	('w_packing','Packing Facility','d_packing_facility_brow','d_packing_facility_edit',null,null,null,null,'2',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null);

	Insert into OBJ_FORMS 
	(WIN_NAME,TITLE,OBJ_BROW_NAME,OBJ_EDIT_NAME,CROSS_UPDATE_EXPR,EXPR_FLD_INFO,TARGET_FLD_INFO,EXPR_COMMENT,FORM_NO,SCR_FLAG,AUTO_ACCEPT_SCAN,SCAN_FLAG,SCAN_METADATA,PROPERTY_INFO,SCAN_DELIMITER,COLUMN_ON_SAVE,AFTER_SAVE,EXT_SETUP,EXT_METADATA,EXT_COM,AUTO_ACCEPT_WEIGHDATA,FORM_TYPE,DISP_METADATA,PARENT_KEY_COL,QTY_COL,RATE_COL,ASSISTED_MODE,STORAGE_KEY_METADATA,SELECTION_MODE,DEFAULT_VIEW,AUTO_ADDON_ENTRY) 
	values 
	('w_packing','Packing_Filler','d_packing_filler_brow','d_packing_filler_edit',null,null,null,null,'3',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null);
     -- only table
     ALTER TABLE CARTON_MASTER ADD TARE_WEIGHT NUMBER(14,3); 
	 ALTER TABLE CARTON_MASTER ADD FILLER_WEIGHT NUMBER(14,3);
	 --srd and table
	 ALTER TABLE PACK_HDR ADD TARE_WEIGHT NUMBER(14,3); 
	 ALTER TABLE PACK_HDR ADD FILLER_WEIGHT NUMBER(14,3);
	 
	 --start pending because this changes already done on base office.(latest srd ref.)
	    --ALTER TABLE DESPATCH ADD FILLER_WEIGHT NUMBER(14,3);
     --End Pending 	 

INSERT INTO pophelp (
	field_name ,
	mod_name ,
	sql_str ,
	dw_object ,
	msg_title ,
	width ,
	height ,
	chg_date ,
	chg_user ,
	chg_term ,
	dist_opt ,
	filter_string ,
	sql_input ,
	default_col ,
	pop_align ,
	query_mode ,
	page_context ,
	pophelp_cols ,
	pophelp_source ,
	multi_opt ,
	help_option )
 VALUES (
	'PACK_TYPE',
	'W_PACKING',
	'SELECT FLD_VALUE,DESCR FROM GENCODES WHERE FLD_NAME = ''PACK_TYPE'' AND MOD_NAME = ''W_PACKING''',
	NULL,
	'PACK TYPE',
	0,
	0,
	fn_sysdate(),
	'Base',
	'Base',
	'0',
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL);
  
  
  INSERT INTO GENCODES (
	fld_name ,
	mod_name ,
	fld_value ,
	descr ,
	sh_descr ,
	chg_date ,
	chg_user ,
	chg_term ,
	active ,
	udf_str1 ,
	udf_str2 ,
	udf_str3 )
 VALUES (
	'PACK_TYPE',
	'W_PACKING',
	'A',
	'Active',
	'Active',
	fn_sysdate(),
	'BASE',
	'BASE',
	'Y',
	NULL,
	NULL,
	NULL);
  
    INSERT INTO GENCODES (
	fld_name ,
	mod_name ,
	fld_value ,
	descr ,
	sh_descr ,
	chg_date ,
	chg_user ,
	chg_term ,
	active ,
	udf_str1 ,
	udf_str2 ,
	udf_str3 )
 VALUES (
	'PACK_TYPE',
	'W_PACKING',
	'B',
	'BOTH',
	'BOTH',
	fn_sysdate(),
	'BASE',
	'BASE',
	'Y',
	NULL,
	NULL,
	NULL);
  
    INSERT INTO GENCODES (
	fld_name ,
	mod_name ,
	fld_value ,
	descr ,
	sh_descr ,
	chg_date ,
	chg_user ,
	chg_term ,
	active ,
	udf_str1 ,
	udf_str2 ,
	udf_str3 )
 VALUES (
	'PACK_TYPE',
	'W_PACKING',
	'M',
	'MASTER',
	'MASTER',
	fn_sysdate(),
	'BASE',
	'BASE',
	'Y',
	NULL,
	NULL,
	NULL);
  
  commit;

	 
	 