// *** Generated Source File *** // Portions Copyright (c) 1996-2001, SilverStream Software, Inc., All Rights Reserved // *** 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.awt.*; import java.util.*; import java.util.List; import java.math.*; import com.sssw.rt.gui.*; import com.sssw.rt.util.*; import com.sssw.rt.event.*; import java.awt.event.*; import com.sssw.rt.expr.*; import javax.swing.*; import javax.swing.event.*; import java.io.*; import com.sssw.rt.tview.*; import com.sssw.rt.form.*; import com.sssw.rt.jform.*; //TAMS imports import com.gpc.backofficecommon.FwoSessionMgr; import com.gpc.backofficecommon.app.TamsCacheMgr; import com.gpc.backofficecommon.app.TsoProfile; import com.gpc.backofficecommon.util.TamsMisc; import com.gpc.client.backoffice.util.FwoFormat; import com.gpc.backofficecommon.util.SilverStreamExceptionHelper; import com.gpc.backofficecommon.constants.schema.Sch_RefLanguage; import com.gpc.backofficecommon.constants.schema.Sch_Tables; import com.gpc.backofficecommon.constants.schema.Sch_ARProfile; import com.gpc.backofficecommon.constants.schema.Sch_Customer; import com.gpc.backofficecommon.constants.schema.Sch_CustomerAR; import com.gpc.backofficecommon.constants.schema.Sch_CustomerDelivery; import com.gpc.backofficecommon.constants.schema.Sch_StoreProfile; import com.gpc.backofficecommon.constants.schema.Sch_CommunicationDirectory; import com.gpc.client.backoffice.FwoFormMaster; import com.gpc.client.backoffice.FwoBufferedData; import com.gpc.client.backoffice.FwoJTextKeyFilter; import com.gpc.client.backoffice.FwoToolBarDirector; import com.gpc.client.backoffice.app.TamsFormMaster; import com.gpc.client.backoffice.search.TsoSearchCustomer; import com.gpc.client.backoffice.table.cell.TsoComboBox; import com.gpc.client.backoffice.MainTabCleaner; import com.gpc.client.backoffice.util.FwoUnsupportedObjectException; import com.gpc.client.common.input.document.FwoValidatedTextDocument; import com.gpc.client.common.ClientApplicationContext; import com.gpc.common.util.LockableBoolean; import com.gpc.common.util.StringUtils; import com.gpc.common.pattern.FwoDatePattern; import com.gpc.common.pattern.FwoPattern; import com.gpc.common.TsoConstant; import com.gpc.common.FwiConstant; import com.gpc.common.constants.refvalues.RefBillingType; import com.gpc.common.constants.refvalues.RefCountry; import com.gpc.common.constants.refvalues.RefNAPACustomerCategory; import com.gpc.common.Profile; import com.gpc.common.ApplicationContext; import com.gpc.common.ResourceBundleReader; import com.gpc.common.exception.ApplicationException; import com.gpc.common.multistore.MSHelper; import com.gpc.common.pattern.DatePatternFormatException; import com.gpc.common.util.BooleanParser; import com.gpc.common.util.CommonUtil; import com.gpc.frame.FwiFormEdit; import com.gpc.frame.FwiFormProcess; import com.gpc.tams.dso.TsoGenericBandDescriptor; import java.text.ParseException; import org.apache.log4j.Logger; import com.gpc.client.common.prolink.ProLinkRegistrationHelper; import com.gpc.client.common.util.DatePatternUtils; import com.gpc.client.common.util.PhoneRoomUtil; import com.gpc.client.common.util.TAMSMouseListener; import com.gpc.valueobjects.customer.CustomerVO; import com.gpc.valueobjects.customerstatement.ARStatementMonitorVO; import com.gpc.valueobjects.profile.StoreProfileVO; import com.gpc.valueobjects.profile.InvoicingProfileVO; import com.gpc.valueobjects.profile.ARProfileVO; import com.gpc.valueobjects.profile.MultiStoreProfileVO; import com.gpc.client.backoffice.util.InvokerBridge; import com.gpc.valueobjects.common.ResultsVO; import com.gpc.valueobjects.common.CopyPricingProfileVO; import com.gpc.valueobjects.invoice.line.PhoneRoomStoreVO; import com.gpc.dao.CustomerDAO; import com.gpc.client.common.customer.maint.CustomerStatusCodeMapper; import com.gpc.common.constants.refvalues.RefCustomerType; import com.gpc.backofficecommon.util.TamsMisc; import com.gpc.businessservice.valueobject.arupdate.ArTransmissionStoreVO; import com.gpc.businessservice.factory.arupdate.ArTransmissionRequestServiceFactory; import com.gpc.businessservice.valueobject.arupdate.CustomerRequest; import java.sql.Timestamp; import com.gpc.client.backoffice.app.TsiMainProcess; /** * The FrmCM_CustMaint form maintains all the CM subforms on a tab-control. It also maintains all the * controls and processing of the first 2 tabs.

* @author Rachel Vanderboom * @version 1.0 */ public class FrmCM_CustMaint extends AgfForm // generated by SilverStream: do not edit implements FocusListener, com.gpc.frame.FwiFormClose, AgiPropertyValidationListener, com.gpc.client.backoffice.search.FwiFormSearch, ActionListener, javax.swing.event.ChangeListener, com.gpc.frame.FwiFormEdit, com.gpc.frame.FwiFormProcess { public com.sssw.rt.jform.AgcJCheckBox ckCustomerPresent; public com.sssw.rt.jform.AgcJLabel lblCustomerPresent; public com.sssw.rt.jform.AgcJLabel lblBillingTypeVerify; public com.sssw.rt.jform.AgcJLabel lblJSARegister; public com.sssw.rt.form.AgcData agcCommunicationDirectory; public com.sssw.rt.jform.AgcJLabel lblNationalRegister; public com.sssw.rt.form.AgcData agcDsoGen; public com.sssw.rt.jform.AgcJLabel Label1; public com.sssw.rt.jform.AgcJTextField fldSearch; public com.sssw.rt.jform.AgcJIntegerField fldCustomerId; public com.sssw.rt.jform.AgcJLabel lblCustName; public com.sssw.rt.form.AgcData agcCustomerAR; public com.sssw.rt.form.AgcData agcAlternateCustomer; public javax.swing.ButtonGroup DefaultJButtonGroup = new javax.swing.ButtonGroup(); public com.sssw.rt.jform.AgcJButton pbSearch; public com.sssw.rt.form.AgcData agcCustomerDelivery; public com.sssw.rt.form.AgcData agcCustomer; public com.sssw.rt.form.AgcData agcCustomerUserDefinedField; public com.sssw.rt.jform.AgcJTabbedPane tabCustomer; public com.sssw.rt.jform.AgcJLabel lblSecondaryTaxExemptNum; public com.sssw.rt.jform.AgcJComboBox cbEmpID; public com.sssw.rt.jform.AgcJTextField fldCustomerNum; public com.sssw.rt.jform.AgcJTextField fldMonthlySalesPotential; public com.sssw.rt.jform.AgcJTextField fldMinAmtForPO; public com.sssw.rt.jform.AgcJTextField fldSalesIDNumber; public com.sssw.rt.jform.AgcJComboBox cbCategory; public com.sssw.rt.jform.AgcJLabel lblModifiedEmplMain; public com.sssw.rt.jform.AgcJTextField fldAltCustNumber; public com.sssw.rt.jform.AgcJLabel lblCustomerTypeValue; public com.sssw.rt.jform.AgcJLabel lblExtension; public com.sssw.rt.jform.AgcJTextField fldExtension; public com.sssw.rt.jform.AgcJTextField fldAddress4; public com.sssw.rt.jform.AgcJLabel lblAddress4; public com.sssw.rt.jform.AgcJTextField fldAddress3; public com.sssw.rt.jform.AgcJLabel lblAddress3; public com.sssw.rt.jform.AgcJLabel lblDateAdded; public com.sssw.rt.jform.AgcJLabel lblLastPurchaseDate; public com.sssw.rt.jform.AgcJLabel lblLastModified; public com.sssw.rt.jform.AgcJLabel lblDateEstablished; public com.sssw.rt.jform.AgcJButton tbChangeCustType; public com.sssw.rt.jform.AgcJComboBox cbCustomerType; public com.sssw.rt.jform.AgcJCheckBox ckAuthorizePurchases; public com.sssw.rt.jform.AgcJLabel lblAuthorizePurchases; public com.sssw.rt.jform.AgcJLabel lblCustomerType; public com.sssw.rt.jform.AgcJLabel lblPOReqForPurchasesOver; public com.sssw.rt.jform.AgcJLabel lblSalesIDNum; public com.sssw.rt.jform.AgcJLabel lblAltCustNumber; public com.sssw.rt.jform.AgcJLabel lblMonthlySalesPotential; public com.sssw.rt.jform.AgcJTextField fldEmail; public com.sssw.rt.jform.AgcJLabel lblEmail; public com.sssw.rt.jform.AgcJLabel lblAlphaKey; public com.sssw.rt.jform.AgcJLabel lblName; public com.sssw.rt.jform.AgcJLabel lblAddress1; public com.sssw.rt.jform.AgcJLabel lblAddress2; public com.sssw.rt.jform.AgcJLabel lblCity; public com.sssw.rt.jform.AgcJLabel lblState; public com.sssw.rt.jform.AgcJLabel lblZip; public com.sssw.rt.jform.AgcJLabel lblPhone; public com.sssw.rt.jform.AgcJLabel lblNAPACategory; public com.sssw.rt.jform.AgcJLabel lblBillingType; public com.sssw.rt.jform.AgcJLabel lblSalesRepNum; public com.sssw.rt.jform.AgcJTextField fldAlphaKey; public com.sssw.rt.jform.AgcJTextField fldName; public com.sssw.rt.jform.AgcJTextField fldAddress1; public com.sssw.rt.jform.AgcJTextField fldAddress2; public com.sssw.rt.jform.AgcJTextField fldCity; public com.sssw.rt.jform.AgcJTextField fldZipCode; public com.sssw.rt.jform.AgcJTextField fldPhone; public com.sssw.rt.jform.AgcJComboBox cbRefState; public com.sssw.rt.jform.AgcJComboBox cbBillingType; public com.sssw.rt.jform.AgcJLabel lblWebAddress; public com.sssw.rt.jform.AgcJTextField fldWebAddress; public com.sssw.rt.jform.AgcJLabel lblCustomerNote; public com.sssw.rt.jform.AgcJComboBox cbSalesRepNum; public com.sssw.rt.jform.AgcJLabel lblFaxNum; public com.sssw.rt.jform.AgcJTextField fldFaxNum; public com.sssw.rt.jform.AgcJLabel lblCountry; public com.sssw.rt.jform.AgcJComboBox cbRefCountry; public com.sssw.rt.jform.AgcJTextField fldSpeedDial; public com.sssw.rt.jform.AgcJLabel lblSpeedDial; public com.sssw.rt.jform.AgcJComboBox cbCustomerNote; public javax.swing.ButtonGroup TransmitNationalSales = new javax.swing.ButtonGroup(); public com.sssw.rt.jform.AgcJRadioButton rbTransmitNationalSalesNo; public com.sssw.rt.jform.AgcJRadioButton rbTransmitNationalSalesYes; public javax.swing.ButtonGroup TransmitJSASales = new javax.swing.ButtonGroup(); public com.sssw.rt.jform.AgcJRadioButton rbTransmitJSASalesNo; public com.sssw.rt.jform.AgcJRadioButton rbTransmitJSASalesYes; public com.sssw.rt.jform.AgcJLabel lblTransmitNationalSales; public com.sssw.rt.jform.AgcJLabel lblTransmitJSASales; public com.sssw.rt.jform.AgcJLabel lblLang; public com.sssw.rt.jform.AgcJComboBox cbLangPref; public com.sssw.rt.jform.AgcJLabel lblCustomerNum; public com.sssw.rt.jform.AgcJComboBox cbStoreCategory; public com.sssw.rt.jform.AgcJLabel lblStoreCategory; public com.sssw.rt.form.AgcRectangle rectTransmitSection; public com.sssw.rt.jform.AgcJDateField fldSecTaxExemptExpDate; public com.sssw.rt.jform.AgcJDateField fldPriTaxExemptExpDate; public com.sssw.rt.form.AgcData dsoGeneric; public com.sssw.rt.jform.AgcJLabel lblDistanceUnits; public com.sssw.rt.jform.AgcJLabel lblTravelTimeUnits; public com.sssw.rt.jform.AgcJComboBox cbDeliverFlg; public com.sssw.rt.jform.AgcJTextField fldDeliveryCharge; public com.sssw.rt.jform.AgcJTextField fldMinSalesFreeDel; public com.sssw.rt.jform.AgcJTextField fldAmount; public com.sssw.rt.jform.AgcJTextField fldDistanceToCust; public com.sssw.rt.jform.AgcJTextField fldTravelTimeToCust; public com.sssw.rt.jform.AgcJTextField fldInvDiscount; public com.sssw.rt.jform.AgcJTextField fldNoAdditionalInvCopies; public com.sssw.rt.jform.AgcJLabel lblModifiedEmplInv; public com.sssw.rt.jform.AgcJLabel lblMinSalesFreeDel; public com.sssw.rt.jform.AgcJLabel lblDeliveryCharge; public com.sssw.rt.jform.AgcJLabel lblDistanceToCust; public com.sssw.rt.jform.AgcJLabel lblTravelTimeToCust; public com.sssw.rt.jform.AgcJComboBox cbDeliveryPriority; public com.sssw.rt.jform.AgcJLabel lblDeliveryPriority; public com.sssw.rt.jform.AgcJLabel lblDeliveryRoute; public com.sssw.rt.jform.AgcJComboBox cbDeliveryRoute; public com.sssw.rt.jform.AgcJLabel lblDeliveryFlag; public com.sssw.rt.jform.AgcJLabel lblInvFlag; public com.sssw.rt.jform.AgcJLabel lblDiscountPerc; public com.sssw.rt.jform.AgcJComboBox cbInvFlag; public com.sssw.rt.form.AgcRectangle recDeliveryInformation; public com.sssw.rt.jform.AgcJComboBox cbType; public com.sssw.rt.jform.AgcJComboBox cbFlag; public com.sssw.rt.jform.AgcJLabel lblType; public com.sssw.rt.jform.AgcJLabel lblAmount; public com.sssw.rt.jform.AgcJLabel lblFlag; public com.sssw.rt.form.AgcRectangle recInvoiceSurcharge; public com.sssw.rt.jform.AgcJCheckBox ckAllowSpecialOrders; public com.sssw.rt.jform.AgcJCheckBox ckAllowBackorders; public com.sssw.rt.jform.AgcJCheckBox ckPrintBalance; public com.sssw.rt.jform.AgcJCheckBox ckPrintCatalogNotes; public com.sssw.rt.jform.AgcJCheckBox ckPrintMSDS; public com.sssw.rt.jform.AgcJLabel lblPrintMSDS; public com.sssw.rt.jform.AgcJLabel lblPrintCatalogNotes; public com.sssw.rt.jform.AgcJLabel lblAllowSpecialOrders; public com.sssw.rt.jform.AgcJLabel lblAllowBackorders; public com.sssw.rt.jform.AgcJLabel lblPrintBalance; public com.sssw.rt.jform.AgcJLabel lblExtraInvoiceCopies; public com.sssw.rt.jform.AgcJLabel lblExemptEnviroChanges; public com.sssw.rt.jform.AgcJCheckBox ckExemptEnvCharges; public com.sssw.rt.form.AgcRectangle recMiscellaneous; public com.sssw.rt.form.AgcRectangle recPriceControl; public com.sssw.rt.jform.AgcJLabel lblPriceLocked; public com.sssw.rt.jform.AgcJCheckBox ckPriceLocked; public com.sssw.rt.jform.AgcJLabel lblMaxDiscount; public com.sssw.rt.jform.AgcJTextField fldPriceMaxDiscount; public com.sssw.rt.jform.AgcJTextField fldSecTaxExemptNumber; public com.sssw.rt.jform.AgcJComboBox cbPriTaxStatus; public com.sssw.rt.jform.AgcJTextField fldPriTaxExemptNumber; public com.sssw.rt.jform.AgcJComboBox cbDeliveryTaxTable; public com.sssw.rt.jform.AgcJComboBox cbDefaultTaxTable; public com.sssw.rt.jform.AgcJLabel lblDefaultTaxTable; public com.sssw.rt.jform.AgcJLabel lblDeliveryTaxTable; public com.sssw.rt.jform.AgcJComboBox cbSecTaxStatus; public com.sssw.rt.jform.AgcJLabel lblPrimaryTaxStatus; public com.sssw.rt.jform.AgcJLabel lblTaxExemptNum; public com.sssw.rt.jform.AgcJLabel lblTaxExemptExpDate; public com.sssw.rt.form.AgcRectangle recPrimary; public com.sssw.rt.form.AgcRectangle recSecondary; public com.sssw.rt.form.AgcRectangle recInvoiceDisc; public com.sssw.rt.form.AgcRectangle recTaxInfo; public com.sssw.rt.form.AgcRectangle recServingStore; public javax.swing.JPanel tabCustomerPane0; public javax.swing.JPanel tabCustomerPane1; public javax.swing.JPanel tabCustomerPane2; public javax.swing.JPanel tabCustomerPane3; public javax.swing.JPanel tabCustomerPane4; public javax.swing.JPanel tabCustomerPane5; public javax.swing.JPanel tabCustomerPane6; public javax.swing.JPanel tabCustomerPane7; public javax.swing.JPanel tabCustomerPane8; public javax.swing.JPanel tabCustomerPane9; public javax.swing.JPanel tabCustomerPane10; public javax.swing.JPanel tabCustomerPane11; public javax.swing.JPanel tabCustomerPane12; public javax.swing.JPanel tabCustomerPane13; public com.sssw.rt.jform.AgcJLabel lblCustomerSearch; public com.sssw.rt.jform.AgcJLabel lblCMHeader; public com.sssw.rt.form.AgcRectangle Rectangle1; public com.sssw.rt.jform.AgcJLabel lblServingStore; public com.sssw.rt.jform.AgcJComboBox cbServingStore; public com.sssw.rt.jform.AgcJLabel lblPriorityPlus; public com.sssw.rt.jform.AgcJCheckBox ckPriorityPlus; public com.sssw.rt.jform.AgcJLabel lblPriorityPlusLock; public com.sssw.rt.jform.AgcJCheckBox ckPriorityPlusLock; public com.sssw.rt.jform.AgcJLabel lblShowPriorityPlus; public com.sssw.rt.jform.AgcJLabel lblTaxNumber; public com.sssw.rt.jform.AgcJTextField fldPrimaryTaxNumber; public com.sssw.rt.jform.AgcJTextField fldSecondaryTaxNumber; public com.sssw.rt.jform.AgcJLabel lblIbsAccount; public com.sssw.rt.jform.AgcJCheckBox ckIbsAccount; public com.sssw.rt.form.AgcRectangle recDirectShip; public com.sssw.rt.jform.AgcJLabel lblDirectShip; public com.sssw.rt.jform.AgcJCheckBox ckDirectShip; public com.sssw.rt.jform.AgcJLabel lblAllowOnlyCoreSales; public com.sssw.rt.jform.AgcJCheckBox ckAllowOnlyCoreSales; public com.sssw.rt.jform.AgcJLabel lblCFDIName; public com.sssw.rt.jform.AgcJTextField fldCFDIName; public com.sssw.rt.jform.AgcJLabel lblDNSCustomer; public com.sssw.rt.jform.AgcJCheckBox ckDNSCustomer; public com.sssw.rt.jform.AgcJLabel lblDNSCustomerLock; public com.sssw.rt.jform.AgcJCheckBox ckDNSCustomerLock; //Added for NAPA Mexico project public com.sssw.rt.jform.AgcJLabel lblUsoCFDI; public com.sssw.rt.jform.AgcJComboBox cbUsoCFDI; //Added for Email Invoices public com.sssw.rt.jform.AgcJLabel lblEmailInvoices; public com.sssw.rt.jform.AgcJTextField fldEmailInvoices; //Added for eSignature public com.sssw.rt.jform.AgcJLabel lblPromptForESignatureOnAllInvoices; public com.sssw.rt.jform.AgcJCheckBox ckPromptForESignatureOnAllInvoices; //Added for Corporation type public com.sssw.rt.jform.AgcJLabel lblCorporationType; public com.sssw.rt.jform.AgcJComboBox cbCorporationType; /** record locale dependent components*/ private JComponent [] m_recordLocaleComps; private TamsCacheMgr m_cacheMgr; /** Current record locale */ private Locale m_recordLocale = ClientApplicationContext.getClientApplicationContext().getCurrentLocale(); private boolean m_countryCBInitializing = false; private boolean m_stateCBInitializing = false; private boolean m_cancelledFromNew = false; //tempororary until FM fixed private boolean m_tabChange = false;//true, user switch tab private boolean m_delete = false; //true, delete button is clicked int m_oldTabIndex = -1; //The index before change to another tab private boolean m_addNew = false; //fNewFromSearch() method is called because user type in a nonexisting record in the search field and want to add it to db private boolean m_New = false; private Integer m_SearchCustNum; //User type in a nonexisting record in the search field and want to add it to db //form loaded private boolean LOADED = false; //new customer record loading private boolean DATA_LOADING = false; /** used to print debugging information*/ private static Logger logger = Logger.getLogger(FrmCM_CustMaint.class); /** Used to determine whether to re-sync data when a customer's type is changed */ private boolean m_custNumChanged = false; /** Holders for newly generated customer numbers */ private Integer m_newAccountNum = null; private Integer m_newRetailNum = null; //Default Values /** Default country cd value that comes from the current store profile */ private String m_defaultCountryCd = null; /** Default state cd value that comes from the current store profile */ private String m_defaultStateCd = null; /** Default language cd value that comes from the current store profile */ private String m_defaultLanguageCd = null; //** Whether the store prints statements */ private boolean m_printStatements = false; /** Store Type from the Store Profile - will be validated before certain actions can take place */ private String m_storeType = null; /** Customer type, retail or regular" */ private String m_customerType = null; /**Vector contains all employee ID*/ private Vector m_empID_v = new Vector(); /** Instance of Form Master */ private TamsFormMaster FM; /** Navigation data used by the Form Master instance */ private FwoBufferedData navData; /** Advanced Search Object */ private TsoSearchCustomer advancedSearchObject; private boolean m_isNewRecord = false; private Object m_categoryId; //Tab constants /** Accounting Info */ private final int TAB_MAIN = 0; /** Invoicing Info */ private final int TAB_MAIN2 = 1; /** Accounts/Receivable Info */ private final int TAB_ARINFO = 2; /** Pickup GP % */ private final int TAB_PICKUP_GP = 3; /** Purchase Cards */ private final int TAB_PURCHASE_CARDS = 4; /** Blanket PO */ private final int TAB_BLANKET_PO = 5; /** Usual Pricing and Profiles */ private final int TAB_USUAL_PRICING_PROFILE = 6; /** Customer Pricing (custom, core, fixed, and installer/list) */ private final int TAB_PRICING = 7; /** Sales Summary */ private final int TAB_SALES_SUMMARY = 8; /** Customer Contacts */ private final int TAB_CONTACTS = 9; /** Customer Contacts */ private final int TAB_COMMENTS = 10; /** Misc Charges */ private final int TAB_MISC_CHARGES = 10; private final static String RETAIL_TYPE = "R"; /** index of the current tab selected */ private int currentTabIndex; String REGULAR = "Regular Account"; String RETAIL = "Retail Account"; private boolean navigateToTransmit = false; private boolean billingTypeChangedToCash = false; private boolean isEmployeeSaleCustomer = false; private boolean isBillingCash =false; public Integer MAX_LENGTH=2; //subform function ids private Integer m_functionIds[] = { TsoConstant.CM_CUSTOMER_MAINT, TsoConstant.CM_CUSTOMER_MAINT, TsoConstant.CM_AR_INFO, TsoConstant.CM_PICKUP_GP, TsoConstant.CM_PURCHASE_CARDS, TsoConstant.CM_BLANKET_PO, TsoConstant.CM_USUAL_PRICING_PROFILES, TsoConstant.CM_PRICING, TsoConstant.CM_SALES_SUMMARY, TsoConstant.CM_CONTACTS, TsoConstant.CM_COMMENTS, TsoConstant.CM_MISC_CHARGES, TsoConstant.CM_GOVT_CERTIFICATE, TsoConstant.CM_EMAIL_INFO }; /** list of all the subform names used to load the subform onto the selected tab. * They are in the same order as they appear on the tabs */ private String subFormNames[] = {"MAIN", "MAIN2", TsoConstant.FRM_CM_AR_INFO, TsoConstant.FRM_CM_PICKUP_GP, TsoConstant.FRM_CM_PURCHASE_CARDS, TsoConstant.FRM_CM_BLANKET_PO, TsoConstant.FRM_CM_USUAL_PRICING_PROFILES, TsoConstant.FRM_CM_PRICING, TsoConstant.FRM_CM_SALES_SUMMARY, TsoConstant.FRM_CM_CONTACTS, TsoConstant.FRM_CM_COMMENTS, TsoConstant.FRM_CM_MISC_CHARGES, TsoConstant.FRM_CM_GOVT_CERTIFICATE, TsoConstant.FRM_CM_EMAIL_INFO }; /** stores the current tab form so we can re-initialize it if the customer record changes */ private AgfForm currentTabForm = this; // form mode constants /** New button has been clicked */ private final int NEW = FwoFormMaster.NEW_MODE; /** Anytime not in new, view, or find mode */ private final int EDITING = FwoFormMaster.EDIT_MODE_EDITING; /** Anytime not in new, view, or find mode */ private final int NOT_EDITING = FwoFormMaster.EDIT_MODE_NOT_EDITING; /** Only if the user has View-only access */ private final int VIEW = FwoFormMaster.VIEW_MODE; /** The initial mode of the form */ private final int FIND = FwoFormMaster.FIND_MODE; private final int ARBRANCH_VIEW = 99; // Customer Number constants private final int MAX_REG_VER_CUSTNUM = 99999; private final int MIN_RET_CUSTNUM = 90000001; private final String INVOICE = "I"; private final String BOTH = "B"; private Sch_Tables TBL; private Sch_ARProfile ARPROFILE; private Sch_Customer CUST; private Sch_CustomerAR CUSTAR; private Sch_CustomerDelivery CUSTDEL; private Sch_StoreProfile SP; private TreeSet custInfoSet; private TreeSet custPricingSet; private TreeSet custDeleteSet; private HashMap custNumNameMap; private boolean m_priorityPlusChanged = false; private boolean m_dnsCustomerChanged = false; private byte iLocked = 10; private Integer refElectronicInvoiceVendorId = null; public FrmCM_CustMaint() { //==== 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("FrmCM_CustMaint"); this.setBounds(10,10,1016,663); // Initialize agcCommunicationDirectory agcCommunicationDirectory = new com.sssw.rt.form.AgcData(); agcCommunicationDirectory.setName("agcCommunicationDirectory"); agcCommunicationDirectory.setBounds(315,685,81,58); agcCommunicationDirectory.setExpressionCount(5); agcCommunicationDirectory.setExpression(0, 0, "ID", 0); agcCommunicationDirectory.setExpression(1, 1, "LOC", 1); agcCommunicationDirectory.setExpression(2, 2, "REF_COMMUNICATION_TYPE_ID", 2); agcCommunicationDirectory.setExpression(3, 3, "INVOICE_TO_CUSTOMER_ID", 3); agcCommunicationDirectory.setExpression(4, 4, "PROLINK_ACCOUNT_NUMBER", 4); // Initialize agcDsoGen agcDsoGen = new com.sssw.rt.form.AgcData(); agcDsoGen.setName("agcDsoGen"); agcDsoGen.setBounds(650,685,66,58); agcDsoGen.setDataSource("com.gpc.tams.dso.dsoGeneric"); // Initialize Label1 Label1 = new com.sssw.rt.jform.AgcJLabel(); Label1.setName("Label1"); Label1.setBounds(203,36,78,19); Label1.setText(""); Label1.setOpaque(false); Label1.setTextStyle(0); Label1.setForeground(Color.black); Label1.setTextShadowColor(Color.darkGray); Label1.setTextHighlightColor(Color.gray); Label1.setBackground(Color.lightGray); Label1.setHorizontalAlignment(SwingConstants.LEFT); Label1.setVerticalAlignment(SwingConstants.CENTER); Label1.setHorizontalTextPosition(SwingConstants.RIGHT); Label1.setVerticalTextPosition(SwingConstants.CENTER); Label1.setWordWrap(false); Label1.setFont(new Font("SansSerif", 1, 12)); // Initialize fldSearch fldSearch = new com.sssw.rt.jform.AgcJTextField(); fldSearch.setName("fldSearch"); fldSearch.setBounds(88,35,100,20); fldSearch.setToolTipText("Type in Number to Search On (you may use wildcards)"); fldSearch.setFont(new Font("SansSerif", 0, 12)); fldSearch.setHorizontalAlignment(2); fldSearch.setMargin(new Insets(1, 1, 1, 1)); fldSearch.setEditable(true); fldSearch.setForeground(Color.black); fldSearch.setBackground(Color.white); fldSearch.setMaxLength(AgcJTextField.NO_LIMIT); fldSearch.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldCustomerId fldCustomerId = new com.sssw.rt.jform.AgcJIntegerField(); fldCustomerId.setName("fldCustomerId"); fldCustomerId.setBounds(766,35,55,20); fldCustomerId.setVisible(false); fldCustomerId.setFont(new Font("SansSerif", 0, 12)); fldCustomerId.setHorizontalAlignment(2); fldCustomerId.setMargin(new Insets(1, 1, 1, 1)); fldCustomerId.setEditable(true); fldCustomerId.setForeground(Color.black); fldCustomerId.setBackground(Color.white); fldCustomerId.setDisplayPattern("######"); fldCustomerId.setMaxLength(AgcJTextField.NO_LIMIT); fldCustomerId.setMinLength(AgcJTextField.NO_LIMIT); // Initialize lblCustName lblCustName = new com.sssw.rt.jform.AgcJLabel(); lblCustName.setName("lblCustName"); lblCustName.setBounds(288,35,272,20); lblCustName.setText("Customer Name"); lblCustName.setOpaque(false); lblCustName.setTextStyle(0); lblCustName.setForeground(Color.black); lblCustName.setTextShadowColor(Color.darkGray); lblCustName.setTextHighlightColor(Color.gray); lblCustName.setBackground(Color.lightGray); lblCustName.setHorizontalAlignment(SwingConstants.LEFT); lblCustName.setVerticalAlignment(SwingConstants.CENTER); lblCustName.setHorizontalTextPosition(SwingConstants.RIGHT); lblCustName.setVerticalTextPosition(SwingConstants.CENTER); lblCustName.setWordWrap(false); lblCustName.setFont(new Font("SansSerif", 1, 12)); // Initialize agcCustomerAR agcCustomerAR = new com.sssw.rt.form.AgcData(); agcCustomerAR.setName("agcCustomerAR"); agcCustomerAR.setBounds(397,680,73,58); agcCustomerAR.setExpressionCount(28); agcCustomerAR.setExpression(0, 5, "CUSTOMER_ID", 0); agcCustomerAR.setExpression(1, 6, "LOC", 1); agcCustomerAR.setExpression(2, 7, "LAST_COD_DATE", 2); agcCustomerAR.setExpression(3, 8, "NUM_OF_TIMES_COD", 3); agcCustomerAR.setExpression(4, 9, "LAST_PAYMENT_AMOUNT", 7); agcCustomerAR.setExpression(5, 10, "HIGHEST_AMOUNT_OWED", 8); agcCustomerAR.setExpression(6, 11, "PAST_DUE_HIGHEST_DAYS", 9); agcCustomerAR.setExpression(7, 12, "LAST_STMT_TOT_DUE", 10); agcCustomerAR.setExpression(8, 13, "LAST_STMT_CURRENT_BAL", 11); agcCustomerAR.setExpression(9, 14, "LAST_STMT_PERIOD1_BAL", 12); agcCustomerAR.setExpression(10, 15, "LAST_STMT_PERIOD2_BAL", 13); agcCustomerAR.setExpression(11, 16, "LAST_STMT_PERIOD3_BAL", 14); agcCustomerAR.setExpression(12, 17, "LAST_STMT_SVC_CHG", 15); agcCustomerAR.setExpression(13, 18, "LAST_STMT_FUTURE_DUE", 16); agcCustomerAR.setExpression(14, 19, "LAST_STMT_TOTAL_OWED", 17); agcCustomerAR.setExpression(15, 20, "CURRENT_BAL", 18); agcCustomerAR.setExpression(16, 21, "REF_STATEMENT_TYPE_ID", 6); agcCustomerAR.setExpression(17, 22, "AGE_CUSTOMER", 19); agcCustomerAR.setExpression(18, 23, "BAD_DEBT_ACCT", 20); agcCustomerAR.setExpression(19, 24, "COMBINED_STATEMENT", 21); agcCustomerAR.setExpression(20, 25, "EXTRA_STATEMENT_COPIES", 22); agcCustomerAR.setExpression(21, 26, "CREDIT_LIMIT", 23); agcCustomerAR.setExpression(22, 27, "STORE_RESPONSIBILITY", 24); agcCustomerAR.setExpression(23, 28, "ACCT_SUMMARY_DAYS", 25); agcCustomerAR.setExpression(24, 29, "INVOICE_COPY_DAYS", 26); agcCustomerAR.setExpression(25, 30, "AR_TERMS_ID", 27); agcCustomerAR.setExpression(26, 31, "LAST_MODIFIED_DATE", 4); agcCustomerAR.setExpression(27, 32, "MODIFIED_BY_EMPLOYEE_ID", 5); // Initialize agcAlternateCustomer agcAlternateCustomer = new com.sssw.rt.form.AgcData(); agcAlternateCustomer.setName("agcAlternateCustomer"); agcAlternateCustomer.setBounds(731,676,60,58); agcAlternateCustomer.setExpressionCount(4); agcAlternateCustomer.setExpression(0, 33, "ID", 0); agcAlternateCustomer.setExpression(1, 34, "LOC", 1); agcAlternateCustomer.setExpression(2, 35, "CUSTOMER_NUM", 2); agcAlternateCustomer.setExpression(3, 36, "REF_CUSTOMER_TYPE_CD", 3); // Initialize pbSearch pbSearch = new com.sssw.rt.jform.AgcJButton(); pbSearch.setName("pbSearch"); pbSearch.setBounds(578,33,80,25); pbSearch.setContentAreaFilled(true); pbSearch.setBorderPainted(true); pbSearch.setMargin(new Insets(1, 1, 1, 1)); pbSearch.setHorizontalAlignment(SwingConstants.CENTER); pbSearch.setVerticalAlignment(SwingConstants.CENTER); pbSearch.setHorizontalTextPosition(SwingConstants.RIGHT); pbSearch.setVerticalTextPosition(SwingConstants.CENTER); pbSearch.setText("Search"); pbSearch.setFont(new Font("SansSerif", 1, 12)); pbSearch.setForeground(Color.black); pbSearch.setBackground(Color.lightGray); // Initialize agcCustomerDelivery agcCustomerDelivery = new com.sssw.rt.form.AgcData(); agcCustomerDelivery.setName("agcCustomerDelivery"); agcCustomerDelivery.setBounds(477,680,73,58); agcCustomerDelivery.setExpressionCount(11); agcCustomerDelivery.setExpression(0, 37, "CUSTOMER_ID", 0); agcCustomerDelivery.setExpression(1, 38, "LOC", 1); agcCustomerDelivery.setExpression(2, 39, "DELIVERY_REF_OPTION_CD", 2); agcCustomerDelivery.setExpression(3, 40, "DELIVERY_ROUTE_CD", 3); agcCustomerDelivery.setExpression(4, 41, "DELIVERY_PRIORITY_ID", 4); agcCustomerDelivery.setExpression(5, 42, "TRAVEL_TIME_CUSTOMER", 5); agcCustomerDelivery.setExpression(6, 43, "DISTANCE_TO_CUSTOMER", 6); agcCustomerDelivery.setExpression(7, 44, "MIN_AMT_FREE_DELIVERY", 7); agcCustomerDelivery.setExpression(8, 45, "DELIVERY_CHARGE", 8); agcCustomerDelivery.setExpression(9, 46, "LAST_MODIFIED_DATE", 9); agcCustomerDelivery.setExpression(10, 47, "MODIFIED_BY_EMPLOYEE_ID", 10); // Initialize agcCustomer agcCustomer = new com.sssw.rt.form.AgcData(); agcCustomer.setName("agcCustomer"); agcCustomer.setBounds(557,680,75,58); agcCustomer.setExpressionCount(76); agcCustomer.setExpression(0, 48, "ID", 0); agcCustomer.setExpression(1, 49, "LOC", 1); agcCustomer.setExpression(2, 50, "CUSTOMER_NUM", 2); agcCustomer.setExpression(3, 51, "ALPHA_KEY", 3); agcCustomer.setExpression(4, 52, "NAME", 4); agcCustomer.setExpression(5, 53, "ADDRESS1", 5); agcCustomer.setExpression(6, 54, "ADDRESS2", 6); agcCustomer.setExpression(7, 55, "CITY", 7); agcCustomer.setExpression(8, 56, "REF_STATE_CD", 8); agcCustomer.setExpression(9, 57, "POSTAL_CODE", 9); agcCustomer.setExpression(10, 58, "REF_COUNTRY_CD", 10); agcCustomer.setExpression(11, 59, "PHONE", 11); agcCustomer.setExpression(12, 60, "EXTENSION", 12); agcCustomer.setExpression(13, 61, "FAX_NUMBER", 13); agcCustomer.setExpression(14, 62, "EMAIL", 14); agcCustomer.setExpression(15, 63, "REF_NAPA_CUSTOMER_CATEGORY_ID", 15); agcCustomer.setExpression(16, 64, "CUSTOMER_NOTE_ID", 16); agcCustomer.setExpression(17, 65, "ACCOUNT_ESTABLISH_DATE", 17); agcCustomer.setExpression(18, 66, "REF_LANGUAGE_CD", 18); agcCustomer.setExpression(19, 67, "REF_BILLING_TYPE_CD", 19); agcCustomer.setExpression(20, 68, "SALESMAN_EMPLOYEE_ID", 20); agcCustomer.setExpression(21, 69, "TRANSMIT_JSA_SALES", 21); agcCustomer.setExpression(22, 70, "TRANSMIT_NATIONAL_SALES", 22); agcCustomer.setExpression(23, 71, "USUAL_REF_PRICE_SHEET_CD", 23); agcCustomer.setExpression(24, 72, "USUAL_PRICE_MARKUP_PERCENT", 24); agcCustomer.setExpression(25, 73, "USUAL_PRICE_REF_CURRENCY_ROUNDING_CD", 25); agcCustomer.setExpression(26, 74, "STORE_CATEGORY_ID", 26); agcCustomer.setExpression(27, 75, "LAST_SALE_DATE", 27); agcCustomer.setExpression(28, 76, "PRINT_MSDS_FOR_CUSTOMER", 28); agcCustomer.setExpression(29, 77, "PRINT_CATALOG_NOTES_ON_INVOICE", 29); agcCustomer.setExpression(30, 78, "ALLOW_BACKORDERS", 30); agcCustomer.setExpression(31, 79, "PRINT_BALANCE_ON_INV", 31); agcCustomer.setExpression(32, 80, "ALLOW_SPECIAL_ORDERS", 32); agcCustomer.setExpression(33, 81, "MISC_INV_DISCOUNT_REF_OPTION_CD", 33); agcCustomer.setExpression(34, 82, "EXTRA_INV_COPIES", 34); agcCustomer.setExpression(35, 83, "ALTERNATE_CORE_CUSTOMER_ID", 35); agcCustomer.setExpression(36, 84, "TAX_STATUS_PRIMARY_REF_OPTION_CD", 36); agcCustomer.setExpression(37, 85, "TAX_STATUS_SECONDARY_REF_OPTION_CD", 37); agcCustomer.setExpression(38, 86, "DELIVERED_TAX_TABLE_ID", 38); agcCustomer.setExpression(39, 87, "DEFAULT_TAX_TABLE_ID", 39); agcCustomer.setExpression(40, 88, "MIN_AMT_FOR_PO", 40); agcCustomer.setExpression(41, 89, "SALES_ID_NUM", 41); agcCustomer.setExpression(42, 90, "MONTHLY_SALES_POTENTIAL", 42); agcCustomer.setExpression(43, 91, "LAST_MODIFIED_DATE", 43); agcCustomer.setExpression(44, 92, "CHECK_FOR_MISC_CHG_EXEMPTIONS", 44); agcCustomer.setExpression(45, 93, "MODIFIED_BY_EMPLOYEE_ID", 45); agcCustomer.setExpression(46, 94, "ACTIVE_ACCOUNT", 46); agcCustomer.setExpression(47, 95, "REF_CUSTOMER_TYPE_CD", 47); agcCustomer.setExpression(48, 96, "WEB_ADDRESS", 48); agcCustomer.setExpression(49, 97, "SURCHARGE_REF_OPTION_CD", 49); agcCustomer.setExpression(50, 98, "REF_SURCHARGE_TYPE_CD", 50); agcCustomer.setExpression(51, 99, "SURCHARGE_AMOUNT", 51); agcCustomer.setExpression(52, 100, "TAX_EXEMPT_NUM_SECONDARY", 52); agcCustomer.setExpression(53, 101, "TAX_EXEMPT_SECONDARY_EXP_DATE", 53); agcCustomer.setExpression(54, 102, "TAX_EXEMPT_NUM_PRIMARY", 54); agcCustomer.setExpression(55, 103, "TAX_EXEMPT_PRIMARY_EXP_DATE", 55); agcCustomer.setExpression(56, 104, "ADDRESS3", 56); agcCustomer.setExpression(57, 105, "ADDRESS4", 57); agcCustomer.setExpression(58, 106, "SPEED_DIAL", 58); agcCustomer.setExpression(59, 107, "AUTHORIZED_BUYERS_ONLY", 59); agcCustomer.setExpression(60, 108, "CUSTOMER_TYPICALLY_PRESENT_DURING_INVOICING", 60); agcCustomer.setExpression(61, 109, "MISC_INV_DISC_PERCENT", 61); agcCustomerUserDefinedField = new com.sssw.rt.form.AgcData(); agcCustomerUserDefinedField.setName("agcCustomerUserDefinedField"); agcCustomerUserDefinedField.setBounds(607,680,75,58); agcCustomerUserDefinedField.setExpressionCount(6); agcCustomerUserDefinedField.setExpression(0, 133, "CUSTOMER_ID", 0); agcCustomerUserDefinedField.setExpression(1, 134, "LOC", 1); agcCustomerUserDefinedField.setExpression(2, 135, "USER_DEFINED_FIELD_NAME_ID", 2); agcCustomerUserDefinedField.setExpression(3, 136, "TEXT", 3); agcCustomerUserDefinedField.setExpression(4, 137, "LAST_MODIFIED_DATE", 4); agcCustomerUserDefinedField.setExpression(5, 138, "MODIFIED_BY_EMPLOYEE_ID", 5); agcCustomer.setExpression(62, 139, "PRIORITY_PLUS", 62); agcCustomer.setExpression(63, 140, "PRIMARY_TAX_IDENTIFIER", 63); agcCustomer.setExpression(64, 141, "SECONDARY_TAX_IDENTIFIER", 64); agcCustomer.setExpression(65, 142, "IBS_ACCOUNT", 65); agcCustomer.setExpression(66, 143, "DIRECT_SHIPMENT_ELIGIBLE", 66); agcCustomer.setExpression(67, 144, "DEFAULT_REF_ELECTRONIC_INVOICE_TYPE_CD", 67); agcCustomer.setExpression(68, 145, "ALLOW_ONLY_CORE_SALES", 68); agcCustomer.setExpression(69, 146, "CFDI_NAME", 69); agcCustomer.setExpression(70, 147, "DNS_CUSTOMER", 70); agcCustomer.setExpression(71, 148, "INVOICE_EMAIL_ADDRESS", 71); agcCustomer.setExpression(72, 149, "CEPDI_CORPORATION_TYPE", 72); agcCustomer.setExpression(73, 150, "PRICE_LOCKED", 73); agcCustomer.setExpression(74, 151, "MAX_DISCOUNT_PCT", 74); agcCustomer.setExpression(75, 152, "CAPTURE_ESIGNATURE_ON_INVOICE", 75); // Initialize tabCustomer tabCustomer = new com.sssw.rt.jform.AgcJTabbedPane(); // Initialize tab pane 0 tabCustomerPane0 = new com.sssw.rt.form.PvBaseContainer(); tabCustomerPane0.setLayout(null); tabCustomerPane0.setBackground(Color.white); tabCustomer.addTab("Account Info", tabCustomerPane0); // Initialize tab pane 1 tabCustomerPane1 = new com.sssw.rt.form.PvBaseContainer(); tabCustomerPane1.setLayout(null); tabCustomerPane1.setBackground(Color.white); tabCustomer.addTab("Invoicing Info", tabCustomerPane1); // Initialize tab pane 2 tabCustomerPane2 = new com.sssw.rt.form.PvBaseContainer(); tabCustomerPane2.setLayout(null); tabCustomerPane2.setBackground(Color.white); tabCustomer.addTab("A/R Info", tabCustomerPane2); // Initialize tab pane 3 tabCustomerPane3 = new com.sssw.rt.form.PvBaseContainer(); tabCustomerPane3.setLayout(null); tabCustomerPane3.setBackground(Color.white); tabCustomer.addTab("Pickup G/P%", tabCustomerPane3); // Initialize tab pane 4 tabCustomerPane4 = new com.sssw.rt.form.PvBaseContainer(); tabCustomerPane4.setLayout(null); tabCustomerPane4.setBackground(Color.white); tabCustomer.addTab("Purchase Cards", tabCustomerPane4); // Initialize tab pane 5 tabCustomerPane5 = new com.sssw.rt.form.PvBaseContainer(); tabCustomerPane5.setLayout(null); tabCustomerPane5.setBackground(Color.white); tabCustomer.addTab("Blanket PO", tabCustomerPane5); // Initialize tab pane 6 tabCustomerPane6 = new com.sssw.rt.form.PvBaseContainer(); tabCustomerPane6.setLayout(null); tabCustomerPane6.setBackground(Color.white); tabCustomer.addTab("Usual Pricing and Profiles", tabCustomerPane6); // Initialize tab pane 7 tabCustomerPane7 = new com.sssw.rt.form.PvBaseContainer(); tabCustomerPane7.setLayout(null); tabCustomerPane7.setBackground(Color.white); tabCustomer.addTab("Pricing", tabCustomerPane7); // Initialize tab pane 8 tabCustomerPane8 = new com.sssw.rt.form.PvBaseContainer(); tabCustomerPane8.setLayout(null); tabCustomerPane8.setBackground(Color.white); tabCustomer.addTab("Sales Summary", tabCustomerPane8); // Initialize tab pane 9 tabCustomerPane9 = new com.sssw.rt.form.PvBaseContainer(); tabCustomerPane9.setLayout(null); tabCustomerPane9.setBackground(Color.white); tabCustomer.addTab("Contacts", tabCustomerPane9); // Initialize tab pane 10 tabCustomerPane10 = new com.sssw.rt.form.PvBaseContainer(); tabCustomerPane10.setLayout(null); tabCustomerPane10.setBackground(Color.white); tabCustomer.addTab("Comments", tabCustomerPane10); // Initialize tab pane 11 tabCustomerPane11 = new com.sssw.rt.form.PvBaseContainer(); tabCustomerPane11.setLayout(null); tabCustomerPane11.setBackground(Color.white); tabCustomer.addTab("Misc. Chgs", tabCustomerPane11); // Initialize tab pane 12 tabCustomerPane12 = new com.sssw.rt.form.PvBaseContainer(); tabCustomerPane12.setLayout(null); tabCustomerPane12.setBackground(Color.white); tabCustomer.addTab("Government Certificate", tabCustomerPane12); //Intialiaze tab pan 13 tabCustomerPane13 = new com.sssw.rt.form.PvBaseContainer(); tabCustomerPane13.setLayout(null); tabCustomerPane13.setBackground(Color.white); tabCustomer.addTab("Email Info", tabCustomerPane13); tabCustomer.setColors(Color.white, Color.black, Color.black, Color.black, AgoColorManager.getColor(255, 204, 0)); tabCustomer.setContentBorderInsets(new Insets(1, 1, 2, 2)); tabCustomer.setFont(new Font("SansSerif", 1, 12)); tabCustomer.setName("tabCustomer"); tabCustomer.setBounds(6,62,1010,600); // Initialize ckCustomerPresent ckCustomerPresent = new com.sssw.rt.jform.AgcJCheckBox(); ckCustomerPresent.setName("ckCustomerPresent"); ckCustomerPresent.setBounds(553,281,13,20); ckCustomerPresent.setContentAreaFilled(false); ckCustomerPresent.setBorderPainted(false); ckCustomerPresent.setText(" "); ckCustomerPresent.setCheckedValue("Y"); ckCustomerPresent.setUncheckedValue("N"); ckCustomerPresent.setFont(new Font("SansSerif", 0, 12)); ckCustomerPresent.setForeground(Color.black); ckCustomerPresent.setBackground(Color.lightGray); // Initialize lblCustomerPresent lblCustomerPresent = new com.sssw.rt.jform.AgcJLabel(); lblCustomerPresent.setName("lblCustomerPresent"); lblCustomerPresent.setBounds(297,281,247,20); lblCustomerPresent.setText("Customer Present? Default"); lblCustomerPresent.setOpaque(false); lblCustomerPresent.setTextStyle(0); lblCustomerPresent.setForeground(Color.black); lblCustomerPresent.setTextShadowColor(Color.darkGray); lblCustomerPresent.setTextHighlightColor(Color.gray); lblCustomerPresent.setBackground(Color.lightGray); lblCustomerPresent.setHorizontalAlignment(SwingConstants.RIGHT); lblCustomerPresent.setVerticalAlignment(SwingConstants.CENTER); lblCustomerPresent.setHorizontalTextPosition(SwingConstants.RIGHT); lblCustomerPresent.setVerticalTextPosition(SwingConstants.CENTER); lblCustomerPresent.setWordWrap(false); lblCustomerPresent.setFont(new Font("SansSerif", 1, 12)); // Initialize lblBillingTypeVerify lblBillingTypeVerify = new com.sssw.rt.jform.AgcJLabel(); lblBillingTypeVerify.setName("lblBillingTypeVerify"); lblBillingTypeVerify.setBounds(648,259,355,20); lblBillingTypeVerify.setText("Billing Type cannot be changed until the Account is Verified."); lblBillingTypeVerify.setOpaque(false); lblBillingTypeVerify.setTextStyle(0); lblBillingTypeVerify.setForeground(Color.black); lblBillingTypeVerify.setTextShadowColor(Color.darkGray); lblBillingTypeVerify.setTextHighlightColor(Color.gray); lblBillingTypeVerify.setBackground(Color.lightGray); lblBillingTypeVerify.setHorizontalAlignment(SwingConstants.CENTER); lblBillingTypeVerify.setVerticalAlignment(SwingConstants.CENTER); lblBillingTypeVerify.setHorizontalTextPosition(SwingConstants.RIGHT); lblBillingTypeVerify.setVerticalTextPosition(SwingConstants.CENTER); lblBillingTypeVerify.setWordWrap(false); lblBillingTypeVerify.setFont(new Font("SansSerif", 0, 12)); // Initialize lblSecondaryTaxExemptNum lblSecondaryTaxExemptNum = new com.sssw.rt.jform.AgcJLabel(); lblSecondaryTaxExemptNum.setName("lblSecondaryTaxExemptNum"); lblSecondaryTaxExemptNum.setBounds(375,89,209,20); lblSecondaryTaxExemptNum.setVisible(false); lblSecondaryTaxExemptNum.setText("Tax Exempt Number"); lblSecondaryTaxExemptNum.setOpaque(false); lblSecondaryTaxExemptNum.setTextStyle(0); lblSecondaryTaxExemptNum.setForeground(Color.black); lblSecondaryTaxExemptNum.setTextShadowColor(Color.darkGray); lblSecondaryTaxExemptNum.setTextHighlightColor(Color.gray); lblSecondaryTaxExemptNum.setBackground(Color.lightGray); lblSecondaryTaxExemptNum.setHorizontalAlignment(SwingConstants.RIGHT); lblSecondaryTaxExemptNum.setVerticalAlignment(SwingConstants.CENTER); lblSecondaryTaxExemptNum.setHorizontalTextPosition(SwingConstants.RIGHT); lblSecondaryTaxExemptNum.setVerticalTextPosition(SwingConstants.CENTER); lblSecondaryTaxExemptNum.setWordWrap(false); lblSecondaryTaxExemptNum.setFont(new Font("SansSerif", 1, 12)); // Initialize fldSecTaxExemptExpDate fldSecTaxExemptExpDate = new com.sssw.rt.jform.AgcJDateField(); fldSecTaxExemptExpDate.setName("fldSecTaxExemptExpDate"); fldSecTaxExemptExpDate.setBounds(799,134,170,20); fldSecTaxExemptExpDate.setFont(new Font("SansSerif", 0, 12)); fldSecTaxExemptExpDate.setHorizontalAlignment(2); fldSecTaxExemptExpDate.setMargin(new Insets(1, 1, 1, 1)); fldSecTaxExemptExpDate.setEditable(true); fldSecTaxExemptExpDate.setForeground(Color.black); fldSecTaxExemptExpDate.setBackground(Color.white); fldSecTaxExemptExpDate.setMaxLength(AgcJTextField.NO_LIMIT); fldSecTaxExemptExpDate.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldPriTaxExemptExpDate fldPriTaxExemptExpDate = new com.sssw.rt.jform.AgcJDateField(); fldPriTaxExemptExpDate.setName("fldPriTaxExemptExpDate"); fldPriTaxExemptExpDate.setBounds(599,135,170,20); fldPriTaxExemptExpDate.setFont(new Font("SansSerif", 0, 12)); fldPriTaxExemptExpDate.setHorizontalAlignment(2); fldPriTaxExemptExpDate.setMargin(new Insets(1, 1, 1, 1)); fldPriTaxExemptExpDate.setEditable(true); fldPriTaxExemptExpDate.setForeground(Color.black); fldPriTaxExemptExpDate.setBackground(Color.white); fldPriTaxExemptExpDate.setMaxLength(AgcJTextField.NO_LIMIT); fldPriTaxExemptExpDate.setMinLength(AgcJTextField.NO_LIMIT); // Initialize dsoGeneric dsoGeneric = new com.sssw.rt.form.AgcData(); dsoGeneric.setName("dsoGeneric"); dsoGeneric.setBounds(652,521,64,58); dsoGeneric.setDataSource("com.gpc.tams.dso.dsoGeneric"); // Initialize lblDistanceUnits lblDistanceUnits = new com.sssw.rt.jform.AgcJLabel(); lblDistanceUnits.setName("lblDistanceUnits"); lblDistanceUnits.setBounds(945,310,47,20); lblDistanceUnits.setText("Miles"); lblDistanceUnits.setOpaque(false); lblDistanceUnits.setTextStyle(0); lblDistanceUnits.setForeground(Color.black); lblDistanceUnits.setTextShadowColor(Color.darkGray); lblDistanceUnits.setTextHighlightColor(Color.gray); lblDistanceUnits.setBackground(Color.lightGray); lblDistanceUnits.setHorizontalAlignment(SwingConstants.LEFT); lblDistanceUnits.setVerticalAlignment(SwingConstants.CENTER); lblDistanceUnits.setHorizontalTextPosition(SwingConstants.RIGHT); lblDistanceUnits.setVerticalTextPosition(SwingConstants.CENTER); lblDistanceUnits.setWordWrap(false); lblDistanceUnits.setFont(new Font("SansSerif", 1, 12)); // Initialize lblTravelTimeUnits lblTravelTimeUnits = new com.sssw.rt.jform.AgcJLabel(); lblTravelTimeUnits.setName("lblTravelTimeUnits"); lblTravelTimeUnits.setBounds(945,282,47,20); lblTravelTimeUnits.setText("Min."); lblTravelTimeUnits.setOpaque(false); lblTravelTimeUnits.setTextStyle(0); lblTravelTimeUnits.setForeground(Color.black); lblTravelTimeUnits.setTextShadowColor(Color.darkGray); lblTravelTimeUnits.setTextHighlightColor(Color.gray); lblTravelTimeUnits.setBackground(Color.lightGray); lblTravelTimeUnits.setHorizontalAlignment(SwingConstants.LEFT); lblTravelTimeUnits.setVerticalAlignment(SwingConstants.CENTER); lblTravelTimeUnits.setHorizontalTextPosition(SwingConstants.RIGHT); lblTravelTimeUnits.setVerticalTextPosition(SwingConstants.CENTER); lblTravelTimeUnits.setWordWrap(false); lblTravelTimeUnits.setFont(new Font("SansSerif", 1, 12)); // Initialize cbDeliverFlg cbDeliverFlg = new com.sssw.rt.jform.AgcJComboBox(); cbDeliverFlg.setName("cbDeliverFlg"); cbDeliverFlg.setBounds(853,198,110,20); cbDeliverFlg.setEditable((boolean)false); cbDeliverFlg.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbDeliverFlgModel = new DefaultComboBoxModel(); cbDeliverFlg.setModel(cbDeliverFlgModel); // Initialize fldDeliveryCharge fldDeliveryCharge = new com.sssw.rt.jform.AgcJTextField(); fldDeliveryCharge.setName("fldDeliveryCharge"); fldDeliveryCharge.setBounds(853,366,110,20); fldDeliveryCharge.setFont(new Font("SansSerif", 0, 12)); fldDeliveryCharge.setHorizontalAlignment(4); fldDeliveryCharge.setMargin(new Insets(1, 1, 1, 1)); fldDeliveryCharge.setEditable(true); fldDeliveryCharge.setForeground(Color.black); fldDeliveryCharge.setBackground(Color.white); fldDeliveryCharge.setMaxLength(AgcJTextField.NO_LIMIT); fldDeliveryCharge.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldMinSalesFreeDel fldMinSalesFreeDel = new com.sssw.rt.jform.AgcJTextField(); fldMinSalesFreeDel.setName("fldMinSalesFreeDel"); fldMinSalesFreeDel.setBounds(853,338,110,20); fldMinSalesFreeDel.setFont(new Font("SansSerif", 0, 12)); fldMinSalesFreeDel.setHorizontalAlignment(4); fldMinSalesFreeDel.setMargin(new Insets(1, 1, 1, 1)); fldMinSalesFreeDel.setEditable(true); fldMinSalesFreeDel.setForeground(Color.black); fldMinSalesFreeDel.setBackground(Color.white); fldMinSalesFreeDel.setMaxLength(AgcJTextField.NO_LIMIT); fldMinSalesFreeDel.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldAmount fldAmount = new com.sssw.rt.jform.AgcJTextField(); fldAmount.setName("fldAmount"); fldAmount.setBounds(471,368,95,20); fldAmount.setEnabled(false); fldAmount.setFont(new Font("SansSerif", 0, 12)); fldAmount.setHorizontalAlignment(4); fldAmount.setMargin(new Insets(1, 1, 1, 1)); fldAmount.setEditable(false); fldAmount.setForeground(Color.black); fldAmount.setBackground(Color.white); fldAmount.setMaxLength(AgcJTextField.NO_LIMIT); fldAmount.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldDistanceToCust fldDistanceToCust = new com.sssw.rt.jform.AgcJTextField(); fldDistanceToCust.setName("fldDistanceToCust"); fldDistanceToCust.setBounds(853,310,80,20); fldDistanceToCust.setFont(new Font("SansSerif", 0, 12)); fldDistanceToCust.setHorizontalAlignment(2); fldDistanceToCust.setMargin(new Insets(1, 1, 1, 1)); fldDistanceToCust.setEditable(true); fldDistanceToCust.setForeground(Color.black); fldDistanceToCust.setBackground(Color.white); fldDistanceToCust.setMaxLength(AgcJTextField.NO_LIMIT); fldDistanceToCust.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldTravelTimeToCust fldTravelTimeToCust = new com.sssw.rt.jform.AgcJTextField(); fldTravelTimeToCust.setName("fldTravelTimeToCust"); fldTravelTimeToCust.setBounds(853,282,80,20); fldTravelTimeToCust.setFont(new Font("SansSerif", 0, 12)); fldTravelTimeToCust.setHorizontalAlignment(2); fldTravelTimeToCust.setMargin(new Insets(1, 1, 1, 1)); fldTravelTimeToCust.setEditable(true); fldTravelTimeToCust.setForeground(Color.black); fldTravelTimeToCust.setBackground(Color.white); fldTravelTimeToCust.setMaxLength(AgcJTextField.NO_LIMIT); fldTravelTimeToCust.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldInvDiscount fldInvDiscount = new com.sssw.rt.jform.AgcJTextField(); fldInvDiscount.setName("fldInvDiscount"); fldInvDiscount.setBounds(418,432,95,20); fldInvDiscount.setFont(new Font("SansSerif", 0, 12)); fldInvDiscount.setHorizontalAlignment(2); fldInvDiscount.setMargin(new Insets(1, 1, 1, 1)); fldInvDiscount.setEditable(true); fldInvDiscount.setForeground(Color.black); fldInvDiscount.setBackground(Color.white); fldInvDiscount.setMaxLength(AgcJTextField.NO_LIMIT); fldInvDiscount.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldNoAdditionalInvCopies fldNoAdditionalInvCopies = new com.sssw.rt.jform.AgcJTextField(); fldNoAdditionalInvCopies.setName("fldNoAdditionalInvCopies"); fldNoAdditionalInvCopies.setBounds(261,281,28,20); fldNoAdditionalInvCopies.setFont(new Font("SansSerif", 0, 12)); fldNoAdditionalInvCopies.setHorizontalAlignment(2); fldNoAdditionalInvCopies.setMargin(new Insets(1, 1, 1, 1)); fldNoAdditionalInvCopies.setEditable(true); fldNoAdditionalInvCopies.setForeground(Color.black); fldNoAdditionalInvCopies.setBackground(Color.white); fldNoAdditionalInvCopies.setMaxLength(AgcJTextField.NO_LIMIT); fldNoAdditionalInvCopies.setMinLength(AgcJTextField.NO_LIMIT); // Initialize lblPromptForESignatureOnAllInvoices lblPromptForESignatureOnAllInvoices = new com.sssw.rt.jform.AgcJLabel(); lblPromptForESignatureOnAllInvoices.setName("lblPromptForESignatureOnAllInvoices"); lblPromptForESignatureOnAllInvoices.setBounds(17, 308, 233, 20); lblPromptForESignatureOnAllInvoices.setText("Email Invoices"); lblPromptForESignatureOnAllInvoices.setOpaque(false); lblPromptForESignatureOnAllInvoices.setTextStyle(0); lblPromptForESignatureOnAllInvoices.setForeground(Color.black); lblPromptForESignatureOnAllInvoices.setTextShadowColor(Color.darkGray); lblPromptForESignatureOnAllInvoices.setTextHighlightColor(Color.gray); lblPromptForESignatureOnAllInvoices.setBackground(Color.lightGray); lblPromptForESignatureOnAllInvoices.setHorizontalAlignment(SwingConstants.RIGHT); lblPromptForESignatureOnAllInvoices.setVerticalAlignment(SwingConstants.CENTER); lblPromptForESignatureOnAllInvoices.setHorizontalTextPosition(SwingConstants.RIGHT); lblPromptForESignatureOnAllInvoices.setVerticalTextPosition(SwingConstants.CENTER); lblPromptForESignatureOnAllInvoices.setWordWrap(false); lblPromptForESignatureOnAllInvoices.setFont(new Font("SansSerif", 1, 12)); // Initialize ckPromptForESignatureOnAllInvoices ckPromptForESignatureOnAllInvoices = new com.sssw.rt.jform.AgcJCheckBox(); ckPromptForESignatureOnAllInvoices.setName("ckPromptForESignatureOnAllInvoices"); ckPromptForESignatureOnAllInvoices.setBounds(261,308,13,20); ckPromptForESignatureOnAllInvoices.setContentAreaFilled(false); ckPromptForESignatureOnAllInvoices.setBorderPainted(false); ckPromptForESignatureOnAllInvoices.setText(" "); ckPromptForESignatureOnAllInvoices.setCheckedValue("Y"); ckPromptForESignatureOnAllInvoices.setUncheckedValue("N"); ckPromptForESignatureOnAllInvoices.setFont(new Font("SansSerif", 0, 12)); ckPromptForESignatureOnAllInvoices.setForeground(Color.black); ckPromptForESignatureOnAllInvoices.setBackground(Color.lightGray); // Initialize lblEmailInvoices lblEmailInvoices = new com.sssw.rt.jform.AgcJLabel(); lblEmailInvoices.setName("lblEmailInvoices"); lblEmailInvoices.setBounds(17, 308, 233, 20); lblEmailInvoices.setText("Email Invoices"); lblEmailInvoices.setOpaque(false); lblEmailInvoices.setTextStyle(0); lblEmailInvoices.setForeground(Color.black); lblEmailInvoices.setTextShadowColor(Color.darkGray); lblEmailInvoices.setTextHighlightColor(Color.gray); lblEmailInvoices.setBackground(Color.lightGray); lblEmailInvoices.setHorizontalAlignment(SwingConstants.RIGHT); lblEmailInvoices.setVerticalAlignment(SwingConstants.CENTER); lblEmailInvoices.setHorizontalTextPosition(SwingConstants.RIGHT); lblEmailInvoices.setVerticalTextPosition(SwingConstants.CENTER); lblEmailInvoices.setWordWrap(false); lblEmailInvoices.setFont(new Font("SansSerif", 1, 12)); // Initialize fldEmailInvoices fldEmailInvoices = new com.sssw.rt.jform.AgcJTextField(); fldEmailInvoices.setName("fldEmailInvoices"); fldEmailInvoices.setBounds(261, 308, 300, 20); fldEmailInvoices.setFont(new Font("SansSerif", 0, 12)); fldEmailInvoices.setHorizontalAlignment(2); fldEmailInvoices.setMargin(new Insets(1, 1, 1, 1)); fldEmailInvoices.setEditable(true); fldEmailInvoices.setForeground(Color.black); fldEmailInvoices.setBackground(Color.white); fldEmailInvoices.setMaxLength(AgcJTextField.NO_LIMIT); fldEmailInvoices.setMinLength(AgcJTextField.NO_LIMIT); // Initialize lblCorporationType lblCorporationType = new com.sssw.rt.jform.AgcJLabel(); lblCorporationType.setName("lblCorporationType"); lblCorporationType.setBounds(292, 288, 150, 20); lblCorporationType.setText("Corporation Type"); lblCorporationType.setOpaque(false); lblCorporationType.setTextStyle(0); lblCorporationType.setForeground(Color.black); lblCorporationType.setTextShadowColor(Color.darkGray); lblCorporationType.setTextHighlightColor(Color.gray); lblCorporationType.setBackground(Color.lightGray); lblCorporationType.setHorizontalAlignment(SwingConstants.RIGHT); lblCorporationType.setVerticalAlignment(SwingConstants.CENTER); lblCorporationType.setHorizontalTextPosition(SwingConstants.RIGHT); lblCorporationType.setVerticalTextPosition(SwingConstants.CENTER); lblCorporationType.setWordWrap(false); lblCorporationType.setFont(new Font("SansSerif", 1, 12)); // Initialize fldCorporationType cbCorporationType = new com.sssw.rt.jform.AgcJComboBox(); cbCorporationType.setName("cbCorporationType"); cbCorporationType.setBounds(451, 288,290,25); cbCorporationType.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbCorporationTypeModel = new DefaultComboBoxModel(); cbCorporationType.setModel(cbCorporationTypeModel); // Initialize lblModifiedEmplInv lblModifiedEmplInv = new com.sssw.rt.jform.AgcJLabel(); lblModifiedEmplInv.setName("lblModifiedEmplInv"); lblModifiedEmplInv.setBounds(7,541,416,20); lblModifiedEmplInv.setText(""); lblModifiedEmplInv.setOpaque(false); lblModifiedEmplInv.setTextStyle(0); lblModifiedEmplInv.setForeground(Color.black); lblModifiedEmplInv.setTextShadowColor(Color.darkGray); lblModifiedEmplInv.setTextHighlightColor(Color.gray); lblModifiedEmplInv.setBackground(Color.lightGray); lblModifiedEmplInv.setHorizontalAlignment(SwingConstants.LEFT); lblModifiedEmplInv.setVerticalAlignment(SwingConstants.CENTER); lblModifiedEmplInv.setHorizontalTextPosition(SwingConstants.RIGHT); lblModifiedEmplInv.setVerticalTextPosition(SwingConstants.CENTER); lblModifiedEmplInv.setWordWrap(false); lblModifiedEmplInv.setFont(new Font("SansSerif", 1, 12)); // Initialize lblMinSalesFreeDel lblMinSalesFreeDel = new com.sssw.rt.jform.AgcJLabel(); lblMinSalesFreeDel.setName("lblMinSalesFreeDel"); lblMinSalesFreeDel.setBounds(600,338,240,20); lblMinSalesFreeDel.setText("Minimum Sales for Free Delivery"); lblMinSalesFreeDel.setOpaque(false); lblMinSalesFreeDel.setTextStyle(0); lblMinSalesFreeDel.setForeground(Color.black); lblMinSalesFreeDel.setTextShadowColor(Color.darkGray); lblMinSalesFreeDel.setTextHighlightColor(Color.gray); lblMinSalesFreeDel.setBackground(Color.lightGray); lblMinSalesFreeDel.setHorizontalAlignment(SwingConstants.RIGHT); lblMinSalesFreeDel.setVerticalAlignment(SwingConstants.CENTER); lblMinSalesFreeDel.setHorizontalTextPosition(SwingConstants.RIGHT); lblMinSalesFreeDel.setVerticalTextPosition(SwingConstants.CENTER); lblMinSalesFreeDel.setWordWrap(false); lblMinSalesFreeDel.setFont(new Font("SansSerif", 1, 12)); // Initialize lblDeliveryCharge lblDeliveryCharge = new com.sssw.rt.jform.AgcJLabel(); lblDeliveryCharge.setName("lblDeliveryCharge"); lblDeliveryCharge.setBounds(600,366,240,20); lblDeliveryCharge.setText("Delivery Charge"); lblDeliveryCharge.setOpaque(false); lblDeliveryCharge.setTextStyle(0); lblDeliveryCharge.setForeground(Color.black); lblDeliveryCharge.setTextShadowColor(Color.darkGray); lblDeliveryCharge.setTextHighlightColor(Color.gray); lblDeliveryCharge.setBackground(Color.lightGray); lblDeliveryCharge.setHorizontalAlignment(SwingConstants.RIGHT); lblDeliveryCharge.setVerticalAlignment(SwingConstants.CENTER); lblDeliveryCharge.setHorizontalTextPosition(SwingConstants.RIGHT); lblDeliveryCharge.setVerticalTextPosition(SwingConstants.CENTER); lblDeliveryCharge.setWordWrap(false); lblDeliveryCharge.setFont(new Font("SansSerif", 1, 12)); // Initialize lblDistanceToCust lblDistanceToCust = new com.sssw.rt.jform.AgcJLabel(); lblDistanceToCust.setName("lblDistanceToCust"); lblDistanceToCust.setBounds(600,310,240,20); lblDistanceToCust.setText("Distance to Customer"); lblDistanceToCust.setOpaque(false); lblDistanceToCust.setTextStyle(0); lblDistanceToCust.setForeground(Color.black); lblDistanceToCust.setTextShadowColor(Color.darkGray); lblDistanceToCust.setTextHighlightColor(Color.gray); lblDistanceToCust.setBackground(Color.lightGray); lblDistanceToCust.setHorizontalAlignment(SwingConstants.RIGHT); lblDistanceToCust.setVerticalAlignment(SwingConstants.CENTER); lblDistanceToCust.setHorizontalTextPosition(SwingConstants.RIGHT); lblDistanceToCust.setVerticalTextPosition(SwingConstants.CENTER); lblDistanceToCust.setWordWrap(false); lblDistanceToCust.setFont(new Font("SansSerif", 1, 12)); // Initialize lblTravelTimeToCust lblTravelTimeToCust = new com.sssw.rt.jform.AgcJLabel(); lblTravelTimeToCust.setName("lblTravelTimeToCust"); lblTravelTimeToCust.setBounds(600,282,240,20); lblTravelTimeToCust.setText("Travel Time to Customer"); lblTravelTimeToCust.setOpaque(false); lblTravelTimeToCust.setTextStyle(0); lblTravelTimeToCust.setForeground(Color.black); lblTravelTimeToCust.setTextShadowColor(Color.darkGray); lblTravelTimeToCust.setTextHighlightColor(Color.gray); lblTravelTimeToCust.setBackground(Color.lightGray); lblTravelTimeToCust.setHorizontalAlignment(SwingConstants.RIGHT); lblTravelTimeToCust.setVerticalAlignment(SwingConstants.CENTER); lblTravelTimeToCust.setHorizontalTextPosition(SwingConstants.RIGHT); lblTravelTimeToCust.setVerticalTextPosition(SwingConstants.CENTER); lblTravelTimeToCust.setWordWrap(false); lblTravelTimeToCust.setFont(new Font("SansSerif", 1, 12)); // Initialize cbDeliveryPriority cbDeliveryPriority = new com.sssw.rt.jform.AgcJComboBox(); cbDeliveryPriority.setName("cbDeliveryPriority"); cbDeliveryPriority.setBounds(853,254,110,20); cbDeliveryPriority.setFont(new Font("SansSerif", 0, 12)); cbDeliveryPriority.setDisplayExpression(110); cbDeliveryPriority.setValueExpression(111); cbDeliveryPriority.setAutomaticQuery(true); // Initialize lblDeliveryPriority lblDeliveryPriority = new com.sssw.rt.jform.AgcJLabel(); lblDeliveryPriority.setName("lblDeliveryPriority"); lblDeliveryPriority.setBounds(600,254,240,20); lblDeliveryPriority.setText("Delivery Priority"); lblDeliveryPriority.setOpaque(false); lblDeliveryPriority.setTextStyle(0); lblDeliveryPriority.setForeground(Color.black); lblDeliveryPriority.setTextShadowColor(Color.darkGray); lblDeliveryPriority.setTextHighlightColor(Color.gray); lblDeliveryPriority.setBackground(Color.lightGray); lblDeliveryPriority.setHorizontalAlignment(SwingConstants.RIGHT); lblDeliveryPriority.setVerticalAlignment(SwingConstants.CENTER); lblDeliveryPriority.setHorizontalTextPosition(SwingConstants.RIGHT); lblDeliveryPriority.setVerticalTextPosition(SwingConstants.CENTER); lblDeliveryPriority.setWordWrap(false); lblDeliveryPriority.setFont(new Font("SansSerif", 1, 12)); // Initialize lblDeliveryRoute lblDeliveryRoute = new com.sssw.rt.jform.AgcJLabel(); lblDeliveryRoute.setName("lblDeliveryRoute"); lblDeliveryRoute.setBounds(600,226,240,20); lblDeliveryRoute.setText("Delivery Route"); lblDeliveryRoute.setOpaque(false); lblDeliveryRoute.setTextStyle(0); lblDeliveryRoute.setForeground(Color.black); lblDeliveryRoute.setTextShadowColor(Color.darkGray); lblDeliveryRoute.setTextHighlightColor(Color.gray); lblDeliveryRoute.setBackground(Color.lightGray); lblDeliveryRoute.setHorizontalAlignment(SwingConstants.RIGHT); lblDeliveryRoute.setVerticalAlignment(SwingConstants.CENTER); lblDeliveryRoute.setHorizontalTextPosition(SwingConstants.RIGHT); lblDeliveryRoute.setVerticalTextPosition(SwingConstants.CENTER); lblDeliveryRoute.setWordWrap(false); lblDeliveryRoute.setFont(new Font("SansSerif", 1, 12)); // Initialize cbDeliveryRoute cbDeliveryRoute = new com.sssw.rt.jform.AgcJComboBox(); cbDeliveryRoute.setName("cbDeliveryRoute"); cbDeliveryRoute.setBounds(853,226,110,20); cbDeliveryRoute.setFont(new Font("SansSerif", 0, 12)); cbDeliveryRoute.setDisplayExpression(112); cbDeliveryRoute.setValueExpression(113); cbDeliveryRoute.setAutomaticQuery(true); // Initialize lblDeliveryFlag lblDeliveryFlag = new com.sssw.rt.jform.AgcJLabel(); lblDeliveryFlag.setName("lblDeliveryFlag"); lblDeliveryFlag.setBounds(600,198,240,20); lblDeliveryFlag.setText("Delivery Flag"); lblDeliveryFlag.setOpaque(false); lblDeliveryFlag.setTextStyle(0); lblDeliveryFlag.setForeground(Color.black); lblDeliveryFlag.setTextShadowColor(Color.darkGray); lblDeliveryFlag.setTextHighlightColor(Color.gray); lblDeliveryFlag.setBackground(Color.lightGray); lblDeliveryFlag.setHorizontalAlignment(SwingConstants.RIGHT); lblDeliveryFlag.setVerticalAlignment(SwingConstants.CENTER); lblDeliveryFlag.setHorizontalTextPosition(SwingConstants.RIGHT); lblDeliveryFlag.setVerticalTextPosition(SwingConstants.CENTER); lblDeliveryFlag.setWordWrap(false); lblDeliveryFlag.setFont(new Font("SansSerif", 1, 12)); // Initialize lblInvFlag lblInvFlag = new com.sssw.rt.jform.AgcJLabel(); lblInvFlag.setName("lblInvFlag"); lblInvFlag.setBounds(81,432,67,20); lblInvFlag.setText("Flag"); lblInvFlag.setOpaque(false); lblInvFlag.setTextStyle(0); lblInvFlag.setForeground(Color.black); lblInvFlag.setTextShadowColor(Color.darkGray); lblInvFlag.setTextHighlightColor(Color.gray); lblInvFlag.setBackground(Color.lightGray); lblInvFlag.setHorizontalAlignment(SwingConstants.RIGHT); lblInvFlag.setVerticalAlignment(SwingConstants.CENTER); lblInvFlag.setHorizontalTextPosition(SwingConstants.RIGHT); lblInvFlag.setVerticalTextPosition(SwingConstants.CENTER); lblInvFlag.setWordWrap(false); lblInvFlag.setFont(new Font("SansSerif", 1, 12)); // Initialize lblDiscountPerc lblDiscountPerc = new com.sssw.rt.jform.AgcJLabel(); lblDiscountPerc.setName("lblDiscountPerc"); lblDiscountPerc.setBounds(296,432,110,20); lblDiscountPerc.setText("Discount %"); lblDiscountPerc.setOpaque(false); lblDiscountPerc.setTextStyle(0); lblDiscountPerc.setForeground(Color.black); lblDiscountPerc.setTextShadowColor(Color.darkGray); lblDiscountPerc.setTextHighlightColor(Color.gray); lblDiscountPerc.setBackground(Color.lightGray); lblDiscountPerc.setHorizontalAlignment(SwingConstants.RIGHT); lblDiscountPerc.setVerticalAlignment(SwingConstants.CENTER); lblDiscountPerc.setHorizontalTextPosition(SwingConstants.RIGHT); lblDiscountPerc.setVerticalTextPosition(SwingConstants.CENTER); lblDiscountPerc.setWordWrap(false); lblDiscountPerc.setFont(new Font("SansSerif", 1, 12)); // Initialize cbInvFlag cbInvFlag = new com.sssw.rt.jform.AgcJComboBox(); cbInvFlag.setName("cbInvFlag"); cbInvFlag.setBounds(160,432,105,20); cbInvFlag.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbInvFlagModel = new DefaultComboBoxModel(); cbInvFlag.setModel(cbInvFlagModel); // Initialize recDeliveryInformation recDeliveryInformation = new com.sssw.rt.form.AgcRectangle(); recDeliveryInformation.setName("recDeliveryInformation"); recDeliveryInformation.setBounds(587,182,407,218); recDeliveryInformation.setColor(Color.lightGray); recDeliveryInformation.setBorderStyle(4); recDeliveryInformation.setText("Delivery Information"); recDeliveryInformation.setFont(new Font("SansSerif", 1, 12)); recDeliveryInformation.setForeground(Color.black); recDeliveryInformation.setTransparent(true); // Initialize cbType cbType = new com.sssw.rt.jform.AgcJComboBox(); cbType.setName("cbType"); cbType.setBounds(279,368,105,20); cbType.setEnabled(false); cbType.setEditable((boolean)false); cbType.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbTypeModel = new DefaultComboBoxModel(); cbType.setModel(cbTypeModel); // Initialize cbFlag cbFlag = new com.sssw.rt.jform.AgcJComboBox(); cbFlag.setName("cbFlag"); cbFlag.setBounds(104,368,105,20); cbFlag.setEnabled(false); cbFlag.setEditable((boolean)false); cbFlag.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbFlagModel = new DefaultComboBoxModel(); cbFlag.setModel(cbFlagModel); // Initialize lblType lblType = new com.sssw.rt.jform.AgcJLabel(); lblType.setName("lblType"); lblType.setBounds(220,368,47,20); lblType.setText("Type"); lblType.setOpaque(false); lblType.setTextStyle(0); lblType.setForeground(Color.black); lblType.setTextShadowColor(Color.darkGray); lblType.setTextHighlightColor(Color.gray); lblType.setBackground(Color.lightGray); lblType.setHorizontalAlignment(SwingConstants.RIGHT); lblType.setVerticalAlignment(SwingConstants.CENTER); lblType.setHorizontalTextPosition(SwingConstants.RIGHT); lblType.setVerticalTextPosition(SwingConstants.CENTER); lblType.setWordWrap(false); lblType.setFont(new Font("SansSerif", 1, 12)); // Initialize lblAmount lblAmount = new com.sssw.rt.jform.AgcJLabel(); lblAmount.setName("lblAmount"); lblAmount.setBounds(398,368,62,20); lblAmount.setText("Amount"); lblAmount.setOpaque(false); lblAmount.setTextStyle(0); lblAmount.setForeground(Color.black); lblAmount.setTextShadowColor(Color.darkGray); lblAmount.setTextHighlightColor(Color.gray); lblAmount.setBackground(Color.lightGray); lblAmount.setHorizontalAlignment(SwingConstants.RIGHT); lblAmount.setVerticalAlignment(SwingConstants.CENTER); lblAmount.setHorizontalTextPosition(SwingConstants.RIGHT); lblAmount.setVerticalTextPosition(SwingConstants.CENTER); lblAmount.setWordWrap(false); lblAmount.setFont(new Font("SansSerif", 1, 12)); // Initialize lblFlag lblFlag = new com.sssw.rt.jform.AgcJLabel(); lblFlag.setName("lblFlag"); lblFlag.setBounds(20,368,70,20); lblFlag.setText("Flag"); lblFlag.setOpaque(false); lblFlag.setTextStyle(0); lblFlag.setForeground(Color.black); lblFlag.setTextShadowColor(Color.darkGray); lblFlag.setTextHighlightColor(Color.gray); lblFlag.setBackground(Color.lightGray); lblFlag.setHorizontalAlignment(SwingConstants.RIGHT); lblFlag.setVerticalAlignment(SwingConstants.CENTER); lblFlag.setHorizontalTextPosition(SwingConstants.RIGHT); lblFlag.setVerticalTextPosition(SwingConstants.CENTER); lblFlag.setWordWrap(false); lblFlag.setFont(new Font("SansSerif", 1, 12)); // Initialize recInvoiceSurcharge recInvoiceSurcharge = new com.sssw.rt.form.AgcRectangle(); recInvoiceSurcharge.setName("recInvoiceSurcharge"); recInvoiceSurcharge.setBounds(14,340,565,60); recInvoiceSurcharge.setColor(Color.lightGray); recInvoiceSurcharge.setBorderStyle(4); recInvoiceSurcharge.setText("Invoice Surcharge"); recInvoiceSurcharge.setFont(new Font("SansSerif", 1, 12)); recInvoiceSurcharge.setForeground(Color.black); recInvoiceSurcharge.setTransparent(true); recServingStore = new com.sssw.rt.form.AgcRectangle(); recServingStore.setName("recServingStore"); recServingStore.setBounds(14,475,565,60); recServingStore.setColor(Color.lightGray); recServingStore.setBorderStyle(4); recServingStore.setText("Serving Store"); recServingStore.setFont(new Font("SansSerif", 1, 12)); recServingStore.setForeground(Color.black); recServingStore.setTransparent(true); // Initialize lblServingStore lblServingStore = new com.sssw.rt.jform.AgcJLabel(); lblServingStore.setName("lblServingStore"); lblServingStore.setBounds(96,500,155,20); lblServingStore.setText("Serving Store "); lblServingStore.setOpaque(false); lblServingStore.setTextStyle(0); lblServingStore.setForeground(Color.black); lblServingStore.setTextShadowColor(Color.darkGray); lblServingStore.setTextHighlightColor(Color.gray); lblServingStore.setBackground(Color.lightGray); lblServingStore.setHorizontalAlignment(SwingConstants.RIGHT); lblServingStore.setVerticalAlignment(SwingConstants.CENTER); lblServingStore.setHorizontalTextPosition(SwingConstants.RIGHT); lblServingStore.setVerticalTextPosition(SwingConstants.CENTER); lblServingStore.setWordWrap(false); lblServingStore.setFont(new Font("SansSerif", 1, 12)); // Initialize cbServingStore cbServingStore = new com.sssw.rt.jform.AgcJComboBox(); cbServingStore.setName("cbServingStore"); cbServingStore.setBounds(267,500,155,20); cbServingStore.setEnabled(false); cbServingStore.setEditable((boolean)false); cbServingStore.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbServingStoreModel = new DefaultComboBoxModel(); cbServingStore.setModel(cbServingStoreModel); // Initialize ckAllowSpecialOrders ckAllowSpecialOrders = new com.sssw.rt.jform.AgcJCheckBox(); ckAllowSpecialOrders.setName("ckAllowSpecialOrders"); ckAllowSpecialOrders.setBounds(553,224,13,20); ckAllowSpecialOrders.setContentAreaFilled(false); ckAllowSpecialOrders.setBorderPainted(false); ckAllowSpecialOrders.setText(" "); ckAllowSpecialOrders.setCheckedValue("Y"); ckAllowSpecialOrders.setUncheckedValue("N"); ckAllowSpecialOrders.setFont(new Font("SansSerif", 0, 12)); ckAllowSpecialOrders.setForeground(Color.black); ckAllowSpecialOrders.setBackground(Color.lightGray); // Initialize ckAllowBackorders ckAllowBackorders = new com.sssw.rt.jform.AgcJCheckBox(); ckAllowBackorders.setName("ckAllowBackorders"); ckAllowBackorders.setBounds(553,196,13,20); ckAllowBackorders.setContentAreaFilled(false); ckAllowBackorders.setBorderPainted(false); ckAllowBackorders.setText(" "); ckAllowBackorders.setCheckedValue("Y"); ckAllowBackorders.setUncheckedValue("N"); ckAllowBackorders.setFont(new Font("SansSerif", 0, 12)); ckAllowBackorders.setForeground(Color.black); ckAllowBackorders.setBackground(Color.lightGray); // Initialize ckPrintBalance ckPrintBalance = new com.sssw.rt.jform.AgcJCheckBox(); ckPrintBalance.setName("ckPrintBalance"); ckPrintBalance.setBounds(261,252,13,20); ckPrintBalance.setContentAreaFilled(false); ckPrintBalance.setBorderPainted(false); ckPrintBalance.setText(" "); ckPrintBalance.setCheckedValue("Y"); ckPrintBalance.setUncheckedValue("N"); ckPrintBalance.setFont(new Font("SansSerif", 0, 12)); ckPrintBalance.setForeground(Color.black); ckPrintBalance.setBackground(Color.lightGray); // Initialize ckPrintCatalogNotes ckPrintCatalogNotes = new com.sssw.rt.jform.AgcJCheckBox(); ckPrintCatalogNotes.setName("ckPrintCatalogNotes"); ckPrintCatalogNotes.setBounds(261,224,13,20); ckPrintCatalogNotes.setContentAreaFilled(false); ckPrintCatalogNotes.setBorderPainted(false); ckPrintCatalogNotes.setText(" "); ckPrintCatalogNotes.setCheckedValue("Y"); ckPrintCatalogNotes.setUncheckedValue("N"); ckPrintCatalogNotes.setFont(new Font("SansSerif", 0, 12)); ckPrintCatalogNotes.setForeground(Color.black); ckPrintCatalogNotes.setBackground(Color.lightGray); // Initialize ckPrintMSDS ckPrintMSDS = new com.sssw.rt.jform.AgcJCheckBox(); ckPrintMSDS.setName("ckPrintMSDS"); ckPrintMSDS.setBounds(261,196,13,20); ckPrintMSDS.setContentAreaFilled(false); ckPrintMSDS.setBorderPainted(false); ckPrintMSDS.setText(" "); ckPrintMSDS.setCheckedValue("Y"); ckPrintMSDS.setUncheckedValue("N"); ckPrintMSDS.setFont(new Font("SansSerif", 0, 12)); ckPrintMSDS.setForeground(Color.black); ckPrintMSDS.setBackground(Color.lightGray); // Initialize lblPrintMSDS lblPrintMSDS = new com.sssw.rt.jform.AgcJLabel(); lblPrintMSDS.setName("lblPrintMSDS"); lblPrintMSDS.setBounds(40,196,210,20); lblPrintMSDS.setText("Print MSDS on Invoice"); lblPrintMSDS.setOpaque(false); lblPrintMSDS.setTextStyle(0); lblPrintMSDS.setForeground(Color.black); lblPrintMSDS.setTextShadowColor(Color.darkGray); lblPrintMSDS.setTextHighlightColor(Color.gray); lblPrintMSDS.setBackground(Color.lightGray); lblPrintMSDS.setHorizontalAlignment(SwingConstants.RIGHT); lblPrintMSDS.setVerticalAlignment(SwingConstants.CENTER); lblPrintMSDS.setHorizontalTextPosition(SwingConstants.RIGHT); lblPrintMSDS.setVerticalTextPosition(SwingConstants.CENTER); lblPrintMSDS.setWordWrap(false); lblPrintMSDS.setFont(new Font("SansSerif", 1, 12)); // Initialize lblPrintCatalogNotes lblPrintCatalogNotes = new com.sssw.rt.jform.AgcJLabel(); lblPrintCatalogNotes.setName("lblPrintCatalogNotes"); lblPrintCatalogNotes.setBounds(12,224,238,20); lblPrintCatalogNotes.setText("Print Catalog Notes on Invoice"); lblPrintCatalogNotes.setOpaque(false); lblPrintCatalogNotes.setTextStyle(0); lblPrintCatalogNotes.setForeground(Color.black); lblPrintCatalogNotes.setTextShadowColor(Color.darkGray); lblPrintCatalogNotes.setTextHighlightColor(Color.gray); lblPrintCatalogNotes.setBackground(Color.lightGray); lblPrintCatalogNotes.setHorizontalAlignment(SwingConstants.RIGHT); lblPrintCatalogNotes.setVerticalAlignment(SwingConstants.CENTER); lblPrintCatalogNotes.setHorizontalTextPosition(SwingConstants.RIGHT); lblPrintCatalogNotes.setVerticalTextPosition(SwingConstants.CENTER); lblPrintCatalogNotes.setWordWrap(false); lblPrintCatalogNotes.setFont(new Font("SansSerif", 1, 12)); // Initialize lblAllowSpecialOrders lblAllowSpecialOrders = new com.sssw.rt.jform.AgcJLabel(); lblAllowSpecialOrders.setName("lblAllowSpecialOrders"); lblAllowSpecialOrders.setBounds(327,224,217,20); lblAllowSpecialOrders.setText("Allow Special Orders"); lblAllowSpecialOrders.setOpaque(false); lblAllowSpecialOrders.setTextStyle(0); lblAllowSpecialOrders.setForeground(Color.black); lblAllowSpecialOrders.setTextShadowColor(Color.darkGray); lblAllowSpecialOrders.setTextHighlightColor(Color.gray); lblAllowSpecialOrders.setBackground(Color.lightGray); lblAllowSpecialOrders.setHorizontalAlignment(SwingConstants.RIGHT); lblAllowSpecialOrders.setVerticalAlignment(SwingConstants.CENTER); lblAllowSpecialOrders.setHorizontalTextPosition(SwingConstants.RIGHT); lblAllowSpecialOrders.setVerticalTextPosition(SwingConstants.CENTER); lblAllowSpecialOrders.setWordWrap(false); lblAllowSpecialOrders.setFont(new Font("SansSerif", 1, 12)); // Initialize lblAllowBackorders lblAllowBackorders = new com.sssw.rt.jform.AgcJLabel(); lblAllowBackorders.setName("lblAllowBackorders"); lblAllowBackorders.setBounds(327,196,217,20); lblAllowBackorders.setText("Allow Backorders"); lblAllowBackorders.setOpaque(false); lblAllowBackorders.setTextStyle(0); lblAllowBackorders.setForeground(Color.black); lblAllowBackorders.setTextShadowColor(Color.darkGray); lblAllowBackorders.setTextHighlightColor(Color.gray); lblAllowBackorders.setBackground(Color.lightGray); lblAllowBackorders.setHorizontalAlignment(SwingConstants.RIGHT); lblAllowBackorders.setVerticalAlignment(SwingConstants.CENTER); lblAllowBackorders.setHorizontalTextPosition(SwingConstants.RIGHT); lblAllowBackorders.setVerticalTextPosition(SwingConstants.CENTER); lblAllowBackorders.setWordWrap(false); lblAllowBackorders.setFont(new Font("SansSerif", 1, 12)); // Initialize lblPrintBalance lblPrintBalance = new com.sssw.rt.jform.AgcJLabel(); lblPrintBalance.setName("lblPrintBalance"); lblPrintBalance.setBounds(27,252,223,20); lblPrintBalance.setText("Print Balance on Invoice"); lblPrintBalance.setOpaque(false); lblPrintBalance.setTextStyle(0); lblPrintBalance.setForeground(Color.black); lblPrintBalance.setTextShadowColor(Color.darkGray); lblPrintBalance.setTextHighlightColor(Color.gray); lblPrintBalance.setBackground(Color.lightGray); lblPrintBalance.setHorizontalAlignment(SwingConstants.RIGHT); lblPrintBalance.setVerticalAlignment(SwingConstants.CENTER); lblPrintBalance.setHorizontalTextPosition(SwingConstants.RIGHT); lblPrintBalance.setVerticalTextPosition(SwingConstants.CENTER); lblPrintBalance.setWordWrap(false); lblPrintBalance.setFont(new Font("SansSerif", 1, 12)); // Initialize lblExtraInvoiceCopies lblExtraInvoiceCopies = new com.sssw.rt.jform.AgcJLabel(); lblExtraInvoiceCopies.setName("lblExtraInvoiceCopies"); lblExtraInvoiceCopies.setBounds(17,281,233,20); lblExtraInvoiceCopies.setText("Extra Invoice Copies"); lblExtraInvoiceCopies.setOpaque(false); lblExtraInvoiceCopies.setTextStyle(0); lblExtraInvoiceCopies.setForeground(Color.black); lblExtraInvoiceCopies.setTextShadowColor(Color.darkGray); lblExtraInvoiceCopies.setTextHighlightColor(Color.gray); lblExtraInvoiceCopies.setBackground(Color.lightGray); lblExtraInvoiceCopies.setHorizontalAlignment(SwingConstants.RIGHT); lblExtraInvoiceCopies.setVerticalAlignment(SwingConstants.CENTER); lblExtraInvoiceCopies.setHorizontalTextPosition(SwingConstants.RIGHT); lblExtraInvoiceCopies.setVerticalTextPosition(SwingConstants.CENTER); lblExtraInvoiceCopies.setWordWrap(false); lblExtraInvoiceCopies.setFont(new Font("SansSerif", 1, 12)); // Initialize lblExemptEnviroChanges lblExemptEnviroChanges = new com.sssw.rt.jform.AgcJLabel(); lblExemptEnviroChanges.setName("lblExemptEnviroChanges"); lblExemptEnviroChanges.setBounds(327,252,217,20); lblExemptEnviroChanges.setText("Exempt from Environment Charges"); lblExemptEnviroChanges.setOpaque(false); lblExemptEnviroChanges.setTextStyle(0); lblExemptEnviroChanges.setForeground(Color.black); lblExemptEnviroChanges.setTextShadowColor(Color.darkGray); lblExemptEnviroChanges.setTextHighlightColor(Color.gray); lblExemptEnviroChanges.setBackground(Color.lightGray); lblExemptEnviroChanges.setHorizontalAlignment(SwingConstants.RIGHT); lblExemptEnviroChanges.setVerticalAlignment(SwingConstants.CENTER); lblExemptEnviroChanges.setHorizontalTextPosition(SwingConstants.RIGHT); lblExemptEnviroChanges.setVerticalTextPosition(SwingConstants.CENTER); lblExemptEnviroChanges.setWordWrap(false); lblExemptEnviroChanges.setFont(new Font("SansSerif", 1, 12)); // Initialize ckExemptEnvCharges ckExemptEnvCharges = new com.sssw.rt.jform.AgcJCheckBox(); ckExemptEnvCharges.setName("ckExemptEnvCharges"); ckExemptEnvCharges.setBounds(553,252,13,20); ckExemptEnvCharges.setContentAreaFilled(false); ckExemptEnvCharges.setBorderPainted(false); ckExemptEnvCharges.setText(" "); ckExemptEnvCharges.setCheckedValue("Y"); ckExemptEnvCharges.setUncheckedValue("N"); ckExemptEnvCharges.setFont(new Font("SansSerif", 0, 12)); ckExemptEnvCharges.setForeground(Color.black); ckExemptEnvCharges.setBackground(Color.lightGray); // Initialize recMiscellaneous recMiscellaneous = new com.sssw.rt.form.AgcRectangle(); recMiscellaneous.setName("recMiscellaneous"); recMiscellaneous.setBounds(14,182,565,152); recMiscellaneous.setColor(Color.lightGray); recMiscellaneous.setBorderStyle(4); recMiscellaneous.setText("Miscellaneous"); recMiscellaneous.setFont(new Font("SansSerif", 1, 12)); recMiscellaneous.setForeground(Color.black); recMiscellaneous.setTransparent(true); //Intialize PriceControl recPriceControl = new com.sssw.rt.form.AgcRectangle(); recPriceControl.setName("recPriceControl"); recPriceControl.setBounds(587,405,407,60); recPriceControl.setColor(Color.lightGray); recPriceControl.setBorderStyle(4); recPriceControl.setFont(new Font("SansSerif", 1, 12)); recPriceControl.setForeground(Color.black); recPriceControl.setTransparent(true); // Initialize lblDirectShip lblPriceLocked = new com.sssw.rt.jform.AgcJLabel(); lblPriceLocked.setName("lblPriceLocked"); lblPriceLocked.setBounds(598, 432, 150, 20); lblPriceLocked.setOpaque(false); lblPriceLocked.setTextStyle(0); lblPriceLocked.setForeground(Color.black); lblPriceLocked.setTextShadowColor(Color.darkGray); lblPriceLocked.setTextHighlightColor(Color.gray); lblPriceLocked.setBackground(Color.darkGray); lblPriceLocked.setHorizontalAlignment(SwingConstants.RIGHT); lblPriceLocked.setVerticalAlignment(SwingConstants.CENTER); lblPriceLocked.setHorizontalTextPosition(SwingConstants.RIGHT); lblPriceLocked.setVerticalTextPosition(SwingConstants.CENTER); lblPriceLocked.setWordWrap(false); lblPriceLocked.setFont(new Font("SansSerif", 1, 12)); // Initialize ckIbsAccount ckPriceLocked = new com.sssw.rt.jform.AgcJCheckBox(); ckPriceLocked.setName("ckPriceLocked"); ckPriceLocked.setBounds(756, 432, 13, 20); ckPriceLocked.setContentAreaFilled(false); ckPriceLocked.setBorderPainted(false); ckPriceLocked.setText(""); ckPriceLocked.setFont(new Font("SansSerif", 0, 12)); ckPriceLocked.setForeground(Color.black); ckPriceLocked.setBackground(Color.lightGray); // Initialize lblDirectShip lblMaxDiscount = new com.sssw.rt.jform.AgcJLabel(); lblMaxDiscount.setName("lblMaxDiscount"); lblMaxDiscount.setBounds(777, 432, 150, 20); lblMaxDiscount.setOpaque(false); lblMaxDiscount.setTextStyle(0); lblMaxDiscount.setForeground(Color.black); lblMaxDiscount.setTextShadowColor(Color.darkGray); lblMaxDiscount.setTextHighlightColor(Color.gray); lblMaxDiscount.setBackground(Color.darkGray); lblMaxDiscount.setHorizontalAlignment(SwingConstants.RIGHT); lblMaxDiscount.setVerticalAlignment(SwingConstants.CENTER); lblMaxDiscount.setHorizontalTextPosition(SwingConstants.RIGHT); lblMaxDiscount.setVerticalTextPosition(SwingConstants.CENTER); lblMaxDiscount.setWordWrap(false); lblMaxDiscount.setFont(new Font("SansSerif", 1, 12)); // Initialize fldInvDiscount fldPriceMaxDiscount = new com.sssw.rt.jform.AgcJTextField(); fldPriceMaxDiscount.setName("fldPriceMaxDiscount"); fldPriceMaxDiscount.setBounds(935, 432, 28, 20); fldPriceMaxDiscount.setFont(new Font("SansSerif", 0, 12)); fldPriceMaxDiscount.setHorizontalAlignment(2); fldPriceMaxDiscount.setMargin(new Insets(1, 1, 1, 1)); fldPriceMaxDiscount.setEditable(true); fldPriceMaxDiscount.setForeground(Color.black); fldPriceMaxDiscount.setBackground(Color.white); fldPriceMaxDiscount.setMaxLength(AgcJTextField.NO_LIMIT); fldPriceMaxDiscount.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldSecTaxExemptNumber fldSecTaxExemptNumber = new com.sssw.rt.jform.AgcJTextField(); fldSecTaxExemptNumber.setName("fldSecTaxExemptNumber"); fldSecTaxExemptNumber.setBounds(799,75,170,20); fldSecTaxExemptNumber.setFont(new Font("SansSerif", 0, 12)); fldSecTaxExemptNumber.setHorizontalAlignment(2); fldSecTaxExemptNumber.setMargin(new Insets(1, 1, 1, 1)); fldSecTaxExemptNumber.setEditable(true); fldSecTaxExemptNumber.setForeground(Color.black); fldSecTaxExemptNumber.setBackground(Color.white); fldSecTaxExemptNumber.setMaxLength(AgcJTextField.NO_LIMIT); fldSecTaxExemptNumber.setMinLength(AgcJTextField.NO_LIMIT); // Initialize cbPriTaxStatus cbPriTaxStatus = new com.sssw.rt.jform.AgcJComboBox(); cbPriTaxStatus.setName("cbPriTaxStatus"); cbPriTaxStatus.setBounds(599,46,132,20); cbPriTaxStatus.setEditable((boolean)false); cbPriTaxStatus.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbPriTaxStatusModel = new DefaultComboBoxModel(); cbPriTaxStatus.setModel(cbPriTaxStatusModel); // Initialize fldPriTaxExemptNumber fldPriTaxExemptNumber = new com.sssw.rt.jform.AgcJTextField(); fldPriTaxExemptNumber.setName("fldPriTaxExemptNumber"); fldPriTaxExemptNumber.setBounds(599,76,170,20); fldPriTaxExemptNumber.setFont(new Font("SansSerif", 0, 12)); fldPriTaxExemptNumber.setHorizontalAlignment(2); fldPriTaxExemptNumber.setMargin(new Insets(1, 1, 1, 1)); fldPriTaxExemptNumber.setEditable(true); fldPriTaxExemptNumber.setForeground(Color.black); fldPriTaxExemptNumber.setBackground(Color.white); fldPriTaxExemptNumber.setMaxLength(AgcJTextField.NO_LIMIT); fldPriTaxExemptNumber.setMinLength(AgcJTextField.NO_LIMIT); // Initialize cbDeliveryTaxTable cbDeliveryTaxTable = new com.sssw.rt.jform.AgcJComboBox(); cbDeliveryTaxTable.setName("cbDeliveryTaxTable"); cbDeliveryTaxTable.setBounds(201,46,155,20); cbDeliveryTaxTable.setEditable((boolean)false); cbDeliveryTaxTable.setFont(new Font("SansSerif", 0, 12)); cbDeliveryTaxTable.setDisplayExpression(114); cbDeliveryTaxTable.setValueExpression(115); cbDeliveryTaxTable.setAutomaticQuery(true); // Initialize cbDefaultTaxTable cbDefaultTaxTable = new com.sssw.rt.jform.AgcJComboBox(); cbDefaultTaxTable.setName("cbDefaultTaxTable"); cbDefaultTaxTable.setBounds(201,76,155,20); cbDefaultTaxTable.setEditable((boolean)false); cbDefaultTaxTable.setFont(new Font("SansSerif", 0, 12)); cbDefaultTaxTable.setDisplayExpression(116); cbDefaultTaxTable.setValueExpression(117); cbDefaultTaxTable.setAutomaticQuery(true); // Initialize lblDefaultTaxTable lblDefaultTaxTable = new com.sssw.rt.jform.AgcJLabel(); lblDefaultTaxTable.setName("lblDefaultTaxTable"); lblDefaultTaxTable.setBounds(19,76,174,20); lblDefaultTaxTable.setText("Default Tax Table"); lblDefaultTaxTable.setOpaque(false); lblDefaultTaxTable.setTextStyle(0); lblDefaultTaxTable.setForeground(Color.black); lblDefaultTaxTable.setTextShadowColor(Color.darkGray); lblDefaultTaxTable.setTextHighlightColor(Color.gray); lblDefaultTaxTable.setBackground(Color.lightGray); lblDefaultTaxTable.setHorizontalAlignment(SwingConstants.RIGHT); lblDefaultTaxTable.setVerticalAlignment(SwingConstants.CENTER); lblDefaultTaxTable.setHorizontalTextPosition(SwingConstants.RIGHT); lblDefaultTaxTable.setVerticalTextPosition(SwingConstants.CENTER); lblDefaultTaxTable.setWordWrap(false); lblDefaultTaxTable.setFont(new Font("SansSerif", 1, 12)); // Initialize lblDeliveryTaxTable lblDeliveryTaxTable = new com.sssw.rt.jform.AgcJLabel(); lblDeliveryTaxTable.setName("lblDeliveryTaxTable"); lblDeliveryTaxTable.setBounds(18,46,175,20); lblDeliveryTaxTable.setText("Delivery Tax Table"); lblDeliveryTaxTable.setOpaque(false); lblDeliveryTaxTable.setTextStyle(0); lblDeliveryTaxTable.setForeground(Color.black); lblDeliveryTaxTable.setTextShadowColor(Color.darkGray); lblDeliveryTaxTable.setTextHighlightColor(Color.gray); lblDeliveryTaxTable.setBackground(Color.lightGray); lblDeliveryTaxTable.setHorizontalAlignment(SwingConstants.RIGHT); lblDeliveryTaxTable.setVerticalAlignment(SwingConstants.CENTER); lblDeliveryTaxTable.setHorizontalTextPosition(SwingConstants.RIGHT); lblDeliveryTaxTable.setVerticalTextPosition(SwingConstants.CENTER); lblDeliveryTaxTable.setWordWrap(false); lblDeliveryTaxTable.setFont(new Font("SansSerif", 1, 12)); // Initialize cbSecTaxStatus cbSecTaxStatus = new com.sssw.rt.jform.AgcJComboBox(); cbSecTaxStatus.setName("cbSecTaxStatus"); cbSecTaxStatus.setBounds(799,45,132,20); cbSecTaxStatus.setEditable((boolean)false); cbSecTaxStatus.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbSecTaxStatusModel = new DefaultComboBoxModel(); cbSecTaxStatus.setModel(cbSecTaxStatusModel); // Initialize lblPrimaryTaxStatus lblPrimaryTaxStatus = new com.sssw.rt.jform.AgcJLabel(); lblPrimaryTaxStatus.setName("lblPrimaryTaxStatus"); lblPrimaryTaxStatus.setBounds(396,45,188,20); lblPrimaryTaxStatus.setText("Tax Status"); lblPrimaryTaxStatus.setOpaque(false); lblPrimaryTaxStatus.setTextStyle(0); lblPrimaryTaxStatus.setForeground(Color.black); lblPrimaryTaxStatus.setTextShadowColor(Color.darkGray); lblPrimaryTaxStatus.setTextHighlightColor(Color.gray); lblPrimaryTaxStatus.setBackground(Color.lightGray); lblPrimaryTaxStatus.setHorizontalAlignment(SwingConstants.RIGHT); lblPrimaryTaxStatus.setVerticalAlignment(SwingConstants.CENTER); lblPrimaryTaxStatus.setHorizontalTextPosition(SwingConstants.RIGHT); lblPrimaryTaxStatus.setVerticalTextPosition(SwingConstants.CENTER); lblPrimaryTaxStatus.setWordWrap(false); lblPrimaryTaxStatus.setFont(new Font("SansSerif", 1, 12)); refElectronicInvoiceVendorId = ClientApplicationContext .getClientApplicationContext() .getProfile( Profile.BACKOFFICE_CLIENT, ClientApplicationContext.getClientApplicationContext() .getLocation()).getInvoicingProfile() .getRefElectronicInvoiceVendorId(); // Initialize lblTaxExemptNum lblTaxExemptNum = new com.sssw.rt.jform.AgcJLabel(); if (refElectronicInvoiceVendorId != null && refElectronicInvoiceVendorId.intValue()>0) { lblTaxExemptNum.setName("lblRFC"); } else { lblTaxExemptNum.setName("lblTaxExemptNum"); } lblTaxExemptNum.setBounds(379,75,205,20); lblTaxExemptNum.setText("Tax Exempt Number"); lblTaxExemptNum.setOpaque(false); lblTaxExemptNum.setTextStyle(0); lblTaxExemptNum.setForeground(Color.black); lblTaxExemptNum.setTextShadowColor(Color.darkGray); lblTaxExemptNum.setTextHighlightColor(Color.gray); lblTaxExemptNum.setBackground(Color.lightGray); lblTaxExemptNum.setHorizontalAlignment(SwingConstants.RIGHT); lblTaxExemptNum.setVerticalAlignment(SwingConstants.CENTER); lblTaxExemptNum.setHorizontalTextPosition(SwingConstants.RIGHT); lblTaxExemptNum.setVerticalTextPosition(SwingConstants.CENTER); lblTaxExemptNum.setWordWrap(false); lblTaxExemptNum.setFont(new Font("SansSerif", 1, 12)); // Initialize lblTaxExemptExpDate lblTaxExemptExpDate = new com.sssw.rt.jform.AgcJLabel(); lblTaxExemptExpDate.setName("lblTaxExemptExpDate"); lblTaxExemptExpDate.setBounds(300,135,284,20); lblTaxExemptExpDate.setText("Tax Exempt Expiration Date"); lblTaxExemptExpDate.setOpaque(false); lblTaxExemptExpDate.setTextStyle(0); lblTaxExemptExpDate.setForeground(Color.black); lblTaxExemptExpDate.setTextShadowColor(Color.darkGray); lblTaxExemptExpDate.setTextHighlightColor(Color.gray); lblTaxExemptExpDate.setBackground(Color.lightGray); lblTaxExemptExpDate.setHorizontalAlignment(SwingConstants.RIGHT); lblTaxExemptExpDate.setVerticalAlignment(SwingConstants.CENTER); lblTaxExemptExpDate.setHorizontalTextPosition(SwingConstants.RIGHT); lblTaxExemptExpDate.setVerticalTextPosition(SwingConstants.CENTER); lblTaxExemptExpDate.setWordWrap(false); lblTaxExemptExpDate.setFont(new Font("SansSerif", 1, 12)); // Initialize recPrimary recPrimary = new com.sssw.rt.form.AgcRectangle(); recPrimary.setName("recPrimary"); recPrimary.setBounds(592,21,188,145); recPrimary.setColor(Color.lightGray); recPrimary.setBorderStyle(4); recPrimary.setText("Primary"); recPrimary.setFont(new Font("SansSerif", 1, 12)); recPrimary.setForeground(Color.black); recPrimary.setTransparent(true); // Initialize recSecondary recSecondary = new com.sssw.rt.form.AgcRectangle(); recSecondary.setName("recSecondary"); recSecondary.setBounds(792,21,188,145); recSecondary.setColor(Color.lightGray); recSecondary.setBorderStyle(4); recSecondary.setText("Secondary"); recSecondary.setFont(new Font("SansSerif", 1, 12)); recSecondary.setForeground(Color.black); recSecondary.setTransparent(true); // Initialize recInvoiceDisc recInvoiceDisc = new com.sssw.rt.form.AgcRectangle(); recInvoiceDisc.setName("recInvoiceDisc"); recInvoiceDisc.setBounds(14,405,565,60); recInvoiceDisc.setColor(Color.lightGray); recInvoiceDisc.setBorderStyle(4); recInvoiceDisc.setText("Miscellaneous Adjustment"); recInvoiceDisc.setFont(new Font("SansSerif", 1, 12)); recInvoiceDisc.setForeground(Color.black); recInvoiceDisc.setTransparent(true); // Initialize recTaxInfo recTaxInfo = new com.sssw.rt.form.AgcRectangle(); recTaxInfo.setName("recTaxInfo"); recTaxInfo.setBounds(14,11,983,160); recTaxInfo.setColor(Color.lightGray); recTaxInfo.setBorderStyle(4); recTaxInfo.setText("Tax Info"); recTaxInfo.setFont(new Font("SansSerif", 1, 12)); recTaxInfo.setForeground(Color.black); recTaxInfo.setTransparent(true); // Initialize cbBillingType cbBillingType = new com.sssw.rt.jform.AgcJComboBox(); cbBillingType.setName("cbBillingType"); cbBillingType.setBounds(885,234,115,25); cbBillingType.setEditable((boolean)false); cbBillingType.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbBillingTypeModel = new DefaultComboBoxModel(); cbBillingType.setModel(cbBillingTypeModel); // Initialize lblNationalRegister lblNationalRegister = new com.sssw.rt.jform.AgcJLabel(); lblNationalRegister.setName("lblNationalRegister"); lblNationalRegister.setBounds(873,130,117,20); lblNationalRegister.setText(""); lblNationalRegister.setOpaque(false); lblNationalRegister.setTextStyle(0); lblNationalRegister.setForeground(Color.black); lblNationalRegister.setTextShadowColor(Color.darkGray); lblNationalRegister.setTextHighlightColor(Color.gray); lblNationalRegister.setBackground(Color.lightGray); lblNationalRegister.setHorizontalAlignment(SwingConstants.CENTER); lblNationalRegister.setVerticalAlignment(SwingConstants.CENTER); lblNationalRegister.setHorizontalTextPosition(SwingConstants.RIGHT); lblNationalRegister.setVerticalTextPosition(SwingConstants.CENTER); lblNationalRegister.setWordWrap(false); lblNationalRegister.setFont(new Font("SansSerif", 0, 12)); // Initialize lblJSARegister lblJSARegister = new com.sssw.rt.jform.AgcJLabel(); lblJSARegister.setName("lblJSARegister"); lblJSARegister.setBounds(873,80,117,20); lblJSARegister.setText(""); lblJSARegister.setOpaque(false); lblJSARegister.setTextStyle(0); lblJSARegister.setForeground(Color.black); lblJSARegister.setTextShadowColor(Color.darkGray); lblJSARegister.setTextHighlightColor(Color.gray); lblJSARegister.setBackground(Color.lightGray); lblJSARegister.setHorizontalAlignment(SwingConstants.CENTER); lblJSARegister.setVerticalAlignment(SwingConstants.CENTER); lblJSARegister.setHorizontalTextPosition(SwingConstants.RIGHT); lblJSARegister.setVerticalTextPosition(SwingConstants.CENTER); lblJSARegister.setWordWrap(false); lblJSARegister.setFont(new Font("SansSerif", 0, 12)); // Initialize cbEmpID cbEmpID = new com.sssw.rt.jform.AgcJComboBox(); cbEmpID.setName("cbEmpID"); cbEmpID.setBounds(591,418,86,25); cbEmpID.setVisible(false); cbEmpID.setEnabled(false); cbEmpID.setFont(new Font("SansSerif", 0, 12)); cbEmpID.setDisplayExpression(118); cbEmpID.setValueExpression(119); cbEmpID.setAutomaticQuery(true); // Initialize fldCustomerNum fldCustomerNum = new com.sssw.rt.jform.AgcJTextField(); fldCustomerNum.setName("fldCustomerNum"); fldCustomerNum.setBounds(180,12,100,20); fldCustomerNum.setToolTipText("Type in Numbers Only"); fldCustomerNum.setFont(new Font("SansSerif", 0, 12)); fldCustomerNum.setHorizontalAlignment(2); fldCustomerNum.setMargin(new Insets(1, 1, 1, 1)); fldCustomerNum.setEditable(true); fldCustomerNum.setForeground(Color.black); fldCustomerNum.setBackground(AgoColorManager.getColor(250, 250, 250)); fldCustomerNum.setMaxLength(AgcJTextField.NO_LIMIT); fldCustomerNum.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldMonthlySalesPotential fldMonthlySalesPotential = new com.sssw.rt.jform.AgcJTextField(); fldMonthlySalesPotential.setName("fldMonthlySalesPotential"); fldMonthlySalesPotential.setBounds(885,207,115,20); fldMonthlySalesPotential.setFont(new Font("SansSerif", 0, 12)); fldMonthlySalesPotential.setHorizontalAlignment(4); fldMonthlySalesPotential.setMargin(new Insets(1, 1, 1, 1)); fldMonthlySalesPotential.setEditable(true); fldMonthlySalesPotential.setForeground(Color.black); fldMonthlySalesPotential.setBackground(Color.white); fldMonthlySalesPotential.setMaxLength(AgcJTextField.NO_LIMIT); fldMonthlySalesPotential.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldMinAmtForPO fldMinAmtForPO = new com.sssw.rt.jform.AgcJTextField(); fldMinAmtForPO.setName("fldMinAmtForPO"); fldMinAmtForPO.setBounds(885,157,115,20); fldMinAmtForPO.setFont(new Font("SansSerif", 0, 12)); fldMinAmtForPO.setHorizontalAlignment(2); fldMinAmtForPO.setMargin(new Insets(1, 1, 1, 1)); fldMinAmtForPO.setEditable(true); fldMinAmtForPO.setForeground(Color.black); fldMinAmtForPO.setBackground(Color.white); fldMinAmtForPO.setMaxLength(AgcJTextField.NO_LIMIT); fldMinAmtForPO.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldSalesIDNumber fldSalesIDNumber = new com.sssw.rt.jform.AgcJTextField(); fldSalesIDNumber.setName("fldSalesIDNumber"); fldSalesIDNumber.setBounds(885,307,115,20); fldSalesIDNumber.setFont(new Font("SansSerif", 0, 12)); fldSalesIDNumber.setHorizontalAlignment(2); fldSalesIDNumber.setMargin(new Insets(1, 1, 1, 1)); fldSalesIDNumber.setEditable(true); fldSalesIDNumber.setForeground(Color.black); fldSalesIDNumber.setBackground(Color.white); fldSalesIDNumber.setMaxLength(AgcJTextField.NO_LIMIT); fldSalesIDNumber.setMinLength(AgcJTextField.NO_LIMIT); // Initialize cbCategory cbCategory = new com.sssw.rt.jform.AgcJComboBox(); cbCategory.setName("cbCategory"); cbCategory.setBounds(180,444,400,25); cbCategory.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbCategoryModel = new DefaultComboBoxModel(); cbCategory.setModel(cbCategoryModel); // Initialize lblModifiedEmplMain lblModifiedEmplMain = new com.sssw.rt.jform.AgcJLabel(); lblModifiedEmplMain.setName("lblModifiedEmplMain"); lblModifiedEmplMain.setBounds(5,522,315,20); lblModifiedEmplMain.setText(""); lblModifiedEmplMain.setOpaque(false); lblModifiedEmplMain.setTextStyle(0); lblModifiedEmplMain.setForeground(Color.black); lblModifiedEmplMain.setTextShadowColor(Color.darkGray); lblModifiedEmplMain.setTextHighlightColor(Color.gray); lblModifiedEmplMain.setBackground(Color.lightGray); lblModifiedEmplMain.setHorizontalAlignment(SwingConstants.LEFT); lblModifiedEmplMain.setVerticalAlignment(SwingConstants.CENTER); lblModifiedEmplMain.setHorizontalTextPosition(SwingConstants.RIGHT); lblModifiedEmplMain.setVerticalTextPosition(SwingConstants.CENTER); lblModifiedEmplMain.setWordWrap(false); lblModifiedEmplMain.setFont(new Font("SansSerif", 0, 12)); // Initialize fldAltCustNumber fldAltCustNumber = new com.sssw.rt.jform.AgcJTextField(); fldAltCustNumber.setName("fldAltCustNumber"); fldAltCustNumber.setBounds(885,182,115,20); fldAltCustNumber.setFont(new Font("SansSerif", 0, 12)); fldAltCustNumber.setHorizontalAlignment(2); fldAltCustNumber.setMargin(new Insets(1, 1, 1, 1)); fldAltCustNumber.setEditable(true); fldAltCustNumber.setForeground(Color.black); fldAltCustNumber.setBackground(Color.white); fldAltCustNumber.setMaxLength(AgcJTextField.NO_LIMIT); fldAltCustNumber.setMinLength(AgcJTextField.NO_LIMIT); // Initialize lblCustomerTypeValue lblCustomerTypeValue = new com.sssw.rt.jform.AgcJLabel(); lblCustomerTypeValue.setName("lblCustomerTypeValue"); lblCustomerTypeValue.setBounds(473,12,128,20); lblCustomerTypeValue.setText(""); lblCustomerTypeValue.setOpaque(false); lblCustomerTypeValue.setTextStyle(0); lblCustomerTypeValue.setForeground(Color.black); lblCustomerTypeValue.setTextShadowColor(Color.darkGray); lblCustomerTypeValue.setTextHighlightColor(Color.gray); lblCustomerTypeValue.setBackground(Color.lightGray); lblCustomerTypeValue.setHorizontalAlignment(SwingConstants.LEFT); lblCustomerTypeValue.setVerticalAlignment(SwingConstants.CENTER); lblCustomerTypeValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblCustomerTypeValue.setVerticalTextPosition(SwingConstants.CENTER); lblCustomerTypeValue.setWordWrap(false); lblCustomerTypeValue.setFont(new Font("SansSerif", 0, 12)); // Initialize lblExtension lblExtension = new com.sssw.rt.jform.AgcJLabel(); lblExtension.setName("lblExtension"); lblExtension.setBounds(369,288,71,20); lblExtension.setText("Extension"); lblExtension.setOpaque(false); lblExtension.setTextStyle(0); lblExtension.setForeground(Color.black); lblExtension.setTextShadowColor(Color.darkGray); lblExtension.setTextHighlightColor(Color.gray); lblExtension.setBackground(Color.lightGray); lblExtension.setHorizontalAlignment(SwingConstants.RIGHT); lblExtension.setVerticalAlignment(SwingConstants.CENTER); lblExtension.setHorizontalTextPosition(SwingConstants.RIGHT); lblExtension.setVerticalTextPosition(SwingConstants.CENTER); lblExtension.setWordWrap(false); lblExtension.setFont(new Font("SansSerif", 1, 12)); // Initialize fldExtension fldExtension = new com.sssw.rt.jform.AgcJTextField(); fldExtension.setName("fldExtension"); fldExtension.setBounds(451,288,66,20); fldExtension.setFont(new Font("SansSerif", 0, 12)); fldExtension.setHorizontalAlignment(2); fldExtension.setMargin(new Insets(1, 1, 1, 1)); fldExtension.setEditable(true); fldExtension.setForeground(Color.black); fldExtension.setBackground(Color.white); fldExtension.setMaxLength(AgcJTextField.NO_LIMIT); fldExtension.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldAddress4 fldAddress4 = new com.sssw.rt.jform.AgcJTextField(); fldAddress4.setName("fldAddress4"); fldAddress4.setBounds(180,163,320,20); fldAddress4.setFont(new Font("SansSerif", 0, 12)); fldAddress4.setHorizontalAlignment(2); fldAddress4.setMargin(new Insets(1, 1, 1, 1)); fldAddress4.setEditable(true); fldAddress4.setForeground(Color.black); fldAddress4.setBackground(Color.white); fldAddress4.setMaxLength(AgcJTextField.NO_LIMIT); fldAddress4.setMinLength(AgcJTextField.NO_LIMIT); // Initialize lblAddress4 lblAddress4 = new com.sssw.rt.jform.AgcJLabel(); lblAddress4.setName("lblAddress4"); lblAddress4.setBounds(16,163,150,20); lblAddress4.setText("Address 4"); lblAddress4.setOpaque(false); lblAddress4.setTextStyle(0); lblAddress4.setForeground(Color.black); lblAddress4.setTextShadowColor(Color.darkGray); lblAddress4.setTextHighlightColor(Color.gray); lblAddress4.setBackground(Color.lightGray); lblAddress4.setHorizontalAlignment(SwingConstants.RIGHT); lblAddress4.setVerticalAlignment(SwingConstants.CENTER); lblAddress4.setHorizontalTextPosition(SwingConstants.RIGHT); lblAddress4.setVerticalTextPosition(SwingConstants.CENTER); lblAddress4.setWordWrap(false); lblAddress4.setFont(new Font("SansSerif", 1, 12)); // Initialize fldAddress3 fldAddress3 = new com.sssw.rt.jform.AgcJTextField(); fldAddress3.setName("fldAddress3"); fldAddress3.setBounds(180,138,320,20); fldAddress3.setFont(new Font("SansSerif", 0, 12)); fldAddress3.setHorizontalAlignment(2); fldAddress3.setMargin(new Insets(1, 1, 1, 1)); fldAddress3.setEditable(true); fldAddress3.setForeground(Color.black); fldAddress3.setBackground(Color.white); fldAddress3.setMaxLength(AgcJTextField.NO_LIMIT); fldAddress3.setMinLength(AgcJTextField.NO_LIMIT); // Initialize lblAddress3 lblAddress3 = new com.sssw.rt.jform.AgcJLabel(); lblAddress3.setName("lblAddress3"); lblAddress3.setBounds(16,138,150,20); lblAddress3.setText("Address 3"); lblAddress3.setOpaque(false); lblAddress3.setTextStyle(0); lblAddress3.setForeground(Color.black); lblAddress3.setTextShadowColor(Color.darkGray); lblAddress3.setTextHighlightColor(Color.gray); lblAddress3.setBackground(Color.lightGray); lblAddress3.setHorizontalAlignment(SwingConstants.RIGHT); lblAddress3.setVerticalAlignment(SwingConstants.CENTER); lblAddress3.setHorizontalTextPosition(SwingConstants.RIGHT); lblAddress3.setVerticalTextPosition(SwingConstants.CENTER); lblAddress3.setWordWrap(false); lblAddress3.setFont(new Font("SansSerif", 1, 12)); // Initialize lblDateAdded lblDateAdded = new com.sssw.rt.jform.AgcJLabel(); lblDateAdded.setName("lblDateAdded"); lblDateAdded.setBounds(708,352,164,20); lblDateAdded.setText("Date Added"); lblDateAdded.setOpaque(false); lblDateAdded.setTextStyle(0); lblDateAdded.setForeground(Color.black); lblDateAdded.setTextShadowColor(Color.darkGray); lblDateAdded.setTextHighlightColor(Color.gray); lblDateAdded.setBackground(Color.lightGray); lblDateAdded.setHorizontalAlignment(SwingConstants.RIGHT); lblDateAdded.setVerticalAlignment(SwingConstants.CENTER); lblDateAdded.setHorizontalTextPosition(SwingConstants.RIGHT); lblDateAdded.setVerticalTextPosition(SwingConstants.CENTER); lblDateAdded.setWordWrap(false); lblDateAdded.setFont(new Font("SansSerif", 1, 12)); // Initialize lblLastPurchaseDate lblLastPurchaseDate = new com.sssw.rt.jform.AgcJLabel(); lblLastPurchaseDate.setName("lblLastPurchaseDate"); lblLastPurchaseDate.setBounds(676,372,196,20); lblLastPurchaseDate.setText("Last Purchase Date"); lblLastPurchaseDate.setOpaque(false); lblLastPurchaseDate.setTextStyle(0); lblLastPurchaseDate.setForeground(Color.black); lblLastPurchaseDate.setTextShadowColor(Color.darkGray); lblLastPurchaseDate.setTextHighlightColor(Color.gray); lblLastPurchaseDate.setBackground(Color.lightGray); lblLastPurchaseDate.setHorizontalAlignment(SwingConstants.RIGHT); lblLastPurchaseDate.setVerticalAlignment(SwingConstants.CENTER); lblLastPurchaseDate.setHorizontalTextPosition(SwingConstants.RIGHT); lblLastPurchaseDate.setVerticalTextPosition(SwingConstants.CENTER); lblLastPurchaseDate.setWordWrap(false); lblLastPurchaseDate.setFont(new Font("SansSerif", 1, 12)); // Initialize lblLastModified lblLastModified = new com.sssw.rt.jform.AgcJLabel(); lblLastModified.setName("lblLastModified"); lblLastModified.setBounds(886,372,75,20); lblLastModified.setText("11/01/2000"); lblLastModified.setOpaque(false); lblLastModified.setTextStyle(0); lblLastModified.setForeground(Color.black); lblLastModified.setTextShadowColor(Color.darkGray); lblLastModified.setTextHighlightColor(Color.gray); lblLastModified.setBackground(Color.lightGray); lblLastModified.setHorizontalAlignment(SwingConstants.LEFT); lblLastModified.setVerticalAlignment(SwingConstants.CENTER); lblLastModified.setHorizontalTextPosition(SwingConstants.RIGHT); lblLastModified.setVerticalTextPosition(SwingConstants.CENTER); lblLastModified.setWordWrap(false); lblLastModified.setFont(new Font("SansSerif", 0, 12)); // Initialize lblDateEstablished lblDateEstablished = new com.sssw.rt.jform.AgcJLabel(); lblDateEstablished.setName("lblDateEstablished"); lblDateEstablished.setBounds(886,352,74,20); lblDateEstablished.setText("11/01/2000"); lblDateEstablished.setOpaque(false); lblDateEstablished.setTextStyle(0); lblDateEstablished.setForeground(Color.black); lblDateEstablished.setTextShadowColor(Color.darkGray); lblDateEstablished.setTextHighlightColor(Color.gray); lblDateEstablished.setBackground(Color.lightGray); lblDateEstablished.setHorizontalAlignment(SwingConstants.LEFT); lblDateEstablished.setVerticalAlignment(SwingConstants.CENTER); lblDateEstablished.setHorizontalTextPosition(SwingConstants.RIGHT); lblDateEstablished.setVerticalTextPosition(SwingConstants.CENTER); lblDateEstablished.setWordWrap(false); lblDateEstablished.setFont(new Font("SansSerif", 0, 12)); // Initialize tbChangeCustType tbChangeCustType = new com.sssw.rt.jform.AgcJButton(); tbChangeCustType.setName("tbChangeCustType"); tbChangeCustType.setBounds(702,10,160,25); tbChangeCustType.setContentAreaFilled(true); tbChangeCustType.setBorderPainted(true); tbChangeCustType.setMargin(new Insets(1, 1, 1, 1)); tbChangeCustType.setHorizontalAlignment(SwingConstants.CENTER); tbChangeCustType.setVerticalAlignment(SwingConstants.CENTER); tbChangeCustType.setHorizontalTextPosition(SwingConstants.RIGHT); tbChangeCustType.setVerticalTextPosition(SwingConstants.CENTER); tbChangeCustType.setText("Change Customer Type"); tbChangeCustType.setFont(new Font("SansSerif", 1, 12)); tbChangeCustType.setForeground(Color.black); tbChangeCustType.setBackground(Color.lightGray); // Initialize cbCustomerType cbCustomerType = new com.sssw.rt.jform.AgcJComboBox(); cbCustomerType.setName("cbCustomerType"); cbCustomerType.setBounds(475,10,209,25); cbCustomerType.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbCustomerTypeModel = new DefaultComboBoxModel(); cbCustomerType.setModel(cbCustomerTypeModel); // Initialize ckAuthorizePurchases ckAuthorizePurchases = new com.sssw.rt.jform.AgcJCheckBox(); ckAuthorizePurchases.setName("ckAuthorizePurchases"); ckAuthorizePurchases.setBounds(888,330,13,20); ckAuthorizePurchases.setContentAreaFilled(false); ckAuthorizePurchases.setBorderPainted(false); ckAuthorizePurchases.setText(" "); ckAuthorizePurchases.setCheckedValue("Y"); ckAuthorizePurchases.setUncheckedValue("N"); ckAuthorizePurchases.setFont(new Font("SansSerif", 0, 12)); ckAuthorizePurchases.setForeground(Color.black); ckAuthorizePurchases.setBackground(Color.lightGray); // Initialize lblAuthorizePurchases lblAuthorizePurchases = new com.sssw.rt.jform.AgcJLabel(); lblAuthorizePurchases.setName("lblAuthorizePurchases"); lblAuthorizePurchases.setBounds(564,330,310,20); lblAuthorizePurchases.setText("Allow Purchases by Authorized Buyers Only"); lblAuthorizePurchases.setOpaque(false); lblAuthorizePurchases.setTextStyle(0); lblAuthorizePurchases.setForeground(Color.black); lblAuthorizePurchases.setTextShadowColor(Color.darkGray); lblAuthorizePurchases.setTextHighlightColor(Color.gray); lblAuthorizePurchases.setBackground(Color.lightGray); lblAuthorizePurchases.setHorizontalAlignment(SwingConstants.RIGHT); lblAuthorizePurchases.setVerticalAlignment(SwingConstants.CENTER); lblAuthorizePurchases.setHorizontalTextPosition(SwingConstants.RIGHT); lblAuthorizePurchases.setVerticalTextPosition(SwingConstants.CENTER); lblAuthorizePurchases.setWordWrap(false); lblAuthorizePurchases.setFont(new Font("SansSerif", 1, 12)); // Initialize lblCustomerType lblCustomerType = new com.sssw.rt.jform.AgcJLabel(); lblCustomerType.setName("lblCustomerType"); lblCustomerType.setBounds(308,12,155,20); lblCustomerType.setText("Customer Type is"); lblCustomerType.setOpaque(false); lblCustomerType.setTextStyle(0); lblCustomerType.setForeground(Color.black); lblCustomerType.setTextShadowColor(Color.darkGray); lblCustomerType.setTextHighlightColor(Color.gray); lblCustomerType.setBackground(Color.lightGray); lblCustomerType.setHorizontalAlignment(SwingConstants.RIGHT); lblCustomerType.setVerticalAlignment(SwingConstants.CENTER); lblCustomerType.setHorizontalTextPosition(SwingConstants.RIGHT); lblCustomerType.setVerticalTextPosition(SwingConstants.CENTER); lblCustomerType.setWordWrap(false); lblCustomerType.setFont(new Font("SansSerif", 1, 12)); // Initialize lblPOReqForPurchasesOver lblPOReqForPurchasesOver = new com.sssw.rt.jform.AgcJLabel(); lblPOReqForPurchasesOver.setName("lblPOReqForPurchasesOver"); lblPOReqForPurchasesOver.setBounds(561,157,310,20); lblPOReqForPurchasesOver.setText("PO Required for Purchases Over"); lblPOReqForPurchasesOver.setOpaque(false); lblPOReqForPurchasesOver.setTextStyle(0); lblPOReqForPurchasesOver.setForeground(Color.black); lblPOReqForPurchasesOver.setTextShadowColor(Color.darkGray); lblPOReqForPurchasesOver.setTextHighlightColor(Color.gray); lblPOReqForPurchasesOver.setBackground(Color.lightGray); lblPOReqForPurchasesOver.setHorizontalAlignment(SwingConstants.RIGHT); lblPOReqForPurchasesOver.setVerticalAlignment(SwingConstants.CENTER); lblPOReqForPurchasesOver.setHorizontalTextPosition(SwingConstants.RIGHT); lblPOReqForPurchasesOver.setVerticalTextPosition(SwingConstants.CENTER); lblPOReqForPurchasesOver.setWordWrap(false); lblPOReqForPurchasesOver.setFont(new Font("SansSerif", 1, 12)); // Initialize lblSalesIDNum lblSalesIDNum = new com.sssw.rt.jform.AgcJLabel(); lblSalesIDNum.setName("lblSalesIDNum"); lblSalesIDNum.setBounds(564,307,310,20); lblSalesIDNum.setText("Sales ID Number"); lblSalesIDNum.setOpaque(false); lblSalesIDNum.setTextStyle(0); lblSalesIDNum.setForeground(Color.black); lblSalesIDNum.setTextShadowColor(Color.darkGray); lblSalesIDNum.setTextHighlightColor(Color.gray); lblSalesIDNum.setBackground(Color.lightGray); lblSalesIDNum.setHorizontalAlignment(SwingConstants.RIGHT); lblSalesIDNum.setVerticalAlignment(SwingConstants.CENTER); lblSalesIDNum.setHorizontalTextPosition(SwingConstants.RIGHT); lblSalesIDNum.setVerticalTextPosition(SwingConstants.CENTER); lblSalesIDNum.setWordWrap(false); lblSalesIDNum.setFont(new Font("SansSerif", 1, 12)); // Initialize lblAltCustNumber lblAltCustNumber = new com.sssw.rt.jform.AgcJLabel(); lblAltCustNumber.setName("lblAltCustNumber"); lblAltCustNumber.setBounds(561,182,310,20); lblAltCustNumber.setText("Alternate Customer Number for Core Charges"); lblAltCustNumber.setOpaque(false); lblAltCustNumber.setTextStyle(0); lblAltCustNumber.setForeground(Color.black); lblAltCustNumber.setTextShadowColor(Color.darkGray); lblAltCustNumber.setTextHighlightColor(Color.gray); lblAltCustNumber.setBackground(Color.lightGray); lblAltCustNumber.setHorizontalAlignment(SwingConstants.RIGHT); lblAltCustNumber.setVerticalAlignment(SwingConstants.CENTER); lblAltCustNumber.setHorizontalTextPosition(SwingConstants.RIGHT); lblAltCustNumber.setVerticalTextPosition(SwingConstants.CENTER); lblAltCustNumber.setWordWrap(false); lblAltCustNumber.setFont(new Font("SansSerif", 1, 12)); // Initialize lblMonthlySalesPotential lblMonthlySalesPotential = new com.sssw.rt.jform.AgcJLabel(); lblMonthlySalesPotential.setName("lblMonthlySalesPotential"); lblMonthlySalesPotential.setBounds(561,207,310,20); lblMonthlySalesPotential.setText("Monthly Sales Potential"); lblMonthlySalesPotential.setOpaque(false); lblMonthlySalesPotential.setTextStyle(0); lblMonthlySalesPotential.setForeground(Color.black); lblMonthlySalesPotential.setTextShadowColor(Color.darkGray); lblMonthlySalesPotential.setTextHighlightColor(Color.gray); lblMonthlySalesPotential.setBackground(Color.lightGray); lblMonthlySalesPotential.setHorizontalAlignment(SwingConstants.RIGHT); lblMonthlySalesPotential.setVerticalAlignment(SwingConstants.CENTER); lblMonthlySalesPotential.setHorizontalTextPosition(SwingConstants.RIGHT); lblMonthlySalesPotential.setVerticalTextPosition(SwingConstants.CENTER); lblMonthlySalesPotential.setWordWrap(false); lblMonthlySalesPotential.setFont(new Font("SansSerif", 1, 12)); // Initialize fldEmail fldEmail = new com.sssw.rt.jform.AgcJTextField(); fldEmail.setName("fldEmail"); fldEmail.setBounds(180,394,400,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(16,394,150,20); lblEmail.setText("E-mail Address"); 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 lblAlphaKey lblAlphaKey = new com.sssw.rt.jform.AgcJLabel(); lblAlphaKey.setName("lblAlphaKey"); lblAlphaKey.setBounds(16,38,150,20); lblAlphaKey.setText("Alpha Key"); lblAlphaKey.setOpaque(false); lblAlphaKey.setTextStyle(0); lblAlphaKey.setForeground(Color.black); lblAlphaKey.setTextShadowColor(Color.darkGray); lblAlphaKey.setTextHighlightColor(Color.gray); lblAlphaKey.setBackground(Color.lightGray); lblAlphaKey.setHorizontalAlignment(SwingConstants.RIGHT); lblAlphaKey.setVerticalAlignment(SwingConstants.CENTER); lblAlphaKey.setHorizontalTextPosition(SwingConstants.RIGHT); lblAlphaKey.setVerticalTextPosition(SwingConstants.CENTER); lblAlphaKey.setWordWrap(false); lblAlphaKey.setFont(new Font("SansSerif", 1, 12)); // Initialize lblName lblName = new com.sssw.rt.jform.AgcJLabel(); lblName.setName("lblName"); lblName.setBounds(16,63,150,20); lblName.setText("Name"); lblName.setOpaque(false); lblName.setTextStyle(0); lblName.setForeground(Color.black); lblName.setTextShadowColor(Color.darkGray); lblName.setTextHighlightColor(Color.gray); lblName.setBackground(Color.lightGray); lblName.setHorizontalAlignment(SwingConstants.RIGHT); lblName.setVerticalAlignment(SwingConstants.CENTER); lblName.setHorizontalTextPosition(SwingConstants.RIGHT); lblName.setVerticalTextPosition(SwingConstants.CENTER); lblName.setWordWrap(false); lblName.setFont(new Font("SansSerif", 1, 12)); // Initialize lblAddress1 lblAddress1 = new com.sssw.rt.jform.AgcJLabel(); lblAddress1.setName("lblAddress1"); lblAddress1.setBounds(16,88,150,20); lblAddress1.setText("Address 1"); lblAddress1.setOpaque(false); lblAddress1.setTextStyle(0); lblAddress1.setForeground(Color.black); lblAddress1.setTextShadowColor(Color.darkGray); lblAddress1.setTextHighlightColor(Color.gray); lblAddress1.setBackground(Color.lightGray); lblAddress1.setHorizontalAlignment(SwingConstants.RIGHT); lblAddress1.setVerticalAlignment(SwingConstants.CENTER); lblAddress1.setHorizontalTextPosition(SwingConstants.RIGHT); lblAddress1.setVerticalTextPosition(SwingConstants.CENTER); lblAddress1.setWordWrap(false); lblAddress1.setFont(new Font("SansSerif", 1, 12)); // Initialize lblAddress2 lblAddress2 = new com.sssw.rt.jform.AgcJLabel(); lblAddress2.setName("lblAddress2"); lblAddress2.setBounds(16,113,150,20); lblAddress2.setText("Address 2"); lblAddress2.setOpaque(false); lblAddress2.setTextStyle(0); lblAddress2.setForeground(Color.black); lblAddress2.setTextShadowColor(Color.darkGray); lblAddress2.setTextHighlightColor(Color.gray); lblAddress2.setBackground(Color.lightGray); lblAddress2.setHorizontalAlignment(SwingConstants.RIGHT); lblAddress2.setVerticalAlignment(SwingConstants.CENTER); lblAddress2.setHorizontalTextPosition(SwingConstants.RIGHT); lblAddress2.setVerticalTextPosition(SwingConstants.CENTER); lblAddress2.setWordWrap(false); lblAddress2.setFont(new Font("SansSerif", 1, 12)); // Initialize lblCity lblCity = new com.sssw.rt.jform.AgcJLabel(); lblCity.setName("lblCity"); lblCity.setBounds(16,188,150,20); lblCity.setText("City"); lblCity.setOpaque(false); lblCity.setTextStyle(0); lblCity.setForeground(Color.black); lblCity.setTextShadowColor(Color.darkGray); lblCity.setTextHighlightColor(Color.gray); lblCity.setBackground(Color.lightGray); lblCity.setHorizontalAlignment(SwingConstants.RIGHT); lblCity.setVerticalAlignment(SwingConstants.CENTER); lblCity.setHorizontalTextPosition(SwingConstants.RIGHT); lblCity.setVerticalTextPosition(SwingConstants.CENTER); lblCity.setWordWrap(false); lblCity.setFont(new Font("SansSerif", 1, 12)); // Initialize lblState lblState = new com.sssw.rt.jform.AgcJLabel(); lblState.setName("lblState"); lblState.setBounds(16,238,150,20); lblState.setText("State"); lblState.setOpaque(false); lblState.setTextStyle(0); lblState.setForeground(Color.black); lblState.setTextShadowColor(Color.darkGray); lblState.setTextHighlightColor(Color.gray); lblState.setBackground(Color.lightGray); lblState.setHorizontalAlignment(SwingConstants.RIGHT); lblState.setVerticalAlignment(SwingConstants.CENTER); lblState.setHorizontalTextPosition(SwingConstants.RIGHT); lblState.setVerticalTextPosition(SwingConstants.CENTER); lblState.setWordWrap(false); lblState.setFont(new Font("SansSerif", 1, 12)); // Initialize lblZip lblZip = new com.sssw.rt.jform.AgcJLabel(); lblZip.setName("lblZip"); lblZip.setBounds(16,263,150,20); lblZip.setText("Postal Code"); lblZip.setOpaque(false); lblZip.setTextStyle(0); lblZip.setForeground(Color.black); lblZip.setTextShadowColor(Color.darkGray); lblZip.setTextHighlightColor(Color.gray); lblZip.setBackground(Color.lightGray); lblZip.setHorizontalAlignment(SwingConstants.RIGHT); lblZip.setVerticalAlignment(SwingConstants.CENTER); lblZip.setHorizontalTextPosition(SwingConstants.RIGHT); lblZip.setVerticalTextPosition(SwingConstants.CENTER); lblZip.setWordWrap(false); lblZip.setFont(new Font("SansSerif", 1, 12)); // Initialize lblPhone lblPhone = new com.sssw.rt.jform.AgcJLabel(); lblPhone.setName("lblPhone"); lblPhone.setBounds(16,288,150,20); lblPhone.setText("Phone Number"); lblPhone.setOpaque(false); lblPhone.setTextStyle(0); lblPhone.setForeground(Color.black); lblPhone.setTextShadowColor(Color.darkGray); lblPhone.setTextHighlightColor(Color.gray); lblPhone.setBackground(Color.lightGray); lblPhone.setHorizontalAlignment(SwingConstants.RIGHT); lblPhone.setVerticalAlignment(SwingConstants.CENTER); lblPhone.setHorizontalTextPosition(SwingConstants.RIGHT); lblPhone.setVerticalTextPosition(SwingConstants.CENTER); lblPhone.setWordWrap(false); lblPhone.setFont(new Font("SansSerif", 1, 12)); // Initialize lblNAPACategory lblNAPACategory = new com.sssw.rt.jform.AgcJLabel(); lblNAPACategory.setName("lblNAPACategory"); lblNAPACategory.setBounds(16,446,150,20); lblNAPACategory.setText("NAPA Category"); lblNAPACategory.setOpaque(false); lblNAPACategory.setTextStyle(0); lblNAPACategory.setForeground(Color.black); lblNAPACategory.setTextShadowColor(Color.darkGray); lblNAPACategory.setTextHighlightColor(Color.gray); lblNAPACategory.setBackground(Color.lightGray); lblNAPACategory.setHorizontalAlignment(SwingConstants.RIGHT); lblNAPACategory.setVerticalAlignment(SwingConstants.CENTER); lblNAPACategory.setHorizontalTextPosition(SwingConstants.RIGHT); lblNAPACategory.setVerticalTextPosition(SwingConstants.CENTER); lblNAPACategory.setWordWrap(false); lblNAPACategory.setFont(new Font("SansSerif", 1, 12)); // Initialize lblBillingType lblBillingType = new com.sssw.rt.jform.AgcJLabel(); lblBillingType.setName("lblBillingType"); lblBillingType.setBounds(561,234,310,20); lblBillingType.setText("Billing Type"); lblBillingType.setOpaque(false); lblBillingType.setTextStyle(0); lblBillingType.setForeground(Color.black); lblBillingType.setTextShadowColor(Color.darkGray); lblBillingType.setTextHighlightColor(Color.gray); lblBillingType.setBackground(Color.lightGray); lblBillingType.setHorizontalAlignment(SwingConstants.RIGHT); lblBillingType.setVerticalAlignment(SwingConstants.CENTER); lblBillingType.setHorizontalTextPosition(SwingConstants.RIGHT); lblBillingType.setVerticalTextPosition(SwingConstants.CENTER); lblBillingType.setWordWrap(false); lblBillingType.setFont(new Font("SansSerif", 1, 12)); // Initialize lblSalesRepNum lblSalesRepNum = new com.sssw.rt.jform.AgcJLabel(); lblSalesRepNum.setName("lblSalesRepNum"); lblSalesRepNum.setBounds(16,420,150,20); lblSalesRepNum.setText("Sales Rep."); lblSalesRepNum.setOpaque(false); lblSalesRepNum.setTextStyle(0); lblSalesRepNum.setForeground(Color.black); lblSalesRepNum.setTextShadowColor(Color.darkGray); lblSalesRepNum.setTextHighlightColor(Color.gray); lblSalesRepNum.setBackground(Color.lightGray); lblSalesRepNum.setHorizontalAlignment(SwingConstants.RIGHT); lblSalesRepNum.setVerticalAlignment(SwingConstants.CENTER); lblSalesRepNum.setHorizontalTextPosition(SwingConstants.RIGHT); lblSalesRepNum.setVerticalTextPosition(SwingConstants.CENTER); lblSalesRepNum.setWordWrap(false); lblSalesRepNum.setFont(new Font("SansSerif", 1, 12)); // Initialize fldAlphaKey fldAlphaKey = new com.sssw.rt.jform.AgcJTextField(); fldAlphaKey.setName("fldAlphaKey"); fldAlphaKey.setBounds(180,38,321,20); fldAlphaKey.setFont(new Font("SansSerif", 0, 12)); fldAlphaKey.setHorizontalAlignment(2); fldAlphaKey.setMargin(new Insets(1, 1, 1, 1)); fldAlphaKey.setEditable(true); fldAlphaKey.setForeground(Color.black); fldAlphaKey.setBackground(Color.white); fldAlphaKey.setMaxLength(AgcJTextField.NO_LIMIT); fldAlphaKey.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldName fldName = new com.sssw.rt.jform.AgcJTextField(); fldName.setName("fldName"); fldName.setBounds(180,63,320,20); fldName.setFont(new Font("SansSerif", 0, 12)); fldName.setHorizontalAlignment(2); fldName.setMargin(new Insets(1, 1, 1, 1)); fldName.setEditable(true); fldName.setForeground(Color.black); fldName.setBackground(Color.white); fldName.setMaxLength(AgcJTextField.NO_LIMIT); fldName.setMinLength(AgcJTextField.NO_LIMIT); // Initialize lblCFDIName lblCFDIName = new com.sssw.rt.jform.AgcJLabel(); lblCFDIName.setName("lblCFDIName"); lblCFDIName.setBounds(16,88,150,20); lblCFDIName.setText("CFDI Name"); lblCFDIName.setOpaque(false); lblCFDIName.setTextStyle(0); lblCFDIName.setForeground(Color.black); lblCFDIName.setTextShadowColor(Color.darkGray); lblCFDIName.setTextHighlightColor(Color.gray); lblCFDIName.setBackground(Color.lightGray); lblCFDIName.setHorizontalAlignment(SwingConstants.RIGHT); lblCFDIName.setVerticalAlignment(SwingConstants.CENTER); lblCFDIName.setHorizontalTextPosition(SwingConstants.RIGHT); lblCFDIName.setVerticalTextPosition(SwingConstants.CENTER); lblCFDIName.setWordWrap(false); lblCFDIName.setFont(new Font("SansSerif", 1, 12)); // Initialize fldCFDIName fldCFDIName = new com.sssw.rt.jform.AgcJTextField(); fldCFDIName.setName("fldCFDIName"); fldCFDIName.setBounds(180,88,320,20); fldCFDIName.setFont(new Font("SansSerif", 0, 12)); fldCFDIName.setHorizontalAlignment(2); fldCFDIName.setMargin(new Insets(1, 1, 1, 1)); fldCFDIName.setEditable(true); fldCFDIName.setForeground(Color.black); fldCFDIName.setBackground(Color.white); fldCFDIName.setMaxLength(AgcJTextField.NO_LIMIT); fldCFDIName.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldAddress1 fldAddress1 = new com.sssw.rt.jform.AgcJTextField(); fldAddress1.setName("fldAddress1"); fldAddress1.setBounds(180,88,320,20); fldAddress1.setFont(new Font("SansSerif", 0, 12)); fldAddress1.setHorizontalAlignment(2); fldAddress1.setMargin(new Insets(1, 1, 1, 1)); fldAddress1.setEditable(true); fldAddress1.setForeground(Color.black); fldAddress1.setBackground(Color.white); fldAddress1.setMaxLength(AgcJTextField.NO_LIMIT); fldAddress1.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldAddress2 fldAddress2 = new com.sssw.rt.jform.AgcJTextField(); fldAddress2.setName("fldAddress2"); fldAddress2.setBounds(180,113,320,20); fldAddress2.setFont(new Font("SansSerif", 0, 12)); fldAddress2.setHorizontalAlignment(2); fldAddress2.setMargin(new Insets(1, 1, 1, 1)); fldAddress2.setEditable(true); fldAddress2.setForeground(Color.black); fldAddress2.setBackground(Color.white); fldAddress2.setMaxLength(AgcJTextField.NO_LIMIT); fldAddress2.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldCity fldCity = new com.sssw.rt.jform.AgcJTextField(); fldCity.setName("fldCity"); fldCity.setBounds(180,188,240,20); fldCity.setFont(new Font("SansSerif", 0, 12)); fldCity.setHorizontalAlignment(2); fldCity.setMargin(new Insets(1, 1, 1, 1)); fldCity.setEditable(true); fldCity.setForeground(Color.black); fldCity.setBackground(Color.white); fldCity.setMaxLength(AgcJTextField.NO_LIMIT); fldCity.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldZipCode fldZipCode = new com.sssw.rt.jform.AgcJTextField(); fldZipCode.setName("fldZipCode"); fldZipCode.setBounds(180,263,80,20); fldZipCode.setFont(new Font("SansSerif", 0, 12)); fldZipCode.setHorizontalAlignment(2); fldZipCode.setMargin(new Insets(1, 1, 1, 1)); fldZipCode.setEditable(true); fldZipCode.setForeground(Color.black); fldZipCode.setBackground(Color.white); fldZipCode.setMaxLength(AgcJTextField.NO_LIMIT); fldZipCode.setMinLength(AgcJTextField.NO_LIMIT); // Initialize fldPhone fldPhone = new com.sssw.rt.jform.AgcJTextField(); fldPhone.setName("fldPhone"); fldPhone.setBounds(180,288,160,20); fldPhone.setFont(new Font("SansSerif", 0, 12)); fldPhone.setHorizontalAlignment(2); fldPhone.setMargin(new Insets(1, 1, 1, 1)); fldPhone.setEditable(true); fldPhone.setForeground(Color.black); fldPhone.setBackground(Color.white); fldPhone.setMaxLength(AgcJTextField.NO_LIMIT); fldPhone.setMinLength(AgcJTextField.NO_LIMIT); // Initialize cbRefState cbRefState = new com.sssw.rt.jform.AgcJComboBox(); cbRefState.setName("cbRefState"); cbRefState.setBounds(180,236,220,25); cbRefState.setEditable((boolean)false); cbRefState.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbRefStateModel = new DefaultComboBoxModel(); cbRefState.setModel(cbRefStateModel); // Initialize lblWebAddress lblWebAddress = new com.sssw.rt.jform.AgcJLabel(); lblWebAddress.setName("lblWebAddress"); lblWebAddress.setBounds(16,368,150,20); lblWebAddress.setText("Web Address"); lblWebAddress.setOpaque(false); lblWebAddress.setTextStyle(0); lblWebAddress.setForeground(Color.black); lblWebAddress.setTextShadowColor(Color.darkGray); lblWebAddress.setTextHighlightColor(Color.gray); lblWebAddress.setBackground(Color.lightGray); lblWebAddress.setHorizontalAlignment(SwingConstants.RIGHT); lblWebAddress.setVerticalAlignment(SwingConstants.CENTER); lblWebAddress.setHorizontalTextPosition(SwingConstants.RIGHT); lblWebAddress.setVerticalTextPosition(SwingConstants.CENTER); lblWebAddress.setWordWrap(false); lblWebAddress.setFont(new Font("SansSerif", 1, 12)); // Initialize fldWebAddress fldWebAddress = new com.sssw.rt.jform.AgcJTextField(); fldWebAddress.setName("fldWebAddress"); fldWebAddress.setBounds(180,368,400,20); fldWebAddress.setFont(new Font("SansSerif", 0, 12)); fldWebAddress.setHorizontalAlignment(2); fldWebAddress.setMargin(new Insets(1, 1, 1, 1)); fldWebAddress.setEditable(true); fldWebAddress.setForeground(Color.black); fldWebAddress.setBackground(Color.white); fldWebAddress.setMaxLength(AgcJTextField.NO_LIMIT); fldWebAddress.setMinLength(AgcJTextField.NO_LIMIT); // Initialize lblCustomerNote lblCustomerNote = new com.sssw.rt.jform.AgcJLabel(); lblCustomerNote.setName("lblCustomerNote"); lblCustomerNote.setBounds(16,497,150,20); lblCustomerNote.setText("Customer Note"); lblCustomerNote.setOpaque(false); lblCustomerNote.setTextStyle(0); lblCustomerNote.setForeground(Color.black); lblCustomerNote.setTextShadowColor(Color.darkGray); lblCustomerNote.setTextHighlightColor(Color.gray); lblCustomerNote.setBackground(Color.lightGray); lblCustomerNote.setHorizontalAlignment(SwingConstants.RIGHT); lblCustomerNote.setVerticalAlignment(SwingConstants.CENTER); lblCustomerNote.setHorizontalTextPosition(SwingConstants.RIGHT); lblCustomerNote.setVerticalTextPosition(SwingConstants.CENTER); lblCustomerNote.setWordWrap(false); lblCustomerNote.setFont(new Font("SansSerif", 1, 12)); // Initialize cbSalesRepNum cbSalesRepNum = new com.sssw.rt.jform.AgcJComboBox(); cbSalesRepNum.setName("cbSalesRepNum"); cbSalesRepNum.setBounds(180,418,401,25); cbSalesRepNum.setEditable((boolean)false); cbSalesRepNum.setFont(new Font("SansSerif", 0, 12)); cbSalesRepNum.setDisplayExpression(120); cbSalesRepNum.setValueExpression(121); cbSalesRepNum.setAutomaticQuery(true); // Initialize lblFaxNum lblFaxNum = new com.sssw.rt.jform.AgcJLabel(); lblFaxNum.setName("lblFaxNum"); lblFaxNum.setBounds(16,340,150,20); lblFaxNum.setText("Fax Number"); lblFaxNum.setOpaque(false); lblFaxNum.setTextStyle(0); lblFaxNum.setForeground(Color.black); lblFaxNum.setTextShadowColor(Color.darkGray); lblFaxNum.setTextHighlightColor(Color.gray); lblFaxNum.setBackground(Color.lightGray); lblFaxNum.setHorizontalAlignment(SwingConstants.RIGHT); lblFaxNum.setVerticalAlignment(SwingConstants.CENTER); lblFaxNum.setHorizontalTextPosition(SwingConstants.RIGHT); lblFaxNum.setVerticalTextPosition(SwingConstants.CENTER); lblFaxNum.setWordWrap(false); lblFaxNum.setFont(new Font("SansSerif", 1, 12)); // Initialize fldFaxNum fldFaxNum = new com.sssw.rt.jform.AgcJTextField(); fldFaxNum.setName("fldFaxNum"); fldFaxNum.setBounds(180,340,160,20); fldFaxNum.setFont(new Font("SansSerif", 0, 12)); fldFaxNum.setHorizontalAlignment(2); fldFaxNum.setMargin(new Insets(1, 1, 1, 1)); fldFaxNum.setEditable(true); fldFaxNum.setForeground(Color.black); fldFaxNum.setBackground(Color.white); fldFaxNum.setMaxLength(AgcJTextField.NO_LIMIT); fldFaxNum.setMinLength(AgcJTextField.NO_LIMIT); // Initialize lblCountry lblCountry = new com.sssw.rt.jform.AgcJLabel(); lblCountry.setName("lblCountry"); lblCountry.setBounds(16,213,150,20); lblCountry.setText("Country"); lblCountry.setOpaque(false); lblCountry.setTextStyle(0); lblCountry.setForeground(Color.black); lblCountry.setTextShadowColor(Color.darkGray); lblCountry.setTextHighlightColor(Color.gray); lblCountry.setBackground(Color.lightGray); lblCountry.setHorizontalAlignment(SwingConstants.RIGHT); lblCountry.setVerticalAlignment(SwingConstants.CENTER); lblCountry.setHorizontalTextPosition(SwingConstants.RIGHT); lblCountry.setVerticalTextPosition(SwingConstants.CENTER); lblCountry.setWordWrap(false); lblCountry.setFont(new Font("SansSerif", 1, 12)); // Initialize cbRefCountry cbRefCountry = new com.sssw.rt.jform.AgcJComboBox(); cbRefCountry.setName("cbRefCountry"); cbRefCountry.setBounds(180,211,220,25); cbRefCountry.setEditable((boolean)false); cbRefCountry.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbRefCountryModel = new DefaultComboBoxModel(); cbRefCountry.setModel(cbRefCountryModel); // Initialize fldSpeedDial fldSpeedDial = new com.sssw.rt.jform.AgcJTextField(); fldSpeedDial.setName("fldSpeedDial"); fldSpeedDial.setBounds(180,314,58,20); fldSpeedDial.setFont(new Font("SansSerif", 0, 12)); fldSpeedDial.setHorizontalAlignment(2); fldSpeedDial.setMargin(new Insets(1, 1, 1, 1)); fldSpeedDial.setEditable(true); fldSpeedDial.setForeground(Color.black); fldSpeedDial.setBackground(Color.white); fldSpeedDial.setMaxLength(AgcJTextField.NO_LIMIT); fldSpeedDial.setMinLength(AgcJTextField.NO_LIMIT); // Initialize lblSpeedDial lblSpeedDial = new com.sssw.rt.jform.AgcJLabel(); lblSpeedDial.setName("lblSpeedDial"); lblSpeedDial.setBounds(16,314,150,20); lblSpeedDial.setText("Speed Dial"); lblSpeedDial.setOpaque(false); lblSpeedDial.setTextStyle(0); lblSpeedDial.setForeground(Color.black); lblSpeedDial.setTextShadowColor(Color.darkGray); lblSpeedDial.setTextHighlightColor(Color.gray); lblSpeedDial.setBackground(Color.lightGray); lblSpeedDial.setHorizontalAlignment(SwingConstants.RIGHT); lblSpeedDial.setVerticalAlignment(SwingConstants.CENTER); lblSpeedDial.setHorizontalTextPosition(SwingConstants.RIGHT); lblSpeedDial.setVerticalTextPosition(SwingConstants.CENTER); lblSpeedDial.setWordWrap(false); lblSpeedDial.setFont(new Font("SansSerif", 1, 12)); // Initialize cbCustomerNote cbCustomerNote = new com.sssw.rt.jform.AgcJComboBox(); cbCustomerNote.setName("cbCustomerNote"); cbCustomerNote.setBounds(180,496,597,25); cbCustomerNote.setFont(new Font("SansSerif", 0, 12)); cbCustomerNote.setDisplayExpression(122); cbCustomerNote.setValueExpression(123); cbCustomerNote.setAutomaticQuery(true); // Initialize rbTransmitNationalSalesNo rbTransmitNationalSalesNo = new com.sssw.rt.jform.AgcJRadioButton(); rbTransmitNationalSalesNo.setName("rbTransmitNationalSalesNo"); rbTransmitNationalSalesNo.setBounds(937,105,55,20); rbTransmitNationalSalesNo.setContentAreaFilled(false); rbTransmitNationalSalesNo.setBorderPainted(false); rbTransmitNationalSalesNo.setMargin(new Insets(0, 0, 0, 0)); rbTransmitNationalSalesNo.setHorizontalAlignment(SwingConstants.LEFT); rbTransmitNationalSalesNo.setVerticalAlignment(SwingConstants.CENTER); rbTransmitNationalSalesNo.setHorizontalTextPosition(SwingConstants.RIGHT); rbTransmitNationalSalesNo.setVerticalTextPosition(SwingConstants.CENTER); rbTransmitNationalSalesNo.setText("No"); rbTransmitNationalSalesNo.setCheckedValue("N"); rbTransmitNationalSalesNo.setFont(new Font("SansSerif", 1, 12)); rbTransmitNationalSalesNo.setForeground(Color.black); rbTransmitNationalSalesNo.setBackground(Color.lightGray); TransmitNationalSales.add(rbTransmitNationalSalesNo); // Initialize rbTransmitNationalSalesYes rbTransmitNationalSalesYes = new com.sssw.rt.jform.AgcJRadioButton(); rbTransmitNationalSalesYes.setName("rbTransmitNationalSalesYes"); rbTransmitNationalSalesYes.setBounds(882,105,55,20); rbTransmitNationalSalesYes.setContentAreaFilled(false); rbTransmitNationalSalesYes.setBorderPainted(false); rbTransmitNationalSalesYes.setMargin(new Insets(0, 0, 0, 0)); rbTransmitNationalSalesYes.setHorizontalAlignment(SwingConstants.LEFT); rbTransmitNationalSalesYes.setVerticalAlignment(SwingConstants.CENTER); rbTransmitNationalSalesYes.setHorizontalTextPosition(SwingConstants.RIGHT); rbTransmitNationalSalesYes.setVerticalTextPosition(SwingConstants.CENTER); rbTransmitNationalSalesYes.setText("Yes"); rbTransmitNationalSalesYes.setCheckedValue("Y"); rbTransmitNationalSalesYes.setFont(new Font("SansSerif", 1, 12)); rbTransmitNationalSalesYes.setForeground(Color.black); rbTransmitNationalSalesYes.setBackground(Color.lightGray); TransmitNationalSales.add(rbTransmitNationalSalesYes); // Initialize rbTransmitJSASalesNo rbTransmitJSASalesNo = new com.sssw.rt.jform.AgcJRadioButton(); rbTransmitJSASalesNo.setName("rbTransmitJSASalesNo"); rbTransmitJSASalesNo.setBounds(937,55,55,20); rbTransmitJSASalesNo.setContentAreaFilled(false); rbTransmitJSASalesNo.setBorderPainted(false); rbTransmitJSASalesNo.setMargin(new Insets(0, 0, 0, 0)); rbTransmitJSASalesNo.setHorizontalAlignment(SwingConstants.LEFT); rbTransmitJSASalesNo.setVerticalAlignment(SwingConstants.CENTER); rbTransmitJSASalesNo.setHorizontalTextPosition(SwingConstants.RIGHT); rbTransmitJSASalesNo.setVerticalTextPosition(SwingConstants.CENTER); rbTransmitJSASalesNo.setText("No"); rbTransmitJSASalesNo.setCheckedValue("N"); rbTransmitJSASalesNo.setFont(new Font("SansSerif", 1, 12)); rbTransmitJSASalesNo.setForeground(Color.black); rbTransmitJSASalesNo.setBackground(Color.lightGray); TransmitJSASales.add(rbTransmitJSASalesNo); // Initialize rbTransmitJSASalesYes rbTransmitJSASalesYes = new com.sssw.rt.jform.AgcJRadioButton(); rbTransmitJSASalesYes.setName("rbTransmitJSASalesYes"); rbTransmitJSASalesYes.setBounds(882,55,55,20); rbTransmitJSASalesYes.setContentAreaFilled(false); rbTransmitJSASalesYes.setBorderPainted(false); rbTransmitJSASalesYes.setMargin(new Insets(0, 0, 0, 0)); rbTransmitJSASalesYes.setHorizontalAlignment(SwingConstants.LEFT); rbTransmitJSASalesYes.setVerticalAlignment(SwingConstants.CENTER); rbTransmitJSASalesYes.setHorizontalTextPosition(SwingConstants.RIGHT); rbTransmitJSASalesYes.setVerticalTextPosition(SwingConstants.CENTER); rbTransmitJSASalesYes.setText("Yes"); rbTransmitJSASalesYes.setCheckedValue("Y"); rbTransmitJSASalesYes.setFont(new Font("SansSerif", 1, 12)); rbTransmitJSASalesYes.setForeground(Color.black); rbTransmitJSASalesYes.setBackground(Color.lightGray); TransmitJSASales.add(rbTransmitJSASalesYes); // Initialize lblTransmitNationalSales lblTransmitNationalSales = new com.sssw.rt.jform.AgcJLabel(); lblTransmitNationalSales.setName("lblTransmitNationalSales"); lblTransmitNationalSales.setBounds(626,105,241,20); lblTransmitNationalSales.setText("Transmit Daily Sales"); lblTransmitNationalSales.setOpaque(false); lblTransmitNationalSales.setTextStyle(0); lblTransmitNationalSales.setForeground(Color.black); lblTransmitNationalSales.setTextShadowColor(Color.darkGray); lblTransmitNationalSales.setTextHighlightColor(Color.gray); lblTransmitNationalSales.setBackground(Color.lightGray); lblTransmitNationalSales.setHorizontalAlignment(SwingConstants.RIGHT); lblTransmitNationalSales.setVerticalAlignment(SwingConstants.CENTER); lblTransmitNationalSales.setHorizontalTextPosition(SwingConstants.RIGHT); lblTransmitNationalSales.setVerticalTextPosition(SwingConstants.CENTER); lblTransmitNationalSales.setWordWrap(false); lblTransmitNationalSales.setFont(new Font("SansSerif", 1, 12)); // Initialize lblTransmitJSASales lblTransmitJSASales = new com.sssw.rt.jform.AgcJLabel(); lblTransmitJSASales.setName("lblTransmitJSASales"); lblTransmitJSASales.setBounds(626,55,241,20); lblTransmitJSASales.setText("Transmit Monthly Sales"); lblTransmitJSASales.setOpaque(false); lblTransmitJSASales.setTextStyle(0); lblTransmitJSASales.setForeground(Color.black); lblTransmitJSASales.setTextShadowColor(Color.darkGray); lblTransmitJSASales.setTextHighlightColor(Color.gray); lblTransmitJSASales.setBackground(Color.lightGray); lblTransmitJSASales.setHorizontalAlignment(SwingConstants.RIGHT); lblTransmitJSASales.setVerticalAlignment(SwingConstants.CENTER); lblTransmitJSASales.setHorizontalTextPosition(SwingConstants.RIGHT); lblTransmitJSASales.setVerticalTextPosition(SwingConstants.CENTER); lblTransmitJSASales.setWordWrap(false); lblTransmitJSASales.setFont(new Font("SansSerif", 1, 12)); // Initialize lblLang lblLang = new com.sssw.rt.jform.AgcJLabel(); lblLang.setName("lblLang"); lblLang.setBounds(564,279,310,20); lblLang.setText("Language Preference"); lblLang.setOpaque(false); lblLang.setTextStyle(0); lblLang.setForeground(Color.black); lblLang.setTextShadowColor(Color.darkGray); lblLang.setTextHighlightColor(Color.gray); lblLang.setBackground(Color.lightGray); lblLang.setHorizontalAlignment(SwingConstants.RIGHT); lblLang.setVerticalAlignment(SwingConstants.CENTER); lblLang.setHorizontalTextPosition(SwingConstants.RIGHT); lblLang.setVerticalTextPosition(SwingConstants.CENTER); lblLang.setWordWrap(false); lblLang.setFont(new Font("SansSerif", 1, 12)); // Initialize cbLangPref cbLangPref = new com.sssw.rt.jform.AgcJComboBox(); cbLangPref.setName("cbLangPref"); cbLangPref.setBounds(885,279,115,25); cbLangPref.setEditable((boolean)false); cbLangPref.setFont(new Font("SansSerif", 0, 12)); cbLangPref.setDisplayExpression(132); cbLangPref.setValueExpression(131); // Initialize lblCustomerNum lblCustomerNum = new com.sssw.rt.jform.AgcJLabel(); lblCustomerNum.setName("lblCustomerNum"); lblCustomerNum.setBounds(16,12,150,20); lblCustomerNum.setText("Customer Number"); lblCustomerNum.setOpaque(false); lblCustomerNum.setTextStyle(0); lblCustomerNum.setForeground(Color.black); lblCustomerNum.setTextShadowColor(Color.darkGray); lblCustomerNum.setTextHighlightColor(Color.gray); lblCustomerNum.setBackground(Color.lightGray); lblCustomerNum.setHorizontalAlignment(SwingConstants.RIGHT); lblCustomerNum.setVerticalAlignment(SwingConstants.CENTER); lblCustomerNum.setHorizontalTextPosition(SwingConstants.RIGHT); lblCustomerNum.setVerticalTextPosition(SwingConstants.CENTER); lblCustomerNum.setWordWrap(false); lblCustomerNum.setFont(new Font("SansSerif", 1, 12)); // Initialize cbStoreCategory cbStoreCategory = new com.sssw.rt.jform.AgcJComboBox(); cbStoreCategory.setName("cbStoreCategory"); cbStoreCategory.setBounds(180,470,260,25); cbStoreCategory.setEditable((boolean)false); cbStoreCategory.setFont(new Font("SansSerif", 0, 12)); cbStoreCategory.setDisplayExpression(124); cbStoreCategory.setValueExpression(125); cbStoreCategory.setAutomaticQuery(true); // Initialize lblStoreCategory lblStoreCategory = new com.sssw.rt.jform.AgcJLabel(); lblStoreCategory.setName("lblStoreCategory"); lblStoreCategory.setBounds(16,472,150,19); lblStoreCategory.setText("Store Category"); lblStoreCategory.setOpaque(false); lblStoreCategory.setTextStyle(0); lblStoreCategory.setForeground(Color.black); lblStoreCategory.setTextShadowColor(Color.darkGray); lblStoreCategory.setTextHighlightColor(Color.gray); lblStoreCategory.setBackground(Color.lightGray); lblStoreCategory.setHorizontalAlignment(SwingConstants.RIGHT); lblStoreCategory.setVerticalAlignment(SwingConstants.CENTER); lblStoreCategory.setHorizontalTextPosition(SwingConstants.RIGHT); lblStoreCategory.setVerticalTextPosition(SwingConstants.CENTER); lblStoreCategory.setWordWrap(false); lblStoreCategory.setFont(new Font("SansSerif", 1, 12)); // Initialize rectTransmitSection rectTransmitSection = new com.sssw.rt.form.AgcRectangle(); rectTransmitSection.setName("rectTransmitSection"); rectTransmitSection.setBounds(621,45,378,108); rectTransmitSection.setColor(Color.lightGray); rectTransmitSection.setBorderStyle(4); rectTransmitSection.setText(""); rectTransmitSection.setFont(new Font("SansSerif", 0, 12)); rectTransmitSection.setForeground(Color.black); rectTransmitSection.setTransparent(true); // Initialize lblCustomerSearch lblCustomerSearch = new com.sssw.rt.jform.AgcJLabel(); lblCustomerSearch.setName("lblCustomerSearch"); lblCustomerSearch.setBounds(5,35,77,20); lblCustomerSearch.setText("Customer"); lblCustomerSearch.setOpaque(false); lblCustomerSearch.setTextStyle(0); lblCustomerSearch.setForeground(Color.black); lblCustomerSearch.setTextShadowColor(Color.darkGray); lblCustomerSearch.setTextHighlightColor(Color.gray); lblCustomerSearch.setBackground(Color.lightGray); lblCustomerSearch.setHorizontalAlignment(SwingConstants.RIGHT); lblCustomerSearch.setVerticalAlignment(SwingConstants.CENTER); lblCustomerSearch.setHorizontalTextPosition(SwingConstants.RIGHT); lblCustomerSearch.setVerticalTextPosition(SwingConstants.CENTER); lblCustomerSearch.setWordWrap(false); lblCustomerSearch.setFont(new Font("SansSerif", 1, 12)); // Initialize lblCMHeader lblCMHeader = new com.sssw.rt.jform.AgcJLabel(); lblCMHeader.setName("lblCMHeader"); lblCMHeader.setBounds(277,5,700,27); lblCMHeader.setText("Customer Information"); lblCMHeader.setOpaque(false); lblCMHeader.setTextStyle(0); lblCMHeader.setForeground(AgoColorManager.getColor(24, 24, 231)); lblCMHeader.setTextShadowColor(Color.darkGray); lblCMHeader.setTextHighlightColor(Color.gray); lblCMHeader.setBackground(Color.lightGray); lblCMHeader.setHorizontalAlignment(SwingConstants.RIGHT); lblCMHeader.setVerticalAlignment(SwingConstants.CENTER); lblCMHeader.setHorizontalTextPosition(SwingConstants.RIGHT); lblCMHeader.setVerticalTextPosition(SwingConstants.CENTER); lblCMHeader.setWordWrap(false); lblCMHeader.setFont(new Font("SansSerif", 3, 24)); // Initialize Rectangle1 Rectangle1 = new com.sssw.rt.form.AgcRectangle(); Rectangle1.setName("Rectangle1"); Rectangle1.setBounds(197,35,369,20); Rectangle1.setColor(Color.lightGray); Rectangle1.setBorderStyle(4); Rectangle1.setText(""); Rectangle1.setFont(new Font("SansSerif", 0, 12)); Rectangle1.setForeground(Color.black); Rectangle1.setTransparent(true); // Initialize lblPriorityPlus lblPriorityPlus = new com.sssw.rt.jform.AgcJLabel(); lblPriorityPlus.setName("lblPriorityPlus"); lblPriorityPlus.setBounds(650, 396, 130, 20); lblPriorityPlus.setText("Priority Plus"); lblPriorityPlus.setOpaque(false); lblPriorityPlus.setTextStyle(0); lblPriorityPlus.setForeground(Color.black); lblPriorityPlus.setTextShadowColor(Color.darkGray); lblPriorityPlus.setTextHighlightColor(Color.gray); lblPriorityPlus.setBackground(Color.lightGray); lblPriorityPlus.setHorizontalAlignment(SwingConstants.RIGHT); lblPriorityPlus.setVerticalAlignment(SwingConstants.CENTER); lblPriorityPlus.setHorizontalTextPosition(SwingConstants.RIGHT); lblPriorityPlus.setVerticalTextPosition(SwingConstants.CENTER); lblPriorityPlus.setWordWrap(false); lblPriorityPlus.setFont(new Font("SansSerif", 1, 12)); // Initialize ckPriorityPlus ckPriorityPlus = new com.sssw.rt.jform.AgcJCheckBox(); ckPriorityPlus.setName("ckPriorityPlus"); ckPriorityPlus.setBounds(790, 396, 18, 20); ckPriorityPlus.setContentAreaFilled(false); ckPriorityPlus.setBorderPainted(false); ckPriorityPlus.setText(""); ckPriorityPlus.setFont(new Font("SansSerif", 0, 12)); ckPriorityPlus.setForeground(Color.black); ckPriorityPlus.setBackground(Color.lightGray); ckPriorityPlus.setHorizontalTextPosition(SwingConstants.LEFT); ckPriorityPlus.setEnabled(false); // Initialize lblPriorityPlusLock lblPriorityPlusLock = new com.sssw.rt.jform.AgcJLabel(); lblPriorityPlusLock.setName("lblPriorityPlusLock"); lblPriorityPlusLock.setBounds(820, 396, 45, 20); lblPriorityPlusLock.setText("Lock"); lblPriorityPlusLock.setOpaque(false); lblPriorityPlusLock.setTextStyle(0); lblPriorityPlusLock.setForeground(Color.black); lblPriorityPlusLock.setTextShadowColor(Color.darkGray); lblPriorityPlusLock.setTextHighlightColor(Color.gray); lblPriorityPlus.setBackground(Color.lightGray); lblPriorityPlusLock.setHorizontalAlignment(SwingConstants.RIGHT); lblPriorityPlusLock.setVerticalAlignment(SwingConstants.CENTER); lblPriorityPlusLock.setHorizontalTextPosition(SwingConstants.RIGHT); lblPriorityPlusLock.setVerticalTextPosition(SwingConstants.CENTER); lblPriorityPlusLock.setWordWrap(false); lblPriorityPlusLock.setFont(new Font("SansSerif", 1, 12)); // Initialize ckPriorityPlusLock ckPriorityPlusLock = new com.sssw.rt.jform.AgcJCheckBox(); ckPriorityPlusLock.setName("ckPriorityPlusLock"); ckPriorityPlusLock.setBounds(880, 396, 18, 20); ckPriorityPlusLock.setContentAreaFilled(false); ckPriorityPlusLock.setBorderPainted(false); ckPriorityPlusLock.setText(""); ckPriorityPlusLock.setFont(new Font("SansSerif", 0, 12)); ckPriorityPlusLock.setForeground(Color.black); ckPriorityPlusLock.setBackground(Color.lightGray); ckPriorityPlusLock.setHorizontalTextPosition(SwingConstants.LEFT); ckPriorityPlusLock.setEnabled(false); // Initialize lblShowPriorityPlus lblShowPriorityPlus = new com.sssw.rt.jform.AgcJLabel(); lblShowPriorityPlus.setName("lblShowPriorityPlus"); lblShowPriorityPlus.setBounds(277, 30, 700, 27); lblShowPriorityPlus.setText("Priority Plus"); lblShowPriorityPlus.setOpaque(false); lblShowPriorityPlus.setTextStyle(0); lblShowPriorityPlus.setForeground(Color.red); lblShowPriorityPlus.setTextShadowColor(Color.darkGray); lblShowPriorityPlus.setTextHighlightColor(Color.gray); lblShowPriorityPlus.setBackground(Color.lightGray); lblShowPriorityPlus.setHorizontalAlignment(SwingConstants.RIGHT); lblShowPriorityPlus.setVerticalAlignment(SwingConstants.CENTER); lblShowPriorityPlus.setHorizontalTextPosition(SwingConstants.RIGHT); lblShowPriorityPlus.setVerticalTextPosition(SwingConstants.CENTER); lblShowPriorityPlus.setWordWrap(false); lblShowPriorityPlus.setFont(new Font("SansSerif", 3, 24)); // Initialize lblTaxExemptExpDate lblTaxNumber = new com.sssw.rt.jform.AgcJLabel(); lblTaxNumber.setName("lblTaxNumber"); lblTaxNumber.setBounds(300,105,284,20); lblTaxNumber.setText("Tax Number"); lblTaxNumber.setOpaque(false); lblTaxNumber.setTextStyle(0); lblTaxNumber.setForeground(Color.black); lblTaxNumber.setTextShadowColor(Color.darkGray); lblTaxNumber.setTextHighlightColor(Color.gray); lblTaxNumber.setBackground(Color.lightGray); lblTaxNumber.setHorizontalAlignment(SwingConstants.RIGHT); lblTaxNumber.setVerticalAlignment(SwingConstants.CENTER); lblTaxNumber.setHorizontalTextPosition(SwingConstants.RIGHT); lblTaxNumber.setVerticalTextPosition(SwingConstants.CENTER); lblTaxNumber.setWordWrap(false); lblTaxNumber.setFont(new Font("SansSerif", 1, 12)); fldPrimaryTaxNumber = new com.sssw.rt.jform.AgcJTextField(); fldPrimaryTaxNumber.setName("fldPrimaryTaxNumber"); fldPrimaryTaxNumber.setBounds(599,105,132,20); fldPrimaryTaxNumber.setFont(new Font("SansSerif", 0, 12)); fldPrimaryTaxNumber.setHorizontalAlignment(2); fldPrimaryTaxNumber.setMargin(new Insets(1, 1, 1, 1)); fldPrimaryTaxNumber.setEditable(true); fldPrimaryTaxNumber.setForeground(Color.black); fldPrimaryTaxNumber.setBackground(Color.white); fldPrimaryTaxNumber.setMaxLength(AgcJTextField.NO_LIMIT); fldPrimaryTaxNumber.setMinLength(AgcJTextField.NO_LIMIT); fldSecondaryTaxNumber = new com.sssw.rt.jform.AgcJTextField(); fldSecondaryTaxNumber.setName("fldSecondaryTaxNumber"); fldSecondaryTaxNumber.setBounds(799,104,132,20); fldSecondaryTaxNumber.setFont(new Font("SansSerif", 0, 12)); fldSecondaryTaxNumber.setHorizontalAlignment(2); fldSecondaryTaxNumber.setMargin(new Insets(1, 1, 1, 1)); fldSecondaryTaxNumber.setEditable(true); fldSecondaryTaxNumber.setForeground(Color.black); fldSecondaryTaxNumber.setBackground(Color.white); fldSecondaryTaxNumber.setMaxLength(AgcJTextField.NO_LIMIT); fldSecondaryTaxNumber.setMinLength(AgcJTextField.NO_LIMIT); // Initialize lblIbsAccount lblIbsAccount = new com.sssw.rt.jform.AgcJLabel(); lblIbsAccount.setName("lblIbsAccount"); lblIbsAccount.setBounds(650, 434, 130, 20); lblIbsAccount.setText("IBS Account"); lblIbsAccount.setOpaque(false); lblIbsAccount.setTextStyle(0); lblIbsAccount.setForeground(Color.black); lblIbsAccount.setTextShadowColor(Color.darkGray); lblIbsAccount.setTextHighlightColor(Color.gray); lblIbsAccount.setBackground(Color.lightGray); lblIbsAccount.setHorizontalAlignment(SwingConstants.RIGHT); lblIbsAccount.setVerticalAlignment(SwingConstants.CENTER); lblIbsAccount.setHorizontalTextPosition(SwingConstants.RIGHT); lblIbsAccount.setVerticalTextPosition(SwingConstants.CENTER); lblIbsAccount.setWordWrap(false); lblIbsAccount.setFont(new Font("SansSerif", 1, 12)); // Initialize ckIbsAccount ckIbsAccount = new com.sssw.rt.jform.AgcJCheckBox(); ckIbsAccount.setName("ckIbsAccount"); ckIbsAccount.setBounds(790, 434, 18, 20); ckIbsAccount.setContentAreaFilled(false); ckIbsAccount.setBorderPainted(false); ckIbsAccount.setText(" "); ckIbsAccount.setCheckedValue("Y"); ckIbsAccount.setUncheckedValue("N"); ckIbsAccount.setFont(new Font("SansSerif", 0, 12)); ckIbsAccount.setForeground(Color.black); ckIbsAccount.setBackground(Color.lightGray); recDirectShip = new com.sssw.rt.form.AgcRectangle(); recDirectShip.setName("recDirectShip"); recDirectShip.setBounds(587,475,407,60); recDirectShip.setColor(Color.lightGray); recDirectShip.setBorderStyle(4); recDirectShip.setText("Direct Shipment"); recDirectShip.setFont(new Font("SansSerif", 1, 12)); recDirectShip.setForeground(Color.black); recDirectShip.setTransparent(true); // Initialize lblDirectShip lblDirectShip = new com.sssw.rt.jform.AgcJLabel(); lblDirectShip.setName("lblDirectShip"); lblDirectShip.setBounds(650,500,220,20); lblDirectShip.setText("Direct to Consumer Shipping Eligible"); lblDirectShip.setOpaque(false); lblDirectShip.setTextStyle(0); lblDirectShip.setForeground(Color.black); lblDirectShip.setTextShadowColor(Color.darkGray); lblDirectShip.setTextHighlightColor(Color.gray); lblDirectShip.setBackground(Color.lightGray); lblDirectShip.setHorizontalAlignment(SwingConstants.RIGHT); lblDirectShip.setVerticalAlignment(SwingConstants.CENTER); lblDirectShip.setHorizontalTextPosition(SwingConstants.RIGHT); lblDirectShip.setVerticalTextPosition(SwingConstants.CENTER); lblDirectShip.setWordWrap(false); lblDirectShip.setFont(new Font("SansSerif", 1, 12)); // Initialize ckIbsAccount ckDirectShip = new com.sssw.rt.jform.AgcJCheckBox(); ckDirectShip.setName("ckDirectShip"); ckDirectShip.setBounds(895, 500, 13, 20); ckDirectShip.setContentAreaFilled(false); ckDirectShip.setBorderPainted(false); ckDirectShip.setText(" "); ckDirectShip.setCheckedValue("Y"); ckDirectShip.setUncheckedValue("N"); ckDirectShip.setFont(new Font("SansSerif", 0, 12)); ckDirectShip.setForeground(Color.black); ckDirectShip.setBackground(Color.lightGray); // Initialize lblAllowOnlyCoreSales lblAllowOnlyCoreSales = new com.sssw.rt.jform.AgcJLabel(); lblAllowOnlyCoreSales.setName("lblAllowOnlyCoreSales"); lblAllowOnlyCoreSales.setBounds(670, 472, 200, 20); lblAllowOnlyCoreSales.setText("Allow Only Core Sales"); lblAllowOnlyCoreSales.setOpaque(false); lblAllowOnlyCoreSales.setTextStyle(0); lblAllowOnlyCoreSales.setForeground(Color.black); lblAllowOnlyCoreSales.setTextShadowColor(Color.darkGray); lblAllowOnlyCoreSales.setTextHighlightColor(Color.gray); lblAllowOnlyCoreSales.setBackground(Color.lightGray); lblAllowOnlyCoreSales.setHorizontalAlignment(SwingConstants.RIGHT); lblAllowOnlyCoreSales.setVerticalAlignment(SwingConstants.CENTER); lblAllowOnlyCoreSales.setHorizontalTextPosition(SwingConstants.RIGHT); lblAllowOnlyCoreSales.setVerticalTextPosition(SwingConstants.CENTER); lblAllowOnlyCoreSales.setWordWrap(false); lblAllowOnlyCoreSales.setFont(new Font("SansSerif", 1, 12)); // Initialize ckAllowOnlyCoreSales ckAllowOnlyCoreSales = new com.sssw.rt.jform.AgcJCheckBox(); ckAllowOnlyCoreSales.setName("ckAllowOnlyCoreSales"); ckAllowOnlyCoreSales.setBounds(880, 472, 18, 20); ckAllowOnlyCoreSales.setContentAreaFilled(false); ckAllowOnlyCoreSales.setBorderPainted(false); ckAllowOnlyCoreSales.setText(" "); ckAllowOnlyCoreSales.setCheckedValue("Y"); ckAllowOnlyCoreSales.setUncheckedValue("N"); ckAllowOnlyCoreSales.setFont(new Font("SansSerif", 0, 12)); ckAllowOnlyCoreSales.setForeground(Color.black); ckAllowOnlyCoreSales.setBackground(Color.lightGray); // Initialize lblUsoCFDI lblUsoCFDI = new com.sssw.rt.jform.AgcJLabel(); lblUsoCFDI.setName("lblUsoCFDI"); lblUsoCFDI.setBounds(380,446,130,20); lblUsoCFDI.setText("Uso CFDI"); lblUsoCFDI.setOpaque(false); lblUsoCFDI.setTextStyle(0); lblUsoCFDI.setForeground(Color.black); lblUsoCFDI.setTextShadowColor(Color.darkGray); lblUsoCFDI.setTextHighlightColor(Color.gray); lblUsoCFDI.setBackground(Color.lightGray); lblUsoCFDI.setHorizontalAlignment(SwingConstants.RIGHT); lblUsoCFDI.setVerticalAlignment(SwingConstants.CENTER); lblUsoCFDI.setHorizontalTextPosition(SwingConstants.RIGHT); lblUsoCFDI.setVerticalTextPosition(SwingConstants.CENTER); lblUsoCFDI.setWordWrap(false); lblUsoCFDI.setFont(new Font("SansSerif", 1, 12)); // Initialize cbUsoCFDI cbUsoCFDI = new com.sssw.rt.jform.AgcJComboBox(); cbUsoCFDI.setName("cbUsoCFDI"); cbUsoCFDI.setBounds(524,446,410,25); cbUsoCFDI.setFont(new Font("SansSerif", 0, 12)); DefaultComboBoxModel cbUsoCFDIModel = new DefaultComboBoxModel(); cbUsoCFDI.setModel(cbUsoCFDIModel); // Initialize lblDNSCustomer lblDNSCustomer = new com.sssw.rt.jform.AgcJLabel(); lblDNSCustomer.setName("lblDNSCustomer"); lblDNSCustomer.setBounds(650, 421, 130, 20); lblDNSCustomer.setText("DNS Customer"); lblDNSCustomer.setOpaque(false); lblDNSCustomer.setTextStyle(0); lblDNSCustomer.setForeground(Color.black); lblDNSCustomer.setTextShadowColor(Color.darkGray); lblDNSCustomer.setTextHighlightColor(Color.gray); lblDNSCustomer.setBackground(Color.lightGray); lblDNSCustomer.setHorizontalAlignment(SwingConstants.RIGHT); lblDNSCustomer.setVerticalAlignment(SwingConstants.CENTER); lblDNSCustomer.setHorizontalTextPosition(SwingConstants.RIGHT); lblDNSCustomer.setVerticalTextPosition(SwingConstants.CENTER); lblDNSCustomer.setWordWrap(false); lblDNSCustomer.setFont(new Font("SansSerif", 1, 12)); // Initialize ckDNSCustomer ckDNSCustomer = new com.sssw.rt.jform.AgcJCheckBox(); ckDNSCustomer.setName("ckDNSCustomer"); ckDNSCustomer.setBounds(790, 421, 18, 20); ckDNSCustomer.setContentAreaFilled(false); ckDNSCustomer.setBorderPainted(false); ckDNSCustomer.setText(""); ckDNSCustomer.setFont(new Font("SansSerif", 0, 12)); ckDNSCustomer.setForeground(Color.black); ckDNSCustomer.setBackground(Color.lightGray); ckDNSCustomer.setHorizontalTextPosition(SwingConstants.LEFT); ckDNSCustomer.setEnabled(false); // Initialize lblDNSCustomerLock lblDNSCustomerLock = new com.sssw.rt.jform.AgcJLabel(); lblDNSCustomerLock.setName("lblDNSCustomerLock"); lblDNSCustomerLock.setBounds(820, 421, 45, 20); lblDNSCustomerLock.setText("Lock"); lblDNSCustomerLock.setOpaque(false); lblDNSCustomerLock.setTextStyle(0); lblDNSCustomerLock.setForeground(Color.black); lblDNSCustomerLock.setTextShadowColor(Color.darkGray); lblDNSCustomerLock.setTextHighlightColor(Color.gray); lblDNSCustomer.setBackground(Color.lightGray); lblDNSCustomerLock.setHorizontalAlignment(SwingConstants.RIGHT); lblDNSCustomerLock.setVerticalAlignment(SwingConstants.CENTER); lblDNSCustomerLock.setHorizontalTextPosition(SwingConstants.RIGHT); lblDNSCustomerLock.setVerticalTextPosition(SwingConstants.CENTER); lblDNSCustomerLock.setWordWrap(false); lblDNSCustomerLock.setFont(new Font("SansSerif", 1, 12)); // Initialize ckDNSCustomerLock ckDNSCustomerLock = new com.sssw.rt.jform.AgcJCheckBox(); ckDNSCustomerLock.setName("ckDNSCustomerLock"); ckDNSCustomerLock.setBounds(880, 421, 18, 20); ckDNSCustomerLock.setContentAreaFilled(false); ckDNSCustomerLock.setBorderPainted(false); ckDNSCustomerLock.setText(""); ckDNSCustomerLock.setFont(new Font("SansSerif", 0, 12)); ckDNSCustomerLock.setForeground(Color.black); ckDNSCustomerLock.setBackground(Color.lightGray); ckDNSCustomerLock.setHorizontalTextPosition(SwingConstants.LEFT); ckDNSCustomerLock.setEnabled(false); if (refElectronicInvoiceVendorId != null && refElectronicInvoiceVendorId.intValue()>0) { lblExtension.setBounds(369,314,71,20); fldExtension.setBounds(451,314,66,20); fldAddress4.setBounds(180,188,320,20); lblAddress4.setBounds(16,188,150,20); fldAddress3.setBounds(180,163,320,20); lblAddress3.setBounds(16,163,150,20); lblAddress1.setBounds(16,113,150,20); lblAddress2.setBounds(16,138,150,20); lblCity.setBounds(16,213,150,20); lblState.setBounds(16,263,150,20); lblZip.setBounds(16,288,150,20); lblPhone.setBounds(16,314,150,20); fldAddress1.setBounds(180,113,320,20); fldAddress2.setBounds(180,138,320,20); fldCity.setBounds(180,211,240,20); fldZipCode.setBounds(180,288,80,20); fldPhone.setBounds(180,314,160,20); cbRefState.setBounds(180,263,220,25); lblCountry.setBounds(16,238,150,20); cbRefCountry.setBounds(180,236,220,25); fldSpeedDial.setBounds(451,340,66,20); lblSpeedDial.setBounds(369,340,71,20); lblIbsAccount.setBounds(740, 497, 130, 20); ckIbsAccount.setBounds(880, 496, 18, 20); } addControls(); addBindings(); // Setup tab order Component[] tabOrder = { cbPriTaxStatus, fldSearch, pbSearch, fldCustomerNum, cbCustomerType, fldAlphaKey, fldName, fldAddress1, fldAddress2, fldAddress3, fldAddress4, fldCity, cbRefCountry, cbRefState, fldZipCode, cbCorporationType, fldPhone, fldExtension, fldSpeedDial, fldFaxNum, fldWebAddress, // fldEmail, cbSalesRepNum, cbCategory, cbStoreCategory, cbCustomerNote, fldCFDIName, rbTransmitJSASalesYes, rbTransmitJSASalesNo, rbTransmitNationalSalesYes, rbTransmitNationalSalesNo, fldMinAmtForPO, fldAltCustNumber, fldMonthlySalesPotential, cbBillingType, cbLangPref, fldSalesIDNumber, ckAuthorizePurchases, ckPriorityPlus, ckPriorityPlusLock, cbUsoCFDI, ckAllowOnlyCoreSales, ckIbsAccount, ckDNSCustomer, ckDNSCustomerLock, tbChangeCustType, cbDeliveryTaxTable, cbDefaultTaxTable, fldPriTaxExemptNumber, fldPriTaxExemptExpDate, cbSecTaxStatus, fldSecTaxExemptNumber, fldSecTaxExemptExpDate, ckPrintMSDS, ckAllowBackorders, ckPrintCatalogNotes, ckAllowSpecialOrders, ckPrintBalance, ckExemptEnvCharges, fldNoAdditionalInvCopies, // fldEmailInvoices, ckPromptForESignatureOnAllInvoices, cbFlag, cbType, fldAmount, cbInvFlag, fldInvDiscount, cbDeliverFlg, cbDeliveryRoute, tabCustomer, cbDeliveryPriority, fldTravelTimeToCust, fldDistanceToCust, fldMinSalesFreeDel, fldDeliveryCharge, fldCustomerId, cbEmpID, ckCustomerPresent, cbServingStore, ckPriceLocked, fldPriceMaxDiscount, lblDirectShip, ckDirectShip }; setUserDefinedTabOrder(tabOrder); return; } protected void addAllFormControls() { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === this.add(agcCommunicationDirectory); this.add(agcDsoGen); this.add(Label1); this.add(fldSearch); this.add(fldCustomerId); this.add(lblCustName); this.add(agcCustomerAR); this.add(agcAlternateCustomer); this.add(pbSearch); this.add(agcCustomerDelivery); this.add(agcCustomerUserDefinedField); this.add(agcCustomer); this.add(tabCustomer); TAMSMouseListener tamsMouseListener = new TAMSMouseListener(); tabCustomer.addMouseListener(tamsMouseListener); tabCustomerPane0.addMouseListener(tamsMouseListener); tabCustomerPane1.addMouseListener(tamsMouseListener); tabCustomerPane2.addMouseListener(tamsMouseListener); tabCustomerPane3.addMouseListener(tamsMouseListener); tabCustomerPane4.addMouseListener(tamsMouseListener); tabCustomerPane5.addMouseListener(tamsMouseListener); tabCustomerPane6.addMouseListener(tamsMouseListener); tabCustomerPane7.addMouseListener(tamsMouseListener); tabCustomerPane8.addMouseListener(tamsMouseListener); tabCustomerPane9.addMouseListener(tamsMouseListener); tabCustomerPane10.addMouseListener(tamsMouseListener); tabCustomerPane11.addMouseListener(tamsMouseListener); tabCustomerPane12.addMouseListener(tamsMouseListener); tabCustomerPane13.addMouseListener(tamsMouseListener); tabCustomer.addChangeListener(this); tabCustomerPane1.add(ckCustomerPresent); tabCustomerPane1.add(lblCustomerPresent); tabCustomerPane0.add(lblBillingTypeVerify); tabCustomerPane1.add(lblSecondaryTaxExemptNum); tabCustomerPane1.add(fldSecTaxExemptExpDate); tabCustomerPane1.add(fldPriTaxExemptExpDate); tabCustomerPane1.add(dsoGeneric); tabCustomerPane1.add(lblDistanceUnits); tabCustomerPane1.add(lblTravelTimeUnits); tabCustomerPane1.add(cbDeliverFlg); tabCustomerPane1.add(fldDeliveryCharge); tabCustomerPane1.add(fldMinSalesFreeDel); tabCustomerPane1.add(fldAmount); tabCustomerPane1.add(fldDistanceToCust); tabCustomerPane1.add(fldTravelTimeToCust); tabCustomerPane1.add(fldInvDiscount); tabCustomerPane1.add(fldNoAdditionalInvCopies); tabCustomerPane1.add(lblModifiedEmplInv); tabCustomerPane1.add(lblMinSalesFreeDel); tabCustomerPane1.add(lblDeliveryCharge); tabCustomerPane1.add(lblDistanceToCust); tabCustomerPane1.add(lblTravelTimeToCust); tabCustomerPane1.add(cbDeliveryPriority); tabCustomerPane1.add(lblDeliveryPriority); tabCustomerPane1.add(lblDeliveryRoute); tabCustomerPane1.add(cbDeliveryRoute); tabCustomerPane1.add(lblDeliveryFlag); tabCustomerPane1.add(lblInvFlag); tabCustomerPane1.add(lblDiscountPerc); tabCustomerPane1.add(cbInvFlag); tabCustomerPane1.add(recDeliveryInformation); tabCustomerPane1.add(cbType); tabCustomerPane1.add(cbFlag); tabCustomerPane1.add(lblType); tabCustomerPane1.add(lblAmount); tabCustomerPane1.add(lblFlag); tabCustomerPane1.add(recInvoiceSurcharge); tabCustomerPane1.add(ckAllowSpecialOrders); tabCustomerPane1.add(ckAllowBackorders); tabCustomerPane1.add(ckPrintBalance); tabCustomerPane1.add(ckPrintCatalogNotes); tabCustomerPane1.add(ckPrintMSDS); tabCustomerPane1.add(lblPrintMSDS); tabCustomerPane1.add(lblPrintCatalogNotes); tabCustomerPane1.add(lblAllowSpecialOrders); tabCustomerPane1.add(lblAllowBackorders); tabCustomerPane1.add(lblPrintBalance); tabCustomerPane1.add(lblExtraInvoiceCopies); // tabCustomerPane1.add(lblEmailInvoices); //tabCustomerPane1.add(fldEmailInvoices); tabCustomerPane1.add(lblPromptForESignatureOnAllInvoices); tabCustomerPane1.add(ckPromptForESignatureOnAllInvoices); ckPromptForESignatureOnAllInvoices.addActionListener(this); tabCustomerPane1.add(lblExemptEnviroChanges); tabCustomerPane1.add(ckExemptEnvCharges); tabCustomerPane1.add(recMiscellaneous); tabCustomerPane1.add(lblPriceLocked); tabCustomerPane1.add(ckPriceLocked); ckPriceLocked.addActionListener(this); tabCustomerPane1.add(lblMaxDiscount); tabCustomerPane1.add(fldPriceMaxDiscount); tabCustomerPane1.add(recPriceControl); tabCustomerPane1.add(fldSecTaxExemptNumber); tabCustomerPane1.add(cbPriTaxStatus); tabCustomerPane1.add(fldPriTaxExemptNumber); tabCustomerPane1.add(cbDeliveryTaxTable); tabCustomerPane1.add(cbDefaultTaxTable); tabCustomerPane1.add(lblDefaultTaxTable); tabCustomerPane1.add(lblDeliveryTaxTable); tabCustomerPane1.add(cbSecTaxStatus); tabCustomerPane1.add(lblPrimaryTaxStatus); tabCustomerPane1.add(lblTaxExemptNum); tabCustomerPane1.add(lblTaxExemptExpDate); tabCustomerPane1.add(lblTaxNumber); tabCustomerPane1.add(fldPrimaryTaxNumber); tabCustomerPane1.add(fldSecondaryTaxNumber); tabCustomerPane1.add(recPrimary); tabCustomerPane1.add(recSecondary); tabCustomerPane1.add(recInvoiceDisc); tabCustomerPane1.add(recTaxInfo); tabCustomerPane1.add(lblServingStore); tabCustomerPane1.add(cbServingStore); tabCustomerPane1.add(recServingStore); tabCustomerPane1.add(lblDirectShip); tabCustomerPane1.add(ckDirectShip); ckDirectShip.addActionListener(this); tabCustomerPane1.add(recDirectShip); tabCustomerPane0.add(cbBillingType); tabCustomerPane0.add(lblNationalRegister); tabCustomerPane0.add(lblJSARegister); tabCustomerPane0.add(cbEmpID); tabCustomerPane0.add(fldCustomerNum); tabCustomerPane0.add(fldMonthlySalesPotential); tabCustomerPane0.add(fldMinAmtForPO); tabCustomerPane0.add(fldSalesIDNumber); tabCustomerPane0.add(cbCategory); cbCategory.addFocusListener(this); tabCustomerPane0.add(lblModifiedEmplMain); tabCustomerPane0.add(fldAltCustNumber); tabCustomerPane0.add(lblCustomerTypeValue); tabCustomerPane0.add(lblExtension); tabCustomerPane0.add(fldExtension); tabCustomerPane0.add(fldAddress4); tabCustomerPane0.add(lblAddress4); tabCustomerPane0.add(fldAddress3); tabCustomerPane0.add(lblAddress3); tabCustomerPane0.add(lblDateAdded); tabCustomerPane0.add(lblLastPurchaseDate); tabCustomerPane0.add(lblLastModified); tabCustomerPane0.add(lblDateEstablished); tabCustomerPane0.add(tbChangeCustType); tbChangeCustType.addActionListener(this); tabCustomerPane0.add(cbCustomerType); tabCustomerPane0.add(ckAuthorizePurchases); tabCustomerPane0.add(lblAuthorizePurchases); tabCustomerPane0.add(lblCustomerType); tabCustomerPane0.add(lblPOReqForPurchasesOver); tabCustomerPane0.add(lblSalesIDNum); tabCustomerPane0.add(lblAltCustNumber); tabCustomerPane0.add(lblMonthlySalesPotential); //tabCustomerPane0.add(fldEmail); // tabCustomerPane0.add(lblEmail); tabCustomerPane0.add(lblAlphaKey); tabCustomerPane0.add(lblName); tabCustomerPane0.add(lblAddress1); tabCustomerPane0.add(lblAddress2); tabCustomerPane0.add(lblCity); tabCustomerPane0.add(lblState); tabCustomerPane0.add(lblZip); tabCustomerPane0.add(lblPhone); tabCustomerPane0.add(lblNAPACategory); tabCustomerPane0.add(lblBillingType); tabCustomerPane0.add(lblCorporationType); tabCustomerPane0.add(cbCorporationType); tabCustomerPane0.add(lblSalesRepNum); tabCustomerPane0.add(fldAlphaKey); tabCustomerPane0.add(fldName); tabCustomerPane0.add(lblCFDIName); tabCustomerPane0.add(fldCFDIName); tabCustomerPane0.add(fldAddress1); tabCustomerPane0.add(fldAddress2); tabCustomerPane0.add(fldCity); tabCustomerPane0.add(fldZipCode); tabCustomerPane0.add(fldPhone); tabCustomerPane0.add(cbRefState); tabCustomerPane0.add(lblWebAddress); tabCustomerPane0.add(fldWebAddress); tabCustomerPane0.add(lblCustomerNote); tabCustomerPane0.add(cbSalesRepNum); tabCustomerPane0.add(lblFaxNum); tabCustomerPane0.add(fldFaxNum); tabCustomerPane0.add(lblCountry); tabCustomerPane0.add(cbRefCountry); tabCustomerPane0.add(fldSpeedDial); tabCustomerPane0.add(lblSpeedDial); tabCustomerPane0.add(cbCustomerNote); tabCustomerPane0.add(rbTransmitNationalSalesNo); rbTransmitNationalSalesNo.addActionListener(this); tabCustomerPane0.add(rbTransmitNationalSalesYes); tabCustomerPane0.add(rbTransmitJSASalesNo); rbTransmitJSASalesNo.addActionListener(this); tabCustomerPane0.add(rbTransmitJSASalesYes); tabCustomerPane0.add(lblTransmitNationalSales); tabCustomerPane0.add(lblTransmitJSASales); tabCustomerPane0.add(lblLang); tabCustomerPane0.add(cbLangPref); tabCustomerPane0.add(lblCustomerNum); tabCustomerPane0.add(cbStoreCategory); tabCustomerPane0.add(lblStoreCategory); tabCustomerPane0.add(rectTransmitSection); tabCustomerPane0.add(lblPriorityPlus); tabCustomerPane0.add(ckPriorityPlus); tabCustomerPane0.add(lblPriorityPlusLock); tabCustomerPane0.add(ckPriorityPlusLock); ckPriorityPlus.addActionListener(this); ckPriorityPlusLock.addActionListener(this); tabCustomerPane0.add(lblIbsAccount); tabCustomerPane0.add(ckIbsAccount); ckIbsAccount.addActionListener(this); tabCustomerPane0.add(lblAllowOnlyCoreSales); tabCustomerPane0.add(ckAllowOnlyCoreSales); ckAllowOnlyCoreSales.addActionListener(this); tabCustomerPane0.add(lblUsoCFDI); tabCustomerPane0.add(cbUsoCFDI); tabCustomerPane0.add(lblDNSCustomer); tabCustomerPane0.add(ckDNSCustomer); tabCustomerPane0.add(lblDNSCustomerLock); tabCustomerPane0.add(ckDNSCustomerLock); ckDNSCustomer.addActionListener(this); ckDNSCustomerLock.addActionListener(this); this.add(lblCustomerSearch); this.add(lblCMHeader); this.add(Rectangle1); this.add(lblShowPriorityPlus); } protected void addBindings() { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === agDataMgr.bindToExp(Label1, "Text", "getText", "setText", 126); agDataMgr.bind(fldCustomerId, "Value", "getIntegerValue", "setIntegerValue", agcCustomer, "ID"); agDataMgr.bindToExp(lblCustName, "Text", "getText", "setText", 127); agDataMgr.bind(ckCustomerPresent, "Value", "getValue", "setValue", agcCustomer, "CUSTOMER_TYPICALLY_PRESENT_DURING_INVOICING"); agDataMgr.bind(fldSecTaxExemptExpDate, "Value", "getValue", "setValue", agcCustomer, "TAX_EXEMPT_SECONDARY_EXP_DATE"); agDataMgr.bind(fldPriTaxExemptExpDate, "Value", "getValue", "setValue", agcCustomer, "TAX_EXEMPT_PRIMARY_EXP_DATE"); agDataMgr.bind(fldDeliveryCharge, "Text", "getText", "setText", agcCustomerDelivery, "DELIVERY_CHARGE"); agDataMgr.bind(fldMinSalesFreeDel, "Text", "getText", "setText", agcCustomerDelivery, "MIN_AMT_FREE_DELIVERY"); agDataMgr.bind(fldAmount, "Text", "getText", "setText", agcCustomer, "SURCHARGE_AMOUNT"); agDataMgr.bind(fldDistanceToCust, "Text", "getText", "setText", agcCustomerDelivery, "DISTANCE_TO_CUSTOMER"); agDataMgr.bind(fldTravelTimeToCust, "Text", "getText", "setText", agcCustomerDelivery, "TRAVEL_TIME_CUSTOMER"); agDataMgr.bind(fldInvDiscount, "Text", "getText", "setText", agcCustomer, "MISC_INV_DISC_PERCENT"); agDataMgr.bind(fldNoAdditionalInvCopies, "Text", "getText", "setText", agcCustomer, "EXTRA_INV_COPIES"); agDataMgr.bind(fldEmailInvoices, "Text", "getText", "setText", agcCustomer, "INVOICE_EMAIL_ADDRESS"); agDataMgr.bindToExp(lblModifiedEmplInv, "Text", "getText", "setText", 128); agDataMgr.bind(cbInvFlag, "Value", "getValue", "setValue", agcCustomer, "MISC_INV_DISCOUNT_REF_OPTION_CD"); agDataMgr.bind(cbType, "Value", "getValue", "setValue", agcCustomer, "REF_SURCHARGE_TYPE_CD"); agDataMgr.bind(cbFlag, "Value", "getValue", "setValue", agcCustomer, "SURCHARGE_REF_OPTION_CD"); agDataMgr.bind(ckAllowSpecialOrders, "Value", "getValue", "setValue", agcCustomer, "ALLOW_SPECIAL_ORDERS"); agDataMgr.bind(ckAllowBackorders, "Value", "getValue", "setValue", agcCustomer, "ALLOW_BACKORDERS"); agDataMgr.bind(ckPrintBalance, "Value", "getValue", "setValue", agcCustomer, "PRINT_BALANCE_ON_INV"); agDataMgr.bind(ckPrintCatalogNotes, "Value", "getValue", "setValue", agcCustomer, "PRINT_CATALOG_NOTES_ON_INVOICE"); agDataMgr.bind(ckPrintMSDS, "Value", "getValue", "setValue", agcCustomer, "PRINT_MSDS_FOR_CUSTOMER"); agDataMgr.bind(ckExemptEnvCharges, "Value", "getValue", "setValue", agcCustomer, "CHECK_FOR_MISC_CHG_EXEMPTIONS"); agDataMgr.bind(fldSecTaxExemptNumber, "Text", "getText", "setText", agcCustomer, "TAX_EXEMPT_NUM_SECONDARY"); agDataMgr.bind(cbPriTaxStatus, "Value", "getValue", "setValue", agcCustomer, "TAX_STATUS_PRIMARY_REF_OPTION_CD"); agDataMgr.addValidationEvent(cbPriTaxStatus, "Value"); agDataMgr.bind(fldPriTaxExemptNumber, "Text", "getText", "setText", agcCustomer, "TAX_EXEMPT_NUM_PRIMARY"); agDataMgr.bind(cbSecTaxStatus, "Value", "getValue", "setValue", agcCustomer, "TAX_STATUS_SECONDARY_REF_OPTION_CD"); agDataMgr.addValidationEvent(cbSecTaxStatus, "Value"); agDataMgr.bind(cbBillingType, "Value", "getValue", "setValue", agcCustomer, "REF_BILLING_TYPE_CD"); agDataMgr.addValidationEvent(cbBillingType, "Value"); agDataMgr.bind(fldCustomerNum, "Text", "getText", "setText", agcCustomer, "CUSTOMER_NUM"); agDataMgr.bind(fldMonthlySalesPotential, "Text", "getText", "setText", agcCustomer, "MONTHLY_SALES_POTENTIAL"); agDataMgr.bind(fldMinAmtForPO, "Text", "getText", "setText", agcCustomer, "MIN_AMT_FOR_PO"); agDataMgr.bind(fldSalesIDNumber, "Text", "getText", "setText", agcCustomer, "SALES_ID_NUM"); agDataMgr.bind(cbCategory, "Value", "getValue", "setValue", agcCustomer, "REF_NAPA_CUSTOMER_CATEGORY_ID"); agDataMgr.bind(fldPrimaryTaxNumber, "Text", "getText", "setText", agcCustomer, "PRIMARY_TAX_IDENTIFIER"); agDataMgr.bind(fldSecondaryTaxNumber, "Text", "getText", "setText", agcCustomer, "SECONDARY_TAX_IDENTIFIER"); agDataMgr.bind(ckDirectShip, "Value", "getValue", "setValue", agcCustomer, "DIRECT_SHIPMENT_ELIGIBLE"); agDataMgr.bind(ckPriceLocked, "Value", "getValue", "setValue", agcCustomer, "PRICE_LOCKED"); agDataMgr.bind(fldPriceMaxDiscount, "Text", "getText", "setText", agcCustomer, "MAX_DISCOUNT_PCT"); agDataMgr.bind(cbUsoCFDI, "Value", "getValue", "setValue", agcCustomer, "DEFAULT_REF_ELECTRONIC_INVOICE_TYPE_CD"); agDataMgr.bind(cbCorporationType, "Value", "getValue", "setValue", agcCustomer, "CEPDI_CORPORATION_TYPE"); Object SubformLink2[] = { fldCustomerId, "Value", "getIntegerValue"}; agDataMgr.linkBind(fldAltCustNumber, "CUSTOMER.ID <> %0%", SubformLink2); agDataMgr.bind(fldExtension, "Text", "getText", "setText", agcCustomer, "EXTENSION"); agDataMgr.bind(fldAddress4, "Text", "getText", "setText", agcCustomer, "ADDRESS4"); agDataMgr.bind(fldAddress3, "Text", "getText", "setText", agcCustomer, "ADDRESS3"); agDataMgr.bindToExp(lblLastModified, "Text", "getText", "setText", 129); agDataMgr.bindToExp(lblDateEstablished, "Text", "getText", "setText", 130); agDataMgr.addValidationEvent(cbCustomerType, "Value"); agDataMgr.bind(ckAuthorizePurchases, "Value", "getValue", "setValue", agcCustomer, "AUTHORIZED_BUYERS_ONLY"); agDataMgr.bind(ckIbsAccount, "Value", "getValue", "setValue", agcCustomer, "IBS_ACCOUNT"); agDataMgr.bind(ckAllowOnlyCoreSales, "Value", "getValue", "setValue", agcCustomer, "ALLOW_ONLY_CORE_SALES"); agDataMgr.bind(fldEmail, "Text", "getText", "setText", agcCustomer, "EMAIL"); agDataMgr.bind(ckPromptForESignatureOnAllInvoices, "Value", "getValue", "setValue", agcCustomer, "CAPTURE_ESIGNATURE_ON_INVOICE"); agDataMgr.bind(fldAlphaKey, "Text", "getText", "setText", agcCustomer, "ALPHA_KEY"); agDataMgr.bind(fldName, "Text", "getText", "setText", agcCustomer, "NAME"); agDataMgr.bind(fldCFDIName, "Text", "getText", "setText", agcCustomer, "CFDI_NAME"); agDataMgr.bind(fldAddress1, "Text", "getText", "setText", agcCustomer, "ADDRESS1"); agDataMgr.bind(fldAddress2, "Text", "getText", "setText", agcCustomer, "ADDRESS2"); agDataMgr.bind(fldCity, "Text", "getText", "setText", agcCustomer, "CITY"); agDataMgr.bind(fldZipCode, "Text", "getText", "setText", agcCustomer, "POSTAL_CODE"); agDataMgr.bind(fldPhone, "Text", "getText", "setText", agcCustomer, "PHONE"); agDataMgr.addValidationEvent(cbRefState, "Value"); agDataMgr.bind(fldWebAddress, "Text", "getText", "setText", agcCustomer, "WEB_ADDRESS"); agDataMgr.bind(fldFaxNum, "Text", "getText", "setText", agcCustomer, "FAX_NUMBER"); agDataMgr.addValidationEvent(cbRefCountry, "Value"); agDataMgr.bind(fldSpeedDial, "Text", "getText", "setText", agcCustomer, "SPEED_DIAL"); agDataMgr.bind(cbLangPref, "Value", "getValue", "setValue", agcCustomer, "REF_LANGUAGE_CD"); addExpDependencies(); } protected void addExpDependencies() { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === agDataMgr.addExpDataDependency(130, agcCustomer, 17, false); agDataMgr.addExpDataDependency(129, agcCustomer, 27, false); agDataMgr.addExpDataDependency(128, agcCustomer, 45, false); agDataMgr.addExpDataDependency(127, agcCustomer, 4, false); agDataMgr.addExpDataDependency(126, agcCustomer, 2, false); } /** * Sets the editable fields according to store type, initializes a search object, * fills the comboboxes and adds a blank value to all non-required comboboxes. **/ protected void formActivate (){ MainTabCleaner.RegisterMainTabCleaner(this, tabCustomer, 2); //may want to add this to FormMaster for all forms agDataMgr.setAutomaticValidationUI(false); /* initial mode doesn't display any record*/ if (FM.canEdit()) { toggleMode(FIND); } else { toggleMode(VIEW); FM.setComponentFocus(fldSearch); } ResourceBundleReader rbr = ApplicationContext.getInstance().getResourceBundleReader(); Locale locale = ClientApplicationContext.getClientApplicationContext().getCurrentLocale(); //Insert initialization "Please Select..." for combobox that could take null value. cbStoreCategory.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); cbCustomerNote.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); cbDeliveryTaxTable.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); cbDefaultTaxTable.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); cbDeliveryRoute.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); cbDeliveryPriority.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); cbUsoCFDI.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); cbCorporationType.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); //cbServingStore.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); // initialize specific advanced search object if not done yet // it should only be done once, else previous search results will not be remembered if (advancedSearchObject == null) { advancedSearchObject = new TsoSearchCustomer(this); advancedSearchObject.addSearchListener(fldSearch); advancedSearchObject.addSearchListener(pbSearch); } //by default, set to not visible. Will determine later if we should make visible tbChangeCustType.setVisible(false); //toggleMode() will turn this on but since we are loading the form and have no customers displaying, we have //to turn it off to begin with. FM.setDelete(false); setCheckBox(); } /** * Initializes the TamsFormMaster object including its toolbar and navigation data, * initializes Store Profile data, sets the input verifiers, and sets the initial mode to FIND. **/ protected void formLoaded() { long start = System.currentTimeMillis(); Hashtable hsh = new Hashtable(); //Create instance of FwoToolBarDirector with these permissions Boolean bTrue = new Boolean(true); Boolean bFalse = new Boolean(false); hsh.put(FwoToolBarDirector.NAV_OK, bTrue); hsh.put(FwoToolBarDirector.NEW_OK, bTrue); hsh.put(FwoToolBarDirector.DELETE_OK, bTrue); hsh.put(FwoToolBarDirector.SAVE_OK, bTrue); hsh.put(FwoToolBarDirector.EDIT_OK, bTrue); FwoToolBarDirector toolBarDirector = new FwoToolBarDirector(hsh); //Bug 23638,Added below line of code //To avoid fatal error in the Customer Information --> Account Info tab. cbCategory.setMaximumRowCount(4); ClientApplicationContext cac = ClientApplicationContext.getClientApplicationContext(); StoreProfileVO storeProfile = cac.getProfile(Profile.BACKOFFICE_CLIENT, cac.getLocation()).getStoreProfile(); m_defaultCountryCd = storeProfile.getRefCountryCd(); logger.debug("-----------------------default country: " + m_defaultCountryCd); m_defaultStateCd = storeProfile.getRefStateCd(); m_defaultLanguageCd = storeProfile.getRefLanguageCd(); m_storeType = storeProfile.getStoreType(); logger.debug("-----------------------m_storeType: " + m_storeType); //Create Form Master passing it an instance of the toolbar director created above FM = new TamsFormMaster(this, (FwiFormProcess)this.getParentForm(), null, toolBarDirector); Vector vec = new Vector(); vec.add(fldCustomerNum); vec.add(cbCustomerType); vec.add(fldAltCustNumber); vec.add(cbInvFlag); vec.add(fldInvDiscount); // Added the component "ckPrintBalance" to the vector to disable/enable // this component on form load. vec.add(ckPrintBalance); //Bug #28209: Added Invoice Surcharge Flag and Invoice Surcharge Type fields to the vector which is passed //as parameter to the method setFormEnabledDisabledComps.This method will disable the components on form load. vec.add(cbFlag); vec.add(cbType); //Bug #28209: Added Invoice Surcharge Amount field to the vector in order to disable the component on form load. vec.add(fldAmount); vec.add(ckPriorityPlus); vec.add(ckPriorityPlusLock); vec.add(ckDNSCustomer); vec.add(ckDNSCustomerLock); FM.setFormEnabledDisabledComps(vec); // create a navigation data object String[] selectColumns = {TBL.CUSTOMER+'.'+CUST.ID, TBL.CUSTOMER+'.'+CUST.LOC, TBL.CUSTOMER+'.'+CUST.CUSTOMER_NUM}; String[] tableNames = {TBL.CUSTOMER, TBL.EMPLOYEE}; String[] bufferColumns = {TBL.CUSTOMER+'.'+CUST.CUSTOMER_NUM}; // create band descriptor needed for buffered data TsoGenericBandDescriptor descriptor = new TsoGenericBandDescriptor(TBL.CUSTOMER, TBL.CUSTOMER); descriptor.addColumn(CUST.ID, DatatypeCodes.TYPE_INT, true); descriptor.addColumn(CUST.LOC, DatatypeCodes.TYPE_INT, true); descriptor.addColumn(CUST.CUSTOMER_NUM, DatatypeCodes.TYPE_INT, true); // set initial query navData = new FwoBufferedData(this, selectColumns, tableNames, null, bufferColumns, 100, descriptor); FM.setNavData(navData); // set the required field Hashtable Hashtable ht = new Hashtable(); ht.put(lblCustomerNum, fldCustomerNum); ht.put(lblAlphaKey, fldAlphaKey); ht.put(lblName, fldName); ht.put(lblCountry, cbRefCountry); ht.put(lblBillingType, cbBillingType); ht.put(lblLang, cbLangPref); ht.put(lblTransmitJSASales, rbTransmitJSASalesYes); ht.put(lblTransmitNationalSales, rbTransmitNationalSalesYes); ht.put(lblSalesRepNum, cbSalesRepNum); if(refElectronicInvoiceVendorId != null && refElectronicInvoiceVendorId.intValue() == 1 ){ ht.put(lblUsoCFDI, cbUsoCFDI); ht.put(lblCorporationType, cbCorporationType); } FM.setRequiredFields(ht); // Make the search fields visible when in VIEW mode. Vector vecExceptions = new Vector(); vecExceptions.addElement(fldSearch); vecExceptions.addElement(pbSearch); FM.setEnabledViewModeComps(vecExceptions); FM.addFormEnabledDisabledComp(tbChangeCustType); FM.addFormEnabledDisabledComp(rbTransmitJSASalesYes); FM.addFormEnabledDisabledComp(rbTransmitJSASalesNo); FM.addFormEnabledDisabledComp(rbTransmitNationalSalesYes); FM.addFormEnabledDisabledComp(rbTransmitNationalSalesNo); FM.addFormEnabledDisabledComp(cbCategory); FM.addFormEnabledDisabledComp(cbUsoCFDI); FM.addFormEnabledDisabledComp(cbCorporationType); FM.addFormEnabledDisabledComp(cbBillingType); tbChangeCustType.setDefaultCapable(false); // set up validated components initValidators(); // set up record locale-dependent components m_recordLocaleComps = new JComponent[]{fldPhone, fldFaxNum, fldZipCode}; // set loaded to true LOADED = true; DATA_LOADING = true; m_oldTabIndex = TAB_MAIN; // set the cache manager m_cacheMgr = (TamsCacheMgr)FwoSessionMgr.getInstance().getCacheMgr(); FwoValidatedTextDocument searchDoc = new FwoValidatedTextDocument(fldSearch, 8, FwiConstant.NUMERIC); fldSearch.setDocument(searchDoc); JTextField comboTextField = ((JTextField)cbRefCountry.getEditor().getEditorComponent()); comboTextField.setInputVerifier(new com.gpc.client.backoffice.input.verifier.TsoComboBoxEditorVerifier(this)); componentLayout(); Hashtable hash = new Hashtable(); StringBuffer sbWhere = new StringBuffer(84); // reset datasource agcDsoGen.setDataSource("com.gpc.tams.dso.dsoGeneric"); // setup band Descriptor TsoGenericBandDescriptor bandDescriptor = new TsoGenericBandDescriptor("AR_PROFILE", "AR_PROFILE"); bandDescriptor.addColumn("PRINT_STATEMENTS", DatatypeCodes.TYPE_BYTE, true); sbWhere.append("SELECT AR_PROFILE.PRINT_STATEMENTS FROM AR_PROFILE WHERE AR_PROFILE.LOC="+FM.m_loc); hash.put(com.gpc.tams.dso.dsoGeneric.SQL, sbWhere.toString()); hash.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bandDescriptor); logger.debug("\n sbWhere="+sbWhere); try { SilverStreamExceptionHelper.invokeQuery(agcDsoGen,hash); if (agcDsoGen.gotoFirst()) { byte printStmt = ((Byte) agcDsoGen.getProperty("PRINT_STATEMENTS")).byteValue(); m_printStatements = (printStmt == 1 ? true : false); } ResourceBundleReader rbr = ApplicationContext.getInstance().getResourceBundleReader(); Locale locale = ClientApplicationContext.getClientApplicationContext().getCurrentLocale(); cbServingStore.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); List stores = ClientApplicationContext.getClientApplicationContext().getVPNISCDAO().getPhoneRoomStoreList(ClientApplicationContext.getClientApplicationContext().getLocation()); if (stores.size() > 0) { for (int i=0; i < stores.size(); i++) { PhoneRoomStoreVO dto = (PhoneRoomStoreVO)stores.get(i); if (!dto.getServingDC().booleanValue()) { String storeString = (String) dto.getStoreNumber(); String strStore = storeString.substring(storeString.length() - 3, storeString.length())+ "-" +dto.getStoreName(); cbServingStore.addItem(strStore,storeString); } } } } catch(ApplicationException e) { logger.error(e.toString(), e); } catch(AgoSecurityException e){ logger.error(e.toString(), e); } catch(AgoTransientSystemException e){ logger.error(e.toString(), e); } catch(AgoUnrecoverableSystemException e){ logger.error(e.toString(), e); } finally { hsh = null; sbWhere = null; } getProfile(); enableDisableAltCustomer(); enableDisableServingStore(); setIbsAccountLabel(); disableDirectShipCheckBox(); setAllowOnlyCoreSalesLabel(); setElectronicInvoiceTypeLabel(); final String allowedCharacters = StringUtils.substituteAll( FwoJTextKeyFilter.ALLKEY, "\n", ""); FwoValidatedTextDocument name = new FwoValidatedTextDocument( fldName, 40, FwiConstant.ALPHANUMERIC, allowedCharacters.toCharArray()); FwoValidatedTextDocument cfdiName = new FwoValidatedTextDocument( fldCFDIName, 100, FwiConstant.ALPHANUMERIC, allowedCharacters.toCharArray()); FwoValidatedTextDocument city = new FwoValidatedTextDocument( fldCity, 30, FwiConstant.ALPHANUMERIC, allowedCharacters.toCharArray()); FwoValidatedTextDocument address1 = new FwoValidatedTextDocument( fldAddress1, 40, FwiConstant.ALPHANUMERIC, allowedCharacters.toCharArray()); FwoValidatedTextDocument address2 = new FwoValidatedTextDocument( fldAddress2, 40, FwiConstant.ALPHANUMERIC, allowedCharacters.toCharArray()); FwoValidatedTextDocument validPriceMaxDiscount = new FwoValidatedTextDocument( fldPriceMaxDiscount, MAX_LENGTH, FwiConstant.NUMERIC); fldPriceMaxDiscount.setDocument(validPriceMaxDiscount); fldName.setDocument(name); fldCFDIName.setDocument(cfdiName); fldCity.setDocument(city); fldAddress1.setDocument(address1); fldAddress2.setDocument(address2); if (storeProfile.getUseEmailCustomer() != null && storeProfile.getUseEmailCustomer().equals(TsoConstant.GENERIC_Y)) { lblEmailInvoices.setVisible(true); fldEmailInvoices.setVisible(true); } else { lblEmailInvoices.setVisible(false); fldEmailInvoices.setVisible(false); } logger.debug("Store Type: " + m_storeType + " Print Statements: " + m_printStatements + " GPC Owned: " + isGPCOwned()); rbTransmitNationalSalesYes.setEnabled(false); rbTransmitNationalSalesNo.setEnabled(false); } private boolean isGPCOwned() { LockableBoolean gpc = ClientApplicationContext.getClientApplicationContext().getProfile(Profile.BACKOFFICE_CLIENT, ClientApplicationContext.getClientApplicationContext().getLocation()).getStoreProfile().getGpcOwned(); return (gpc.byteValue() == 1 || gpc.byteValue() == 11); } private boolean isAllowMiscAdjustment() { LockableBoolean allowMiscAdj = ClientApplicationContext.getClientApplicationContext().getProfile(Profile.BACKOFFICE_CLIENT, ClientApplicationContext.getClientApplicationContext().getLocation()).getInvoicingProfile().getAllowMiscAdjustment(); return (allowMiscAdj.byteValue() == 1 || allowMiscAdj.byteValue() == 11); } /** * Loads the current record and re-activates the FormMaster object
* @param Hashtable Contains any data being passed in pertaining to what record should be loaded **/ public void fRetrieve(Hashtable hshParms){ FM.formActivate(); try { StringBuffer sbWhere = new StringBuffer(24); sbWhere.append(TBL.CUSTOMER).append('.').append(CUST.LOC).append('=').append(FM.m_loc); sbWhere.append(" AND EMPLOYEE.ID = CUSTOMER.SALESMAN_EMPLOYEE_ID "); navData.query(sbWhere.toString()); if (navData.gotoFirst()) { retrieveCustomerByNum((Integer)navData.getProperty(TBL.CUSTOMER+'.'+CUST.CUSTOMER_NUM)); } //setCustomerUserDefinedField(); }catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in fRetrieve() ", e); }catch (AgoSecurityException e) { logger.error("AgoSecurityException in fRetrieve() ", e); }catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException in fRetrieve() ", e); } enableDisableServingStore(); enableDisableAltCustomer(); setIbsAccountLabel(); disableDirectShipCheckBox(); setCheckBox(); setAllowOnlyCoreSalesLabel(); setElectronicInvoiceTypeLabel(); lblAllowOnlyCoreSales.setVisible(true); } /** * Re-Localizes this form and all of its subforms. This method will be called * when the language gets changed on the toolbar
**/ public void fLocalize(){ try { ClientApplicationContext.getClientApplicationContext().getLocalizationMgr().localize(this); ResourceBundleReader rbr = ApplicationContext.getInstance().getResourceBundleReader(); Locale locale = ClientApplicationContext.getClientApplicationContext().getCurrentLocale(); DATA_LOADING = true; // See if the subform is open if (currentTabForm != null && currentTabForm != this) { // Localize the Subform FwiFormProcess lForm = (FwiFormProcess) currentTabForm; lForm.fLocalize(); } if (cbBillingType.getItemCount() == 0) {//just come to this tab and data not populate yet return; } // fill the Customer Type combo Object oldCustType = cbCustomerType.getValue(); fillCustomerTypeCombo(); cbCustomerType.setValue(oldCustType); //fill the Country/State combos Object oldCountry = cbRefCountry.getValue(); fillCountryCombo(); cbRefCountry.setValue(oldCountry); Object oldState = cbRefState.getValue(); fillStateCombo((String)cbRefCountry.getValue()); cbRefState.setValue(oldState); //fill the combos on the Invoicing tab fillREF_Combos(true); //localize "Not Assigned" cbStoreCategory.removeItemAt(0); cbCustomerNote.removeItemAt(0); cbDeliveryRoute.removeItemAt(0); cbDeliveryPriority.removeItemAt(0); cbDeliveryTaxTable.removeItemAt(0); cbDefaultTaxTable.removeItemAt(0); cbServingStore.removeItemAt(0); cbStoreCategory.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); cbCustomerNote.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); cbDeliveryTaxTable.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); cbDefaultTaxTable.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); cbDeliveryRoute.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); cbDeliveryPriority.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); cbServingStore.insertItemAt(rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXNOTASSIGNED, locale), null, 0); setUnboundForMainTab(); setUnboundForInvoiceTab(); agcCustomer.refreshRows();//need to refresh, otherwise the bound combo boxes won't load //localize last modified date setModifyLabels();//need to be after "agcCustomer.refreshRows();", otherwise, the last modified date won't be localized for Invoicing Info tab DATA_LOADING = false; }catch (AgoTransientSystemException e) { ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "103", e.toString()); logger.error(e.toString(), e); }catch (AgoSecurityException e) { ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "103", e.toString()); logger.error(e.toString(), e); }catch (AgoUnrecoverableSystemException e) { ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "103", e.toString()); logger.error(e.toString(), e); } /*catch (ApplicationException e){ logger.error(e.toString() , e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); }*/ } /** * Navigates the primary data to the first row
* @return boolean Return true if retrieveCustomerByNum passes, false if retrieveCustomerByNum fails **/ public boolean fFirst(){ //navigate to the first row cursor. return retrieveCustomerByNum((Integer)navData.getProperty(TBL.CUSTOMER+'.'+CUST.CUSTOMER_NUM)); } /** * Navigates the primary data to the next row
* @return boolean Return true if retrieveCustomerByNum passes, false if retrieveCustomerByNum fails **/ public boolean fNext(){ //navigate the next row cursor. return retrieveCustomerByNum((Integer)navData.getProperty(TBL.CUSTOMER+'.'+CUST.CUSTOMER_NUM)); } /** * Navigates the primary data to the last row
* @return boolean Return true if retrieveCustomerByNum passes, false if retrieveCustomerByNum fails **/ public boolean fLast(){ //navigate to the last row cursor. return retrieveCustomerByNum((Integer)navData.getProperty(TBL.CUSTOMER+'.'+CUST.CUSTOMER_NUM)); } /** * Navigates the primary data to the previous row
* @return boolean Return true if retrieveCustomerByNum passes, false if retrieveCustomerByNum fails **/ public boolean fPrevious(){ //navigate to the previous row cursor. return retrieveCustomerByNum((Integer)navData.getProperty(TBL.CUSTOMER+'.'+CUST.CUSTOMER_NUM)); } private void disableEnableBillingType() { cbBillingType.setEnabled(m_customerType != null && !m_customerType.equals(RefCustomerType.RETAIL_ACCOUNT) && !m_customerType.equals(RefCustomerType.VERIFY_ACCOUNT)) ; if (isEmployeeSaleCustomer && isBillingCash && isGPCOwned() ) { cbBillingType.setEnabled(false); } if (m_customerType != null && m_customerType.equals(RefCustomerType.VERIFY_ACCOUNT)) { lblBillingTypeVerify.setVisible(true); } else { lblBillingTypeVerify.setVisible(false); } } /** * This method disables "Print Balance On Invoice" checkbox if the store is an AR branch store and * does not get AR information from the multi-store server. */ private void disablePrintBalance() { MSHelper msHelper = MSHelper.getInstance(); ClientApplicationContext clientAppContext = ClientApplicationContext .getClientApplicationContext(); boolean isArBranchStore = msHelper.isArBranchType(Profile.BACKOFFICE_CLIENT, FM.m_loc.intValue()); boolean isMultiStoreInUse = msHelper.isMSStore(Profile.BACKOFFICE_CLIENT, FM.m_loc.intValue()); boolean isReplicatingToServerFarm = msHelper.isOnServerFarm(Profile.BACKOFFICE_CLIENT, FM.m_loc.intValue()); String allowBranchArDataInquiry = clientAppContext.getProfile(Profile.BACKOFFICE_CLIENT, clientAppContext.getLocation()).getMulitStoreProfile() .getAllowBranchArDataInquiry(); if (isArBranchStore && (!isMultiStoreInUse || isReplicatingToServerFarm || !(INVOICE.equals(allowBranchArDataInquiry) || BOTH.equals(allowBranchArDataInquiry)))) { ckPrintBalance.setEnabled(false); } } private void disableDirectShipCheckBox() { if (isUseNapaXpress()) { ckDirectShip.setEnabled(true); } else { ckDirectShip.setEnabled(false); } } private boolean isUseNapaXpress() { LockableBoolean useNapaXpress = ClientApplicationContext.getClientApplicationContext().getProfile(Profile.BACKOFFICE_CLIENT, ClientApplicationContext.getClientApplicationContext().getLocation()).getStoreProfile().getUseNapaXpress(); return (useNapaXpress.byteValue() == 1 || useNapaXpress.byteValue() == 11); } private boolean isArBranchStore(){ if(isConsolidatedARMSBranchStore() && !isGPCOwned() && m_customerType != null && !m_customerType.equals(RefCustomerType.RETAIL_ACCOUNT)){ return true; }else { return false; } } /** * This method toggles the form's GUI based on mode: NEW, EDIT, VIEW, or FIND
* Additionally, sets the FormMaster mode and turns off New and Delete toolbar buttons * for GPC-owned stores that do not print statements * @param sMode - String that specifies what mode to toggle **/ public void toggleMode(int iMode){ if (isArBranchStore()) { iMode = ARBRANCH_VIEW; setARBranchViewMode(); } else { FM.setMode(iMode); } if (iMode == NEW && FM.canEdit()) { //enable all components FM.enableFormComponents(); fldCustomerNum.setEnabled(!RefCustomerType.RETAIL_ACCOUNT.equals(m_customerType)); fldAltCustNumber.setEnabled(!RefCustomerType.RETAIL_ACCOUNT.equals(m_customerType) && !RefCustomerType.VERIFY_ACCOUNT.equals(m_customerType)); enableTransmitAndNapaCat(); cbCustomerType.setVisible(true); tbChangeCustType.setEnabled(false); lblCustomerTypeValue.setVisible(false); fldSearch.setEnabled(false); pbSearch.setEnabled(false); //cbBillingType.setEnabled(!RefCustomerType.RETAIL_ACCOUNT.equals(m_customerType)); disableEnableBillingType(); //disable the tabs enableTabs(false); } else if ((iMode == EDITING || iMode == NOT_EDITING) && FM.canEdit()) { FM.enableFormComponents(); FM.setDelete(true); FM.setSave(true); // bug # 25588 , Remove below line of code. //FM.setEdit(true); FM.setCancel(true); //bug # 25521,Removed below lines of code //To make the Print and Sort buttons disabled on initial entry //FM.setSort(true); //FM.setPrint(true); //Bug No. 30443 The 'New' and the 'Delete' buttons are disabled for the 'Invoicing Info' tab as per the use case. if (currentTabIndex == TAB_MAIN2) { FM.setNew(false); FM.setDelete(false); } //make sure the search field and button are enabled fldSearch.setEnabled(true); pbSearch.setEnabled(true); // can no longer update customer number fldCustomerNum.setEnabled(false); cbCustomerType.setVisible(false); enableDisableAltCustomer(); enableTransmitAndNapaCat(); enableDisableServingStore(); setIbsAccountLabel(); disableDirectShipCheckBox(); setAllowOnlyCoreSalesLabel(); setElectronicInvoiceTypeLabel(); //GPC owned stores cannot change Alpha Key, Name, Addresses, City, State, Zip, //Country, Sales Rep #. if(isGPCOwned() && !RefCustomerType.RETAIL_ACCOUNT.equals(m_customerType)){ fldAlphaKey.setEnabled(false); fldName.setEnabled(false); fldAddress1.setEnabled(false); fldAddress2.setEnabled(false); fldAddress3.setEnabled(false); fldAddress4.setEnabled(false); fldCity.setEnabled(false); fldZipCode.setEnabled(false); cbRefCountry.setEnabled(false); cbRefState.setEnabled(false); cbSalesRepNum.setEnabled(false); tbChangeCustType.setVisible(false); fldPhone.requestFocus(); fldCFDIName.setEnabled(false); cbCorporationType.setEnabled(false); } else{ fldAlphaKey.setEnabled(true); fldName.setEnabled(true); fldAddress1.setEnabled(true); fldAddress2.setEnabled(true); fldAddress3.setEnabled(true); fldAddress4.setEnabled(true); fldCity.setEnabled(true); fldZipCode.setEnabled(true); cbRefCountry.setEnabled(true); cbRefState.setEnabled(true); cbSalesRepNum.setEnabled(true); fldCFDIName.setEnabled(true); cbCorporationType.setEnabled(true); tbChangeCustType.setVisible(!isConsolidatedARMSBranchStore() && !isGPCOwned()); if (tbChangeCustType.isVisible()) { if (m_customerType != null && m_customerType.equals(RefCustomerType.RETAIL_ACCOUNT)) { tbChangeCustType.setEnabled(true); } else { tbChangeCustType.setEnabled(false); } } if (currentTabIndex == TAB_MAIN) { FM.setComponentFocus(fldAlphaKey); } else if (currentTabIndex == TAB_MAIN2) { if (FM.canEdit()) { FM.setComponentFocus(cbDeliveryTaxTable); } else { FM.setComponentFocus(fldSearch); } } } lblCustomerTypeValue.setVisible(true); //cbBillingType.setEnabled(m_customerType != null && !m_customerType.equals(RefCustomerType.RETAIL_ACCOUNT) // && !m_customerType.equals(RefCustomerType.VERIFY_ACCOUNT)) ; disableEnableBillingType(); //enable the tabs enableTabs(true); } else if (iMode == FIND && FM.canEdit()) { //make sure the search field and button are enabled fldSearch.setEnabled(true); pbSearch.setEnabled(true); fldCustomerNum.setEnabled(false); //disable the change customer button tbChangeCustType.setEnabled(false); cbBillingType.setEnabled(false); fldAltCustNumber.setEnabled(false); //disable fields FM.disableFormComponents(); //disable all tabs until record is found enableTabs(false); FM.setComponentFocus(fldSearch); rbTransmitJSASalesYes.setEnabled(false); rbTransmitJSASalesNo.setEnabled(false); rbTransmitNationalSalesYes.setEnabled(false); rbTransmitNationalSalesNo.setEnabled(false); cbCategory.setEnabled(false); } else { fldCustomerNum.setEnabled(false); cbCustomerType.setVisible(false); //Bug# 30438: 'Change Customer Type' button should not be visible if the store is a non-GPC owned Multi-Store A/R Branch. tbChangeCustType.setVisible(!isConsolidatedARMSBranchStore() && !isGPCOwned()); tbChangeCustType.setEnabled(false); cbBillingType.setEnabled(false); //make sure the search field and button are enabled fldSearch.setEnabled(true); pbSearch.setEnabled(true); if(cbCustomerType.getSelectedItem() != null){ lblCustomerTypeValue.setText(cbCustomerType.getSelectedItem().toString()); lblCustomerTypeValue.setVisible(true); } //if the form was just loaded disable the tabs if(LOADED){ enableTabs(false); LOADED = false; } else { //enable the tabs enableTabs(true); } } // To make sure that the Delete button does not come on when it shouldn't //Bug No. 30443 In the else an if statement is added to check whether it is not a 'Invoicing Info' tab. if(!FM.canEdit() || ((isGPCOwned() || isConsolidatedARMSBranchStore()) && (m_customerType == null || !m_customerType.equals("R")))) { FM.setDelete(false); } else if(currentTabIndex != TAB_MAIN2){ FM.setDelete(true); } } private void enableTabs(boolean enabled){ if(!enabled) tabCustomer.setEnabledAt(0, !enabled); else tabCustomer.setEnabledAt(0, enabled); for(int i = 1; i < tabCustomer.getTabCount(); i++){ tabCustomer.setEnabledAt(i, enabled); } } /** * Inserts a new record into the database, sets the default values, and toggles the mode to NEW. * If the store is GPC owned, or if GPC owned and AR_PROFILE.PRINT_STATEMENTS='N', the New button should not be enabled.
* @return boolean Return true if insert passes, false if insert fails **/ public boolean fNew(){ m_New = true; // goto the main tab, since it is the only tab that can add new customers ARStatementMonitorVO arStmtMonitorVO = ClientApplicationContext.getClientApplicationContext().getARStatementMonitorDAO() .getARStatementMonitor(new Integer(ClientApplicationContext .getClientApplicationContext().getLocation())); if (arStmtMonitorVO != null && arStmtMonitorVO.getStatementClosingDate() != null) { SwingUtilities.invokeLater(new Runnable() { public void run() { ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(FrmCM_CustMaint.this, "1714"); } }); FM.setComponentFocus(fldSearch); return false; } tabCustomer.setSelectedIndex(TAB_MAIN); agcCustomer.insertAfter(); agcCustomerDelivery.insertAfter(); m_isNewRecord = true; if(isGPCOwned() || (isConsolidatedARMSBranchStore())){ m_customerType = RefCustomerType.RETAIL_ACCOUNT; } toggleMode(NEW); defaultNewValues(); //If they are gpc owned or branch store, they can add only retail customers if(isGPCOwned() || (isConsolidatedARMSBranchStore())){ agcCustomer.setProperty(CUST.TYPE, RefCustomerType.RETAIL_ACCOUNT); m_customerType = RefCustomerType.RETAIL_ACCOUNT; lblCustomerTypeValue.setVisible(true); lblCustomerTypeValue.setText(RETAIL); cbCustomerType.setVisible(false); cbCustomerType.setEnabled(false); findNewCustomerNumber(); fldCustomerNum.setEnabled(false); FM.setComponentFocus(fldAlphaKey); cbBillingType.setSelectedIndex(0); cbBillingType.setEnabled(false); }else{ lblCustomerTypeValue.setVisible(false); cbCustomerType.setVisible(true); cbCustomerType.setEnabled(true); if (m_addNew) { FM.setComponentFocus(fldAlphaKey); } else { FM.setComponentFocus(cbCustomerType); } } setCheckBox(); return true; } /** * Sets all default values for a new customer record. **/ public void defaultNewValues(){ DATA_LOADING = true; //When just add a new record after answer "YES" for message "Record not on file. Do you wish to add?" if (cbCustomerType.getItemCount() == 0) { // fill the Customer Type combo fillCustomerTypeCombo(); //fill the Country/State combos fillCountryCombo(); //fill the combos on the Invoicing tab fillREF_Combos(true); } fillStateCombo(m_defaultCountryCd); // set all defaults cbRefCountry.setValue(m_defaultCountryCd); cbRefState.setValue(m_defaultStateCd); cbSalesRepNum.setSelectedIndex(0); cbStoreCategory.setSelectedIndex(0); cbCustomerNote.setSelectedIndex(0); cbDeliveryTaxTable.setSelectedIndex(0); cbDefaultTaxTable.setSelectedIndex(0); Integer iZero = new Integer(0); BigDecimal bdZero = new BigDecimal(0.0); String sY = "Y"; String sN = "N"; String sO = "O"; agcCustomer.setProperty(CUST.LOC, FM.m_loc); agcCustomer.setProperty(CUST.ACCOUNT_ESTABLISH_DATE, new Date()); agcCustomer.setProperty(CUST.USUAL_REF_PRICE_SHEET_CD, "L"); agcCustomer.setProperty(CUST.USUAL_PRICE_REF_CURRENCY_ROUNDING_CD, "D"); agcCustomer.setProperty(CUST.USUAL_PRICE_MARKUP_PERCENT, iZero); agcCustomer.setProperty(CUST.ACTIVE_ACCOUNT, sY); agcCustomer.setProperty(CUST.ALTERNATE_CORE_CUSTOMER_ID, null); agcCustomer.setProperty(CUST.MISC_INV_DISC_PERCENT, iZero); agcCustomer.setProperty(CUST.MIN_AMT_FOR_PO, iZero); agcCustomer.setProperty(CUST.MONTHLY_SALES_POTENTIAL, bdZero); agcCustomer.setProperty(CUST.EXTRA_INV_COPIES, iZero); agcCustomer.setProperty(CUST.SURCHARGE_AMOUNT, bdZero); agcCustomer.setProperty(CUST.AUTHORIZED_BUYERS_ONLY, sN); agcCustomer.setProperty(CUST.IBS_ACCOUNT, sN); agcCustomer.setProperty(CUST.ALLOW_BACKORDERS, sN); agcCustomer.setProperty(CUST.ALLOW_SPECIAL_ORDERS, sN); agcCustomer.setProperty(CUST.CHECK_FOR_MISC_CHG_EXEMPTIONS, sN); agcCustomer.setProperty(CUST.PRINT_BALANCE_ON_INV, sN); agcCustomer.setProperty(CUST.PRINT_CATALOG_NOTES_ON_INVOICE, sN); agcCustomer.setProperty(CUST.PRINT_MSDS_FOR_CUSTOMER, sN); agcCustomer.setProperty(CUST.REF_COUNTRY_CD, m_defaultCountryCd); agcCustomer.setProperty(CUST.REF_STATE_CD, m_defaultStateCd); agcCustomer.setProperty(CUST.REF_LANGUAGE_CD, m_defaultLanguageCd); agcCustomer.setProperty(CUST.REF_BILLING_TYPE_CD, "X"); agcCustomer.setProperty(CUST.REF_NAPA_CUSTOMER_CATEGORY_ID, new Integer(10));//Miscellaneous/Commercial agcCustomer.setProperty(CUST.TAX_STATUS_PRIMARY_REF_OPTION_CD, sO); agcCustomer.setProperty(CUST.TAX_STATUS_SECONDARY_REF_OPTION_CD, sO); agcCustomer.setProperty(CUST.SURCHARGE_REF_OPTION_CD, sN); agcCustomer.setProperty(CUST.MISC_INV_DISCOUNT_REF_OPTION_CD, sN); agcCustomer.setProperty(CUST.REF_SURCHARGE_TYPE_CD, "P"); agcCustomer.setProperty(CUST.TRANSMIT_JSA_SALES, sN); agcCustomer.setProperty(CUST.TRANSMIT_NATIONAL_SALES, sN); agcCustomer.setProperty(CUST.DIRECT_SHIPMENT_ELIGIBLE, sN); //Bug #27194, Setting Customer Typically present during invoicing to 'N'. agcCustomer.setProperty(CUST.CUSTOMER_TYPICALLY_PRESENT_DURING_INVOICING, sN); agcCustomer.setProperty(CUST.CAPTURE_ESIGNATURE_ON_INVOICE, sN); if (isGPCOwned()) agcCustomer.setProperty(CUST.PRIORITY_PLUS, new Integer(10)); else agcCustomer.setProperty(CUST.PRIORITY_PLUS, iZero); agcCustomer.setProperty(CUST.DNS_CUSTOMER,iZero); agcCustomer.setProperty(CUST.PRICE_LOCKED, iZero); agcCustomer.setProperty(CUST.MAX_DISCOUNT_PCT, bdZero); rbTransmitNationalSalesYes.setSelected(false); rbTransmitJSASalesYes.setSelected(false); rbTransmitNationalSalesNo.setSelected(true); rbTransmitJSASalesNo.setSelected(true); //insert Please Select to cbSalesRepNum cbSalesRepNum.insertItemAt(ApplicationContext.getInstance().getResourceBundleReader().getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXINITIALITEM, ClientApplicationContext.getClientApplicationContext().getCurrentLocale()), null, 0); cbSalesRepNum.setSelectedIndex(0); lblJSARegister.setText(""); lblNationalRegister.setText(""); // clear-out alternate cust num field fldAltCustNumber.setText(""); // Get the next id for customer table. Customer Type could be Account or Retail, default to Account // except if the store is GPC-owned and does not print statements, in which case // Customer Type must be Retail. int idType = 0; if (isGPCOwned() || isConsolidatedARMSBranchStore()){ idType = 1; cbCustomerType.setValue(RefCustomerType.RETAIL_ACCOUNT); cbCustomerType.setEnabled(false); } else { cbCustomerType.setEnabled(true); } if (isGPCOwned()) { cbInvFlag.setEnabled(false); fldInvDiscount.setEnabled(false); } cbInvFlag.setValue("Never"); fldInvDiscount.setText("0"); fldPriceMaxDiscount.setText("0"); Integer id = (Integer)TamsMisc.getNextTableID(TBL.CUSTOMER, FM.m_loc, agGeneral); if (id != null) { agcCustomer.setProperty(CUST.ID, id); // Set defaults for Customer Delivery setDeliveryDefaults(); Integer custNum = null; if (!m_addNew) { custNum = id; if (isGPCOwned() || isConsolidatedARMSBranchStore()){ cbCustomerType.setEnabled(false); } else { cbCustomerType.setSelectedIndex(0); //set account type to "Please Select" } }else{ custNum = m_SearchCustNum; agcCustomer.setProperty(CUST.CUSTOMER_NUM, custNum); int num = Integer.parseInt(fldCustomerNum.getText()); if(num >= MIN_RET_CUSTNUM){ cbCustomerType.setSelectedIndex(2); }else if(num <=MAX_REG_VER_CUSTNUM){ cbCustomerType.setSelectedIndex(1); } lblCustomerTypeValue.setText(""+cbCustomerType.getSelectedItem()); } } //blank the labels lblModifiedEmplMain.setText(""); lblModifiedEmplInv.setText(""); //blank search field fldSearch.setText(""); // Reset DATA_LOADING DATA_LOADING = false; } /* Bug No. 20672 the following method is added to validate that the entered customer number for alternate customer does not have the billing type 'cash only' or 'locked'*/ public boolean validate_alternate_core_customer_id() { StringBuffer qBuffer = new StringBuffer(104); //reset data source agcDsoGen.setDataSource("com.gpc.tams.dso.dsoGeneric"); String altCN = fldAltCustNumber.getText(); altCN=altCN.trim(); if(altCN == null || altCN.equals("")) return true; int altcNum=Integer.parseInt(altCN); // band descriptor TsoGenericBandDescriptor bd = null; bd = new TsoGenericBandDescriptor("CUSTOMER", "CUSTOMER"); bd.addColumn("REF_BILLING_TYPE_CD", DatatypeCodes.TYPE_STRING, true); qBuffer.append("SELECT REF_BILLING_TYPE_CD FROM "); qBuffer.append("CUSTOMER WHERE CUSTOMER.CUSTOMER_NUM=").append(altcNum); try { Hashtable ht = new Hashtable(); ht.put(com.gpc.tams.dso.dsoGeneric.SQL, qBuffer.toString()); ht.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bd); SilverStreamExceptionHelper.invokeQuery(agcDsoGen, ht); String billingTyp=""; if(agcDsoGen.gotoFirst()){ billingTyp=(String)agcDsoGen.getProperty("REF_BILLING_TYPE_CD"); } if(billingTyp.equals("G") || billingTyp.equals("X") ) return true; else return false; } catch (ApplicationException e) { logger.error(e.toString(), e); } catch (AgoSecurityException e) { logger.error(e.toString(), e); } catch (AgoTransientSystemException e) { logger.error(e.toString(), e); } catch (AgoUnrecoverableSystemException e) { logger.error(e.toString(), e); } return true; } /* Bug No. 20676 the following method is added to get the original value to reset the billing type if he selects 'cash only' or 'locked'*/ public String getOriginalValue() { String billingTypeInit=""; String cNum =fldCustomerNum.getText(); cNum=cNum.trim(); if(cNum == null || cNum.equals("")) return ""; StringBuffer qBuffer = new StringBuffer(104); //reset data source agcDsoGen.setDataSource("com.gpc.tams.dso.dsoGeneric"); int id= Integer.parseInt(cNum); // band descriptor TsoGenericBandDescriptor bd = null; bd = new TsoGenericBandDescriptor("CUSTOMER", "CUSTOMER"); bd.addColumn("REF_BILLING_TYPE_CD", DatatypeCodes.TYPE_STRING, true); qBuffer.append("SELECT REF_BILLING_TYPE_CD FROM "); qBuffer.append("CUSTOMER WHERE CUSTOMER.CUSTOMER_NUM=").append(id); try { Hashtable ht = new Hashtable(); ht.put(com.gpc.tams.dso.dsoGeneric.SQL, qBuffer.toString()); ht.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bd); SilverStreamExceptionHelper.invokeQuery(agcDsoGen, ht); if(agcDsoGen.gotoFirst()){ billingTypeInit=(String)agcDsoGen.getProperty("REF_BILLING_TYPE_CD"); } } catch (ApplicationException e) { logger.error(e.toString(), e); } catch (AgoSecurityException e) { logger.error(e.toString(), e); } catch (AgoTransientSystemException e) { logger.error(e.toString(), e); } catch (AgoUnrecoverableSystemException e) { logger.error(e.toString(), e); } return billingTypeInit; } /*Bug No. 20676 the following method is added to get the value of the billing type that has been selected by the customer.*/ public boolean getBillingType() { if(cbBillingType.getValue().equals("C") || cbBillingType.getValue().equals("L") ) return true; return false; } /* Bug No. 20676 the following method is added to validate that the current customer is an alternate customer for other customer*/ public boolean validate_billingType() { StringBuffer qBuffer = new StringBuffer(104); DATA_LOADING = false; //reset data source agcDsoGen.setDataSource("com.gpc.tams.dso.dsoGeneric"); Integer id= (Integer)agcCustomer.getProperty("ID"); // band descriptor TsoGenericBandDescriptor bd = null; bd = new TsoGenericBandDescriptor("CUSTOMER", "CUSTOMER"); bd.addColumn("ALTERNATE_CORE_CUSTOMER_ID", DatatypeCodes.TYPE_INT, true); qBuffer.append("SELECT CUSTOMER_NUM FROM "); qBuffer.append("CUSTOMER WHERE CUSTOMER.ALTERNATE_CORE_CUSTOMER_ID=").append(id); try { Hashtable ht = new Hashtable(); ht.put(com.gpc.tams.dso.dsoGeneric.SQL, qBuffer.toString()); ht.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bd); SilverStreamExceptionHelper.invokeQuery(agcDsoGen, ht); if(!agcDsoGen.gotoFirst()){ return false; } } catch (ApplicationException e) { logger.error(e.toString(), e); } catch (AgoSecurityException e) { logger.error(e.toString(), e); } catch (AgoTransientSystemException e) { logger.error(e.toString(), e); } catch (AgoUnrecoverableSystemException e) { logger.error(e.toString(), e); } return true; } public void transactionAdded(Integer customerNum, String customerName, CustomerRequest.CustomerAction action) { if (custInfoSet == null) { custInfoSet = new TreeSet(); } if (custPricingSet == null) { custPricingSet = new TreeSet(); } if (custDeleteSet == null) { custDeleteSet = new TreeSet(); } if (action.equals(CustomerRequest.CustomerAction.UPDATE_INFO)) { custInfoSet.add(customerNum); custDeleteSet.remove(customerNum); } if (action.equals(CustomerRequest.CustomerAction.UPDATE_CUSTOM_PRICING)) { custPricingSet.add(customerNum); custDeleteSet.remove(customerNum); } if (action.equals(CustomerRequest.CustomerAction.DELETE)) { custDeleteSet.add(customerNum); custInfoSet.remove(customerNum); custPricingSet.remove(customerNum); } if (custNumNameMap == null) { custNumNameMap = new HashMap(); } custNumNameMap.put(customerNum, customerName); } public boolean doUpdatesForArBranchesExist() { if ((custInfoSet == null || custInfoSet.isEmpty()) && (custPricingSet == null || custPricingSet.isEmpty()) && (custDeleteSet == null || custDeleteSet.isEmpty())) { return false; } return true; } /** * This method determines whether the update should be sent to AR branch or not. * When store is Multi store Main store that uses TAMS Muti-Store AR functionality, * replicatingToServerFarm will be set to true. * * @return boolean true if AR branch should be updated with the AR changes. * boolean false if AR branch should not be updated with the AR changes. */ public boolean isArMainWithBranches() { ClientApplicationContext clientApplicationContext = ClientApplicationContext .getClientApplicationContext(); int loc = clientApplicationContext.getLocation(); boolean arMainWithBranches = MSHelper.getInstance().isArMainWithBranches(Profile.BACKOFFICE_CLIENT, loc); boolean isMultiStore = MSHelper.getInstance().isMSStore(Profile.BACKOFFICE_CLIENT, loc); boolean isUseMultiStoreAR = MSHelper.getInstance().isUseMultiStoreAR( Profile.BACKOFFICE_CLIENT, loc); boolean updateToBranch = false; if (!arMainWithBranches) { updateToBranch = false; } else if ((isMultiStore && isUseMultiStoreAR) && !RefCustomerType.RETAIL_ACCOUNT.equals(m_customerType)) { clientApplicationContext.getProfile(Profile.BACKOFFICE_CLIENT, loc) .getMulitStoreProfile().setReplicatingToServerFarm(Boolean.TRUE); updateToBranch = false; } else { updateToBranch = true; } return updateToBranch; } private void buildAndFireArUpdate(Integer customerNum, CustomerRequest.CustomerAction action) { if (isArMainWithBranches() && !RefCustomerType.RETAIL_ACCOUNT.equals(m_customerType)) { transactionAdded(customerNum, (String) agcCustomer.getProperty(CUST.NAME), action); } } private boolean isServingStoreChanged() { return (tabCustomer.getSelectedIndex() == TAB_MAIN2 && (agcCustomerUserDefinedField.haveRowsChanged() || haveServingStoreChanges())) || (m_tabChange && m_oldTabIndex == TAB_MAIN2 && (agcCustomerUserDefinedField.haveRowsChanged() || haveServingStoreChanges())); } /** * Saves any changes made to the data and refreshes the navigation data. * Also updates the "modified by" database and display values. * @return boolean Return true if update passes, false if update fails **/ public boolean fSave(){ if (isArBranchStore() && isServingStoreChanged() ) { saveUserDefinedField(); return true; } boolean isNew = (FM.getMode() == NEW); boolean arMainWithBranches = isArMainWithBranches(); //Bug #27194, Setting monthly sales potential to 0 when no value is entered. if(fldMonthlySalesPotential.getText().trim().equals("")) { agcCustomer.setProperty(CUST.MONTHLY_SALES_POTENTIAL, new BigDecimal("0.00")); } if (cbCustomerType.isVisible()) { Object selectedItem= cbCustomerType.getSelectedItem(); ResourceBundleReader rbr = ApplicationContext.getInstance().getResourceBundleReader(); Locale locale = ClientApplicationContext.getClientApplicationContext().getCurrentLocale(); String pleaseSelect = rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXINITIALITEM, locale); if(!"".equals(fldCustomerNum.getText()) && pleaseSelect.equals(selectedItem.toString())){ ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "1705"); return false; } if (isNew && cbCustomerType.getSelectedIndex() == 0) return false; } // Setting the Last_Modified_Date value through form master setTransactionColumns() for update // and the values for file transaction logging AgiRowCursor[] updates; if((agcCustomer.haveRowsChanged() || haveCustomerChanges()) && ((isNew && (agcCustomerDelivery.haveRowsChanged() || haveCustDeliveryChanges())) || (tabCustomer.getSelectedIndex() == TAB_MAIN2 && (agcCustomerDelivery.haveRowsChanged() || haveCustDeliveryChanges())))){ updates = new AgiRowCursor[]{agcCustomer,agcCustomerDelivery}; // Bug #22852 // Checked if haveCustDeliveryChanges() returned true in addition to the existing conditions in the if statement. }else if (agcCustomer.haveRowsChanged() || haveCustomerChanges() || haveCustDeliveryChanges() ){ updates = new AgiRowCursor[]{agcCustomer}; if (m_priorityPlusChanged) agcCustomer.setProperty(CUST.PRIORITY_PLUS, new Byte(iLocked)); if (m_dnsCustomerChanged) agcCustomer.setProperty(CUST.DNS_CUSTOMER, new Byte(iLocked)); if (!cbCategory.isEnabled() && isEmployeeSaleCustomer && cbCategory.getItemCount() > 0 && isGPCOwned()) { cbCategory.setSelectedIndex(RefNAPACustomerCategory.EMPLOYEE_SALE); if(isBillingCash){ cbBillingType.setValue(RefBillingType.CASH_ONLY); } } }else { updates = new AgiRowCursor[]{agcCustomerDelivery}; } FM.setTransactionColumns(updates, true); buildAndFireArUpdate((Integer)agcCustomer.getProperty(CUST.CUSTOMER_NUM), CustomerRequest.CustomerAction.UPDATE_INFO); if(agcCustomer.haveRowsChanged() || haveCustomerChanges()) { agcCustomer.setProperty(CUST.TYPE, m_customerType); agcCustomer.setProperty(CUST.REF_STATE_CD, (String)(cbRefState.getValue())); agcCustomer.setProperty(CUST.REF_COUNTRY_CD, (String)(cbRefCountry.getValue())); agcCustomer.setProperty(CUST.SALESMAN_EMPLOYEE_ID, (cbSalesRepNum.getValue())); if(fldEmail.getText().isEmpty()){ agcCustomer.setProperty(CUST.EMAIL, null); } if(fldEmailInvoices.getText().isEmpty()){ agcCustomer.setProperty(CUST.INVOICE_EMAIL_ADDRESS, null); } if (cbStoreCategory.getSelectedIndex() != 0) { agcCustomer.setProperty(CUST.STORE_CATEGORY_ID, (cbStoreCategory.getValue())); } else { agcCustomer.setProperty(CUST.STORE_CATEGORY_ID, null); } if (cbCustomerNote.getSelectedIndex() != 0) { agcCustomer.setProperty(CUST.CUSTOMER_NOTE_ID,(cbCustomerNote.getValue())); } else { agcCustomer.setProperty(CUST.CUSTOMER_NOTE_ID, null); } if (cbDeliveryTaxTable.getSelectedIndex() != 0) { agcCustomer.setProperty(CUST.DELIVERED_TAX_TABLE_ID, (cbDeliveryTaxTable.getValue())); } else { agcCustomer.setProperty(CUST.DELIVERED_TAX_TABLE_ID, null); } if (cbDefaultTaxTable.getSelectedIndex() != 0) { agcCustomer.setProperty(CUST.DEFAULT_TAX_TABLE_ID, (cbDefaultTaxTable.getValue())); } else { agcCustomer.setProperty(CUST.DEFAULT_TAX_TABLE_ID, null); } boolean nationalOrJSAChanged = hasNationalOrJSAChanged(); boolean createKRRecord = false; if (FM.getMode() == NEW) { if (rbTransmitNationalSalesYes.isSelected() && rbTransmitNationalSalesYes.isEnabled()) { agcCustomer.setProperty(CUST.TRANSMIT_NATIONAL_SALES, "Y"); createKRRecord = true; } else if (rbTransmitNationalSalesNo.isSelected() && rbTransmitNationalSalesNo.isEnabled()) { agcCustomer.setProperty(CUST.TRANSMIT_NATIONAL_SALES, "N"); } if (rbTransmitJSASalesYes.isSelected() && rbTransmitJSASalesYes.isEnabled()) { agcCustomer.setProperty(CUST.TRANSMIT_JSA_SALES, "Y"); createKRRecord = true; } else if (rbTransmitJSASalesNo.isSelected() && rbTransmitJSASalesNo.isEnabled()) { agcCustomer.setProperty(CUST.TRANSMIT_JSA_SALES, "N"); } agcCustomer.setProperty("CUSTOMER_TYPICALLY_PRESENT_DURING_INVOICING", "N"); agcCustomer.setProperty("CAPTURE_ESIGNATURE_ON_INVOICE", "N"); } else if (nationalOrJSAChanged) { String national = (String) agcCustomer.getProperty(CUST.TRANSMIT_NATIONAL_SALES); if (rbTransmitNationalSalesNo.isEnabled() && national.equals("Y") && rbTransmitNationalSalesNo.isSelected()) { agcCustomer.setProperty(CUST.TRANSMIT_NATIONAL_SALES, "N"); createKRRecord = true; } else if (rbTransmitNationalSalesYes.isEnabled() && national.equals("N") && rbTransmitNationalSalesYes.isSelected()) { createKRRecord = true; agcCustomer.setProperty(CUST.TRANSMIT_NATIONAL_SALES, "Y"); } String jsa = (String) agcCustomer.getProperty(CUST.TRANSMIT_JSA_SALES); if (rbTransmitJSASalesNo.isEnabled() && jsa.equals("Y") && rbTransmitJSASalesNo.isSelected()) { agcCustomer.setProperty(CUST.TRANSMIT_JSA_SALES, "N"); createKRRecord = true; } else if (rbTransmitJSASalesYes.isEnabled() && jsa.equals("N") && rbTransmitJSASalesYes.isSelected()) { createKRRecord = true; agcCustomer.setProperty(CUST.TRANSMIT_JSA_SALES, "Y"); } } FM.setTransactionColumns(agcCustomer); buildAndFireArUpdate((Integer)agcCustomer.getProperty(CUST.CUSTOMER_NUM), CustomerRequest.CustomerAction.UPDATE_INFO); try{ agcCustomer.updateRows(); String billingType = (String)cbBillingType.getValue(); if(!RETAIL_TYPE.equals((String)agcCustomer.getProperty(CUST.TYPE))) { if ((isNew) || (!customerARExists())) { setCustomerARDefaults(); } if (!isNew && m_customerType != null && !m_customerType.equals(RefCustomerType.RETAIL_ACCOUNT) && billingType != null && billingType.equals(RefBillingType.CASH_ONLY) && billingTypeChangedToCash) { billingTypeChangedToCash = false; boolean result = ClientApplicationContext.getClientApplicationContext() .getMessageMgr().showMessageYesNo(this, "1068"); if (result) { if (customerARExists()) { agcCustomerAR.setProperty(CUSTAR.LAST_COD_DATE, new Date()); short num = ((Short) agcCustomerAR.getProperty(CUSTAR.NUM_OF_TIMES_COD)).shortValue(); logger.debug("num: " + num); agcCustomerAR.setProperty(CUSTAR.NUM_OF_TIMES_COD, new Short("" + (num + 1))); agcCustomerAR.setProperty(CUSTAR.CUSTOMER_ID, agcCustomer.getProperty(CUST.ID)); agcCustomerAR.setProperty(CUSTAR.LOC, FM.m_loc); } else { agcCustomerAR.insertAfter(); agcCustomerAR.setProperty(CUSTAR.LAST_COD_DATE, new Date()); agcCustomerAR.setProperty(CUSTAR.NUM_OF_TIMES_COD, new Short("1")); agcCustomerAR.setProperty(CUSTAR.CUSTOMER_ID, agcCustomer.getProperty(CUST.ID)); agcCustomerAR.setProperty(CUSTAR.LOC, FM.m_loc); } } } FM.setTransactionColumns(agcCustomerAR); buildAndFireArUpdate((Integer)agcCustomer.getProperty(CUST.CUSTOMER_NUM), CustomerRequest.CustomerAction.UPDATE_INFO); agcCustomerAR.updateRows(); } updateProLink(); if (createKRRecord) { createKRRecord(); } }catch(AgoDataConcurrencyException e){ logger.error("AgoDataConcurrencyException in fSave(): " ,e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); try{ agcCustomer.refreshRows(); agcCustomerAR.refreshRows(); }catch(AgoSecurityException se){ logger.error("RefreshRows failed in fSave(): ",se); }catch(AgoTransientSystemException tse){ logger.error("RefreshRows failed in fSave(): ",tse); }catch(AgoUnrecoverableSystemException use){ logger.error("RefreshRows failed in fSave(): ",use); } }catch (AgoApiException e){ logger.error(e.toString() , e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); } } if (isNew && (agcCustomerDelivery.haveRowsChanged() || haveCustDeliveryChanges())) { logger.debug("is a new record and agcCustomerDelivery rows changed"); agcCustomerDelivery.setProperty(CUSTDEL.CUSTOMER_ID, new Integer(fldCustomerId.getValue())); agcCustomerDelivery.setProperty(CUSTDEL.LOC, FM.m_loc); FM.setTransactionColumns(agcCustomerDelivery); try{ agcCustomerDelivery.updateRows(); } catch(AgoDataConcurrencyException e){ logger.error("AgoDataConcurrencyException in fSave(): " ,e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); try{ agcCustomerDelivery.refreshRows(); }catch(AgoApiException ex){ logger.error(e.toString() , ex); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); } } catch (AgoApiException e){ logger.error(e.toString() , e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); } } else if ((tabCustomer.getSelectedIndex() == TAB_MAIN2 &&(agcCustomerDelivery.haveRowsChanged() || haveCustDeliveryChanges())) || (m_tabChange && m_oldTabIndex == TAB_MAIN2 && (agcCustomerDelivery.haveRowsChanged() || haveCustDeliveryChanges()))){ // not sure why, but some customers have no delivery info. Double defaultDoubleValue = new Double(0.0); Integer defaultIntValue = new Integer(0); String minSalesFreeDel = fldMinSalesFreeDel.getText(); String distanceToCust = fldDistanceToCust.getText(); String travelTimeToCust = fldTravelTimeToCust.getText(); String deliveryCharge = fldDeliveryCharge.getText(); try{ if(agcCustomerDelivery != null && agcCustomerDelivery.getProperty(CUSTDEL.CUSTOMER_ID) != null){ agcCustomerDelivery.setProperty(CUSTDEL.CUSTOMER_ID, new Integer(fldCustomerId.getValue())); agcCustomerDelivery.setProperty(CUSTDEL.LOC, FM.m_loc); agcCustomerDelivery.setProperty(CUSTDEL.DELIVERY_REF_OPTION_CD, (String)(cbDeliverFlg.getValue())); if (cbDeliveryRoute.getSelectedIndex() == 0){ agcCustomerDelivery.setProperty(CUSTDEL.DELIVERY_ROUTE_CD, null); }else { agcCustomerDelivery.setProperty(CUSTDEL.DELIVERY_ROUTE_CD, (String)(cbDeliveryRoute.getValue())); } if (cbDeliveryPriority.getSelectedIndex() == 0){ agcCustomerDelivery.setProperty(CUSTDEL.DELIVERY_PRIORITY_ID, null); }else { agcCustomerDelivery.setProperty(CUSTDEL.DELIVERY_PRIORITY_ID, ((Byte)cbDeliveryPriority.getValue())); } FM.setTransactionColumns(agcCustomerDelivery); agcCustomerDelivery.updateRows(); } else { agcCustomerDelivery.insertAfter(); agcCustomerDelivery.setProperty(CUSTDEL.CUSTOMER_ID, new Integer(fldCustomerId.getValue())); agcCustomerDelivery.setProperty(CUSTDEL.LOC, FM.m_loc); agcCustomerDelivery.setProperty(CUSTDEL.DELIVERY_REF_OPTION_CD, (String) (cbDeliverFlg.getValue())); if (cbDeliveryRoute.getSelectedIndex() == 0) { agcCustomerDelivery.setProperty(CUSTDEL.DELIVERY_ROUTE_CD, null); } else { agcCustomerDelivery.setProperty(CUSTDEL.DELIVERY_ROUTE_CD, (String) (cbDeliveryRoute.getValue())); } if (cbDeliveryPriority.getSelectedIndex() == 0) { agcCustomerDelivery.setProperty(CUSTDEL.DELIVERY_PRIORITY_ID, null); } else { agcCustomerDelivery.setProperty(CUSTDEL.DELIVERY_PRIORITY_ID, ((Byte) cbDeliveryPriority.getValue())); } if (deliveryCharge != null && !(deliveryCharge.equals(""))) { agcCustomerDelivery.setProperty(CUSTDEL.DELIVERY_CHARGE, deliveryCharge); } else { agcCustomerDelivery.setProperty(CUSTDEL.DELIVERY_CHARGE, defaultDoubleValue); } if (minSalesFreeDel != null && !(minSalesFreeDel.equals(""))) { agcCustomerDelivery.setProperty(CUSTDEL.MIN_AMT_FREE_DELIVERY, minSalesFreeDel); } else { agcCustomerDelivery.setProperty(CUSTDEL.MIN_AMT_FREE_DELIVERY, defaultDoubleValue); } if (distanceToCust != null && !(distanceToCust.equals(""))) { agcCustomerDelivery.setProperty(CUSTDEL.DISTANCE_TO_CUSTOMER, distanceToCust); } else { agcCustomerDelivery.setProperty(CUSTDEL.DISTANCE_TO_CUSTOMER, defaultIntValue); } if (travelTimeToCust != null && !(travelTimeToCust.equals(""))) { agcCustomerDelivery.setProperty(CUSTDEL.TRAVEL_TIME_CUSTOMER, travelTimeToCust); } else { agcCustomerDelivery.setProperty(CUSTDEL.TRAVEL_TIME_CUSTOMER, defaultIntValue); } FM.setTransactionColumns(agcCustomerDelivery); agcCustomerDelivery.updateRows(); } }catch(AgoDataConcurrencyException e){ logger.error("AgoDataConcurrencyException in fSave(): " ,e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); try{ agcCustomerDelivery.refreshRows(); }catch(AgoSecurityException se){ logger.error("RefreshRows failed in fSave(): ",se); }catch(AgoTransientSystemException tse){ logger.error("RefreshRows failed in fSave(): ",tse); }catch(AgoUnrecoverableSystemException use){ logger.error("RefreshRows failed in fSave(): ",use); } }catch (AgoApiException e){ logger.error(e.toString() , e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); } } if (isServingStoreChanged()) { saveUserDefinedField(); } setModifyLabels(); m_isNewRecord = false; // If we added a row or changed the customer's type (and therefore its number), // refresh and re-synch the nav data. if(isNew || m_custNumChanged){ try{ navData.refreshRows(); }catch(AgoTransientSystemException e){ logger.error("AgoTransientSystemException in fSave(): " ,e); }catch(AgoSecurityException e){ logger.error("AgoSecurityException in fSave(): " ,e); }catch(AgoUnrecoverableSystemException e){ logger.error("AgoUnrecoverableSystemException in fSave(): " ,e); } logger.debug("changed number, agcCustomer.CUSTOMER_NUM = " + agcCustomer.getProperty(CUST.CUSTOMER_NUM)); navigateToCustomer((Integer)agcCustomer.getProperty(CUST.CUSTOMER_NUM)); Integer newCustNum = (Integer)agcCustomer.getProperty(CUST.CUSTOMER_NUM); retrieveCustomerByNum(newCustNum); } //CUSTOMER_PRICING_PROFILE - FOR RETAIL CUSTOMER if(isNew && RETAIL_TYPE.equals((String)agcCustomer.getProperty(CUST.TYPE))) { CopyPricingProfileVO copyPricingProfileVO = new CopyPricingProfileVO(); copyPricingProfileVO.setToCustomerID(((Integer)agcCustomer.getProperty(CUST.ID)).intValue()); copyPricingProfileVO.setLoc(((Integer)agcCustomer.getProperty(CUST.LOC)).intValue()); copyPricingProfileVO.setLastModifiedDateTime((java.sql.Timestamp)agcCustomer.getProperty(CUST.LAST_MODIFIED_DATE)); copyPricingProfileVO.setEmpID(((Integer)agcCustomer.getProperty(CUST.MODIFIED_BY_EMPLOYEE_ID)).intValue()); ResultsVO results = InvokerBridge.invoke(copyPricingProfileVO); if(!results.isSuccessful() || results.getError() != null) { String errorStr = results.getError() != null ? results.getError().toString() : null; logger.error("Error from InvokerBridge: " + errorStr, results.getError()); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "103", errorStr); } } setCheckBox(); return true; } private void saveUserDefinedField() { StringBuffer sbServingStoreWhere = new StringBuffer(); sbServingStoreWhere.append("CUSTOMER_USER_DEFINED_FIELD.LOC ").append('=').append(FM.m_loc); sbServingStoreWhere.append(" AND ").append(" CUSTOMER_USER_DEFINED_FIELD.CUSTOMER_ID ").append('='); sbServingStoreWhere.append(fldCustomerId.getText()).append(" AND "); sbServingStoreWhere.append(" CUSTOMER_USER_DEFINED_FIELD.USER_DEFINED_FIELD_NAME_ID"); sbServingStoreWhere.append(" = 2"); try{ agcCustomerUserDefinedField.query(sbServingStoreWhere.toString()); boolean hasServingStore = agcCustomerUserDefinedField.gotoFirst(); if (hasServingStore) { if (cbServingStore.getSelectedIndex() == 0){ agcCustomerUserDefinedField.delete(); }else { agcCustomerUserDefinedField.setProperty("TEXT", ((String)cbServingStore.getValue())); } } else { agcCustomerUserDefinedField.insertAfter(); agcCustomerUserDefinedField.setProperty("CUSTOMER_ID", new Integer(fldCustomerId.getValue())); agcCustomerUserDefinedField.setProperty("LOC", FM.m_loc); agcCustomerUserDefinedField.setProperty("USER_DEFINED_FIELD_NAME_ID",new Integer(getUserDefinedFieldNameId()+"")); if (cbServingStore.getSelectedIndex() == 0){ agcCustomerUserDefinedField.setProperty("TEXT", null); }else { agcCustomerUserDefinedField.setProperty("TEXT", ((String)cbServingStore.getValue()).toString()); } } // FM.setTransactionColumns(agcCustomerUserDefinedField); TamsMisc.printRowCursorColumnValues(agcCustomerUserDefinedField); agcCustomerUserDefinedField.updateRows(); }catch(AgoDataConcurrencyException e){ logger.error("AgoDataConcurrencyException in fSave(): " ,e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); try{ agcCustomerUserDefinedField.refreshRows(); }catch(AgoSecurityException se){ logger.error("RefreshRows failed in fSave(): ",se); }catch(AgoTransientSystemException tse){ logger.error("RefreshRows failed in fSave(): ",tse); }catch(AgoUnrecoverableSystemException use){ logger.error("RefreshRows failed in fSave(): ",use); } }catch (AgoApiException e){ logger.error(e.toString() , e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); } } private Short getUserDefinedFieldNameId() { StringBuffer sbWhere = new StringBuffer(84); // reset datasource Hashtable hash = new Hashtable(); agcDsoGen.setDataSource("com.gpc.tams.dso.dsoGeneric"); Short sequence = new Short("0"); // setup band Descriptor TsoGenericBandDescriptor bandDescriptor = new TsoGenericBandDescriptor("user_defined_field_name", "user_defined_field_name"); bandDescriptor.addColumn("SEQUENCE", DatatypeCodes.TYPE_SHORT, true); sbWhere.append("SELECT SEQUENCE FROM user_defined_field_name WHERE FIELD_NAME = 'Serving Store' and user_defined_field_name.LOC="+FM.m_loc); hash.put(com.gpc.tams.dso.dsoGeneric.SQL, sbWhere.toString()); hash.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bandDescriptor); logger.debug("\n sbWhere="+sbWhere); try { SilverStreamExceptionHelper.invokeQuery(agcDsoGen,hash); if (agcDsoGen.gotoFirst()) { sequence = ((Short) agcDsoGen.getProperty("SEQUENCE")); } return sequence; } catch(AgoSecurityException e){ logger.error(e.toString(), e); } catch(AgoTransientSystemException e){ logger.error(e.toString(), e); } catch(AgoUnrecoverableSystemException e){ logger.error(e.toString(), e); } catch(ApplicationException e) { logger.error(e.toString(), e); } finally { hash = null; sbWhere = null; } return sequence; } private void updateProLink() { if (m_categoryId != agcCustomer.getProperty(Sch_Customer.REF_NAPA_CUSTOMER_CATEGORY_ID)) { try { StringBuffer sb = new StringBuffer(); sb.append(Sch_Tables.COMMUNICATION_DIRECTORY).append(".").append(Sch_CommunicationDirectory.INVOICE_TO_CUSTOMER_ID); sb.append("=").append(agcCustomer.getProperty(Sch_Customer.ID)).append(" AND "); sb.append(Sch_Tables.COMMUNICATION_DIRECTORY); sb.append(".").append(Sch_CommunicationDirectory.LOC).append("="); sb.append(agcCustomer.getProperty(Sch_Customer.LOC)); logger.debug("sb: " + sb); agcCommunicationDirectory.query(sb.toString()); logger.debug("After query"); if (agcCommunicationDirectory.gotoFirst()) { logger.debug("went to first"); if (agcCommunicationDirectory.getProperty(Sch_CommunicationDirectory.PROLINK_ACCOUNT_NUMBER) == null) return; ProLinkRegistrationHelper prolink = new ProLinkRegistrationHelper(FM.m_loc, false, ClientApplicationContext.getClientApplicationContext().getSessionId()); prolink.updateCustomerCategoryChange((Integer)agcCustomer.getProperty(Sch_Customer.ID), new Integer(""+agcCommunicationDirectory.getProperty(Sch_CommunicationDirectory.ID)), (new Integer(""+m_categoryId)).intValue(), ((Integer)agcCommunicationDirectory.getProperty(Sch_CommunicationDirectory.PROLINK_ACCOUNT_NUMBER)).intValue(), (new Integer(""+agcCustomer.getProperty(Sch_Customer.REF_NAPA_CUSTOMER_CATEGORY_ID))).intValue(), (new Integer(""+ agcCommunicationDirectory.getProperty(Sch_CommunicationDirectory.PROLINK_ACCOUNT_NUMBER))).intValue()); } else logger.debug("did not go to first"); } catch (com.sssw.rt.util.AgoTransientSystemException e) { logger.error(e.getMessage(), e); } catch (com.sssw.rt.util.AgoSecurityException e) { logger.error(e.getMessage(), e); } catch (com.sssw.rt.util.AgoUnrecoverableSystemException e) { logger.error(e.getMessage(), e); } } } /** * Not sure what this does. * @return boolean - true: logout was stopped; false: logout was not stopped **/ public boolean fStopLogout(){ return false; } /** * Not sure what this does. **/ public void fCheckAccess(){} /** * Creates a title for this form. * @return String - title value **/ public java.lang.String fCreateTitle(){ return "Customer Maintenance"; } public void fStylize(){} public java.lang.String fDescribe(){ return "Customer Maintenance Module: maintains all data related to a customer."; } /** * Provides this form's name. * @return String - form name value **/ public java.lang.String fGetFormName(){ return TsoConstant.FRM_CM_MAIN; } private boolean isCustomerNumUsed(Integer custNum){ boolean returnVal = false; Hashtable params = new Hashtable(); TsoGenericBandDescriptor bd = new TsoGenericBandDescriptor(TBL.CUSTOMER, TBL.CUSTOMER); bd.addColumn(CUST.ID, DatatypeCodes.TYPE_INT, true); StringBuffer sbQuery = new StringBuffer(56); sbQuery.append("SELECT ").append(CUST.ID).append(" FROM ").append(TBL.CUSTOMER); sbQuery.append(" WHERE ").append(CUST.CUSTOMER_NUM).append('=').append(custNum.toString()); params.put(com.gpc.tams.dso.dsoGeneric.SQL, sbQuery.toString()); params.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bd); logger.debug("isCustomerNumUsed query = " + sbQuery.toString()); try{ SilverStreamExceptionHelper.invokeQuery(dsoGeneric,params); returnVal = dsoGeneric.gotoFirst(); }catch(ApplicationException e){ logger.error("ApplicationException occured in isCustomerNumUsed(Integer custNum " , e); }catch(AgoTransientSystemException e){ logger.error("AgoTransientSystemException occured in isCustomerNumUsed(Integer custNum " , e); }catch(AgoSecurityException e){ logger.error("AgoSecurityException occured in isCustomerNumUsed(Integer custNum " , e); }catch(AgoUnrecoverableSystemException e){ logger.error("AgoUnrecoverableSystemException occured in isCustomerNumUsed(Integer custNum " , e); } return returnVal; } /** * Get a vector contains all employee ID in the Sales Rep. combo box. **/ private void employeeIDVector() { for (int i = 0; i < cbEmpID.getItemCount(); i++) { m_empID_v.add(cbEmpID.getItemAt(i).toString()); // logger.debug("emp ID: " + cbEmpID.getItemAt(i).toString()); } } /** * Loads data and settings specific to the first tab (Accounting Info). * This method is called whenever a record changes or this tab is selected. **/ private void loadMainTab(){ try { agcCustomer.refreshRows(); //set unbound customer combos setUnboundForMainTab(); if (agcCustomer.getProperty(CUST.ALTERNATE_CORE_CUSTOMER_ID) != null) {//Set alternate customer number StringBuffer sbWhere = new StringBuffer(62); sbWhere.append(TBL.CUSTOMER).append('.').append(CUST.LOC).append('=').append(FM.m_loc); sbWhere.append(" AND ").append(TBL.CUSTOMER).append('.').append(CUST.ID).append('='); sbWhere.append(agcCustomer.getProperty(CUST.ALTERNATE_CORE_CUSTOMER_ID).toString()); agcAlternateCustomer.query(sbWhere.toString()); if (agcAlternateCustomer.gotoFirst()) { fldAltCustNumber.setText(agcAlternateCustomer.getProperty(CUST.CUSTOMER_NUM).toString()); }else { fldAltCustNumber.setText(""); } }else { fldAltCustNumber.setText(""); } if (FM.canEdit()) { FM.setNew(true); } FM.setRequiredLabel(lblEmail, false); }catch (AgoUnrecoverableSystemException e) { logger.error(e.toString(), e); String[] msgParams = {"Alternate Customer", e.toString()}; ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "121", msgParams); }catch (AgoTransientSystemException e) { logger.error(e.toString(), e); String[] msgParams = {"Alternate Customer", e.toString()}; ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "121", msgParams); }catch (AgoSecurityException e) { logger.error(e.toString(), e); String[] msgParams = {"Alternate Customer", e.toString()}; ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "121", msgParams); } setCheckBox(); } /* * Set Values for unbound combo boxes for main tab */ private void setUnboundForMainTab() { selectCustomerType(); cbRefCountry.setValue(agcCustomer.getProperty(CUST.REF_COUNTRY_CD)); fillStateCombo((String)cbRefCountry.getValue()); cbRefState.setValue(agcCustomer.getProperty(CUST.REF_STATE_CD)); cbSalesRepNum.setValue(agcCustomer.getProperty(CUST.SALESMAN_EMPLOYEE_ID)); if (agcCustomer.getProperty(CUST.STORE_CATEGORY_ID) == null) { cbStoreCategory.setSelectedIndex(0); } else { cbStoreCategory.setValue(agcCustomer.getProperty(CUST.STORE_CATEGORY_ID)); } if (agcCustomer.getProperty(CUST.CUSTOMER_NOTE_ID) == null) { cbCustomerNote.setSelectedIndex(0); } else { cbCustomerNote.setValue(agcCustomer.getProperty(CUST.CUSTOMER_NOTE_ID)); } if (agcCustomer.getProperty(CUST.DEFAULT_TAX_TABLE_ID) == null) { cbDefaultTaxTable.setSelectedIndex(0); } else { cbDefaultTaxTable.setValue(agcCustomer.getProperty(CUST.DEFAULT_TAX_TABLE_ID)); } if (agcCustomer.getProperty(CUST.DELIVERED_TAX_TABLE_ID) == null) { cbDeliveryTaxTable.setSelectedIndex(0); } else { cbDeliveryTaxTable.setValue(agcCustomer.getProperty(CUST.DELIVERED_TAX_TABLE_ID)); } String unregistered = ApplicationContext.getInstance().getResourceBundleReader().getLocalizedText( ResourceBundleReader.UI, "UNREGISTERED", ClientApplicationContext.getClientApplicationContext().getCurrentLocale()); String registered = ApplicationContext.getInstance().getResourceBundleReader().getLocalizedText( ResourceBundleReader.UI, "REGISTERED", ClientApplicationContext.getClientApplicationContext().getCurrentLocale()); if ("U".equals(agcCustomer.getProperty(CUST.TRANSMIT_NATIONAL_SALES))) { rbTransmitNationalSalesNo.setSelected(true); lblNationalRegister.setText(unregistered); } else if ("R".equals(agcCustomer.getProperty(CUST.TRANSMIT_NATIONAL_SALES))) { rbTransmitNationalSalesYes.setSelected(true); lblNationalRegister.setText(registered); } else if ("N".equals(agcCustomer.getProperty(CUST.TRANSMIT_NATIONAL_SALES))) { rbTransmitNationalSalesNo.setSelected(true); lblNationalRegister.setText(""); } else if ("Y".equals(agcCustomer.getProperty(CUST.TRANSMIT_NATIONAL_SALES))) { rbTransmitNationalSalesYes.setSelected(true); lblNationalRegister.setText(""); } if ("U".equals(agcCustomer.getProperty(CUST.TRANSMIT_JSA_SALES))) { rbTransmitJSASalesNo.setSelected(true); lblJSARegister.setText(unregistered); } else if ("R".equals(agcCustomer.getProperty(CUST.TRANSMIT_JSA_SALES))) { rbTransmitJSASalesYes.setSelected(true); lblJSARegister.setText(registered); } else if ("N".equals(agcCustomer.getProperty(CUST.TRANSMIT_JSA_SALES))) { rbTransmitJSASalesNo.setSelected(true); lblJSARegister.setText(""); } else if ("Y".equals(agcCustomer.getProperty(CUST.TRANSMIT_JSA_SALES))) { rbTransmitJSASalesYes.setSelected(true); lblJSARegister.setText(""); } } /** * Sets the "modified by" labels to the current "modified by" column values. * If formats the "modified by" date using the FwoFormat object, and it uses the Bean manager * to get the first and last name of the "modified by" employee. **/ private void setModifyLabels(){ try{ // Set modified by date and employee labels java.sql.Timestamp lastModified = (java.sql.Timestamp)agcCustomer.getProperty(CUST.LAST_MODIFIED_DATE); Integer empId = (Integer)agcCustomer.getProperty(CUST.MODIFIED_BY_EMPLOYEE_ID); StringBuffer sLastMod = new StringBuffer(66); //format the date/time last modified if (lastModified != null){ FwoDatePattern dPattern = (FwoDatePattern)FwoPattern.getDatePatternInstance( ClientApplicationContext.getClientApplicationContext().getCurrentLocale(), new Integer(ClientApplicationContext.getClientApplicationContext().getProfile(Profile.BACKOFFICE_CLIENT, (int) ClientApplicationContext.getClientApplicationContext().getLocation()).getStoreProfile().getRefDateFormatId().intValue())); sLastMod.append(dPattern.formatDateSpecial(lastModified, ClientApplicationContext.getClientApplicationContext().getCurrentLocale(), FwoDatePattern.DATE_TIME)); } sLastMod.append(' ').append(' '); //set last name and first name from the cache manager sLastMod.append(((com.gpc.backofficecommon.app.TamsCacheMgr) FM.m_SessionMgr.getCacheMgr()).getEmployeeData(empId, (Integer)agcCustomer.getProperty(CUST.LOC))); if (currentTabIndex == TAB_MAIN) { lblModifiedEmplMain.setText(sLastMod.toString()); }else if (currentTabIndex == TAB_MAIN2) { lblModifiedEmplInv.setText(sLastMod.toString()); } } catch (DatePatternFormatException e) { logger.error("Error populating modified labels: " , e); } } /** * Adds InputVerifiers to the text fields that need them. **/ private void initValidators(){ try{ // whole number fields Integer iZero = new Integer(0); // Integer iMin = new Integer(1); Integer iMin = new Integer(FwiConstant.BIGINTEGER); Integer i255 = new Integer(255); BigDecimal bdZero = new BigDecimal(0); BigDecimal bd9s = new BigDecimal(99999999.99); Integer iMax = FwiConstant.INTEGER_MAX_VALUE; FM.addValidatedWholeNumberComponent(fldMinAmtForPO, iZero, iMax, true, true); FM.addValidatedWholeNumberComponent(fldNoAdditionalInvCopies, iZero, new Integer(127), false, true); FM.addValidatedWholeNumberComponent(fldTravelTimeToCust, iZero, new Integer(Short.MAX_VALUE), false, true); FM.addValidatedWholeNumberComponent(fldDistanceToCust, iZero, i255, false, true); FM.addValidatedWholeNumberComponent(fldInvDiscount, new Integer(-99), new Integer(99), false, true); FM.addValidatedWholeNumberComponent(fldPriceMaxDiscount, new Integer(0), new Integer(99), false, true); FM.addValidatedWholeNumberComponent(fldAltCustNumber, iMin, iMax, false, true); FM.addValidatedWholeNumberComponent(fldCustomerNum, iZero, new Integer(99999999), false, true); // currency number fields FM.addValidatedCurrencyNumberComponent(fldMonthlySalesPotential, bdZero, bd9s, true, true); FM.addValidatedCurrencyNumberComponent(fldMinSalesFreeDel, bdZero, bd9s, true, true); FM.addValidatedCurrencyNumberComponent(fldDeliveryCharge, bdZero, bd9s, true, true); FM.addValidatedCurrencyNumberComponent(fldAmount, bdZero, new BigDecimal(99.99), true, true); // text fields FM.addValidatedTextComponent(fldAlphaKey, FwiConstant.ANY, 6); FM.addValidatedTextComponent(fldName, FwiConstant.ANY, 40); FM.addValidatedTextComponent(fldCFDIName, FwiConstant.ANY, 100); FM.addValidatedTextComponent(fldAddress1, FwiConstant.ANY, 40); FM.addValidatedTextComponent(fldAddress2, FwiConstant.ANY, 40); FM.addValidatedTextComponent(fldAddress3, FwiConstant.ANY, 40); FM.addValidatedTextComponent(fldAddress4, FwiConstant.ANY, 40); FM.addValidatedTextComponent(fldCity, FwiConstant.ANY, 30); FM.addValidatedTextComponent(fldNoAdditionalInvCopies, FwiConstant.NUMERIC, 3); FM.addValidatedTextComponent(fldZipCode, FwiConstant.ZIP_INPUT_VALIDATION, true); FM.addValidatedTextComponent(fldPhone, FwiConstant.TELEPHONE_NUM_INPUT_VALIDATION, 20, true); FM.addValidatedTextComponent(fldExtension, FwiConstant.ALPHANUMERIC, 4); FM.addValidatedTextComponent(fldSpeedDial, FwiConstant.ALPHANUMERIC, 4); FM.addValidatedTextComponent(fldFaxNum, FwiConstant.TELEPHONE_NUM_INPUT_VALIDATION, 20, true); FM.addValidatedTextComponent(fldWebAddress, FwiConstant.ANY, 254); FM.addValidatedTextComponent(fldEmail, FwiConstant.ANY, 100); FM.addValidatedTextComponent(fldEmailInvoices, FwiConstant.ANY, 100); FM.addValidatedTextComponent(fldSecTaxExemptNumber, FwiConstant.ANY, 30, false, true); FM.addValidatedTextComponent(fldPriTaxExemptNumber, FwiConstant.ANY, 30, false, true); FM.addValidatedTextComponent(fldSalesIDNumber, FwiConstant.ALPHANUMERIC, 9); FM.addValidatedTextComponent(fldPrimaryTaxNumber, FwiConstant.ALPHANUMERIC, 30); FM.addValidatedTextComponent(fldSecondaryTaxNumber, FwiConstant.ALPHANUMERIC, 30); Calendar cal = Calendar.getInstance(); cal.set(Calendar.HOUR_OF_DAY,0); cal.set(Calendar.MINUTE,0); cal.set(Calendar.SECOND,0); cal.set(Calendar.MILLISECOND,0); java.util.Date today = cal.getTime(); cal.set(Calendar.YEAR, 2099); cal.set(Calendar.MONTH, Calendar.DECEMBER); cal.set(Calendar.DATE, 31); java.util.Date maxDate = cal.getTime(); FM.addValidatedDateComponent(fldPriTaxExemptExpDate, FwiConstant.DATE_INPUT_VALIDATION, today, maxDate, true); FM.addValidatedDateComponent(fldSecTaxExemptExpDate, FwiConstant.DATE_INPUT_VALIDATION, today, maxDate, true); }catch(FwoUnsupportedObjectException e){ logger.error("Error in initValidators() ", e); } } /** * Loads data and settings specific to the second tab (Invoicing Info). * This method is called whenever a record changes or this tab is selected. **/ private void loadInvoiceTab(){ try { agcCustomer.refreshRows(); //Bug :31399 Added the line of code setMiscellaneousfields(); setPriceControlStatus(); //reset values of unbound combo boxes in Account Tab cbCustomerType.setValue(agcCustomer.getProperty(CUST.TYPE)); FM.setRequiredLabel(lblDeliveryFlag, false); cbRefCountry.setValue(agcCustomer.getProperty(CUST.REF_COUNTRY_CD)); fillStateCombo((String)cbRefCountry.getValue()); cbRefState.setValue(agcCustomer.getProperty(CUST.REF_STATE_CD)); cbSalesRepNum.setValue(agcCustomer.getProperty(CUST.SALESMAN_EMPLOYEE_ID)); if (agcCustomer.getProperty(CUST.STORE_CATEGORY_ID) != null) { cbStoreCategory.setValue(agcCustomer.getProperty(CUST.STORE_CATEGORY_ID)); } else { cbStoreCategory.setSelectedIndex(0); } if (agcCustomer.getProperty(CUST.CUSTOMER_NOTE_ID) != null) { cbCustomerNote.setValue(agcCustomer.getProperty(CUST.CUSTOMER_NOTE_ID)); } else { cbCustomerNote.setSelectedIndex(0); } setCustomerUserDefinedField(); Short deliveryTaxID = (Short)agcCustomer.getProperty(CUST.DELIVERED_TAX_TABLE_ID); if (deliveryTaxID != null) cbDeliveryTaxTable.setValue(deliveryTaxID); else cbDeliveryTaxTable.setSelectedIndex(0); Short defaultTaxID = (Short)agcCustomer.getProperty(CUST.DEFAULT_TAX_TABLE_ID); if (defaultTaxID != null) cbDefaultTaxTable.setValue(defaultTaxID); else cbDefaultTaxTable.setSelectedIndex(0); StringBuffer sbWhere = new StringBuffer(78); sbWhere.append(TBL.CUSTOMER_DELIVERY).append('.').append(CUSTDEL.LOC).append('=').append(FM.m_loc); sbWhere.append(" AND ").append(TBL.CUSTOMER_DELIVERY).append('.').append(CUSTDEL.CUSTOMER_ID).append('='); sbWhere.append(fldCustomerId.getText()); agcCustomerDelivery.query(sbWhere.toString()); boolean hasCustDelivery = agcCustomerDelivery.gotoFirst(); logger.debug("----------------------->hasCustDelivery: " + hasCustDelivery); //set values for unbound Customer Delivery combos if (hasCustDelivery) { cbDeliverFlg.setValue(agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_REF_OPTION_CD)); if (agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_ROUTE_CD) == null){ cbDeliveryRoute.setSelectedIndex(0); } else { cbDeliveryRoute.setValue(agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_ROUTE_CD)); } if (agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_PRIORITY_ID) == null){ cbDeliveryPriority.setSelectedIndex(0); } else { cbDeliveryPriority.setValue(agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_PRIORITY_ID)); } } else { cbDeliveryRoute.setSelectedIndex(0); cbDeliveryPriority.setSelectedIndex(0); } //query the customer delivery table for Main2 if (FM.getMode()==FwoFormMaster.EDIT_MODE || FM.getMode() == FwoFormMaster.EDIT_MODE_EDITING) { logger.debug("----------------------entering loadInvoiceTab in EDIT_MODE"); if (!hasCustDelivery){ logger.debug("inserting after"); agcCustomerDelivery.insertAfter(); // set delivery defaults setDeliveryDefaults(); FM.setTransactionColumns(agcCustomerDelivery, true); agcCustomerDelivery.updateRows(); TamsMisc.printRowCursorColumnValues(agcCustomerDelivery); } if (isGPCOwned()) { cbInvFlag.setEnabled(false); fldInvDiscount.setEnabled(false); } } else{ logger.debug(" entering loadInvoiceTab not in EDIT_MODE: " + FM.getMode()); } // Disables the "PrintBalance" component if the store is an AR branch store that // does not get AR information from the multi-store server. disablePrintBalance(); enableDisableServingStore(); disableDirectShipCheckBox(); } catch (AgoDataConcurrencyException e) { logger.error("Error in loadInvoiceTab() ", e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); try{ agcCustomerDelivery.refreshRows(); }catch(AgoSecurityException se){ logger.error("RefreshRows failed in loadInvoiceTab(): ",se); }catch(AgoTransientSystemException tse){ logger.error("RefreshRows failed in loadInvoiceTab(): ",tse); }catch(AgoUnrecoverableSystemException use){ logger.error("RefreshRows failed in loadInvoiceTab(): ",use); } } catch (AgoApiException e){ logger.error(e.toString() , e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); } FM.setNew(false); //Bug No: #26052 added the following lines of code to disable the 'Edit' 'Sort' 'Print' and 'Delete' Buttons on ToolBar. FM.setEdit(false); FM.setSort(false); FM.setPrint(false); FM.setDelete(false); } private void setCustomerUserDefinedField() throws AgoSecurityException,AgoTransientSystemException,AgoUnrecoverableSystemException { StringBuffer sbServingStoreWhere = new StringBuffer(78); sbServingStoreWhere.append("CUSTOMER_USER_DEFINED_FIELD.LOC ").append('=').append(FM.m_loc); sbServingStoreWhere.append(" AND ").append(" CUSTOMER_USER_DEFINED_FIELD.CUSTOMER_ID ").append('='); sbServingStoreWhere.append(fldCustomerId.getText()).append(" AND "); sbServingStoreWhere.append(" CUSTOMER_USER_DEFINED_FIELD.USER_DEFINED_FIELD_NAME_ID"); sbServingStoreWhere.append(" = 2"); agcCustomerUserDefinedField.query(sbServingStoreWhere.toString()); boolean hasServingStore = agcCustomerUserDefinedField.gotoFirst(); logger.debug("----------------------->hasServingStore: " + hasServingStore); //set values for unbound Customer Delivery combos if (hasServingStore) { if (agcCustomerUserDefinedField.getProperty("TEXT") != null){ cbServingStore.setValue(agcCustomerUserDefinedField.getProperty("TEXT")); } else { cbServingStore.setSelectedIndex(0); } } else { cbServingStore.setSelectedIndex(0); } } /* * Set values for unbound combo boxes for invoice nfo tab */ private void setUnboundForInvoiceTab() throws AgoSecurityException,AgoTransientSystemException,AgoUnrecoverableSystemException { cbDeliverFlg.setValue(agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_REF_OPTION_CD)); if (agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_ROUTE_CD) == null){ cbDeliveryRoute.setSelectedIndex(0); } else { cbDeliveryRoute.setValue(agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_ROUTE_CD)); } if (agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_PRIORITY_ID) == null){ cbDeliveryPriority.setSelectedIndex(0); } else { cbDeliveryPriority.setValue(agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_PRIORITY_ID)); } if (agcCustomer.getProperty(CUST.DEFAULT_TAX_TABLE_ID) == null) { cbDefaultTaxTable.setSelectedIndex(0); } else { cbDefaultTaxTable.setValue(agcCustomer.getProperty(CUST.DEFAULT_TAX_TABLE_ID)); } if (agcCustomer.getProperty(CUST.DELIVERED_TAX_TABLE_ID) == null) { cbDeliveryTaxTable.setSelectedIndex(0); } else { cbDeliveryTaxTable.setValue(agcCustomer.getProperty(CUST.DELIVERED_TAX_TABLE_ID)); } } /** * Sets default values for a new CUSTOMER_DELIVERY record **/ private void setDeliveryDefaults(){ Double dZero = new Double(0.0); Integer iZero = new Integer(0); agcCustomerDelivery.setProperty(CUSTDEL.CUSTOMER_ID, agcCustomer.getProperty(CUST.ID)); agcCustomerDelivery.setProperty(CUSTDEL.LOC, agcCustomer.getProperty(CUST.LOC)); agcCustomerDelivery.setProperty(CUSTDEL.DELIVERY_REF_OPTION_CD, "O"); agcCustomerDelivery.setProperty(CUSTDEL.DELIVERY_CHARGE, dZero); agcCustomerDelivery.setProperty(CUSTDEL.DISTANCE_TO_CUSTOMER, iZero); agcCustomerDelivery.setProperty(CUSTDEL.MIN_AMT_FREE_DELIVERY, dZero); agcCustomerDelivery.setProperty(CUSTDEL.TRAVEL_TIME_CUSTOMER, iZero); cbDeliverFlg.setValue("O"); cbDeliveryRoute.setSelectedIndex(0); cbDeliveryPriority.setSelectedIndex(0); } /** * Deletes a row in the database if the customer passes all delete requirements. * Refreshes the navigation data on the form master, and goes to the next record.
* @return boolean Return true if delete passes, false if delete fails **/ public boolean fDelete(){ setCheckBox(); //if the customer type is Account if("A".equals(m_customerType)){ //if the store is GPC owned, they can't delete if (isGPCOwned() || isConsolidatedARMSBranchStore()) { ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "407"); return false; } } if (m_storeType.equals("L")) { ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "1718"); return false; } try { ResultsVO resultVO = ClientApplicationContext.getClientApplicationContext().getCustomerDAO(). isOkToDeleteCustomer(FM.m_loc, (Integer)agcCustomer.getProperty(CUST.ID), false); if (resultVO == null) { ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "102"); return false; } if (resultVO.getStatusCode() != 0) { CustomerStatusCodeMapper codeMapper = new CustomerStatusCodeMapper(); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, codeMapper.getMessageId(resultVO.getStatusCode())); return false; } else { m_delete = true; DATA_LOADING = true; final Integer customerNum = (Integer)agcCustomer.getProperty(CUST.CUSTOMER_NUM); agcCustomer.delete(); FM.setTransactionColumns(agcCustomer); buildAndFireArUpdate(customerNum, CustomerRequest.CustomerAction.DELETE); agcCustomer.updateRows(); // Refresh and re-synch the nav data since we deleted a row navData.refreshRows(); if (FM.fNext() || FM.fPrevious()) { navigateToCustomer((Integer)agcCustomer.getProperty(CUST.CUSTOMER_NUM)); } DATA_LOADING = false; return true; } }catch (AgoDataConcurrencyException e) { logger.error("AgoDataConcurrencyException in fDelete()", e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); try{ agcCustomer.refreshRows(); }catch(AgoSecurityException se){ logger.error("AgoSecurityException: RefreshRows failed in fDelete(): ",se); }catch(AgoTransientSystemException tse){ logger.error("AgoTransientSystemException: RefreshRows failed in fDelete(): ",tse); }catch(AgoUnrecoverableSystemException use){ logger.error("AgoUnrecoverableSystemException: RefreshRows failed in fDelete(): ",use); } return false; }catch (AgoApiException e){ logger.error(e.toString() , e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showUpdateErrors(this, e, null); return false; } } /** * Checks for changes on the current tab and asks the user to save. If no changes occurred, the * save was successful, or the user choose not to save; then, the selected tab's subform will * be loaded. **/ private void handle_tabCustomer_stateChanged(javax.swing.event.ChangeEvent changeEvent){ m_oldTabIndex = currentTabIndex; // if selected tab hasn't changed, then return if (currentTabIndex == tabCustomer.getSelectedIndex()) return; m_tabChange = true; logger.debug("currentTabIndex in handle_tabCustomer_stateChanged: " + currentTabIndex); // check for changes and if save passes if (currentTabForm instanceof FwiFormProcess && !((FwiFormProcess)currentTabForm).fGetFormMaster().saveWarningPasses()) { // go back to previous tab tabCustomer.setSelectedIndex(currentTabIndex); }//if (!((FwiFormProcess)currentTabForm).FM.saveWarningPasses()) { else { DATA_LOADING = true; // load new tab's form loadForm(); // update focus to the first field in on the tab // it is here due to focus problems occurring in the loadForm method JPanel panel = (JPanel) tabCustomer.getComponentAt(tabCustomer.getSelectedIndex()); panel.requestFocus(); if (currentTabIndex == TAB_MAIN) { if (!isGPCOwned()){ if (isConsolidatedARMSBranchStore() && !m_customerType.equals(RefCustomerType.RETAIL_ACCOUNT)) { FM.setComponentFocus(fldSearch); } else { FM.setComponentFocus(fldAlphaKey); //Set the initial focus on the alpha key } }else{ FM.setComponentFocus(fldPhone); //Set the initial focus on the phone } }else if (currentTabIndex == TAB_MAIN2) { if (m_customerType.equals(RefCustomerType.RETAIL_ACCOUNT) && FM.canEdit()) { FM.setComponentFocus(cbDeliveryTaxTable); // set initial focus to delivery combo } else { if (!FM.canEdit()) { FM.setComponentFocus(fldSearch); } else if (isGPCOwned()) { //doesn't matter if branch, a regular customer has full access FM.setComponentFocus(cbDeliveryTaxTable); // set initial focus to delivery combo } else { if (isConsolidatedARMSBranchStore() && !m_customerType.equals(RefCustomerType.RETAIL_ACCOUNT)) { FM.setComponentFocus(fldSearch); } else { FM.setComponentFocus(cbDeliveryTaxTable); // set initial focus to delivery combo } } } } DATA_LOADING = false; } m_tabChange = false; componentLayout(); } private void componentLayout(){ if (currentTabIndex == TAB_MAIN) { Component accountComp[] = {fldSearch,pbSearch,fldCustomerNum,lblCustomerTypeValue,fldAlphaKey, fldName,fldCFDIName,fldAddress1,fldAddress2,fldAddress3,fldAddress4,fldCity, cbRefCountry,cbRefState,fldZipCode,fldPhone,fldExtension,fldSpeedDial, fldFaxNum,fldWebAddress,fldEmail,cbSalesRepNum,cbCategory,cbStoreCategory, cbCustomerNote,rbTransmitJSASalesYes,rbTransmitJSASalesNo,rbTransmitNationalSalesYes, rbTransmitNationalSalesNo,fldMinAmtForPO,fldAltCustNumber,fldMonthlySalesPotential, cbBillingType,cbLangPref,fldSalesIDNumber,ckAuthorizePurchases, ckAllowOnlyCoreSales, ckIbsAccount}; setTabOrder(accountComp); }else if (currentTabIndex == TAB_MAIN2) { Component invoiceComp[] = {cbDeliveryTaxTable,cbDefaultTaxTable,cbPriTaxStatus,fldPriTaxExemptNumber, fldPriTaxExemptExpDate,cbSecTaxStatus,fldSecTaxExemptNumber,fldSecTaxExemptExpDate, fldPrimaryTaxNumber,fldSecondaryTaxNumber, ckPrintMSDS,ckAllowBackorders,ckPrintCatalogNotes,ckAllowSpecialOrders,ckPrintBalance, ckExemptEnvCharges,fldNoAdditionalInvCopies,ckPromptForESignatureOnAllInvoices, cbFlag,cbType,fldAmount,cbInvFlag,fldInvDiscount, cbDeliverFlg,cbDeliveryRoute,cbDeliveryPriority,fldTravelTimeToCust,fldDistanceToCust, fldMinSalesFreeDel,fldDeliveryCharge,ckPriceLocked,fldPriceMaxDiscount,cbServingStore, lblServingStore,lblDirectShip,ckDirectShip}; setTabOrder(invoiceComp); } } /** * Dynamically loads selected tab's subform. Caches the subform so it is only loaded once * and keep track of what is and isn't loaded. Makes sure to call the subform's fRetrieve() method * to update the subform with what record is active. The subform is responsible for calling its * FM.formActivate method so the toolbar knows that it now is active!!! * @todo We need to replace the JPanel that SS adds to each tab with our form instead of adding our form to that JPanel **/ public void loadForm(){ try { agGeneral.beginWaitCursor(); //Get the selected tab currentTabIndex = tabCustomer.getSelectedIndex(); //Get the tab panel - This JPanel needs to go away, but we are not willing to take this risk to make this change at this point JPanel panel = (JPanel) tabCustomer.getComponentAt(currentTabIndex); /*Depending on which tab was chosen, need to add the appropriate subform the first time the tab is selected. Set the currentTab and add the form to the vector so it is cached. Call fRetrieve() passing the hashtable of values each time that tab is selected to set the current id on the subform. */ m_customerType = (String)agcCustomer.getProperty(Sch_Customer.TYPE); if (currentTabIndex < 2) { DATA_LOADING = true; currentTabForm = this; FM.formActivate(); // fill the combos fillCustomerTypeCombo(); fillCountryCombo(); fillREF_Combos(true); toggleMode(EDITING); if (currentTabIndex == TAB_MAIN) { loadMainTab(); }else { loadInvoiceTab(); } setModifyLabels(); DATA_LOADING = false; }//if (currentTabIndex < 2) { else { long start = System.currentTimeMillis(); String subFormName = subFormNames[currentTabIndex]; if (panel.getComponentCount() > 0) { currentTabForm = (AgfForm) panel.getComponent(0); } else { currentTabForm = FM.m_SessionMgr.getNavigationMgr().showSubform(this, subFormName, 5, 5, panel, m_functionIds[currentTabIndex]); logger.debug(" CustMaint showSubform " + subFormName + " elapsed = " + (System.currentTimeMillis() - start)); // The Usual Pricing Profiles form has three components dynamically bound to agcCustomer. // The binding needs to be done only the first time that form is loaded. if (currentTabForm instanceof FwiFormProcess && TsoConstant.FRM_CM_USUAL_PRICING_PROFILES.equals(((FwiFormProcess)currentTabForm).fGetFormName()) ) { ((FrmCM_CustMaint_UsualPricingProfiles)currentTabForm).fBindControls(agcCustomer, agDataMgr); } } //Need to put any necessary information into a hashtable to pass to the subform such as the current id or cd Hashtable hshParams = new Hashtable(); hshParams.put(TsoConstant.KEY_ID, new Integer(fldCustomerId.getValue())); if (m_defaultCountryCd != null) { hshParams.put(SP.REF_COUNTRY_CD, m_defaultCountryCd); } if (m_defaultStateCd != null) { hshParams.put(SP.REF_STATE_CD, m_defaultStateCd); } if (m_defaultLanguageCd != null) { hshParams.put(SP.REF_LANGUAGE_CD, m_defaultLanguageCd); } if (m_storeType != null) { hshParams.put(SP.STORE_TYPE, m_storeType); } if (m_customerType != null) { hshParams.put(CUST.REF_CUSTOMER_TYPE_CD, m_customerType); } if (agcCustomer.getProperty(CUST.CUSTOMER_NUM) != null) { hshParams.put(CUST.CUSTOMER_NUM, (Integer) agcCustomer.getProperty(CUST.CUSTOMER_NUM)); } if (agcCustomer.getProperty(CUST.NAME) != null) { hshParams.put(CUST.NAME, (String) agcCustomer.getProperty(CUST.NAME)); } if (agcCustomer.getProperty(CUST.CFDI_NAME) != null) { hshParams.put(CUST.CFDI_NAME, (String) agcCustomer.getProperty(CUST.CFDI_NAME)); } if (agcCustomer.getProperty(CUST.CEPDI_CORPORATION_TYPE) != null) { hshParams.put(CUST.CEPDI_CORPORATION_TYPE, (String) agcCustomer.getProperty(CUST.CEPDI_CORPORATION_TYPE)); } //initialize subform data if(currentTabForm instanceof FwiFormProcess){ ((FwiFormProcess)currentTabForm).fRetrieve(hshParams); //localize subforms ((FwiFormProcess)currentTabForm).fLocalize(); logger.debug(" CustMaint loadForm " + subFormName + " elapsed = " + (System.currentTimeMillis() - start)); } } // set the priority plus label visible or not byte val = getPriorityPlusValue(); getDNSCustomerValue(); setPPLabel(val); }catch (IOException e){ agGeneral.endWaitCursor(); logger.error(e.toString(), e); }catch (AgoUnrecoverableSystemException e){ agGeneral.endWaitCursor(); logger.error(e.toString(), e); }catch (AgoSecurityException e){ agGeneral.endWaitCursor(); logger.error(e.toString(), e); } agGeneral.endWaitCursor(); } public void fSetToolBar(Component toolBar){} public boolean fFindMode(){ return false; } /** * Validates data. Required fields are not validated here; they are now validated by * the Form Master object, except Transmit Daily Sales * @return boolean - true = all data is valid; false = some data is not valid **/ public boolean fValidate(){ boolean returnVal = true; InputVerifier verifier = fldZipCode.getInputVerifier(); if(verifier != null && fldZipCode.isEnabled()){ if(!verifier.verify(fldZipCode)){ FM.setComponentFocus(fldZipCode); returnVal = false; } } // Bug No. 20676 the following lines are added to validate the billing type. if(validate_billingType() && getBillingType()) { ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage((this.getParent()).getParent(), "1726"); String value=getOriginalValue(); cbBillingType.setValue(value); returnVal = false; } if (fldEmailInvoices.isEnabled() && fldEmailInvoices.getText() != null) { String fldEmailText = fldEmailInvoices.getText(); if(!CommonUtil.multipleEmailValidation(fldEmailText, null)){ ClientApplicationContext.getClientApplicationContext().getMessageMgr() .showMessage(this, "9950"); fldEmailInvoices.requestFocus(); return false; } } if(fldCustomerNum.isEnabled()){ verifier = fldCustomerNum.getInputVerifier(); if(verifier != null){ if(!verifier.verify(fldCustomerNum)){ FM.setComponentFocus(fldCustomerNum); returnVal=false; } } } if (!rbTransmitNationalSalesYes.isSelected() && !rbTransmitNationalSalesNo.isSelected()) { FM.setRequiredLabel(lblTransmitNationalSales, true); String[] params = {lblTransmitNationalSales.getText()}; ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "101", params);//101 requierd field is missing rbTransmitNationalSalesYes.requestFocus(); return false; } if (fldEmail.isEnabled()) { String emailAddresses = fldEmail.getText(); String country = ClientApplicationContext.getClientApplicationContext().getLocale().getCountry(); if(!CommonUtil.multipleEmailValidation(emailAddresses, country)){ String[] params = { lblEmail.getText()}; ClientApplicationContext.getClientApplicationContext().getMessageMgr() .showMessage(this, "9950"); fldEmail.requestFocus(); return false; } } if ((tabCustomer.getSelectedIndex() == TAB_MAIN2 && (agcCustomerDelivery .haveRowsChanged() || haveCustDeliveryChanges())) || (m_tabChange && m_oldTabIndex == TAB_MAIN2 && (agcCustomerDelivery .haveRowsChanged() || haveCustDeliveryChanges()))) { if(cbDeliverFlg.getValue() == null){ FM.setRequiredLabel(lblDeliveryFlag, true); FM.setComponentFocus(cbDeliverFlg); ClientApplicationContext.getClientApplicationContext() .getMessageMgr().showMessage(this, "101"); return false; } FM.setRequiredLabel(lblDeliveryFlag, false); } return returnVal; } public boolean fFindExec(){ return false; } /** * Checks to see if the current record changed and asks the user to save. * Retrieves the data for the customer that matches the passed in customer number. * Re-loads the current selected tab's form with the new data. * @return boolean - false = retrieval failed; true = retrieval succeeded **/ private boolean retrieveCustomerByNum(Integer customerNum){ try { StringBuffer sbWhere = new StringBuffer(62); sbWhere.append(TBL.CUSTOMER).append('.').append(CUST.LOC).append('=').append(FM.m_loc); sbWhere.append(" AND ").append(TBL.CUSTOMER).append('.').append(CUST.CUSTOMER_NUM).append('='); sbWhere.append(customerNum); agGeneral.beginWaitCursor(); DATA_LOADING = true; //start load agcCustomer.query(sbWhere.toString()); agGeneral.endWaitCursor(); //Pass the data to the form master so we can manage the nav buttons if (agcCustomer.gotoFirst()) { fldAddress1.updateUI(); loadForm(); m_categoryId = agcCustomer.getProperty(Sch_Customer.REF_NAPA_CUSTOMER_CATEGORY_ID); m_customerType = (String)agcCustomer.getProperty(Sch_Customer.TYPE); // Bug :31399 Commented the line of code //fldSearch.setText(""); // If the Main tab is loaded, reset the toolbar buttons and set up the screen. if(currentTabIndex == TAB_MAIN2) { setCustomerUserDefinedField(); } DATA_LOADING = false; //end load // this was done per James and Amanda if (((com.gpc.client.backoffice.app.TAMSIICAC) ClientApplicationContext.getClientApplicationContext()). getFormMaster().getCurrentForm().getName().equals(fGetFormName())) { toggleMode(EDITING); } if(currentTabIndex == TAB_MAIN || currentTabIndex == TAB_MAIN2){ selectCustomerType(); } // Bug :31399 Added the line of code setMiscellaneousfields(); setPriceControlStatus(); return true; } DATA_LOADING = false; //end load }catch (AgoSecurityException e) { logger.error("AgoSecurityException in retrieveCustomerByNum\n" , e); }catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException in retrieveCustomerByNum\n" , e); }catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in retrieveCustomerByNum\n" , e); } return false; } /** * Returns the form's instance of FwoFormMaster

* @return com.gpc.client.backoffice.FwoFormMaster **/ public com.gpc.client.backoffice.FwoFormMaster fGetFormMaster(){ return FM; } public boolean fEdit(){ return false; } /** * Refreshes the current row of data to clear out any changes, and re-loads the current form
* Sets the DATA_LOADING flag to prevent the cbCustomerType combo from changing the * Customer Number field if: *
    *
  1. A New operation was cancelled and
  2. *
  3. Cancelling causes a valueChanged event to the cbCustomerType combo (i.e., from Retail to Account).
  4. *
* This happens when the store is GPC-owned and does not print statements, because that type of store * can create only retail customers, while the default selection for cbCustomerType is Account.
* DATA_LOADING will be turned off in fPostCancel(). **/ public void fCancel(){ DATA_LOADING = true; cbCustomerType.setEnabled(false); m_isNewRecord = false; FM.setRequiredLabel(lblDeliveryFlag, false); try { if (isArBranchStore() && isServingStoreChanged()) { if (navData.getProperty(TBL.CUSTOMER+'.'+CUST.CUSTOMER_NUM) != null) { agcCustomerUserDefinedField.clearRows(); retrieveCustomerByNum((Integer)navData.getProperty(TBL.CUSTOMER+'.'+CUST.CUSTOMER_NUM)); m_cancelledFromNew = false; } return; } //Refresh the primary data (and any other data sets you are working with) if (navData.getProperty(TBL.CUSTOMER+'.'+CUST.CUSTOMER_NUM) != null) { agcCustomerDelivery.clearRows(); agcCustomerUserDefinedField.clearRows(); retrieveCustomerByNum((Integer)navData.getProperty(TBL.CUSTOMER+'.'+CUST.CUSTOMER_NUM)); m_cancelledFromNew = false; if (cbDeliverFlg.getValue() == null) { cbDeliveryRoute.setSelectedIndex(0); cbDeliveryPriority.setSelectedIndex(0); } }else { agcCustomer.clearRows(); agcCustomerDelivery.clearRows(); agcCustomerUserDefinedField.clearRows(); lblCustomerTypeValue.setVisible(false); cbCustomerType.setVisible(true); cbCustomerType.setSelectedIndex(0); if (cbBillingType.getValue() == null) {//no data retrieved then clicked new then clicked cancel //go back to the original state cbStoreCategory.setValue(null); cbCustomerNote.setValue(null); cbSalesRepNum.setValue(null); cbDeliveryTaxTable.setValue(null); cbDefaultTaxTable.setValue(null); cbCustomerType.setValue(null); cbRefCountry.setValue(null); cbRefState.setValue(null); } if (cbDeliverFlg.getValue() == null) { cbDeliveryRoute.setSelectedIndex(0); cbDeliveryPriority.setSelectedIndex(0); } m_cancelledFromNew = true; } }catch (AgoSecurityException e) { logger.error("AgoSecurityException in fCancel():" , e); }catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException in fCancel():" , e); }catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in fCancel():" , e); } setCheckBox(); } /** * Runs the change customer type modal dialog **/ private void handle_tbChangeCustType_actionPerformed(ActionEvent evt){ changeCustomerType(); } /** * Opens the Change Customer Type modal dialog which returns a new customer number and type * that gets automatically set and saved.
**/ private void changeCustomerType(){ try { Hashtable htParams = new Hashtable(); AgcData custData = agcCustomer; logger.debug(" in changeCustomerType, current custnum = " + agcCustomer.getProperty(CUST.CUSTOMER_NUM)); htParams.put(CUST.CUSTOMER_NUM, custData.getProperty(CUST.CUSTOMER_NUM)); htParams.put(CUST.NAME, custData.getProperty(CUST.NAME)); htParams.put(CUST.TYPE, custData.getProperty(CUST.TYPE)); htParams.put(CUST.LOC, FM.m_loc); String caption = ApplicationContext.getInstance().getResourceBundleReader().getLocalizedText( ResourceBundleReader.UI, TsoConstant.FRM_CM_CHANGE_TYPE + ".title", ClientApplicationContext.getClientApplicationContext().getCurrentLocale()); htParams = (Hashtable)FM.m_SessionMgr.getNavigationMgr().showFormDialog(this, TsoConstant.FRM_CM_CHANGE_TYPE, caption, htParams); if (htParams != null) { Integer custNum = (Integer)htParams.get(CUST.CUSTOMER_NUM); logger.debug("New Customer Number = " + custNum); m_customerType = (String)htParams.get(CUST.TYPE); custData.setProperty(CUST.TYPE, m_customerType); //cbCustomerType.setValue(htParams.get(CUST.TYPE)); custData.setProperty(CUST.CUSTOMER_NUM,custNum); logger.debug("CUSTOMER NUMBER = " + custNum.toString()); fldCustomerNum.setText(custNum.toString()); // m_custNumChanged is used to prevent unneccessary action by the cbCustomerType combo // and to determine whether the navData needs to be refreshed in fSave(). m_custNumChanged = true; FM.fSave(); selectCustomerType(); m_custNumChanged = false; } }catch (AgoUnrecoverableSystemException e) { logger.error(e.toString(), e); }catch (IOException e) { logger.error(e.toString(), e); }catch (AgoSecurityException e) { logger.error(e.toString(), e); } } /** * Determines whether or not the passed in NAPA category transmits by default * @param napaCategoryID - category id * @return boolean - true = category transmits by default; false = category does not transmit by default **/ public boolean isNapaTransmitCategory(int napaCategoryID){ int[] transmitCategories = {15,18,21,24,29,32,33}; for (int i=transmitCategories.length; --i >= 0;) { if (transmitCategories[i] == napaCategoryID) { return true; } } return false; } /** * Check to see if the alternate customer number is a valid customer. If not, this field * re-gains focus. If it is valid, the alternate customer id is retrieved and set to the customer's * ALTERNATE_CORE_CUSTOMER_ID column value. **/ private boolean setAlternateCustomerID() { if (fldAltCustNumber.getText().trim().length() != 0) { if( "0".equals(fldAltCustNumber.getText())){ // They can't use 0. ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "431"); return false; } // Bug No. 20672 the following lines are added to validate the customer number entered for alternate customer. if(!validate_alternate_core_customer_id()) { ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "1725"); return false; } // Allow them to use the current customer if(fldAltCustNumber.getText().equals(fldCustomerNum.getText())){ agcCustomer.setProperty(CUST.ALTERNATE_CORE_CUSTOMER_ID,agcCustomer.getProperty(CUST.ID)); return true; } StringBuffer sbWhere = new StringBuffer(62); sbWhere.append(TBL.CUSTOMER).append('.').append(CUST.LOC).append('=').append(FM.m_loc); sbWhere.append(" AND ").append(TBL.CUSTOMER).append('.').append(CUST.CUSTOMER_NUM).append('='); sbWhere.append(fldAltCustNumber.getText().trim()); try { agcAlternateCustomer.query(sbWhere.toString()); if (agcAlternateCustomer.gotoFirst()) { // Can't use a retail customer if(RefCustomerType.RETAIL_ACCOUNT.equals(agcAlternateCustomer.getProperty(CUST.TYPE))){ ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "432"); return false; } agcCustomer.setProperty(CUST.ALTERNATE_CORE_CUSTOMER_ID, agcAlternateCustomer.getProperty(CUST.ID)); }else { ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "408"); return false; } return true; }catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException in fldAltCustNumber " , e); return false; }catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in fldAltCustNumber " , e); return false; }catch (AgoSecurityException e) { logger.error("AgoSecurityException in fldAltCustNumber " , e); return false; } }else { agcCustomer.setProperty(CUST.ALTERNATE_CORE_CUSTOMER_ID, null); } return true; } /** * Displays a warning if the current NAPA category defaults to transmit **/ public boolean showTransmitSalesWarning(){ if (cbCategory.getSelectedIndex() >= 0 && cbCategory.getValue() != null && !(""+cbCategory.getValue()).equals("null")) { int selectedCategory = ((Integer)cbCategory.getValue()).intValue(); if (isNapaTransmitCategory(selectedCategory)) { //The NAPA Category which was selected for this customer transmits sales data by default. ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "409"); return false; } } return true; } /** * If the selected NAPA category defaults to transmit, then both the transmit YES radiobuttons get selected. **/ private void handle_cbCategory_focusLost(FocusEvent focusEvent){ if (cbCategory.getSelectedIndex() >= 0 && cbCategory.getValue() != null && !(""+cbCategory.getValue()).equals("null")) { Integer selectedCategory = (Integer)cbCategory.getValue(); agcCustomer.setProperty(CUST.REF_NAPA_CUSTOMER_CATEGORY_ID, selectedCategory); if (isNapaTransmitCategory(selectedCategory.shortValue())) { String national = (String) agcCustomer.getProperty(CUST.TRANSMIT_NATIONAL_SALES); String jsa = (String) agcCustomer.getProperty(CUST.TRANSMIT_JSA_SALES); // Never change the value if it is R or U if (jsa.equals("Y") || jsa.equals("N")) { rbTransmitJSASalesYes.setSelected(true); } if (national.equals("Y") || national.equals("N")) { rbTransmitNationalSalesYes.setSelected(true); } }else{ if(m_New){ rbTransmitJSASalesNo.setSelected(true); rbTransmitNationalSalesNo.setSelected(true); } } } } /** * Adds the primary tax exempt number field to the FormMaster's required field list if the * status is Never, else removes it from the list if the status is any other value. **/ private void handle_cbPriTaxStatus_valueChanged(AgoPropertyChangeEvent evt){ if(DATA_LOADING)return; checkTaxStatus(); } /** * Adds the secondary tax exempt number field to the FormMaster's required field list if the * status is Never, else removes it from the list if the status is any other value. **/ private void handle_cbSecTaxStatus_valueChanged(AgoPropertyChangeEvent evt) { if(DATA_LOADING)return; checkTaxStatus(); } private void checkTaxStatus(){ // Primary Tax Exempt No. is required if primary tax status is Never if(tabCustomer.getSelectedIndex() == 0) { return; } if ("N".equals(cbPriTaxStatus.getValue())) { FM.addRequiredField(lblTaxExemptNum, fldPriTaxExemptNumber); } else { FM.removeRequiredField(lblTaxExemptNum); } // Secondary Tax Exempt No. is required if primary tax status is Never if ("N".equals(cbSecTaxStatus.getValue())) { FM.addRequiredField(lblSecondaryTaxExemptNum, fldSecTaxExemptNumber); } else { FM.removeRequiredField(lblSecondaryTaxExemptNum); } } /** * Re-synch the navigation data to the current row * @param custNum - customer record to navigate to **/ public void navigateToCustomer(Integer custNum) { Object[] rowValues = {custNum}; DATA_LOADING = true; if(currentTabForm instanceof FwiFormProcess){ ((FwiFormProcess)currentTabForm).fGetFormMaster().setCurrentNavRow(rowValues); //Bug :31399 Added the if block if (currentTabIndex < 2 && currentTabIndex == TAB_MAIN2) { setMiscellaneousfields(); setPriceControlStatus(); } } DATA_LOADING = false; } public void fSort(){} public boolean fValidateJTableCell(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1, int row, int column) { return true; } public boolean fValidateJTableRow(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1, int row){ return true; } /** * MANDATORY METHOD OF THE FWIFORMSEARCH INTERFACE * Method used to retrieve one record that exactly matches the standard search criteria, and to set the navigation * data to whole table (filtered by location). If this form doesn't have a standard search, then this method should just * redirect to the fRunAdvancedSearch method and return true. If this form just has a JTable; then instead of retrieving * the record and setting the navigation data, you will automatically select the found record in the JTable. * * @return boolean - true = if exact match is found, or is redirected to the advanced search immediately; * false = if no match is found, or an error occurs **/ public boolean fFindExactMatch(){ try { // get search value String cCustNum = fldSearch.getText(); Component initiator = advancedSearchObject.getSearchInitiator(); // if empty or contains wildcard, automatically call the advanced search // you must also return true, else the user may get the message to Add/Cancel/Search if (initiator == pbSearch || cCustNum.length() == 0 || cCustNum.indexOf("*") > 0) { fRunAdvancedSearch(); DATA_LOADING = false; return true; } // retrieve customer by typed in customer number // if there is an exact match, then set the navigation data to all table records within this location, then return Integer iCustNum = new Integer(cCustNum); if (retrieveCustomerByNum(iCustNum)) { StringBuffer qbWhere = new StringBuffer(24); qbWhere.append(TBL.CUSTOMER).append('.').append(CUST.LOC).append('=').append(FM.m_loc); qbWhere.append(" AND EMPLOYEE.ID = CUSTOMER.SALESMAN_EMPLOYEE_ID "); // set the navigation data query navData.query(qbWhere.toString()); // navigate to the current retrieved row navigateToCustomer(iCustNum); DATA_LOADING = false; fldSearch.setText(""); return true; } else { //check if the number is between 99999 and 90000001 if so then display the message "Do you want to search?" if ((iCustNum.intValue() < MIN_RET_CUSTNUM && iCustNum.intValue() > MAX_REG_VER_CUSTNUM) || (isGPCOwned() || isConsolidatedARMSBranchStore())) { if (ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessageYesNo(this, "1719")) { // bug # 25508,Call fRunAdvancedSearch() after executing fFindExactMatch(), to avoid double focus SwingUtilities.invokeLater(new Runnable() { public void run() { fRunAdvancedSearch(); } }); DATA_LOADING = false; } return true; } fldSearch.setText(iCustNum.toString()); m_SearchCustNum = new Integer(fldSearch.getText()); } // go back to last record if there was a last record if (navData.getProperty(TBL.CUSTOMER+'.'+CUST.CUSTOMER_NUM) != null) { retrieveCustomerByNum((Integer)navData.getProperty(TBL.CUSTOMER+'.'+CUST.CUSTOMER_NUM)); fldSearch.setText(iCustNum.toString()); } //If store is GPC owned and print statement='N', user is not allowed to add a customer. //If user keys in a customer that doesn't exist on file, we need to set to View Mode so that //the search object only show "record not on file. Do you want to go to Advanced Search? Yes or No" //If user select "No", return to the search field. At this point, the FwoSearchBase has cleared the search field and //the form mode is still in VIEW MODE. If user needs to edit the previous customer, he/she needs to key in the customer //number and hit Enter again. This is ok per Richie Cullom. if (isGPCOwned() && m_SearchCustNum.intValue() <= MAX_REG_VER_CUSTNUM){ FM.setMode(FwoFormMaster.VIEW_MODE); } }catch (AgoSecurityException e) { logger.error("AgoSecurityException in search: " , e); //return true so that the "Want To Add" dialog doesn't come up. return true; }catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException in search: " , e); //return true so that the "Want To Add" dialog doesn't come up. return true; }catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in search: " , e); //return true so that the "Want To Add" dialog doesn't come up. return true; }finally{ DATA_LOADING = false; } return false; } /** * MANDATORY METHOD OF THE FWIFORMSEARCH INTERFACE * Method used to run the advanced search object, retrieve the selected search value, and update the navigation * data to use the search results. If this form just has a JTable; then instead of retrieving * the selected record and setting the navigation data, you will automatically select the selected record in the JTable. **/ public void fRunAdvancedSearch(){ try { // run the advanced search passing in a reference to this form and the current search column and value. // If the value is empty, then you will either get an empty search results or the previous search results // displayed in the advanced search dialog if(advancedSearchObject.runAdvancedSearch(CUST.CUSTOMER_NUM, fldSearch.getText())){ // if a value was found and selected, and the customer record was retrieved; // then update the navigation data based on the search results Integer selectedNum = (Integer)advancedSearchObject.getSelectedValue(); if (selectedNum != null && retrieveCustomerByNum(selectedNum)) { // set the navigation data query navData.query(advancedSearchObject.getWhereClause()); // navigate to the current retrieved row thru the FM object so the toolbar's navigation buttons will be set navigateToCustomer(selectedNum); fldSearch.setText(""); }else { // need to check which tab is selected and activate that form so the toolbar will be correctly // associated with the subform. loadForm(); } } }catch (AgoSecurityException e) { logger.error("AgoSecurityException, Customers from search", e); }catch (IOException e) { logger.error("IOException, Customers from search", e); }catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException, Customers from search", e); }catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException, Customers from search", e); } } /** * MANDATORY METHOD OF THE FWIFORMSEARCH INTERFACE * This method is called only if an exact match is not found, and user wants to add it instead of going to the advanced search * This method is different from fNew, because the developer may have to use all the search values as default values for the * new record. If these fields are also bound to the data barrel, the insertAfter() method will clear them out. So the * developer will have to remember these values and reset them after the new row is inserted. If new is not allowed, then * just return false. However, this method should never be called to begin with is new is not allowed. * @return boolean - true = if fNew succeeds; false = if fNew fails **/ public boolean fNewFromSearch() { // call FM's fNew so the toolbar will be in-synch with the current action m_addNew = true; boolean bNew = FM.fNew(); if (bNew) { // default customer number to search value fldCustomerNum.setEnabled(false); cbCustomerType.setVisible(false); lblCustomerTypeValue.setVisible(true); return true; } else { return false; } } public boolean fNeedsUpdate() { if (DATA_LOADING || m_delete){ logger.debug(" DATA_LOADING = " + DATA_LOADING + " and m_delete = " + m_delete); return false; }else{ return haveChanges(); } } private boolean haveChanges() { if (isArBranchStore() && isServingStoreChanged()) { return true; } if (FM == null || FM.getMode() == VIEW || FM.getMode() == FIND ) { return false; } else { if (agcCustomer.haveRowsChanged() || agcCustomerDelivery.haveRowsChanged()) { return true; } else { //For bug #23181, cancel from new then exit if (agcCustomer.getProperty(CUST.CUSTOMER_NUM) == null) return false; if (haveCustomerChanges() || haveCustDeliveryChanges() ||haveServingStoreChanges()) return true; } } return false; } private boolean haveCustomerChanges() { logger.info("enter haveCustomerChanges()"); if (cbRefCountry.getValue() == null) return false; boolean haveCountryChange = false; boolean haveStateChange = false; boolean haveEmpChange = false; boolean haveStoreCatChange = false; boolean haveCustNoteChange = false; if (m_priorityPlusChanged) return true; if (m_dnsCustomerChanged) return true; if (m_empID_v.size() == 0) employeeIDVector(); if (m_tabChange && m_oldTabIndex != TAB_MAIN) { return false; } else { haveCountryChange = !((String)(cbRefCountry.getValue())).equals((String)(agcCustomer.getProperty(CUST.REF_COUNTRY_CD))); haveStateChange = !((String)(cbRefState.getValue())).equals((String)(agcCustomer.getProperty(CUST.REF_STATE_CD))); if (cbSalesRepNum.getValue() instanceof Integer) { int n1 = ((Integer)cbSalesRepNum.getValue()).intValue(); int n2 = ((Integer)agcCustomer.getProperty(CUST.SALESMAN_EMPLOYEE_ID)).intValue(); haveEmpChange = (n1 == n2)? false:true; } else { haveEmpChange = true; } if (cbStoreCategory.getSelectedIndex() == 0) { haveStoreCatChange = (agcCustomer.getProperty(CUST.STORE_CATEGORY_ID) == null)? false:true; } else { if (agcCustomer.getProperty(CUST.STORE_CATEGORY_ID) == null) { haveStoreCatChange = true; } else { int n1 = ((Short)cbStoreCategory.getValue()).intValue(); int n2 = ((Short)agcCustomer.getProperty(CUST.STORE_CATEGORY_ID)).intValue(); haveStoreCatChange = (n1 == n2)? false:true; } } if (cbCustomerNote.getSelectedIndex() == 0) { haveCustNoteChange = (agcCustomer.getProperty(CUST.CUSTOMER_NOTE_ID) == null)? false:true; } else { if (agcCustomer.getProperty(CUST.CUSTOMER_NOTE_ID) == null) { haveCustNoteChange = true; } else { int n1 = ((Short)cbCustomerNote.getValue()).intValue(); int n2 = ((Short)agcCustomer.getProperty(CUST.CUSTOMER_NOTE_ID)).intValue(); haveCustNoteChange = (n1 == n2)? false:true; } } } // Bug #22852 // Removed the variables haveDeliveryTaxChange and haveDefaultTaxChange from the if statement //to perform the functionality in haveCustDeliveryChanges() if (haveCountryChange || haveStateChange || haveEmpChange || haveStoreCatChange || haveCustNoteChange || hasNationalOrJSAChanged()) { return true; } return false; } private boolean haveServingStoreChanges() { boolean haveServingStoreChange = false; if (cbServingStore.getSelectedIndex() == -1 || (m_tabChange && m_oldTabIndex != TAB_MAIN2)) return false; if (cbServingStore.getSelectedIndex() == 0) { haveServingStoreChange = (agcCustomerUserDefinedField.getProperty("TEXT") == null)? false:true; } else { if (agcCustomerUserDefinedField.getProperty("TEXT") == null) { haveServingStoreChange = true; } else { String n1 = (String)cbServingStore.getValue(); String n2 = (String)agcCustomerUserDefinedField.getProperty("TEXT"); haveServingStoreChange = (n1.equals(n2))? false:true; } } return haveServingStoreChange; } private boolean haveCustDeliveryChanges() { logger.debug("m_oldTabIndex in haveCustDeliveryChanges()---: " + m_oldTabIndex); if (m_tabChange && m_oldTabIndex != TAB_MAIN2) return false; if (cbRefCountry.getValue() == null) return false; //Initial state, don't check boolean haveDelFlagChange = false; if (cbDeliverFlg.getValue() != null){ haveDelFlagChange = !((String)(cbDeliverFlg.getValue())).equals((String)(agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_REF_OPTION_CD))); } boolean haveDelRouteChange = false; //Bug #22852 //Created the boolean variables haveDeliveryTaxChange and haveDefaultTaxChange boolean haveDeliveryTaxChange = false; boolean haveDefaultTaxChange = false; if (cbDeliveryRoute.getValue() != null) { if (cbDeliveryRoute.getSelectedIndex() == 0) { haveDelRouteChange = (agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_ROUTE_CD) == null) ? false : true; } else { if (agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_ROUTE_CD) == null) { haveDelRouteChange = true; } else { String s1 = (String) cbDeliveryRoute.getValue(); String s2 = (String) agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_ROUTE_CD); haveDelRouteChange = (s1.equals(s2)) ? false : true; } } } boolean haveDelPriorityChange = false; if (cbDeliveryPriority.getValue() != null) { if (cbDeliveryPriority.getSelectedIndex() == 0) { haveDelPriorityChange = (agcCustomerDelivery .getProperty(CUSTDEL.DELIVERY_PRIORITY_ID) == null) ? false : true; } else { if (agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_PRIORITY_ID) == null) { haveDelPriorityChange = true; } else { int n1 = ((Byte) cbDeliveryPriority.getValue()).intValue(); int n2 = ((Byte) agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_PRIORITY_ID)) .intValue(); haveDelPriorityChange = (n1 == n2) ? false : true; } } } //Added the code to check for changes made in fldTravelTimeToCust, fldDistanceToCust, fldMinSalesFreeDel and fldDeliveryCharge. boolean haveTravelTimeToCustomerChange = false; if(fldTravelTimeToCust.getText() != null && !(fldTravelTimeToCust.getText().equals(""))){ if (agcCustomerDelivery.getProperty(CUSTDEL.TRAVEL_TIME_CUSTOMER) == null) { haveTravelTimeToCustomerChange = true; } else { String n1 = fldTravelTimeToCust.getText(); String n2 = agcCustomerDelivery.getProperty(CUSTDEL.TRAVEL_TIME_CUSTOMER).toString(); haveTravelTimeToCustomerChange = (n1.equals(n2))? false:true; } } boolean haveDistanceToCustomerChange = false; if(fldDistanceToCust.getText() != null && !(fldDistanceToCust.getText().equals(""))){ if (agcCustomerDelivery.getProperty(CUSTDEL.DISTANCE_TO_CUSTOMER) == null) { haveDistanceToCustomerChange = true; } else { String n1 = fldDistanceToCust.getText(); String n2 = agcCustomerDelivery.getProperty(CUSTDEL.DISTANCE_TO_CUSTOMER).toString(); haveDistanceToCustomerChange = (n1.equals(n2))? false:true; } } boolean haveMinSalesFreeDelChange = false; if (fldMinSalesFreeDel.getText() != null && !(fldMinSalesFreeDel.getText().equals(""))) { if (agcCustomerDelivery.getProperty(CUSTDEL.MIN_AMT_FREE_DELIVERY) == null) { haveMinSalesFreeDelChange = true; } else { double n1 = Double.parseDouble(fldMinSalesFreeDel.getText()); double n2 = ((BigDecimal) agcCustomerDelivery .getProperty(CUSTDEL.MIN_AMT_FREE_DELIVERY)).doubleValue(); haveMinSalesFreeDelChange = (n1 == n2) ? false : true; } } boolean haveDeliveryChargeChange = false; if (fldDeliveryCharge.getText() != null && !(fldDeliveryCharge.getText().equals(""))) { if (agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_CHARGE) == null) { haveDeliveryChargeChange = true; } else { double n1 = Double.parseDouble(fldDeliveryCharge.getText()); double n2 = ((BigDecimal) agcCustomerDelivery.getProperty(CUSTDEL.DELIVERY_CHARGE)) .doubleValue(); haveDeliveryChargeChange = (n1 == n2) ? false : true; } } //Bug #22852 //Added the code to check for changes made in cbDeliveryTaxTable and cbDefaultTaxTable. if (cbDeliveryTaxTable.getSelectedIndex() == 0) { haveDeliveryTaxChange = (agcCustomer.getProperty(CUST.DELIVERED_TAX_TABLE_ID) == null)? false:true; } else { if (agcCustomer.getProperty(CUST.DELIVERED_TAX_TABLE_ID) == null) { haveDeliveryTaxChange = true; } else { int n1 = ((Short)cbDeliveryTaxTable.getValue()).intValue(); int n2 = ((Short)agcCustomer.getProperty(CUST.DELIVERED_TAX_TABLE_ID)).intValue(); haveDeliveryTaxChange = (n1 == n2)? false:true; } } if (cbDefaultTaxTable.getSelectedIndex() == 0) { haveDefaultTaxChange = (agcCustomer.getProperty(CUST.DEFAULT_TAX_TABLE_ID) == null)? false:true; } else { if (agcCustomer.getProperty(CUST.DEFAULT_TAX_TABLE_ID) == null) { haveDefaultTaxChange = true; } else { int n1 = ((Short)cbDefaultTaxTable.getValue()).intValue(); int n2 = ((Short)agcCustomer.getProperty(CUST.DEFAULT_TAX_TABLE_ID)).intValue(); haveDefaultTaxChange = (n1 == n2)? false:true; } } // Bug #22852 // Added the variables haveDeliveryTaxChange and haveDefaultTaxChange to the if statement // to check for changes made in cbDeliveryTaxTable and cbDefaultTaxTable. if (haveDelFlagChange || haveDelRouteChange || haveDelPriorityChange || haveDeliveryTaxChange || haveDefaultTaxChange || haveTravelTimeToCustomerChange || haveDistanceToCustomerChange || haveMinSalesFreeDelChange || haveDeliveryChargeChange) return true; return false; } public void fPostCancel() { if (m_cancelledFromNew){ toggleMode(FIND); if (cbBillingType.getValue() != null) { cbRefCountry.setValue(m_defaultCountryCd); cbRefState.setValue(m_defaultStateCd); cbCustomerType.setSelectedIndex(0); //set account type to "Please Select" } } else { toggleMode(FM.getMode()); } // must reset the DATA_LOADING flag for combos. DATA_LOADING = false; checkTaxStatus(); m_newAccountNum = null; m_newRetailNum = null; m_addNew = false; m_SearchCustNum = null; //remove Please Select from cbSalesRep if it exists ResourceBundleReader rbr = ApplicationContext.getInstance().getResourceBundleReader(); Locale locale = ClientApplicationContext.getClientApplicationContext().getCurrentLocale(); String pleaseSelect = rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXINITIALITEM, locale); if(pleaseSelect.equals(cbSalesRepNum.getItemAt(0))){ cbSalesRepNum.removeItemAt(0); } if (tabCustomer.getSelectedIndex() == TAB_MAIN2) { FM.setNew(false); //Bug No: #26052 added the following lines of code to disable the 'Edit' 'Sort' 'Print' and 'Delete' Buttons on ToolBar. FM.setEdit(false); FM.setSort(false); FM.setPrint(false); FM.setDelete(false); } enableDisableAltCustomer(); setCheckBox(); } public void fPostDelete(){ // if no records are left go back to find mode if (agcCustomer.getProperty(CUST.CUSTOMER_NUM) == null) { toggleMode(FIND); } else { toggleMode(FM.getMode()); } checkTaxStatus(); m_newAccountNum = null; m_newRetailNum = null; m_addNew = false; m_delete = false; m_SearchCustNum = null; if (tabCustomer.getSelectedIndex() == TAB_MAIN2) { FM.setNew(false); } enableDisableAltCustomer(); } public void fPostEdit(){} public void fPostNew(){ if (m_customerType != null && RefCustomerType.RETAIL_ACCOUNT.equals(m_customerType)) { rbTransmitJSASalesNo.setSelected(true); rbTransmitNationalSalesNo.setSelected(true); agcCustomer.setProperty(CUST.TRANSMIT_NATIONAL_SALES, "N"); agcCustomer.setProperty(CUST.TRANSMIT_JSA_SALES, "N"); enableTransmitAndNapaCat(); } enableDisableAltCustomer(); } public void fPostSave(){ toggleMode(EDITING); checkTaxStatus(); m_newAccountNum = null; m_newRetailNum = null; m_addNew = false; m_New = false; m_SearchCustNum = null; //remove Please Select from cbSalesRep if it exists ResourceBundleReader rbr = ApplicationContext.getInstance().getResourceBundleReader(); Locale locale = ClientApplicationContext.getClientApplicationContext().getCurrentLocale(); String pleaseSelect = rbr.getLocalizedText(ResourceBundleReader.UI, TsoConstant.COMBOBOXINITIALITEM, locale); if(pleaseSelect.equals(cbSalesRepNum.getItemAt(0))){ cbSalesRepNum.removeItemAt(0); } if (tabCustomer.getSelectedIndex() == TAB_MAIN2) { FM.setNew(false); //Bug No: #26052 added the following lines of code to disable the 'Edit' 'Sort' 'Print' and 'Delete' Buttons on ToolBar. FM.setEdit(false); FM.setSort(false); FM.setPrint(false); FM.setDelete(false); FM.setRequiredLabel(lblDeliveryFlag, false); if(cbDeliveryRoute.getValue() == null){ cbDeliveryRoute.setSelectedIndex(0); } if(cbDeliveryPriority.getValue() == null){ cbDeliveryPriority.setSelectedIndex(0); } } enableDisableAltCustomer(); m_priorityPlusChanged = false; m_dnsCustomerChanged = false; } public java.util.Locale fGetCurrentRecordLocale(javax.swing.JComponent jComponent1) { return m_recordLocale; } public boolean fValidateComponent(javax.swing.JComponent jComp){ if( jComp == fldCustomerNum ){ return validateCustNum(); }else if(jComp == fldAltCustNumber){ return setAlternateCustomerID(); }else if (jComp == fldMinAmtForPO) { if (fldMinAmtForPO.getText() == null || "".equals(fldMinAmtForPO.getText())) { fldMinAmtForPO.setText("0"); } }else if (jComp == fldNoAdditionalInvCopies) { if (fldNoAdditionalInvCopies.getText() == null || "".equals(fldNoAdditionalInvCopies.getText())) { fldNoAdditionalInvCopies.setText("0"); } else { int copies = (new Integer(fldNoAdditionalInvCopies.getText())).intValue(); if (copies < 0 || copies > 127) { String params[] = {lblExtraInvoiceCopies.getText(), "0", "127"}; ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "156", params); return false; } } } else if (jComp == fldEmailInvoices) { String emailAddress = fldEmailInvoices.getText(); if(!CommonUtil.multipleEmailValidation(emailAddress, null)){ ClientApplicationContext.getClientApplicationContext().getMessageMgr() .showMessage(this, "9950"); fldEmailInvoices.requestFocus(); return false; } }else if (jComp == fldTravelTimeToCust) { if (fldTravelTimeToCust.getText() == null || "".equals(fldTravelTimeToCust.getText())) { fldTravelTimeToCust.setText("0"); } }else if (jComp == fldDistanceToCust) { if (fldDistanceToCust.getText() == null || "".equals(fldDistanceToCust.getText())) { fldDistanceToCust.setText("0"); } }else if (jComp == fldMinSalesFreeDel) { if (fldMinSalesFreeDel.getText() == null || "".equals(fldMinSalesFreeDel.getText())) { fldMinSalesFreeDel.setText("0.00"); } }else if (jComp == fldDeliveryCharge) { if (fldDeliveryCharge.getText() == null || "".equals(fldDeliveryCharge.getText())) { fldDeliveryCharge.setText("0.00"); } }else if (jComp == fldAmount) { if (fldAmount.getText() == null || "".equals(fldAmount.getText())) { fldAmount.setText("0.00"); } }else if (jComp == fldInvDiscount) { if (fldInvDiscount.getText() == null || "".equals(fldInvDiscount.getText())) { fldInvDiscount.setText("0"); } }else if (jComp == fldPriceMaxDiscount) { if (fldPriceMaxDiscount.getText() == null || "".equals(fldPriceMaxDiscount.getText())) { fldPriceMaxDiscount.setText("0"); } } return true; } private boolean validateCustNum() { if(fldCustomerNum.getText().length() == 0){ // You must enter a Customer Number. ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "470"); return false; } int num = Integer.parseInt(fldCustomerNum.getText()); if("A".equals((String)(cbCustomerType.getValue())) || "V".equals((String)(cbCustomerType.getValue()))){ if(num > MAX_REG_VER_CUSTNUM){ // Customer Number for account customer may be from 0 to 99999 // Bug No. 26486 The following line is added to send the parameters to the warning message as the warning message is changed. String param[] = {"0","99999"}; ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "199",param); // Bug No. 26486 The warning message id has been changed return false; } }else if(RefCustomerType.RETAIL_ACCOUNT.equals((String)(cbCustomerType.getValue())) && num < MIN_RET_CUSTNUM){ // Customer Number for retail customer must be greater than 9000000 ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "494"); return false; } if(isCustomerNumUsed(new Integer(num))){ // Duplicate $1. Please enter a different number. ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "479", new String[]{lblCustomerNum.getText()}); return false; } return true; } public Integer fGetFunctionId() { return TsoConstant.CM_CUSTOMER_MAINT; } private void handle_cbCustomerType_valueChanged(AgoPropertyChangeEvent evt){ if(cbCustomerType.isVisible()){ m_customerType = ""+evt.getNewValue(); if(RefCustomerType.RETAIL_ACCOUNT.equals(m_customerType)) { fldCustomerNum.setEnabled(false); fldAltCustNumber.setText(""); fldAltCustNumber.setEnabled(false); rbTransmitJSASalesNo.setSelected(true); rbTransmitNationalSalesNo.setSelected(true); agcCustomer.setProperty(CUST.TRANSMIT_NATIONAL_SALES, "N"); agcCustomer.setProperty(CUST.TRANSMIT_JSA_SALES, "N"); } else { fldCustomerNum.setEnabled(FM.canEdit()); fldAltCustNumber.setEnabled(FM.canEdit() && !RefCustomerType.VERIFY_ACCOUNT.equals(m_customerType)); } enableTransmitAndNapaCat(); if(!findNewCustomerNumber()) { ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage("2511"); FM.fCancel(); return; } } if(m_isNewRecord){ if(isGPCOwned() || (isConsolidatedARMSBranchStore())){ m_customerType = RefCustomerType.RETAIL_ACCOUNT; } if (m_customerType != null && RefCustomerType.RETAIL_ACCOUNT.equals(m_customerType)) { cbCategory.setSelectedIndex(11); } SwingUtilities.invokeLater(new Runnable() { public void run() { if (m_customerType.equals("A")) { fldCustomerNum.requestFocus(); } else { fldAlphaKey.requestFocus(); } } }); } } private boolean findNewCustomerNumber(){ if(!DATA_LOADING){ int mode = FM.getMode(); // Don't do anything if the user is not creating a new record or changing the customer type. if((mode != FwoFormMaster.EDIT_MODE && mode!= FwoFormMaster.NEW_MODE) || m_custNumChanged ){ return true; } Hashtable hsh = new Hashtable(); StringBuffer sbWhere = new StringBuffer(131); // Create band descriptor for query TsoGenericBandDescriptor bd = new TsoGenericBandDescriptor("CUSTOMER", "CUSTOMER"); bd.addColumn("CUSTNUM", DatatypeCodes.TYPE_INT, true); int custNum = -1; try{ if("A".equals(m_customerType) || "V".equals(m_customerType)){ if(m_newAccountNum == null){ sbWhere.append(" SELECT MIN(CUSTOMER_NUM) FROM CUSTOMER AS c where NOT EXISTS (SELECT CUSTOMER_NUM FROM CUSTOMER "); sbWhere.append(" AS c2 where c2.CUSTOMER_NUM = c.CUSTOMER_NUM+1 ) AND CUSTOMER_NUM < 99999"); sbWhere.append(" AND ").append("LOC=").append(FM.m_loc); logger.debug("bWhere="+sbWhere); hsh.put(com.gpc.tams.dso.dsoGeneric.SQL, sbWhere.toString()); hsh.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bd); SilverStreamExceptionHelper.invokeQuery(agcDsoGen,hsh); if (agcDsoGen.gotoFirst() && agcDsoGen.getProperty("CUSTNUM") != null) { custNum = ((Integer)agcDsoGen.getProperty("CUSTNUM")).intValue(); logger.debug("NEW REGULAR CUST NUM = " + custNum); } else { return false; } } custNum = custNum+1; } else if(RefCustomerType.RETAIL_ACCOUNT.equals(m_customerType)){ Integer retailCustomerID = (Integer)TamsMisc.getNextTableID("RETAIL_CUSTOMER_NUM", FM.m_loc, agGeneral); custNum = retailCustomerID.intValue(); } cbCustomerType.setVisible(false); lblCustomerTypeValue.setVisible(true); if(RefCustomerType.RETAIL_ACCOUNT.equals(m_customerType)){ lblCustomerTypeValue.setText(RETAIL); cbBillingType.setSelectedIndex(0); cbBillingType.setEnabled(false); }else{ lblCustomerTypeValue.setText(REGULAR); if (isGPCOwned() && FM.canEdit()) { //cbBillingType.setEnabled(true); disableEnableBillingType(); } } enableTransmitAndNapaCat(); String newCust = String.valueOf(custNum); if (!m_addNew) fldCustomerNum.setText(newCust); }catch(ApplicationException e){ logger.error("ApplicationException in handle_cbCustomerType_valueChanged: ", e); }catch(AgoUnrecoverableSystemException e){ logger.error("AgoUnrecoverableSystemException in handle_cbCustomerType_valueChanged: ", e); }catch(AgoSecurityException e){ logger.error("AgoSecurityException in handle_cbCustomerType_valueChanged: ", e); }catch(AgoTransientSystemException e){ logger.error("AgoTransientSystemException in handle_cbCustomerType_valueChanged: ", e); } hsh = null; sbWhere = null; } return true; } private void handle_cbRefCountry_valueChanged(AgoPropertyChangeEvent evt){ Locale locale = ClientApplicationContext.getClientApplicationContext().getCurrentLocale(); //Bug #29495 //get the country of the current record String country = (String)cbRefCountry.getValue(); //Bug #29495 //The variable DATA_LOADING is true and the control returns back from the method before updating the record locale. //so added the 'if' statement to update the record locale before the statement "if(DATA_LOADING)". if(!m_countryCBInitializing){ //get the current user's language String lang = ClientApplicationContext.getClientApplicationContext().getCurrentLocale().getLanguage(); //update the locale object if(country != null) locale = new Locale(lang, country); m_recordLocale = locale; FM.updateRecordLocale(m_recordLocaleComps); } if(DATA_LOADING) { cbRefState.setValue(m_defaultStateCd); return; } //check for null first here //Bug #29495 //Commented the below declaration to use the varaible "country" in the above code //String country = (String)cbRefCountry.getValue(); if(country != null && !"".equals(country)){ country.toUpperCase(); }else if(country == null){ country = ""; } //bug #8780 fix if (country.equals("US") || country.equals("MX") || country.equals("CA")) FM.addRequiredField(lblState, cbRefState); else FM.removeRequiredField(lblState); //get the current user's language //Bug #29495 //Commented the below lines to perform the functionality at the beginning of this method. /*String lang = ClientApplicationContext.getClientApplicationContext().getCurrentLocale().getLanguage(); //update the locale object if(country != null)locale = new Locale(lang, country); m_recordLocale = locale;*/ if(!m_countryCBInitializing){ //update the record locale //Bug #29495 //Commented the below lines to perform the functionality at the begining of this method. //FM.updateRecordLocale(m_recordLocaleComps); // if country combo is not initializing, set the row cursor agcCustomer.setProperty(CUST.REF_COUNTRY_CD, cbRefCountry.getValue()); fillStateCombo((String)cbRefCountry.getValue()); cbRefState.setSelectedIndex(0); //if rows have changed we know that the user has changed the country so set the //state combo to the first item in the list. if(agcCustomer.haveRowsChanged()){ agcCustomer.setProperty(CUST.REF_STATE_CD, cbRefState.getItemValue(0)); }else{ cbRefState.setValue(agcCustomer.getProperty(CUST.REF_STATE_CD)); } } } private void handle_cbRefState_valueChanged(AgoPropertyChangeEvent evt){ if(DATA_LOADING)return; if(!m_stateCBInitializing){ agcCustomer.setProperty(CUST.REF_STATE_CD, cbRefState.getValue()); } } private void fillCountryCombo(){ m_countryCBInitializing = true; //country combo is initializing, do nothing on value changed cbRefCountry.removeAllItems(); m_cacheMgr.fillComponent(cbRefCountry, TsoConstant.LIST_REF_COUNTRY); m_countryCBInitializing = false; //initialization complete } private void fillStateCombo(String country){ m_stateCBInitializing = true; //state combo is initializing, do nothing on value changed cbRefState.removeAllItems(); String upperCaseCountry = ""; if(country != null && !"".equals(country)){ upperCaseCountry = country.toUpperCase(); } m_cacheMgr.fillComponent(cbRefState, TsoConstant.LIST_REF_STATE, upperCaseCountry); m_stateCBInitializing = false; //initialization complete } /** * Loads the Customer Type (cbCustomerType) combobox on the Account Info tab. * This combo displays data from the REF_CUSTOMER_TYPE table except "VERIFY".
* Any previously selected value will remain selected. **/ private void fillCustomerTypeCombo(){ cbCustomerType.removeAllItems(); m_cacheMgr.fillComponent(cbCustomerType, TsoConstant.LIST_REF_CUSTOMER_TYPE, TsoConstant.COMBOBOXINITIALITEM); for(int i = 0; i < cbCustomerType.getItemCount(); i++) { AgoDisplayValue item = (AgoDisplayValue)cbCustomerType.getItemAt(i); if(item.getUserData().toString().equals(RefCustomerType.VERIFY_ACCOUNT)) { cbCustomerType.removeItemAt(i); break; } } selectCustomerType(); } private void selectCustomerType(){ if(RefCustomerType.RETAIL_ACCOUNT.equals(m_customerType)){ lblCustomerTypeValue.setText(RETAIL); fldAltCustNumber.setEnabled(false); fldAltCustNumber.setText(""); cbBillingType.setEnabled(false); }else{ lblCustomerTypeValue.setText(REGULAR); enableDisableAltCustomer(); if (isGPCOwned() && FM.canEdit()) { // cbBillingType.setEnabled(true); disableEnableBillingType(); } } enableTransmitAndNapaCat(); } /** * Loads the comboboxes. These combos * display data from the REF_OPTION and REF_SURCHARGE_TYPE tables.
* Any previously selected value will remain selected. * @param forcefill - boolean true to force fill from cache mgr. **/ private void fillREF_Combos(boolean forcefill){ logger.debug("fillREF_Combos forcefill = " + forcefill); cbInvFlag.removeAllItems(); cbFlag.removeAllItems(); cbDeliverFlg.removeAllItems(); cbPriTaxStatus.removeAllItems(); cbSecTaxStatus.removeAllItems(); cbType.removeAllItems(); cbCategory.removeAllItems(); cbBillingType.removeAllItems(); cbLangPref.removeAllItems(); cbUsoCFDI.removeAllItems(); cbCorporationType.removeAllItems(); TamsCacheMgr cacheMgr = m_cacheMgr; if(forcefill){ cacheMgr.fillComponent(cbInvFlag, TsoConstant.LIST_REF_OPTION); } if(forcefill){ cacheMgr.fillComponent(cbFlag, TsoConstant.LIST_REF_OPTION); } if(forcefill){ cacheMgr.fillComponent(cbDeliverFlg, TsoConstant.LIST_REF_OPTION); } if(forcefill){ cacheMgr.fillComponent(cbPriTaxStatus, TsoConstant.LIST_REF_OPTION); } if(forcefill){ cacheMgr.fillComponent(cbSecTaxStatus, TsoConstant.LIST_REF_OPTION); } if(forcefill){ cacheMgr.fillComponent(cbType, TsoConstant.LIST_REF_SURCHARGE_TYPE); } if(forcefill){//NAPA Category cacheMgr.fillComponent(cbCategory, TsoConstant.LIST_REF_NAPA_CUSTOMER_CATEGORY2); } if(forcefill){//Billing Type cacheMgr.fillComponent(cbBillingType, TsoConstant.LIST_REF_BILLING_TYPE); } if(forcefill){//Language Preference try { cbLangPref.query(Sch_Tables.REF_LANGUAGE + "." + Sch_RefLanguage.LOC + "=" + ClientApplicationContext.getClientApplicationContext().getLocation()); } catch (AgoTransientSystemException e) { logger.error(e.toString(), e); return; } catch (AgoUnrecoverableSystemException e) { logger.error(e.toString(), e); return; } catch (AgoSecurityException e) { logger.error(e.toString(), e); return; } } if(forcefill){ cacheMgr.fillComponent(cbUsoCFDI, TsoConstant.LIST_REF_ELECTRONIC_INVOICE_TYPE); } if(forcefill){ cacheMgr.fillComponent(cbCorporationType, TsoConstant.LIST_REF_ELECTRONIC_INVOICE_COMPANY_TYPE); } } public void fCheckLogin(){ } private Hashtable getArUpdateParameters() { Hashtable hsh = new Hashtable(); CustomerRequest custRequestUpdate = null; CustomerRequest custRequestDelete = null; CustomerRequest custRequestPricing = null; if (custInfoSet != null && !custInfoSet.isEmpty()) { final Integer[] custUpdIntArray = (Integer[]) custInfoSet.toArray(new Integer[custInfoSet.size()]); final String[] displayUpd = new String[custInfoSet.size()]; for (int i = 0; i < displayUpd.length; i++) { displayUpd[i] = custUpdIntArray[i] + " - " + custNumNameMap.get(custUpdIntArray[i]); } custRequestUpdate = new CustomerRequest(); custRequestUpdate.setCustomerAction(CustomerRequest.CustomerAction.UPDATE_INFO); custRequestUpdate.setCustomerNumbers(custUpdIntArray); hsh.put("CUSTOMER_UPDATES", custRequestUpdate); hsh.put("DISPLAY_CUSTOMER_UPDATES", displayUpd); } if (custPricingSet != null && !custPricingSet.isEmpty()) { final Integer[] custPricingIntArray = (Integer[]) custPricingSet.toArray(new Integer[custPricingSet.size()]); final String[] displayPricing = new String[custPricingSet.size()]; for (int i = 0; i < displayPricing.length; i++) { displayPricing[i] = custPricingIntArray[i] + " - " + custNumNameMap.get(custPricingIntArray[i]); } custRequestPricing = new CustomerRequest(); custRequestPricing.setCustomerAction(CustomerRequest.CustomerAction.UPDATE_CUSTOM_PRICING); custRequestPricing.setCustomerNumbers(custPricingIntArray); hsh.put("CUSTOMER_PRICING", custRequestPricing); hsh.put("DISPLAY_CUSTOMER_PRICING", displayPricing); } if (custDeleteSet != null && !custDeleteSet.isEmpty()) { final Integer[] custDelIntArray = (Integer[]) custDeleteSet.toArray(new Integer[custDeleteSet.size()]); final String[] displayDel = new String[custDeleteSet.size()]; for (int i = 0; i < displayDel.length; i++) { displayDel[i] = custDelIntArray[i].toString(); } custRequestDelete = new CustomerRequest(); custRequestDelete.setCustomerAction(CustomerRequest.CustomerAction.DELETE); custRequestDelete.setCustomerNumbers(custDelIntArray); hsh.put("CUSTOMER_DELETES", custRequestDelete); hsh.put("DISPLAY_CUSTOMER_DELETES", displayDel); } return hsh; } /* * XXX This is a hack! * This method has been modified to do a 'fake' close and then initiate a * real close. This occurs if this is a main A/R store and changes were * made and the user answered yes to the 'Transmit to branch' question. * This hack was put into place because if the user clicked on another menu * item (such as classification) and then answered yes to the transmit question, * the thread to open the classification form was invoked when the user clicked * on the menu item and then the thread in this fClose method was invoked to * open the Transmit to Branch form. The two forms were trying to open at once * (and caused an exception). To resolve this we are checking to see if the user * wants to transmit changes, if they disallow the close to complete by returning * false. Before the return we invokeLater to initiate the close again which will * actually close this form. The initial return false, cancels the navigation to * the other form (for example classification). The second close actually closes * the window but before that invokes a thread to open the Transmit to Branch form. * This is essentially disallowing the user to navigate away if they wish to transmit * to the branch. * Clear as mud? See bug 34764 for clarity and make sure if this method is changed * it doesn't break the fix for this bug. */ public boolean fClose(){ if (navigateToTransmit) { final Hashtable hsh = getArUpdateParameters(); removeGlobalReferences(); SwingUtilities.invokeLater(new Runnable() { public void run() { FwoSessionMgr.getInstance().getNavigationMgr().getMainForm().fShowSelectedForm( TsoConstant.FRM_CO_SELECT_UPDATES_FOR_CUSTOMERS, hsh); } }); } else if (doUpdatesForArBranchesExist()) { boolean response = ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessageYesNo(this, "1728"); if (response) { navigateToTransmit = true; SwingUtilities.invokeLater(new Runnable() { public void run() { if (FwoSessionMgr.getInstance().getToolBar() instanceof FrmTAMS_MainToolbar) { FrmTAMS_MainToolbar tamsToolbar = (FrmTAMS_MainToolbar) FwoSessionMgr.getInstance().getToolBar(); tamsToolbar.pbClose.doClick(); } } }); return false; } else { navigateToTransmit = false; removeGlobalReferences(); } } else { 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() { m_recordLocaleComps = null; m_cacheMgr = null; m_SearchCustNum = null; m_newAccountNum = null; m_newRetailNum = null; m_defaultCountryCd = null; m_defaultStateCd = null; m_defaultLanguageCd = null; m_storeType = null; m_customerType = null; m_empID_v = null; FM = null; navData = null; advancedSearchObject = null; subFormNames = null; currentTabForm = null; removeAll(); removeAllGUIComponentReferences(); custInfoSet = null; custPricingSet = null; custDeleteSet = null; custNumNameMap = null; } private void removeAllGUIComponentReferences() { tabCustomer = null; agcDsoGen = null; Label1 = null; Rectangle1 = null; lblSecondaryTaxExemptNum = null; cbEmpID = null; fldSearch = null; fldCustomerNum = null; fldSecTaxExemptExpDate = null; fldPriTaxExemptExpDate = null; dsoGeneric = null; lblDistanceUnits = null; lblTravelTimeUnits = null; cbDeliverFlg = null; fldDeliveryCharge = null; fldMinSalesFreeDel = null; fldAmount = null; fldMonthlySalesPotential = null; fldMinAmtForPO = null; fldDistanceToCust = null; fldTravelTimeToCust = null; fldInvDiscount = null; fldNoAdditionalInvCopies = null; fldSalesIDNumber = null; fldCustomerId = null; lblCustName = null; agcCustomerAR = null; cbCategory = null; cbUsoCFDI = null; lblModifiedEmplInv = null; lblModifiedEmplMain = null; agcAlternateCustomer = null; fldAltCustNumber = null; lblCustomerTypeValue = null; lblCustomerSearch = null; rectTransmitSection = null; lblExtension = null; fldExtension = null; fldAddress4 = null; lblAddress4 = null; fldAddress3 = null; lblAddress3 = null; lblDateAdded = null; lblLastPurchaseDate = null; lblLastModified = null; lblDateEstablished = null; tbChangeCustType = null; cbCustomerType = null; ckAuthorizePurchases = null; lblAuthorizePurchases = null; ckIbsAccount = null; lblIbsAccount = null; ckAllowOnlyCoreSales = null; lblAllowOnlyCoreSales = null; lblMinSalesFreeDel = null; lblDeliveryCharge = null; lblDistanceToCust = null; lblTravelTimeToCust = null; cbDeliveryPriority = null; lblDeliveryPriority = null; lblDeliveryRoute = null; cbDeliveryRoute = null; lblDeliveryFlag = null; lblInvFlag = null; cbInvFlag = null; recDeliveryInformation = null; recInvoiceDisc = null; cbType = null; cbFlag = null; lblType = null; lblAmount = null; recInvoiceSurcharge = null; fldSecTaxExemptNumber = null; recPrimary = null; recSecondary = null; pbSearch = null; agcCustomerDelivery = null; ckExemptEnvCharges = null; lblExemptEnviroChanges = null; lblFlag = null; lblDiscountPerc = null; agcCustomer = null; lblCustomerType = null; recMiscellaneous = null; recPriceControl = null; lblPriceLocked = null; ckPriceLocked = null; lblMaxDiscount = null; fldPriceMaxDiscount = null; cbSecTaxStatus = null; lblDeliveryTaxTable = null; lblDefaultTaxTable = null; cbDefaultTaxTable = null; cbDeliveryTaxTable = null; lblTaxExemptExpDate = null; fldPriTaxExemptNumber = null; lblTaxExemptNum = null; cbPriTaxStatus = null; lblPrimaryTaxStatus = null; recTaxInfo = null; lblPOReqForPurchasesOver = null; lblSalesIDNum = null; lblAltCustNumber = null; lblMonthlySalesPotential = null; fldEmail = null; lblEmail = null; lblEmailInvoices = null; lblCMHeader = null; lblExtraInvoiceCopies = null; lblPrintBalance = null; lblAllowBackorders = null; lblAllowSpecialOrders = null; lblPrintCatalogNotes = null; lblPrintMSDS = null; ckPrintMSDS = null; ckPrintCatalogNotes = null; ckPrintBalance = null; ckDirectShip = null; ckAllowBackorders = null; ckAllowSpecialOrders = null; lblAlphaKey = null; lblName = null; lblAddress1 = null; lblAddress2 = null; lblCity = null; lblState = null; lblZip = null; lblPhone = null; lblNAPACategory = null; lblBillingType = null; lblSalesRepNum = null; fldAlphaKey = null; fldName = null; lblCFDIName = null; fldCFDIName = null; fldAddress1 = null; fldAddress2 = null; fldCity = null; fldZipCode = null; lblCorporationType = null; cbCorporationType = null; fldPhone = null; cbRefState = null; cbBillingType = null; lblWebAddress = null; fldWebAddress = null; lblCustomerNote = null; cbSalesRepNum = null; lblFaxNum = null; fldFaxNum = null; lblCountry = null; cbRefCountry = null; fldSpeedDial = null; lblSpeedDial = null; cbCustomerNote = null; rbTransmitNationalSalesNo = null; rbTransmitNationalSalesYes = null; rbTransmitJSASalesNo = null; rbTransmitJSASalesYes = null; lblTransmitNationalSales = null; lblTransmitJSASales = null; lblLang = null; cbLangPref = null; lblCustomerNum = null; cbStoreCategory = null; lblStoreCategory = null; cbServingStore = null; lblServingStore = null; recServingStore = null; fldPrimaryTaxNumber = null; fldSecondaryTaxNumber = null; fldEmailInvoices = null; lblEmailInvoices = null; lblPromptForESignatureOnAllInvoices = null; ckPromptForESignatureOnAllInvoices = null; } public void actionPerformed(ActionEvent evt) { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === Object src = evt.getSource(); if (src == rbTransmitNationalSalesNo) { handle_rbTransmitNationalSalesNo_actionPerformed(evt); return; } if (src == rbTransmitJSASalesNo) { handle_rbTransmitJSASalesNo_actionPerformed(evt); return; } if (src == tbChangeCustType) { handle_tbChangeCustType_actionPerformed(evt); return; } if ((src == ckPriorityPlus) || (src == ckPriorityPlusLock)) { // WARNING! Can only be unlocked by TAMS Support.\n Are you sure you // want to lock ? if ((src == ckPriorityPlusLock) && ckPriorityPlusLock.isSelected()) { boolean inUseResponse = ClientApplicationContext .getClientApplicationContext() .getMessageMgr() .showMessageYesNo(this, "455", lblPriorityPlus.getText()); if (!inUseResponse) ckPriorityPlusLock.setSelected(false); } /** * 0 - if first checkbox is not selected and "Lock" checkbox is not * selected. 1 - If first checkbox is selected and "Lock" checkbox * is no selected. 10 - If first checkbox is not selected and "Lock" * checkbox is selected. 11 - If first checkbox is selected and * "Lock" checkbox is selected. **/ iLocked = ckPriorityPlus.isSelected() ? (byte) 1 : (byte) 0; if (ckPriorityPlusLock.isSelected()) { iLocked = (byte) (10 + iLocked); } m_priorityPlusChanged = true; // get check in fNeedsUpdate(), // fSave(), and fCancel() return; } if ((src == ckDNSCustomer) || (src == ckDNSCustomerLock)) { // WARNING! Can only be unlocked by TAMS Support.\n Are you sure you // want to lock ? if ((src == ckDNSCustomerLock) && ckDNSCustomerLock.isSelected()) { boolean inUseResponse = ClientApplicationContext .getClientApplicationContext() .getMessageMgr() .showMessageYesNo(this, "455", lblDNSCustomer.getText()); if (!inUseResponse) ckDNSCustomerLock.setSelected(false); } /** * 0 - if first checkbox is not selected and "Lock" checkbox is not * selected. 1 - If first checkbox is selected and "Lock" checkbox * is no selected. 10 - If first checkbox is not selected and "Lock" * checkbox is selected. 11 - If first checkbox is selected and * "Lock" checkbox is selected. **/ iLocked = ckDNSCustomer.isSelected() ? (byte) 1 : (byte) 0; if (ckDNSCustomerLock.isSelected()) { iLocked = (byte) (10 + iLocked); } m_dnsCustomerChanged = true; // get check in fNeedsUpdate(), // fSave(), and fCancel() return; } super.actionPerformed(evt); } 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 void valueChanged(AgoPropertyChangeEvent evt) { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === Object src = evt.getSource(); if (src == cbSecTaxStatus) { handle_cbSecTaxStatus_valueChanged(evt); return; } if (src == cbCustomerType) { handle_cbCustomerType_valueChanged(evt); return; } if (src == cbRefState) { handle_cbRefState_valueChanged(evt); return; } if (src == cbPriTaxStatus) { handle_cbPriTaxStatus_valueChanged(evt); return; } if (src == cbBillingType) { handle_cbBillingType_valueChanged(evt); return; } if (src == cbRefCountry) { handle_cbRefCountry_valueChanged(evt); return; } } public void stateChanged(javax.swing.event.ChangeEvent changeEvent) { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === Object src = changeEvent.getSource(); if (src == tabCustomer) { handle_tabCustomer_stateChanged(changeEvent); return; } } 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: /* ID () COMMUNICATION_DIRECTORY.ID*/ return ((Short) cursor.getProperty(0)); case 1: /* LOC () COMMUNICATION_DIRECTORY.LOC*/ return ((Integer) cursor.getProperty(1)); case 2: /* REF_COMMUNICATION_TYPE_ID () COMMUNICATION_DIRECTORY.REF_COMMUNICATION_TYPE_ID*/ return ((Integer) cursor.getProperty(2)); case 3: /* INVOICE_TO_CUSTOMER_ID () COMMUNICATION_DIRECTORY.INVOICE_TO_CUSTOMER_ID*/ return ((Integer) cursor.getProperty(3)); case 4: /* PROLINK_ACCOUNT_NUMBER () COMMUNICATION_DIRECTORY.PROLINK_ACCOUNT_NUMBER*/ return ((Integer) cursor.getProperty(4)); case 5: /* CUSTOMER_ID () CUSTOMER_AR.CUSTOMER_ID*/ return ((Integer) cursor.getProperty(0)); case 6: /* LOC () CUSTOMER_AR.LOC*/ return ((Integer) cursor.getProperty(1)); case 7: /* LAST_COD_DATE () CUSTOMER_AR.LAST_COD_DATE*/ return ((java.sql.Date) cursor.getProperty(2)); case 8: /* NUM_OF_TIMES_COD () CUSTOMER_AR.NUM_OF_TIMES_COD*/ return ((Short) cursor.getProperty(3)); case 9: /* LAST_PAYMENT_AMOUNT () CUSTOMER_AR.LAST_PAYMENT_AMOUNT*/ return ((java.math.BigDecimal) cursor.getProperty(7)); case 10: /* HIGHEST_AMOUNT_OWED () CUSTOMER_AR.HIGHEST_AMOUNT_OWED*/ return ((java.math.BigDecimal) cursor.getProperty(8)); case 11: /* PAST_DUE_HIGHEST_DAYS () CUSTOMER_AR.PAST_DUE_HIGHEST_DAYS*/ return ((Short) cursor.getProperty(9)); case 12: /* LAST_STMT_TOT_DUE () CUSTOMER_AR.LAST_STMT_TOT_DUE*/ return ((java.math.BigDecimal) cursor.getProperty(10)); case 13: /* LAST_STMT_CURRENT_BAL () CUSTOMER_AR.LAST_STMT_CURRENT_BAL*/ return ((java.math.BigDecimal) cursor.getProperty(11)); case 14: /* LAST_STMT_PERIOD1_BAL () CUSTOMER_AR.LAST_STMT_PERIOD1_BAL*/ return ((java.math.BigDecimal) cursor.getProperty(12)); case 15: /* LAST_STMT_PERIOD2_BAL () CUSTOMER_AR.LAST_STMT_PERIOD2_BAL*/ return ((java.math.BigDecimal) cursor.getProperty(13)); case 16: /* LAST_STMT_PERIOD3_BAL () CUSTOMER_AR.LAST_STMT_PERIOD3_BAL*/ return ((java.math.BigDecimal) cursor.getProperty(14)); case 17: /* LAST_STMT_SVC_CHG () CUSTOMER_AR.LAST_STMT_SVC_CHG*/ return ((java.math.BigDecimal) cursor.getProperty(15)); case 18: /* LAST_STMT_FUTURE_DUE () CUSTOMER_AR.LAST_STMT_FUTURE_DUE*/ return ((java.math.BigDecimal) cursor.getProperty(16)); case 19: /* LAST_STMT_TOTAL_OWED () CUSTOMER_AR.LAST_STMT_TOTAL_OWED*/ return ((java.math.BigDecimal) cursor.getProperty(17)); case 20: /* CURRENT_BAL () CUSTOMER_AR.CURRENT_BAL*/ return ((java.math.BigDecimal) cursor.getProperty(18)); case 21: /* REF_STATEMENT_TYPE_ID () CUSTOMER_AR.REF_STATEMENT_TYPE_ID*/ return ((Byte) cursor.getProperty(6)); case 22: /* AGE_CUSTOMER () CUSTOMER_AR.AGE_CUSTOMER*/ return ((String) cursor.getProperty(19)); case 23: /* BAD_DEBT_ACCT () CUSTOMER_AR.BAD_DEBT_ACCT*/ return ((String) cursor.getProperty(20)); case 24: /* COMBINED_STATEMENT () CUSTOMER_AR.COMBINED_STATEMENT*/ return ((String) cursor.getProperty(21)); case 25: /* EXTRA_STATEMENT_COPIES () CUSTOMER_AR.EXTRA_STATEMENT_COPIES*/ return ((Byte) cursor.getProperty(22)); case 26: /* CREDIT_LIMIT () CUSTOMER_AR.CREDIT_LIMIT*/ return ((Integer) cursor.getProperty(23)); case 27: /* STORE_RESPONSIBILITY () CUSTOMER_AR.STORE_RESPONSIBILITY*/ return ((Integer) cursor.getProperty(24)); case 28: /* ACCT_SUMMARY_DAYS () CUSTOMER_AR.ACCT_SUMMARY_DAYS*/ return ((Short) cursor.getProperty(25)); case 29: /* INVOICE_COPY_DAYS () CUSTOMER_AR.INVOICE_COPY_DAYS*/ return ((Short) cursor.getProperty(26)); case 30: /* AR_TERMS_ID () CUSTOMER_AR.AR_TERMS_ID*/ return ((Short) cursor.getProperty(27)); case 31: /* LAST_MODIFIED_DATE () CUSTOMER_AR.LAST_MODIFIED_DATE*/ return ((java.sql.Timestamp) cursor.getProperty(4)); case 32: /* MODIFIED_BY_EMPLOYEE_ID () CUSTOMER_AR.MODIFIED_BY_EMPLOYEE_ID*/ return ((Integer) cursor.getProperty(5)); case 33: /* ID () CUSTOMER.ID*/ return ((Integer) cursor.getProperty(0)); case 34: /* LOC () CUSTOMER.LOC*/ return ((Integer) cursor.getProperty(1)); case 35: /* CUSTOMER_NUM () CUSTOMER.CUSTOMER_NUM*/ return ((Integer) cursor.getProperty(2)); case 36: /* REF_CUSTOMER_TYPE_CD () CUSTOMER.REF_CUSTOMER_TYPE_CD*/ return ((String) cursor.getProperty(3)); case 37: /* CUSTOMER_ID () CUSTOMER_DELIVERY.CUSTOMER_ID*/ return ((Integer) cursor.getProperty(0)); case 38: /* LOC () CUSTOMER_DELIVERY.LOC*/ return ((Integer) cursor.getProperty(1)); case 39: /* DELIVERY_REF_OPTION_CD () CUSTOMER_DELIVERY.DELIVERY_REF_OPTION_CD*/ return ((String) cursor.getProperty(2)); case 40: /* DELIVERY_ROUTE_CD () CUSTOMER_DELIVERY.DELIVERY_ROUTE_CD*/ return ((String) cursor.getProperty(3)); case 41: /* DELIVERY_PRIORITY_ID () CUSTOMER_DELIVERY.DELIVERY_PRIORITY_ID*/ return ((Byte) cursor.getProperty(4)); case 42: /* TRAVEL_TIME_CUSTOMER () CUSTOMER_DELIVERY.TRAVEL_TIME_CUSTOMER*/ return ((Short) cursor.getProperty(5)); case 43: /* DISTANCE_TO_CUSTOMER () CUSTOMER_DELIVERY.DISTANCE_TO_CUSTOMER*/ return ((Short) cursor.getProperty(6)); case 44: /* MIN_AMT_FREE_DELIVERY () CUSTOMER_DELIVERY.MIN_AMT_FREE_DELIVERY*/ return ((java.math.BigDecimal) cursor.getProperty(7)); case 45: /* DELIVERY_CHARGE () CUSTOMER_DELIVERY.DELIVERY_CHARGE*/ return ((java.math.BigDecimal) cursor.getProperty(8)); case 46: /* LAST_MODIFIED_DATE () CUSTOMER_DELIVERY.LAST_MODIFIED_DATE*/ return ((java.sql.Timestamp) cursor.getProperty(9)); case 47: /* MODIFIED_BY_EMPLOYEE_ID () CUSTOMER_DELIVERY.MODIFIED_BY_EMPLOYEE_ID*/ return ((Integer) cursor.getProperty(10)); case 48: /* ID () CUSTOMER.ID*/ return ((Integer) cursor.getProperty(0)); case 49: /* LOC () CUSTOMER.LOC*/ return ((Integer) cursor.getProperty(1)); case 50: /* CUSTOMER_NUM () CUSTOMER.CUSTOMER_NUM*/ return ((Integer) cursor.getProperty(2)); case 51: /* ALPHA_KEY () CUSTOMER.ALPHA_KEY*/ return ((String) cursor.getProperty(3)); case 52: /* NAME () CUSTOMER.NAME*/ return ((String) cursor.getProperty(4)); case 53: /* ADDRESS1 () CUSTOMER.ADDRESS1*/ return ((String) cursor.getProperty(5)); case 54: /* ADDRESS2 () CUSTOMER.ADDRESS2*/ return ((String) cursor.getProperty(6)); case 55: /* CITY () CUSTOMER.CITY*/ return ((String) cursor.getProperty(7)); case 56: /* REF_STATE_CD () CUSTOMER.REF_STATE_CD*/ return ((String) cursor.getProperty(8)); case 57: /* POSTAL_CODE () CUSTOMER.POSTAL_CODE*/ return ((String) cursor.getProperty(9)); case 58: /* REF_COUNTRY_CD () CUSTOMER.REF_COUNTRY_CD*/ return ((String) cursor.getProperty(10)); case 59: /* PHONE () CUSTOMER.PHONE*/ return ((String) cursor.getProperty(11)); case 60: /* EXTENSION () CUSTOMER.EXTENSION*/ return ((String) cursor.getProperty(12)); case 61: /* FAX_NUMBER () CUSTOMER.FAX_NUMBER*/ return ((String) cursor.getProperty(13)); case 62: /* EMAIL () CUSTOMER.EMAIL*/ return ((String) cursor.getProperty(14)); case 63: /* REF_NAPA_CUSTOMER_CATEGORY_ID () CUSTOMER.REF_NAPA_CUSTOMER_CATEGORY_ID*/ return ((Byte) cursor.getProperty(15)); case 64: /* CUSTOMER_NOTE_ID () CUSTOMER.CUSTOMER_NOTE_ID*/ return ((Short) cursor.getProperty(16)); case 65: /* ACCOUNT_ESTABLISH_DATE () CUSTOMER.ACCOUNT_ESTABLISH_DATE*/ return ((java.sql.Date) cursor.getProperty(17)); case 66: /* REF_LANGUAGE_CD () CUSTOMER.REF_LANGUAGE_CD*/ return ((String) cursor.getProperty(18)); case 67: /* REF_BILLING_TYPE_CD () CUSTOMER.REF_BILLING_TYPE_CD*/ return ((String) cursor.getProperty(19)); case 68: /* SALESMAN_EMPLOYEE_ID () CUSTOMER.SALESMAN_EMPLOYEE_ID*/ return ((Integer) cursor.getProperty(20)); case 69: /* TRANSMIT_JSA_SALES () CUSTOMER.TRANSMIT_JSA_SALES*/ return ((String) cursor.getProperty(21)); case 70: /* TRANSMIT_NATIONAL_SALES () CUSTOMER.TRANSMIT_NATIONAL_SALES*/ return ((String) cursor.getProperty(22)); case 71: /* USUAL_REF_PRICE_SHEET_CD () CUSTOMER.USUAL_REF_PRICE_SHEET_CD*/ return ((String) cursor.getProperty(23)); case 72: /* USUAL_PRICE_MARKUP_PERCENT () CUSTOMER.USUAL_PRICE_MARKUP_PERCENT*/ return ((Short) cursor.getProperty(24)); case 73: /* USUAL_PRICE_REF_CURRENCY_ROUNDING_CD () CUSTOMER.USUAL_PRICE_REF_CURRENCY_ROUNDING_CD*/ return ((String) cursor.getProperty(25)); case 74: /* STORE_CATEGORY_ID () CUSTOMER.STORE_CATEGORY_ID*/ return ((Short) cursor.getProperty(26)); case 75: /* LAST_SALE_DATE () CUSTOMER.LAST_SALE_DATE*/ return ((java.sql.Date) cursor.getProperty(27)); case 76: /* PRINT_MSDS_FOR_CUSTOMER () CUSTOMER.PRINT_MSDS_FOR_CUSTOMER*/ return ((String) cursor.getProperty(28)); case 77: /* PRINT_CATALOG_NOTES_ON_INVOICE () CUSTOMER.PRINT_CATALOG_NOTES_ON_INVOICE*/ return ((String) cursor.getProperty(29)); case 78: /* ALLOW_BACKORDERS () CUSTOMER.ALLOW_BACKORDERS*/ return ((String) cursor.getProperty(30)); case 79: /* PRINT_BALANCE_ON_INV () CUSTOMER.PRINT_BALANCE_ON_INV*/ return ((String) cursor.getProperty(31)); case 80: /* ALLOW_SPECIAL_ORDERS () CUSTOMER.ALLOW_SPECIAL_ORDERS*/ return ((String) cursor.getProperty(32)); case 81: /* MISC_INV_DISCOUNT_REF_OPTION_CD () CUSTOMER.MISC_INV_DISCOUNT_REF_OPTION_CD*/ return ((String) cursor.getProperty(33)); case 82: /* EXTRA_INV_COPIES () CUSTOMER.EXTRA_INV_COPIES*/ return ((Byte) cursor.getProperty(34)); case 83: /* ALTERNATE_CORE_CUSTOMER_ID () CUSTOMER.ALTERNATE_CORE_CUSTOMER_ID*/ return ((Integer) cursor.getProperty(35)); case 84: /* TAX_STATUS_PRIMARY_REF_OPTION_CD () CUSTOMER.TAX_STATUS_PRIMARY_REF_OPTION_CD*/ return ((String) cursor.getProperty(36)); case 85: /* TAX_STATUS_SECONDARY_REF_OPTION_CD () CUSTOMER.TAX_STATUS_SECONDARY_REF_OPTION_CD*/ return ((String) cursor.getProperty(37)); case 86: /* DELIVERED_TAX_TABLE_ID () CUSTOMER.DELIVERED_TAX_TABLE_ID*/ return ((Short) cursor.getProperty(38)); case 87: /* DEFAULT_TAX_TABLE_ID () CUSTOMER.DEFAULT_TAX_TABLE_ID*/ return ((Short) cursor.getProperty(39)); case 88: /* MIN_AMT_FOR_PO () CUSTOMER.MIN_AMT_FOR_PO*/ return ((Integer) cursor.getProperty(40)); case 89: /* SALES_ID_NUM () CUSTOMER.SALES_ID_NUM*/ return ((String) cursor.getProperty(41)); case 90: /* MONTHLY_SALES_POTENTIAL () CUSTOMER.MONTHLY_SALES_POTENTIAL*/ return ((java.math.BigDecimal) cursor.getProperty(42)); case 91: /* LAST_MODIFIED_DATE () CUSTOMER.LAST_MODIFIED_DATE*/ return ((java.sql.Timestamp) cursor.getProperty(43)); case 92: /* CHECK_FOR_MISC_CHG_EXEMPTIONS () CUSTOMER.CHECK_FOR_MISC_CHG_EXEMPTIONS*/ return ((String) cursor.getProperty(44)); case 93: /* MODIFIED_BY_EMPLOYEE_ID () CUSTOMER.MODIFIED_BY_EMPLOYEE_ID*/ return ((Integer) cursor.getProperty(45)); case 94: /* ACTIVE_ACCOUNT () CUSTOMER.ACTIVE_ACCOUNT*/ return ((String) cursor.getProperty(46)); case 95: /* REF_CUSTOMER_TYPE_CD () CUSTOMER.REF_CUSTOMER_TYPE_CD*/ return ((String) cursor.getProperty(47)); case 96: /* WEB_ADDRESS () CUSTOMER.WEB_ADDRESS*/ return ((String) cursor.getProperty(48)); case 97: /* SURCHARGE_REF_OPTION_CD () CUSTOMER.SURCHARGE_REF_OPTION_CD*/ return ((String) cursor.getProperty(49)); case 98: /* REF_SURCHARGE_TYPE_CD () CUSTOMER.REF_SURCHARGE_TYPE_CD*/ return ((String) cursor.getProperty(50)); case 99: /* SURCHARGE_AMOUNT () CUSTOMER.SURCHARGE_AMOUNT*/ return ((java.math.BigDecimal) cursor.getProperty(51)); case 100: /* TAX_EXEMPT_NUM_SECONDARY () CUSTOMER.TAX_EXEMPT_NUM_SECONDARY*/ return ((String) cursor.getProperty(52)); case 101: /* TAX_EXEMPT_SECONDARY_EXP_DATE () CUSTOMER.TAX_EXEMPT_SECONDARY_EXP_DATE*/ return ((java.sql.Date) cursor.getProperty(53)); case 102: /* TAX_EXEMPT_NUM_PRIMARY () CUSTOMER.TAX_EXEMPT_NUM_PRIMARY*/ return ((String) cursor.getProperty(54)); case 103: /* TAX_EXEMPT_PRIMARY_EXP_DATE () CUSTOMER.TAX_EXEMPT_PRIMARY_EXP_DATE*/ return ((java.sql.Date) cursor.getProperty(55)); case 104: /* ADDRESS3 () CUSTOMER.ADDRESS3*/ return ((String) cursor.getProperty(56)); case 105: /* ADDRESS4 () CUSTOMER.ADDRESS4*/ return ((String) cursor.getProperty(57)); case 106: /* SPEED_DIAL () CUSTOMER.SPEED_DIAL*/ return ((String) cursor.getProperty(58)); case 107: /* AUTHORIZED_BUYERS_ONLY () CUSTOMER.AUTHORIZED_BUYERS_ONLY*/ return ((String) cursor.getProperty(59)); case 108: /* CUSTOMER_TYPICALLY_PRESENT_DURING_INVOICING () CUSTOMER.CUSTOMER_TYPICALLY_PRESENT_DURING_INVOICING*/ return ((String) cursor.getProperty(60)); case 109: /* MISC_INV_DISC_PERCENT () CUSTOMER.MISC_INV_DISC_PERCENT*/ return ((Short) cursor.getProperty(61)); case 110: /* cbDeliveryPriority () DELIVERY_ROUTE.ID + " - " + DELIVERY_PRIORITY.NAME+ " - " + DELIVERY_PRIORITY.NUM_MINUTES_FOR_DELIVERY*/ return ((((Byte) cursor.getProperty(0))) + (" - ") + ((String) cursor.getProperty(1))+ (" - ") + ((Short) cursor.getProperty(2))); case 111: /* cbDeliveryPriority () DELIVERY_PRIORITY.ID*/ return ((Byte) cursor.getProperty(0)); case 112: /* cbDeliveryRoute () DELIVERY_ROUTE.CD + " - " + DELIVERY_ROUTE.DESCRIPTION*/ return ((((String) cursor.getProperty(0))) + (" - ")) + (((String) cursor.getProperty(1))); case 113: /* cbDeliveryRoute () DELIVERY_ROUTE.CD*/ return ((String) cursor.getProperty(0)); case 114: /* cbDeliveryTaxTable () TAX_TABLE.ID + " - " + TAX_TABLE.DESCRIPTION*/ return ((((Short) cursor.getProperty(0))) + (" - ")) + (((String) cursor.getProperty(1))); case 115: /* cbDeliveryTaxTable () TAX_TABLE.ID*/ return ((Short) cursor.getProperty(0)); case 116: /* cbDefaultTaxTable () TAX_TABLE.ID + " - " + TAX_TABLE.DESCRIPTION*/ return ((((Short) cursor.getProperty(0))) + (" - ")) + (((String) cursor.getProperty(1))); case 117: /* cbDefaultTaxTable () TAX_TABLE.ID*/ return ((Short) cursor.getProperty(0)); case 118: /* cbEmpID () EMPLOYEE.ID*/ return ((Integer) cursor.getProperty(0)); case 119: /* cbEmpID () EMPLOYEE.ID*/ return ((Integer) cursor.getProperty(0)); case 120: /* cbSalesRepNum () EMPLOYEE.EMPLOYEE_NUM + "-" + EMPLOYEE.FIRST_NAME + " " + EMPLOYEE.LAST_NAME*/ return ((((((Integer) cursor.getProperty(0))) + ("-")) + (((String) cursor.getProperty(1)))) + (" ")) + (((String) cursor.getProperty(2))); case 121: /* cbSalesRepNum () EMPLOYEE.ID*/ return ((Integer) cursor.getProperty(3)); case 122: /* cbCustomerNote () CUSTOMER_NOTE.ID + " - " + CUSTOMER_NOTE.TEXT*/ return ((((Short) cursor.getProperty(0))) + (" - ")) + (((String) cursor.getProperty(1))); case 123: /* cbCustomerNote () CUSTOMER_NOTE.ID*/ return ((Short) cursor.getProperty(0)); case 124: /* cbStoreCategory () STORE_CATEGORY.ID + " " + STORE_CATEGORY.DESCRIPTION*/ return ((((Short) cursor.getProperty(0))) + (" ")) + (((String) cursor.getProperty(1))); case 125: /* cbStoreCategory () STORE_CATEGORY.ID*/ return ((Short) cursor.getProperty(0)); case 126: /* Label1 () agcCustomer.CUSTOMER_NUM*/ return ((Integer) agcCustomer.getProperty("CUSTOMER_NUM")); case 127: /* lblCustName () agcCustomer.NAME*/ return ((String) agcCustomer.getProperty("NAME")); case 128: /* lblModifiedEmplInv () agcCustomer.MODIFIED_BY_EMPLOYEE_ID*/ return ((Integer) agcCustomer.getProperty("MODIFIED_BY_EMPLOYEE_ID")); case 129: /* lblLastModified () agcCustomer.LAST_SALE_DATE*/ return DatePatternUtils.formatDate(((java.sql.Date) agcCustomer .getProperty("LAST_SALE_DATE"))); case 130: /* lblDateEstablished () agcCustomer.ACCOUNT_ESTABLISH_DATE*/ return DatePatternUtils.formatDate(((java.sql.Date) agcCustomer .getProperty("ACCOUNT_ESTABLISH_DATE"))); case 131: /* cbLangPref () REF_LANGUAGE.CD */ return ((String) cursor.getProperty(0)); case 132: /* cbLangPref () REF_LANGUAGE.NAME */ return ((String) cursor.getProperty(1)); case 133: /* CUSTOMER_USER_DEFINED_FIELD CUSTOMER_ID */ return ((Integer) cursor.getProperty(0)); case 134: /* CUSTOMER_USER_DEFINED_FIELD LOC */ return ((Integer) cursor.getProperty(1)); case 135: /* CUSTOMER_USER_DEFINED_FIELD USER_DEFINED_FIELD_NAME_ID */ return ((Integer) cursor.getProperty(2)); case 136: /* CUSTOMER_USER_DEFINED_FIELD TEXT */ return ((String) cursor.getProperty(3)); case 137: /* CUSTOMER_USER_DEFINED_FIELD LAST_MODIFIED_DATE*/ return ((java.sql.Date) cursor.getProperty(4)); case 138: /* CUSTOMER_USER_DEFINED_FIELD MODIFIED_BY_EMPLOYEE_ID */ return ((Integer) cursor.getProperty(5)); case 139: /* agcCustomer.PRIORITY_PLUS */ return ((Byte) cursor.getProperty(62)); case 140: /* agcCustomer.PRIMARY_TAX_ID */ return ((String) cursor.getProperty(63)); case 141: /* agcCustomer.SECONDARY_TAX_ID */ return ((String) cursor.getProperty(64)); case 142: /* agcCustomer.IBS_ACCOUNT */ return ((String) cursor.getProperty(65)); case 143: /* agcCustomer.DIRECT_SHIPMENT_ELIGIBLE */ return ((String) cursor.getProperty(66)); case 144: /* agcCustomer.DEFAULT_REF_ELECTRONIC_INVOICE_TYPE_CD */ return ((String) cursor.getProperty(67)); case 145: /* agcCustomer.ALLOW_ONLY_CORE_SALES */ return ((String) cursor.getProperty(68)); case 146: /* agcCustomer.CFDI_NAME */ return ((String) cursor.getProperty(69)); case 147: /* agcCustomer.DNS_CUSTOMER */ return ((Byte) cursor.getProperty(70)); case 148: /* agcCustomer.INVOICE_EMAIL_ADDRESS */ return ((String) cursor.getProperty(71)); case 149: /* agcCustomer.CEPDI_CORPORATION_TYPE */ return ((String) cursor.getProperty(72)); case 150: /* agcCustomer.PRICE_LOCKED */ return ((Byte) cursor.getProperty(73)); case 151: /* agcCustomer.MAX_DISCOUNT_PCT */ return ((java.math.BigDecimal) cursor.getProperty(74)); case 152: /* CAPTURE_ESIGNATURE_ON_INVOICE () CUSTOMER.CAPTURE_ESIGNATURE_ON_INVOICE*/ return ((String) cursor.getProperty(75)); default: return null; } } catch (Throwable e) { return null; } } public void focusGained(FocusEvent focusEvent) { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === } public void finalize() throws Throwable{ logger.debug("Memory being release: " + this); super.finalize(); } private void handle_cbBillingType_valueChanged(AgoPropertyChangeEvent evt){ if (DATA_LOADING) return; if (cbBillingType.getValue() == null) return; if (m_isNewRecord) { return; } if(cbBillingType.getValue().equals(RefBillingType.CASH_ONLY)){ billingTypeChangedToCash = true; } if (isEmployeeSaleCustomer && isBillingCash && isGPCOwned() ) { billingTypeChangedToCash = false; } } private boolean customerARExists() { try { StringBuffer sbQuery = new StringBuffer(66); sbQuery.append(TBL.CUSTOMER_AR).append('.').append(CUSTAR.CUSTOMER_ID).append('='); sbQuery.append(agcCustomer.getProperty(CUST.ID)).append(" AND ").append(TBL.CUSTOMER_AR).append('.'); sbQuery.append(CUSTAR.LOC).append('=').append(FM.m_loc); agcCustomerAR.query(sbQuery.toString()); return agcCustomerAR.gotoFirst(); } catch (AgoSecurityException e) { logger.error(e.toString(), e); return false; } catch (AgoTransientSystemException e) { logger.error(e.toString(), e); return false; } catch (AgoUnrecoverableSystemException e) { logger.error(e.toString(), e); return false; } } private void enableTransmitAndNapaCat() { if (FM.getMode() == FwoFormMaster.VIEW_MODE || (!isGPCOwned() && isConsolidatedARMSBranchStore() && m_customerType != null && !m_customerType.equals(RefCustomerType.RETAIL_ACCOUNT))) { cbCategory.setEnabled(false); rbTransmitJSASalesYes.setEnabled(false); rbTransmitJSASalesNo.setEnabled(false); rbTransmitNationalSalesYes.setEnabled(false); rbTransmitNationalSalesNo.setEnabled(false); return; } boolean isRegularCustomer = !RefCustomerType.RETAIL_ACCOUNT.equals(m_customerType) && !RefCustomerType.VERIFY_ACCOUNT.equals(m_customerType); cbCategory.setEnabled(isRegularCustomer); if ("U".equals(agcCustomer.getProperty(CUST.TRANSMIT_NATIONAL_SALES))) { rbTransmitNationalSalesNo.setEnabled(false); rbTransmitNationalSalesYes.setEnabled(false); } else if ("R".equals(agcCustomer.getProperty(CUST.TRANSMIT_NATIONAL_SALES))) { rbTransmitNationalSalesNo.setEnabled(false); rbTransmitNationalSalesYes.setEnabled(false); } else if ("N".equals(agcCustomer.getProperty(CUST.TRANSMIT_NATIONAL_SALES))) { rbTransmitNationalSalesNo.setEnabled(false); rbTransmitNationalSalesYes.setEnabled(false); } else if ("Y".equals(agcCustomer.getProperty(CUST.TRANSMIT_NATIONAL_SALES))) { rbTransmitNationalSalesNo.setEnabled(false); rbTransmitNationalSalesYes.setEnabled(false); } if ("U".equals(agcCustomer.getProperty(CUST.TRANSMIT_JSA_SALES))) { rbTransmitJSASalesNo.setEnabled(false); rbTransmitJSASalesYes.setEnabled(false); } else if ("R".equals(agcCustomer.getProperty(CUST.TRANSMIT_JSA_SALES))) { rbTransmitJSASalesNo.setEnabled(false); rbTransmitJSASalesYes.setEnabled(false); } else if ("N".equals(agcCustomer.getProperty(CUST.TRANSMIT_JSA_SALES))) { rbTransmitJSASalesNo.setEnabled(isRegularCustomer); rbTransmitJSASalesYes.setEnabled(isRegularCustomer); } else if ("Y".equals(agcCustomer.getProperty(CUST.TRANSMIT_JSA_SALES))) { rbTransmitJSASalesNo.setEnabled(isRegularCustomer); rbTransmitJSASalesYes.setEnabled(isRegularCustomer); } if ((agcCustomer.getProperty(Sch_Customer.REF_NAPA_CUSTOMER_CATEGORY_ID) != null && ((Byte) agcCustomer .getProperty(Sch_Customer.REF_NAPA_CUSTOMER_CATEGORY_ID)).intValue() == RefNAPACustomerCategory.EMPLOYEE_SALE) && isGPCOwned()) { String orginalBillingType = getOriginalValue(); logger.debug("Napa category option is disabled for Employee sale customers"); isEmployeeSaleCustomer = true; cbCategory.setEnabled(false); if(orginalBillingType.equalsIgnoreCase(RefBillingType.CASH_ONLY)){ cbBillingType.setEnabled(false); isBillingCash = true; } else { isBillingCash = false; } } else { isEmployeeSaleCustomer = false; } } public void focusLost(FocusEvent focusEvent) { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === Object src = focusEvent.getSource(); if (src == cbCategory) { handle_cbCategory_focusLost(focusEvent); return; } } /** * Sets the Customer_AR default values for a new record */ private void setCustomerARDefaults() { agcCustomerAR.insertAfter(); BigDecimal bdZero = new BigDecimal("0.00"); Integer iZero = new Integer("0"); agcCustomerAR.setProperty(Sch_CustomerAR.CUSTOMER_ID, fldCustomerId.getText()); agcCustomerAR.setProperty(Sch_CustomerAR.LOC, FM.m_loc); agcCustomerAR.setProperty(Sch_CustomerAR.LAST_PAYMENT_AMOUNT, bdZero); agcCustomerAR.setProperty(Sch_CustomerAR.HIGHEST_AMOUNT_OWED, bdZero); agcCustomerAR.setProperty(Sch_CustomerAR.PAST_DUE_HIGHEST_DAYS, iZero); agcCustomerAR.setProperty(Sch_CustomerAR.NUM_OF_TIMES_COD, iZero); agcCustomerAR.setProperty(Sch_CustomerAR.LAST_STMT_TOT_DUE, iZero); agcCustomerAR.setProperty(Sch_CustomerAR.LAST_STMT_CURRENT_BAL, bdZero); agcCustomerAR.setProperty(Sch_CustomerAR.LAST_STMT_PERIOD1_BAL, bdZero); agcCustomerAR.setProperty(Sch_CustomerAR.LAST_STMT_PERIOD2_BAL, bdZero); agcCustomerAR.setProperty(Sch_CustomerAR.LAST_STMT_PERIOD3_BAL, bdZero); agcCustomerAR.setProperty(Sch_CustomerAR.LAST_STMT_SVC_CHG, bdZero); agcCustomerAR.setProperty(Sch_CustomerAR.LAST_STMT_FUTURE_DUE, bdZero); agcCustomerAR.setProperty(Sch_CustomerAR.LAST_STMT_TOTAL_OWED, bdZero); agcCustomerAR.setProperty(Sch_CustomerAR.CURRENT_BAL, bdZero); agcCustomerAR.setProperty(Sch_CustomerAR.REF_STATEMENT_TYPE_ID, new Integer(1)); agcCustomerAR.setProperty(Sch_CustomerAR.AGE_CUSTOMER, "Y"); agcCustomerAR.setProperty(Sch_CustomerAR.BAD_DEBT_ACCT, "N"); agcCustomerAR.setProperty(Sch_CustomerAR.COMBINED_STATEMENT, "N"); agcCustomerAR.setProperty(Sch_CustomerAR.EXTRA_STATEMENT_COPIES, iZero); agcCustomerAR.setProperty(Sch_CustomerAR.CREDIT_LIMIT, iZero); agcCustomerAR.setProperty(Sch_CustomerAR.STORE_RESPONSIBILITY, iZero); agcCustomerAR.setProperty(Sch_CustomerAR.ACCT_SUMMARY_DAYS, iZero); agcCustomerAR.setProperty(Sch_CustomerAR.INVOICE_COPY_DAYS, iZero); // set default ar term ARProfileVO arvo = ApplicationContext.getInstance().getProfile(Profile.BACKOFFICE_CLIENT, ClientApplicationContext.getClientApplicationContext().getLocation()).getARProfile(); agcCustomerAR.setProperty(Sch_CustomerAR.AR_TERMS_ID, arvo.getDefaultARTermsID()); } private boolean isConsolidatedARMSBranchStore() { return MSHelper.getInstance().isConsolidatedARMSBranchStore(Profile.BACKOFFICE_CLIENT, ClientApplicationContext.getClientApplicationContext().getLocation()); } /** * Calls the method that displays the "NAPA category defaults to transmit" warning **/ private void handle_rbTransmitJSASalesNo_actionPerformed(ActionEvent evt){ /* We are calling agcCustomer set properties because we had to unbind these fields from the radio buttons because / there are 4 values.*/ if ("N".equals(agcCustomer.getProperty(CUST.TRANSMIT_JSA_SALES)) || "Y".equals(agcCustomer.getProperty(CUST.TRANSMIT_JSA_SALES))) { showTransmitSalesWarning(); } } private void setARBranchViewMode() { FM.setDelete(false); FM.setSave(true); FM.setEdit(false); FM.setCancel(true); FM.setSort(false); FM.setPrint(false); FM.disableFormComponents(); if (PhoneRoomUtil.isPhoneRoomInUse() && currentTabIndex == TAB_MAIN2 && FM.getMode() != FwoFormMaster.VIEW_MODE) { Vector viewExceptions = new Vector(); viewExceptions.add(cbServingStore); viewExceptions.add(lblServingStore); viewExceptions.add(recServingStore); FM.setEnabledViewModeComps(viewExceptions); } Vector editDeliveryInfo = new Vector(); editDeliveryInfo.add(cbDeliverFlg); editDeliveryInfo.add(cbDeliveryRoute); editDeliveryInfo.add(cbDeliveryPriority); editDeliveryInfo.add(fldTravelTimeToCust); editDeliveryInfo.add(fldDistanceToCust); editDeliveryInfo.add(fldMinSalesFreeDel); editDeliveryInfo.add(fldDeliveryCharge); FM.setEnabledViewModeComps(editDeliveryInfo); FM.setMode(ARBRANCH_VIEW); lblBillingTypeVerify.setVisible(false); } private void createKRRecord() { CustomerVO customerVO = new CustomerVO(); customerVO.setID((Integer) agcCustomer.getProperty(CUST.ID)); customerVO.setName((String) agcCustomer.getProperty(CUST.NAME)); customerVO.setCfdiName((String) agcCustomer.getProperty(CUST.CFDI_NAME)); customerVO.setCepdiCorporationType((String) agcCustomer.getProperty(CUST.CEPDI_CORPORATION_TYPE)); customerVO.setLOC((Integer) agcCustomer.getProperty(CUST.LOC)); customerVO.setCustomerNumber((Integer) agcCustomer.getProperty(CUST.CUSTOMER_NUM)); customerVO.setSalesmanEmployeeID((Integer) agcCustomer.getProperty(CUST.SALESMAN_EMPLOYEE_ID)); customerVO.setTransmitNationalSales((String) agcCustomer.getProperty(CUST.TRANSMIT_NATIONAL_SALES)); customerVO.setTransmitJSASales((String) agcCustomer.getProperty(CUST.TRANSMIT_JSA_SALES)); try { if (!ClientApplicationContext.getClientApplicationContext().getCustomerDAO().writeKRRecord(customerVO).booleanValue()) { ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "1720"); } } catch (ApplicationException e) { logger.error(e.toString(), e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "1720"); } } private boolean hasNationalOrJSAChanged() { boolean haveTransmitNationalSalesChange = false; String national = (String) agcCustomer.getProperty(CUST.TRANSMIT_NATIONAL_SALES); if (rbTransmitNationalSalesNo.isEnabled() && national.equals("Y") && rbTransmitNationalSalesNo.isSelected()) { haveTransmitNationalSalesChange = true; } else if (rbTransmitNationalSalesYes.isEnabled() && national.equals("N") && rbTransmitNationalSalesYes.isSelected()) { haveTransmitNationalSalesChange = true; } boolean haveTransmitJSASalesChange = false; String jsa = (String) agcCustomer.getProperty(CUST.TRANSMIT_JSA_SALES); if (rbTransmitJSASalesNo.isEnabled() && jsa.equals("Y") && rbTransmitJSASalesNo.isSelected()) { haveTransmitJSASalesChange = true; } else if (rbTransmitJSASalesYes.isEnabled() && jsa.equals("N") && rbTransmitJSASalesYes.isSelected()) { haveTransmitJSASalesChange = true; } return haveTransmitNationalSalesChange ? haveTransmitNationalSalesChange : haveTransmitJSASalesChange; } private void handle_rbTransmitNationalSalesNo_actionPerformed(ActionEvent evt) { if ("N".equals(agcCustomer.getProperty(CUST.TRANSMIT_NATIONAL_SALES)) || "Y".equals(agcCustomer.getProperty(CUST.TRANSMIT_NATIONAL_SALES))) { showTransmitSalesWarning(); } } private void enableDisableAltCustomer() { if ( (FM != null && FM.getMode() == FwoFormMaster.VIEW_MODE) || (!isGPCOwned() && isConsolidatedARMSBranchStore()) || (m_customerType != null && m_customerType.equals(RefCustomerType.RETAIL_ACCOUNT)) || RefCustomerType.VERIFY_ACCOUNT.equals(m_customerType)) { fldAltCustNumber.setEnabled(false); } else { fldAltCustNumber.setEnabled(true); } } private void enableDisableServingStore() { if (PhoneRoomUtil.isPhoneRoomInUse() && FM.getMode() != FwoFormMaster.VIEW_MODE) { cbServingStore.setEnabled(true); lblServingStore.setEnabled(true); } else { cbServingStore.setEnabled(false); lblServingStore.setEnabled(false); } } /** * setPriceControlStatus method is to enable and disable the priceControlField. */ private void setPriceControlStatus() { ClientApplicationContext clientApplicationContext = ClientApplicationContext.getClientApplicationContext(); StoreProfileVO storeProfileVO = clientApplicationContext.getProfile(Profile.BACKOFFICE_CLIENT, clientApplicationContext.getLocation()).getStoreProfile(); if(storeProfileVO.getManageGpAtPos()==null || (storeProfileVO.getManageGpAtPos()!=null && !storeProfileVO.getManageGpAtPos().booleanValue())){ ckPriceLocked.setEnabled(false); fldPriceMaxDiscount.setEditable(false); fldPriceMaxDiscount.setEnabled(false); } } /** Bug :30959 Added the method to Check the ALLOW MISCELLANEOUS ADJUSTMENT feild is Unchecked. */ private void setMiscellaneousfields() { StringBuffer qBuffer = new StringBuffer(104); agcDsoGen.setDataSource("com.gpc.tams.dso.dsoGeneric"); TsoGenericBandDescriptor bd = null; bd = new TsoGenericBandDescriptor("INVOICING_PROFILE", "INVOICING_PROFILE"); bd.addColumn("ALLOW_MISCELLANEOUS_ADJUSTMENT", DatatypeCodes.TYPE_INT, true); qBuffer.append("SELECT ALLOW_MISCELLANEOUS_ADJUSTMENT FROM "); qBuffer.append("INVOICING_PROFILE WHERE INVOICING_PROFILE.LOC=").append(FM.m_loc); try { Hashtable ht = new Hashtable(); ht.put(com.gpc.tams.dso.dsoGeneric.SQL, qBuffer.toString()); ht.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bd); SilverStreamExceptionHelper.invokeQuery(agcDsoGen, ht); Integer allowChecked = null; if(agcDsoGen.gotoFirst()){ allowChecked = (Integer)agcDsoGen.getProperty("ALLOW_MISCELLANEOUS_ADJUSTMENT"); } if(allowChecked != null && (allowChecked.intValue() == 0 || allowChecked.intValue() == 10)) { fldInvDiscount.setEnabled(false); cbInvFlag.setEnabled(false); } }catch(ApplicationException e){ logger.error("ApplicationException in setMiscellaneousfields: ", e); }catch(AgoUnrecoverableSystemException e){ logger.error("AgoUnrecoverableSystemException in setMiscellaneousfields: ", e); }catch(AgoSecurityException e){ logger.error("AgoSecurityException in setMiscellaneousfields: ", e); }catch(AgoTransientSystemException e){ logger.error("AgoTransientSystemException in setMiscellaneousfields: ", e); } } private byte getPriorityPlusValue() { Object b = agcCustomer.getProperty(CUST.PRIORITY_PLUS); logger.debug("b = " + b); logger.debug("isGPCOwned() " + isGPCOwned()); byte val = 0; if (b != null) { val = ((Byte) b).byteValue(); } else { if (isGPCOwned()) val = 10; else val = 0; } return val; } private byte getDNSCustomerValue() { Object c = agcCustomer.getProperty(CUST.DNS_CUSTOMER); byte val = 0; if (c != null) { val = ((Byte) c).byteValue(); } else { if (isGPCOwned()) val = 10; else val = 0; } return val; } /** * Check and uncheck checkboxes and disable/enable them depending on their * value. 0 - The first checkbox is enabled and not checked. The "Lock" * checkbox is enabled and not checked. 1 - The first checkbox is enabled * and checked. The "Lock" checkbox is enabled and not checked. 10 - The * first checkbox is disabled and not checked. The "Lock" checkbox is * disabled and checked. 11 - The first checkbox is disabled and checked. * The "Lock" checkbox is disabled and checked. **/ private void setCheckBox() { logger.debug("setCheckBox()"); byte val = getPriorityPlusValue(); byte dnsCustomerVal = getDNSCustomerValue(); setPPLabel(val); // logger.info(" CUST.PRIORITY_PLUS val = " + val); int mode = FM.getMode(); if ((mode != FM.EDIT_MODE) && (mode != FM.EDIT_MODE_EDITING) && (mode != FM.EDIT_MODE_NOT_EDITING) && (mode != FM.NEW_MODE)) { ckPriorityPlus.setEnabled(false); ckPriorityPlusLock.setEnabled(false); ckDNSCustomer.setEnabled(false); ckDNSCustomerLock.setEnabled(false); } else { if ((val == 0) || (val == 1)) { ckPriorityPlus.setEnabled(true); ckPriorityPlusLock.setEnabled(true); } else { ckPriorityPlus.setEnabled(false); ckPriorityPlusLock.setEnabled(false); } if ((dnsCustomerVal == 0) || (dnsCustomerVal == 1)) { ckDNSCustomer.setEnabled(true); ckDNSCustomerLock.setEnabled(true); } else { ckDNSCustomer.setEnabled(false); ckDNSCustomerLock.setEnabled(false); } } if ((val == 1) || (val == 11)){ ckPriorityPlus.setSelected(true); } else{ ckPriorityPlus.setSelected(false); } if ((val == 10) || (val == 11)){ ckPriorityPlusLock.setSelected(true); } else{ ckPriorityPlusLock.setSelected(false); } if ((dnsCustomerVal == 1) || (dnsCustomerVal == 11)){ ckDNSCustomer.setSelected(true); } else{ ckDNSCustomer.setSelected(false); } if ((dnsCustomerVal == 10) || (dnsCustomerVal == 11)){ ckDNSCustomerLock.setSelected(true); } else{ ckDNSCustomerLock.setSelected(false); } } private void setPPLabel(byte val) { if ((val == 1) || (val == 11)) lblShowPriorityPlus.setVisible(true); else lblShowPriorityPlus.setVisible(false); } private void getProfile() { boolean useTaxRegistrationNumber = ApplicationContext .getInstance() .getProfile(Profile.BACKOFFICE_CLIENT, ClientApplicationContext.getClientApplicationContext().getLocation()) .getInvoicingProfile().getEnableCoreReturnLaw().booleanValue(); if (useTaxRegistrationNumber) { lblTaxNumber.setVisible(true); fldPrimaryTaxNumber.setVisible(true); fldSecondaryTaxNumber.setVisible(true); } else { lblTaxNumber.setVisible(false); fldPrimaryTaxNumber.setVisible(false); fldSecondaryTaxNumber.setVisible(false); } } /** * This method handles visiblility of 'IBS Account' component based on * store using IBS Portal. */ private void setIbsAccountLabel() { ClientApplicationContext cac = ClientApplicationContext.getClientApplicationContext(); StoreProfileVO storeProfile = cac.getProfile(Profile.BACKOFFICE_CLIENT, cac.getLocation()).getStoreProfile(); lblIbsAccount.setVisible(storeProfile.getIbsPortalInUse().booleanValue()); ckIbsAccount.setVisible(storeProfile.getIbsPortalInUse().booleanValue()); } private void setAllowOnlyCoreSalesLabel(){ lblAllowOnlyCoreSales.setVisible(true); ckAllowOnlyCoreSales.setVisible(true); } private void setElectronicInvoiceTypeLabel(){ logger.debug("setElectronicInvoiceTypeLabel => refElectronicInvoiceVendorId : " + refElectronicInvoiceVendorId); if(refElectronicInvoiceVendorId != null && refElectronicInvoiceVendorId.intValue() == 1 ){ lblUsoCFDI.setVisible(true); cbUsoCFDI.setVisible(true); lblCFDIName.setVisible(true); fldCFDIName.setVisible(true); lblCorporationType.setVisible(true); cbCorporationType.setVisible(true); lblAllowOnlyCoreSales.setVisible(true); ckAllowOnlyCoreSales.setVisible(true); }else{ lblCFDIName.setVisible(false); fldCFDIName.setVisible(false); lblCorporationType.setVisible(false); cbCorporationType.setVisible(false); lblAllowOnlyCoreSales.setVisible(false); ckAllowOnlyCoreSales.setVisible(false); lblUsoCFDI.setVisible(false); cbUsoCFDI.setVisible(false); } } }