private async Task CreateTransactionLog(int accountID, decimal value, eTransactionType type)
        {
            AccountTransaction transModel = new AccountTransaction
            {
                AccountID = accountID,
                Type      = type,
                Value     = value
            };

            await _trans.InsertAsync(transModel);
        }
Example #2
0
 public InsertTransactionCommand(
     eTransactionType transactionType,
     DateTime date,
     double value,
     int accountId)
 {
     TransactionType = transactionType;
     Date            = date;
     Value           = value;
     AccountId       = accountId;
 }
Example #3
0
        private void ExecuteTransaction(string accountNumber, decimal value, eTransactionType type)
        {
            var transactionRequest = new TransactionAccountRequest();

            transactionRequest.AccountNumber = accountNumber;
            transactionRequest.Type          = type.ToString();
            transactionRequest.Value         = value;

            _acessoAccountService.PostTransactionAsync(transactionRequest);

            Log.Information("Account {AccountNumber} has been {Type}.", accountNumber, type.ToString());
        }
 public UpdateTransactionCommand(
     int id,
     eTransactionType transactionType,
     DateTime date,
     double value,
     int accountId)
 {
     Id = id;
     TransactionType = transactionType;
     Date            = date;
     Value           = value;
     AccountId       = accountId;
 }
        public CfopDetermination(string pCompanyDb, eTransactionType pTransaciotn,
                                 int categoryIdForIpi    = -4,
                                 int categoryIdForPis    = -8,
                                 int categoryIdForCofins = -9,
                                 int categoryIdForIcms   = -6)
        {
            CompanyDb = pCompanyDb;
            TransType = pTransaciotn;

            _categoryIdForIpi    = categoryIdForIpi;
            _categoryIdForPis    = categoryIdForPis;
            _categoryIdForCofins = categoryIdForCofins;
            _categoryIdForIcms   = categoryIdForIcms;
        }
Example #6
0
        private static void RevertValues(eTransactionType transactionType, double value, Entities.Account account)
        {
            switch (transactionType)
            {
            case eTransactionType.Deposit:
                account.CurrentBalance -= value;
                break;

            case eTransactionType.Payment:
            case eTransactionType.Withdraw:
            default:
                account.CurrentBalance += value;
                break;
            }
        }
Example #7
0
 internal Transaction(
     eTransactionType transactionType,
     long coinId,
     double amount,
     double pricePerCoin,
     string exchangeName,
     long unixTimestamp)
 {
     this.transactionType = transactionType;
     this.coinId          = coinId;
     this.amount          = amount;
     this.pricePerCoin    = pricePerCoin;
     this.exchangeName    = exchangeName;
     this.unixTimestamp   = unixTimestamp;
 }
Example #8
0
        //============================================================================*
        // Copy()
        //============================================================================*

        public void Copy(cTransaction Transaction)
        {
            m_fAutoTrans = Transaction.m_fAutoTrans;

            m_Date             = Transaction.m_Date;
            m_eTransactionType = Transaction.m_eTransactionType;
            m_strSource        = Transaction.m_strSource;

            m_Supply = Transaction.m_Supply;

            m_nBatchID = Transaction.m_nBatchID;

            m_dQuantity = Transaction.m_dQuantity;
            m_dCost     = Transaction.m_dCost;
            m_dTax      = Transaction.m_dTax;
            m_dShipping = Transaction.m_dShipping;
            m_fApplyTax = Transaction.m_fApplyTax;

            m_fChecked = Transaction.m_fChecked;
        }
Example #9
0
        //============================================================================*
        // TransactionTypeString()
        //============================================================================*

        public static string TransactionTypeString(eTransactionType eTransactionType)
        {
            switch (eTransactionType)
            {
            case eTransactionType.Purchase:
                return("Add Purchase");

            case eTransactionType.AddStock:
                return("Increase Stock");

            case eTransactionType.Fired:
                return("Record Fired Ammo");

            case eTransactionType.ReduceStock:
                return("Reduce Stock");

            case eTransactionType.SetStockLevel:
                return("Add Initial Stock");
            }

            return("** Unknown **");
        }
 /// <summary>
 /// Instancia a classe de determinação de código de imposto
 /// </summary>
 /// <param name="pCompanyDB">Banco de dados da empresa</param>
 /// <param name="pTransType">Tipo de Transação</param>
 public TaxCodeDetermination(string pCompanyDB, eTransactionType pTransType)
 {
     this.CompanyDb = pCompanyDB;
     this.TransType = pTransType;
 }
Example #11
0
		public SingleTransaction()
		{
			transactionType = SingleTransaction.eTransactionType.None;
			transactionQty = 0;
			transactionPrice = 0.0M;
			transactionCharges = 0.0M;
			transactionReconciledFlag = false;
			transactionLotIdentifier = "";
			transactionStockCode = "";
			transactionDate = DateTime.Now;
		}
Example #12
0
 public bool IsOppositeType(eTransactionType e)
 {
     return (((e == eTransactionType.Buy || e == eTransactionType.Add) && this.IsDisposal())||
         ((e == eTransactionType.Sell || e == eTransactionType.Remove) && this.IsAcquisition()));
 }
Example #13
0
		public SingleTransaction(SingleTransaction.eTransactionType tType, DateTime tDate, string tStockCode, long tQty, decimal tPrice, decimal tCharges,string tlotId)
		{
			transactionType = tType;
			transactionStockCode = tStockCode;
			transactionQty = tQty;
			transactionPrice = tPrice;
			transactionCharges = tCharges;
			transactionDate = tDate;
			transactionReconciledFlag = false;
			transactionLotIdentifier = tlotId;
			Debug.WriteLine (this, "Constructor of SingleTransaction called");
			
		}