示例#1
0
        /// <summary>
        /// These are the documents that will show in the cash statements
        /// </summary>
        /// <param name="cashTypeEnum"></param>
        /// <param name="cashStateEnum"></param>
        /// <param name="lstBuySellDocs"></param>
        /// <returns></returns>
        private List <BuySellDoc> get_BuySellDocs_Allocated_Payments(CashTypeENUM cashTypeEnum, CashStateENUM cashStateEnum)
        {
            List <BuySellDoc> lstBuySellDocs = new List <BuySellDoc>();

            if (cashTypeEnum == CashTypeENUM.Unknown)
            {
                throw new Exception("Cash Type Unknown");
            }

            if (cashStateEnum == CashStateENUM.Available)
            {
                return(lstBuySellDocs);
            }

            if (cashTypeEnum == CashTypeENUM.NonRefundable)
            {
                return(lstBuySellDocs);
            }

            lstBuySellDocs = BuySellDocBiz.FindAll().Where(x =>
                                                           x.BuySellDocStateEnum == BuySellDocStateENUM.RequestConfirmed ||
                                                           x.BuySellDocStateEnum == BuySellDocStateENUM.BeingPreparedForShipmentBySeller ||
                                                           x.BuySellDocStateEnum == BuySellDocStateENUM.ReadyForPickup ||
                                                           x.BuySellDocStateEnum == BuySellDocStateENUM.CourierAcceptedByBuyerAndSeller ||
                                                           x.BuySellDocStateEnum == BuySellDocStateENUM.CourierComingToPickUp ||
                                                           x.BuySellDocStateEnum == BuySellDocStateENUM.PickedUp ||
                                                           x.BuySellDocStateEnum == BuySellDocStateENUM.Enroute ||
                                                           x.BuySellDocStateEnum == BuySellDocStateENUM.Problem)
                             .ToList();

            return(lstBuySellDocs);
        }
示例#2
0
        private List <BuySellDoc> get_BuySellDoc_Completed_Payments(CashTypeENUM cashTypeEnum, CashStateENUM cashStateEnum)
        {
            if (cashTypeEnum == CashTypeENUM.Unknown)
            {
                throw new Exception("Cash Type Unknown");
            }

            if (cashTypeEnum == CashTypeENUM.NonRefundable)
            {
                //the buyselldoc are all refundable
                return(null);
            }


            List <BuySellDoc> lstBuySellDocs = BuySellDocBiz.FindAll().Where(x =>
                                                                             x.BuySellDocStateEnum == BuySellDocStateENUM.Delivered).ToList();

            return(lstBuySellDocs);
        }