コード例 #1
0
        public static void _SA_Open(GENERAL_JOURNAL GJRecord)
        {
            if (!GeneralJournal.repo.SelfInfo.Exists())
            {
                GeneralJournal._SA_Invoke();
            }
            GeneralJournal.repo.ToolBar.Adjust.Click();
            DialogJournalSearch._SA_SelectLookupDateRange();

            // Assume there are no diplicate sources
            DialogJournalSearch.repo.Source.TextValue = GJRecord.source;
            DialogJournalSearch.repo.OK.Click();
        }
コード例 #2
0
        public static void _SA_Open(RECEIPT ReceiptRecord)
        {
            if (!ReceiptsJournal.repo.SelfInfo.Exists())
            {
                ReceiptsJournal._SA_Invoke();
            }
            ReceiptsJournal.repo.Adjust.Click();

            // select date range
            DialogJournalSearch._SA_SelectLookupDateRange();
            DialogJournalSearch.repo.Name.Select(ReceiptRecord.Customer.name);
            DialogJournalSearch.repo.Source.TextValue = ReceiptRecord.transNumber;
            DialogJournalSearch.repo.OK.Click();
        }
コード例 #3
0
        // Recurring entries not done yet
//        public static void _SA_RecallPayment_Other(PAYMENT_OTHER PaymentRecord)	// recall recurring entry. other payment only
//        {
//            // recall and post a recurring entry
//
//            if (Functions.GoodData(PaymentRecord.recurringName))
//            {
//                Trace.WriteLine("Recalling the recurring entry " + PaymentRecord.recurringName + "");
//
//                if (!PaymentsJournal.repo.SelfInfo.Exists())
//                {
//                    PaymentsJournal._SA_Invoke();
//                }
//
//                PaymentsJournal.repo.Transaction.Select("Make Other Payment");
//
//                PaymentsJournal.repo.Self.PressKeys("{Ctrl+r}");	// invoke Recall Recurring dialog
//                RecallRecurringDialog._SA_SelectEntryToRecall(PaymentRecord.recurringName);
//                PaymentsJournal._SA_CreatePayment_Other(PaymentRecord);
//            }
//            else	// log the error
//            {
//                Functions.Verify(false, true, "recurring name found");
//            }
//        }


        public static void _SA_Open(PAYMENT Payment)            // for common code amongst all the payment types
        {
            if (!PaymentsJournal.repo.SelfInfo.Exists())
            {
                PaymentsJournal._SA_Invoke();
            }

            if (Payment.GetType() == typeof(PAYMENT_REMIT))
            {
                PaymentsJournal.repo.Transaction.Select("Pay Remittance");
            }
            else if (Payment.GetType() == typeof(PAYMENT_PURCH))
            {
                PaymentsJournal.repo.Transaction.Select("Pay Purchase Invoices");
            }
            else if (Payment.GetType() == typeof(PAYMENT_OTHER))
            {
                PaymentsJournal.repo.Transaction.Select("Make Other Payment");
            }
            else if (Payment.GetType() == typeof(PAYMENT_CREDIT_CARD))
            {
                Ranorex.Report.Info("Credit card payment can not be looked up");
                return;
            }
            else
            {
                Ranorex.Report.Info("Invalid payment type");
                return;
            }

            PaymentsJournal.repo.SearchDialog.Click();
            DialogJournalSearch._SA_SelectLookupDateRange();
            DialogJournalSearch.repo.Name.Select(Payment.Vendor.name);

            if (Functions.GoodData(Payment.chequeNumber))               // enter cheque number
            {
                DialogJournalSearch.repo.Source.TextValue = Payment.chequeNumber;
            }
            else if (Functions.GoodData(Payment.directDepositNo))               // enter source number
            {
                DialogJournalSearch.repo.Source.TextValue = Payment.directDepositNo;
            }

            else                // enter source number
            {
                DialogJournalSearch.repo.Source.TextValue = Payment.source;
            }

            DialogJournalSearch.repo.OK.Click();
        }