// *** Generated Source File *** // Portions Copyright (c) 1996-2000, SilverStream Software, Inc., All Rights Reserved package com.sssw.gen.forms; // generated by SilverStream: do not edit //Object imports import java.util.*; import java.io.*; import java.awt.*; import java.math.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.table.*; import com.sssw.rt.tview.*; import com.sssw.rt.jform.*; import com.sssw.rt.form.*; import com.sssw.rt.gui.*; import com.sssw.rt.util.*; import com.sssw.rt.event.*; import com.sssw.rt.expr.*; //Form imports import java.sql.Timestamp; import org.apache.log4j.Logger; import com.gpc.frame.FwiFormClose; import com.gpc.frame.FwiFormEdit; import com.gpc.frame.FwiFormProcess; import com.gpc.tams.dso.TsoGenericBandDescriptor; import com.gpc.tams.table.TsiEditableTableMgr; import com.gpc.valueobjects.common.ResultsVO; import com.gpc.valueobjects.sql.ExecuteSQLResultsVO; import com.gpc.valueobjects.sql.ExecuteSQLVO; import com.gpc.backofficecommon.FwoSessionMgr; import com.gpc.backofficecommon.app.TsoProfile; import com.gpc.backofficecommon.constants.schema.Sch_Tables; import com.gpc.backofficecommon.constants.schema.Sch_EndOfDayProfile; import com.gpc.backofficecommon.constants.schema.Sch_EndOfMonthProfile; import com.gpc.backofficecommon.constants.schema.Sch_StoreProfile; import com.gpc.backofficecommon.constants.schema.Sch_RefMonthOfYear; import com.gpc.backofficecommon.constants.schema.Sch_Printer; import com.gpc.backofficecommon.constants.schema.Sch_Employee; import com.gpc.backofficecommon.constants.schema.Sch_FWFunction; import com.gpc.backofficecommon.constants.schema.Sch_FWFunctionUser; import com.gpc.backofficecommon.util.SilverStreamExceptionHelper; import com.gpc.client.backoffice.app.TamsFormMaster; import com.gpc.client.backoffice.table.TsoJTableMgr; import com.gpc.client.backoffice.table.cell.TsoDateCell; import com.gpc.client.backoffice.table.cell.TsoComboBox; import com.gpc.client.backoffice.FwoFormMaster; import com.gpc.client.backoffice.FwoJTextKeyFilter; import com.gpc.client.backoffice.FwoToolBarDirector; import com.gpc.client.backoffice.util.FwoUnsupportedObjectException; import com.gpc.client.backoffice.util.InvokerBridge; import com.gpc.client.common.ClientApplicationContext; import com.gpc.client.common.util.DatePatternUtils; import com.gpc.common.exception.ApplicationException; import com.gpc.common.Profile; import com.gpc.common.TsoConstant; import com.gpc.common.TsoCurrentUser; import com.gpc.common.pattern.FwoPattern; import com.gpc.common.pattern.FwoDatePattern; import com.gpc.common.pattern.DatePatternFormatException; import com.gpc.common.pattern.FwoNumberPattern; import com.gpc.common.pattern.NumberPatternFormatException; import com.gpc.common.util.CommonUtil; import com.gpc.common.ResourceBundleReader; import com.gpc.common.ApplicationContext; import com.gpc.common.constants.refvalues.RefEODTriggeredSource; /** * Title: FrmSM_EODControls * Description: End of Day Controls * Copyright: Copyright (c) 2002 By Genuine Parts Company (GPC) * Company: Genuine Parts Company (GPC) * @author Rachel Greene * @version 1.0 **/ /** * The End of Day function has numerous system settings that must be maintained. This option allows * the user to review or edit End of Day Controls. User arrives at this screen by selecting System Mgmt--> * End of Day Controls from the TAMS menu. **/ public class FrmSM_EODControls extends AgfForm // generated by SilverStream: do not edit implements FwiFormClose, ActionListener, TsiEditableTableMgr, AgiPropertyValidationListener, MouseListener, FwiFormEdit, FwiFormProcess { public com.sssw.rt.form.AgcData agcStoreProfile; public com.sssw.rt.jform.AgcJTimestampField fldUnattendedBackUpTime; public com.sssw.rt.jform.AgcJTimestampField fldAutoEODStartTime; public com.sssw.rt.form.AgcData agcGenericDso; // The lbl UselabelQuantity. public com.sssw.rt.jform.AgcJLabel lblUselabelQuantity; // The ckb UselabelQuantity. public com.sssw.rt.jform.AgcJCheckBox ckbUselabelQuantity; // The lbl UselabelQuantity lock. public com.sssw.rt.jform.AgcJLabel lblUselabelQuantityLock; // The ckb UselabelQuantity lock. public com.sssw.rt.jform.AgcJCheckBox ckbUselabelQuantityLock; public com.sssw.rt.form.AgcData agcEOD; public com.sssw.rt.form.AgcData agcEOM; public com.sssw.rt.jform.AgcJComboBox cbEmployee; public com.sssw.rt.jform.AgcJTextField fldEmail; public com.sssw.rt.jform.AgcJLabel lblEmail; public com.sssw.rt.jform.AgcJLabel lblEmployee; public com.sssw.rt.jform.AgcJTextField fldGPPercent; public com.sssw.rt.jform.AgcJLabel lblGPPercent; public javax.swing.ButtonGroup DefaultJButtonGroup = new javax.swing.ButtonGroup(); public com.sssw.rt.jform.AgcJCheckBox chkLockClearAvgCost; public com.sssw.rt.jform.AgcJLabel lblClearAvgCostLock; public com.sssw.rt.jform.AgcJLabel lblHistoryPurgeDay; public com.sssw.rt.jform.AgcJLabel lblDayofHistoryPurge; public com.sssw.rt.jform.AgcJLabel lblNonStockMonth; public com.sssw.rt.jform.AgcJRadioButton rbDoNotClear; public com.sssw.rt.jform.AgcJRadioButton rbClearCalenderYearEnd; public com.sssw.rt.jform.AgcJRadioButton rbClearFiscalYearEnd; public com.sssw.rt.jform.AgcJCheckBox chkUseDuplex; public com.sssw.rt.jform.AgcJLabel lblUseDuplex; public com.sssw.rt.jform.AgcJLabel lblPrinterOrientation; public com.sssw.rt.jform.AgcJComboBox cbPrinterOrientation; public com.sssw.rt.jform.AgcJLabel lblAutoEODEmployee; public com.sssw.rt.jform.AgcJComboBox cbEODPrinter; public com.sssw.rt.jform.AgcJLabel lblPhoneSwitchLock; public com.sssw.rt.jform.AgcJLabel lblTransmitSalesLock; public com.sssw.rt.jform.AgcJCheckBox chkLockPhoneReminder; public com.sssw.rt.jform.AgcJCheckBox chkLockTransmit; public com.sssw.rt.jform.AgcJLabel lblPriorInvoiceCosting; public com.sssw.rt.jform.AgcJLabel lblUnattendedBU; public com.sssw.rt.jform.AgcJComboBox cbAutoEODEmployee; public com.sssw.rt.jform.AgcJLabel lblEODPrinter; public com.sssw.rt.jform.AgcJLabel lblEnableAutomaticEOD; public com.sssw.rt.jform.AgcJCheckBox chkEnableAutoEOD; public com.sssw.rt.jform.AgcJLabel lblAutoEODStartTime; public com.sssw.rt.jform.AgcJLabel lblGPC; public com.sssw.rt.jform.AgcJLabel lblStoreHdg; public com.sssw.rt.jform.AgcJLabel lblStoreNumber; public com.sssw.rt.jform.AgcJLabel lblStoreType; public com.sssw.rt.jform.AgcJLabel lblTypeHdg; public com.sssw.rt.jform.AgcJLabel lblStoreName; public com.sssw.rt.jform.AgcJLabel lblCompanyID; public com.sssw.rt.jform.AgcJLabel lblCompanyHdg; public com.sssw.rt.jform.AgcJLabel lblPhoneSwitch; public com.sssw.rt.jform.AgcJCheckBox chkPhoneReminder; public com.sssw.rt.jform.AgcJCheckBox chkTransmit; public com.sssw.rt.jform.AgcJLabel lblTransmitSalesAndCost; public com.sssw.rt.jform.AgcJLabel lblLastMonthNonStockPurge; public com.sssw.rt.jform.AgcJTable tblEOM; public javax.swing.JScrollPane tblEOMScrollPane; public com.sssw.rt.jform.AgcJLabel lblHeading; public com.sssw.rt.form.AgcRectangle Rectangle15; public com.sssw.rt.form.AgcRectangle rctClearAverageCost; public com.sssw.rt.form.AgcRectangle rctGeneralInfo; public com.sssw.rt.form.AgcRectangle rctAutomaticEOD; public com.sssw.rt.form.AgcRectangle rctEndOfMonthDates; public com.sssw.rt.form.AgcRectangle rctBackupInfo; public com.sssw.rt.form.AgcRectangle rctBackupFailureNotify; public com.sssw.rt.jform.AgcJLabel lblEcatalogUpdateDay; public com.sssw.rt.jform.AgcJComboBox cbEcatalogUpdateDay; public com.sssw.rt.jform.AgcJLabel lblEcatalogUpdateDayOfWeekFriday; public com.sssw.rt.jform.AgcJLabel lblEcatalogUpdateDayOfWeekSaturday; public com.sssw.rt.jform.AgcJCheckBox chkEcatalogUpdateDayOfWeekFriday; public com.sssw.rt.jform.AgcJCheckBox chkEcatalogUpdateDayOfWeekSaturday; public com.sssw.rt.form.AgcData agcDsoSql; public com.sssw.rt.form.AgcRectangle rctEODPrinter; /* Declare class variables */ private static final Logger logger = Logger.getLogger(FrmSM_EODControls.class); private TamsFormMaster FM; private TsoJTableMgr m_TblMgr; private TsoProfile m_storeProfile; private boolean m_pleaseUpdate = false; private Byte bZero = new Byte((byte)0); private Byte bOne = new Byte((byte)1); private boolean m_isLoading = false; private boolean m_isInitialLoad = true; private String m_decZero2; private boolean m_updatePrinterOrientation = false; private Integer automaticCatalogUpdateDay; private boolean isEODTriggeredSourceChanged = false; private String eodTriggeredSource = null; public FrmSM_EODControls() { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === } public void init() throws Exception { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === // Initialize form and data this.setTransparent(false); this.setBackground(Color.white); this.setBackgroundImageMode(2); agData.setDataMode(AgoData.DATA_MODE_NORMAL); this.setName("FrmSM_EODControls"); this.setBounds(10, 10, 1016, 663); // Initialize agcStoreProfile agcStoreProfile = new com.sssw.rt.form.AgcData(); agcStoreProfile.setName("agcStoreProfile"); agcStoreProfile.setBounds(270, 675, 66, 58); agcStoreProfile.setExpressionCount(5); agcStoreProfile.setExpression(0, 0, "LOC", 0); agcStoreProfile.setExpression(1, 1, "LAST_MODIFIED_DATE", 1); agcStoreProfile.setExpression(2, 2, "MODIFIED_BY_EMPLOYEE_ID", 2); agcStoreProfile.setExpression(3, 3, "UNATTENDED_BACKUP", 3); agcStoreProfile.setExpression(4, 4, "COMPANY_ID", 4); // Initialize fldUnattendedBackUpTime fldUnattendedBackUpTime = new com.sssw.rt.jform.AgcJTimestampField(); fldUnattendedBackUpTime.setName("fldUnattendedBackUpTime"); fldUnattendedBackUpTime.setBounds(840, 440, 74, 20); fldUnattendedBackUpTime.setFont(new Font("SansSerif", 0, 12)); fldUnattendedBackUpTime.setHorizontalAlignment(2); fldUnattendedBackUpTime.setMargin(new Insets(1, 1, 1, 1)); fldUnattendedBackUpTime.setEditable(true); fldUnattendedBackUpTime.setForeground(Color.black); fldUnattendedBackUpTime.setBackground(Color.white); fldUnattendedBackUpTime.setDisplayStyle(3); fldUnattendedBackUpTime.setMaxLength(AgcJTextField.NO_LIMIT); fldUnattendedBackUpTime.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldAutoEODStartTime fldAutoEODStartTime = new com.sssw.rt.jform.AgcJTimestampField(); fldAutoEODStartTime.setName("fldAutoEODStartTime"); fldAutoEODStartTime.setBounds(256, 417, 73, 20); fldAutoEODStartTime.setFont(new Font("SansSerif", 0, 12)); fldAutoEODStartTime.setHorizontalAlignment(2); fldAutoEODStartTime.setMargin(new Insets(1, 1, 1, 1)); fldAutoEODStartTime.setEditable(true); fldAutoEODStartTime.setForeground(Color.black); fldAutoEODStartTime.setBackground(Color.white); fldAutoEODStartTime.setDisplayStyle(3); fldAutoEODStartTime.setMaxLength(AgcJTextField.NO_LIMIT); fldAutoEODStartTime.setMinLength(AgcJTextField.NO_LIMIT); // Initialize agcGenericDso agcGenericDso = new com.sssw.rt.form.AgcData(); agcGenericDso.setName("agcGenericDso"); agcGenericDso.setBounds(18, 679, 66, 58); agcGenericDso.setDataSource("com.gpc.tams.dso.dsoGeneric"); // Initialize agcEOD agcEOD = new com.sssw.rt.form.AgcData(); agcEOD.setName("agcEOD"); agcEOD.setBounds(185, 675, 46, 58); agcEOD.setExpressionCount(25); agcEOD.setExpression(0, 5, "LOC", 0); agcEOD.setExpression(1, 6, "SEND_LOCAL_DETAIL", 1); agcEOD.setExpression(2, 7, "NON_STOCK_PURGE", 2); agcEOD.setExpression(3, 8, "HISTORY_PURGE_PROCESS_DAY", 3); agcEOD.setExpression(4, 9, "SEND_EOM_REPORTABLE_SALES", 4); agcEOD.setExpression(5, 10, "REPORTED_SALES_SUMMARY_COUNTER", 5); agcEOD.setExpression(6, 11, "PHONE_SWITCH_REMINDER", 6); agcEOD.setExpression(7, 12, "CLEAR_AVG_COST_AT_ECY", 7); agcEOD.setExpression(8, 13, "EXPORT_TO_DATA_WAREHOUSE", 8); agcEOD.setExpression(9, 14, "USE_AUTOSTART_EOD", 9); agcEOD.setExpression(10, 15, "AUTOSTART_TIME", 10); agcEOD.setExpression(11, 16, "AUTOSTART_EMPLOYEE_ID", 11); agcEOD.setExpression(12, 17, "AUTOSTART_REPORT_PRINTER_ID", 12); agcEOD.setExpression(13, 18, "AUTOSTART_REPORT_PRINT_ORIENTATION", 13); agcEOD.setExpression(14, 19, "AUTOSTART_REPORT_PRINTER_USE_DUPLEX", 14); agcEOD.setExpression(15, 20, "BACKUP_FAILURE_MSG_TO_EMAIL", 15); agcEOD.setExpression(16, 21, "BACKUP_FAILURE_MSG_TO_EMPLOYEE_ID", 16); agcEOD.setExpression(17, 22, "AUTO_INVOICE_COSTING_GP_PERCENT", 17); agcEOD.setExpression(18, 23, "LAST_MODIFIED_DATE", 18); agcEOD.setExpression(19, 24, "MODIFIED_BY_EMPLOYEE_ID", 19); agcEOD.setExpression(20, 25, "TSU_RECEIVED", 20); agcEOD.setExpression(21, 35, "AUTOMATIC_CATALOG_UPDATE_DAY", 21); agcEOD.setExpression(22, 36, "USE_LABEL_QTY_FOR_GENERATION", 22); agcEOD.setExpression(23, 37, "AUTO_CATALOG_UPDATE_DAY_OF_WEEK", 23); agcEOD.setExpression(24, 38, "USE_WEEKEND_CATALOG_SETTINGS", 24); // Initialize agcEOM agcEOM = new com.sssw.rt.form.AgcData(); agcEOM.setName("agcEOM"); agcEOM.setBounds(115, 675, 46, 58); agcEOM.setExpressionCount(5); agcEOM.setExpression(0, 26, "LOC", 0); agcEOM.setExpression(1, 27, "REF_MONTH_OF_YEAR_ID", 1); agcEOM.setExpression(2, 28, "SALES_MONTH_END_DATE", 2); agcEOM.setExpression(3, 29, "LAST_MODIFIED_DATE", 3); agcEOM.setExpression(4, 30, "MODIFIED_BY_EMPLOYEE_ID", 4); // Initialize cbEmployee cbEmployee = new com.sssw.rt.jform.AgcJComboBox(); cbEmployee.setName("cbEmployee"); cbEmployee.setBounds(696, 532, 295, 25); cbEmployee.setFont(new Font("SansSerif", 0, 12)); cbEmployee.setDisplayExpression(31); cbEmployee.setValueExpression(32); cbEmployee.setAutomaticQuery(true); // Initialize fldEmail fldEmail = new com.sssw.rt.jform.AgcJTextField(); fldEmail.setName("fldEmail"); fldEmail.setBounds(696, 564, 295, 20); fldEmail.setFont(new Font("SansSerif", 0, 12)); fldEmail.setHorizontalAlignment(2); fldEmail.setMargin(new Insets(1, 1, 1, 1)); fldEmail.setEditable(true); fldEmail.setForeground(Color.black); fldEmail.setBackground(Color.white); fldEmail.setMaxLength(AgcJTextField.NO_LIMIT); fldEmail.setMinLength(AgcJTextField.NO_LIMIT); // Initialize lblEmail lblEmail = new com.sssw.rt.jform.AgcJLabel(); lblEmail.setName("lblEmail"); lblEmail.setBounds(616, 563, 65, 20); lblEmail.setText("Email"); lblEmail.setOpaque(false); lblEmail.setTextStyle(0); lblEmail.setForeground(Color.black); lblEmail.setTextShadowColor(Color.darkGray); lblEmail.setTextHighlightColor(Color.gray); lblEmail.setBackground(Color.lightGray); lblEmail.setHorizontalAlignment(SwingConstants.RIGHT); lblEmail.setVerticalAlignment(SwingConstants.CENTER); lblEmail.setHorizontalTextPosition(SwingConstants.RIGHT); lblEmail.setVerticalTextPosition(SwingConstants.CENTER); lblEmail.setWordWrap(false); lblEmail.setFont(new Font("SansSerif", 1, 12)); // Initialize lblEmployee lblEmployee = new com.sssw.rt.jform.AgcJLabel(); lblEmployee.setName("lblEmployee"); lblEmployee.setBounds(616, 533, 65, 20); lblEmployee.setText("Employee"); lblEmployee.setOpaque(false); lblEmployee.setTextStyle(0); lblEmployee.setForeground(Color.black); lblEmployee.setTextShadowColor(Color.darkGray); lblEmployee.setTextHighlightColor(Color.gray); lblEmployee.setBackground(Color.lightGray); lblEmployee.setHorizontalAlignment(SwingConstants.RIGHT); lblEmployee.setVerticalAlignment(SwingConstants.CENTER); lblEmployee.setHorizontalTextPosition(SwingConstants.RIGHT); lblEmployee.setVerticalTextPosition(SwingConstants.CENTER); lblEmployee.setWordWrap(false); lblEmployee.setFont(new Font("SansSerif", 1, 12)); // Initialize fldGPPercent fldGPPercent = new com.sssw.rt.jform.AgcJTextField(); fldGPPercent.setName("fldGPPercent"); fldGPPercent.setBounds(256, 447, 55, 20); fldGPPercent.setFont(new Font("SansSerif", 0, 12)); fldGPPercent.setHorizontalAlignment(2); fldGPPercent.setMargin(new Insets(1, 1, 1, 1)); fldGPPercent.setEditable(true); fldGPPercent.setForeground(Color.black); fldGPPercent.setBackground(Color.white); fldGPPercent.setMaxLength(AgcJTextField.NO_LIMIT); fldGPPercent.setMinLength(AgcJTextField.NO_LIMIT); // Initialize lblGPPercent lblGPPercent = new com.sssw.rt.jform.AgcJLabel(); lblGPPercent.setName("lblGPPercent"); lblGPPercent.setBounds(-19, 447, 260, 20); lblGPPercent.setText("GP% for Costing of \"0\" Cost Invoices"); lblGPPercent.setOpaque(false); lblGPPercent.setTextStyle(0); lblGPPercent.setForeground(Color.black); lblGPPercent.setTextShadowColor(Color.darkGray); lblGPPercent.setTextHighlightColor(Color.gray); lblGPPercent.setBackground(Color.lightGray); lblGPPercent.setHorizontalAlignment(SwingConstants.RIGHT); lblGPPercent.setVerticalAlignment(SwingConstants.CENTER); lblGPPercent.setHorizontalTextPosition(SwingConstants.RIGHT); lblGPPercent.setVerticalTextPosition(SwingConstants.CENTER); lblGPPercent.setWordWrap(false); lblGPPercent.setFont(new Font("SansSerif", 1, 12)); // Initialize chkLockClearAvgCost chkLockClearAvgCost = new com.sssw.rt.jform.AgcJCheckBox(); chkLockClearAvgCost.setName("chkLockClearAvgCost"); chkLockClearAvgCost.setBounds(440, 271, 13, 20); chkLockClearAvgCost.setContentAreaFilled(false); chkLockClearAvgCost.setBorderPainted(false); chkLockClearAvgCost.setText(""); chkLockClearAvgCost.setCheckedValue(""); chkLockClearAvgCost.setUncheckedValue(""); chkLockClearAvgCost.setFont(new Font("SansSerif", 0, 12)); chkLockClearAvgCost.setForeground(Color.black); chkLockClearAvgCost.setBackground(AgoColorManager.getColor(212, 208, 200)); // Initialize lblClearAvgCostLock lblClearAvgCostLock = new com.sssw.rt.jform.AgcJLabel(); lblClearAvgCostLock.setName("lblClearAvgCostLock"); lblClearAvgCostLock.setBounds(351, 271, 77, 20); lblClearAvgCostLock.setText("Lock"); lblClearAvgCostLock.setOpaque(false); lblClearAvgCostLock.setTextStyle(0); lblClearAvgCostLock.setForeground(Color.black); lblClearAvgCostLock.setTextShadowColor(Color.darkGray); lblClearAvgCostLock.setTextHighlightColor(Color.gray); lblClearAvgCostLock.setBackground(Color.lightGray); lblClearAvgCostLock.setHorizontalAlignment(SwingConstants.RIGHT); lblClearAvgCostLock.setVerticalAlignment(SwingConstants.CENTER); lblClearAvgCostLock.setHorizontalTextPosition(SwingConstants.RIGHT); lblClearAvgCostLock.setVerticalTextPosition(SwingConstants.CENTER); lblClearAvgCostLock.setWordWrap(false); lblClearAvgCostLock.setFont(new Font("SansSerif", 1, 12)); // Initialize lblHistoryPurgeDay lblHistoryPurgeDay = new com.sssw.rt.jform.AgcJLabel(); lblHistoryPurgeDay.setName("lblHistoryPurgeDay"); lblHistoryPurgeDay.setBounds(348, 134, 55, 20); lblHistoryPurgeDay.setText(""); lblHistoryPurgeDay.setOpaque(false); lblHistoryPurgeDay.setTextStyle(0); lblHistoryPurgeDay.setForeground(Color.black); lblHistoryPurgeDay.setTextShadowColor(Color.darkGray); lblHistoryPurgeDay.setTextHighlightColor(Color.gray); lblHistoryPurgeDay.setBackground(Color.lightGray); lblHistoryPurgeDay.setHorizontalAlignment(SwingConstants.LEFT); lblHistoryPurgeDay.setVerticalAlignment(SwingConstants.CENTER); lblHistoryPurgeDay.setHorizontalTextPosition(SwingConstants.RIGHT); lblHistoryPurgeDay.setVerticalTextPosition(SwingConstants.CENTER); lblHistoryPurgeDay.setWordWrap(false); lblHistoryPurgeDay.setFont(new Font("SansSerif", 0, 12)); // Initialize lblDayofHistoryPurge lblDayofHistoryPurge = new com.sssw.rt.jform.AgcJLabel(); lblDayofHistoryPurge.setName("lblDayofHistoryPurge"); lblDayofHistoryPurge.setBounds(20, 135, 313, 20); lblDayofHistoryPurge.setText("Day of Month to Run History Purge Processes"); lblDayofHistoryPurge.setOpaque(false); lblDayofHistoryPurge.setTextStyle(0); lblDayofHistoryPurge.setForeground(Color.black); lblDayofHistoryPurge.setTextShadowColor(Color.darkGray); lblDayofHistoryPurge.setTextHighlightColor(Color.gray); lblDayofHistoryPurge.setBackground(Color.lightGray); lblDayofHistoryPurge.setHorizontalAlignment(SwingConstants.RIGHT); lblDayofHistoryPurge.setVerticalAlignment(SwingConstants.CENTER); lblDayofHistoryPurge.setHorizontalTextPosition(SwingConstants.RIGHT); lblDayofHistoryPurge.setVerticalTextPosition(SwingConstants.CENTER); lblDayofHistoryPurge.setWordWrap(false); lblDayofHistoryPurge.setFont(new Font("SansSerif", 1, 12)); // Initialize lblNonStockMonth lblNonStockMonth = new com.sssw.rt.jform.AgcJLabel(); lblNonStockMonth.setName("lblNonStockMonth"); lblNonStockMonth.setBounds(348, 114, 75, 20); lblNonStockMonth.setText(""); lblNonStockMonth.setOpaque(false); lblNonStockMonth.setTextStyle(0); lblNonStockMonth.setForeground(Color.black); lblNonStockMonth.setTextShadowColor(Color.darkGray); lblNonStockMonth.setTextHighlightColor(Color.gray); lblNonStockMonth.setBackground(Color.lightGray); lblNonStockMonth.setHorizontalAlignment(SwingConstants.LEFT); lblNonStockMonth.setVerticalAlignment(SwingConstants.CENTER); lblNonStockMonth.setHorizontalTextPosition(SwingConstants.RIGHT); lblNonStockMonth.setVerticalTextPosition(SwingConstants.CENTER); lblNonStockMonth.setWordWrap(false); lblNonStockMonth.setFont(new Font("SansSerif", 0, 12)); // Initialize rbDoNotClear rbDoNotClear = new com.sssw.rt.jform.AgcJRadioButton(); rbDoNotClear.setName("rbDoNotClear"); rbDoNotClear.setBounds(121, 331, 263, 20); rbDoNotClear.setContentAreaFilled(false); rbDoNotClear.setBorderPainted(false); rbDoNotClear.setMargin(new Insets(0, 0, 0, 0)); rbDoNotClear.setHorizontalAlignment(SwingConstants.LEFT); rbDoNotClear.setVerticalAlignment(SwingConstants.CENTER); rbDoNotClear.setHorizontalTextPosition(SwingConstants.RIGHT); rbDoNotClear.setVerticalTextPosition(SwingConstants.CENTER); rbDoNotClear.setText("Do Not Clear"); rbDoNotClear.setFont(new Font("SansSerif", 1, 12)); rbDoNotClear.setForeground(Color.black); rbDoNotClear.setBackground(AgoColorManager.getColor(212, 208, 200)); DefaultJButtonGroup.add(rbDoNotClear); // Initialize rbClearCalenderYearEnd rbClearCalenderYearEnd = new com.sssw.rt.jform.AgcJRadioButton(); rbClearCalenderYearEnd.setName("rbClearCalenderYearEnd"); rbClearCalenderYearEnd.setBounds(121, 301, 277, 20); rbClearCalenderYearEnd.setContentAreaFilled(false); rbClearCalenderYearEnd.setBorderPainted(false); rbClearCalenderYearEnd.setMargin(new Insets(0, 0, 0, 0)); rbClearCalenderYearEnd.setHorizontalAlignment(SwingConstants.LEFT); rbClearCalenderYearEnd.setVerticalAlignment(SwingConstants.CENTER); rbClearCalenderYearEnd.setHorizontalTextPosition(SwingConstants.RIGHT); rbClearCalenderYearEnd.setVerticalTextPosition(SwingConstants.CENTER); rbClearCalenderYearEnd.setText("Clear at Calendar Year End"); rbClearCalenderYearEnd.setFont(new Font("SansSerif", 1, 12)); rbClearCalenderYearEnd.setForeground(Color.black); rbClearCalenderYearEnd.setBackground(AgoColorManager.getColor(212, 208, 200)); DefaultJButtonGroup.add(rbClearCalenderYearEnd); // Initialize rbClearFiscalYearEnd rbClearFiscalYearEnd = new com.sssw.rt.jform.AgcJRadioButton(); rbClearFiscalYearEnd.setName("rbClearFiscalYearEnd"); rbClearFiscalYearEnd.setBounds(121, 271, 269, 20); rbClearFiscalYearEnd.setContentAreaFilled(false); rbClearFiscalYearEnd.setBorderPainted(false); rbClearFiscalYearEnd.setMargin(new Insets(0, 0, 0, 0)); rbClearFiscalYearEnd.setHorizontalAlignment(SwingConstants.LEFT); rbClearFiscalYearEnd.setVerticalAlignment(SwingConstants.CENTER); rbClearFiscalYearEnd.setHorizontalTextPosition(SwingConstants.RIGHT); rbClearFiscalYearEnd.setVerticalTextPosition(SwingConstants.CENTER); rbClearFiscalYearEnd.setText("Clear at Fiscal Year End"); rbClearFiscalYearEnd.setFont(new Font("SansSerif", 1, 12)); rbClearFiscalYearEnd.setForeground(Color.black); rbClearFiscalYearEnd.setBackground(AgoColorManager.getColor(212, 208, 200)); DefaultJButtonGroup.add(rbClearFiscalYearEnd); // Initialize chkUseDuplex chkUseDuplex = new com.sssw.rt.jform.AgcJCheckBox(); chkUseDuplex.setName("chkUseDuplex"); chkUseDuplex.setBounds(256, 587, 13, 20); chkUseDuplex.setContentAreaFilled(false); chkUseDuplex.setBorderPainted(false); chkUseDuplex.setText(""); chkUseDuplex.setCheckedValue("Y"); chkUseDuplex.setUncheckedValue("N"); chkUseDuplex.setFont(new Font("SansSerif", 0, 12)); chkUseDuplex.setForeground(Color.black); chkUseDuplex.setBackground(AgoColorManager.getColor(212, 208, 200)); // Initialize lblUseDuplex lblUseDuplex = new com.sssw.rt.jform.AgcJLabel(); lblUseDuplex.setName("lblUseDuplex"); lblUseDuplex.setBounds(41, 587, 200, 20); lblUseDuplex.setText("Use Duplex"); lblUseDuplex.setOpaque(false); lblUseDuplex.setTextStyle(0); lblUseDuplex.setForeground(Color.black); lblUseDuplex.setTextShadowColor(Color.darkGray); lblUseDuplex.setTextHighlightColor(Color.gray); lblUseDuplex.setBackground(Color.lightGray); lblUseDuplex.setHorizontalAlignment(SwingConstants.RIGHT); lblUseDuplex.setVerticalAlignment(SwingConstants.CENTER); lblUseDuplex.setHorizontalTextPosition(SwingConstants.RIGHT); lblUseDuplex.setVerticalTextPosition(SwingConstants.CENTER); lblUseDuplex.setWordWrap(false); lblUseDuplex.setFont(new Font("SansSerif", 1, 12)); // Initialize lblPrinterOrientation lblPrinterOrientation = new com.sssw.rt.jform.AgcJLabel(); lblPrinterOrientation.setName("lblPrinterOrientation"); lblPrinterOrientation.setBounds(41, 557, 200, 20); lblPrinterOrientation.setText("Printer Orientation"); lblPrinterOrientation.setOpaque(false); lblPrinterOrientation.setTextStyle(0); lblPrinterOrientation.setForeground(Color.black); lblPrinterOrientation.setTextShadowColor(Color.darkGray); lblPrinterOrientation.setTextHighlightColor(Color.gray); lblPrinterOrientation.setBackground(Color.lightGray); lblPrinterOrientation.setHorizontalAlignment(SwingConstants.RIGHT); lblPrinterOrientation.setVerticalAlignment(SwingConstants.CENTER); lblPrinterOrientation.setHorizontalTextPosition(SwingConstants.RIGHT); lblPrinterOrientation.setVerticalTextPosition(SwingConstants.CENTER); lblPrinterOrientation.setWordWrap(false); lblPrinterOrientation.setFont(new Font("SansSerif", 1, 12)); // Initialize cbPrinterOrientation cbPrinterOrientation = new com.sssw.rt.jform.AgcJComboBox(); cbPrinterOrientation.setName("cbPrinterOrientation"); cbPrinterOrientation.setBounds(256, 557, 132, 25); cbPrinterOrientation.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbPrinterOrientationModel = new DefaultComboBoxModel(); cbPrinterOrientation.setModel(cbPrinterOrientationModel); // Initialize lblAutoEODEmployee lblAutoEODEmployee = new com.sssw.rt.jform.AgcJLabel(); lblAutoEODEmployee.setName("lblAutoEODEmployee"); lblAutoEODEmployee.setBounds(41, 477, 200, 20); lblAutoEODEmployee.setText("EOD Employee"); lblAutoEODEmployee.setOpaque(false); lblAutoEODEmployee.setTextStyle(0); lblAutoEODEmployee.setForeground(Color.black); lblAutoEODEmployee.setTextShadowColor(Color.darkGray); lblAutoEODEmployee.setTextHighlightColor(Color.gray); lblAutoEODEmployee.setBackground(Color.lightGray); lblAutoEODEmployee.setHorizontalAlignment(SwingConstants.RIGHT); lblAutoEODEmployee.setVerticalAlignment(SwingConstants.CENTER); lblAutoEODEmployee.setHorizontalTextPosition(SwingConstants.RIGHT); lblAutoEODEmployee.setVerticalTextPosition(SwingConstants.CENTER); lblAutoEODEmployee.setWordWrap(false); lblAutoEODEmployee.setFont(new Font("SansSerif", 1, 12)); // Initialize cbEODPrinter cbEODPrinter = new com.sssw.rt.jform.AgcJComboBox(); cbEODPrinter.setName("cbEODPrinter"); cbEODPrinter.setBounds(256, 525, 187, 25); cbEODPrinter.setFont(new Font("SansSerif", 0, 12)); cbEODPrinter.setDisplayExpression(33); cbEODPrinter.setValueExpression(34); cbEODPrinter.setAutomaticQuery(true); // Initialize lblPhoneSwitchLock lblPhoneSwitchLock = new com.sssw.rt.jform.AgcJLabel(); lblPhoneSwitchLock.setName("lblPhoneSwitchLock"); lblPhoneSwitchLock.setBounds(366, 185, 50, 20); lblPhoneSwitchLock.setText("Lock"); lblPhoneSwitchLock.setOpaque(false); lblPhoneSwitchLock.setTextStyle(0); lblPhoneSwitchLock.setForeground(Color.black); lblPhoneSwitchLock.setTextShadowColor(Color.darkGray); lblPhoneSwitchLock.setTextHighlightColor(Color.gray); lblPhoneSwitchLock.setBackground(Color.lightGray); lblPhoneSwitchLock.setHorizontalAlignment(SwingConstants.RIGHT); lblPhoneSwitchLock.setVerticalAlignment(SwingConstants.CENTER); lblPhoneSwitchLock.setHorizontalTextPosition(SwingConstants.RIGHT); lblPhoneSwitchLock.setVerticalTextPosition(SwingConstants.CENTER); lblPhoneSwitchLock.setWordWrap(false); lblPhoneSwitchLock.setFont(new Font("SansSerif", 1, 12)); // Initialize lblTransmitSalesLock lblTransmitSalesLock = new com.sssw.rt.jform.AgcJLabel(); lblTransmitSalesLock.setName("lblTransmitSalesLock"); lblTransmitSalesLock.setBounds(366, 160, 50, 20); lblTransmitSalesLock.setText("Lock"); lblTransmitSalesLock.setOpaque(false); lblTransmitSalesLock.setTextStyle(0); lblTransmitSalesLock.setForeground(Color.black); lblTransmitSalesLock.setTextShadowColor(Color.darkGray); lblTransmitSalesLock.setTextHighlightColor(Color.gray); lblTransmitSalesLock.setBackground(Color.lightGray); lblTransmitSalesLock.setHorizontalAlignment(SwingConstants.RIGHT); lblTransmitSalesLock.setVerticalAlignment(SwingConstants.CENTER); lblTransmitSalesLock.setHorizontalTextPosition(SwingConstants.RIGHT); lblTransmitSalesLock.setVerticalTextPosition(SwingConstants.CENTER); lblTransmitSalesLock.setWordWrap(false); lblTransmitSalesLock.setFont(new Font("SansSerif", 1, 12)); // Initialize chkLockPhoneReminder chkLockPhoneReminder = new com.sssw.rt.jform.AgcJCheckBox(); chkLockPhoneReminder.setName("chkLockPhoneReminder"); chkLockPhoneReminder.setBounds(421, 185, 13, 20); chkLockPhoneReminder.setContentAreaFilled(false); chkLockPhoneReminder.setBorderPainted(false); chkLockPhoneReminder.setText(""); chkLockPhoneReminder.setCheckedValue(""); chkLockPhoneReminder.setUncheckedValue(""); chkLockPhoneReminder.setFont(new Font("SansSerif", 0, 12)); chkLockPhoneReminder.setForeground(Color.black); chkLockPhoneReminder.setBackground(AgoColorManager.getColor(212, 208, 200)); // Initialize chkLockTransmit chkLockTransmit = new com.sssw.rt.jform.AgcJCheckBox(); chkLockTransmit.setName("chkLockTransmit"); chkLockTransmit.setBounds(421, 160, 13, 20); chkLockTransmit.setContentAreaFilled(false); chkLockTransmit.setBorderPainted(false); chkLockTransmit.setText(""); chkLockTransmit.setCheckedValue(""); chkLockTransmit.setUncheckedValue(""); chkLockTransmit.setFont(new Font("SansSerif", 0, 12)); chkLockTransmit.setForeground(Color.black); chkLockTransmit.setBackground(AgoColorManager.getColor(212, 208, 200)); // Initialize lblPriorInvoiceCosting lblPriorInvoiceCosting = new com.sssw.rt.jform.AgcJLabel(); lblPriorInvoiceCosting.setName("lblPriorInvoiceCosting"); lblPriorInvoiceCosting.setBounds(281, 387, 300, 20); lblPriorInvoiceCosting.setText("(invoice costing must be done prior to start time)"); lblPriorInvoiceCosting.setOpaque(false); lblPriorInvoiceCosting.setTextStyle(0); lblPriorInvoiceCosting.setForeground(Color.black); lblPriorInvoiceCosting.setTextShadowColor(Color.darkGray); lblPriorInvoiceCosting.setTextHighlightColor(Color.gray); lblPriorInvoiceCosting.setBackground(Color.lightGray); lblPriorInvoiceCosting.setHorizontalAlignment(SwingConstants.LEFT); lblPriorInvoiceCosting.setVerticalAlignment(SwingConstants.CENTER); lblPriorInvoiceCosting.setHorizontalTextPosition(SwingConstants.RIGHT); lblPriorInvoiceCosting.setVerticalTextPosition(SwingConstants.CENTER); lblPriorInvoiceCosting.setWordWrap(false); lblPriorInvoiceCosting.setFont(new Font("SansSerif", 1, 12)); // Initialize lblUnattendedBU lblUnattendedBU = new com.sssw.rt.jform.AgcJLabel(); lblUnattendedBU.setName("lblUnattendedBU"); lblUnattendedBU.setBounds(625, 440, 200, 20); lblUnattendedBU.setText("Unattended Backup Time"); lblUnattendedBU.setOpaque(false); lblUnattendedBU.setTextStyle(0); lblUnattendedBU.setForeground(Color.black); lblUnattendedBU.setTextShadowColor(Color.darkGray); lblUnattendedBU.setTextHighlightColor(Color.gray); lblUnattendedBU.setBackground(Color.lightGray); lblUnattendedBU.setHorizontalAlignment(SwingConstants.RIGHT); lblUnattendedBU.setVerticalAlignment(SwingConstants.CENTER); lblUnattendedBU.setHorizontalTextPosition(SwingConstants.RIGHT); lblUnattendedBU.setVerticalTextPosition(SwingConstants.CENTER); lblUnattendedBU.setWordWrap(false); lblUnattendedBU.setFont(new Font("SansSerif", 1, 12)); // Initialize cbAutoEODEmployee cbAutoEODEmployee = new com.sssw.rt.jform.AgcJComboBox(); cbAutoEODEmployee.setName("cbAutoEODEmployee"); cbAutoEODEmployee.setBounds(256, 476, 290, 25); cbAutoEODEmployee.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbAutoEODEmployeeModel = new DefaultComboBoxModel(); cbAutoEODEmployee.setModel(cbAutoEODEmployeeModel); // Initialize lblEODPrinter lblEODPrinter = new com.sssw.rt.jform.AgcJLabel(); lblEODPrinter.setName("lblEODPrinter"); lblEODPrinter.setBounds(41, 528, 200, 20); lblEODPrinter.setText("EOD Printer"); lblEODPrinter.setOpaque(false); lblEODPrinter.setTextStyle(0); lblEODPrinter.setForeground(Color.black); lblEODPrinter.setTextShadowColor(Color.darkGray); lblEODPrinter.setTextHighlightColor(Color.gray); lblEODPrinter.setBackground(Color.lightGray); lblEODPrinter.setHorizontalAlignment(SwingConstants.RIGHT); lblEODPrinter.setVerticalAlignment(SwingConstants.CENTER); lblEODPrinter.setHorizontalTextPosition(SwingConstants.RIGHT); lblEODPrinter.setVerticalTextPosition(SwingConstants.CENTER); lblEODPrinter.setWordWrap(false); lblEODPrinter.setFont(new Font("SansSerif", 1, 12)); // Initialize lblEnableAutomaticEOD lblEnableAutomaticEOD = new com.sssw.rt.jform.AgcJLabel(); lblEnableAutomaticEOD.setName("lblEnableAutomaticEOD"); lblEnableAutomaticEOD.setBounds(41, 387, 200, 20); lblEnableAutomaticEOD.setText("Enable Automatic EOD"); lblEnableAutomaticEOD.setOpaque(false); lblEnableAutomaticEOD.setTextStyle(0); lblEnableAutomaticEOD.setForeground(Color.black); lblEnableAutomaticEOD.setTextShadowColor(Color.darkGray); lblEnableAutomaticEOD.setTextHighlightColor(Color.gray); lblEnableAutomaticEOD.setBackground(Color.lightGray); lblEnableAutomaticEOD.setHorizontalAlignment(SwingConstants.RIGHT); lblEnableAutomaticEOD.setVerticalAlignment(SwingConstants.CENTER); lblEnableAutomaticEOD.setHorizontalTextPosition(SwingConstants.RIGHT); lblEnableAutomaticEOD.setVerticalTextPosition(SwingConstants.CENTER); lblEnableAutomaticEOD.setWordWrap(false); lblEnableAutomaticEOD.setFont(new Font("SansSerif", 1, 12)); // Initialize chkEnableAutoEOD chkEnableAutoEOD = new com.sssw.rt.jform.AgcJCheckBox(); chkEnableAutoEOD.setName("chkEnableAutoEOD"); chkEnableAutoEOD.setBounds(256, 387, 13, 20); chkEnableAutoEOD.setContentAreaFilled(false); chkEnableAutoEOD.setBorderPainted(false); chkEnableAutoEOD.setText(""); chkEnableAutoEOD.setCheckedValue("1"); chkEnableAutoEOD.setUncheckedValue("0"); chkEnableAutoEOD.setFont(new Font("SansSerif", 0, 12)); chkEnableAutoEOD.setForeground(Color.black); chkEnableAutoEOD.setBackground(AgoColorManager.getColor(212, 208, 200)); // Initialize lblAutoEODStartTime lblAutoEODStartTime = new com.sssw.rt.jform.AgcJLabel(); lblAutoEODStartTime.setName("lblAutoEODStartTime"); lblAutoEODStartTime.setBounds(41, 417, 200, 20); lblAutoEODStartTime.setText("EOD Start Time"); lblAutoEODStartTime.setOpaque(false); lblAutoEODStartTime.setTextStyle(0); lblAutoEODStartTime.setForeground(Color.black); lblAutoEODStartTime.setTextShadowColor(Color.darkGray); lblAutoEODStartTime.setTextHighlightColor(Color.gray); lblAutoEODStartTime.setBackground(Color.lightGray); lblAutoEODStartTime.setHorizontalAlignment(SwingConstants.RIGHT); lblAutoEODStartTime.setVerticalAlignment(SwingConstants.CENTER); lblAutoEODStartTime.setHorizontalTextPosition(SwingConstants.RIGHT); lblAutoEODStartTime.setVerticalTextPosition(SwingConstants.CENTER); lblAutoEODStartTime.setWordWrap(false); lblAutoEODStartTime.setFont(new Font("SansSerif", 1, 12)); // Initialize lblGPC lblGPC = new com.sssw.rt.jform.AgcJLabel(); lblGPC.setName("lblGPC"); lblGPC.setBounds(632, 57, 55, 20); lblGPC.setText(""); lblGPC.setOpaque(false); lblGPC.setTextStyle(0); lblGPC.setForeground(Color.black); lblGPC.setTextShadowColor(Color.darkGray); lblGPC.setTextHighlightColor(Color.gray); lblGPC.setBackground(Color.lightGray); lblGPC.setHorizontalAlignment(SwingConstants.LEFT); lblGPC.setVerticalAlignment(SwingConstants.CENTER); lblGPC.setHorizontalTextPosition(SwingConstants.RIGHT); lblGPC.setVerticalTextPosition(SwingConstants.CENTER); lblGPC.setWordWrap(false); lblGPC.setFont(new Font("SansSerif", 0, 12)); // Initialize lblStoreHdg lblStoreHdg = new com.sssw.rt.jform.AgcJLabel(); lblStoreHdg.setName("lblStoreHdg"); lblStoreHdg.setBounds(151, 57, 65, 20); lblStoreHdg.setText("Store"); lblStoreHdg.setOpaque(false); lblStoreHdg.setTextStyle(0); lblStoreHdg.setForeground(Color.black); lblStoreHdg.setTextShadowColor(Color.darkGray); lblStoreHdg.setTextHighlightColor(Color.gray); lblStoreHdg.setBackground(Color.lightGray); lblStoreHdg.setHorizontalAlignment(SwingConstants.RIGHT); lblStoreHdg.setVerticalAlignment(SwingConstants.CENTER); lblStoreHdg.setHorizontalTextPosition(SwingConstants.RIGHT); lblStoreHdg.setVerticalTextPosition(SwingConstants.CENTER); lblStoreHdg.setWordWrap(false); lblStoreHdg.setFont(new Font("SansSerif", 1, 12)); // Initialize lblStoreNumber lblStoreNumber = new com.sssw.rt.jform.AgcJLabel(); lblStoreNumber.setName("lblStoreNumber"); lblStoreNumber.setBounds(231, 57, 76, 20); lblStoreNumber.setText(""); lblStoreNumber.setOpaque(false); lblStoreNumber.setTextStyle(0); lblStoreNumber.setForeground(Color.black); lblStoreNumber.setTextShadowColor(Color.darkGray); lblStoreNumber.setTextHighlightColor(Color.gray); lblStoreNumber.setBackground(Color.lightGray); lblStoreNumber.setHorizontalAlignment(SwingConstants.LEFT); lblStoreNumber.setVerticalAlignment(SwingConstants.CENTER); lblStoreNumber.setHorizontalTextPosition(SwingConstants.RIGHT); lblStoreNumber.setVerticalTextPosition(SwingConstants.CENTER); lblStoreNumber.setWordWrap(false); lblStoreNumber.setFont(new Font("SansSerif", 0, 12)); // Initialize lblStoreType lblStoreType = new com.sssw.rt.jform.AgcJLabel(); lblStoreType.setName("lblStoreType"); lblStoreType.setBounds(617, 57, 20, 20); lblStoreType.setText(""); lblStoreType.setOpaque(false); lblStoreType.setTextStyle(0); lblStoreType.setForeground(Color.black); lblStoreType.setTextShadowColor(Color.darkGray); lblStoreType.setTextHighlightColor(Color.gray); lblStoreType.setBackground(Color.lightGray); lblStoreType.setHorizontalAlignment(SwingConstants.LEFT); lblStoreType.setVerticalAlignment(SwingConstants.CENTER); lblStoreType.setHorizontalTextPosition(SwingConstants.RIGHT); lblStoreType.setVerticalTextPosition(SwingConstants.CENTER); lblStoreType.setWordWrap(false); lblStoreType.setFont(new Font("SansSerif", 0, 12)); // Initialize lblTypeHdg lblTypeHdg = new com.sssw.rt.jform.AgcJLabel(); lblTypeHdg.setName("lblTypeHdg"); lblTypeHdg.setBounds(567, 57, 35, 20); lblTypeHdg.setText("Type"); lblTypeHdg.setOpaque(false); lblTypeHdg.setTextStyle(0); lblTypeHdg.setForeground(Color.black); lblTypeHdg.setTextShadowColor(Color.darkGray); lblTypeHdg.setTextHighlightColor(Color.gray); lblTypeHdg.setBackground(Color.lightGray); lblTypeHdg.setHorizontalAlignment(SwingConstants.RIGHT); lblTypeHdg.setVerticalAlignment(SwingConstants.CENTER); lblTypeHdg.setHorizontalTextPosition(SwingConstants.RIGHT); lblTypeHdg.setVerticalTextPosition(SwingConstants.CENTER); lblTypeHdg.setWordWrap(false); lblTypeHdg.setFont(new Font("SansSerif", 1, 12)); // Initialize lblStoreName lblStoreName = new com.sssw.rt.jform.AgcJLabel(); lblStoreName.setName("lblStoreName"); lblStoreName.setBounds(306, 57, 250, 20); lblStoreName.setText(""); lblStoreName.setOpaque(false); lblStoreName.setTextStyle(0); lblStoreName.setForeground(Color.black); lblStoreName.setTextShadowColor(Color.darkGray); lblStoreName.setTextHighlightColor(Color.gray); lblStoreName.setBackground(Color.lightGray); lblStoreName.setHorizontalAlignment(SwingConstants.LEFT); lblStoreName.setVerticalAlignment(SwingConstants.CENTER); lblStoreName.setHorizontalTextPosition(SwingConstants.RIGHT); lblStoreName.setVerticalTextPosition(SwingConstants.CENTER); lblStoreName.setWordWrap(false); lblStoreName.setFont(new Font("SansSerif", 0, 12)); // Initialize lblCompanyID lblCompanyID = new com.sssw.rt.jform.AgcJLabel(); lblCompanyID.setName("lblCompanyID"); lblCompanyID.setBounds(137, 57, 47, 20); lblCompanyID.setText(""); lblCompanyID.setOpaque(false); lblCompanyID.setTextStyle(0); lblCompanyID.setForeground(Color.black); lblCompanyID.setTextShadowColor(Color.darkGray); lblCompanyID.setTextHighlightColor(Color.gray); lblCompanyID.setBackground(Color.lightGray); lblCompanyID.setHorizontalAlignment(SwingConstants.LEFT); lblCompanyID.setVerticalAlignment(SwingConstants.CENTER); lblCompanyID.setHorizontalTextPosition(SwingConstants.RIGHT); lblCompanyID.setVerticalTextPosition(SwingConstants.CENTER); lblCompanyID.setWordWrap(false); lblCompanyID.setFont(new Font("SansSerif", 0, 12)); // Initialize lblCompanyHdg lblCompanyHdg = new com.sssw.rt.jform.AgcJLabel(); lblCompanyHdg.setName("lblCompanyHdg"); lblCompanyHdg.setBounds(11, 57, 111, 20); lblCompanyHdg.setText("Company"); lblCompanyHdg.setOpaque(false); lblCompanyHdg.setTextStyle(0); lblCompanyHdg.setForeground(Color.black); lblCompanyHdg.setTextShadowColor(Color.darkGray); lblCompanyHdg.setTextHighlightColor(Color.gray); lblCompanyHdg.setBackground(Color.lightGray); lblCompanyHdg.setHorizontalAlignment(SwingConstants.RIGHT); lblCompanyHdg.setVerticalAlignment(SwingConstants.CENTER); lblCompanyHdg.setHorizontalTextPosition(SwingConstants.RIGHT); lblCompanyHdg.setVerticalTextPosition(SwingConstants.CENTER); lblCompanyHdg.setWordWrap(false); lblCompanyHdg.setFont(new Font("SansSerif", 1, 12)); // Initialize lblPhoneSwitch lblPhoneSwitch = new com.sssw.rt.jform.AgcJLabel(); lblPhoneSwitch.setName("lblPhoneSwitch"); lblPhoneSwitch.setBounds(19, 185, 314, 20); lblPhoneSwitch.setText("Phone Switch Reminder"); lblPhoneSwitch.setOpaque(false); lblPhoneSwitch.setTextStyle(0); lblPhoneSwitch.setForeground(Color.black); lblPhoneSwitch.setTextShadowColor(Color.darkGray); lblPhoneSwitch.setTextHighlightColor(Color.gray); lblPhoneSwitch.setBackground(Color.lightGray); lblPhoneSwitch.setHorizontalAlignment(SwingConstants.RIGHT); lblPhoneSwitch.setVerticalAlignment(SwingConstants.CENTER); lblPhoneSwitch.setHorizontalTextPosition(SwingConstants.RIGHT); lblPhoneSwitch.setVerticalTextPosition(SwingConstants.CENTER); lblPhoneSwitch.setWordWrap(false); lblPhoneSwitch.setFont(new Font("SansSerif", 1, 12)); // Initialize chkPhoneReminder chkPhoneReminder = new com.sssw.rt.jform.AgcJCheckBox(); chkPhoneReminder.setName("chkPhoneReminder"); chkPhoneReminder.setBounds(348, 185, 13, 20); chkPhoneReminder.setContentAreaFilled(false); chkPhoneReminder.setBorderPainted(false); chkPhoneReminder.setText(""); chkPhoneReminder.setCheckedValue(""); chkPhoneReminder.setUncheckedValue(""); chkPhoneReminder.setFont(new Font("SansSerif", 0, 12)); chkPhoneReminder.setForeground(Color.black); chkPhoneReminder.setBackground(AgoColorManager.getColor(212, 208, 200)); // Initialize chkTransmit chkTransmit = new com.sssw.rt.jform.AgcJCheckBox(); chkTransmit.setName("chkTransmit"); chkTransmit.setBounds(348, 160, 13, 20); chkTransmit.setContentAreaFilled(false); chkTransmit.setBorderPainted(false); chkTransmit.setText(""); chkTransmit.setCheckedValue(""); chkTransmit.setUncheckedValue(""); chkTransmit.setFont(new Font("SansSerif", 0, 12)); chkTransmit.setForeground(Color.black); chkTransmit.setBackground(AgoColorManager.getColor(212, 208, 200)); // Initialize lblTransmitSalesAndCost lblTransmitSalesAndCost = new com.sssw.rt.jform.AgcJLabel(); lblTransmitSalesAndCost.setName("lblTransmitSalesAndCost"); lblTransmitSalesAndCost.setBounds(19, 160, 314, 20); lblTransmitSalesAndCost.setText("Transmit Sales & Cost for Reported Sales"); lblTransmitSalesAndCost.setOpaque(false); lblTransmitSalesAndCost.setTextStyle(0); lblTransmitSalesAndCost.setForeground(Color.black); lblTransmitSalesAndCost.setTextShadowColor(Color.darkGray); lblTransmitSalesAndCost.setTextHighlightColor(Color.gray); lblTransmitSalesAndCost.setBackground(Color.lightGray); lblTransmitSalesAndCost.setHorizontalAlignment(SwingConstants.RIGHT); lblTransmitSalesAndCost.setVerticalAlignment(SwingConstants.CENTER); lblTransmitSalesAndCost.setHorizontalTextPosition(SwingConstants.RIGHT); lblTransmitSalesAndCost.setVerticalTextPosition(SwingConstants.CENTER); lblTransmitSalesAndCost.setWordWrap(false); lblTransmitSalesAndCost.setFont(new Font("SansSerif", 1, 12)); // Initialize lblUselabelQuantityLock lblUselabelQuantityLock = new com.sssw.rt.jform.AgcJLabel(); lblUselabelQuantityLock.setName("lblUselabelQuantityLock"); lblUselabelQuantityLock.setBounds(855, 383, 50, 20); lblUselabelQuantityLock.setText("Lock"); lblUselabelQuantityLock.setOpaque(false); lblUselabelQuantityLock.setTextStyle(0); lblUselabelQuantityLock.setForeground(Color.black); lblUselabelQuantityLock.setTextShadowColor(Color.darkGray); lblUselabelQuantityLock.setTextHighlightColor(Color.gray); lblUselabelQuantityLock.setBackground(Color.lightGray); lblUselabelQuantityLock.setHorizontalAlignment(SwingConstants.RIGHT); lblUselabelQuantityLock.setVerticalAlignment(SwingConstants.CENTER); lblUselabelQuantityLock.setHorizontalTextPosition(SwingConstants.RIGHT); lblUselabelQuantityLock.setVerticalTextPosition(SwingConstants.CENTER); lblUselabelQuantityLock.setWordWrap(false); lblUselabelQuantityLock.setFont(new Font("SansSerif", 1, 12)); // Initialize ckbUselabelQuantityLock ckbUselabelQuantityLock = new com.sssw.rt.jform.AgcJCheckBox(); ckbUselabelQuantityLock.setName("ckbUselabelQuantityLock"); ckbUselabelQuantityLock.setBounds(918, 383, 13, 20); ckbUselabelQuantityLock.setContentAreaFilled(false); ckbUselabelQuantityLock.setBorderPainted(false); ckbUselabelQuantityLock.setText(""); ckbUselabelQuantityLock.setCheckedValue(""); ckbUselabelQuantityLock.setUncheckedValue(""); ckbUselabelQuantityLock.setFont(new Font("SansSerif", 0, 12)); ckbUselabelQuantityLock.setForeground(Color.black); ckbUselabelQuantityLock.setBackground(AgoColorManager.getColor(212, 208, 200)); //Initialize lblUselabelQuantity lblUselabelQuantity = new com.sssw.rt.jform.AgcJLabel(); lblUselabelQuantity.setName("lblUselabelQuantity"); lblUselabelQuantity.setBounds(515, 383, 314, 20); lblUselabelQuantity.setText("Use Label Quantity for Label Generation"); lblUselabelQuantity.setOpaque(false); lblUselabelQuantity.setTextStyle(0); lblUselabelQuantity.setForeground(Color.black); lblUselabelQuantity.setTextShadowColor(Color.darkGray); lblUselabelQuantity.setTextHighlightColor(Color.gray); lblUselabelQuantity.setBackground(Color.lightGray); lblUselabelQuantity.setHorizontalAlignment(SwingConstants.RIGHT); lblUselabelQuantity.setVerticalAlignment(SwingConstants.CENTER); lblUselabelQuantity.setHorizontalTextPosition(SwingConstants.RIGHT); lblUselabelQuantity.setVerticalTextPosition(SwingConstants.CENTER); lblUselabelQuantity.setWordWrap(false); lblUselabelQuantity.setFont(new Font("SansSerif", 1, 12)); // Initialize ckbUselabelQuantity ckbUselabelQuantity = new com.sssw.rt.jform.AgcJCheckBox(); ckbUselabelQuantity.setName("ckbUselabelQuantity"); ckbUselabelQuantity.setBounds(835, 383, 13, 20); ckbUselabelQuantity.setContentAreaFilled(false); ckbUselabelQuantity.setBorderPainted(false); ckbUselabelQuantity.setText(""); ckbUselabelQuantity.setCheckedValue(""); ckbUselabelQuantity.setUncheckedValue(""); ckbUselabelQuantity.setFont(new Font("SansSerif", 0, 12)); ckbUselabelQuantity.setForeground(Color.black); ckbUselabelQuantity.setBackground(AgoColorManager.getColor(212, 208, 200)); // Initialize lblLastMonthNonStockPurge lblLastMonthNonStockPurge = new com.sssw.rt.jform.AgcJLabel(); lblLastMonthNonStockPurge.setName("lblLastMonthNonStockPurge"); lblLastMonthNonStockPurge.setBounds(22, 110, 311, 20); lblLastMonthNonStockPurge.setText("Last Month Non-Stock Purge Ran"); lblLastMonthNonStockPurge.setOpaque(false); lblLastMonthNonStockPurge.setTextStyle(0); lblLastMonthNonStockPurge.setForeground(Color.black); lblLastMonthNonStockPurge.setTextShadowColor(Color.darkGray); lblLastMonthNonStockPurge.setTextHighlightColor(Color.gray); lblLastMonthNonStockPurge.setBackground(Color.lightGray); lblLastMonthNonStockPurge.setHorizontalAlignment(SwingConstants.RIGHT); lblLastMonthNonStockPurge.setVerticalAlignment(SwingConstants.CENTER); lblLastMonthNonStockPurge.setHorizontalTextPosition(SwingConstants.RIGHT); lblLastMonthNonStockPurge.setVerticalTextPosition(SwingConstants.CENTER); lblLastMonthNonStockPurge.setWordWrap(false); lblLastMonthNonStockPurge.setFont(new Font("SansSerif", 1, 12)); // Initialize tblEOM tblEOM = new com.sssw.rt.jform.AgcJTable(); tblEOM.setName("tblEOM"); tblEOMScrollPane = new JScrollPane(tblEOM); tblEOMScrollPane.setBounds(626, 125, 360, 217); tblEOM.setEditable(false); tblEOM.setCellSelectionEnabled(true); tblEOM.setShowGrid(true); tblEOM.setGridColor(Color.gray); tblEOM.setForeground(Color.black); tblEOM.setBackground(Color.white); tblEOM.setSelectionForeground(Color.white); tblEOM.setSelectionBackground(AgoColorManager.getColor(10, 36, 106)); tblEOM.setRowHeight(16); tblEOM.setRowMargin(1); tblEOM.getColumnModel().setColumnMargin(1); tblEOM.setFont(new Font("SansSerif", 0, 12)); // Initialize lblHeading lblHeading = new com.sssw.rt.jform.AgcJLabel(); lblHeading.setName("lblHeading"); lblHeading.setBounds(277, 5, 700, 27); lblHeading.setText("End of Day Controls"); lblHeading.setOpaque(false); lblHeading.setTextStyle(0); lblHeading.setForeground(AgoColorManager.getColor(24, 24, 231)); lblHeading.setTextShadowColor(Color.darkGray); lblHeading.setTextHighlightColor(Color.gray); lblHeading.setBackground(Color.lightGray); lblHeading.setHorizontalAlignment(SwingConstants.RIGHT); lblHeading.setVerticalAlignment(SwingConstants.CENTER); lblHeading.setHorizontalTextPosition(SwingConstants.RIGHT); lblHeading.setVerticalTextPosition(SwingConstants.CENTER); lblHeading.setWordWrap(false); lblHeading.setFont(new Font("SansSerif", 3, 24)); // Initialize lblEcatalogUpdateDay lblEcatalogUpdateDay = new com.sssw.rt.jform.AgcJLabel(); lblEcatalogUpdateDay.setName("lblEcatalogUpdateDay"); lblEcatalogUpdateDay.setBounds(19,215,314,20); lblEcatalogUpdateDay.setText("E-Catalog Update Day"); lblEcatalogUpdateDay.setOpaque(false); lblEcatalogUpdateDay.setTextStyle(0); lblEcatalogUpdateDay.setForeground(Color.black); lblEcatalogUpdateDay.setTextShadowColor(Color.darkGray); lblEcatalogUpdateDay.setTextHighlightColor(Color.gray); lblEcatalogUpdateDay.setBackground(Color.lightGray); lblEcatalogUpdateDay.setHorizontalAlignment(SwingConstants.RIGHT); lblEcatalogUpdateDay.setVerticalAlignment(SwingConstants.CENTER); lblEcatalogUpdateDay.setHorizontalTextPosition(SwingConstants.RIGHT); lblEcatalogUpdateDay.setVerticalTextPosition(SwingConstants.CENTER); lblEcatalogUpdateDay.setWordWrap(false); lblEcatalogUpdateDay.setFont(new Font("SansSerif", 1, 12)); // Initialize cbEcatalogUpdateDay cbEcatalogUpdateDay = new com.sssw.rt.jform.AgcJComboBox(); cbEcatalogUpdateDay.setName("cbEcatalogUpdateDay"); cbEcatalogUpdateDay.setBounds(348,215,60,20); cbEcatalogUpdateDay.setFont(new Font("SansSerif", 0, 12)); cbEcatalogUpdateDay.setDisplayExpression(31); cbEcatalogUpdateDay.setValueExpression(32); cbEcatalogUpdateDay.setAutomaticQuery(false); // Initialize lblECatalogUpdateFriday lblEcatalogUpdateDayOfWeekFriday = new com.sssw.rt.jform.AgcJLabel(); lblEcatalogUpdateDayOfWeekFriday.setName("lblEcatalogUpdateDayOfWeekFriday"); lblEcatalogUpdateDayOfWeekFriday.setBounds(400,215,60,20); lblEcatalogUpdateDayOfWeekFriday.setText("or Fri"); lblEcatalogUpdateDayOfWeekFriday.setOpaque(false); lblEcatalogUpdateDayOfWeekFriday.setTextStyle(0); lblEcatalogUpdateDayOfWeekFriday.setForeground(Color.black); lblEcatalogUpdateDayOfWeekFriday.setTextShadowColor(Color.darkGray); lblEcatalogUpdateDayOfWeekFriday.setTextHighlightColor(Color.gray); lblEcatalogUpdateDayOfWeekFriday.setBackground(Color.lightGray); lblEcatalogUpdateDayOfWeekFriday.setHorizontalAlignment(SwingConstants.RIGHT); lblEcatalogUpdateDayOfWeekFriday.setVerticalAlignment(SwingConstants.CENTER); lblEcatalogUpdateDayOfWeekFriday.setHorizontalTextPosition(SwingConstants.RIGHT); lblEcatalogUpdateDayOfWeekFriday.setVerticalTextPosition(SwingConstants.CENTER); lblEcatalogUpdateDayOfWeekFriday.setWordWrap(false); lblEcatalogUpdateDayOfWeekFriday.setFont(new Font("SansSerif", 1, 12)); // Initialize chkFridayE-CatlogUpdate chkEcatalogUpdateDayOfWeekFriday = new com.sssw.rt.jform.AgcJCheckBox(); chkEcatalogUpdateDayOfWeekFriday.setName("chkEcatalogUpdateDayOfWeekFriday"); chkEcatalogUpdateDayOfWeekFriday.setBounds(465,215,13,20); chkEcatalogUpdateDayOfWeekFriday.setContentAreaFilled(false); chkEcatalogUpdateDayOfWeekFriday.setBorderPainted(false); chkEcatalogUpdateDayOfWeekFriday.setText(""); chkEcatalogUpdateDayOfWeekFriday.setCheckedValue(""); chkEcatalogUpdateDayOfWeekFriday.setUncheckedValue(""); chkEcatalogUpdateDayOfWeekFriday.setFont(new Font("SansSerif", 0, 12)); chkEcatalogUpdateDayOfWeekFriday.setForeground(Color.black); chkEcatalogUpdateDayOfWeekFriday.setBackground(AgoColorManager.getColor(212, 208, 200)); // Initialize lblECatalogUpdateSatday lblEcatalogUpdateDayOfWeekSaturday = new com.sssw.rt.jform.AgcJLabel(); lblEcatalogUpdateDayOfWeekSaturday.setName("lblEcatalogUpdateDayOfWeekSaturday"); lblEcatalogUpdateDayOfWeekSaturday.setBounds(475,215,60,20); lblEcatalogUpdateDayOfWeekSaturday.setText("Sat"); lblEcatalogUpdateDayOfWeekSaturday.setOpaque(false); lblEcatalogUpdateDayOfWeekSaturday.setTextStyle(0); lblEcatalogUpdateDayOfWeekSaturday.setForeground(Color.black); lblEcatalogUpdateDayOfWeekSaturday.setTextShadowColor(Color.darkGray); lblEcatalogUpdateDayOfWeekSaturday.setTextHighlightColor(Color.gray); lblEcatalogUpdateDayOfWeekSaturday.setBackground(Color.lightGray); lblEcatalogUpdateDayOfWeekSaturday.setHorizontalAlignment(SwingConstants.RIGHT); lblEcatalogUpdateDayOfWeekSaturday.setVerticalAlignment(SwingConstants.CENTER); lblEcatalogUpdateDayOfWeekSaturday.setHorizontalTextPosition(SwingConstants.RIGHT); lblEcatalogUpdateDayOfWeekSaturday.setVerticalTextPosition(SwingConstants.CENTER); lblEcatalogUpdateDayOfWeekSaturday.setWordWrap(false); lblEcatalogUpdateDayOfWeekSaturday.setFont(new Font("SansSerif", 1, 12)); // Initialize chkSaturdayE-CatlogUpdate chkEcatalogUpdateDayOfWeekSaturday = new com.sssw.rt.jform.AgcJCheckBox(); chkEcatalogUpdateDayOfWeekSaturday.setName("chkEcatalogUpdateDayOfWeekSaturday"); chkEcatalogUpdateDayOfWeekSaturday.setBounds(540,215,13,20); chkEcatalogUpdateDayOfWeekSaturday.setContentAreaFilled(false); chkEcatalogUpdateDayOfWeekSaturday.setBorderPainted(false); chkEcatalogUpdateDayOfWeekSaturday.setText(""); chkEcatalogUpdateDayOfWeekSaturday.setCheckedValue(""); chkEcatalogUpdateDayOfWeekSaturday.setUncheckedValue(""); chkEcatalogUpdateDayOfWeekSaturday.setFont(new Font("SansSerif", 0, 12)); chkEcatalogUpdateDayOfWeekSaturday.setForeground(Color.black); chkEcatalogUpdateDayOfWeekSaturday.setBackground(AgoColorManager.getColor(212, 208, 200)); // Initialize Rectangle15 Rectangle15 = new com.sssw.rt.form.AgcRectangle(); Rectangle15.setName("Rectangle15"); Rectangle15.setBounds(10, 52, 998, 30); Rectangle15.setColor(Color.lightGray); Rectangle15.setBorderStyle(2); Rectangle15.setText(""); Rectangle15.setFont(new Font("SansSerif", 0, 12)); Rectangle15.setForeground(Color.black); Rectangle15.setTransparent(false); // Initialize rctClearAverageCost rctClearAverageCost = new com.sssw.rt.form.AgcRectangle(); rctClearAverageCost.setName("rctClearAverageCost"); rctClearAverageCost.setBounds(11, 255, 580, 115); rctClearAverageCost.setColor(Color.lightGray); rctClearAverageCost.setBorderStyle(4); rctClearAverageCost.setText("Clear Average Cost"); rctClearAverageCost.setFont(new Font("SansSerif", 1, 12)); rctClearAverageCost.setForeground(Color.black); rctClearAverageCost.setTransparent(true); // Initialize rctGeneralInfo rctGeneralInfo = new com.sssw.rt.form.AgcRectangle(); rctGeneralInfo.setName("rctGeneralInfo"); rctGeneralInfo.setBounds(11, 90, 580, 160); rctGeneralInfo.setColor(Color.lightGray); rctGeneralInfo.setBorderStyle(4); rctGeneralInfo.setText("General Information"); rctGeneralInfo.setFont(new Font("SansSerif", 1, 12)); rctGeneralInfo.setForeground(Color.black); rctGeneralInfo.setTransparent(true); // Initialize rctAutomaticEOD rctAutomaticEOD = new com.sssw.rt.form.AgcRectangle(); rctAutomaticEOD.setName("rctAutomaticEOD"); rctAutomaticEOD.setBounds(11, 373, 580, 136); rctAutomaticEOD.setColor(Color.lightGray); rctAutomaticEOD.setBorderStyle(4); rctAutomaticEOD.setText("Automatic EOD"); rctAutomaticEOD.setFont(new Font("SansSerif", 1, 12)); rctAutomaticEOD.setForeground(Color.black); rctAutomaticEOD.setTransparent(true); // Initialize rctEndOfMonthDates rctEndOfMonthDates = new com.sssw.rt.form.AgcRectangle(); rctEndOfMonthDates.setName("rctEndOfMonthDates"); rctEndOfMonthDates.setBounds(606, 90, 400, 279); rctEndOfMonthDates.setColor(Color.lightGray); rctEndOfMonthDates.setBorderStyle(4); rctEndOfMonthDates.setText("End of Month Dates"); rctEndOfMonthDates.setFont(new Font("SansSerif", 1, 12)); rctEndOfMonthDates.setForeground(Color.black); rctEndOfMonthDates.setTransparent(true); // Initialize rctBackupInfo rctBackupInfo = new com.sssw.rt.form.AgcRectangle(); rctBackupInfo.setName("rctBackupInfo"); rctBackupInfo.setBounds(606, 420, 400, 60); rctBackupInfo.setColor(Color.lightGray); rctBackupInfo.setBorderStyle(4); rctBackupInfo.setText("Backup Information"); rctBackupInfo.setFont(new Font("SansSerif", 1, 12)); rctBackupInfo.setForeground(Color.black); rctBackupInfo.setTransparent(true); // Initialize rctBackupFailureNotify rctBackupFailureNotify = new com.sssw.rt.form.AgcRectangle(); rctBackupFailureNotify.setName("rctBackupFailureNotify"); rctBackupFailureNotify.setBounds(606, 498, 400, 115); rctBackupFailureNotify.setColor(Color.lightGray); rctBackupFailureNotify.setBorderStyle(4); rctBackupFailureNotify.setText("Backup-Failure Notification"); rctBackupFailureNotify.setFont(new Font("SansSerif", 1, 12)); rctBackupFailureNotify.setForeground(Color.black); rctBackupFailureNotify.setTransparent(true); // Initialize agcDsoSql agcDsoSql = new com.sssw.rt.form.AgcData(); agcDsoSql.setName("agcDsoSql"); agcDsoSql.setBounds(1025,15,61,58); agcDsoSql.setDataSource("com.gpc.tams.dso.dsoGeneric"); // Initialize rctEODPrinter rctEODPrinter = new com.sssw.rt.form.AgcRectangle(); rctEODPrinter.setName("rctEODPrinter"); rctEODPrinter.setBounds(11, 512, 580, 100); rctEODPrinter.setColor(Color.lightGray); rctEODPrinter.setBorderStyle(4); rctEODPrinter.setText("EOD Printer"); rctEODPrinter.setFont(new Font("SansSerif", 1, 12)); rctEODPrinter.setForeground(Color.black); rctEODPrinter.setTransparent(true); addControls(); addBindings(); // Setup tab order Component[] tabOrder = { chkTransmit, chkLockTransmit, chkPhoneReminder, chkLockPhoneReminder, chkEcatalogUpdateDayOfWeekFriday, chkEcatalogUpdateDayOfWeekSaturday, rbClearFiscalYearEnd, chkLockClearAvgCost, rbClearCalenderYearEnd, rbDoNotClear, chkEnableAutoEOD, fldAutoEODStartTime, fldGPPercent, cbAutoEODEmployee, cbEODPrinter, cbPrinterOrientation, chkUseDuplex, tblEOM, fldUnattendedBackUpTime, cbEmployee, fldEmail, ckbUselabelQuantity, ckbUselabelQuantityLock, }; setUserDefinedTabOrder(tabOrder); return; } protected void addAllFormControls() { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === this.add(agcStoreProfile); this.add(fldUnattendedBackUpTime); this.add(fldAutoEODStartTime); this.add(agcGenericDso); this.add(agcEOD); this.add(agcEOM); this.add(cbEmployee); this.add(fldEmail); this.add(lblEmail); this.add(lblEmployee); this.add(fldGPPercent); this.add(lblGPPercent); this.add(chkLockClearAvgCost); chkLockClearAvgCost.addActionListener(this); this.add(lblClearAvgCostLock); this.add(lblHistoryPurgeDay); this.add(lblDayofHistoryPurge); this.add(lblNonStockMonth); this.add(rbDoNotClear); rbDoNotClear.addMouseListener(this); this.add(rbClearCalenderYearEnd); rbClearCalenderYearEnd.addMouseListener(this); this.add(rbClearFiscalYearEnd); rbClearFiscalYearEnd.addMouseListener(this); this.add(chkUseDuplex); chkUseDuplex.addActionListener(this); this.add(lblUseDuplex); this.add(lblPrinterOrientation); this.add(cbPrinterOrientation); this.add(lblAutoEODEmployee); this.add(cbEODPrinter); this.add(lblPhoneSwitchLock); this.add(lblTransmitSalesLock); this.add(chkLockPhoneReminder); chkLockPhoneReminder.addActionListener(this); this.add(lblUselabelQuantity); this.add(ckbUselabelQuantity); ckbUselabelQuantity.addActionListener(this); this.add(lblUselabelQuantityLock); this.add(ckbUselabelQuantityLock); ckbUselabelQuantityLock.addActionListener(this); this.add(chkLockTransmit); chkLockTransmit.addActionListener(this); this.add(lblPriorInvoiceCosting); this.add(lblUnattendedBU); this.add(cbAutoEODEmployee); this.add(lblEODPrinter); this.add(lblEnableAutomaticEOD); this.add(chkEnableAutoEOD); chkEnableAutoEOD.addActionListener(this); this.add(lblAutoEODStartTime); this.add(lblGPC); this.add(lblStoreHdg); this.add(lblStoreNumber); this.add(lblStoreType); this.add(lblTypeHdg); this.add(lblStoreName); this.add(lblCompanyID); this.add(lblCompanyHdg); this.add(lblPhoneSwitch); this.add(lblEcatalogUpdateDay); this.add(cbEcatalogUpdateDay); this.add(lblEcatalogUpdateDayOfWeekFriday); this.add(lblEcatalogUpdateDayOfWeekSaturday); this.add(chkEcatalogUpdateDayOfWeekFriday); chkEcatalogUpdateDayOfWeekFriday.addActionListener(this); this.add(chkEcatalogUpdateDayOfWeekSaturday); chkEcatalogUpdateDayOfWeekSaturday.addActionListener(this); this.add(chkPhoneReminder); chkPhoneReminder.addActionListener(this); this.add(chkTransmit); chkTransmit.addActionListener(this); this.add(lblTransmitSalesAndCost); this.add(lblLastMonthNonStockPurge); this.add(tblEOMScrollPane); this.add(lblHeading); this.add(Rectangle15); this.add(rctClearAverageCost); this.add(rctGeneralInfo); this.add(rctAutomaticEOD); this.add(rctEndOfMonthDates); this.add(rctBackupInfo); this.add(rctBackupFailureNotify); this.add(agcDsoSql); this.add(rctEODPrinter); } protected void addBindings() { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === agDataMgr.bind(fldUnattendedBackUpTime, "Value", "getValue", "setValue", agcStoreProfile, "UNATTENDED_BACKUP"); agDataMgr.bind(fldAutoEODStartTime, "Value", "getValue", "setValue", agcEOD, "AUTOSTART_TIME"); agDataMgr.bind(cbEmployee, "Value", "getValue", "setValue", agcEOD, "BACKUP_FAILURE_MSG_TO_EMPLOYEE_ID"); agDataMgr.bind(fldEmail, "Text", "getText", "setText", agcEOD, "BACKUP_FAILURE_MSG_TO_EMAIL"); agDataMgr.bind(fldGPPercent, "Text", "getText", "setText", agcEOD, "AUTO_INVOICE_COSTING_GP_PERCENT"); agDataMgr.bind(chkUseDuplex, "Value", "getValue", "setValue", agcEOD, "AUTOSTART_REPORT_PRINTER_USE_DUPLEX"); agDataMgr.addValidationEvent(cbPrinterOrientation, "Value"); agDataMgr.bind(cbEODPrinter, "Value", "getValue", "setValue", agcEOD, "AUTOSTART_REPORT_PRINTER_ID"); agDataMgr.addValidationEvent(cbEODPrinter, "Value"); agDataMgr.bind(cbAutoEODEmployee, "Value", "getValue", "setValue", agcEOD, "AUTOSTART_EMPLOYEE_ID"); agDataMgr.bind(chkEnableAutoEOD, "Value", "getValue", "setValue", agcEOD, "USE_AUTOSTART_EOD"); agDataMgr.bind(cbEcatalogUpdateDay, "Value", "getValue", "setValue", agcEOD, "AUTOMATIC_CATALOG_UPDATE_DAY"); addExpDependencies(); } protected void formActivate() { m_isInitialLoad = true; Vector viewComp = new Vector(); if (chkLockTransmit.isSelected()) { viewComp.add(chkTransmit); viewComp.add(chkLockTransmit); } if (chkLockPhoneReminder.isSelected()) { viewComp.add(chkPhoneReminder); viewComp.add(chkLockPhoneReminder); } if (ckbUselabelQuantityLock.isSelected()) { viewComp.add(ckbUselabelQuantity); viewComp.add(ckbUselabelQuantityLock); } if (chkLockClearAvgCost.isSelected()) { viewComp.add(chkLockClearAvgCost); viewComp.add(rbClearFiscalYearEnd); viewComp.add(rbClearCalenderYearEnd); viewComp.add(rbDoNotClear); } try { if (isAPIEODTriggerSource()) { Byte enableEOD = (Byte)agcEOD.getProperty(Sch_EndOfDayProfile.USE_AUTOSTART_EOD); if(enableEOD.byteValue() == 1) { agcEOD.setProperty(Sch_EndOfDayProfile.USE_AUTOSTART_EOD, bZero); agcEOD.updateRows(); } viewComp.add(chkEnableAutoEOD); viewComp.add(fldAutoEODStartTime); viewComp.add(fldGPPercent); viewComp.add(cbAutoEODEmployee); } } catch (ApplicationException | AgoUnrecoverableSystemException | AgoSecurityException| AgoTransientSystemException | AgoMissingDataException | AgoInvalidDataException | AgoDataConcurrencyException e) { logger.error("Error Verifying EOD Triggered Source : " + e.toString(), e); } FM.setDisabledEditModeComps(viewComp); FM.setMode(FwoFormMaster.EDIT_MODE_EDITING); if (FM.getMode() != FM.VIEW_MODE) { Vector exceptions = new Vector(); // the following components must be enabled & disabled via the form - not form master. exceptions.add(chkTransmit); exceptions.add(chkLockTransmit); exceptions.add(chkPhoneReminder); exceptions.add(chkLockPhoneReminder); exceptions.add(rbClearFiscalYearEnd); exceptions.add(ckbUselabelQuantity); exceptions.add(ckbUselabelQuantityLock); exceptions.add(rbClearCalenderYearEnd); exceptions.add(rbDoNotClear); exceptions.add(chkLockClearAvgCost); exceptions.add(fldAutoEODStartTime); exceptions.add(fldGPPercent); exceptions.add(cbAutoEODEmployee); exceptions.add(cbEODPrinter); exceptions.add(cbPrinterOrientation); exceptions.add(chkUseDuplex); exceptions.add(fldUnattendedBackUpTime); exceptions.add(cbEmployee); exceptions.add(fldEmail); FM.setFormEnabledDisabledComps(exceptions); } selectchkEcatalogUpdateDayOfWeekFriday(); selectchkEcatalogUpdateDayOfWeekSaturday(); enableDisablechkEnableAutoEOD(); if (FM.getMode() != FM.VIEW_MODE) { cbEODPrinter.setEnabled(true); cbPrinterOrientation.setEnabled(true); chkUseDuplex.setEnabled(true); } else { cbEODPrinter.setEnabled(false); cbPrinterOrientation.setEnabled(false); chkUseDuplex.setEnabled(false); } m_isInitialLoad = false; } protected void formLoaded() { Hashtable permissions = new Hashtable(); permissions.put(FwoToolBarDirector.EDIT_OK, new Boolean(true)); permissions.put(FwoToolBarDirector.SAVE_OK, new Boolean(true)); FwoToolBarDirector toolBarDirector = new FwoToolBarDirector (permissions); FM = new TamsFormMaster (this, (FwiFormProcess)this.getParentForm(), null, toolBarDirector); m_storeProfile = (TsoProfile)FwoSessionMgr.getInstance().getProfile(); try { BigDecimal bdZero = new BigDecimal(0.00); FM.addValidatedDecimalNumberComponent(fldGPPercent, bdZero, new BigDecimal(99.99), 2, 2, false, false); FM.addValidatedTimeComponent(fldAutoEODStartTime, false); FM.addValidatedTimeComponent(fldUnattendedBackUpTime, true); fldEmail.setDocument(new FwoJTextKeyFilter(FwoJTextKeyFilter.ALLKEY,100,false,false)); }catch (FwoUnsupportedObjectException e) { logger.error("FwoUnsupportedObjectException in formLoaded()\n" + e.getMessage(), e); } m_isLoading=true; getNumberPatternInstances(); //get format patterns populateEcatlogAccountingDay(); fRetrieve(null); populateForm(); chkTransmit.grabFocus(); m_isLoading = false; } private void populateEcatlogAccountingDay() { Calendar cal = Calendar.getInstance(); cal.setTime(new Date()); cal.set(Calendar.DAY_OF_MONTH, 1); int month = cal.get(Calendar.MONTH); int date = 0; while (month == cal.get(Calendar.MONTH)) { date = cal.get(Calendar.DATE); cbEcatalogUpdateDay.addItem(new Integer(date)); cal.add(Calendar.DAY_OF_MONTH, 1); } } private void queryPrinterOrientationCB() { cbPrinterOrientation.removeAllItems(); String portraitText = ApplicationContext.getInstance().getResourceBundleReader().getLocalizedText( ResourceBundleReader.UI, "PORTRAIT", ClientApplicationContext.getClientApplicationContext().getCurrentLocale()); String landscapeText = ApplicationContext.getInstance().getResourceBundleReader().getLocalizedText( ResourceBundleReader.UI, "LANDSCAPE", ClientApplicationContext.getClientApplicationContext().getCurrentLocale()); cbPrinterOrientation.insertItemAt(portraitText, "P", 0); cbPrinterOrientation.insertItemAt(landscapeText, "L", 1); } public void fRetrieve(java.util.Hashtable hashtable1) { Integer companyID = null; Integer sLOC = null; try { if(m_storeProfile != null){ companyID = (Integer)m_storeProfile.getProfile(m_storeProfile.STORE_PROFILE_COMPANY_ID); sLOC = (Integer)m_storeProfile.getProfile(m_storeProfile.STORE_PROFILE_LOC); } StringBuffer whereClause = new StringBuffer(); whereClause.append(Sch_Tables.STORE_PROFILE).append(".").append(Sch_StoreProfile.COMPANY_ID).append("="); whereClause.append(companyID); agcStoreProfile.query(whereClause.toString()); agcStoreProfile.gotoFirst(); queryComboBox(); queryPrinterOrientationCB(); agcEOD.query(Sch_Tables.END_OF_DAY_PROFILE + "." + Sch_EndOfDayProfile.LOC + "=" + sLOC); // If there are no records in END_OF_DAY_PROFILE, create a record. if(!agcEOD.gotoFirst()) { createRecord(); } StringBuffer where = new StringBuffer(); StringBuffer orderBy = new StringBuffer(); try { where.append(Sch_Tables.END_OF_MONTH_PROFILE).append(".").append(Sch_EndOfMonthProfile.LOC).append("="); where.append(FM.m_loc); orderBy.append(Sch_Tables.END_OF_MONTH_PROFILE).append(".").append(Sch_EndOfMonthProfile.REF_MONTH_OF_YEAR_ID); agcEOM.query(where.toString(), orderBy.toString()); /* If there is not a corresponding END_OF_MONTH_PROFILE, the system creates twelve * END_OF_MONTH_PROFILE records which consists of MONTHS (1-12) and SALES_MONTH_END_DATE * values set to the last calendar day in the month. */ if (!agcEOM.gotoFirst()) { createEndOfMonthProfile(); } cbAutoEODEmployee.setValue((Integer) agcEOD.getProperty(Sch_EndOfDayProfile.AUTOSTART_EMPLOYEE_ID)); Date currentSysDate = new Date(); Calendar cal = Calendar.getInstance(); cal.setTime(currentSysDate); int lastDayOfMonth = cal.getActualMaximum(Calendar.DAY_OF_MONTH); automaticCatalogUpdateDay = (Integer) agcEOD .getProperty(Sch_EndOfDayProfile.AUTOMATIC_CATALOG_UPDATE_DAY); Byte useWeekendCatalogSettings = (Byte) agcEOD.getProperty("USE_WEEKEND_CATALOG_SETTINGS"); useWeekendCatalogSettings = useWeekendCatalogSettings != null ? useWeekendCatalogSettings : 0; if(useWeekendCatalogSettings.byteValue()==1) { Byte autoCatalogUpdateDayOfWeek = (Byte) agcEOD.getProperty("AUTO_CATALOG_UPDATE_DAY_OF_WEEK"); autoCatalogUpdateDayOfWeek = autoCatalogUpdateDayOfWeek != null ? autoCatalogUpdateDayOfWeek : 0; automaticCatalogUpdateDay = (Integer) agcEOD .getProperty(Sch_EndOfDayProfile.AUTOMATIC_CATALOG_UPDATE_DAY); if (automaticCatalogUpdateDay.intValue() > lastDayOfMonth) { cbEcatalogUpdateDay.setValue(" "); } else { cbEcatalogUpdateDay.setValue(automaticCatalogUpdateDay); } if (autoCatalogUpdateDayOfWeek.byteValue() == 1) { chkEcatalogUpdateDayOfWeekFriday.setSelected(true); } else if (autoCatalogUpdateDayOfWeek.byteValue() == 2) { chkEcatalogUpdateDayOfWeekSaturday.setSelected(true); } }else { lblEcatalogUpdateDayOfWeekFriday.setVisible(false); chkEcatalogUpdateDayOfWeekFriday.setVisible(false); lblEcatalogUpdateDayOfWeekSaturday.setVisible(false); chkEcatalogUpdateDayOfWeekSaturday.setVisible(false); if (automaticCatalogUpdateDay.intValue() > lastDayOfMonth) { cbEcatalogUpdateDay.setValue(" "); } else { cbEcatalogUpdateDay.setValue(automaticCatalogUpdateDay); } } }catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in fRetrieve()(end_of_month_profile query)\n" + e.getMessage(), e); }catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException in fRetrieve()(end_of_month_profile query)\n" + e.getMessage(), e); }catch (AgoSecurityException e) { logger.error("AgoSecurityException in fRetrieve()(end_of_month_profile query)\n" + e.getMessage(), e); } }catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in fRetrieve()\n" + e.getMessage(), e); }catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException in fRetrieve()\n" + e.getMessage(), e); }catch (AgoSecurityException e) { logger.error("AgoSecurityException in fRetrieve()\n" + e.getMessage(), e); } } /** The populateForm() method calls each section of the form individually. This route is taken if there * is data already in the END_OF_DAY_PROFILE table. */ private void populateForm() { displayStoreInfo(); generalInformation(); clearAverageCost(); automaticEOD(); backupInformation(); buildEOMTable(); } /** The buildEOMTable() method builds a table displaying the Month and Sales Month End Date */ private void buildEOMTable() { try { m_TblMgr = null; if (m_TblMgr == null) { // display MONTH, SALES_MONTH_END_DATE int[] displayableColumns = {1,2}; String[] primaryKeys = {Sch_EndOfMonthProfile.LOC, Sch_EndOfMonthProfile.REF_MONTH_OF_YEAR_ID}; int[] editableColumns = {1}; m_TblMgr = new TsoJTableMgr(this, tblEOM, agcEOM, displayableColumns, editableColumns, null, primaryKeys); m_TblMgr.setColumnReorderingAllowed(false); m_TblMgr.setCanAutoSave(true, false); m_TblMgr.setMultipleNewMode(false); m_TblMgr.setMultipleDeleteAllowed(false); m_TblMgr.setRowSortAllowed(false); m_TblMgr.setAllowEdit(true); int reqColumns [] = {1}; m_TblMgr.setRequiredColumns(reqColumns); /** The MONTH column in the END_OF_MONTH_PROFILE table has a datatype of TinyInt (ie. 1). In order * to display it as a string (ie. January), the TsoComboBox object is used. The first parameter * represents the 'listKey - The key used to retrieve the data from the cache manager.' The * second paramenter represents a boolean as to whether to... displayAsComboBox - true if the * renderer should display a drop down list, false otherwise. Setting the setAlwaysShowRenderAsLabel * to true displays the cell as a label instead of a comboBox which allows the user to tab thru the * table (from cell to cell) without getting the "comboBox affect". */ TsoComboBox cbMonth = new TsoComboBox(TsoConstant.LIST_REF_MONTH_OF_YEAR, false); cbMonth.setAlwaysShowRendererAsLabel(true); cbMonth.setDisplayLabelHorizontalAlignment(SwingConstants.LEFT); TsoDateCell dateCell = new TsoDateCell(ClientApplicationContext.getClientApplicationContext().getProfile( Profile.BACKOFFICE_CLIENT, (int) ClientApplicationContext.getClientApplicationContext().getLocation() ).getStoreProfile().getRefDateFormatId().intValue()); dateCell.setRendererHorizontalAlignment(SwingConstants.CENTER); m_TblMgr.setCustomCell(0, cbMonth); m_TblMgr.setCustomCell(1, dateCell); } }catch (AgoSecurityException e) { logger.error("AgoSecurityException in buildEOMTable()\n" + e.getMessage(), e); }catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in buildEOMTable()\n" + e.getMessage(), e); }catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException in buildEOMTable()\n" + e.getMessage(), e); } } /** This method displays the values for the current store location. If the store is GPC-Owned (1 or 11), the system * displays the store type + "(GPC)"; otherwise only the store type. **/ private void displayStoreInfo() { Integer companyID = null; String storeNum = ""; String storeName = ""; String storeType = ""; Byte gpcOwned = null; String storeNumName = ""; //current system locale (different from the locale of the current record) Locale currLocale = ClientApplicationContext.getClientApplicationContext().getCurrentLocale(); if(m_storeProfile != null){ companyID = (Integer)m_storeProfile.getProfile(m_storeProfile.STORE_PROFILE_COMPANY_ID); storeNum = (String)m_storeProfile.getProfile(m_storeProfile.STORE_PROFILE_STORE_NUM); storeName = (String)m_storeProfile.getProfile(m_storeProfile.STORE_PROFILE_STORE_NAME); storeNumName = storeNum + " " + storeNumName; storeType = (String)m_storeProfile.getProfile(m_storeProfile.STORE_PROFILE_STORE_TYPE); gpcOwned = (Byte)m_storeProfile.getProfile(m_storeProfile.STORE_PROFILE_GPC_OWNED); lblCompanyID.setText("" + companyID); lblStoreNumber.setText(storeNum); lblStoreName.setText(storeName); if (gpcOwned.intValue() == 1 || gpcOwned.intValue() == 11) { lblStoreType.setText(storeType); lblGPC.setText("(GPC)"); }else { lblStoreType.setText(storeType); lblGPC.setText(""); } } } /** This method displays the items located in the General Information section of the form. */ private void generalInformation() { String month = ""; try { StringBuffer monthSql = new StringBuffer(""); Hashtable ht = new Hashtable(); // Last Month Non-Stock Purge Ran monthSql.append("SELECT ref_month_of_year.DESCRIPTION FROM "); monthSql.append(Sch_Tables.REF_MONTH_OF_YEAR); monthSql.append(" WHERE ").append(Sch_Tables.REF_MONTH_OF_YEAR).append(".").append(Sch_RefMonthOfYear.ID); monthSql.append("=").append(agcEOD.getProperty(Sch_EndOfDayProfile.NON_STOCK_PURGE)); // build the band descriptor TsoGenericBandDescriptor bandDescriptor = new TsoGenericBandDescriptor(Sch_Tables.REF_MONTH_OF_YEAR, Sch_Tables.REF_MONTH_OF_YEAR); // add the columns in the order they will appear in the result set bandDescriptor.addColumn("DESCRIPTION", DatatypeCodes.TYPE_STRING, true); // 0 ht.put(com.gpc.tams.dso.dsoGeneric.SQL, monthSql.toString()); ht.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bandDescriptor); SilverStreamExceptionHelper.invokeQuery(agcGenericDso, ht); if (agcGenericDso.gotoFirst()) { month = "" + agcGenericDso.getProperty("DESCRIPTION"); } lblNonStockMonth.setText(month); //Day of Month to Run History Purge Processes lblHistoryPurgeDay.setText("" + agcEOD.getProperty(Sch_EndOfDayProfile.HISTORY_PURGE_PROCESS_DAY)); //Transmit Sales & Cost for Reported Sales (required) transmitSales(); //Phone Switch Reminder phoneSwitch(); useLabelQuantity(); autoCatalogUpdateDayOfWeek(); } catch (ApplicationException e) { logger.error("ApplicationException in generalInformation()\n" + e.getMessage(), e); } catch (AgoSecurityException e) { logger.error("AgoSecurityException in generalInformation()\n" + e.getMessage(), e); } catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in generalInformation()\n" + e.getMessage(), e); } catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException in generalInformation()\n" + e.getMessage(), e); } } /** This method controls the radio buttons and "Lock" checkbox located in the Clear Average Cost section of the form. */ private void clearAverageCost() { Byte avgCost = (Byte)agcEOD.getProperty(Sch_EndOfDayProfile.CLEAR_AVG_COST_AT_ECY); switch (avgCost.intValue()) { case 0 : { /* The radio buttons are enabled, * the "Do Not Clear" radio button is set, * the "Lock" checkbox is enabled and not checked. */ rbClearFiscalYearEnd.setEnabled(true); rbClearCalenderYearEnd.setEnabled(true); rbDoNotClear.setEnabled(true); rbDoNotClear.setSelected(true); chkLockClearAvgCost.setEnabled(true); chkLockClearAvgCost.setSelected(false); break; }case 1 : { /* The radio buttons are enabled, * the "Clear at Fiscal Year End" radio button is set, the "Lock" * checkbox is enabled and not checked. */ rbClearFiscalYearEnd.setEnabled(true); rbClearCalenderYearEnd.setEnabled(true); rbDoNotClear.setEnabled(true); rbClearFiscalYearEnd.setSelected(true); chkLockClearAvgCost.setEnabled(true); chkLockClearAvgCost.setSelected(false); break; }case 2 : { /* The radio buttons are enabled, * the "Clear at Calendar Year End" radio button is set, * the "Lock" checkbox is enabled and not checked. */ rbClearFiscalYearEnd.setEnabled(true); rbClearCalenderYearEnd.setEnabled(true); rbDoNotClear.setEnabled(true); rbClearCalenderYearEnd.setSelected(true); chkLockClearAvgCost.setEnabled(true); chkLockClearAvgCost.setSelected(false); break; }case 10 : { /* The radio buttons are disabled, the "Do Not Clear" radio button is set, the "Lock" * checkbox is disabled and checked. */ rbClearFiscalYearEnd.setEnabled(false); rbClearCalenderYearEnd.setEnabled(false); rbDoNotClear.setEnabled(false); rbDoNotClear.setSelected(true); chkLockClearAvgCost.setEnabled(false); chkLockClearAvgCost.setSelected(true); break; } case 11 : { /* The radio buttons are disabled, * the "Clear at Fiscal Year End" radio button is set, * the "Lock" checkbox is disabled and checked. */ rbClearFiscalYearEnd.setEnabled(false); rbClearCalenderYearEnd.setEnabled(false); rbDoNotClear.setEnabled(false); rbClearFiscalYearEnd.setSelected(true); chkLockClearAvgCost.setEnabled(false); chkLockClearAvgCost.setSelected(true); break; }case 12 : { /* The radio buttons are disabled, * the "Clear at Calendar Year End" radio button is set, * the "Lock" checkbox is disabled and checked. */ rbClearFiscalYearEnd.setEnabled(false); rbClearCalenderYearEnd.setEnabled(false); rbDoNotClear.setEnabled(false); rbClearCalenderYearEnd.setSelected(true); chkLockClearAvgCost.setEnabled(false); chkLockClearAvgCost.setSelected(true); break; }default: { //Default value is same as "0" rbClearFiscalYearEnd.setEnabled(true); rbClearCalenderYearEnd.setEnabled(true); rbDoNotClear.setEnabled(true); rbDoNotClear.setSelected(true); chkLockClearAvgCost.setEnabled(true); chkLockClearAvgCost.setSelected(false); } } } private void automaticEOD() { Byte enableEOD = (Byte)agcEOD.getProperty(Sch_EndOfDayProfile.USE_AUTOSTART_EOD); //Enable Automatic EOD if (enableEOD.byteValue() == 0) { chkEnableAutoEOD.setEnabled(true); fldAutoEODStartTime.setEnabled(false); fldGPPercent.setEnabled(false); cbAutoEODEmployee.setEnabled(false); }else { fldAutoEODStartTime.setEnabled(true); fldGPPercent.setEnabled(true); cbAutoEODEmployee.setEnabled(true); } } private void backupInformation() { //set to default String timeComponent = null; String ampmComponent = "am"; if(m_storeProfile != null){ StringBuffer sql = new StringBuffer(""); Hashtable ht = new Hashtable(); java.util.Date storeBackUp = (java.util.Date) m_storeProfile.getProfile(m_storeProfile.STORE_PROFILE_UNATTENDED_BACKUP); int currentMode = FM.getMode(); if (storeBackUp == null) { if(currentMode != FM.VIEW_MODE){ fldUnattendedBackUpTime.setEnabled(false); cbEmployee.setEnabled(false); fldEmail.setEnabled(false); } }else { if(currentMode != FM.VIEW_MODE){ fldUnattendedBackUpTime.setEnabled(true); cbEmployee.setEnabled(true); fldEmail.setEnabled(true); } } } } /** This method determines the behavior of the Transmit Sales & Cost for Reported Sales checkbox and the * Lock checkbox. It is depended upon the value in the SEND_EOM_REPORTABLE_SALES field (0,1,10,11). * If the field is "Locked" (the "Lock" check box is checked), it cannot be changed except by TAMS support. * The system does not disable checkboxes when the user clicks the associated "Lock" checkbox during the * user session. Checkboxes are only locked and disabled when the user saves the lock value and the screen * refreshes. **/ private void transmitSales() { Byte reportableSales = (Byte)agcEOD.getProperty(Sch_EndOfDayProfile.SEND_EOM_REPORTABLE_SALES); if (reportableSales.byteValue() == 0) { //The setting value is "No" and unlocked chkTransmit.setEnabled(true); chkTransmit.setSelected(false); chkLockTransmit.setEnabled(true); chkLockTransmit.setSelected(false); }else if (reportableSales.byteValue() == 1) { //The setting value is "Yes" and unlocked chkTransmit.setEnabled(true); chkTransmit.setSelected(true); chkLockTransmit.setEnabled(true); chkLockTransmit.setSelected(false); }else if (reportableSales.byteValue() == 10) { //The setting value is "No" and locked chkTransmit.setEnabled(false); chkTransmit.setSelected(false); chkLockTransmit.setEnabled(false); chkLockTransmit.setSelected(true); }else if (reportableSales.byteValue() == 11) { //The setting value is "Yes" and locked chkTransmit.setEnabled(false); chkTransmit.setSelected(true); chkLockTransmit.setEnabled(false); chkLockTransmit.setSelected(true); }else { // DEFAULT chkTransmit.setEnabled(true); chkTransmit.setSelected(false); chkLockTransmit.setEnabled(true); chkLockTransmit.setSelected(false); } } /** This method determines the behavior of the Phone Switch Reminder and the Lock checkboxes. * It is depended upon the value in the PHONE_SWITCH_REMINDER field (0,1,10,11). If the field is "Locked" * (the "Lock" check box is checked), it cannot be changed except by TAMS support. The system does not * disable checkboxes when the user clicks the associated "Lock" checkbox during the user session. * Checkboxes are only locked and disabled when the user saves the lock value and the screen refreshes. **/ private void phoneSwitch() { Byte reminder = (Byte)agcEOD.getProperty(Sch_EndOfDayProfile.PHONE_SWITCH_REMINDER); if (reminder.byteValue() == 0) { //The setting value is "No" and unlocked chkPhoneReminder.setEnabled(true); chkPhoneReminder.setSelected(false); chkLockPhoneReminder.setEnabled(true); chkLockPhoneReminder.setSelected(false); }else if (reminder.byteValue() == 1) { //The setting value is "Yes" and unlocked chkPhoneReminder.setEnabled(true); chkPhoneReminder.setSelected(true); chkLockPhoneReminder.setEnabled(true); chkLockPhoneReminder.setSelected(false); }else if (reminder.byteValue() == 10) { //The setting value is "No" and locked chkPhoneReminder.setEnabled(false); chkPhoneReminder.setSelected(false); chkLockPhoneReminder.setEnabled(false); chkLockPhoneReminder.setSelected(true); }else if (reminder.byteValue() == 11) { //The setting value is "Yes" and locked chkPhoneReminder.setEnabled(false); chkPhoneReminder.setSelected(true); chkLockPhoneReminder.setEnabled(false); chkLockPhoneReminder.setSelected(true); }else { // DEFAULT chkPhoneReminder.setEnabled(true); chkPhoneReminder.setSelected(false); chkLockPhoneReminder.setEnabled(true); chkLockPhoneReminder.setSelected(false); } } private void useLabelQuantity() { Byte uselabelQuantity = (Byte) agcEOD.getProperty(Sch_EndOfDayProfile.USE_LABEL_QTY_FOR_GENERATION); logger.warn("useLabelQuantity -" + uselabelQuantity); uselabelQuantity = uselabelQuantity != null ? uselabelQuantity : 0; if (uselabelQuantity.byteValue() == 0) { //The setting value is "No" and unlocked ckbUselabelQuantity.setEnabled(true); ckbUselabelQuantity.setSelected(false); ckbUselabelQuantityLock.setEnabled(true); ckbUselabelQuantityLock.setSelected(false); } else if (uselabelQuantity.byteValue() == 1) { //The setting value is "Yes" and unlocked ckbUselabelQuantity.setEnabled(true); ckbUselabelQuantity.setSelected(true); ckbUselabelQuantityLock.setEnabled(true); ckbUselabelQuantityLock.setSelected(false); } else if (uselabelQuantity.byteValue() == 10) { //The setting value is "No" and locked ckbUselabelQuantity.setEnabled(false); ckbUselabelQuantity.setSelected(false); ckbUselabelQuantityLock.setEnabled(false); ckbUselabelQuantityLock.setSelected(true); } else if (uselabelQuantity.byteValue() == 11) { //The setting value is "Yes" and locked ckbUselabelQuantity.setEnabled(false); ckbUselabelQuantity.setSelected(true); ckbUselabelQuantityLock.setEnabled(false); ckbUselabelQuantityLock.setSelected(true); } else { // DEFAULT ckbUselabelQuantity.setEnabled(true); ckbUselabelQuantity.setSelected(false); ckbUselabelQuantityLock.setEnabled(true); ckbUselabelQuantityLock.setSelected(false); } } private void getNumberPatternInstances() { //get the current country language Locale locale = ClientApplicationContext.getClientApplicationContext().getCurrentLocale(); //Decimal(5,2) pattern FwoNumberPattern decimalPattern = (FwoNumberPattern)FwoPattern.getNumberPatternInstance(FwoNumberPattern.DECIMAL, locale); decimalPattern.setMinFractionDigits(2); decimalPattern.setMaxFractionDigits(2); try { m_decZero2 = decimalPattern.format(new BigDecimal("0.00")); } catch(NumberPatternFormatException e) { logger.error(e.getMessage(), e); } } private void queryComboBox() { TsoGenericBandDescriptor bd_agcGenericDso; StringBuffer sb = new StringBuffer(); sb.append("SELECT ").append(Sch_Tables.EMPLOYEE).append('.').append(Sch_Employee.ID).append(','); sb.append(Sch_Tables.EMPLOYEE).append('.').append(Sch_Employee.EMPLOYEE_NUM).append(','); sb.append(Sch_Tables.EMPLOYEE).append('.').append(Sch_Employee.FIRST_NAME).append(','); sb.append(Sch_Tables.EMPLOYEE).append('.').append(Sch_Employee.LAST_NAME).append(','); sb.append("STRING(").append(Sch_Tables.EMPLOYEE).append('.').append(Sch_Employee.LAST_NAME); sb.append("+', '+").append(Sch_Tables.EMPLOYEE).append('.').append(Sch_Employee.FIRST_NAME); sb.append(") AS NAME_STRING ").append("FROM ").append(Sch_Tables.FW_FUNCTION).append(','); sb.append(Sch_Tables.EMPLOYEE).append(',').append(Sch_Tables.FW_FUNCTION_USER); sb.append(" WHERE ").append(Sch_Tables.FW_FUNCTION).append('.').append(Sch_FWFunction.NAME); sb.append(" = 'SM_END_OF_DAY' AND ").append(Sch_Tables.EMPLOYEE).append('.'); sb.append(Sch_Employee.ID).append('=').append(Sch_Tables.FW_FUNCTION_USER).append('.'); sb.append(Sch_FWFunctionUser.USER_ID).append(" AND ").append(Sch_Tables.FW_FUNCTION_USER); sb.append('.').append(Sch_FWFunctionUser.FUNCTION_ID).append('=').append(Sch_Tables.FW_FUNCTION); sb.append('.').append(Sch_FWFunction.ID).append(" AND ").append(Sch_Tables.FW_FUNCTION_USER); sb.append('.').append(Sch_FWFunctionUser.ALLOW_MODIFY).append(" = 'Y' "); sb.append(" ORDER BY NAME_STRING ASC"); // build the band descriptor bd_agcGenericDso = new TsoGenericBandDescriptor(Sch_Tables.EMPLOYEE, Sch_Tables.EMPLOYEE); // add the columns in the order they will appear in the result set bd_agcGenericDso.addColumn(Sch_Employee.ID, DatatypeCodes.TYPE_INT, true); // 0 bd_agcGenericDso.addColumn(Sch_Employee.EMPLOYEE_NUM, DatatypeCodes.TYPE_INT, true); // 1 bd_agcGenericDso.addColumn(Sch_Employee.LAST_NAME, DatatypeCodes.TYPE_STRING, true); // 2 bd_agcGenericDso.addColumn(Sch_Employee.FIRST_NAME, DatatypeCodes.TYPE_STRING, true); // 3 bd_agcGenericDso.addColumn("NAME_STRING", DatatypeCodes.TYPE_STRING, true); // 4 String sParams[] = new String[1]; sParams[0] = ""; try{ Hashtable hsh = new Hashtable(); logger.debug("EMPLOYEE QUERY = " + sb.toString()); hsh.put(com.gpc.tams.dso.dsoGeneric.SQL, sb.toString()); hsh.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bd_agcGenericDso); SilverStreamExceptionHelper.invokeQuery(agcGenericDso,hsh); if(agcGenericDso.gotoFirst()){ do{ String sName = (String) agcGenericDso.getProperty("NAME_STRING"); Integer empId = (Integer) agcGenericDso.getProperty(Sch_Employee.ID); cbAutoEODEmployee.addItem(sName, empId); }while(agcGenericDso.gotoNext()); } }catch(ApplicationException e){ logger.error("ApplicationException in queryComboBox()\n" + e.getMessage(), e); }catch(AgoUnrecoverableSystemException e){ logger.error("AgoUnrecoverableSystemException in queryComboBox()\n" + e.getMessage(), e); }catch(AgoTransientSystemException e){ logger.error("AgoTransientSystemException in queryComboBox()\n" + e.getMessage(), e); }catch(AgoSecurityException e){ logger.error("AgoSecurityException in queryComboBox()\n" + e.getMessage(), e); } } /** * This method is used to update the END_OF_DAY_PROFILE table for column EOD_TRIGGERED_SOURCE. */ private void updateEODTriggerSource(String type){ ExecuteSQLVO executeSqlVo = new ExecuteSQLVO(); ResultsVO resultsVo = null; StringBuffer sbUpdate = new StringBuffer(); sbUpdate.append("UPDATE "); sbUpdate.append("END_OF_DAY_PROFILE"); sbUpdate.append(" SET "); sbUpdate.append("EOD_TRIGGERED_SOURCE = "); sbUpdate.append("\'"+type+"\'"); logger.warn("Update end of day profile SQL ==> " + sbUpdate.toString()); executeSqlVo.setSqlQuery(sbUpdate.toString()); resultsVo = InvokerBridge.invoke(executeSqlVo); if (resultsVo.getError() != null) { logger.error("Error "+resultsVo.getError()); } else if (resultsVo.isSuccessful()) { logger.warn(" End of day Profile table updated successfully "); } } private void enableDisablechkEnableAutoEOD() { int currentMode = FM.getMode(); logger.debug("CHECK BOX IS SELECTED = " + chkEnableAutoEOD.isSelected()); if(currentMode != FM.VIEW_MODE){ if (chkEnableAutoEOD.isSelected()) { logger.debug("check box is selected...."); fldAutoEODStartTime.setEnabled(true); fldGPPercent.setEnabled(true); cbAutoEODEmployee.setEnabled(true); } else { logger.debug("check box is NOT selected...."); fldAutoEODStartTime.setEnabled(false); fldGPPercent.setEnabled(false); cbAutoEODEmployee.setEnabled(false); } m_pleaseUpdate = !m_isInitialLoad; } } private void selectchkEcatalogUpdateDayOfWeekFriday() { int currentMode = FM.getMode(); logger.debug("chkEcatalogUpdateDayOfWeekFriday CHECK BOX IS SELECTED = " + chkEcatalogUpdateDayOfWeekFriday.isSelected()); if (currentMode != FM.VIEW_MODE) { if (chkEcatalogUpdateDayOfWeekFriday.isSelected()) { logger.debug("check box is selected...."); chkEcatalogUpdateDayOfWeekSaturday.setSelected(false); } m_pleaseUpdate = !m_isInitialLoad; } } private void selectchkEcatalogUpdateDayOfWeekSaturday() { int currentMode = FM.getMode(); logger.debug("chkEcatalogUpdateDayOfWeekSaturday CHECK BOX IS SELECTED = " + chkEcatalogUpdateDayOfWeekSaturday.isSelected()); if (currentMode != FM.VIEW_MODE) { if (chkEcatalogUpdateDayOfWeekSaturday.isSelected()) { logger.debug("check box is selected...."); chkEcatalogUpdateDayOfWeekFriday.setSelected(false); } m_pleaseUpdate = !m_isInitialLoad; } } private void autoCatalogUpdateDayOfWeek() { Byte useWeekendCatalogSettings = (Byte) agcEOD.getProperty(Sch_EndOfDayProfile.USE_WEEKEND_CATALOG_SETTINGS); logger.warn("useWeekendCatalogSettings -" + useWeekendCatalogSettings); useWeekendCatalogSettings = useWeekendCatalogSettings != null ? useWeekendCatalogSettings : 0; if(useWeekendCatalogSettings==1) { Byte autoCatalogUpdateDayOfWeek = (Byte) agcEOD.getProperty(Sch_EndOfDayProfile.AUTO_CATALOG_UPDATE_DAY_OF_WEEK); logger.warn("autoCatalogUpdateDayOfWeek -" + autoCatalogUpdateDayOfWeek); autoCatalogUpdateDayOfWeek = autoCatalogUpdateDayOfWeek != null ? autoCatalogUpdateDayOfWeek : 0; if (autoCatalogUpdateDayOfWeek.byteValue() == 1) { //The setting value is 1 /check friday catalog update day of week chkEcatalogUpdateDayOfWeekFriday.setSelected(true); } else if (autoCatalogUpdateDayOfWeek.byteValue() == 2) { //The setting value is 2 /check Saturday catalog update day of week chkEcatalogUpdateDayOfWeekSaturday.setSelected(true); } }else{ lblEcatalogUpdateDayOfWeekFriday.setVisible(false); chkEcatalogUpdateDayOfWeekFriday.setVisible(false); lblEcatalogUpdateDayOfWeekSaturday.setVisible(false); chkEcatalogUpdateDayOfWeekSaturday.setVisible(false); } } /** The createRecord() method is called from fRetrieve and is executed only if there is NOT a corresponding * END_OF_DAY_PROFILE record for a store. There should be one record in END_OF_DAY_PROFILE for each location * in the STORE.PROFILE table. If a record does not exist for the current location, one will be created here * when the user first enters this form. **/ private void createRecord() { try { chkTransmit.requestFocus(); Byte bFifthteen = new Byte((byte) 15); BigDecimal bdZero = new BigDecimal(0); agcEOD.insertAfter(); FM.setMode(FwoFormMaster.EDIT_MODE_EDITING); agcEOD.setProperty(Sch_EndOfDayProfile.LOC, FM.m_loc); agcEOD.setProperty(Sch_EndOfDayProfile.SEND_LOCAL_DETAIL, bZero); agcEOD.setProperty(Sch_EndOfDayProfile.NON_STOCK_PURGE, null); agcEOD.setProperty(Sch_EndOfDayProfile.HISTORY_PURGE_PROCESS_DAY, bFifthteen); agcEOD.setProperty(Sch_EndOfDayProfile.SEND_EOM_REPORTABLE_SALES, bZero); agcEOD.setProperty(Sch_EndOfDayProfile.REPORTED_SALES_SUMMARY_COUNTER, bOne); agcEOD.setProperty(Sch_EndOfDayProfile.PHONE_SWITCH_REMINDER, bZero); agcEOD.setProperty(Sch_EndOfDayProfile.USE_LABEL_QTY_FOR_GENERATION, bZero); agcEOD.setProperty(Sch_EndOfDayProfile.CLEAR_AVG_COST_AT_ECY, bZero); agcEOD.setProperty(Sch_EndOfDayProfile.EXPORT_TO_DATA_WAREHOUSE, bZero); agcEOD.setProperty(Sch_EndOfDayProfile.USE_AUTOSTART_EOD, bZero); agcEOD.setProperty(Sch_EndOfDayProfile.AUTOSTART_TIME, null); agcEOD.setProperty(Sch_EndOfDayProfile.AUTO_INVOICE_COSTING_GP_PERCENT, bdZero); agcEOD.setProperty(Sch_EndOfDayProfile.AUTOSTART_EMPLOYEE_ID, null); agcEOD.setProperty(Sch_EndOfDayProfile.AUTOSTART_REPORT_PRINTER_ID, null); agcEOD.setProperty(Sch_EndOfDayProfile.AUTOSTART_REPORT_PRINT_ORIENTATION, "P"); agcEOD.setProperty(Sch_EndOfDayProfile.AUTOSTART_REPORT_PRINTER_USE_DUPLEX, "N"); agcEOD.setProperty(Sch_EndOfDayProfile.AUTO_CATALOG_UPDATE_DAY_OF_WEEK,bZero); agcEOD.setProperty(Sch_EndOfDayProfile.USE_WEEKEND_CATALOG_SETTINGS,bZero); FM.setTransactionColumns(agcEOD); agcEOD.updateRows(); } catch (AgoDataConcurrencyException e) { logger.debug(e.toString(), e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); try { agcEOD.refreshRows(); } catch (AgoApiException ex) { logger.error(e.toString(), ex); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, ex, null); } } catch (AgoApiException e) { logger.error(e.toString(), e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); } } private void getCurrentSalesYearMonth() { Calendar cal = Calendar.getInstance(); cal.setTime((java.util.Date)m_storeProfile.getProfile(m_storeProfile.STORE_PROFILE_CURRENT_SALES_YEAR_MONTH)); int year = cal.get(Calendar.YEAR); logger.debug("in loadDefault year from profile = " + year); int nextYear = year+1; } /** The createEndOfMonthProfile() method is called from fRetrieve() and is executed only if there is NOT * a corresponding END_OF_MONTH_PROFILE for the specified end_of_day_profile record. The system creates * twelve END_OF_MONTH_PROFILE records where the SALES_MONTH_END_DATE value is set to the last calendar * day in a given month. */ private void createEndOfMonthProfile() { try { Calendar cal = Calendar.getInstance(); cal.setTime((java.util.Date)m_storeProfile.getProfile(m_storeProfile.STORE_PROFILE_CURRENT_SALES_YEAR_MONTH)); int month = cal.get(Calendar.MONTH) + 1; logger.debug(">> month from profile = " + month); int year = cal.get(Calendar.YEAR); logger.debug(">> year from profile = " + year); int nextYear = year+1; for (int i=1; i <=12; i++) { agcEOM.insertAfter(); String eomDate = ""; agcEOM.setProperty(Sch_EndOfMonthProfile.LOC, FM.m_loc); agcEOM.setProperty(Sch_EndOfMonthProfile.REF_MONTH_OF_YEAR_ID, new Integer(i)); cal.set(Calendar.MONTH,i-1); int lastDayOfMonth = 0; GregorianCalendar leapYearCal = new GregorianCalendar(); boolean leapYear = leapYearCal.isLeapYear(nextYear); if(i == 2 && !leapYear){ //If month = Feb., check for Leap Year! lastDayOfMonth = 28; }else{ lastDayOfMonth = cal.getActualMaximum(Calendar.DAY_OF_MONTH); } eomDate = "" + nextYear + "-" + i + "-" + lastDayOfMonth; agcEOM.setProperty(Sch_EndOfMonthProfile.SALES_MONTH_END_DATE, (eomDate.toString())); FM.setTransactionColumns(agcEOM); agcEOM.updateRows(); } }catch (AgoDataConcurrencyException e) { logger.debug(e.toString() , e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); try{ agcEOM.refreshRows(); }catch(AgoApiException ex){ logger.error(e.toString(), ex); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, ex, null); } }catch (AgoApiException e){ logger.error(e.toString() , e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); } } private boolean allAutoEODfieldsEntered() { boolean eodAnswer = true; boolean fieldsPopulatedResponse = false; //Set to true if data is missing from the related fields boolean noStartTime = false; boolean noGPPercent = false; boolean noEmployee = false; boolean noPrinter = false; logger.debug("check box is selected in all Auto() " + chkEnableAutoEOD.isSelected()); if (chkEnableAutoEOD.isSelected()) { if ("".equals(fldAutoEODStartTime.getText())) { noStartTime = true; } logger.debug("noStartTime = " + noStartTime ); if ("".equals(fldGPPercent.getText())) { noGPPercent = true; } logger.debug("noGPPercent = " + noGPPercent ); if ("".equals(cbAutoEODEmployee.getValue())) { noEmployee = true; } logger.debug("noEmployee = " + noEmployee ); if ("".equals(cbEODPrinter.getValue()) || cbEODPrinter.getValue() == null) { noPrinter = true; } logger.debug("noPrinter = " + noPrinter ); if (noStartTime || noGPPercent || noEmployee || noPrinter) { fieldsPopulatedResponse = ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessageOKCancel(this, "974"); //User clicked OK if (fieldsPopulatedResponse){ //save setting "Enable Automatic EOD" to false eodAnswer = true; agcEOD.setProperty(Sch_EndOfDayProfile.USE_AUTOSTART_EOD, bZero); if ("".equals(fldGPPercent.getText().trim())){ fldGPPercent.setText(m_decZero2); } enableDisablechkEnableAutoEOD(); logger.debug("eodAnswer = " + eodAnswer ); return eodAnswer; } //User clicked CANCEL if (!fieldsPopulatedResponse){ if (noStartTime){ //enter Time fldAutoEODStartTime.grabFocus(); }else if (noGPPercent){ //enter Percent fldGPPercent.grabFocus(); }else if (noEmployee){ //choose Employee cbAutoEODEmployee.grabFocus(); }else if (noPrinter){ //choose Printer cbEODPrinter.grabFocus(); } eodAnswer = false; return eodAnswer; } } } agcEOD.setProperty(Sch_EndOfDayProfile.USE_AUTOSTART_EOD, bOne); enableDisablechkEnableAutoEOD(); return eodAnswer; } private void choosePrinter() { // Reset agcDeleteGeneric agcGenericDso.setDataSource("com.gpc.tams.dso.dsoGeneric"); try { //Printer Orientation and Use Duplex //default for Sch_Printer.DEFAULT_PRINT_ORIENTATION String printOrient = "P"; //default for Sch_Printer.DUPLEX_AVAILABLE String duplexAvail = "N"; StringBuffer orientSql = new StringBuffer(""); Hashtable ht = new Hashtable(); orientSql.append("SELECT PRINTER.DEFAULT_PRINT_ORIENTATION, PRINTER.DUPLEX_AVAILABLE FROM "); orientSql.append(Sch_Tables.PRINTER); orientSql.append(" WHERE ").append(Sch_Tables.PRINTER).append(".").append(Sch_Printer.ID).append('='); orientSql.append(agcEOD.getProperty(Sch_EndOfDayProfile.AUTOSTART_REPORT_PRINTER_ID)).append(" AND "); orientSql.append(Sch_Tables.PRINTER).append('.').append(Sch_Printer.LOC); orientSql.append("=").append(FM.m_loc); // build the band descriptor TsoGenericBandDescriptor bandDescriptor = new TsoGenericBandDescriptor(Sch_Tables.PRINTER, Sch_Tables.PRINTER); // add the columns in the order they will appear in the result set bandDescriptor.addColumn("DEFAULT_PRINT_ORIENTATION", DatatypeCodes.TYPE_STRING, true); // 0 bandDescriptor.addColumn("DUPLEX_AVAILABLE", DatatypeCodes.TYPE_STRING, true); // 1 ht.put(com.gpc.tams.dso.dsoGeneric.SQL, orientSql.toString()); ht.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bandDescriptor); SilverStreamExceptionHelper.invokeQuery(agcGenericDso,ht); if (agcGenericDso.gotoFirst()){ printOrient = "" + agcGenericDso.getProperty("DEFAULT_PRINT_ORIENTATION"); duplexAvail = "" + agcGenericDso.getProperty("DUPLEX_AVAILABLE"); } if ("P".equals(printOrient)) { //set to Portrait cbPrinterOrientation.setSelectedIndex(0); }else { //set to Landscape cbPrinterOrientation.setSelectedIndex(1); } if ("N".equals(duplexAvail)) { chkUseDuplex.setEnabled(false); chkUseDuplex.setSelected(false); }else { chkUseDuplex.setEnabled(true); } }catch (ApplicationException e) { logger.error("ApplicationException in choosePrinter()\n" , e); }catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in choosePrinter()\n" , e); }catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException in choosePrinter()\n" , e); }catch (AgoSecurityException e) { logger.error("AgoSecurityException in choosePrinter()\n" , e); } } /** setRadioButtonAttributeValue() sets the new value of CLEAR_AVG_COST in the database after user has * modified the Clear Average Cost/Lock checkboxes in the Clear Average Cost section. Called from fSave(). */ private void setRadioButtonAttributeValue() { Byte bTwo = new Byte((byte)2); Byte bTen = new Byte((byte)10); Byte bEleven = new Byte((byte)11); Byte bTwelve = new Byte((byte)12); if (rbDoNotClear.isSelected() && !chkLockClearAvgCost.isSelected()) { agcEOD.setProperty(Sch_EndOfDayProfile.CLEAR_AVG_COST_AT_ECY, bZero); }else if (rbClearFiscalYearEnd.isSelected() && !chkLockClearAvgCost.isSelected()) { agcEOD.setProperty(Sch_EndOfDayProfile.CLEAR_AVG_COST_AT_ECY, bOne); }else if (rbClearCalenderYearEnd.isSelected() && !chkLockClearAvgCost.isSelected()) { agcEOD.setProperty(Sch_EndOfDayProfile.CLEAR_AVG_COST_AT_ECY, bTwo); }else if (rbDoNotClear.isSelected() && chkLockClearAvgCost.isSelected()) { agcEOD.setProperty(Sch_EndOfDayProfile.CLEAR_AVG_COST_AT_ECY, bTen); }else if (rbClearFiscalYearEnd.isSelected() && chkLockClearAvgCost.isSelected()) { agcEOD.setProperty(Sch_EndOfDayProfile.CLEAR_AVG_COST_AT_ECY, bEleven); }else if (rbClearCalenderYearEnd.isSelected() && chkLockClearAvgCost.isSelected()) { agcEOD.setProperty(Sch_EndOfDayProfile.CLEAR_AVG_COST_AT_ECY, bTwelve); } } /** The setAutoEODvalues() method resets the USE_AUTOSTART_EOD (Enable Automatic EOD checkbox) depending * on the user's response. If no fields are missing from the Automatic EOD group box, the system sets * USE_AUTOSTART_EOD to 1 and save the remaining fields. If fields ARE MISSING from the group box, * the user has the option of clicking OK to cancel Automatic End of Day or CANCEL to enter values * in the required fields. If they click OK, the system saves the record, setting USE_AUTOSTART_EOD to 0. */ private boolean setAutoEODvalues() { if (chkEnableAutoEOD.isSelected()) { //if ok was clicked logger.debug("is check box selected? - " + chkEnableAutoEOD.isSelected()); return allAutoEODfieldsEntered(); } return true; } /** If the user changes the "Unattended BackupTime" value, the system saves the value in STORE_PROFILE, setting * UNATTENDED_BACKUP = newTime, MODIFIED_BY_EMPLOYEE_ID = employeeID, and LAST_MODIFIED_DATE = currentSystemDate. * This method is called from fSave(). */ private void setUnattendedBUvalue() { String newTime = fldUnattendedBackUpTime.getText(); if ("".equals(newTime)) { newTime = null; } StringBuffer sql = new StringBuffer(""); Hashtable ht = new Hashtable(); agcStoreProfile.setProperty(Sch_StoreProfile.UNATTENDED_BACKUP, newTime); } public boolean fValidateComponent(javax.swing.JComponent comp) { if (comp == fldUnattendedBackUpTime) { if ("".equals(fldUnattendedBackUpTime.getText())) { // You must enter a value in the "Unattended Backup Time" field. ClientApplicationContext.getClientApplicationContext().getMessageMgr() .showMessage(this, "980"); return false; } } return true; } /** *Saves any changes made to the data
*@return boolean Return true if update passes, flase if update fails. *1-checked & unlocked, 11-checked & locked *0-unchecked & unlocked, 10-unchecked & locked *msg.445:WARNING! Can only be unlocked by TAMS Support.\n Are you sure you want to lock ? **/ public boolean fSave() { try{ if(fldEmail.getText().isEmpty()){ agcEOD.setProperty(Sch_EndOfDayProfile.BACKUP_FAILURE_MSG_TO_EMAIL, null); } if(!m_isLoading && chkLockTransmit.isSelected() && chkLockTransmit.isEnabled()){ boolean transmitResponse = ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessageYesNo(this, "455", lblTransmitSalesAndCost.getText()); if(!transmitResponse){ chkLockTransmit.setSelected(false); } } if(!m_isLoading && chkLockPhoneReminder.isSelected() && chkLockPhoneReminder.isEnabled()){ boolean phoneSwitchResponse = ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessageYesNo(this, "455", lblPhoneSwitch.getText()); if (!phoneSwitchResponse){ chkLockPhoneReminder.setSelected(false); } } if (!m_isLoading && ckbUselabelQuantityLock.isSelected() && ckbUselabelQuantityLock.isEnabled()) { boolean UselabelQuantityResponse = ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessageYesNo(this, "455", lblUselabelQuantity.getText()); if (!UselabelQuantityResponse) { ckbUselabelQuantityLock.setSelected(false); } } if(!m_isLoading && chkLockClearAvgCost.isSelected() && chkLockClearAvgCost.isEnabled()){ boolean clearAvgResponse = ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessageYesNo(this, "455", rctClearAverageCost.getText()); if(!clearAvgResponse){ chkLockClearAvgCost.setSelected(false); } } int iLocked = chkLockTransmit.isSelected() ? 10:0; if (chkTransmit.isSelected()){ iLocked = 1 + iLocked; agcEOD.setProperty ("SEND_EOM_REPORTABLE_SALES", new Integer(iLocked)); } else { agcEOD.setProperty ("SEND_EOM_REPORTABLE_SALES", new Integer(iLocked)); } iLocked = chkLockPhoneReminder.isSelected() ? 10:0; if (chkPhoneReminder.isSelected()){ iLocked = 1 + iLocked; agcEOD.setProperty ("PHONE_SWITCH_REMINDER", new Integer (iLocked)); } else { agcEOD.setProperty ("PHONE_SWITCH_REMINDER", new Integer (iLocked)); } iLocked = ckbUselabelQuantityLock.isSelected() ? 10 : 0; if (ckbUselabelQuantity.isSelected()) { iLocked = 1 + iLocked; agcEOD.setProperty("USE_LABEL_QTY_FOR_GENERATION", new Integer(iLocked)); } else { agcEOD.setProperty("USE_LABEL_QTY_FOR_GENERATION", new Integer(iLocked)); } setRadioButtonAttributeValue(); if(!setAutoEODvalues()) return false; setUnattendedBUvalue(); // Update EOM table if needed if (m_TblMgr.save()) { m_TblMgr.refreshRows(); } Integer UserId = new Integer(0); TsoCurrentUser currUser = ClientApplicationContext.getClientApplicationContext().getCurrentUser(); if (currUser != null){ // get user logged in Id UserId = currUser.getEmployeeId(); agcEOD.setProperty(Sch_EndOfDayProfile.MODIFIED_BY_EMPLOYEE_ID,UserId); agcStoreProfile.setProperty(Sch_StoreProfile.MODIFIED_BY_EMPLOYEE_ID, UserId); } // get user modified date java.sql.Timestamp ts = FM.getTransactionTimestamp(); if (ts !=null){ agcEOD.setProperty(Sch_EndOfDayProfile.LAST_MODIFIED_DATE,ts); agcStoreProfile.setProperty(Sch_StoreProfile.LAST_MODIFIED_DATE, ts); } agcEOD.setProperty(Sch_EndOfDayProfile.AUTOSTART_TIME,fldAutoEODStartTime.getText()); if (m_updatePrinterOrientation) { agcEOD.setProperty(Sch_EndOfDayProfile.AUTOSTART_REPORT_PRINT_ORIENTATION,cbPrinterOrientation.getValue()); if (!updatePrinter(UserId, ts)) { return false; } } if (cbEcatalogUpdateDay.getSelectedItem() == null || cbEcatalogUpdateDay.getSelectedItem().equals(" ")) { agcEOD.setProperty( Sch_EndOfDayProfile.AUTOMATIC_CATALOG_UPDATE_DAY, automaticCatalogUpdateDay); } int autoCatalogUpdateDayOfWeekint = chkEcatalogUpdateDayOfWeekFriday.isSelected() ? 1:chkEcatalogUpdateDayOfWeekSaturday.isSelected() ? 2:0; agcEOD.setProperty("AUTO_CATALOG_UPDATE_DAY_OF_WEEK",new Integer(autoCatalogUpdateDayOfWeekint)); AgcData [] datas = {agcEOD, agcStoreProfile}; agData.updateTransactionally(datas); }catch (ApplicationException e) { logger.error(e.toString(), e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); return false; }catch (AgoTransientSystemException e) { logger.error(e.toString(), e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); return false; }catch (AgoSecurityException e) { logger.error(e.toString(), e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); return false; }catch (AgoUnrecoverableSystemException e) { logger.error(e.toString(), e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); return false; }catch (AgoInvalidDataException e) { logger.error(e.toString(), e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); return false; }catch (AgoDataConcurrencyException e) { logger.debug(e.toString() , e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); try{ agcEOD.refreshRows(); agcStoreProfile.refreshRows(); }catch(AgoSecurityException se){ logger.error(e.toString(), e); }catch(AgoTransientSystemException tse){ logger.error(e.toString(), e); }catch(AgoUnrecoverableSystemException use){ logger.error(e.toString(), e); } return false; }catch (AgoMissingDataException e) { logger.error(e.toString(), e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); return false; } m_pleaseUpdate = false; m_updatePrinterOrientation = false; return true; } /** * Modified version with Command pattern * * @param userId * @param transactionTime * @return */ private boolean updatePrinter(Integer userId, java.sql.Timestamp transactionTime) { //System.out.println("Enter method updatePrinter"); StringBuffer sb = new StringBuffer(); sb.append("UPDATE ").append(Sch_Tables.PRINTER).append(" SET "); sb.append(Sch_Printer.DEFAULT_PRINT_ORIENTATION).append('=').append('\'').append(cbPrinterOrientation.getValue()); sb.append('\'').append(',').append(Sch_Printer.LAST_MODIFIED_DATE).append('=').append('\'').append(transactionTime); sb.append('\'').append(',').append(Sch_Printer.MODIFIED_BY_EMPLOYEE_ID).append('=').append(userId); sb.append(" WHERE "); sb.append(Sch_Tables.PRINTER).append(".").append(Sch_Printer.ID).append('='); sb.append(agcEOD.getProperty(Sch_EndOfDayProfile.AUTOSTART_REPORT_PRINTER_ID)).append(" AND "); sb.append(Sch_Tables.PRINTER).append('.').append(Sch_Printer.LOC); sb.append("=").append(FM.m_loc); logger.debug("Update SQL ==> " + sb.toString()); ExecuteSQLVO executeSqlCommand = new ExecuteSQLVO(); executeSqlCommand.setSqlQuery(sb.toString()); ResultsVO sResult = InvokerBridge.invoke(executeSqlCommand); boolean result=false; if (sResult != null) { if (sResult.getError() != null) { Exception e = sResult.getError(); logger.error(e.getMessage(), e); result=false; } else if (sResult.isSuccessful()) { logger.debug("\n\n22 sResult = " + sResult + "\n\n"); result= true; } } return result; } public void fSort() { } public void fCancel() { try { if (m_updatePrinterOrientation) { String printOrient = (String) agcEOD.getProperty(Sch_EndOfDayProfile.AUTOSTART_REPORT_PRINT_ORIENTATION); if ("P".equals(printOrient)) { //set to Portrait cbPrinterOrientation.setSelectedIndex(0); } else { //set to Landscape cbPrinterOrientation.setSelectedIndex(1); } } agcEOD.refreshRows(); agcEOM.refreshRows(); agcStoreProfile.refreshRows(); m_TblMgr.refreshRows(); clearAverageCost(); transmitSales(); phoneSwitch(); backupInformation(); useLabelQuantity(); autoCatalogUpdateDayOfWeek(); } catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException in fCancel()\n", e); } catch (AgoSecurityException e) { logger.error("AgoSecurityException in fCancel()\n", e); } catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in fCancel()\n", e); } } public boolean fValidateJTableCell(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1, int row, int column) { FwoDatePattern datePattern = DatePatternUtils.getDatePattern(); Timestamp currTime = new java.sql.Timestamp(System.currentTimeMillis()); boolean valid = true; // need to validate the date entered is greater than today's date if (column == agcEOM.getPropertyIndex(Sch_EndOfMonthProfile.SALES_MONTH_END_DATE)) { TsoJTableMgr tblMgr = (TsoJTableMgr)fwoJTableMgr1; AgiRowCursor rc = tblMgr.getRowCursor(row); try { java.util.Date today = new java.util.Date(datePattern.format(currTime)); java.util.Date eomDate = (java.util.Date)rc.getProperty(Sch_EndOfMonthProfile.SALES_MONTH_END_DATE); logger.debug("Todays Date = " + today); logger.debug("EOM Date Entered = " + eomDate); if(eomDate !=null){ if(eomDate.before(today)){ ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "127"); valid = false; } } } catch (DatePatternFormatException e) { logger.error("DatePatternFormatException in fValidateJTableCell()\n", e); } } return valid; } public boolean fValidateJTableRow(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1, int row) { return true; } public boolean fNeedsUpdate() { boolean agcEODBoolean = agcEOD.haveRowsChanged(); boolean agcStoreProfileBoolean = agcStoreProfile.haveRowsChanged(); boolean tblMgrBoolean = m_TblMgr.haveRowsChanged(); logger.debug("fNeedsUpdate - agcEODBoolean = " + agcEODBoolean); logger.debug("fNeedsUpdate - agcStoreProfileBoolean = " + agcStoreProfileBoolean); logger.debug("fNeedsUpdate - tblMgrBoolean = " + tblMgrBoolean); logger.debug("fNeedsUpdate - m_pleaseUpdate = " + m_pleaseUpdate); return (agcEODBoolean || agcStoreProfileBoolean || tblMgrBoolean || m_pleaseUpdate || m_updatePrinterOrientation); } public void fLocalize() { ClientApplicationContext.getClientApplicationContext().getLocalizationMgr().localize(this); getNumberPatternInstances(); TsoComboBox cbMonth = new TsoComboBox(TsoConstant.LIST_REF_MONTH_OF_YEAR, false); cbMonth.setAlwaysShowRendererAsLabel(true); cbMonth.setDisplayLabelHorizontalAlignment(SwingConstants.LEFT); m_TblMgr.setCustomCell(0, cbMonth); m_isLoading = true; Object printerValue = cbPrinterOrientation.getValue(); queryPrinterOrientationCB(); cbPrinterOrientation.setValue(printerValue); m_isLoading = false; } public boolean tmPreTableRowChange(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1, int row, int col) { TsoJTableMgr tblMgr = (TsoJTableMgr)fwoJTableMgr1; AgiRowCursor rc = tblMgr.getRowCursor(row); Calendar cal = new GregorianCalendar(); cal.set(Calendar.MONTH, row); Calendar calDate = new GregorianCalendar(); java.util.Date eomDate = (java.util.Date)rc.getProperty(Sch_EndOfMonthProfile.SALES_MONTH_END_DATE); if(eomDate !=null){ calDate.setTime(eomDate); if(calDate.get(Calendar.MONTH) == cal.get(Calendar.MONTH)) { //months are equal! return true; } } ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "1045"); return false; } private void handle_cbEODPrinter_valueChanged(AgoPropertyChangeEvent evt) { choosePrinter(); } private void handle_rbClearCalenderYearEnd_mouseClicked(MouseEvent mouseEvent) { m_pleaseUpdate = !m_isInitialLoad; } private void handle_rbClearFiscalYearEnd_mouseClicked(MouseEvent mouseEvent) { m_pleaseUpdate = !m_isInitialLoad; } private void handle_rbDoNotClear_mouseClicked(MouseEvent mouseEvent) { m_pleaseUpdate = !m_isInitialLoad; } private void handle_chkLockPhoneReminder_actionPerformed(ActionEvent evt){ m_pleaseUpdate = !m_isInitialLoad; } private void handle_chkPhoneReminder_actionPerformed(ActionEvent evt){ m_pleaseUpdate = !m_isInitialLoad; } private void handle_chkEnableAutoEOD_actionPerformed(ActionEvent evt){ isEODTriggeredSourceChanged = true; if(chkEnableAutoEOD.isSelected()){ boolean fieldsPopulatedResponse = ClientApplicationContext.getClientApplicationContext(). getMessageMgr().showMessageOKCancel(this, "10901"); if(fieldsPopulatedResponse){ chkEnableAutoEOD.setSelected(true); enableDisablechkEnableAutoEOD(); updateEODTriggerSource(RefEODTriggeredSource.AUTO); eodTriggeredSource = RefEODTriggeredSource.MANUALLY; m_pleaseUpdate = !m_isInitialLoad; }else{ chkEnableAutoEOD.setSelected(false); } }else{ enableDisablechkEnableAutoEOD(); updateEODTriggerSource(RefEODTriggeredSource.MANUALLY); eodTriggeredSource = RefEODTriggeredSource.AUTO; m_pleaseUpdate = !m_isInitialLoad; } } private void handle_chkLockClearAvgCost_actionPerformed(ActionEvent evt){ m_pleaseUpdate = !m_isInitialLoad; } private void handle_ckbUselabelQuantityLock_actionPerformed(ActionEvent evt) { m_pleaseUpdate = !m_isInitialLoad; } private void handle_ckbUselabelQuantity_actionPerformed(ActionEvent evt) { m_pleaseUpdate = !m_isInitialLoad; } private void handle_chkLockTransmit_actionPerformed(ActionEvent evt){ m_pleaseUpdate = !m_isInitialLoad; } private void handle_chkTransmit_actionPerformed(ActionEvent evt){ m_pleaseUpdate = !m_isInitialLoad; } private void handle_chkUseDuplex_actionPerformed(ActionEvent evt){ m_pleaseUpdate = !m_isInitialLoad; } private void handle_chkEcatalogUpdateDayOfWeekFriday_actionPerformed(ActionEvent evt){ selectchkEcatalogUpdateDayOfWeekFriday(); m_pleaseUpdate = !m_isInitialLoad; } private void handle_chkEcatalogUpdateDayOfWeekSaturday_actionPerformed(ActionEvent evt){ selectchkEcatalogUpdateDayOfWeekSaturday(); m_pleaseUpdate = !m_isInitialLoad; } public boolean fValidate() { // Value cannot be 0 if "Auto Start EOD" is checked. if (chkEnableAutoEOD.isSelected()) { if (m_decZero2.equals(fldGPPercent.getText())) { ClientApplicationContext.getClientApplicationContext().getMessageMgr() .showMessage(this, "975"); return false; } } else { if ("".equals(fldGPPercent.getText().trim())) { fldGPPercent.setText(m_decZero2); return true; } } if (fldEmail.getText() != null && !fldEmail.getText().equals("")) { String fldEmailText = fldEmail.getText(); if(!CommonUtil.multipleEmailValidation(fldEmailText, null)){ ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "9950"); fldEmail.requestFocus(); return false; } } return true; } public void fPostNew() { } public void fPostSave() { if (chkLockTransmit.isSelected()) { chkTransmit.setEnabled(false); chkLockTransmit.setEnabled(false); } if (chkLockPhoneReminder.isSelected()) { chkPhoneReminder.setEnabled(false); chkLockPhoneReminder.setEnabled(false); } if (ckbUselabelQuantityLock.isSelected()) { ckbUselabelQuantity.setEnabled(false); ckbUselabelQuantityLock.setEnabled(false); } if (chkLockClearAvgCost.isSelected()) { chkLockClearAvgCost.setEnabled(false); rbClearFiscalYearEnd.setEnabled(false); rbClearCalenderYearEnd.setEnabled(false); rbDoNotClear.setEnabled(false); } } public void fPostEdit() { } public void fPostCancel() { selectchkEcatalogUpdateDayOfWeekFriday(); selectchkEcatalogUpdateDayOfWeekSaturday(); if(isEODTriggeredSourceChanged && eodTriggeredSource != null){ updateEODTriggerSource(eodTriggeredSource); } enableDisablechkEnableAutoEOD(); m_pleaseUpdate = false; m_updatePrinterOrientation = false; } public void fPostDelete() { } public java.util.Locale fGetCurrentRecordLocale(javax.swing.JComponent jComponent1) { return (java.util.Locale)null; } public Integer fGetFunctionId() { return TsoConstant.SM_END_OF_DAY; } public void fCheckAccess() { } public void fCheckLogin() { } public String fCreateTitle() { return (String)null; } public String fGetFormName() { return TsoConstant.FRM_SM_EOD_CONTROLS; } public void fStylize() { } public boolean fStopLogout() { return false; } public void fSetToolBar(java.awt.Component component1) { } public com.gpc.client.backoffice.FwoFormMaster fGetFormMaster() { return FM; } public boolean fDelete() { return false; } public boolean fEdit() { return false; } public boolean fFindExec() { return false; } public boolean fFindMode() { return false; } public boolean fFirst() { return false; } public boolean fLast() { return false; } public boolean fNew() { return false; } public boolean fNext() { return false; } public boolean fPrevious() { return false; } public void tmPostTableInsert(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1) { } public void tmPostTableEditMode(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1, boolean boolean2) { } public boolean tmPreTableSave(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1, int int2, boolean boolean3) { return true; } public void tmPostTableSave(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1, int int2, boolean boolean3) { } public boolean tmPreTableDelete(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1, int int2) { return false; } public void tmPostTableRowChange(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1, int int2, int int3) { } public boolean tmPreTableSort(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1) { return false; } public void tmPostTableSort(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1) { } public boolean fClose(){ removeGlobalReferences(); return true; } /** * Set All Globals null except: * No primitives (int, boolean) * No constant renames (private TsoConstant TC); * No agcdatas * No final variables */ private void removeGlobalReferences() { FM = null; m_storeProfile = null; m_decZero2 = null; removeAllGUIComponentReferences(); } private void removeAllGUIComponentReferences() { agcStoreProfile = null; fldUnattendedBackUpTime = null; fldAutoEODStartTime = null; agcGenericDso = null; agcEOD = null; agcEOM = null; cbEmployee = null; fldEmail = null; lblEmail = null; lblEmployee = null; fldGPPercent = null; lblGPPercent = null; chkLockClearAvgCost = null; lblClearAvgCostLock = null; lblHistoryPurgeDay = null; lblDayofHistoryPurge = null; lblNonStockMonth = null; rbDoNotClear = null; rbClearCalenderYearEnd = null; rbClearFiscalYearEnd = null; chkUseDuplex = null; lblUseDuplex = null; lblPrinterOrientation = null; cbPrinterOrientation = null; lblAutoEODEmployee = null; cbEODPrinter = null; lblPhoneSwitchLock = null; lblEcatalogUpdateDay = null; cbEcatalogUpdateDay = null; lblEcatalogUpdateDayOfWeekFriday= null; lblEcatalogUpdateDayOfWeekSaturday= null; chkEcatalogUpdateDayOfWeekFriday=null; chkEcatalogUpdateDayOfWeekSaturday=null; lblTransmitSalesLock = null; chkLockPhoneReminder = null; chkLockTransmit = null; lblPriorInvoiceCosting = null; lblUnattendedBU = null; lblUselabelQuantity = null; ckbUselabelQuantity = null; lblUselabelQuantityLock = null; ckbUselabelQuantityLock = null; cbAutoEODEmployee = null; lblEODPrinter = null; lblEnableAutomaticEOD = null; chkEnableAutoEOD = null; lblAutoEODStartTime = null; lblGPC = null; lblStoreHdg = null; lblStoreNumber = null; lblStoreType = null; lblTypeHdg = null; lblStoreName = null; lblCompanyID = null; lblCompanyHdg = null; lblPhoneSwitch = null; chkPhoneReminder = null; chkTransmit = null; lblTransmitSalesAndCost = null; lblLastMonthNonStockPurge = null; tblEOM = null; tblEOMScrollPane = null; lblHeading = null; Rectangle15 = null; rctClearAverageCost = null; rctGeneralInfo = null; rctAutomaticEOD = null; rctEndOfMonthDates = null; rctBackupInfo = null; rctBackupFailureNotify = null; rctEODPrinter = null; } public void mouseClicked(MouseEvent mouseEvent) { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === Object src = mouseEvent.getSource(); if (src == rbDoNotClear) { handle_rbDoNotClear_mouseClicked(mouseEvent); return; } if (src == rbClearFiscalYearEnd) { handle_rbClearFiscalYearEnd_mouseClicked(mouseEvent); return; } if (src == rbClearCalenderYearEnd) { handle_rbClearCalenderYearEnd_mouseClicked(mouseEvent); return; } } public void mouseEntered(MouseEvent mouseEvent) { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === } public void mouseExited(MouseEvent mouseEvent) { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === } public void mousePressed(MouseEvent mouseEvent) { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === } public void mouseReleased(MouseEvent mouseEvent) { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === } public void valueChanged(AgoPropertyChangeEvent evt) { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === Object src = evt.getSource(); if (src == cbEODPrinter) { handle_cbEODPrinter_valueChanged(evt); return; } if (src == cbPrinterOrientation) { handle_cbPrinterOrientation_valueChanged(evt); return; } } public void validationTest(AgoPropertyChangeEvent evt) throws AgoValidationException { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === } public void validationFailed(AgoPropertyChangeEvent evt) throws AgoValidationException { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === } public Object ag_getValue(DataCursor cursor, int valueID, Object param1, Object param2) { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === try { switch (valueID) { case 0: /* LOC () STORE_PROFILE.LOC*/ return ((Integer) cursor.getProperty(0)); case 1: /* LAST_MODIFIED_DATE () STORE_PROFILE.LAST_MODIFIED_DATE*/ return ((java.sql.Timestamp) cursor.getProperty(1)); case 2: /* MODIFIED_BY_EMPLOYEE_ID () STORE_PROFILE.MODIFIED_BY_EMPLOYEE_ID*/ return ((Integer) cursor.getProperty(2)); case 3: /* UNATTENDED_BACKUP () STORE_PROFILE.UNATTENDED_BACKUP*/ return ((java.sql.Time) cursor.getProperty(3)); case 4: /* COMPANY_ID () STORE_PROFILE.COMPANY_ID*/ return ((Integer) cursor.getProperty(4)); case 5: /* LOC () END_OF_DAY_PROFILE.LOC*/ return ((Integer) cursor.getProperty(0)); case 6: /* SEND_LOCAL_DETAIL () END_OF_DAY_PROFILE.SEND_LOCAL_DETAIL*/ return ((Byte) cursor.getProperty(1)); case 7: /* NON_STOCK_PURGE () END_OF_DAY_PROFILE.NON_STOCK_PURGE*/ return ((Integer) cursor.getProperty(2)); case 8: /* HISTORY_PURGE_PROCESS_DAY () END_OF_DAY_PROFILE.HISTORY_PURGE_PROCESS_DAY*/ return ((Byte) cursor.getProperty(3)); case 9: /* SEND_EOM_REPORTABLE_SALES () END_OF_DAY_PROFILE.SEND_EOM_REPORTABLE_SALES*/ return ((Byte) cursor.getProperty(4)); case 10: /* REPORTED_SALES_SUMMARY_COUNTER () END_OF_DAY_PROFILE.REPORTED_SALES_SUMMARY_COUNTER*/ return ((Short) cursor.getProperty(5)); case 11: /* PHONE_SWITCH_REMINDER () END_OF_DAY_PROFILE.PHONE_SWITCH_REMINDER*/ return ((Byte) cursor.getProperty(6)); case 12: /* CLEAR_AVG_COST_AT_ECY () END_OF_DAY_PROFILE.CLEAR_AVG_COST_AT_ECY*/ return ((Byte) cursor.getProperty(7)); case 13: /* EXPORT_TO_DATA_WAREHOUSE () END_OF_DAY_PROFILE.EXPORT_TO_DATA_WAREHOUSE*/ return ((Byte) cursor.getProperty(8)); case 14: /* USE_AUTOSTART_EOD () END_OF_DAY_PROFILE.USE_AUTOSTART_EOD*/ return ((Byte) cursor.getProperty(9)); case 15: /* AUTOSTART_TIME () END_OF_DAY_PROFILE.AUTOSTART_TIME*/ return ((java.sql.Time) cursor.getProperty(10)); case 16: /* AUTOSTART_EMPLOYEE_ID () END_OF_DAY_PROFILE.AUTOSTART_EMPLOYEE_ID*/ return ((Integer) cursor.getProperty(11)); case 17: /* AUTOSTART_REPORT_PRINTER_ID () END_OF_DAY_PROFILE.AUTOSTART_REPORT_PRINTER_ID*/ return ((Integer) cursor.getProperty(12)); case 18: /* AUTOSTART_REPORT_PRINT_ORIENTATION () END_OF_DAY_PROFILE.AUTOSTART_REPORT_PRINT_ORIENTATION*/ return ((String) cursor.getProperty(13)); case 19: /* AUTOSTART_REPORT_PRINTER_USE_DUPLEX () END_OF_DAY_PROFILE.AUTOSTART_REPORT_PRINTER_USE_DUPLEX*/ return ((String) cursor.getProperty(14)); case 20: /* BACKUP_FAILURE_MSG_TO_EMAIL () END_OF_DAY_PROFILE.BACKUP_FAILURE_MSG_TO_EMAIL*/ return ((String) cursor.getProperty(15)); case 21: /* BACKUP_FAILURE_MSG_TO_EMPLOYEE_ID () END_OF_DAY_PROFILE.BACKUP_FAILURE_MSG_TO_EMPLOYEE_ID*/ return ((Integer) cursor.getProperty(16)); case 22: /* AUTO_INVOICE_COSTING_GP_PERCENT () END_OF_DAY_PROFILE.AUTO_INVOICE_COSTING_GP_PERCENT*/ return ((java.math.BigDecimal) cursor.getProperty(17)); case 23: /* LAST_MODIFIED_DATE () END_OF_DAY_PROFILE.LAST_MODIFIED_DATE*/ return ((java.sql.Timestamp) cursor.getProperty(18)); case 24: /* MODIFIED_BY_EMPLOYEE_ID () END_OF_DAY_PROFILE.MODIFIED_BY_EMPLOYEE_ID*/ return ((Integer) cursor.getProperty(19)); case 25: /* TSU_RECEIVED () END_OF_DAY_PROFILE.TSU_RECEIVED*/ return ((String) cursor.getProperty(20)); case 26: /* LOC () END_OF_MONTH_PROFILE.LOC*/ return ((Integer) cursor.getProperty(0)); case 27: /* REF_MONTH_OF_YEAR_ID () END_OF_MONTH_PROFILE.REF_MONTH_OF_YEAR_ID*/ return ((Byte) cursor.getProperty(1)); case 28: /* SALES_MONTH_END_DATE () END_OF_MONTH_PROFILE.SALES_MONTH_END_DATE*/ return ((java.sql.Date) cursor.getProperty(2)); case 29: /* LAST_MODIFIED_DATE () END_OF_MONTH_PROFILE.LAST_MODIFIED_DATE*/ return ((java.sql.Timestamp) cursor.getProperty(3)); case 30: /* MODIFIED_BY_EMPLOYEE_ID () END_OF_MONTH_PROFILE.MODIFIED_BY_EMPLOYEE_ID*/ return ((Integer) cursor.getProperty(4)); case 31: /* cbEmployee () EMPLOYEE.LAST_NAME + ", " + EMPLOYEE.FIRST_NAME*/ return ((((String) cursor.getProperty(0))) + (", ")) + (((String) cursor.getProperty(1))); case 32: /* cbEmployee () EMPLOYEE.ID*/ return ((Integer) cursor.getProperty(2)); case 33: /* cbEODPrinter () PRINTER.DESCRIPTION*/ return ((String) cursor.getProperty(0)); case 34: /* cbEODPrinter () PRINTER.ID*/ return ((Integer) cursor.getProperty(1)); case 35: /* cbEcatalogUpdateDay() END_OF_DAY_PROFILE.AUTOMATIC_CATALOG_UPDATE_DAY*/ return ((Integer) cursor.getProperty(21)); case 36: /* USE_LABEL_QTY_FOR_GENERATION () END_OF_DAY_PROFILE.USE_LABEL_QTY_FOR_GENERATION*/ return ((Byte) cursor.getProperty(22)); case 37: /* chkECatalogUpdateDayOfWeekFriday /chkECatalogUpdateDayOfWeekSaturday. END_OF_DAY_PROFILE.AUTO_CATALOG_UPDATE_DAY_OF_WEEK*/ return ((Byte) cursor.getProperty(23)); case 38: /*USE_WEEKEND_CATALOG_SETTINGS*/ return ((Byte) cursor.getProperty(24)); default: return null; } } catch (Throwable e) { return null; } } public void finalize()throws Throwable{ logger.debug("Memory being release: " + this); super.finalize(); } public void actionPerformed(ActionEvent evt) { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === Object src = evt.getSource(); if (src == chkEnableAutoEOD) { handle_chkEnableAutoEOD_actionPerformed(evt); return; } if (src == chkLockPhoneReminder) { handle_chkLockPhoneReminder_actionPerformed(evt); return; } if (src == ckbUselabelQuantityLock) { handle_ckbUselabelQuantityLock_actionPerformed(evt); return; } if (src == chkTransmit) { handle_chkTransmit_actionPerformed(evt); return; } if (src == chkLockClearAvgCost) { handle_chkLockClearAvgCost_actionPerformed(evt); return; } if (src == chkPhoneReminder) { handle_chkPhoneReminder_actionPerformed(evt); return; } if (src == ckbUselabelQuantity) { handle_ckbUselabelQuantity_actionPerformed(evt); return; } if (src == chkUseDuplex) { handle_chkUseDuplex_actionPerformed(evt); return; } if (src == chkEcatalogUpdateDayOfWeekFriday) { handle_chkEcatalogUpdateDayOfWeekFriday_actionPerformed(evt); return; } if (src == chkEcatalogUpdateDayOfWeekSaturday) { handle_chkEcatalogUpdateDayOfWeekSaturday_actionPerformed(evt); return; } if (src == chkLockTransmit) { handle_chkLockTransmit_actionPerformed(evt); return; } super.actionPerformed(evt); } private void handle_cbPrinterOrientation_valueChanged(AgoPropertyChangeEvent evt) { m_updatePrinterOrientation = !m_isLoading; } public void doLayout() { } /** * This method is used to check the EOD_TRIGGERED_SOURCE from END_OF_DAY_PROFILE table and if value is equal to API or not. * * @Throws * ApplicationException * AgoUnrecoverableSystemException * AgoSecurityException * AgoTransientSystemException * AgoMissingDataException */ public boolean isAPIEODTriggerSource() throws ApplicationException, AgoUnrecoverableSystemException, AgoSecurityException, AgoTransientSystemException, AgoMissingDataException{ logger.debug("isAPIEODTriggerSource() method is invoked"); boolean isAPIEODTriggerSource = false; Hashtable hashtable = new Hashtable(); StringBuilder sqlQuery = new StringBuilder(); sqlQuery.setLength(0); int location = ClientApplicationContext.getClientApplicationContext().getLocation(); Integer m_loc = Integer.valueOf(location); sqlQuery.append("SELECT ").append(Sch_EndOfDayProfile.EOD_TRIGGERED_SOURCE).append(" FROM "); sqlQuery.append(Sch_Tables.END_OF_DAY_PROFILE); sqlQuery.append(" WHERE ").append(Sch_EndOfDayProfile.LOC).append(" = ").append(m_loc); agcDsoSql.setDataSource("com.gpc.tams.dso.dsoGeneric"); TsoGenericBandDescriptor band = new TsoGenericBandDescriptor(Sch_Tables.END_OF_DAY_PROFILE, Sch_Tables.END_OF_DAY_PROFILE); band.addColumn(Sch_EndOfDayProfile.EOD_TRIGGERED_SOURCE, DatatypeCodes.TYPE_STRING, true); hashtable.put(com.gpc.tams.dso.dsoGeneric.SQL, sqlQuery.toString()); hashtable.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, band); SilverStreamExceptionHelper.invokeQuery(agcDsoSql, hashtable); if (agcDsoSql.gotoFirst()) { String sourceName = (String) agcDsoSql.getProperty(Sch_EndOfDayProfile.EOD_TRIGGERED_SOURCE); if (sourceName != null && !sourceName.trim().isEmpty() && sourceName.equalsIgnoreCase(RefEODTriggeredSource.API)) { isAPIEODTriggerSource = true; } } return isAPIEODTriggerSource; } }