コード例 #1
0
        private void CheckForSuspenseAccounts()
        {
            if (suspenseAccountInfo == null)
            {
                suspenseAccountInfo =
                    new GetSuspenseAccountInfo(FledgerInfo.LedgerNumber);
            }

            if (suspenseAccountInfo.RowCount != 0)
            {
                TLogging.LogAtLevel(1, String.Format("MonthEnd: {0} suspense accounts in use.", suspenseAccountInfo.RowCount));
                TVerificationResult tvr = new TVerificationResult(
                    Catalog.GetString("Suspense Accounts found"),
                    String.Format(
                        Catalog.GetString(
                            "Have you checked the details of suspense account {0}?"),
                        suspenseAccountInfo.ToString()),
                    "", TPeriodEndErrorAndStatusCodes.PEEC_07.ToString(), TResultSeverity.Resv_Status);
                FverificationResults.Add(tvr);
            }

/*
 *          else
 *          {
 *              TLogging.LogAtLevel(1, "MonthEnd: No suspense accounts used.");
 *          }
 */
        }
コード例 #2
0
        private void CheckForSuspenseAccountsZero()
        {
            if (FledgerInfo.CurrentPeriod == FledgerInfo.NumberOfAccountingPeriods)
            {
                // This means: The last accounting period of the year is running!

                if (getSuspenseAccountInfo == null)
                {
                    getSuspenseAccountInfo =
                        new GetSuspenseAccountInfo(FledgerInfo.LedgerNumber);
                }

                if (getSuspenseAccountInfo.RowCount > 0)
                {
                    ASuspenseAccountRow aSuspenseAccountRow;

                    for (int i = 0; i < getSuspenseAccountInfo.RowCount; ++i)
                    {
                        aSuspenseAccountRow = getSuspenseAccountInfo.Row(i);
                        TGet_GLM_Info get_GLM_Info = new TGet_GLM_Info(FledgerInfo.LedgerNumber,
                                                                       aSuspenseAccountRow.SuspenseAccountCode,
                                                                       FledgerInfo.CurrentFinancialYear);

                        if (get_GLM_Info.GLMExists)
                        {
                            TGlmpInfo get_GLMp_Info = new TGlmpInfo(FledgerInfo.LedgerNumber);
                            get_GLMp_Info.LoadBySequence(get_GLM_Info.Sequence, FledgerInfo.CurrentPeriod);

                            if (get_GLMp_Info.RowExists && (get_GLMp_Info.ActualBase != 0))
                            {
                                TVerificationResult tvr = new TVerificationResult(
                                    Catalog.GetString("Non Zero Suspense Account found"),
                                    String.Format(Catalog.GetString("Suspense account {0} has the balance value {1}. It is required to be zero."),
                                                  getSuspenseAccountInfo.ToString(),
                                                  get_GLMp_Info.ActualBase), "",
                                    TPeriodEndErrorAndStatusCodes.PEEC_07.ToString(), TResultSeverity.Resv_Critical);
                                FverificationResults.Add(tvr);

                                FHasCriticalErrors = true;
                                FverificationResults.Add(tvr);
                            }
                        }
                    }
                }
            }
        } // CheckFor SuspenseAccountsZero
コード例 #3
0
        private void CheckForSuspenseAccounts()
        {
            if (getSuspenseAccountInfo == null)
            {
                getSuspenseAccountInfo =
                    new GetSuspenseAccountInfo(FledgerInfo.LedgerNumber);
            }

            if (getSuspenseAccountInfo.RowCount != 0)
            {
                TVerificationResult tvr = new TVerificationResult(
                    Catalog.GetString("Suspense Accounts found"),
                    String.Format(
                        Catalog.GetString(
                            "Have you checked the details of suspense account {0}?"),
                        getSuspenseAccountInfo.ToString()),
                    "", TPeriodEndErrorAndStatusCodes.PEEC_07.ToString(), TResultSeverity.Resv_Status);
                FverificationResults.Add(tvr);
            }
        }
コード例 #4
0
        private void CheckForSuspenseAccountsZero()
        {
            if (FledgerInfo.CurrentPeriod == FledgerInfo.NumberOfAccountingPeriods)
            {
                // This means: The last accounting period of the year is running!

                if (getSuspenseAccountInfo == null)
                {
                    getSuspenseAccountInfo =
                        new GetSuspenseAccountInfo(FledgerInfo.LedgerNumber);
                }

                if (getSuspenseAccountInfo.RowCount > 0)
                {
                    ASuspenseAccountRow aSuspenseAccountRow;

                    for (int i = 0; i < getSuspenseAccountInfo.RowCount; ++i)
                    {
                        aSuspenseAccountRow = getSuspenseAccountInfo.Row(i);
                        TGet_GLM_Info get_GLM_Info = new TGet_GLM_Info(FledgerInfo.LedgerNumber,
                            aSuspenseAccountRow.SuspenseAccountCode,
                            FledgerInfo.CurrentFinancialYear);

                        TGlmpInfo get_GLMp_Info = new TGlmpInfo(
                            -1, -1,
                            get_GLM_Info.Sequence,
                            FledgerInfo.CurrentPeriod);

                        if (get_GLMp_Info.RowExists)
                        {
                            TVerificationResult tvr = new TVerificationResult(
                                Catalog.GetString("Non Zero Suspense Account found"),
                                String.Format(Catalog.GetString("Suspense account {0} has the balance value {1}. It is required to be zero."),
                                    getSuspenseAccountInfo.ToString(),
                                    get_GLMp_Info.ActualBase), "",
                                TPeriodEndErrorAndStatusCodes.PEEC_07.ToString(), TResultSeverity.Resv_Critical);
                            FverificationResults.Add(tvr);

                            FHasCriticalErrors = true;
                            FverificationResults.Add(tvr);
                        }
                    }
                }
            }
        }
コード例 #5
0
        private void CheckForSuspenseAccounts()
        {
            if (getSuspenseAccountInfo == null)
            {
                getSuspenseAccountInfo =
                    new GetSuspenseAccountInfo(FledgerInfo.LedgerNumber);
            }

            if (getSuspenseAccountInfo.RowCount != 0)
            {
                TVerificationResult tvr = new TVerificationResult(
                    Catalog.GetString("Suspense Accounts found"),
                    String.Format(
                        Catalog.GetString(
                            "Have you checked the details of suspense account {0}?"),
                        getSuspenseAccountInfo.ToString()),
                    "", TPeriodEndErrorAndStatusCodes.PEEC_07.ToString(), TResultSeverity.Resv_Status);
                FverificationResults.Add(tvr);
            }
        }