Esempio n. 1
0
        /// <summary>
        /// Performs the playback of actions in this module.
        /// </summary>
        /// <remarks>You should not call this method directly, instead pass the module
        /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method
        /// that will in turn invoke this method.</remarks>
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.0;

            GL_ACCOUNT account = new GL_ACCOUNT();

            account.acctNumber = "571" + StringFunctions.RandStr("9(1)") + " " + StringFunctions.RandStr("A(9)");                       // the db is setup to use 4 digits accounts

            GeneralLedger._SA_Create(account);
            GeneralLedger._SA_Close();

            this._varAccount = account.acctNumber;
        }
Esempio n. 2
0
        /// <summary>
        /// Performs the playback of actions in this module.
        /// </summary>
        /// <remarks>You should not call this method directly, instead pass the module
        /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method
        /// that will in turn invoke this method.</remarks>
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime        = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor            = 1.0;

            Settings._SA_Get_AllPayableSettings();

            // Setup a new account
            GL_ACCOUNT newAccount = new GL_ACCOUNT();


            if (this._varAccount == "")
            {
                newAccount.acctNumber = "590" + StringFunctions.RandStr("9(1)") + " " + StringFunctions.RandStr("A(9)");                        // the db is setup to use 4 digits accounts

                GeneralLedger._SA_Create(newAccount);
                GeneralLedger._SA_Close();
            }
            else
            {
                newAccount.acctNumber = this._varAccount;
            }

            // Post an entry in GJ
            GENERAL_JOURNAL genJournal = new GENERAL_JOURNAL();
            GL_ACCOUNT      account2   = new GL_ACCOUNT();
            GJ_ROW          row        = new GJ_ROW();
            GJ_ROW          row2       = new GJ_ROW();

            string amount = Functions.RandCashAmount();

            row.Account  = newAccount;
            row.debitAmt = amount;
            genJournal.GridRows.Add(row);

            // Using the currency account will need foreign currency setup
            row2.Account   = Variables.globalSettings.PayableSettings.CurrencyAccounts[0].BankAccount;
            row2.creditAmt = amount;
            genJournal.GridRows.Add(row2);

            genJournal.source = StringFunctions.RandStr("A(8)");

            // to be continued
            GeneralJournal._SA_Create(genJournal);
            GeneralJournal._SA_Close();
        }