MH: Wöll Fahrtkostenpauschalen
This commit is contained in:
@@ -4,6 +4,7 @@ using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -35,10 +36,11 @@ namespace BetreutesWohnenWoellReports.Invoicing
|
||||
InvoiceItem invoiceItem = CreateInvoiceItem(iServiceRecord, scap, calc);
|
||||
invoiceItem.Notice = iServiceRecord.ServiceDescription.CategoryName;
|
||||
if (invoiceItem != null)
|
||||
{
|
||||
{
|
||||
var function = scap.CostBearer2SupportConcept.CostBearer.Organisation.Function;
|
||||
list.Add(invoiceItem);
|
||||
if (iServiceRecord.DistanceInMeter.HasValue && iServiceRecord.DistanceInMeter.Value > 0)
|
||||
list.Add(CreateFahrtkostenItem(invoiceItem));
|
||||
list.Add(CreateFahrtkostenItem(invoiceItem, function));
|
||||
}
|
||||
iServiceRecord.AlreadyAccounted = true;
|
||||
}
|
||||
@@ -53,11 +55,19 @@ namespace BetreutesWohnenWoellReports.Invoicing
|
||||
//return CreateSummaryInvoiceItems(list, invoicePeriod, scap, calc);
|
||||
}
|
||||
|
||||
private InvoiceItem CreateFahrtkostenItem(InvoiceItem item)
|
||||
private InvoiceItem CreateFahrtkostenItem(InvoiceItem item, ValueListEntry function)
|
||||
{
|
||||
InvoiceItem fahrtkostenItem = new InvoiceItem();
|
||||
var preis = GetPreis("Fahrkosten", item.ServiceRecord.Start.Value);
|
||||
|
||||
if (function != null && function.Value.IsNotNullOrEmpty())
|
||||
{
|
||||
if (function.Value == "Pflegekassen")
|
||||
preis = GetPreis("Fahrtkosten Pflegekasse", item.ServiceRecord.Start.Value);
|
||||
else if (function.Value == "Jugendamt")
|
||||
preis = GetPreis("Fahrtkosten Jugendamt", item.ServiceRecord.Start.Value);
|
||||
}
|
||||
InvoiceItem fahrtkostenItem = new InvoiceItem();
|
||||
|
||||
fahrtkostenItem.AmountPerUnit = preis;
|
||||
fahrtkostenItem.AmountTotal = preis * item.ServiceRecord.DistanceInMeter;
|
||||
fahrtkostenItem.GrossAmountTotal = fahrtkostenItem.AmountTotal;
|
||||
|
||||
Reference in New Issue
Block a user