//DDB-FileStart //DDB-HeaderStart // File Name : Invt.DD // Class Name: Invt_DataDictionary // Revision : 8 // Version : 2 Use Windows // Basic Definitions Use DataDict.pkg // DataDictionary Class Definition Use DDvalTbl // Validation Table Class Definitions Open Invt Open OrderDtl Open Vendor //DDB-HeaderEnd //DDB-SelectionStart //DDB/ ExternalSelectionList Invt_sl Invt.sl Register_Object Invt_sl //DDB-SelectionEnd Class Invt_DataDictionary Is A DataDictionary Procedure Define_Fields Forward Send Define_Fields //DDB-Generated-Code-Location //DDB-DefineFieldStart Set Main_File To Invt.File_Number Set Cascade_Delete_State To False Set Foreign_Field_Options DD_KEYFIELD To DD_FINDREQ Set Foreign_Field_Options DD_INDEXFIELD To DD_NOPUT Set Foreign_Field_Options DD_DEFAULT To DD_DISPLAYONLY // Child (Client) file structure................ Send Add_Client_File OrderDtl.File_Number // Parent (Server) file structure............... Send Add_Server_File Vendor.File_Number // Field-based properties....................... // Invt.Item_Id Set Field_Label_Long Field Invt.Item_ID To "Invt. Item ID" Set Field_Label_Short Field Invt.Item_ID To "Item ID" Set Field_Options Field Invt.Item_ID To DD_AUTOFIND DD_REQUIRED DD_CAPSLOCK Set Field_Prompt_Object Field Invt.Item_ID To (Invt_sl(Self)) Set Key_Field_State Field Invt.Item_ID To True Set Status_Help Field Invt.Item_ID To "Inventory Item Id - user defined identification" // Invt.Description Set Field_Label_Long Field Invt.Description To "Invt. Description" Set Field_Label_Short Field Invt.Description To "Description" Set Field_Options Field Invt.Description To DD_REQUIRED Set Status_Help Field Invt.Description To "Inventory Part Desription" // Invt.Vendor_Id Set Field_Options Field Invt.Vendor_ID To DD_CAPSLOCK Set Status_Help Field Invt.Vendor_ID To "Vendor Number" // Invt.Vendor_Part_Id Set Field_Options Field Invt.Vendor_Part_ID To DD_REQUIRED Set Status_Help Field Invt.Vendor_Part_ID To "Vendor ID name for this item" // Invt.Unit_Price Set Field_Mask_Type Field Invt.Unit_Price To MASK_CURRENCY_WINDOW Set Field_Value_Range Field Invt.Unit_Price To 0 999999.99 Set Status_Help Field Invt.Unit_Price To "Retail unit price" // Invt.On_Hand //DDB/ Comment_Short Field Invt.On_Hand To "This is adjusted by the OrderDtl DD" Set Field_Value_Range Field Invt.On_Hand To -999999 999999 Set Status_Help Field Invt.On_Hand To "Units currently available" //DDB-DefineFieldEnd End_Procedure // Define_Fields Function Validate_Save Returns Integer Integer iRetVal Forward Get Validate_Save To iRetVal If iRetVal Function_Return iRetVal If Invt.On_Hand Lt 0 Begin Error 300 "Insufficient Inventory Stock" Function_Return 1 End End_Function // Validate_Save // Field_Defaults: // This procedure is used to establish default field values. Procedure Field_Defaults Forward Send Field_Defaults //DDB-Generated-Code-Location //DDB-FieldDefaultStart //DDB-FieldDefaultEnd End_Procedure // Field_Defaults End_Class // Invt_DataDictionary //DDB-Selection-pkg-Start #IFDEF Is$WebApp #ELSE Use Invt.sl // Invt_sl #ENDIF //DDB-Selection-pkg-End //DDB-FileEnd