public IActionResult GetBySupplierUnit(int page = 1, int size = 25, string order = "{}", string keyword = null, string filter = "{}")
        {
            var Data = _facade.ReadBySupplierUnit(page, size, order, keyword, filter);

            var newData = _mapper.Map <List <UnitReceiptNoteViewModel> >(Data.Item1);

            List <object> listData = new List <object>();

            listData.AddRange(
                newData.AsQueryable().Select(s => new
            {
                s._id,
                s.no,
                s.date,
                s.supplier,
                s.doId,
                s.doNo,
                unit = new
                {
                    division = new { s.unit.division.name },
                    s.unit.name
                },
                s.items
            }).ToList()
                );

            return(Ok(new
            {
                apiVersion = ApiVersion,
                statusCode = General.OK_STATUS_CODE,
                message = General.OK_MESSAGE,
                data = listData,
                info = new Dictionary <string, object>
                {
                    { "count", listData.Count },
                    { "total", Data.Item2 },
                    { "order", Data.Item3 },
                    { "page", page },
                    { "size", size }
                },
            }));
        }
        public void Should_Success_Read_DataBySupplier()
        {
            var dbContext = _dbContext(GetCurrentMethod());
            UnitReceiptNoteFacade facade = new UnitReceiptNoteFacade(_ServiceProvider.Object, dbContext);
            var dataUtil = _dataUtil(facade, dbContext).GetTestData(USERNAME);
            var filter   = JsonConvert.SerializeObject(new
            {
                DivisionId    = "DivisionId",
                SupplierId    = "supId",
                PaymentMethod = "test",
                CurrencyCode  = "CurrencyCode",
                UseIncomeTax  = true,
                UseVat        = false,
                CategoryId    = "CategoryId"
            });

            var response = facade.ReadBySupplierUnit(Filter: filter);

            Assert.NotEqual(response.Data.Count, 0);
        }