xmenu = 0 local f f = new menu_mainForm() do while xmenu<>6 f.mdi = false // ensure not MDI f.readModal() do case case xmenu = 1 //do blank.wfm with "do reindex" do reindex.wfm case xmenu = 2 do repost.wfm case xmenu = 3 do cre_user.wfm with .t. case xmenu = 4 msgbox("alter user") case xmenu = 5 do reset_pa.wfm case xmenu = 6 //exit hence no action required case xmenu = 7 do vatrate.wfm with .t. case xmenu = 8 do renum.wfm with .t. endcase enddo return ** END HEADER -- do not remove this line // // Generated on 03-06-2020 // parameter bModal local f f = new menu_mainForm() if (bModal) f.mdi = false // ensure not MDI f.readModal() else f.open() endif class menu_mainForm of MUN_FORM from "mun_controls.cc" set procedure to mun_controls.cc additive with (this) onOpen = class::FORM_ONOPEN height = 31.5 left = -12.2857 top = -0.4545 width = 214.5714 endwith this.REINDEX = new MUN_PUSH(this) with (this.REINDEX) onClick = class::REINDEX_ONCLICK height = 2.0 left = 62.0 top = 3.5 width = 30.0 text = "Rebuild &Index" fontSize = 12.0 endwith this.REPOST = new MUN_PUSH(this) with (this.REPOST) onClick = class::REPOST_ONCLICK height = 2.0 left = 62.0 top = 7.0 width = 30.0 text = "&Repost Current Year Entries" fontSize = 12.0 endwith this.CREATE = new MUN_PUSH(this) with (this.CREATE) onClick = class::CREATE_ONCLICK height = 2.0 left = 62.0 top = 10.5 width = 30.0 text = "Create &Users" fontSize = 12.0 endwith this.DELETE_USER = new MUN_PUSH(this) with (this.DELETE_USER) onClick = class::DELETE_USER_ONCLICK height = 2.0 left = 62.0 top = 14.0 width = 30.0 text = "&Alter User" fontSize = 12.0 endwith this.RESET = new MUN_PUSH(this) with (this.RESET) when = {||alltrim(mcompany.user) # "super"} onClick = class::RESET_ONCLICK height = 2.0 left = 62.0 top = 17.5 width = 30.0 text = "&Reset Password" endwith this.CLOSE_FORM = new MUN_PUSH(this) with (this.CLOSE_FORM) onClick = class::CLOSE_FORM_ONCLICK height = 2.0 left = 62.0 top = 21.0 width = 30.0 text = "&Close" fontSize = 12.0 endwith this.MUN_TEXTLABEL1 = new MUN_TEXTLABEL(this) with (this.MUN_TEXTLABEL1) height = 1.0 left = 53.5714 top = 1.0 width = 40.0 text = "Settings Menu" fontSize = 16.0 fontBold = true alignHorizontal = 1 // Center endwith this.VATRATE = new MUN_PUSH(this) with (this.VATRATE) onClick = class::VATRATE_ONCLICK height = 2.0 left = 103.0 top = 3.5 width = 30.0 text = "&Set/Alter Vat/Gst Rates" endwith this.EXP_INVEN = new MUN_PUSH(this) with (this.EXP_INVEN) when = {||mcompany.inven} onClick = class::PUSHBUTTON1_ONCLICK height = 2.0 left = 103.0 top = 7.0 width = 30.0 text = "Export Inventory" endwith this.IMPORT_SALES = new MUN_PUSH(this) with (this.IMPORT_SALES) when = {||mcompany.inven} onClick = class::IMPORT_SALES_ONCLICK height = 2.0 left = 103.0 top = 10.5 width = 30.0 text = "Import Sales" endwith this.PACK_TABLES = new MUN_PUSH(this) with (this.PACK_TABLES) when = {||mcompany.inven} onClick = class::PACK_TABLES_ONCLICK height = 2.0 left = 103.0 top = 14.0 width = 30.0 text = "&Pack Tables" endwith this.MUN_TEXT1 = new MUN_TEXT(this) with (this.MUN_TEXT1) height = 1.7273 left = 134.0 top = 11.0 width = 46.0 visible = false text = " Sales Transactions are being imported please wait.............." endwith this.INI_FILE = new MUN_PUSH(this) with (this.INI_FILE) when = {||mcompany.inven} onClick = class::INI_FILE_ONCLICK height = 2.0 left = 103.0 top = 17.5 width = 30.0 text = "Set Default printer options of" endwith this.INI_NAME = new MUN_COMBO(this) with (this.INI_NAME) height = 1.1818 left = 139.0 top = 18.0 width = 20.0 dataSource = 'array {"cashmemo.ini","cashmemo_h.ini","label.ini","p_big.ini"}' endwith function CLOSE_FORM_onClick() xmenu = 6 form.close() return function CREATE_onClick() xmenu = 3 form.close() return function DELETE_USER_onClick() xmenu = 4 form.close() return function IMPORT_SALES_onClick() form.mun_text1.visible = true do import_sales msgbox("Import of sales enteries complete") form.mun_text1.visible = false return function INI_FILE_onClick() msgbox("To insert code for this option first load the earlier option and then ask for new one and save only when confirmed") if msgbox("Do you really want to change the printer settings for "+form.ini_name.value,"Confirm ",4 ) = 6 do get_printer with form.ini_name.value endif return function PACK_TABLES_onClick() xmenu = 8 form.close() return function PUSHBUTTON1_onClick() do export_inve msgbox("Inventory has been exported") return function REINDEX_onClick() xmenu = 1 form.close() return function REPOST_onClick() xmenu = 2 form.close() return function RESET_onClick() xmenu = 5 form.close() return function VATRATE_onClick() xmenu = 7 form.close() return function form_onOpen() form.height = form_height form.width = form_width form.text = [Settings Menu ]+ mcompany.company if alltrim(mcompany.user)= "super" form.reset.enabled = false form.reset.colornormal = push_dis endif return endclass