コード例 #1
0
ファイル: FeeCalculator.cs プロジェクト: levik-buka/Wendy3
        private static bool CalculateCommonRealUsageFee(InvoiceShared realInvoice, InvoiceShared estimatedInvoice, FeeConfig feeConfig)
        {
            Contract.Requires(realInvoice != null);
            Contract.Requires(estimatedInvoice != null);
            Contract.Requires(feeConfig != null);

            realInvoice.GetUsageFee().CleanWaterFee += (estimatedInvoice.GetConsumption().Real *feeConfig.GetMonthlyCleanWaterUsageFeeWithoutVAT()).RoundToCents();
            realInvoice.GetUsageFee().WasteWaterFee += (estimatedInvoice.GetConsumption().Real *feeConfig.GetMonthlyWasteWaterUsageFeeWithoutVAT()).RoundToCents();

            return(true);
        }
コード例 #2
0
ファイル: FeeCalculator.cs プロジェクト: levik-buka/Wendy3
        private static bool CalculateCommonEstimatedUsageFee(InvoiceShared estimatedInvoice, FeeConfig feeConfig)
        {
            Contract.Requires(estimatedInvoice != null);
            Contract.Requires(feeConfig != null);

            if (estimatedInvoice.Balanced == false)
            {
                estimatedInvoice.GetUsageFee().CleanWaterFee = (estimatedInvoice.GetConsumption().Estimated *feeConfig.GetMonthlyCleanWaterUsageFeeWithoutVAT()).RoundToCents();
                estimatedInvoice.GetUsageFee().WasteWaterFee = (estimatedInvoice.GetConsumption().Estimated *feeConfig.GetMonthlyWasteWaterUsageFeeWithoutVAT()).RoundToCents();

                return(true);
            }

            return(false);
        }
コード例 #3
0
ファイル: FeeCalculator.cs プロジェクト: levik-buka/Wendy3
        private static void CalculateUserEstimatedUsageFee(UserInvoice userEstimatedInvoice, FeeConfig feeConfig)
        {
            Contract.Requires(userEstimatedInvoice != null);
            Contract.Requires(feeConfig != null);

            userEstimatedInvoice.GetUsageFee().CleanWaterFee = (userEstimatedInvoice.GetConsumption().Estimated *feeConfig.GetMonthlyCleanWaterUsageFeeWithoutVAT()).RoundToCents();
            userEstimatedInvoice.GetUsageFee().WasteWaterFee = (userEstimatedInvoice.GetConsumption().Estimated *feeConfig.GetMonthlyWasteWaterUsageFeeWithoutVAT()).RoundToCents();
        }