private void ShowDataManual()
        {
            AccountsPayableTDSAApDocumentRow DocumentRow = FMainDS.AApDocument[0];

            FDocumentLedgerNumber = DocumentRow.LedgerNumber;

            // This will involve a trip to the server to access GLSetupTDS
            TFrmLedgerSettingsDialog settings = new TFrmLedgerSettingsDialog(this, FDocumentLedgerNumber);

            FRequireApprovalBeforePosting = settings.APRequiresApprovalBeforePosting;

            txtTotalAmount.CurrencyCode  = DocumentRow.CurrencyCode;
            txtDetailAmount.CurrencyCode = DocumentRow.CurrencyCode;
            dtpDateDue.Date = DocumentRow.DateIssued.AddDays(Convert.ToDouble(nudCreditTerms.Value));

            this.Text += " - " + TFinanceControls.GetLedgerNumberAndName(FDocumentLedgerNumber);

            FLedgerRow =
                ((ALedgerTable)TDataCache.TMFinance.GetCacheableFinanceTable(TCacheableFinanceTablesEnum.LedgerDetails, FDocumentLedgerNumber))[0];
            txtDetailBaseAmount.CurrencyCode = FLedgerRow.BaseCurrency;
            //txtExchangeRateToBase.SetControlProperties(10);

            //
            // If this document's currency is that of my own ledger,
            // I need to disable the rate of exchange field.
            if (DocumentRow.CurrencyCode == FLedgerRow.BaseCurrency)
            {
                txtExchangeRateToBase.Enabled = false;
                btnLookupExchangeRate.Enabled = false;
            }

            if ((FMainDS.AApDocumentDetail == null) || (FMainDS.AApDocumentDetail.Rows.Count == 0)) // When the document is new, I need to create the first detail line.
            {
                NewDetail(null, null);
            }

            FMainDS.AApDocumentDetail.DefaultView.Sort = AApDocumentDetailTable.GetDetailNumberDBName();

            // Create Text description of Anal Attribs for each DetailRow..
            foreach (AccountsPayableTDSAApDocumentDetailRow DetailRow in FMainDS.AApDocumentDetail.Rows)
            {
                UpdateAttributeLabel(DetailRow);
            }

            EnableControls();
        }
예제 #2
0
        private static void SetOutstandingAmount(AccountsPayableTDSAApDocumentRow Row, Int32 ALedgerNumber, AApDocumentPaymentTable DocPaymentTbl)
        {
            if (Row.DocumentStatus == MFinanceConstants.AP_DOCUMENT_PAID)
            {
                Row.OutstandingAmount = 0;
            }
            else
            {
                Row.OutstandingAmount = Row.TotalAmount;
            }

            if (Row.DocumentStatus == MFinanceConstants.AP_DOCUMENT_PARTIALLY_PAID)
            {
                // For any invoices that are partly paid, find out how much is outstanding.
                Row.OutstandingAmount -= UIConnectors.TFindUIConnector.GetPartPaidAmount(Row.ApDocumentId);
            }
        }
 private void ValidateDataManual(AccountsPayableTDSAApDocumentRow ARow)
 {
 }
 private void ValidateDataManual(AccountsPayableTDSAApDocumentRow ARow)
 {
 }