public async Task Should_Success_Get_Report_Correction()
        {
            CreditorAccountService service = new CreditorAccountService(GetServiceProvider().Object, _dbContext(GetCurrentMethod()));
            var data     = _dataUtil(service).GetBankExpenditureNotePostedViewModel();
            var unitData = _dataUtil(service).GetNewData_UnitReceiptNotePostedViewModel();

            data.SupplierCode = unitData.SupplierCode;
            data.SupplierName = unitData.SupplierName;
            data.InvoiceNo    = unitData.InvoiceNo;
            var tempResponse = await service.CreateFromUnitReceiptNoteAsync(unitData);

            var Response = await service.CreateFromBankExpenditureNoteAsync(data);


            var reportResponse = service.GetReport(1, 25, data.SupplierName, data.Date.Month, data.Date.Year, 7);

            var test = reportResponse.Item1.Data.FirstOrDefault();
            await service.CreateFromUnitPaymentCorrection(new CreditorAccountUnitPaymentCorrectionPostedViewModel()
            {
                UnitReceiptNoteNo = test.UnitReceiptNoteNo, UnitPaymentCorrectionNo = "test"
            });

            service.GetReport(1, 25, data.SupplierName, data.Date.Month, data.Date.Year, 7);
            Assert.NotEmpty(reportResponse.Item1.Data);
        }
        public async Task Should_Success_Get_Report_Include_Previous_Month()
        {
            CreditorAccountService service = new CreditorAccountService(GetServiceProvider().Object, _dbContext(GetCurrentMethod()));
            var data     = _dataUtil(service).GetBankExpenditureNotePostedViewModel();
            var unitData = _dataUtil(service).GetNewData_UnitReceiptNotePostedViewModel();

            data.SupplierCode = unitData.SupplierCode;
            data.SupplierName = unitData.SupplierName;
            data.InvoiceNo    = unitData.InvoiceNo;
            data.Mutation     = unitData.DPP + unitData.PPN;
            data.Date         = data.Date.AddMonths(1);
            var memoData = _dataUtil(service).GetMemoPostedViewModel();

            memoData.SupplierCode = unitData.SupplierCode;
            memoData.SupplierName = unitData.SupplierName;
            memoData.InvoiceNo    = unitData.InvoiceNo;
            var tempResponse = await service.CreateFromUnitReceiptNoteAsync(unitData);

            var Response = await service.CreateFromBankExpenditureNoteAsync(data);

            var nextMonthUnitData = _dataUtil(service).GetNewData_UnitReceiptNotePostedViewModel();

            nextMonthUnitData.Date = nextMonthUnitData.Date.AddMonths(1);
            await service.CreateFromUnitReceiptNoteAsync(nextMonthUnitData);

            await service.CreateFromMemoAsync(memoData);

            var reportResponse = service.GetReport(1, 25, data.SupplierName, nextMonthUnitData.Date.Month, nextMonthUnitData.Date.Year, 7);

            Assert.NotEmpty(reportResponse.Item1.Data);
        }
        public async Task Should_Success_Get_Report_NoRate()
        {
            CreditorAccountService service = new CreditorAccountService(GetServiceProvider().Object, _dbContext(GetCurrentMethod()));
            var data     = _dataUtil(service).GetBankExpenditureNotePostedViewModel();
            var unitData = _dataUtil(service).GetNewData_UnitReceiptNotePostedViewModel();

            unitData.CurrencyRate = 0;
            data.SupplierCode     = unitData.SupplierCode;
            data.SupplierName     = unitData.SupplierName;
            data.InvoiceNo        = unitData.InvoiceNo;
            var tempResponse = await service.CreateFromUnitReceiptNoteAsync(unitData);

            var Response = await service.CreateFromBankExpenditureNoteAsync(data);

            var reportResponse = service.GetReport(1, 25, data.SupplierName, data.Date.Month, data.Date.Year, 7);

            Assert.NotEmpty(reportResponse.Item1.Data);
        }