// *** Generated Source File *** // Portions Copyright (c) 1996-2001, 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.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 javax.swing.table.*; import java.io.*; import com.sssw.rt.tview.*; import com.sssw.rt.jform.*; import com.sssw.rt.form.*; //Form Imports import java.lang.reflect.InvocationTargetException; import com.gpc.ejb.common.GpData; import com.gpc.frame.FwiFormEdit; import com.gpc.frame.FwiFormProcess; import com.gpc.backofficecommon.FwoSessionMgr; import com.gpc.backofficecommon.constants.schema.Sch_Tables; import com.gpc.backofficecommon.constants.schema.Sch_ARProfile; import com.gpc.backofficecommon.constants.schema.Sch_StoreProfile; import com.gpc.backofficecommon.constants.schema.Sch_CashJournal; import com.gpc.backofficecommon.constants.schema.Sch_CashJournalCheck; import com.gpc.backofficecommon.constants.schema.Sch_CashJournalMiscReceipt; import com.gpc.backofficecommon.constants.schema.Sch_CashJournalCurrencyDeposit; import com.gpc.backofficecommon.constants.schema.Sch_CashJournalOtherDeposit; import com.gpc.backofficecommon.constants.schema.Sch_CashJournalOverShort; import com.gpc.backofficecommon.constants.schema.Sch_CashJournalPaidOut; import com.gpc.backofficecommon.constants.schema.Sch_CashJournalEFTDeposit; import com.gpc.backofficecommon.util.SilverStreamExceptionHelper; import com.gpc.client.backoffice.FwoToolBarDirector; import com.gpc.client.backoffice.app.TamsFormMaster; import com.gpc.client.backoffice.app.TsiMainProcess; import com.gpc.client.backoffice.FwoFormMaster; import com.gpc.client.backoffice.table.TsoJTableMgr; import com.gpc.client.common.focusmanager.FocusDecider; import com.gpc.client.common.focusmanager.DefaultFocusDecider; import com.gpc.client.common.ClientApplicationContext; import com.gpc.client.common.table.cell.FwoDecimalNumberCell; import com.gpc.client.common.util.TAMSMouseListener; import com.gpc.client.backoffice.util.FwoUnsupportedObjectException; import com.gpc.client.backoffice.input.document.TsoValidatedAccountingDateDocument; import com.gpc.client.backoffice.input.verifier.TsoValidatedAccountDateVerifier; import com.gpc.client.backoffice.table.cell.TsoDateCell; import com.gpc.tams.dso.TsoGenericBandDescriptor; import com.gpc.common.Profile; import com.gpc.common.TsoConstant; import com.gpc.common.ApplicationContext; import com.gpc.common.ResourceBundleReader; import com.gpc.common.pattern.FwoPattern; import com.gpc.common.pattern.FwoNumberPattern; import com.gpc.common.pattern.NumberPatternFormatException; import com.gpc.common.exception.ApplicationException; import org.apache.log4j.Logger; /** * This class allows the user to review cash journal summary report information for previous accounting dates.The * accounting information displayed includes summary and detail amounts for cash sales,receipts on account, * miscellaneous receipts,drawer over/short amounts,paid-out amounts,returned checks, and credit card deposits. * @author Copyright © 2003 Genuine Parts Company * @author Genuine Parts Company */ public class FrmSA_CashReceivedJournal_Review extends AgfForm // generated by SilverStream: do not edit implements com.gpc.frame.rpt.FwiPrint, javax.swing.event.ChangeListener, com.gpc.frame.FwiFormProcess, com.gpc.frame.FwiFormEdit, com.gpc.frame.FwiFormClose, ActionListener { public com.sssw.rt.form.AgcData agcGenericAccDate; public com.sssw.rt.form.AgcData agcResetOldestFinalized; public com.sssw.rt.form.AgcData agcReturnedChecks; public com.sssw.rt.form.AgcData agcGeneric; public com.sssw.rt.form.AgcData agcCashJournal; public javax.swing.ButtonGroup DefaultJButtonGroup = new javax.swing.ButtonGroup(); public com.sssw.rt.jform.AgcJButton pbSearch; public com.sssw.rt.jform.AgcJTextField fldSearch; public com.sssw.rt.jform.AgcJLabel lblAcctingDate; public com.sssw.rt.jform.AgcJLabel lblHeader; public com.sssw.rt.jform.AgcJLabel lblAsteriskInfo; public com.sssw.rt.jform.AgcJTabbedPane tabCashJournal; public com.sssw.rt.jform.AgcJLabel lblTotalDepositsValue; public com.sssw.rt.jform.AgcJLabel lblCreditCardTotal; public com.sssw.rt.jform.AgcJLabel lblCurrencyTotal; public com.sssw.rt.jform.AgcJLabel lblBalance; public com.sssw.rt.jform.AgcJLabel lblCashInvoiceValue; public com.sssw.rt.jform.AgcJLabel lblCashInvoice; public com.sssw.rt.jform.AgcJLabel lblCashRefunds; public com.sssw.rt.jform.AgcJLabel lblCashRefundsValue; public com.sssw.rt.jform.AgcJLabel lblTotalCashSalesValue; public com.sssw.rt.jform.AgcJLabel lblTotalCashSales; public com.sssw.rt.form.AgcRectangle Rectangle12; public com.sssw.rt.jform.AgcJLabel lblTotalChargeValue; public com.sssw.rt.jform.AgcJLabel lblTotalCharge; public com.sssw.rt.form.AgcRectangle Rectangle11; public com.sssw.rt.jform.AgcJLabel lblTotalRecAccountValue; public com.sssw.rt.jform.AgcJLabel lblPymtDiscValue; public com.sssw.rt.jform.AgcJLabel lblTotalRecAccount; public com.sssw.rt.jform.AgcJLabel lblPymtDisc; public com.sssw.rt.jform.AgcJLabel lblTotalRetChecks; public com.sssw.rt.jform.AgcJLabel lblTotalRetChecksValue; public com.sssw.rt.form.AgcRectangle Rectangle10; public com.sssw.rt.jform.AgcJLabel lblTotalMiscRecValue; public com.sssw.rt.jform.AgcJLabel lblTotalMiscRec; public com.sssw.rt.jform.AgcJLabel lblTotalOS; public com.sssw.rt.jform.AgcJLabel lblTotalOSValue; public com.sssw.rt.jform.AgcJLabel lblTotalPaidOutsValue; public com.sssw.rt.jform.AgcJLabel lblTotalPaidOuts; public com.sssw.rt.form.AgcRectangle Rectangle9; public com.sssw.rt.jform.AgcJLabel lblTotalCashTrans; public com.sssw.rt.jform.AgcJLabel lblTotalCashTransValue; public com.sssw.rt.jform.AgcJTable tblDeposits; public javax.swing.JScrollPane tblDepositsScrollPane; public com.sssw.rt.jform.AgcJLabel lblBegInvoiceNum; public com.sssw.rt.jform.AgcJLabel lblBegInvoiceNumValue; public com.sssw.rt.jform.AgcJLabel lblEndInvoiceNumValue; public com.sssw.rt.jform.AgcJLabel lblEndInvoiceNum; public com.sssw.rt.jform.AgcJLabel lblInvoiceCount; public com.sssw.rt.jform.AgcJLabel lblInvoiceCountValue; public com.sssw.rt.jform.AgcJLabel lblTotals; public com.sssw.rt.form.AgcRectangle Rectangle7; public com.sssw.rt.jform.AgcJLabel lblTotalDeposits; public com.sssw.rt.form.AgcRectangle recInvoiceInfo; public com.sssw.rt.form.AgcRectangle Rectangle16; public com.sssw.rt.form.AgcRectangle Rectangle13; public com.sssw.rt.form.AgcRectangle Rectangle6; public com.sssw.rt.form.AgcRectangle recDepositInfo; public com.sssw.rt.form.AgcRectangle recTransInfo; public com.sssw.rt.form.AgcRectangle Rectangle18; public javax.swing.JPanel tabCashJournalPane0; public javax.swing.JPanel tabCashJournalPane1; public javax.swing.JPanel tabCashJournalPane2; public javax.swing.JPanel tabCashJournalPane3; public javax.swing.JPanel tabCashJournalPane4; public javax.swing.JPanel tabCashJournalPane5; private static final Logger logger = Logger.getLogger(FrmSA_CashReceivedJournal_Review.class); /** index of the current tab selected */ private int m_CurrentTabIndex; private TsoValidatedAccountingDateDocument m_accDateDoc; /** 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 MAIN = "MAIN"; private String m_SubFormNames[] = {MAIN, TsoConstant.FRM_SA_CASHREC_JOURNAL_MISC_RECEIPTS, TsoConstant.FRM_SA_CASHREC_JOURNAL_OVER_SHORT,TsoConstant.FRM_SA_CASHREC_JOURNAL_PAID_OUTS, TsoConstant.FRM_SA_CASHREC_JOURNAL_DEPOSIT, TsoConstant.FRM_SA_CASHREC_JOURNAL_RETURN_CHECKS}; //subform function ids /*private Integer m_functionIds[] = {TsoConstant.SA_CASH_RECEIVED_JOURNAL,TsoConstant.SA_CRJ_MISC_RECEIPTS, TsoConstant.SA_CRJ_OVER_SHORT, TsoConstant.SA_CRJ_PAID_OUTS, TsoConstant.SA_CRJ_DEPOSIT_SUMMARY, TsoConstant.SA_CRJ_RETURNED_CHECKS};*/ private int TAB_SUMMARY = 0; private int TAB_MISC_RECEIPTS = 1; private int TAB_OVER_SHORT = 2; private int TAB_PAID_OUTS = 3; private int TAB_DEPOSIT = 4; private int TAB_RETURNED_CHECKS = 5; /** caches the forms that get loaded so if the tab is selected more than once, the form is not reloaded */ private Hashtable m_SubForms = new Hashtable(); /** stores the current tab form so we can re-initialize it when necessary */ private AgfForm m_CurrentTabForm = this; private TamsFormMaster FM; private Sch_Tables T; private Sch_ARProfile ARP; private Sch_StoreProfile SP; private Sch_CashJournal CJ; private Sch_CashJournalCheck CJC; private Sch_CashJournalMiscReceipt CJMR; private Sch_CashJournalOverShort CJOS; private Sch_CashJournalPaidOut CJPO; private Sch_CashJournalCurrencyDeposit CJCD; private Sch_CashJournalOtherDeposit CJCCD; private Sch_CashJournalEFTDeposit CJEFT; private Integer m_CashJournalId; private BigDecimal m_Balance = new BigDecimal("0.00"); private BigDecimal m_TotalCash; private BigDecimal m_TotalDeposits; private BigDecimal m_CurrencyDepositTotal; private BigDecimal m_CreditCardTotal; private int m_NumberOfDeposits; private BigDecimal m_TotalTransactions; private Integer m_OldestUnfinalizedId; private GpData m_Data; private TsoJTableMgr m_TblMgr; private boolean m_DataFound = false; private String AMT_DEPOSITS = "AMT_DEPOSITS"; private String TRANSACTIONS = "TRANSACTIONS"; private String CASH_DEPOSIT = "CASH_DEPOSIT"; public FrmSA_CashReceivedJournal_Review() { //==== 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_FIRST_RECORD); this.setName("FrmSA_CashReceivedJournal_Review"); this.setBounds(10,10,1016,663); // Initialize agcGenericAccDate agcGenericAccDate = new com.sssw.rt.form.AgcData(); agcGenericAccDate.setName("agcGenericAccDate"); agcGenericAccDate.setBounds(805,700,66,58); agcGenericAccDate.setDataSource("com.gpc.tams.dso.dsoGeneric"); // Initialize agcResetOldestFinalized agcResetOldestFinalized = new com.sssw.rt.form.AgcData(); agcResetOldestFinalized.setName("agcResetOldestFinalized"); agcResetOldestFinalized.setBounds(695,685,71,58); agcResetOldestFinalized.setDataSource("com.gpc.tams.dso.dsoGeneric"); // Initialize agcReturnedChecks agcReturnedChecks = new com.sssw.rt.form.AgcData(); agcReturnedChecks.setName("agcReturnedChecks"); agcReturnedChecks.setBounds(542,705,66,58); agcReturnedChecks.setExpressionCount(4); agcReturnedChecks.setExpression(0, 0, "ID", 0); agcReturnedChecks.setExpression(1, 1, "LOC", 1); agcReturnedChecks.setExpression(2, 2, "CASH_JOURNAL_ID", 2); agcReturnedChecks.setExpression(3, 3, "CHECK_TYPE", 3); // Initialize agcGeneric agcGeneric = new com.sssw.rt.form.AgcData(); agcGeneric.setName("agcGeneric"); agcGeneric.setBounds(447,710,63,58); agcGeneric.setDataSource("com.gpc.tams.dso.dsoGeneric"); // Initialize agcCashJournal agcCashJournal = new com.sssw.rt.form.AgcData(); agcCashJournal.setName("agcCashJournal"); agcCashJournal.setBounds(357,700,72,58); agcCashJournal.setDataSource("com.gpc.tams.dso.dsoGeneric"); // Initialize pbSearch pbSearch = new com.sssw.rt.jform.AgcJButton(); pbSearch.setName("pbSearch"); pbSearch.setBounds(227,30,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 fldSearch fldSearch = new com.sssw.rt.jform.AgcJTextField(); fldSearch.setName("fldSearch"); fldSearch.setBounds(132,32,84,20); 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 lblAcctingDate lblAcctingDate = new com.sssw.rt.jform.AgcJLabel(); lblAcctingDate.setName("lblAcctingDate"); lblAcctingDate.setBounds(9,32,114,20); lblAcctingDate.setText("Accounting Date"); lblAcctingDate.setOpaque(false); lblAcctingDate.setTextStyle(0); lblAcctingDate.setForeground(Color.black); lblAcctingDate.setTextShadowColor(Color.darkGray); lblAcctingDate.setTextHighlightColor(Color.gray); lblAcctingDate.setBackground(Color.lightGray); lblAcctingDate.setHorizontalAlignment(SwingConstants.RIGHT); lblAcctingDate.setVerticalAlignment(SwingConstants.CENTER); lblAcctingDate.setHorizontalTextPosition(SwingConstants.RIGHT); lblAcctingDate.setVerticalTextPosition(SwingConstants.CENTER); lblAcctingDate.setWordWrap(false); lblAcctingDate.setFont(new Font("SansSerif", 1, 12)); // Initialize lblAsteriskInfo lblAsteriskInfo= new com.sssw.rt.jform.AgcJLabel(); lblAsteriskInfo.setName("lblAsteriskInfo"); lblAsteriskInfo.setBounds(300,5,270,27); lblAsteriskInfo.setText("Asterisk(*) has been restricted for Note"); lblAsteriskInfo.setVisible(false); lblAsteriskInfo.setOpaque(false); lblAsteriskInfo.setTextStyle(0); lblAsteriskInfo.setForeground(Color.red); lblAsteriskInfo.setTextShadowColor(Color.darkGray); lblAsteriskInfo.setTextHighlightColor(Color.gray); lblAsteriskInfo.setBackground(Color.lightGray); lblAsteriskInfo.setHorizontalAlignment(SwingConstants.CENTER); lblAsteriskInfo.setVerticalAlignment(SwingConstants.CENTER); lblAsteriskInfo.setHorizontalTextPosition(SwingConstants.RIGHT); lblAsteriskInfo.setVerticalTextPosition(SwingConstants.CENTER); lblAsteriskInfo.setWordWrap(false); lblAsteriskInfo.setFont(new Font("SansSerif", 1, 12)); // Initialize lblHeader lblHeader = new com.sssw.rt.jform.AgcJLabel(); lblHeader.setName("lblHeader"); lblHeader.setBounds(277,5,700,27); lblHeader.setText("Cash Received Journal"); lblHeader.setOpaque(false); lblHeader.setTextStyle(0); lblHeader.setForeground(AgoColorManager.getColor(24, 24, 231)); lblHeader.setTextShadowColor(Color.darkGray); lblHeader.setTextHighlightColor(Color.gray); lblHeader.setBackground(Color.lightGray); lblHeader.setHorizontalAlignment(SwingConstants.RIGHT); lblHeader.setVerticalAlignment(SwingConstants.CENTER); lblHeader.setHorizontalTextPosition(SwingConstants.RIGHT); lblHeader.setVerticalTextPosition(SwingConstants.CENTER); lblHeader.setWordWrap(false); lblHeader.setFont(new Font("SansSerif", 3, 24)); // Initialize tabCashJournal tabCashJournal = new com.sssw.rt.jform.AgcJTabbedPane(); // Initialize tab pane 0 tabCashJournalPane0 = new com.sssw.rt.form.PvBaseContainer(); tabCashJournalPane0.setLayout(null); tabCashJournalPane0.setBackground(Color.white); tabCashJournal.addTab("Summary", tabCashJournalPane0); // Initialize tab pane 1 tabCashJournalPane1 = new com.sssw.rt.form.PvBaseContainer(); tabCashJournalPane1.setLayout(null); tabCashJournalPane1.setBackground(Color.white); tabCashJournal.addTab("Miscellaneous Receipts", tabCashJournalPane1); // Initialize tab pane 2 tabCashJournalPane2 = new com.sssw.rt.form.PvBaseContainer(); tabCashJournalPane2.setLayout(null); tabCashJournalPane2.setBackground(Color.white); tabCashJournal.addTab("Over/Short", tabCashJournalPane2); // Initialize tab pane 3 tabCashJournalPane3 = new com.sssw.rt.form.PvBaseContainer(); tabCashJournalPane3.setLayout(null); tabCashJournalPane3.setBackground(Color.white); tabCashJournal.addTab("Paid-Outs", tabCashJournalPane3); // Initialize tab pane 4 tabCashJournalPane4 = new com.sssw.rt.form.PvBaseContainer(); tabCashJournalPane4.setLayout(null); tabCashJournalPane4.setBackground(Color.white); tabCashJournal.addTab("Deposit", tabCashJournalPane4); // Initialize tab pane 5 tabCashJournalPane5 = new com.sssw.rt.form.PvBaseContainer(); tabCashJournalPane5.setLayout(null); tabCashJournalPane5.setBackground(Color.white); tabCashJournal.addTab("Returned Checks", tabCashJournalPane5); tabCashJournal.setColors(Color.white, Color.black, Color.lightGray, Color.black, AgoColorManager.getColor(255, 204, 0)); tabCashJournal.setContentBorderInsets(new Insets(1, 1, 2, 2)); tabCashJournal.setFont(new Font("SansSerif", 1, 12)); tabCashJournal.setName("tabCashJournal"); tabCashJournal.setBounds(6,63,1010,600); // Initialize lblTotalDepositsValue lblTotalDepositsValue = new com.sssw.rt.jform.AgcJLabel(); lblTotalDepositsValue.setName("lblTotalDepositsValue"); lblTotalDepositsValue.setBounds(827,438,102,20); lblTotalDepositsValue.setText(""); lblTotalDepositsValue.setOpaque(false); lblTotalDepositsValue.setTextStyle(0); lblTotalDepositsValue.setForeground(Color.black); lblTotalDepositsValue.setTextShadowColor(Color.darkGray); lblTotalDepositsValue.setTextHighlightColor(Color.gray); lblTotalDepositsValue.setBackground(Color.lightGray); lblTotalDepositsValue.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalDepositsValue.setVerticalAlignment(SwingConstants.CENTER); lblTotalDepositsValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalDepositsValue.setVerticalTextPosition(SwingConstants.CENTER); lblTotalDepositsValue.setWordWrap(false); lblTotalDepositsValue.setFont(new Font("SansSerif", 0, 12)); // Initialize lblCreditCardTotal lblCreditCardTotal = new com.sssw.rt.jform.AgcJLabel(); lblCreditCardTotal.setName("lblCreditCardTotal"); lblCreditCardTotal.setBounds(739,403,88,20); lblCreditCardTotal.setText(""); lblCreditCardTotal.setOpaque(false); lblCreditCardTotal.setTextStyle(0); lblCreditCardTotal.setForeground(Color.black); lblCreditCardTotal.setTextShadowColor(Color.darkGray); lblCreditCardTotal.setTextHighlightColor(Color.gray); lblCreditCardTotal.setBackground(Color.lightGray); lblCreditCardTotal.setHorizontalAlignment(SwingConstants.RIGHT); lblCreditCardTotal.setVerticalAlignment(SwingConstants.CENTER); lblCreditCardTotal.setHorizontalTextPosition(SwingConstants.RIGHT); lblCreditCardTotal.setVerticalTextPosition(SwingConstants.CENTER); lblCreditCardTotal.setWordWrap(false); lblCreditCardTotal.setFont(new Font("SansSerif", 0, 12)); // Initialize lblCurrencyTotal lblCurrencyTotal = new com.sssw.rt.jform.AgcJLabel(); lblCurrencyTotal.setName("lblCurrencyTotal"); lblCurrencyTotal.setBounds(622,403,85,20); lblCurrencyTotal.setText(""); lblCurrencyTotal.setOpaque(false); lblCurrencyTotal.setTextStyle(0); lblCurrencyTotal.setForeground(Color.black); lblCurrencyTotal.setTextShadowColor(Color.darkGray); lblCurrencyTotal.setTextHighlightColor(Color.gray); lblCurrencyTotal.setBackground(Color.lightGray); lblCurrencyTotal.setHorizontalAlignment(SwingConstants.RIGHT); lblCurrencyTotal.setVerticalAlignment(SwingConstants.CENTER); lblCurrencyTotal.setHorizontalTextPosition(SwingConstants.RIGHT); lblCurrencyTotal.setVerticalTextPosition(SwingConstants.CENTER); lblCurrencyTotal.setWordWrap(false); lblCurrencyTotal.setFont(new Font("SansSerif", 0, 12)); // Initialize lblBalance lblBalance = new com.sssw.rt.jform.AgcJLabel(); lblBalance.setName("lblBalance"); lblBalance.setBounds(380,536,249,20); lblBalance.setText(""); lblBalance.setOpaque(false); lblBalance.setTextStyle(0); lblBalance.setForeground(AgoColorManager.getColor(204, 0, 0)); lblBalance.setTextShadowColor(Color.darkGray); lblBalance.setTextHighlightColor(Color.gray); lblBalance.setBackground(Color.lightGray); lblBalance.setHorizontalAlignment(SwingConstants.CENTER); lblBalance.setVerticalAlignment(SwingConstants.CENTER); lblBalance.setHorizontalTextPosition(SwingConstants.RIGHT); lblBalance.setVerticalTextPosition(SwingConstants.CENTER); lblBalance.setWordWrap(false); lblBalance.setFont(new Font("SansSerif", 1, 12)); // Initialize lblCashInvoiceValue lblCashInvoiceValue = new com.sssw.rt.jform.AgcJLabel(); lblCashInvoiceValue.setName("lblCashInvoiceValue"); lblCashInvoiceValue.setBounds(261,140,65,20); lblCashInvoiceValue.setText(""); lblCashInvoiceValue.setOpaque(false); lblCashInvoiceValue.setTextStyle(0); lblCashInvoiceValue.setForeground(Color.black); lblCashInvoiceValue.setTextShadowColor(Color.darkGray); lblCashInvoiceValue.setTextHighlightColor(Color.gray); lblCashInvoiceValue.setBackground(Color.lightGray); lblCashInvoiceValue.setHorizontalAlignment(SwingConstants.RIGHT); lblCashInvoiceValue.setVerticalAlignment(SwingConstants.CENTER); lblCashInvoiceValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblCashInvoiceValue.setVerticalTextPosition(SwingConstants.CENTER); lblCashInvoiceValue.setWordWrap(false); lblCashInvoiceValue.setFont(new Font("SansSerif", 0, 12)); // Initialize lblCashInvoice lblCashInvoice = new com.sssw.rt.jform.AgcJLabel(); lblCashInvoice.setName("lblCashInvoice"); lblCashInvoice.setBounds(38,140,209,20); lblCashInvoice.setText("Cash Invoices"); lblCashInvoice.setOpaque(false); lblCashInvoice.setTextStyle(0); lblCashInvoice.setForeground(Color.black); lblCashInvoice.setTextShadowColor(Color.darkGray); lblCashInvoice.setTextHighlightColor(Color.gray); lblCashInvoice.setBackground(Color.lightGray); lblCashInvoice.setHorizontalAlignment(SwingConstants.RIGHT); lblCashInvoice.setVerticalAlignment(SwingConstants.CENTER); lblCashInvoice.setHorizontalTextPosition(SwingConstants.RIGHT); lblCashInvoice.setVerticalTextPosition(SwingConstants.CENTER); lblCashInvoice.setWordWrap(false); lblCashInvoice.setFont(new Font("SansSerif", 1, 12)); // Initialize lblCashRefunds lblCashRefunds = new com.sssw.rt.jform.AgcJLabel(); lblCashRefunds.setName("lblCashRefunds"); lblCashRefunds.setBounds(39,163,210,20); lblCashRefunds.setText("Less Cash Refunds"); lblCashRefunds.setOpaque(false); lblCashRefunds.setTextStyle(0); lblCashRefunds.setForeground(Color.black); lblCashRefunds.setTextShadowColor(Color.darkGray); lblCashRefunds.setTextHighlightColor(Color.gray); lblCashRefunds.setBackground(Color.lightGray); lblCashRefunds.setHorizontalAlignment(SwingConstants.RIGHT); lblCashRefunds.setVerticalAlignment(SwingConstants.CENTER); lblCashRefunds.setHorizontalTextPosition(SwingConstants.RIGHT); lblCashRefunds.setVerticalTextPosition(SwingConstants.CENTER); lblCashRefunds.setWordWrap(false); lblCashRefunds.setFont(new Font("SansSerif", 1, 12)); // Initialize lblCashRefundsValue lblCashRefundsValue = new com.sssw.rt.jform.AgcJLabel(); lblCashRefundsValue.setName("lblCashRefundsValue"); lblCashRefundsValue.setBounds(261,163,65,20); lblCashRefundsValue.setText(""); lblCashRefundsValue.setOpaque(false); lblCashRefundsValue.setTextStyle(0); lblCashRefundsValue.setForeground(Color.black); lblCashRefundsValue.setTextShadowColor(Color.darkGray); lblCashRefundsValue.setTextHighlightColor(Color.gray); lblCashRefundsValue.setBackground(Color.lightGray); lblCashRefundsValue.setHorizontalAlignment(SwingConstants.RIGHT); lblCashRefundsValue.setVerticalAlignment(SwingConstants.CENTER); lblCashRefundsValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblCashRefundsValue.setVerticalTextPosition(SwingConstants.CENTER); lblCashRefundsValue.setWordWrap(false); lblCashRefundsValue.setFont(new Font("SansSerif", 0, 12)); // Initialize lblTotalCashSalesValue lblTotalCashSalesValue = new com.sssw.rt.jform.AgcJLabel(); lblTotalCashSalesValue.setName("lblTotalCashSalesValue"); lblTotalCashSalesValue.setBounds(331,191,61,20); lblTotalCashSalesValue.setText(""); lblTotalCashSalesValue.setOpaque(false); lblTotalCashSalesValue.setTextStyle(0); lblTotalCashSalesValue.setForeground(Color.black); lblTotalCashSalesValue.setTextShadowColor(Color.darkGray); lblTotalCashSalesValue.setTextHighlightColor(Color.gray); lblTotalCashSalesValue.setBackground(Color.lightGray); lblTotalCashSalesValue.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalCashSalesValue.setVerticalAlignment(SwingConstants.CENTER); lblTotalCashSalesValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalCashSalesValue.setVerticalTextPosition(SwingConstants.CENTER); lblTotalCashSalesValue.setWordWrap(false); lblTotalCashSalesValue.setFont(new Font("SansSerif", 0, 12)); // Initialize lblTotalCashSales lblTotalCashSales = new com.sssw.rt.jform.AgcJLabel(); lblTotalCashSales.setName("lblTotalCashSales"); lblTotalCashSales.setBounds(42,191,207,20); lblTotalCashSales.setText("Total Cash Sales"); lblTotalCashSales.setOpaque(false); lblTotalCashSales.setTextStyle(0); lblTotalCashSales.setForeground(Color.black); lblTotalCashSales.setTextShadowColor(Color.darkGray); lblTotalCashSales.setTextHighlightColor(Color.gray); lblTotalCashSales.setBackground(Color.lightGray); lblTotalCashSales.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalCashSales.setVerticalAlignment(SwingConstants.CENTER); lblTotalCashSales.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalCashSales.setVerticalTextPosition(SwingConstants.CENTER); lblTotalCashSales.setWordWrap(false); lblTotalCashSales.setFont(new Font("SansSerif", 1, 12)); // Initialize Rectangle12 Rectangle12 = new com.sssw.rt.form.AgcRectangle(); Rectangle12.setName("Rectangle12"); Rectangle12.setBounds(259,217,150,5); Rectangle12.setColor(AgoColorManager.getColor(210, 210, 210)); Rectangle12.setBorderStyle(4); Rectangle12.setText(""); Rectangle12.setFont(new Font("SansSerif", 0, 12)); Rectangle12.setForeground(Color.black); Rectangle12.setTransparent(true); // Initialize lblTotalChargeValue lblTotalChargeValue = new com.sssw.rt.jform.AgcJLabel(); lblTotalChargeValue.setName("lblTotalChargeValue"); lblTotalChargeValue.setBounds(261,235,65,20); lblTotalChargeValue.setText(""); lblTotalChargeValue.setOpaque(false); lblTotalChargeValue.setTextStyle(0); lblTotalChargeValue.setForeground(Color.black); lblTotalChargeValue.setTextShadowColor(Color.darkGray); lblTotalChargeValue.setTextHighlightColor(Color.gray); lblTotalChargeValue.setBackground(Color.lightGray); lblTotalChargeValue.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalChargeValue.setVerticalAlignment(SwingConstants.CENTER); lblTotalChargeValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalChargeValue.setVerticalTextPosition(SwingConstants.CENTER); lblTotalChargeValue.setWordWrap(false); lblTotalChargeValue.setFont(new Font("SansSerif", 0, 12)); // Initialize lblTotalCharge lblTotalCharge = new com.sssw.rt.jform.AgcJLabel(); lblTotalCharge.setName("lblTotalCharge"); lblTotalCharge.setBounds(19,235,228,20); lblTotalCharge.setText("Total Charge Invoices/Credits"); lblTotalCharge.setOpaque(false); lblTotalCharge.setTextStyle(0); lblTotalCharge.setForeground(Color.black); lblTotalCharge.setTextShadowColor(Color.darkGray); lblTotalCharge.setTextHighlightColor(Color.gray); lblTotalCharge.setBackground(Color.lightGray); lblTotalCharge.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalCharge.setVerticalAlignment(SwingConstants.CENTER); lblTotalCharge.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalCharge.setVerticalTextPosition(SwingConstants.CENTER); lblTotalCharge.setWordWrap(false); lblTotalCharge.setFont(new Font("SansSerif", 1, 12)); // Initialize Rectangle11 Rectangle11 = new com.sssw.rt.form.AgcRectangle(); Rectangle11.setName("Rectangle11"); Rectangle11.setBounds(259,267,150,5); Rectangle11.setColor(AgoColorManager.getColor(210, 210, 210)); Rectangle11.setBorderStyle(4); Rectangle11.setText(""); Rectangle11.setFont(new Font("SansSerif", 0, 12)); Rectangle11.setForeground(Color.black); Rectangle11.setTransparent(true); // Initialize lblTotalRecAccountValue lblTotalRecAccountValue = new com.sssw.rt.jform.AgcJLabel(); lblTotalRecAccountValue.setName("lblTotalRecAccountValue"); lblTotalRecAccountValue.setBounds(331,283,61,20); lblTotalRecAccountValue.setText(""); lblTotalRecAccountValue.setOpaque(false); lblTotalRecAccountValue.setTextStyle(0); lblTotalRecAccountValue.setForeground(Color.black); lblTotalRecAccountValue.setTextShadowColor(Color.darkGray); lblTotalRecAccountValue.setTextHighlightColor(Color.gray); lblTotalRecAccountValue.setBackground(Color.lightGray); lblTotalRecAccountValue.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalRecAccountValue.setVerticalAlignment(SwingConstants.CENTER); lblTotalRecAccountValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalRecAccountValue.setVerticalTextPosition(SwingConstants.CENTER); lblTotalRecAccountValue.setWordWrap(false); lblTotalRecAccountValue.setFont(new Font("SansSerif", 0, 12)); // Initialize lblPymtDiscValue lblPymtDiscValue = new com.sssw.rt.jform.AgcJLabel(); lblPymtDiscValue.setName("lblPymtDiscValue"); lblPymtDiscValue.setBounds(261,307,65,20); lblPymtDiscValue.setText(""); lblPymtDiscValue.setOpaque(false); lblPymtDiscValue.setTextStyle(0); lblPymtDiscValue.setForeground(Color.black); lblPymtDiscValue.setTextShadowColor(Color.darkGray); lblPymtDiscValue.setTextHighlightColor(Color.gray); lblPymtDiscValue.setBackground(Color.lightGray); lblPymtDiscValue.setHorizontalAlignment(SwingConstants.RIGHT); lblPymtDiscValue.setVerticalAlignment(SwingConstants.CENTER); lblPymtDiscValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblPymtDiscValue.setVerticalTextPosition(SwingConstants.CENTER); lblPymtDiscValue.setWordWrap(false); lblPymtDiscValue.setFont(new Font("SansSerif", 0, 12)); // Initialize lblTotalRecAccount lblTotalRecAccount = new com.sssw.rt.jform.AgcJLabel(); lblTotalRecAccount.setName("lblTotalRecAccount"); lblTotalRecAccount.setBounds(18,283,231,20); lblTotalRecAccount.setText("Total Received on Account"); lblTotalRecAccount.setOpaque(false); lblTotalRecAccount.setTextStyle(0); lblTotalRecAccount.setForeground(Color.black); lblTotalRecAccount.setTextShadowColor(Color.darkGray); lblTotalRecAccount.setTextHighlightColor(Color.gray); lblTotalRecAccount.setBackground(Color.lightGray); lblTotalRecAccount.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalRecAccount.setVerticalAlignment(SwingConstants.CENTER); lblTotalRecAccount.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalRecAccount.setVerticalTextPosition(SwingConstants.CENTER); lblTotalRecAccount.setWordWrap(false); lblTotalRecAccount.setFont(new Font("SansSerif", 1, 12)); // Initialize lblPymtDisc lblPymtDisc = new com.sssw.rt.jform.AgcJLabel(); lblPymtDisc.setName("lblPymtDisc"); lblPymtDisc.setBounds(18,307,231,20); lblPymtDisc.setText("Payment Discounts"); lblPymtDisc.setOpaque(false); lblPymtDisc.setTextStyle(0); lblPymtDisc.setForeground(Color.black); lblPymtDisc.setTextShadowColor(Color.darkGray); lblPymtDisc.setTextHighlightColor(Color.gray); lblPymtDisc.setBackground(Color.lightGray); lblPymtDisc.setHorizontalAlignment(SwingConstants.RIGHT); lblPymtDisc.setVerticalAlignment(SwingConstants.CENTER); lblPymtDisc.setHorizontalTextPosition(SwingConstants.RIGHT); lblPymtDisc.setVerticalTextPosition(SwingConstants.CENTER); lblPymtDisc.setWordWrap(false); lblPymtDisc.setFont(new Font("SansSerif", 1, 12)); // Initialize lblTotalRetChecks lblTotalRetChecks = new com.sssw.rt.jform.AgcJLabel(); lblTotalRetChecks.setName("lblTotalRetChecks"); lblTotalRetChecks.setBounds(19,330,230,20); lblTotalRetChecks.setText("Total Returned Checks"); lblTotalRetChecks.setOpaque(false); lblTotalRetChecks.setTextStyle(0); lblTotalRetChecks.setForeground(Color.black); lblTotalRetChecks.setTextShadowColor(Color.darkGray); lblTotalRetChecks.setTextHighlightColor(Color.gray); lblTotalRetChecks.setBackground(Color.lightGray); lblTotalRetChecks.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalRetChecks.setVerticalAlignment(SwingConstants.CENTER); lblTotalRetChecks.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalRetChecks.setVerticalTextPosition(SwingConstants.CENTER); lblTotalRetChecks.setWordWrap(false); lblTotalRetChecks.setFont(new Font("SansSerif", 1, 12)); // Initialize lblTotalRetChecksValue lblTotalRetChecksValue = new com.sssw.rt.jform.AgcJLabel(); lblTotalRetChecksValue.setName("lblTotalRetChecksValue"); lblTotalRetChecksValue.setBounds(261,330,65,20); lblTotalRetChecksValue.setText(""); lblTotalRetChecksValue.setOpaque(false); lblTotalRetChecksValue.setTextStyle(0); lblTotalRetChecksValue.setForeground(Color.black); lblTotalRetChecksValue.setTextShadowColor(Color.darkGray); lblTotalRetChecksValue.setTextHighlightColor(Color.gray); lblTotalRetChecksValue.setBackground(Color.lightGray); lblTotalRetChecksValue.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalRetChecksValue.setVerticalAlignment(SwingConstants.CENTER); lblTotalRetChecksValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalRetChecksValue.setVerticalTextPosition(SwingConstants.CENTER); lblTotalRetChecksValue.setWordWrap(false); lblTotalRetChecksValue.setFont(new Font("SansSerif", 0, 12)); // Initialize Rectangle10 Rectangle10 = new com.sssw.rt.form.AgcRectangle(); Rectangle10.setName("Rectangle10"); Rectangle10.setBounds(259,358,150,5); Rectangle10.setColor(AgoColorManager.getColor(210, 210, 210)); Rectangle10.setBorderStyle(4); Rectangle10.setText(""); Rectangle10.setFont(new Font("SansSerif", 0, 12)); Rectangle10.setForeground(Color.black); Rectangle10.setTransparent(true); // Initialize lblTotalMiscRecValue lblTotalMiscRecValue = new com.sssw.rt.jform.AgcJLabel(); lblTotalMiscRecValue.setName("lblTotalMiscRecValue"); lblTotalMiscRecValue.setBounds(331,378,61,20); lblTotalMiscRecValue.setText(""); lblTotalMiscRecValue.setOpaque(false); lblTotalMiscRecValue.setTextStyle(0); lblTotalMiscRecValue.setForeground(Color.black); lblTotalMiscRecValue.setTextShadowColor(Color.darkGray); lblTotalMiscRecValue.setTextHighlightColor(Color.gray); lblTotalMiscRecValue.setBackground(Color.lightGray); lblTotalMiscRecValue.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalMiscRecValue.setVerticalAlignment(SwingConstants.CENTER); lblTotalMiscRecValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalMiscRecValue.setVerticalTextPosition(SwingConstants.CENTER); lblTotalMiscRecValue.setWordWrap(false); lblTotalMiscRecValue.setFont(new Font("SansSerif", 0, 12)); // Initialize lblTotalMiscRec lblTotalMiscRec = new com.sssw.rt.jform.AgcJLabel(); lblTotalMiscRec.setName("lblTotalMiscRec"); lblTotalMiscRec.setBounds(18,378,231,20); lblTotalMiscRec.setText("Total Miscellaneous Receipts"); lblTotalMiscRec.setOpaque(false); lblTotalMiscRec.setTextStyle(0); lblTotalMiscRec.setForeground(Color.black); lblTotalMiscRec.setTextShadowColor(Color.darkGray); lblTotalMiscRec.setTextHighlightColor(Color.gray); lblTotalMiscRec.setBackground(Color.lightGray); lblTotalMiscRec.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalMiscRec.setVerticalAlignment(SwingConstants.CENTER); lblTotalMiscRec.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalMiscRec.setVerticalTextPosition(SwingConstants.CENTER); lblTotalMiscRec.setWordWrap(false); lblTotalMiscRec.setFont(new Font("SansSerif", 1, 12)); // Initialize lblTotalOS lblTotalOS = new com.sssw.rt.jform.AgcJLabel(); lblTotalOS.setName("lblTotalOS"); lblTotalOS.setBounds(17,405,232,20); lblTotalOS.setText("Total Over/Short Cash Drawers (+/-)"); lblTotalOS.setOpaque(false); lblTotalOS.setTextStyle(0); lblTotalOS.setForeground(Color.black); lblTotalOS.setTextShadowColor(Color.darkGray); lblTotalOS.setTextHighlightColor(Color.gray); lblTotalOS.setBackground(Color.lightGray); lblTotalOS.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalOS.setVerticalAlignment(SwingConstants.CENTER); lblTotalOS.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalOS.setVerticalTextPosition(SwingConstants.CENTER); lblTotalOS.setWordWrap(false); lblTotalOS.setFont(new Font("SansSerif", 1, 12)); // Initialize lblTotalOSValue lblTotalOSValue = new com.sssw.rt.jform.AgcJLabel(); lblTotalOSValue.setName("lblTotalOSValue"); lblTotalOSValue.setBounds(331,405,61,20); lblTotalOSValue.setText(""); lblTotalOSValue.setOpaque(false); lblTotalOSValue.setTextStyle(0); lblTotalOSValue.setForeground(Color.black); lblTotalOSValue.setTextShadowColor(Color.darkGray); lblTotalOSValue.setTextHighlightColor(Color.gray); lblTotalOSValue.setBackground(Color.lightGray); lblTotalOSValue.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalOSValue.setVerticalAlignment(SwingConstants.CENTER); lblTotalOSValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalOSValue.setVerticalTextPosition(SwingConstants.CENTER); lblTotalOSValue.setWordWrap(false); lblTotalOSValue.setFont(new Font("SansSerif", 0, 12)); // Initialize lblTotalPaidOutsValue lblTotalPaidOutsValue = new com.sssw.rt.jform.AgcJLabel(); lblTotalPaidOutsValue.setName("lblTotalPaidOutsValue"); lblTotalPaidOutsValue.setBounds(331,431,61,20); lblTotalPaidOutsValue.setText(""); lblTotalPaidOutsValue.setOpaque(false); lblTotalPaidOutsValue.setTextStyle(0); lblTotalPaidOutsValue.setForeground(Color.black); lblTotalPaidOutsValue.setTextShadowColor(Color.darkGray); lblTotalPaidOutsValue.setTextHighlightColor(Color.gray); lblTotalPaidOutsValue.setBackground(Color.lightGray); lblTotalPaidOutsValue.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalPaidOutsValue.setVerticalAlignment(SwingConstants.CENTER); lblTotalPaidOutsValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalPaidOutsValue.setVerticalTextPosition(SwingConstants.CENTER); lblTotalPaidOutsValue.setWordWrap(false); lblTotalPaidOutsValue.setFont(new Font("SansSerif", 0, 12)); // Initialize lblTotalPaidOuts lblTotalPaidOuts = new com.sssw.rt.jform.AgcJLabel(); lblTotalPaidOuts.setName("lblTotalPaidOuts"); lblTotalPaidOuts.setBounds(105,431,144,20); lblTotalPaidOuts.setText("Total Paid-Outs"); lblTotalPaidOuts.setOpaque(false); lblTotalPaidOuts.setTextStyle(0); lblTotalPaidOuts.setForeground(Color.black); lblTotalPaidOuts.setTextShadowColor(Color.darkGray); lblTotalPaidOuts.setTextHighlightColor(Color.gray); lblTotalPaidOuts.setBackground(Color.lightGray); lblTotalPaidOuts.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalPaidOuts.setVerticalAlignment(SwingConstants.CENTER); lblTotalPaidOuts.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalPaidOuts.setVerticalTextPosition(SwingConstants.CENTER); lblTotalPaidOuts.setWordWrap(false); lblTotalPaidOuts.setFont(new Font("SansSerif", 1, 12)); // Initialize Rectangle9 Rectangle9 = new com.sssw.rt.form.AgcRectangle(); Rectangle9.setName("Rectangle9"); Rectangle9.setBounds(259,479,150,5); Rectangle9.setColor(AgoColorManager.getColor(210, 210, 210)); Rectangle9.setBorderStyle(4); Rectangle9.setText(""); Rectangle9.setFont(new Font("SansSerif", 0, 12)); Rectangle9.setForeground(Color.black); Rectangle9.setTransparent(true); // Initialize lblTotalCashTrans lblTotalCashTrans = new com.sssw.rt.jform.AgcJLabel(); lblTotalCashTrans.setName("lblTotalCashTrans"); lblTotalCashTrans.setBounds(30,490,218,20); lblTotalCashTrans.setText("Total of all Cash Transactions"); lblTotalCashTrans.setOpaque(false); lblTotalCashTrans.setTextStyle(0); lblTotalCashTrans.setForeground(Color.black); lblTotalCashTrans.setTextShadowColor(Color.darkGray); lblTotalCashTrans.setTextHighlightColor(Color.gray); lblTotalCashTrans.setBackground(Color.lightGray); lblTotalCashTrans.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalCashTrans.setVerticalAlignment(SwingConstants.CENTER); lblTotalCashTrans.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalCashTrans.setVerticalTextPosition(SwingConstants.CENTER); lblTotalCashTrans.setWordWrap(false); lblTotalCashTrans.setFont(new Font("SansSerif", 1, 12)); // Initialize lblTotalCashTransValue lblTotalCashTransValue = new com.sssw.rt.jform.AgcJLabel(); lblTotalCashTransValue.setName("lblTotalCashTransValue"); lblTotalCashTransValue.setBounds(313,489,79,20); lblTotalCashTransValue.setText(""); lblTotalCashTransValue.setOpaque(false); lblTotalCashTransValue.setTextStyle(0); lblTotalCashTransValue.setForeground(Color.black); lblTotalCashTransValue.setTextShadowColor(Color.darkGray); lblTotalCashTransValue.setTextHighlightColor(Color.gray); lblTotalCashTransValue.setBackground(Color.lightGray); lblTotalCashTransValue.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalCashTransValue.setVerticalAlignment(SwingConstants.CENTER); lblTotalCashTransValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalCashTransValue.setVerticalTextPosition(SwingConstants.CENTER); lblTotalCashTransValue.setWordWrap(false); lblTotalCashTransValue.setFont(new Font("SansSerif", 0, 12)); // Initialize tblDeposits tblDeposits = new com.sssw.rt.jform.AgcJTable(); tblDeposits.setName("tblDeposits"); tblDepositsScrollPane = new JScrollPane(tblDeposits); tblDepositsScrollPane.setBounds(495,60,435,286); tblDeposits.setEditable(true); tblDeposits.setCellSelectionEnabled(true); tblDeposits.setShowGrid(true); tblDeposits.setGridColor(Color.gray); tblDeposits.setForeground(Color.black); tblDeposits.setBackground(Color.white); tblDeposits.setSelectionForeground(Color.white); tblDeposits.setSelectionBackground(AgoColorManager.getColor(0, 0, 128)); tblDeposits.setRowHeight(16); tblDeposits.setRowMargin(1); tblDeposits.getColumnModel().setColumnMargin(1); tblDeposits.setFont(new Font("SansSerif", 0, 12)); // Initialize lblBegInvoiceNum lblBegInvoiceNum = new com.sssw.rt.jform.AgcJLabel(); lblBegInvoiceNum.setName("lblBegInvoiceNum"); lblBegInvoiceNum.setBounds(28,24,210,20); lblBegInvoiceNum.setText("Beginning Invoice Number"); lblBegInvoiceNum.setOpaque(false); lblBegInvoiceNum.setTextStyle(0); lblBegInvoiceNum.setForeground(Color.black); lblBegInvoiceNum.setTextShadowColor(Color.darkGray); lblBegInvoiceNum.setTextHighlightColor(Color.gray); lblBegInvoiceNum.setBackground(Color.lightGray); lblBegInvoiceNum.setHorizontalAlignment(SwingConstants.RIGHT); lblBegInvoiceNum.setVerticalAlignment(SwingConstants.CENTER); lblBegInvoiceNum.setHorizontalTextPosition(SwingConstants.RIGHT); lblBegInvoiceNum.setVerticalTextPosition(SwingConstants.CENTER); lblBegInvoiceNum.setWordWrap(false); lblBegInvoiceNum.setFont(new Font("SansSerif", 1, 12)); // Initialize lblBegInvoiceNumValue lblBegInvoiceNumValue = new com.sssw.rt.jform.AgcJLabel(); lblBegInvoiceNumValue.setName("lblBegInvoiceNumValue"); lblBegInvoiceNumValue.setBounds(250,24,65,20); lblBegInvoiceNumValue.setText(""); lblBegInvoiceNumValue.setOpaque(false); lblBegInvoiceNumValue.setTextStyle(0); lblBegInvoiceNumValue.setForeground(Color.black); lblBegInvoiceNumValue.setTextShadowColor(Color.darkGray); lblBegInvoiceNumValue.setTextHighlightColor(Color.gray); lblBegInvoiceNumValue.setBackground(Color.lightGray); lblBegInvoiceNumValue.setHorizontalAlignment(SwingConstants.RIGHT); lblBegInvoiceNumValue.setVerticalAlignment(SwingConstants.CENTER); lblBegInvoiceNumValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblBegInvoiceNumValue.setVerticalTextPosition(SwingConstants.CENTER); lblBegInvoiceNumValue.setWordWrap(false); lblBegInvoiceNumValue.setFont(new Font("SansSerif", 0, 12)); // Initialize lblEndInvoiceNumValue lblEndInvoiceNumValue = new com.sssw.rt.jform.AgcJLabel(); lblEndInvoiceNumValue.setName("lblEndInvoiceNumValue"); lblEndInvoiceNumValue.setBounds(250,48,65,20); lblEndInvoiceNumValue.setText(""); lblEndInvoiceNumValue.setOpaque(false); lblEndInvoiceNumValue.setTextStyle(0); lblEndInvoiceNumValue.setForeground(Color.black); lblEndInvoiceNumValue.setTextShadowColor(Color.darkGray); lblEndInvoiceNumValue.setTextHighlightColor(Color.gray); lblEndInvoiceNumValue.setBackground(Color.lightGray); lblEndInvoiceNumValue.setHorizontalAlignment(SwingConstants.RIGHT); lblEndInvoiceNumValue.setVerticalAlignment(SwingConstants.CENTER); lblEndInvoiceNumValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblEndInvoiceNumValue.setVerticalTextPosition(SwingConstants.CENTER); lblEndInvoiceNumValue.setWordWrap(false); lblEndInvoiceNumValue.setFont(new Font("SansSerif", 0, 12)); // Initialize lblEndInvoiceNum lblEndInvoiceNum = new com.sssw.rt.jform.AgcJLabel(); lblEndInvoiceNum.setName("lblEndInvoiceNum"); lblEndInvoiceNum.setBounds(47,48,191,20); lblEndInvoiceNum.setText("Ending Invoice Number"); lblEndInvoiceNum.setOpaque(false); lblEndInvoiceNum.setTextStyle(0); lblEndInvoiceNum.setForeground(Color.black); lblEndInvoiceNum.setTextShadowColor(Color.darkGray); lblEndInvoiceNum.setTextHighlightColor(Color.gray); lblEndInvoiceNum.setBackground(Color.lightGray); lblEndInvoiceNum.setHorizontalAlignment(SwingConstants.RIGHT); lblEndInvoiceNum.setVerticalAlignment(SwingConstants.CENTER); lblEndInvoiceNum.setHorizontalTextPosition(SwingConstants.RIGHT); lblEndInvoiceNum.setVerticalTextPosition(SwingConstants.CENTER); lblEndInvoiceNum.setWordWrap(false); lblEndInvoiceNum.setFont(new Font("SansSerif", 1, 12)); // Initialize lblInvoiceCount lblInvoiceCount = new com.sssw.rt.jform.AgcJLabel(); lblInvoiceCount.setName("lblInvoiceCount"); lblInvoiceCount.setBounds(68,74,170,20); lblInvoiceCount.setText("Total Invoices Submitted"); lblInvoiceCount.setOpaque(false); lblInvoiceCount.setTextStyle(0); lblInvoiceCount.setForeground(Color.black); lblInvoiceCount.setTextShadowColor(Color.darkGray); lblInvoiceCount.setTextHighlightColor(Color.gray); lblInvoiceCount.setBackground(Color.lightGray); lblInvoiceCount.setHorizontalAlignment(SwingConstants.RIGHT); lblInvoiceCount.setVerticalAlignment(SwingConstants.CENTER); lblInvoiceCount.setHorizontalTextPosition(SwingConstants.RIGHT); lblInvoiceCount.setVerticalTextPosition(SwingConstants.CENTER); lblInvoiceCount.setWordWrap(false); lblInvoiceCount.setFont(new Font("SansSerif", 1, 12)); // Initialize lblInvoiceCountValue lblInvoiceCountValue = new com.sssw.rt.jform.AgcJLabel(); lblInvoiceCountValue.setName("lblInvoiceCountValue"); lblInvoiceCountValue.setBounds(250,74,65,20); lblInvoiceCountValue.setText(""); lblInvoiceCountValue.setOpaque(false); lblInvoiceCountValue.setTextStyle(0); lblInvoiceCountValue.setForeground(Color.black); lblInvoiceCountValue.setTextShadowColor(Color.darkGray); lblInvoiceCountValue.setTextHighlightColor(Color.gray); lblInvoiceCountValue.setBackground(Color.lightGray); lblInvoiceCountValue.setHorizontalAlignment(SwingConstants.RIGHT); lblInvoiceCountValue.setVerticalAlignment(SwingConstants.CENTER); lblInvoiceCountValue.setHorizontalTextPosition(SwingConstants.RIGHT); lblInvoiceCountValue.setVerticalTextPosition(SwingConstants.CENTER); lblInvoiceCountValue.setWordWrap(false); lblInvoiceCountValue.setFont(new Font("SansSerif", 0, 12)); // Initialize lblTotals lblTotals = new com.sssw.rt.jform.AgcJLabel(); lblTotals.setName("lblTotals"); lblTotals.setBounds(508,403,101,20); lblTotals.setText("Totals"); lblTotals.setOpaque(false); lblTotals.setTextStyle(0); lblTotals.setForeground(Color.black); lblTotals.setTextShadowColor(Color.darkGray); lblTotals.setTextHighlightColor(Color.gray); lblTotals.setBackground(Color.lightGray); lblTotals.setHorizontalAlignment(SwingConstants.RIGHT); lblTotals.setVerticalAlignment(SwingConstants.CENTER); lblTotals.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotals.setVerticalTextPosition(SwingConstants.CENTER); lblTotals.setWordWrap(false); lblTotals.setFont(new Font("SansSerif", 1, 12)); // Initialize Rectangle7 Rectangle7 = new com.sssw.rt.form.AgcRectangle(); Rectangle7.setName("Rectangle7"); Rectangle7.setBounds(484,375,457,5); Rectangle7.setColor(Color.lightGray); Rectangle7.setBorderStyle(4); Rectangle7.setText(""); Rectangle7.setFont(new Font("SansSerif", 0, 12)); Rectangle7.setForeground(Color.black); Rectangle7.setTransparent(true); // Initialize lblTotalDeposits lblTotalDeposits = new com.sssw.rt.jform.AgcJLabel(); lblTotalDeposits.setName("lblTotalDeposits"); lblTotalDeposits.setBounds(499,438,110,20); lblTotalDeposits.setText("Total Deposits "); lblTotalDeposits.setOpaque(false); lblTotalDeposits.setTextStyle(0); lblTotalDeposits.setForeground(Color.black); lblTotalDeposits.setTextShadowColor(Color.darkGray); lblTotalDeposits.setTextHighlightColor(Color.gray); lblTotalDeposits.setBackground(Color.lightGray); lblTotalDeposits.setHorizontalAlignment(SwingConstants.RIGHT); lblTotalDeposits.setVerticalAlignment(SwingConstants.CENTER); lblTotalDeposits.setHorizontalTextPosition(SwingConstants.RIGHT); lblTotalDeposits.setVerticalTextPosition(SwingConstants.CENTER); lblTotalDeposits.setWordWrap(false); lblTotalDeposits.setFont(new Font("SansSerif", 1, 12)); // Initialize recInvoiceInfo recInvoiceInfo = new com.sssw.rt.form.AgcRectangle(); recInvoiceInfo.setName("recInvoiceInfo"); recInvoiceInfo.setBounds(13,5,402,104); recInvoiceInfo.setColor(AgoColorManager.getColor(210, 210, 210)); recInvoiceInfo.setBorderStyle(4); recInvoiceInfo.setText("Invoice Information"); recInvoiceInfo.setFont(new Font("SansSerif", 1, 12)); recInvoiceInfo.setForeground(Color.black); recInvoiceInfo.setTransparent(true); // Initialize Rectangle16 Rectangle16 = new com.sssw.rt.form.AgcRectangle(); Rectangle16.setName("Rectangle16"); Rectangle16.setBounds(28,490,381,20); Rectangle16.setColor(Color.lightGray); Rectangle16.setBorderStyle(0); Rectangle16.setText(""); Rectangle16.setFont(new Font("SansSerif", 0, 12)); Rectangle16.setForeground(Color.black); Rectangle16.setTransparent(false); // Initialize Rectangle13 Rectangle13 = new com.sssw.rt.form.AgcRectangle(); Rectangle13.setName("Rectangle13"); Rectangle13.setBounds(482,403,457,20); Rectangle13.setColor(Color.lightGray); Rectangle13.setBorderStyle(0); Rectangle13.setText(""); Rectangle13.setFont(new Font("SansSerif", 0, 12)); Rectangle13.setForeground(Color.black); Rectangle13.setTransparent(false); // Initialize Rectangle6 Rectangle6 = new com.sssw.rt.form.AgcRectangle(); Rectangle6.setName("Rectangle6"); Rectangle6.setBounds(482,438,457,20); Rectangle6.setColor(Color.lightGray); Rectangle6.setBorderStyle(0); Rectangle6.setText(""); Rectangle6.setFont(new Font("SansSerif", 0, 12)); Rectangle6.setForeground(Color.black); Rectangle6.setTransparent(false); // Initialize recDepositInfo recDepositInfo = new com.sssw.rt.form.AgcRectangle(); recDepositInfo.setName("recDepositInfo"); recDepositInfo.setBounds(430,5,565,514); recDepositInfo.setColor(AgoColorManager.getColor(210, 210, 210)); recDepositInfo.setBorderStyle(4); recDepositInfo.setText("Deposit Information"); recDepositInfo.setFont(new Font("SansSerif", 1, 12)); recDepositInfo.setForeground(Color.black); recDepositInfo.setTransparent(true); // Initialize recTransInfo recTransInfo = new com.sssw.rt.form.AgcRectangle(); recTransInfo.setName("recTransInfo"); recTransInfo.setBounds(14,114,402,405); recTransInfo.setColor(AgoColorManager.getColor(210, 210, 210)); recTransInfo.setBorderStyle(4); recTransInfo.setText("Transaction Information"); recTransInfo.setFont(new Font("SansSerif", 1, 12)); recTransInfo.setForeground(Color.black); recTransInfo.setTransparent(true); // Initialize Rectangle18 Rectangle18 = new com.sssw.rt.form.AgcRectangle(); Rectangle18.setName("Rectangle18"); Rectangle18.setBounds(13,527,982,38); Rectangle18.setColor(Color.lightGray); Rectangle18.setBorderStyle(4); Rectangle18.setText(""); Rectangle18.setFont(new Font("SansSerif", 0, 12)); Rectangle18.setForeground(Color.black); Rectangle18.setTransparent(true); addControls(); addBindings(); // Setup tab order Component[] tabOrder = { tabCashJournal, fldSearch, pbSearch, tblDeposits, }; setUserDefinedTabOrder(tabOrder); return; } protected void addAllFormControls() { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === this.add(agcGenericAccDate); this.add(agcResetOldestFinalized); this.add(agcReturnedChecks); this.add(agcGeneric); this.add(agcCashJournal); this.add(pbSearch); pbSearch.addActionListener(this); this.add(fldSearch); this.add(lblAcctingDate); this.add(lblHeader); this.add(lblAsteriskInfo); this.add(tabCashJournal); TAMSMouseListener tamsMouseListener = new TAMSMouseListener(); tabCashJournal.addMouseListener(tamsMouseListener); tabCashJournalPane0.addMouseListener(tamsMouseListener); tabCashJournalPane1.addMouseListener(tamsMouseListener); tabCashJournalPane2.addMouseListener(tamsMouseListener); tabCashJournalPane3.addMouseListener(tamsMouseListener); tabCashJournalPane4.addMouseListener(tamsMouseListener); tabCashJournalPane5.addMouseListener(tamsMouseListener); tabCashJournal.addChangeListener(this); tabCashJournalPane0.add(lblTotalDepositsValue); tabCashJournalPane0.add(lblCreditCardTotal); tabCashJournalPane0.add(lblCurrencyTotal); tabCashJournalPane0.add(lblBalance); tabCashJournalPane0.add(lblCashInvoiceValue); tabCashJournalPane0.add(lblCashInvoice); tabCashJournalPane0.add(lblCashRefunds); tabCashJournalPane0.add(lblCashRefundsValue); tabCashJournalPane0.add(lblTotalCashSalesValue); tabCashJournalPane0.add(lblTotalCashSales); tabCashJournalPane0.add(Rectangle12); tabCashJournalPane0.add(lblTotalChargeValue); tabCashJournalPane0.add(lblTotalCharge); tabCashJournalPane0.add(Rectangle11); tabCashJournalPane0.add(lblTotalRecAccountValue); tabCashJournalPane0.add(lblPymtDiscValue); tabCashJournalPane0.add(lblTotalRecAccount); tabCashJournalPane0.add(lblPymtDisc); tabCashJournalPane0.add(lblTotalRetChecks); tabCashJournalPane0.add(lblTotalRetChecksValue); tabCashJournalPane0.add(Rectangle10); tabCashJournalPane0.add(lblTotalMiscRecValue); tabCashJournalPane0.add(lblTotalMiscRec); tabCashJournalPane0.add(lblTotalOS); tabCashJournalPane0.add(lblTotalOSValue); tabCashJournalPane0.add(lblTotalPaidOutsValue); tabCashJournalPane0.add(lblTotalPaidOuts); tabCashJournalPane0.add(Rectangle9); tabCashJournalPane0.add(lblTotalCashTrans); tabCashJournalPane0.add(lblTotalCashTransValue); tabCashJournalPane0.add(tblDepositsScrollPane); tabCashJournalPane0.add(lblBegInvoiceNum); tabCashJournalPane0.add(lblBegInvoiceNumValue); tabCashJournalPane0.add(lblEndInvoiceNumValue); tabCashJournalPane0.add(lblEndInvoiceNum); tabCashJournalPane0.add(lblInvoiceCount); tabCashJournalPane0.add(lblInvoiceCountValue); tabCashJournalPane0.add(lblTotals); tabCashJournalPane0.add(Rectangle7); tabCashJournalPane0.add(lblTotalDeposits); tabCashJournalPane0.add(recInvoiceInfo); tabCashJournalPane0.add(Rectangle16); tabCashJournalPane0.add(Rectangle13); tabCashJournalPane0.add(Rectangle6); tabCashJournalPane0.add(recDepositInfo); tabCashJournalPane0.add(recTransInfo); tabCashJournalPane0.add(Rectangle18); } protected void addBindings() { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === addExpDependencies(); } private void handle_pbSearch_actionPerformed(ActionEvent evt){ if (m_CurrentTabIndex == 0) { if (FM.saveWarningPasses()) { performSearch(); } } else { if (m_CurrentTabForm != null ) { if(((FwiFormProcess)m_CurrentTabForm).fGetFormMaster().saveWarningPasses()) { performSearch(); } } } } private void performSearch() { try{ // If the search field is not null and is the same value as the current row // (the user clicked the search button without changing the search date) // the system opens the advanced search window. // To remove this logic, remove the next 7 lines and the line with the "}" // before the "if (agcGeneric.gotoFirst()) {" line RSC if (fldSearch.getText() != null && (fldSearch.getText()).equals(((Integer)agcCashJournal.getProperty(CJ.ACCOUNTING_DATE)).toString())) { Object result = FwoSessionMgr.getInstance().getNavigationMgr().showFormDialog(this, TsoConstant.FRM_SA_ACCOUNTING_DATE_SEARCH); if (result != null){ queryByCashJournalId(result); }else return; }else { //if the search field is not empty, query by that accounting date if (fldSearch.getText() != null && !(fldSearch.getText()).equals("")) { queryByAccountingDate(fldSearch.getText()); } //if the search field is empty, launch advanced search else { Object result = FwoSessionMgr.getInstance().getNavigationMgr().showFormDialog(this, TsoConstant.FRM_SA_ACCOUNTING_DATE_SEARCH); if (result != null){ queryByCashJournalId(result); }else return; } } if (agcGeneric.gotoFirst()) { TsiMainProcess mainForm = FwoSessionMgr.getInstance().getNavigationMgr().getMainForm(); if(mainForm != null) mainForm.fSetStatusMessage(""); navigateToCashJournal((Integer)agcGeneric.getProperty(0)); loadForm(); } else { boolean advSearch = ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessageOKCancel(this, "871",fldSearch.getText()); // Set the search date to the current record value fldSearch.setText(((Integer)agcCashJournal.getProperty(CJ.ACCOUNTING_DATE)).toString()); if (advSearch) { GPCCodeRunnable gpcCode = new GPCCodeRunnable(this, "runAdvancedSearchCode", null); Thread gpcCodeThread = new Thread(gpcCode); gpcCodeThread.start(); } } } catch(IOException e){ logger.error("IOException in performSearch: " + e); } catch(AgoSecurityException e){ logger.error("AgoSecurityException in performSearch: " + e); } catch(AgoUnrecoverableSystemException e){ logger.error("AgoUnrecoverableSystemException in performSearch: " + e); } catch(AgoTransientSystemException e){ logger.error("AgoTransientSystemException in performSearch: " + e); } } public void runAdvancedSearchCode(){ if (FM.saveWarningPasses()) { // Do advanced search try { Object result = FwoSessionMgr.getInstance().getNavigationMgr().showFormDialog(this, TsoConstant.FRM_SA_ACCOUNTING_DATE_SEARCH); if (result != null) { queryByCashJournalId(result); // repeat of the code for the user entering a valid date // the code is repeated to simplify the looping and keep the code in one place RSC if (agcGeneric.gotoFirst()) { TsiMainProcess mainForm = FwoSessionMgr.getInstance().getNavigationMgr().getMainForm(); if(mainForm != null) mainForm.fSetStatusMessage(""); navigateToCashJournal((Integer)agcGeneric.getProperty(0)); loadForm(); }else{ navToFirst(); // Go here if the query by cash journal result fails } } } catch(AgoUnrecoverableSystemException e){ logger.error("AgoUnrecoverableSystemException in runAdvancedSearchCode: " + e); } catch(AgoSecurityException e){ logger.error("AgoSecurityException in runAdvancedSearchCode: " + e); } catch(IOException e){ logger.error("IOException in runAdvancedSearchCode: " + e); } catch(AgoTransientSystemException e){ logger.error("AgoTransientSystemException in runAdvancedSearchCode: " + e); } } } /** * THIS IS USED TO FIX FOCUS PROBLEMS WITH OPENING MODALS BACK TO BACK IN THE SAME THREAD; * GPC MAY WANT TO PULL THIS CODE OUT INTO A PUBLIC CLASS SO OTHER FORMS CAN USE IT. * THIS WOULD, HOWEVER, REQUIRE THOSE METHODS YOU WANT TO RUN THROUGH THIS CLASS TO BE PUBLIC, * BUT THIS APPEARS TO BE THE ONLY DISADVANTAGE. */ private class GPCCodeRunnable implements Runnable{ Object codeParentInstance; String codeParentMethodName; Object[] codeParentParams; public GPCCodeRunnable(Object codeParentInstance, String codeParentMethodName, Object[] codeParentParams){ this.codeParentInstance = codeParentInstance; this.codeParentMethodName = codeParentMethodName; this.codeParentParams = codeParentParams; } public void run(){ //use reflection to get parent method to run if (codeParentInstance != null && codeParentMethodName != null) { Class[] paramClasses = null; if (codeParentParams != null) { paramClasses = new Class[codeParentParams.length]; for (int i=0; i < paramClasses.length; i++) { paramClasses[i] = codeParentParams[i].getClass(); } } try { codeParentInstance.getClass().getMethod(codeParentMethodName, paramClasses).invoke(codeParentInstance, codeParentParams); } catch (NoSuchMethodException e) { logger.error("NoSuchMethodException in run(): " ,e); } catch (IllegalAccessException e) { logger.error("IllegalAccessException in run(): " ,e); } catch (InvocationTargetException e) { logger.error("InvocationTargetException in run(): " ,e); } } } } private void queryByAccountingDate(String accountingDate) { try { TsoGenericBandDescriptor bandDescriptor = new TsoGenericBandDescriptor(T.CASH_JOURNAL, T.CASH_JOURNAL); bandDescriptor.addColumn(CJ.ID, DatatypeCodes.TYPE_INT, true); bandDescriptor.addColumn(CJ.FINALIZED, DatatypeCodes.TYPE_STRING, true); StringBuffer sb = new StringBuffer("SELECT ").append(T.CASH_JOURNAL).append(".").append(CJ.ID).append(", "); sb.append(T.CASH_JOURNAL).append(".").append(CJ.FINALIZED); sb.append(" FROM ").append(T.CASH_JOURNAL).append(" WHERE ").append(T.CASH_JOURNAL).append("."); sb.append(CJ.ACCOUNTING_DATE).append("=").append(accountingDate).append(" AND ").append(T.CASH_JOURNAL); sb.append(".").append(CJ.LOC).append("=").append(FM.m_loc); Hashtable hsh = new Hashtable(); hsh.put(com.gpc.tams.dso.dsoGeneric.SQL, sb.toString()); hsh.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bandDescriptor); SilverStreamExceptionHelper.invokeQuery(agcGeneric,hsh); }catch (ApplicationException e) { logger.error("ApplicationException in queryByAccountingDate(): " + e); } } private void queryByCashJournalId(Object id) { try { TsoGenericBandDescriptor bandDescriptor = new TsoGenericBandDescriptor(T.CASH_JOURNAL, T.CASH_JOURNAL); bandDescriptor.addColumn(CJ.ID, DatatypeCodes.TYPE_INT, true); bandDescriptor.addColumn(CJ.FINALIZED, DatatypeCodes.TYPE_STRING, true); StringBuffer sb = new StringBuffer("SELECT ").append(T.CASH_JOURNAL).append(".").append(CJ.ID).append(", "); sb.append(T.CASH_JOURNAL).append(".").append(CJ.FINALIZED); sb.append(" FROM ").append(T.CASH_JOURNAL).append(" WHERE ").append(T.CASH_JOURNAL).append("."); sb.append(CJ.ID).append("=").append(id).append(" AND ").append(T.CASH_JOURNAL); sb.append(".").append(CJ.LOC).append("=").append(FM.m_loc); Hashtable hsh = new Hashtable(); hsh.put(com.gpc.tams.dso.dsoGeneric.SQL, sb.toString()); hsh.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bandDescriptor); SilverStreamExceptionHelper.invokeQuery(agcGeneric,hsh); }catch (ApplicationException e) { logger.error("ApplicationException in queryByCashJournalId(): " + e); } } private void navigateToCashJournal(Integer searchId) { try { if (agcCashJournal.gotoLast()) { do { if (searchId.intValue() == ((Integer)agcCashJournal.getProperty(CJ.ID)).intValue()) { loadData(); //loadForm(); return; } } while (agcCashJournal.gotoPrevious()); } } catch(AgoSecurityException e) { logger.error("AgoSecurityException in navigateToCashJournal(): " + e); } catch(AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in navigateToCashJournal(): " + e); } catch(AgoTransientSystemException e) { logger.error("AgoTransientSystemException in navigateToCashJournal(): " + e); } } protected void formActivate(){ //The following components will always be enabled in view mode Vector vecExceptions = new Vector(); vecExceptions.add(fldSearch); vecExceptions.add(pbSearch); FM.setEnabledViewModeComps(vecExceptions); //queries the tables and loads the form retrieveData(); if (m_DataFound) { //must call after retrieveData() so we know if the record has been finalized setMode(); // must reset the nav buttons correctly after setting mode as form master resets the // navigation buttons fully when setting modes. FM.setComponentFocus(fldSearch); addSearchKeyListener(); }else { SwingUtilities.invokeLater(new Runnable() { public void run() { ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(FrmSA_CashReceivedJournal_Review.this, "872"); FM.getToolBar().requestFocus(); FwoSessionMgr.getInstance().getNavigationMgr().getMainForm().fRemoveCurrentForm(); } }); } } protected void formLoaded(){ fldSearch.putClientProperty(FocusDecider.NAME, DefaultFocusDecider.getInstance()); //Create instance of FwoToolBarDirector with these permissions Hashtable m_toolBarPermissions = new Hashtable(); m_toolBarPermissions.put(FwoToolBarDirector.PRINT_OK, new Boolean(true)); m_toolBarPermissions.put(FwoToolBarDirector.NAV_OK, new Boolean(true)); FwoToolBarDirector toolBarDirector = new FwoToolBarDirector(m_toolBarPermissions); FM = new TamsFormMaster(this, (FwiFormProcess) this.getParentForm(), null, toolBarDirector); // Do not validate on Search pbSearch.setVerifyInputWhenFocusTarget(false); //Create the Document and InputVerifier Objects m_accDateDoc = new TsoValidatedAccountingDateDocument(fldSearch); TsoValidatedAccountDateVerifier accDateVerifier = new TsoValidatedAccountDateVerifier(this); //Use the FwoFormMaster's addValidatedComponent method to //set the Document and InputVerifier as this method also adds // the necessary UI, as well. try { FM.addValidatedComponent(fldSearch, m_accDateDoc , accDateVerifier); } catch (FwoUnsupportedObjectException e) { logger.error("FwoUnsupportedObjectException in formLoaded(): " + e); } pbSearch.setDefaultCapable(false); } private void addSearchKeyListener() { //add listener to the search field fldSearch.addKeyListener(new KeyListener() { public void keyPressed(KeyEvent evt) { } //do nothing } public void keyReleased(KeyEvent evt) { // if enter clicked, then trigger search if (evt.getKeyCode() == KeyEvent.VK_ENTER) { if (m_CurrentTabIndex == 0) { if (FM.saveWarningPasses()) { performSearch(); FM.setComponentFocus(fldSearch); } } else { if (m_CurrentTabForm != null ) { if(((FwiFormProcess)m_CurrentTabForm).fGetFormMaster().saveWarningPasses()) { performSearch(); FM.setComponentFocus(fldSearch); } } } } } public void keyTyped(KeyEvent evt) { } }); } private void retrieveData() { try { //retrieves label data retrieveInvTransData(); //navigate to the oldest, unfinalized cash journal navToFirst(); if (m_DataFound) { //reload the data loadData(); } } catch (ApplicationException e) { logger.error("ApplicationException in retrieveData(): " + e); } } private boolean navToFirst() { try { if (agcCashJournal.gotoFirst()) { do{ if(((String)agcCashJournal.getProperty(CJ.FINALIZED)).equals("N")){ m_CashJournalId = (Integer)agcCashJournal.getProperty(CJ.ID); logger.debug("m_CashJournalId ==========================="+m_CashJournalId ); break; } }while (agcCashJournal.gotoNext()); //set the oldest, unfinalized cash journal for searching m_OldestUnfinalizedId = m_CashJournalId; if (!m_DataFound) { FM.setNavData(agcCashJournal); } //since we've already navigated to the correct record, just set a flag so that we know in loadData() it's ok to load the label. m_DataFound = true; return true; } else { m_DataFound = false; return false; } }catch (AgoSecurityException e) { logger.error("AgoSecurityException in navToFirst(): " + e); return false; }catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in navToFirst(): " + e); return false; }catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException in navToFirst(): " + e); return false; } } private void loadData() { m_CashJournalId = (Integer)agcCashJournal.getProperty(CJ.ID); fldSearch.setText(((Integer)agcCashJournal.getProperty(CJ.ACCOUNTING_DATE)).toString()); //Only set the labels if data was found if (m_DataFound) { //Bug #28764, calling oldAccDate() method to check if the enterd accounting date is more recent than the // accounting date of the oldest unfinalized journal. oldAccDate(); setLabels(); } //query for table data retrieveTableData(); //build the table buildTable(); //set the totals lblCurrencyTotal.setText(m_CurrencyDepositTotal.toString()); lblCreditCardTotal.setText(m_CreditCardTotal.toString()); logger.debug("_________loadData - m_CurrencyDepositTotal = " + m_CurrencyDepositTotal); logger.debug("_________loadData - m_CreditCardTotal = " + m_CreditCardTotal); //total deposits = sum of currency + sum of credit cards m_TotalDeposits = m_CurrencyDepositTotal.add(m_CreditCardTotal); logger.debug("_________loadData - m_TotalDeposits = " + m_TotalDeposits); lblTotalDepositsValue.setText(m_TotalDeposits.toString()); logger.debug("_________loadData - m_TotalCash = " + m_TotalCash); //set the balance m_Balance = m_TotalDeposits.subtract(m_TotalCash); BigDecimal zero = new BigDecimal(0.0); if (m_Balance.compareTo(zero) < 0) { lblBalance.setForeground(Color.red); lblBalance.setFont(new Font("SansSerif", 1, 12)); } else if (m_Balance.compareTo(zero) > 0) { lblBalance.setForeground(Color.black); lblBalance.setFont(new Font("SansSerif", 1, 12)); } else { lblBalance.setForeground(Color.black); lblBalance.setFont(new Font("SansSerif", 0, 12)); } lblBalance.setText(getLocalizedBalanceText()); } //Bug #28764, added new bluebarrel, agcGenericAccDate. //Bug #28764, Created new method to check if the entered accounting date is more recent // than the accounting date of the oldest Unfinalized journal. private void oldAccDate() { try { String accountingDate; // Stores the value entered in the accounting date field. Integer accDate; // Stores the accounting date of the oldest unfinalized journal. Integer accDateVal; TsoGenericBandDescriptor bandDescriptor = new TsoGenericBandDescriptor(T.CASH_JOURNAL, T.CASH_JOURNAL); bandDescriptor.addColumn(CJ.ACCOUNTING_DATE, DatatypeCodes.TYPE_INT, true); //query to get the accounting date of the oldest unfinalized journal StringBuffer query = new StringBuffer("SELECT MIN(").append(T.CASH_JOURNAL).append(".").append(CJ.ACCOUNTING_DATE).append(")" ); query.append(" FROM ").append(T.CASH_JOURNAL).append(" WHERE ").append(T.CASH_JOURNAL).append("."); query.append(CJ.FINALIZED).append(" = 'N' ").append(" AND ").append(T.CASH_JOURNAL); query.append(".").append(CJ.LOC).append("=").append(FM.m_loc); Hashtable hsh = new Hashtable(); hsh.put(com.gpc.tams.dso.dsoGeneric.SQL, query.toString()); hsh.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bandDescriptor); //Run the above query SilverStreamExceptionHelper.invokeQuery(agcGenericAccDate,hsh); try { agcGenericAccDate.gotoFirst(); }catch (AgoSecurityException e) { logger.error("AgoSecurityException in navToFirst(): " + e); }catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in navToFirst(): " + e); }catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException in navToFirst(): " + e); } //get the Accounting date from the textfield and the resultset accountingDate = fldSearch.getText(); accDate = (Integer)agcGenericAccDate.getProperty("ACCOUNTING_DATE"); accDateVal = new Integer(accountingDate); //Comparing the entered accounting date with accounting date of the oldest unfinalized journal if((accDate != null) && (accDateVal != null)) { if(accDate.intValue() 0.00 ) return "<<< " + ApplicationContext.getInstance().getResourceBundleReader().getLocalizedText( ResourceBundleReader.UI,TsoConstant.FRM_SA_CASHREC_JOURNAL_MISC_RECEIPTS + ".OUT_OF_BALANCE",locale) + " +" + displayBalance + " >>>"; //balance is negative else return "<<< " + ApplicationContext.getInstance().getResourceBundleReader().getLocalizedText( ResourceBundleReader.UI,TsoConstant.FRM_SA_CASHREC_JOURNAL_MISC_RECEIPTS + ".OUT_OF_BALANCE",locale) + " " + displayBalance + " >>>"; }catch(NumberPatternFormatException e){ logger.error("NumberPatternFormatException in getLocalizedBalanceText(): ",e); ClientApplicationContext.getClientApplicationContext().getMessageMgr().showMessage(this, "103", e.toString()); } return ""; } private void loadForm(){ try { agGeneral.beginWaitCursor(); //Get the selected tab m_CurrentTabIndex = tabCashJournal.getSelectedIndex(); lblAsteriskInfo.setVisible(m_CurrentTabIndex == TAB_OVER_SHORT); //Get the tab panel JPanel panel = (JPanel) tabCashJournal.getComponentAt(m_CurrentTabIndex); panel.requestFocus(); /*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. */ //First tab if (m_CurrentTabIndex == 0) { m_CurrentTabForm = this; setMode(); FM.formActivate(); fldSearch.requestFocus(); return; } //flag to let us know whether fLocalize() should be called after fRetrieve() boolean needsLocalizing = false; //If the subform is not in the hashtable of subforms, this is the first time it has been loaded. if (!m_SubForms.containsKey(m_SubFormNames[m_CurrentTabIndex])) { //Get the subform m_CurrentTabForm = FwoSessionMgr.getInstance().getNavigationMgr().showSubform(this, m_SubFormNames[m_CurrentTabIndex], 0, 0, panel,TsoConstant.SA_CASH_RECEIVED_JOURNAL); //Store it in the hashtable so it is cached m_SubForms.put(m_SubFormNames[m_CurrentTabIndex], m_CurrentTabForm); //fLocalize is needed to make sure the subforms get localized when user clicks the tab but we must //call it after fRetrieve() so there is data needsLocalizing = true; //((FwiFormProcess)m_CurrentTabForm).fLocalize(); } //Else if the subform is already in the hashtable of subforms, just retrieve it from here else { m_CurrentTabForm = (AgfForm)m_SubForms.get(m_SubFormNames[m_CurrentTabIndex]); needsLocalizing = false; } if (m_CurrentTabForm instanceof FwiFormProcess) { Hashtable params = new Hashtable(); params.put(TsoConstant.KEY_ID, m_CashJournalId); params.put(TsoConstant.KEY_LOC, FM.m_loc); params.put(TsoConstant.KEY_BALANCE, m_Balance); params.put(TsoConstant.KEY_DATE, (Integer)agcCashJournal.getProperty(CJ.ACCOUNTING_DATE)); //if the tab is deposits, need to pass in totals if (m_CurrentTabIndex == TAB_DEPOSIT) { params.put(AMT_DEPOSITS, new BigDecimal(m_TotalDeposits.toString())); params.put(TRANSACTIONS, new BigDecimal(m_TotalCash.toString())); params.put(T.CASH_JOURNAL_OTHER_DEPOSIT + "." + CJCCD.GROSS_AMOUNT, new BigDecimal("1111.11")); } //initialize subform data ((FwiFormProcess)m_CurrentTabForm).fRetrieve(params); if (needsLocalizing) ((FwiFormProcess)m_CurrentTabForm).fLocalize(); } else { logger.error("Error: This subform does not implement the FwiFormProcess Interface: "+m_CurrentTabForm.getName()); } } catch (AgoSecurityException e) { logger.error("AgoSecurityException in loadForm: " + e); } catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in loadForm: " + e); } catch (IOException e) { logger.error("IOException in loadForm: " + e); } finally { agGeneral.endWaitCursor(); } } public boolean isCashJournalFinalized(){ if (((String)agcCashJournal.getProperty(CJ.FINALIZED)).equals("Y")) return true; else return false; } /** * This Review form displays data that the subforms may manipulate. refreshData() allows the subforms to notify * the parent form that the data has been modified and the parent form should be refreshed. Since this data * makes up the balance that is displayed on all forms, the balance is recalculated and the localized balanced * text is returned to the caller. **/ public String refreshData() { try { //refresh the data to get the changes retrieveInvTransData(); //navigate to the current record and reload data navigateToCashJournal(m_CashJournalId); //pass back the balance text (getLocalizedBalanceText() has already been called in loadData() so just grab the text return lblBalance.getText(); } catch (ApplicationException e) { logger.error("ApplicationException in refreshData(): " + e); return ""; } } /** * Returns the current balance. This method may be called to find out what color text the balance label should be displayed in. * If data has been changed on the subform, refreshData() must be called to reflect the changes in the parent. * * @param BigDecimal The current balance **/ public BigDecimal getBalance() { return m_Balance; } /** * Deprecated. Use refreshData() so this form knows to requery the data and reload the data. **/ public BigDecimal calculateBalance(BigDecimal difference) { m_Balance = m_Balance.add(difference); return m_Balance; } /** * Allows subforms to get the new balance without changing the overall balance **/ public BigDecimal calculateBalance(BigDecimal currentBalance, BigDecimal newValue, BigDecimal oldValue) { return currentBalance.add(newValue.subtract(oldValue)); } /** * Returns the total deposits. If any changes have been made to the form, refreshData() shoud * be called prior to this method call. * * @return BigDecimal Total Deposits **/ public BigDecimal getTotalDeposits() { return m_TotalDeposits; } /** * Returns the total number of deposits. If any changes have been made to the form, refreshData() shoud * be called prior to this method call. * * @return int Total Number of Deposits **/ public int getNumberOfDeposits() { return m_NumberOfDeposits; } /** * Returns the total transactions. If any changes have been made to the form, refreshData() shoud * be called prior to this method call. * * @return BigDecimal Total Transactions **/ public BigDecimal getTotalTransactions() { m_TotalTransactions = new BigDecimal("0.00"); if (agcCashJournal.getProperty(CJ.CASH_INVOICE_AMOUNT_TOTAL) != null) m_TotalTransactions = m_TotalTransactions.add((BigDecimal)agcCashJournal.getProperty(CJ.CASH_INVOICE_AMOUNT_TOTAL)); if (agcCashJournal.getProperty(CJ.CASH_REFUNDS_TOTAL) != null) m_TotalTransactions = m_TotalTransactions.add((BigDecimal)agcCashJournal.getProperty(CJ.CASH_REFUNDS_TOTAL)); if (agcCashJournal.getProperty(CJ.ROA_TOTAL) != null) m_TotalTransactions = m_TotalTransactions.add((BigDecimal)agcCashJournal.getProperty(CJ.ROA_TOTAL)); //TOTAL MISC RECEIPTS if (agcCashJournal.getProperty("TOTAL_MISC_RECEIPTS") != null) m_TotalTransactions = m_TotalTransactions.add((BigDecimal)agcCashJournal.getProperty("TOTAL_MISC_RECEIPTS")); //TOTAL OVER/SHORT CASH DRAWER if (agcCashJournal.getProperty("TOTAL_OVER_SHORT") != null) m_TotalTransactions = m_TotalTransactions.add((BigDecimal)agcCashJournal.getProperty("TOTAL_OVER_SHORT")); //SUM TOTAL PAID-OUTS if (agcCashJournal.getProperty("TOTAL_PAID_OUT") != null) m_TotalTransactions = m_TotalTransactions.add((BigDecimal)agcCashJournal.getProperty("TOTAL_PAID_OUT")); return m_TotalTransactions; } public void actionPerformed(ActionEvent evt) { //==== Warning: SilverStream-generated method: do not edit. All changes will be lost === Object src = evt.getSource(); if (src == pbSearch) { handle_pbSearch_actionPerformed(evt); return; } super.actionPerformed(evt); } public void fCheckAccess(){ } public void fCheckLogin(){ } public String fCreateTitle(){ return (String)null; } public String fGetFormName(){ return this.getName(); } public void fLocalize(){ ClientApplicationContext.getClientApplicationContext().getLocalizationMgr().localize(this); invalidate(); validate(); localizeLabels(); if (m_CurrentTabForm != null && m_CurrentTabForm != this && m_CurrentTabForm instanceof FwiFormProcess) ((FwiFormProcess)m_CurrentTabForm).fLocalize(); } private void localizeLabels() { try { Locale locale = ClientApplicationContext.getClientApplicationContext().getCurrentLocale(); FwoNumberPattern decPattern = (FwoNumberPattern)(FwoPattern.getNumberPatternInstance(FwoNumberPattern.DECIMAL,locale)); //need to reset labels back to original decimal values before reformatting them //to new decimal pattern. setLabels(); lblCurrencyTotal.setText(m_CurrencyDepositTotal.toString()); lblCreditCardTotal.setText(m_CreditCardTotal.toString()); lblTotalDepositsValue.setText(m_TotalDeposits.toString()); //now format all the labels according to the new pattern created based on the current locale. lblCashInvoiceValue.setText(decPattern.format(lblCashInvoiceValue.getText())); lblCashRefundsValue.setText(decPattern.format(lblCashRefundsValue.getText())); lblTotalCashSalesValue.setText(decPattern.format(lblTotalCashSalesValue.getText())); lblTotalChargeValue.setText(decPattern.format(lblTotalChargeValue.getText())); lblTotalRecAccountValue.setText(decPattern.format(lblTotalRecAccountValue.getText())); lblPymtDiscValue.setText(decPattern.format(lblPymtDiscValue.getText())); lblTotalRetChecksValue.setText(decPattern.format(lblTotalRetChecksValue.getText())); lblTotalMiscRecValue.setText(decPattern.format(lblTotalMiscRecValue.getText())); lblTotalOSValue.setText(decPattern.format(lblTotalOSValue.getText())); lblTotalPaidOutsValue.setText(decPattern.format(lblTotalPaidOutsValue.getText())); lblTotalCashTransValue.setText(decPattern.format(lblTotalCashTransValue.getText())); lblCurrencyTotal.setText(decPattern.format(lblCurrencyTotal.getText())); lblCreditCardTotal.setText(decPattern.format(lblCreditCardTotal.getText())); lblTotalDepositsValue.setText(decPattern.format(lblTotalDepositsValue.getText())); lblBalance.setText(getLocalizedBalanceText()); } catch (NumberPatternFormatException e) { logger.error("NumberPatternFormatException in localizeLabels(): " + e); } } public void fRetrieve(java.util.Hashtable hashtable1){ } public void fStylize(){ } public boolean fStopLogout(){ return false; } public void fSetToolBar(java.awt.Component component1){ } public com.gpc.client.backoffice.FwoFormMaster fGetFormMaster(){ return FM; } public boolean fDelete(){ return false; } public boolean fEdit(){ return false; } public boolean fFindExec(){ return false; } public boolean fFindMode(){ return false; } public boolean fFirst(){ Integer testId = (Integer)FM.getNavData().getProperty(0); if (testId != null){ loadData(); loadForm(); return true; } return false; } public boolean fLast(){ Integer testId = (Integer)FM.getNavData().getProperty(0); if (testId != null) { loadData(); loadForm(); return true; } return false; } public boolean fNew(){ return false; } public boolean fNext(){ Integer testId = (Integer)FM.getNavData().getProperty(0); if (testId != null) { loadData(); loadForm(); return true; } return false; } public boolean fPrevious(){ Integer testId = (Integer)FM.getNavData().getProperty(0); if (testId != null) { loadData(); loadForm(); return true; } return false; } public boolean fSave(){ return false; } public void fSort(){ } public boolean fValidate(){ return false; } public void fCancel(){ } public boolean fValidateJTableCell(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1, int int2, int int3){ return false; } public boolean fValidateJTableRow(com.gpc.client.common.table.FwoJTableMgr fwoJTableMgr1, int int2){ return true; } public boolean fNeedsUpdate(){ return false; } public void fPostNew(){ } public void fPostSave(){ } public void fPostEdit(){ } public void fPostCancel(){ } public void fPostDelete(){ } public boolean fValidateComponent(javax.swing.JComponent jComponent1){ return false; } public java.util.Locale fGetCurrentRecordLocale(javax.swing.JComponent jComponent1){ return (java.util.Locale)null; } public Integer fGetFunctionId(){ return TsoConstant.SA_CASH_RECEIVED_JOURNAL; } 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 == tabCashJournal) { handle_tabCashJournal_stateChanged(changeEvent); return; } } public boolean fPrint(){ Hashtable hsh = new Hashtable(); hsh.put(TsoConstant.KEY_ID, m_CashJournalId); hsh.put(TsoConstant.KEY_LOC, FM.m_loc); hsh.put(TsoConstant.KEY_BALANCE, m_Balance); if (m_OldestUnfinalizedId != null) hsh.put("OLDEST_UNFINALIZED_JOURNAL", new Boolean(m_OldestUnfinalizedId.intValue() == m_CashJournalId.intValue())); try{ String res = (String)FwoSessionMgr.getInstance().getNavigationMgr().showFormDialog(this, TsoConstant.FRM_SA_CASHREC_JOURNAL_RPT_OPTIONS, hsh); if (TsoConstant.FUNC_OK.equals(res)) { //reset m_OldestUnfinalizedId queryForResetOldestUnFinalized(); //if the record wasn't finalized then there is a chance the user finalized the record so we must refresh rows if(((String)agcCashJournal.getProperty(CJ.FINALIZED)).equals("N")){ agcCashJournal.refreshRows(); //gotoLast() since we would be finalizing at the end. agcCashJournal.gotoLast(); //have to get back to current record so work backwards do { if (((Integer)agcCashJournal.getProperty(CJ.ID)).intValue() == m_CashJournalId.intValue()) { loadData(); return true; } } while (agcCashJournal.gotoPrevious()); } } } catch (IOException e) { logger.error("IOException in fPrint(): ", e); return false; } catch (AgoSecurityException e) { logger.error("AgoSecurityException in fPrint(): ", e); return false; } catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in fPrint(): ", e); return false; } catch (com.sssw.rt.util.AgoTransientSystemException e) { logger.error("AgoTransientSystemException in fPrint() : ", e); return false; } return true; } 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 () CASH_JOURNAL_CHECK.ID*/ return ((Integer) cursor.getProperty(0)); case 1: /* LOC () CASH_JOURNAL_CHECK.LOC*/ return ((Integer) cursor.getProperty(1)); case 2: /* CASH_JOURNAL_ID () CASH_JOURNAL_CHECK.CASH_JOURNAL_ID*/ return ((Integer) cursor.getProperty(2)); case 3: /* CHECK_TYPE () CASH_JOURNAL_CHECK.CHECK_TYPE*/ return ((String) cursor.getProperty(3)); default: return null; } } catch (Throwable e) { return null; } } private boolean isBranchARStore(){ try { StringBuffer sb = new StringBuffer(""); sb.append("Select ").append(T.AR_PROFILE).append(".").append(ARP.MAIN_AR_STORE_NUMBER).append(", "); sb.append(T.STORE_PROFILE).append(".").append(SP.STORE_NUM).append(" FROM "); sb.append(T.AR_PROFILE).append(", ").append(T.STORE_PROFILE).append(" WHERE "); sb.append("("); sb.append(T.AR_PROFILE).append(".").append(ARP.MAIN_AR_STORE_NUMBER).append(" IS NULL OR "); sb.append(T.AR_PROFILE).append(".").append(ARP.MAIN_AR_STORE_NUMBER).append("<>"); sb.append(T.STORE_PROFILE).append(".").append(SP.STORE_NUM).append(") AND "); sb.append(T.AR_PROFILE).append(".").append(ARP.LOC).append("=").append(FM.m_loc).append(" AND "); sb.append(T.STORE_PROFILE).append(".").append(SP.LOC).append("=").append(FM.m_loc); Hashtable ht = new Hashtable(); ht.put("SQL",sb.toString()); SilverStreamExceptionHelper.invokeQuery(agcGeneric,ht); if (agcGeneric.gotoFirst()){ return true; } else { return false; } } catch (ApplicationException e) { logger.error("ApplicationException in isBranchARStore: " + e); } catch (AgoSecurityException e) { logger.error("AgoSecurityException in isBranchARStore: " + e); } catch (AgoUnrecoverableSystemException e) { logger.error("AgoUnrecoverableSystemException in isBranchARStore: " + e); } catch (AgoTransientSystemException e) { logger.error("AgoTransientSystemException in isBranchARStore: " + e); } return true; } public void finalize()throws Throwable{ logger.debug("Memory being released: " + this); super.finalize(); } public boolean fClose(){ removeGlobalReferences(); return true; } /** * Set All Globals null except: * No primitives (int, boolean) * No constant renames (private TsoConstant TC); * No agcdatas * No final variables */ private void removeGlobalReferences(){ m_accDateDoc = null; MAIN = null; m_SubFormNames = null; if (m_SubForms != null) m_SubForms.clear(); m_SubForms = null; m_CurrentTabForm = null; FM = null; T = null; CJ = null; CJCD = null; CJCCD = null; CJEFT = null; m_Balance = null; m_TotalCash = null; m_TotalDeposits = null; m_CurrencyDepositTotal = null; m_CreditCardTotal = null; m_TotalTransactions = null; m_Data = null; m_TblMgr = null; AMT_DEPOSITS = null; TRANSACTIONS = null; CASH_DEPOSIT = null; removeAllGUIComponentReferences(); } private void removeAllGUIComponentReferences(){ lblBalance = null; tblDepositsScrollPane = null; lblAcctingDate = null; lblTotalDepositsValue = null; lblCreditCardTotal = null; lblCurrencyTotal = null; lblTotalDeposits = null; tabCashJournalPane0 = null; tabCashJournalPane1 = null; tabCashJournalPane2 = null; tabCashJournalPane3 = null; tabCashJournalPane4 = null; tabCashJournalPane5 = null; lblCashInvoiceValue = null; lblCashInvoice = null; lblCashRefunds = null; lblCashRefundsValue = null; lblTotalCashSalesValue = null; lblTotalCashSales = null; Rectangle12 = null; lblTotalChargeValue = null; lblTotalCharge = null; Rectangle11 = null; lblTotalRecAccountValue = null; lblPymtDiscValue = null; lblTotalRecAccount = null; lblPymtDisc = null; lblTotalRetChecks = null; lblTotalRetChecksValue = null; Rectangle10 = null; lblTotalMiscRecValue = null; lblTotalMiscRec = null; lblTotalOS = null; lblTotalOSValue = null; lblTotalPaidOutsValue = null; lblTotalPaidOuts = null; Rectangle9 = null; lblTotalCashTrans = null; lblTotalCashTransValue = null; tblDeposits = null; lblBegInvoiceNum = null; lblBegInvoiceNumValue = null; lblEndInvoiceNumValue = null; lblEndInvoiceNum = null; lblInvoiceCount = null; lblInvoiceCountValue = null; lblTotals = null; recInvoiceInfo = null; recTransInfo = null; Rectangle18 = null; recDepositInfo = null; Rectangle16 = null; Rectangle13 = null; Rectangle7 = null; Rectangle6 = null; DefaultJButtonGroup = null; pbSearch = null; fldSearch = null; tabCashJournal = null; lblHeader = null; } private void queryForResetOldestUnFinalized() { try{ TsoGenericBandDescriptor bandDescriptor = new TsoGenericBandDescriptor(T.CASH_JOURNAL, T.CASH_JOURNAL); bandDescriptor.addColumn(CJ.ID, DatatypeCodes.TYPE_INT, true); StringBuffer sql = new StringBuffer("SELECT "); sql.append(T.CASH_JOURNAL).append(".").append(CJ.ID); sql.append(" FROM ").append(T.CASH_JOURNAL); sql.append(" WHERE ").append(CJ.FINALIZED).append(" = 'N'"); sql.append(" AND ").append(CJ.LOC).append(" = ").append(ClientApplicationContext.getClientApplicationContext().getLocation()); sql.append(" ORDER BY ").append(CJ.ACCOUNTING_DATE).append(" ASC "); logger.debug("queryForResetOldestFinalized SQL = " + sql.toString()); //query Hashtable params = new Hashtable(); params.put(com.gpc.tams.dso.dsoGeneric.SQL, sql.toString()); params.put(com.gpc.tams.dso.dsoGeneric.BAND_DESCRIPTOR, bandDescriptor); SilverStreamExceptionHelper.invokeQuery(agcResetOldestFinalized,params); if (agcResetOldestFinalized.gotoFirst()) { m_OldestUnfinalizedId = (Integer) agcResetOldestFinalized.getProperty(CJ.ID); } } catch(ApplicationException e){ logger.error(e, e); } catch(AgoSecurityException e){ logger.error(e, e); } catch(AgoTransientSystemException e){ logger.error(e, e); } catch(AgoUnrecoverableSystemException e){ logger.error(e, e); } } }