Example #1
0
        public XPCollection <Transaction> GetTransactionsAndRelatedTransactions(Session session, Guid billId)
        {
            try
            {
                XPCollection <Transaction> ret = null;
                XPCollection <Transaction> billTransactions      = null;
                XPCollection <Transaction> voucherTransactions   = null;
                XPCollection <Transaction> inventoryTransactions = null;
                InventoryCommandBO         inventoryCommandBO    = new InventoryCommandBO();

                inventoryTransactions = inventoryCommandBO.GetInventoryFinancialTransactionOfSourceBill(session, billId);

                ReceiptVoucherTransactionBO receiptVoucherTransactionBO = new ReceiptVoucherTransactionBO();

                //Get bill transactions
                billTransactions = GetTransactions(session, billId);
                //Get related voucher transactions
                voucherTransactions =
                    receiptVoucherTransactionBO.GetRelatedTransactionsWithBill(session, billId);
                //Get related inventory transactions...

                ret = billTransactions;

                if (voucherTransactions != null)
                {
                    ret.AddRange(voucherTransactions);
                }

                if (inventoryTransactions != null)
                {
                    ret.AddRange(inventoryTransactions);
                }

                return(ret);
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #2
0
        public XPCollection <Transaction> GetVoucherTransactions(Session session, Guid billId)
        {
            ReceiptVoucherTransactionBO receiptVoucherTransactionBO = new ReceiptVoucherTransactionBO();

            return(receiptVoucherTransactionBO.GetRelatedTransactionsWithBill(session, billId));
        }