This commit is contained in:
Christian
2019-08-19 11:59:38 +02:00
parent b37e64834c
commit dbe7021361
20 changed files with 482 additions and 244 deletions

View File

@@ -1509,7 +1509,7 @@ namespace BeWo.Core
if (BeWoApp.MainControl.HomeButtonPanel == null)
return;
BeWoApp.MainControl.HomeView.txtHeader.Text = BeWoApp.LoggedOnUser.Employee.ToString();
//BeWoApp.MainControl.HomeView.txtHeader.Text = BeWoApp.LoggedOnUser.Employee.ToString();
}
public static void WriteExcelFile(string content, string path)
@@ -1947,13 +1947,13 @@ namespace BeWo.Core
documentPreviewControl.SnapsToDevicePixels = true;
window = new BeWoWindow { GroupBoxContent = documentPreviewControl, Owner = BeWoApp.CurrentBeWo.MainWindow };
ThemeManager.SetTheme(window, Theme.Office2010Black);
}
//ThemeManager.SetTheme(documentPreviewControl, Theme.Office2007Black);
ThemeManager.SetTheme(window, Theme.Office2010Black);
}
ThemeManager.SetTheme(documentPreviewControl, Theme.Office2010Black);
documentPreviewControl.DocumentSource = report;
documentPreviewControl.DocumentSource = report;
if(window != null)
{

View File

@@ -5,6 +5,7 @@
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
Height="Auto" Width="Auto"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
<Grid>
@@ -35,74 +36,77 @@
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Rectangle Fill="{DynamicResource AdministrationContentBrush}" Height="6" />
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="250"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<dxa:AccordionControl x:Name="Root" Background="Transparent" VerticalAlignment="Top">
<dxa:AccordionItem Header="Allgemein" Tag="Header" >
<dxa:AccordionItem Header="Einstellungen" Name="TabitemMandator" Selected="Tabitem_Selected"/>
<Rectangle Fill="{DynamicResource AdministrationContentBrush}" Height="6" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="250"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Border Margin="5" VerticalAlignment="Stretch" Background="Transparent" >
<dxa:AccordionControl x:Name="Root" Background="Transparent" VerticalAlignment="Top" dx:ThemeManager.ThemeName="Office2013" BorderThickness="0" RootItemExpandButtonPosition="Left">
<dxa:AccordionItem Header="{markup:Translate Allgemein}" Tag="Header" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Einstellungen}" Name="TabitemMandator" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Ankündigungen}" Name="TabitemNews" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="Personen">
<dxa:AccordionItem Header="Nationalitäten" Name="TabitemNationality" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Aufenthaltsstatus" Name="TabitemAufenthaltsstatus" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="{markup:Translate Klienten}" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Behinderungskategorien}" Name="TabitemDisablityTypes" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Betreuungsarten}" Name="TabitemCustomerCareTypes" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Gründe für Beendigung der Betreuung}" Name="TabitemTerminationReasons" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Vermittlung}" Name="TabitemPlacementObjectives" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Medikamentenarten}" Name="TabitemMedikamentenarten" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Rollen des Umfeldes}" Name="TabitemEnvironmentRoles" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="{markup:Translate Mitarbeiter}" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Abschlüsse der Mitarbeiter}" Name="TabitemQualificationTypes" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Schwerpunkte des Personals}" Name="TabitemActivityFocus" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Qualifikationsbedarf}" Name="TabitemQualifikationsbedarf" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Beschäftigungsarten}" Name="TabitemEmploymentTypes" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Rollen des Personals}" Name="TabitemRoles" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Überstunden Auszahlungsarten}" Name="TabitemAuszahlungsarten" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="{markup:Translate Personen}" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Nationalitäten}" Name="TabitemNationality" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Aufenthaltsstatus}" Name="TabitemAufenthaltsstatus" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Titel}" Name="TabitemTitles" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Funktionen}" Name="TabitemFunctions" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="Mitarbeiter">
<dxa:AccordionItem Header="{markup:Translate Abschlüsse der Mitarbeiter}" Name="TabitemQualificationTypes" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Schwerpunkte des Personals" Name="TabitemActivityFocus" Selected="Tabitem_Selected" />
</dxa:AccordionItem>
<dxa:AccordionItem Header="Ungeordnet">
<dxa:AccordionItem Header="Notizenkategorie" Name="TabitemNotizenkategorie" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="{markup:Translate Qualifikationsbedarf}" Name="TabitemQualifikationsbedarf" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Abwesenheitskategorien" Name="TabitemAbsenceCategories" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Behinderungskategorien" Name="TabitemDisablityTypes" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Beschäftigungsarten" Name="TabitemEmploymentTypes" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Betreuungsarten" Name="TabitemCustomerCareTypes" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Gründe für Beendigung der Betreuung" Name="TabitemTerminationReasons" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Vermittlung" Name="TabitemPlacementObjectives" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Titel" Name="TabitemTitles" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Funktionen" Name="TabitemFunctions" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Finanzkategorien" Name="TabitemFinazCategories" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Leistungskategorien" Name="TabitemServiceCategories" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Leistungen" Name="TabitemServiceDescriptions" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Textbausteine" Name="TabitemTextbausteine" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Medikamentenarten" Name="TabitemMedikamentenarten" Selected="Tabitem_Selected"/>
<dxa:AccordionItem Header="Rollen des Personals" Name="TabitemRoles" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Rollen des Umfeldes" Name="TabitemEnvironmentRoles" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Ressourcenkategorien" Name="TabitemResourceCategories" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Ressourcen" Name="TabitemResources" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Ziele und Maßnahmen" Name="TabitemGoalcategories" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Ankündigungen" Name="TabitemNews" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Punktebogen Werte" Name="TabitemAssessmentSheetValues" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Punktebogen Kategorien" Name="TabitemAssessmentSheetCategories" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Bereiche" Name="TabitemAdditionalServices" Selected="Tabitem_Selected"/>
<dxa:AccordionItem Header="Angebote" Name="TabitemAdditionalServiceRegions" Selected="Tabitem_Selected"/>
<dxa:AccordionItem Header="Überstunden Auszahlungsarten" Name="TabitemAuszahlungsarten" Selected="Tabitem_Selected"/>
<dxa:AccordionItem Header="Dokumentationsfelder" Name="TabitemDokumenttype" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="{markup:Translate Schulbegleitender Dienst}" Name="TabitemSbd" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="{markup:Translate Vertragsarten}" Name="TabitemContracttypes" Selected="Tabitem_Selected" />
<dxa:AccordionItem Header="Budgets" Name="TabitemBudgets" Selected="Tabitem_Selected" />
</dxa:AccordionItem>
<dxa:AccordionItem Header="Platzhalter">
<dxa:AccordionItem Header="{markup:Translate Zeiterfassung}" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Leistungskategorien}" Name="TabitemServiceCategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Leistungen}" Name="TabitemServiceDescriptions" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Textbausteine}" Name="TabitemTextbausteine" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Dokumentationsfelder}" Name="TabitemDokumenttype" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Ziele und Maßnahmen}" Name="TabitemGoalcategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Punktebogen Werte}" Name="TabitemAssessmentSheetValues" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Punktebogen Kategorien}" Name="TabitemAssessmentSheetCategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Bereiche}" Name="TabitemAdditionalServices" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Angebote}" Name="TabitemAdditionalServiceRegions" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="Platzhalter2">
<dxa:AccordionItem Header="{markup:Translate Kalender}" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Ressourcenkategorien}" Name="TabitemResourceCategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Ressource}" Name="TabitemResources" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="Ungeordnet" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Notizenkategorie}" Name="TabitemNotizenkategorie" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Abwesenheitskategorien}" Name="TabitemAbsenceCategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Finanzkategorien}" Name="TabitemFinazCategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Schulbegleitender Dienst}" Name="TabitemSbd" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Vertragsarten}" Name="TabitemContracttypes" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Budgets}" Name="TabitemBudgets" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="Platzhalter3">
</dxa:AccordionItem>
<dxa:AccordionItem Header="Platzhalter4">
</dxa:AccordionItem>
</dxa:AccordionControl>
<Border Grid.Column="1" Margin="5" VerticalAlignment="Stretch" x:Name="ContentBorder" >
</dxa:AccordionControl>
</Border>
<ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Auto">
<Border Margin="5" VerticalAlignment="Stretch" x:Name="ContentBorder" >
</Border>
</ScrollViewer>
</Grid>
</ScrollViewer>
<Border Grid.Row="2" Grid.ColumnSpan="3" Height="40" Margin="0,0,0,0" VerticalAlignment="Stretch"
Background="#FF000000">
<Border.OpacityMask>

View File

@@ -21,7 +21,7 @@ namespace BeWo.View.Master
{
#region Fields
private readonly Dictionary<AccordionItem, BeWoView> _OpenViews = new Dictionary<AccordionItem, BeWoView>();
private readonly Dictionary<String, BeWoView> _OpenViews = new Dictionary<String, BeWoView>();
private BeWoView _SelectedView;
@@ -93,8 +93,8 @@ namespace BeWo.View.Master
if (!(sender is AccordionItem selectedAccordionItem))
return;
if (_OpenViews.ContainsKey(selectedAccordionItem))
SetView(_OpenViews[selectedAccordionItem]);
if (_OpenViews.ContainsKey(selectedAccordionItem.Header.ToString()))
SetView(_OpenViews[selectedAccordionItem.Header.ToString()]);
else
GenerateNewView(selectedAccordionItem);
}
@@ -127,13 +127,13 @@ namespace BeWo.View.Master
internal override bool DoSaveCheck()
{
if (!(Root.SelectedItem is AccordionItem item) || !_OpenViews.ContainsKey(item)) return true;
if (!(Root.SelectedItem is AccordionItem item) || !_OpenViews.ContainsKey(item.Header.ToString())) return true;
var lDoSave = SelectedView.DoSaveCheck();
if (!lDoSave || !IsDirty) return lDoSave;
_OpenViews.Remove((AccordionItem)Root.SelectedItem);
_OpenViews.Remove(((AccordionItem)Root.SelectedItem).Header.ToString());
return true;
}
@@ -152,7 +152,7 @@ namespace BeWo.View.Master
pView.MaxHeight = ActualHeight - 120;
}
_OpenViews.Add(pTabItem, pView);
_OpenViews.Add(pTabItem.Header.ToString(), pView);
SetView(pView);
}

View File

@@ -292,7 +292,7 @@
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<UseIIS>False</UseIIS>
<AutoAssignPort>False</AutoAssignPort>
<DevelopmentServerPort>8808</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>

View File

@@ -16,14 +16,9 @@
</property>
<property name="connection.connection_string">
Server=localhost;Password=root;User ID=root; Initial Catalog=bewodemo
Server=localhost;Password=root;User ID=root; Initial Catalog=alpha
</property>
<!--<property name="connection.connection_string">
Server=localhost;Password=root;User ID=root; Initial Catalog=dakonielandshut
</property>-->
<property name="dialect">
NHibernate.Dialect.MySQLDialect
</property>

View File

@@ -1,11 +1,5 @@
ALTER TABLE `bewodemo`.`supportconceptapprovalperiod`
ADD COLUMN `BudgetOid` BIGINT(19) NULL DEFAULT NULL AFTER `ContactCountInterval`,
ADD COLUMN `Bewilligungsart` INT(10) NOT NULL DEFAULT 0 AFTER `BudgetOid`,
ADD INDEX `FK_Budget_idx` (`BudgetOid` ASC) VISIBLE;
;
ALTER TABLE `bewodemo`.`supportconceptapprovalperiod`
ADD CONSTRAINT `FK_Budget`
FOREIGN KEY (`BudgetOid`)
REFERENCES `bewodemo`.`budget` (`Oid`)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
ALTER TABLE `supportconceptapprovalperiod`
ADD COLUMN `BudgetOid` BIGINT(19) NULL DEFAULT NULL;
ALTER TABLE `supportconceptapprovalperiod`
ADD COLUMN `Bewilligungsart` INT(10) NOT NULL DEFAULT 0;

View File

@@ -1,16 +1,2 @@
ALTER TABLE `bewodemo`.`notizeneintrag`
DROP FOREIGN KEY `FK_NOTIZENEINTRAG_KATEGORIE`;
ALTER TABLE `bewodemo`.`notizeneintrag`
ADD COLUMN `EintragKategorieOid` BIGINT(19) NULL DEFAULT NULL AFTER `NotizenKategorieOid`,
ADD INDEX `EINTRAG_KATEGORIE_FK` (`EintragKategorieOid` ASC) VISIBLE;
ALTER TABLE `bewodemo`.`notizeneintrag` RENAME INDEX `NOTIZENEINTRAG_KATEGORIE_FK` TO `NOTIZEN_KATEGORIE_FK`;
ALTER TABLE `bewodemo`.`notizeneintrag` ALTER INDEX `NOTIZEN_KATEGORIE_FK` INVISIBLE;
ALTER TABLE `bewodemo`.`notizeneintrag`
ADD CONSTRAINT `FK_NOTIZEN_KATEGORIE`
FOREIGN KEY (`NotizenKategorieOid`)
REFERENCES `bewodemo`.`notizenkategorie` (`Oid`),
ADD CONSTRAINT `FK_EINTRAG_KATEGORIE`
FOREIGN KEY (`EintragKategorieOid`)
REFERENCES `bewodemo`.`valuelistentry` (`Oid`)
ON DELETE RESTRICT
ON UPDATE RESTRICT;
ALTER TABLE `notizeneintrag`
ADD COLUMN `EintragKategorieOid` BIGINT(19) NULL DEFAULT NULL

View File

@@ -573,6 +573,7 @@ namespace BeWo.Report.ReportObjects
private decimal GetArbeitszeitStundenFuerTag(Arbeitszeit az, DateTime tag)
{
var day = tag.DayOfWeek;
decimal stunden = 0;
foreach (var ae in az.ArbeitszeitEintraege)
{
if (SindAmGleichenWochentag(day, ae.Tag))
@@ -586,12 +587,12 @@ namespace BeWo.Report.ReportObjects
if (DateTime.TryParse(dateStr1, out date1) && DateTime.TryParse(dateStr2, out date2))
{
return (decimal)date2.Subtract(date1).TotalHours;
stunden += (decimal)date2.Subtract(date1).TotalHours;
}
}
}
return 0;
return stunden;
}
private bool SindAmGleichenWochentag(DayOfWeek day, AppointmentDayOfWeek aeTag)

View File

@@ -47,10 +47,10 @@ namespace AlphaEv.Export
public static String GetAbrechnungenString(DateTime date)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("DebKonto;Datum;Kst;Text;Betrag;leer;leer;leer;Sachkonto");
sb.AppendLine("Klient;DebKonto;Datum;Kst;Text;Betrag;leer;leer;leer;Sachkonto");
List<long> oidList = new List<long>();
oidList.Add(1);
oidList.Add(7);
oidList.Add(1); // Fachleistung
oidList.Add(7); // Nicht-Fachkräfte
var s = GetMonatlicheAbrechnungStringForCats(date, oidList, "4016", null);
if (!String.IsNullOrWhiteSpace(s))
{
@@ -59,6 +59,7 @@ namespace AlphaEv.Export
//Assistenzstunden
oidList.Clear();
oidList.Add(2);
oidList.Add(3);
@@ -67,7 +68,7 @@ namespace AlphaEv.Export
oidList.Clear();
oidList.Add(2);
s = GetMonatlicheAbrechnungStringForCats(date, oidList, "4018", costDict);
s = GetMonatlicheAbrechnungStringForCats(date, oidList, "4019", costDict);
if (!String.IsNullOrWhiteSpace(s))
{
@@ -79,7 +80,7 @@ namespace AlphaEv.Export
oidList.Clear();
oidList.Add(3);
s = GetMonatlicheAbrechnungStringForCats(date, oidList, "4018", costDict);
s = GetMonatlicheAbrechnungStringForCats(date, oidList, "4019", costDict);
if (!String.IsNullOrWhiteSpace(s))
{
@@ -88,6 +89,7 @@ namespace AlphaEv.Export
sb.Append(s);
}
//Flex
oidList.Clear();
oidList.Add(10);
oidList.Add(13);
@@ -111,9 +113,23 @@ namespace AlphaEv.Export
return sb.ToString();
}
public static String GetMonatlicheAbrechnungStringForCats(DateTime date, IList<long> catOids, String sachkonto, Dictionary<long, decimal> costDict)
public static String GetMonatlicheAbrechnungStringForCats(DateTime date, IList<long> catOids, String sachkonto, Dictionary<long, decimal> costDict, bool nurGruppen, bool nurNichtGruppen)
{
var dt = ExecuteQuery(GetMonatlicheAbrechnungStringForCatsSql(date, catOids), date);
var sql = "";
if (nurGruppen && nurNichtGruppen)
{
sql = GetMonatlicheAbrechnungStringForCatsSql(date, catOids);
}
else
{
if (nurGruppen)
{
sql = GetMonatlicheAbrechnungStringForCatsSqlMitGruppen(date, catOids);
}
}
var dt = ExecuteQuery(sql, date);
StringBuilder sb = new StringBuilder();
foreach (DataRow row in dt.Rows)
@@ -125,7 +141,7 @@ namespace AlphaEv.Export
for (int i = 0; i < row.ItemArray.Length; i++)
{
if (i < 8)
if (i < 9)
{
if (i > 0)
{
@@ -135,17 +151,17 @@ namespace AlphaEv.Export
var item = row[i];
if (i == 4 && row[4] != null)
if (i == 5 && row[5] != null)
{
decimal betrag = 0;
Decimal.TryParse(row[4].ToString(), out betrag);
Decimal.TryParse(row[5].ToString(), out betrag);
//var betrag = (decimal) row[4];
if (row[8] != null && row[9] != null && costDict != null)
if (row[9] != null && row[10] != null && costDict != null)
{
var minuten = (decimal) row[8];
var minuten = (decimal) row[9];
var catOid = (long) row[9];
var catOid = (long) row[10];
if (costDict.ContainsKey(catOid))
{
@@ -166,7 +182,7 @@ namespace AlphaEv.Export
sb.Append(item);
}
if (i == 3)
if (i == 4)
{
sb.Append(" Std");
}
@@ -216,6 +232,58 @@ namespace AlphaEv.Export
String sql = @"
SELECT
CONCAT(p.Lastname, ', ', p.Firstname),
c.DebitorNumber as 'DebKonto',
DATE_FORMAT(DATE_ADD(':Monat_End',INTERVAL -1 DAY), '%d.%m.%Y') as 'Datum',
c.`CostCenter` AS 'Kst',
ROUND(sr.`GeleisteteFLM` / 60, 2) as 'Text',
IF(crpRateFactor.`CostRateValue` is null,
ROUND(ROUND(sr.`GeleisteteFLM` / 60, 2) * (SELECT crp.`CostRateValue` FROM `costrateperiod` crp WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 0 AND crp.`ObjectOid` = cb2sc.`CostBearerOid` AND (crp.`EndDate` is null or crp.`EndDate` > ':Monat_Start') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 ), 2),
ROUND(ROUND((sr.`GeleisteteFLM` / 60) * ((100 + crpRateFactor.`CostRateValue`)/100), 2) * (SELECT crp.`CostRateValue` FROM `costrateperiod` crp WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 0 AND crp.`ObjectOid` = cb2sc.`CostBearerOid` AND (crp.`EndDate` is null or crp.`EndDate` > ':Monat_Start') order by IF(crp.`EndDate` is null, MAKEDATE(9999,365),crp.`EndDate`) LIMIT 1 ), 2)) AS 'Betrag',
'',
'',
'',
sr.`GeleisteteFLM`,
sr.CatOid
FROM `supportconcept` sc
INNER JOIN `costbearer2supportconcept` cb2sc ON sc.`Oid` = cb2sc.`SupportConceptOid`
INNER JOIN `costbearer` cb ON cb2sc.`CostBearerOid` = cb.`Oid`
LEFT JOIN
(SELECT crp.`ObjectOid`, crp.`CostRateValue` FROM `costrateperiod` crp
WHERE crp.`ObjectTid` = 22 AND crp.`CostRateType` = 2 AND (crp.`EndDate` is null or crp.`EndDate` > NOW()))
AS crpRateFactor ON crpRateFactor.`ObjectOid` = cb.`Oid`
INNER JOIN `organisation` org ON org.`CostBearerOid` = cb.`Oid`
INNER JOIN `customer` c ON sc.`CustomerOid` = c.`Oid`
INNER JOIN `person` p on c.`PersonOid` = p.`Oid`
LEFT JOIN
(SELECT sr2.`CostBearer2SupportConceptOid`, SUM(sr2.`roundedduration` / IF(sr2.`GroupEmployeeCount` is null, 1, sr2.`GroupEmployeeCount`)) AS GeleisteteFLM, sc.Oid as CatOid FROM `servicerecord` sr2
INNER JOIN `servicedescription` sd ON sr2.`ServiceDescriptionOid` = sd.`Oid`
INNER JOIN `servicecategory` sc ON sd.`ServiceCategoryOid` = sc.`Oid`
WHERE sr2.`StartDate` >= ':Monat_Start' AND sr2.`StartDate` < ':Monat_End' AND sc.`Billable` = 1 AND sc.oid in (CATOIDLIST) GROUP BY sr2.`CostBearer2SupportConceptOid`)
AS sr ON sr.`CostBearer2SupportConceptOid` = cb2sc.`Oid`
WHERE c.`IsActive` <> 0 AND sc.`IsActive` <> 0
and (sr.`GeleisteteFLM` is not null)
ORDER BY p.`LastName`, p.`FirstName`, cb2sc.`ApprovedStartDate`
";
return sql.Replace("CATOIDLIST", oidList.ToString());
}
private static String GetMonatlicheAbrechnungStringForCatsSqlGruppen(DateTime date, IList<long> catOids, bool gruppenHolen)
{
StringBuilder oidList = new StringBuilder();
foreach (var catOid in catOids)
{
if (oidList.Length > 0)
oidList.Append(",");
oidList.Append(catOid);
}
String sql = @"
SELECT
CONCAT(p.Lastname, ', ', p.Firstname),
c.DebitorNumber as 'DebKonto',
DATE_FORMAT(DATE_ADD(':Monat_End',INTERVAL -1 DAY), '%d.%m.%Y') as 'Datum',
c.`CostCenter` AS 'Kst',

View File

@@ -36,8 +36,6 @@ namespace FreundeskreisSuchthilfe
this.lblMonat = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel11 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
this.lblBewilligungVom = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.lblAddress = new DevExpress.XtraReports.UI.XRLabel();
@@ -89,12 +87,10 @@ namespace FreundeskreisSuchthilfe
this.lblMonat,
this.xrLabel11,
this.xrLabel10,
this.lblBewilligungVom,
this.xrLabel8,
this.xrLabel7,
this.xrLabel6,
this.lblAddress});
this.ReportHeader.HeightF = 400F;
this.ReportHeader.HeightF = 382.2917F;
this.ReportHeader.Name = "ReportHeader";
this.ReportHeader.StylePriority.UseFont = false;
//
@@ -115,7 +111,7 @@ namespace FreundeskreisSuchthilfe
//
// lblMonat
//
this.lblMonat.LocationFloat = new DevExpress.Utils.PointFloat(0F, 364.2084F);
this.lblMonat.LocationFloat = new DevExpress.Utils.PointFloat(0F, 345.4584F);
this.lblMonat.Multiline = true;
this.lblMonat.Name = "lblMonat";
this.lblMonat.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -125,7 +121,7 @@ namespace FreundeskreisSuchthilfe
//
// xrLabel11
//
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(0F, 328.2083F);
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(0F, 309.4583F);
this.xrLabel11.Multiline = true;
this.xrLabel11.Name = "xrLabel11";
this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
@@ -135,33 +131,13 @@ namespace FreundeskreisSuchthilfe
//
// xrLabel10
//
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(0F, 274.8542F);
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(0F, 256.1042F);
this.xrLabel10.Multiline = true;
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel10.SizeF = new System.Drawing.SizeF(408.3333F, 22.125F);
this.xrLabel10.StylePriority.UseFont = false;
this.xrLabel10.Text = "Zeitraum: [AccountingPeriod]";
//
// lblBewilligungVom
//
this.lblBewilligungVom.LocationFloat = new DevExpress.Utils.PointFloat(175F, 256.8541F);
this.lblBewilligungVom.Multiline = true;
this.lblBewilligungVom.Name = "lblBewilligungVom";
this.lblBewilligungVom.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblBewilligungVom.SizeF = new System.Drawing.SizeF(335.0835F, 18F);
this.lblBewilligungVom.StylePriority.UseFont = false;
this.lblBewilligungVom.Text = "Bewilligung vom:";
//
// xrLabel8
//
this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(0F, 256.8541F);
this.xrLabel8.Multiline = true;
this.xrLabel8.Name = "xrLabel8";
this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel8.SizeF = new System.Drawing.SizeF(175F, 18F);
this.xrLabel8.StylePriority.UseFont = false;
this.xrLabel8.Text = "Ihr Zeichen:";
this.xrLabel10.Text = "Bewilligungszeitraum: [AccountingPeriod]";
//
// xrLabel7
//
@@ -269,7 +245,7 @@ namespace FreundeskreisSuchthilfe
this.xrTableCell32.StylePriority.UsePadding = false;
this.xrTableCell32.StylePriority.UseTextAlignment = false;
this.xrTableCell32.Text = "Zeitraum";
this.xrTableCell32.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell32.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell32.Weight = 0.44313146416171628D;
//
// xrTableCell33
@@ -281,9 +257,9 @@ namespace FreundeskreisSuchthilfe
this.xrTableCell33.StylePriority.UseBorders = false;
this.xrTableCell33.StylePriority.UsePadding = false;
this.xrTableCell33.StylePriority.UseTextAlignment = false;
this.xrTableCell33.Text = "FLS";
this.xrTableCell33.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell33.Weight = 0.48744460221219005D;
this.xrTableCell33.Text = "Fachleistungsstunden";
this.xrTableCell33.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell33.Weight = 0.7976366323519225D;
//
// xrTableCell38
//
@@ -295,8 +271,8 @@ namespace FreundeskreisSuchthilfe
this.xrTableCell38.StylePriority.UsePadding = false;
this.xrTableCell38.StylePriority.UseTextAlignment = false;
this.xrTableCell38.Text = "Stundensatz";
this.xrTableCell38.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell38.Weight = 0.57607089878008444D;
this.xrTableCell38.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell38.Weight = 0.44313145729162773D;
//
// xrTableCell34
//
@@ -309,7 +285,7 @@ namespace FreundeskreisSuchthilfe
this.xrTableCell34.StylePriority.UseTextAlignment = false;
this.xrTableCell34.Text = "Summe";
this.xrTableCell34.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell34.Weight = 0.62038409866131783D;
this.xrTableCell34.Weight = 0.44313151001004208D;
//
// DetailReport2
//
@@ -357,7 +333,7 @@ namespace FreundeskreisSuchthilfe
this.xrTableCell40.StylePriority.UseBorders = false;
this.xrTableCell40.StylePriority.UsePadding = false;
this.xrTableCell40.StylePriority.UseTextAlignment = false;
this.xrTableCell40.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell40.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell40.Weight = 0.44313146796853359D;
//
// xrTableCell44
@@ -371,22 +347,21 @@ namespace FreundeskreisSuchthilfe
this.xrTableCell44.StylePriority.UsePadding = false;
this.xrTableCell44.StylePriority.UseTextAlignment = false;
this.xrTableCell44.Text = "xrTableCell44";
this.xrTableCell44.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell44.Weight = 0.48744459729779233D;
this.xrTableCell44.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell44.Weight = 0.79763662093147025D;
//
// xrTableCell43
//
this.xrTableCell43.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.HourlyRate", "{0:0.00}")});
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.HourlyRate", "{0:c}")});
this.xrTableCell43.Name = "xrTableCell43";
this.xrTableCell43.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 2, 100F);
this.xrTableCell43.StylePriority.UseBorderColor = false;
this.xrTableCell43.StylePriority.UseBorders = false;
this.xrTableCell43.StylePriority.UsePadding = false;
this.xrTableCell43.StylePriority.UseTextAlignment = false;
this.xrTableCell43.Text = "xrTableCell43";
this.xrTableCell43.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell43.Weight = 0.576070929207513D;
this.xrTableCell43.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
this.xrTableCell43.Weight = 0.35450516423235268D;
//
// xrTableCell47
//
@@ -399,7 +374,7 @@ namespace FreundeskreisSuchthilfe
this.xrTableCell47.StylePriority.UsePadding = false;
this.xrTableCell47.StylePriority.UseTextAlignment = false;
this.xrTableCell47.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight;
this.xrTableCell47.Weight = 0.62038402472852416D;
this.xrTableCell47.Weight = 0.53175776607000658D;
//
// GroupFooter1
//
@@ -553,8 +528,6 @@ namespace FreundeskreisSuchthilfe
private DevExpress.XtraReports.UI.XRLabel lblAddress;
private DevExpress.XtraReports.UI.XRLabel xrLabel6;
private DevExpress.XtraReports.UI.XRLabel xrLabel7;
private DevExpress.XtraReports.UI.XRLabel lblBewilligungVom;
private DevExpress.XtraReports.UI.XRLabel xrLabel8;
private DevExpress.XtraReports.UI.XRLabel xrLabel10;
private DevExpress.XtraReports.UI.XRLabel lblMonat;
private DevExpress.XtraReports.UI.XRLabel xrLabel11;

View File

@@ -104,7 +104,7 @@ namespace FreundeskreisSuchthilfe
lblZahlungsziel.Text = lblZahlungsziel.Text.Replace("{Datum}", datum);
lblBewilligungVom.Text = String.Format("Bewilligung vom: {0:dd.MM.yyyy}", GetBewilligungsDatum(pRO));
//lblBewilligungVom.Text = String.Format("Bewilligung vom: {0:dd.MM.yyyy}", GetBewilligungsDatum(pRO));
this.bindingSource1.DataSource = pRO;
}

View File

@@ -120,7 +120,7 @@
<data name="lblZahlungsziel.Text" xml:space="preserve">
<value>Als Anlage fügen wir den unterschriebenen Leistungsnachweis in Kopie bei.
Bitte zahlen Sie den Betrag bis {Datum} auf unser Konto bei
Wir bitten um Überweisung bis zum {Datum} auf unser Konto bei
der Bank für Sozialwirtschaft.
Mit freundlichen Grüßen

View File

@@ -22,8 +22,10 @@ namespace KontaktUndKrisenhilfe.Invoicing
{
var i = base.CreateSingleInvoice(invoiceCounter, costBearer, invoicePeriod, supportConcept, serviceRecords);
SetAmountEquityContribution(i);
if (i != null)
{
SetAmountEquityContribution(i);
}
return i;
}

View File

@@ -35,7 +35,7 @@ namespace PraxisPusteblume
public void SetReportDataSource(ServicesOverviewRO ro)
{
//cellMonat1.Text = String.Format("{0:MMM yy}", ro.StartDate);
lblZeitraum.Text = String.Format("Zeitraum {0:dd.MM.yyyy} - {1:dd.MM.yyyy}", ro.StartDate, ro.EndDate);
//lblZeitraum.Text = String.Format("Zeitraum {0:dd.MM.yyyy} - {1:dd.MM.yyyy}", ro.StartDate, ro.EndDate);
InitRows(ro);
if (ro.Services != null)
{
@@ -46,8 +46,8 @@ namespace PraxisPusteblume
}
lblCustomer.Text = String.Format("Klient: {0}, {1}, {2}, {3} {4}, {5}", ro.CustomerLastName,
ro.CustomerFirstName, ro.CustomerStreet, ro.CustomerPostalCode, ro.CustomerCity, ro.ReferenceNumber);
//lblCustomer.Text = String.Format("Klient: {0}, {1}, {2}, {3} {4}, {5}", ro.CustomerLastName,
// ro.CustomerFirstName, ro.CustomerStreet, ro.CustomerPostalCode, ro.CustomerCity, ro.ReferenceNumber);
if (String.IsNullOrEmpty(ro.Costbearer))
@@ -127,8 +127,8 @@ namespace PraxisPusteblume
{
rowWochentage.Cells[cellIdx].BackColor = Color.LightGray;
tableRowPflegeeinheiten1.Cells[cellIdx].BackColor = Color.LightGray;
row2.Cells[cellIdx].BackColor = Color.LightGray;
row3.Cells[cellIdx].BackColor = Color.LightGray;
//row2.Cells[cellIdx].BackColor = Color.LightGray;
//row3.Cells[cellIdx].BackColor = Color.LightGray;
}
start = start.AddDays(1);
}

View File

@@ -19,29 +19,36 @@ namespace PraxisPusteblume
{
if (item.ServiceDescription != null && item.ServiceDescription.ServiceCategory != null && item.ServiceDescription.ServiceCategory.IsBillable)
{
var cb = item.CostBearer2SupportConcept.CostBearer;
var crlist = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(cb.CostRatePeriods);
var rateFactor = crlist.GetCostRatePeriodForDate(CostRatePeriodType.RateFactor, item.Start.Value);
if (rateFactor != null && rateFactor.CostRateValue.HasValue)
if (item.CostBearer2SupportConcept != null)
{
decimal factor = rateFactor.CostRateValue.Value;
var cb = item.CostBearer2SupportConcept.CostBearer;
if (factor == 33.33m)
{
factor = 1 + (1m / 3m);
}
else
{
factor = (100 + factor) / 100;
}
var crlist = MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(cb.CostRatePeriods);
item.RoundedDuration *= factor;
item.GroupRoundedDuration *= factor;
var rateFactor = crlist.GetCostRatePeriodForDate(CostRatePeriodType.RateFactor, item.Start.Value);
if (rateFactor != null && rateFactor.CostRateValue.HasValue)
{
decimal factor = rateFactor.CostRateValue.Value;
if (factor == 33.33m)
{
factor = 1 + (1m / 3m);
}
else
{
factor = (100 + factor) / 100;
}
item.RoundedDuration *= factor;
item.GroupRoundedDuration *= factor;
}
}
}
else
{
int test = 0;
}
}
return true;
}

View File

@@ -76,6 +76,8 @@ namespace BeWo.TrialogReports
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldFLSBillable = new DevExpress.XtraReports.UI.CalculatedField();
this.xrLabel13 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel15 = new DevExpress.XtraReports.UI.XRLabel();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -440,6 +442,8 @@ namespace BeWo.TrialogReports
// ReportFooter
//
this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel15,
this.xrLabel13,
this.xrLabel12,
this.xrLabel11,
this.xrLabel10,
@@ -450,14 +454,14 @@ namespace BeWo.TrialogReports
this.xrLabel9,
this.xrLabel4,
this.xrLabel3});
this.ReportFooter.HeightF = 180.0001F;
this.ReportFooter.HeightF = 216.0001F;
this.ReportFooter.Name = "ReportFooter";
//
// xrLabel12
//
this.xrLabel12.Borders = DevExpress.XtraPrinting.BorderSide.Bottom;
this.xrLabel12.Font = new System.Drawing.Font("Arial", 12F);
this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(99.00004F, 90.00002F);
this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(144.0002F, 90.00002F);
this.xrLabel12.Name = "xrLabel12";
this.xrLabel12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel12.SizeF = new System.Drawing.SizeF(188.9999F, 18.0001F);
@@ -468,7 +472,7 @@ namespace BeWo.TrialogReports
//
this.xrLabel11.Borders = DevExpress.XtraPrinting.BorderSide.Bottom;
this.xrLabel11.Font = new System.Drawing.Font("Arial", 12F);
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(99.00004F, 162F);
this.xrLabel11.LocationFloat = new DevExpress.Utils.PointFloat(144.0002F, 162F);
this.xrLabel11.Name = "xrLabel11";
this.xrLabel11.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel11.SizeF = new System.Drawing.SizeF(188.9999F, 18.0001F);
@@ -479,7 +483,7 @@ namespace BeWo.TrialogReports
//
this.xrLabel10.Borders = DevExpress.XtraPrinting.BorderSide.Bottom;
this.xrLabel10.Font = new System.Drawing.Font("Arial", 12F);
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(99.00004F, 126F);
this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(144.0002F, 126F);
this.xrLabel10.Name = "xrLabel10";
this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel10.SizeF = new System.Drawing.SizeF(188.9999F, 18.0001F);
@@ -579,6 +583,27 @@ namespace BeWo.TrialogReports
this.fieldFLSBillable.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldFLSBillable.Name = "fieldFLSBillable";
//
// xrLabel13
//
this.xrLabel13.Font = new System.Drawing.Font("Arial", 12F);
this.xrLabel13.LocationFloat = new DevExpress.Utils.PointFloat(0F, 198F);
this.xrLabel13.Name = "xrLabel13";
this.xrLabel13.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel13.SizeF = new System.Drawing.SizeF(144.0002F, 18.00003F);
this.xrLabel13.StylePriority.UseFont = false;
this.xrLabel13.Text = "Geschäftsleitung";
//
// xrLabel15
//
this.xrLabel15.Borders = DevExpress.XtraPrinting.BorderSide.Bottom;
this.xrLabel15.Font = new System.Drawing.Font("Arial", 12F);
this.xrLabel15.LocationFloat = new DevExpress.Utils.PointFloat(144.0002F, 198F);
this.xrLabel15.Name = "xrLabel15";
this.xrLabel15.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel15.SizeF = new System.Drawing.SizeF(188.9999F, 18.0001F);
this.xrLabel15.StylePriority.UseBorders = false;
this.xrLabel15.StylePriority.UseFont = false;
//
// Stundenzettel
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -659,5 +684,7 @@ namespace BeWo.TrialogReports
private DevExpress.XtraReports.UI.XRTableCell cellDokHeader;
private DevExpress.XtraReports.UI.XRTableCell cellGoal;
private DevExpress.XtraReports.UI.XRLabel lblBewilligt;
private DevExpress.XtraReports.UI.XRLabel xrLabel15;
private DevExpress.XtraReports.UI.XRLabel xrLabel13;
}
}

View File

@@ -44,5 +44,178 @@ namespace BeWo.WegweiserBetreuungsdienstReports
base.CheckMaxApprovedAmount(invoice, sip, scap, costBearer2SupportConcept, invoicePeriod, serviceRecords);
}
}
public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList, DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap,
Calculations calc, bool summaryPerMonth)
{
var newlist = new List<InvoiceItem>();
var rateToItem = new Dictionary<String, InvoiceItem>();
foreach (InvoiceItem iitem in itemList)
{
InvoiceItem item;
String key = String.Format("{0}_{1}", iitem.AmountPerUnit, iitem.RateFactor);
if (summaryPerMonth)
{
key = String.Format("{0}_{1}_{2:yyyyMM}", iitem.AmountPerUnit, iitem.RateFactor, iitem.ItemPeriodStart);
}
if (rateToItem.ContainsKey(key))
{
item = rateToItem[key];
}
else
{
item = new InvoiceItem();
newlist.Add(item);
item.AmountPerUnit = iitem.AmountPerUnit;
if (invoicePeriod != null)
{
item.ItemPeriodStart = invoicePeriod.StartDate;
item.ItemPeriodEnd = invoicePeriod.EndDate;
}
else
{
item.ItemPeriodStart = scap.StartDate;
item.ItemPeriodEnd = scap.EndDate;
}
if (summaryPerMonth && iitem.ItemPeriodStart.HasValue)
{
DateTime start = new DateTime(iitem.ItemPeriodStart.Value.Year, iitem.ItemPeriodStart.Value.Month, 1);
DateTime end = start.AddMonths(1).AddDays(-1);
if (item.ItemPeriodStart < start)
{
item.ItemPeriodStart = start;
}
if (item.ItemPeriodEnd > end)
{
item.ItemPeriodEnd = end;
}
}
item.RateFactor = iitem.RateFactor;
item.AccountingInterval = iitem.AccountingInterval;
item.ItemDescription = iitem.ItemDescription;
item.UnitDescription = iitem.UnitDescription;
item.SupportConceptApprovalPeriodOid = scap.Oid;
rateToItem[key] = item;
}
if (!item.UnitCount.HasValue)
{
item.UnitCount = 0;
}
item.UnitCount += iitem.UnitCount ?? 0;
}
foreach (InvoiceItem invoiceItem in newlist)
{
if (invoiceItem.RateFactor.HasValue)
{
invoiceItem.UnitCount = (invoiceItem.UnitCount ?? 0) * ((invoiceItem.RateFactor + 100) / 100);
}
invoiceItem.UnitCount = Math.Round(invoiceItem.UnitCount ?? 0, 2, MidpointRounding.AwayFromZero);
invoiceItem.AmountTotal = invoiceItem.AmountPerUnit * invoiceItem.UnitCount;
invoiceItem.AmountTotal = Math.Round(invoiceItem.AmountTotal.Value, 2, MidpointRounding.AwayFromZero);
invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal;
}
return newlist;
}
//public override IList<InvoiceItem> CreateSummaryInvoiceItems(IList<InvoiceItem> itemList,
// DateTimeSpan invoicePeriod, SupportConceptApprovalPeriod scap, Calculations calc, bool summaryPerMonth)
//{
// //Fasse InvoiceItems mit gleichem Stundensatz zusammen:
// var newlist = new List<InvoiceItem>();
// var rateToItem = new Dictionary<String, InvoiceItem>();
// foreach (InvoiceItem iitem in itemList)
// {
// InvoiceItem item;
// String key = String.Format("{0}_{1}", iitem.AmountPerUnit, iitem.RateFactor);
// if (summaryPerMonth)
// {
// key = String.Format("{0}_{1}_{2:yyyyMM}", iitem.AmountPerUnit, iitem.RateFactor, iitem.ItemPeriodStart);
// }
// if (rateToItem.ContainsKey(key))
// {
// item = rateToItem[key];
// }
// else
// {
// item = new InvoiceItem();
// newlist.Add(item);
// item.AmountPerUnit = iitem.AmountPerUnit;
// if (invoicePeriod != null)
// {
// item.ItemPeriodStart = invoicePeriod.StartDate;
// item.ItemPeriodEnd = invoicePeriod.EndDate;
// }
// else
// {
// item.ItemPeriodStart = scap.StartDate;
// item.ItemPeriodEnd = scap.EndDate;
// }
// if (summaryPerMonth && iitem.ItemPeriodStart.HasValue)
// {
// DateTime start = new DateTime(iitem.ItemPeriodStart.Value.Year, iitem.ItemPeriodStart.Value.Month, 1);
// DateTime end = start.AddMonths(1).AddDays(-1);
// if (item.ItemPeriodStart < start)
// {
// item.ItemPeriodStart = start;
// }
// if (item.ItemPeriodEnd > end)
// {
// item.ItemPeriodEnd = end;
// }
// }
// item.RateFactor = iitem.RateFactor;
// item.AccountingInterval = iitem.AccountingInterval;
// item.ItemDescription = iitem.ItemDescription;
// item.UnitDescription = iitem.UnitDescription;
// item.SupportConceptApprovalPeriodOid = scap.Oid;
// rateToItem[key] = item;
// }
// if (!item.UnitCount.HasValue)
// {
// item.UnitCount = 0;
// }
// item.UnitCount += iitem.UnitCount ?? 0;
// }
// foreach (InvoiceItem invoiceItem in newlist)
// {
// if (invoiceItem.RateFactor.HasValue)
// {
// invoiceItem.UnitCount = (invoiceItem.UnitCount ?? 0) * ((invoiceItem.RateFactor + 100) / 100);
// }
// invoiceItem.UnitCount = Math.Round(invoiceItem.UnitCount ?? 0, 2, MidpointRounding.AwayFromZero);
// invoiceItem.AmountTotal = invoiceItem.AmountPerUnit * invoiceItem.UnitCount;
// invoiceItem.AmountTotal = Math.Round(invoiceItem.AmountTotal.Value, 2, MidpointRounding.AwayFromZero);
// invoiceItem.GrossAmountTotal = invoiceItem.AmountTotal;
// }
// return newlist;
//}
}
}

View File

@@ -42,10 +42,18 @@ namespace BeWo.WegweiserBetreuungsdienstReports
foreach (var ii in sip.ServiceInvoiceItems)
{
ii.ServiceDescription = String.Format("{0:dd.MM.yyyy} bis {1:dd.MM.yyyy}: {2:0.##} Std. {3}x {4:c}", ii.AccountingPeriodStart, ii.AccountingPeriodEnd,
ii.UnitCount, "", ii.AmountPerUnit);
//amountTotal += ii.NetAmount ?? 0;
if (String.IsNullOrEmpty(ii.RateFactor) || ii.RateFactor == "1" || ii.RateFactor == "0,00 %")
{
ii.ServiceDescription = String.Format("{0:dd.MM.yyyy} bis {1:dd.MM.yyyy}: {2:0.##} Std. {3}x {4:c}", ii.AccountingPeriodStart, ii.AccountingPeriodEnd,
ii.UnitCount, "", ii.AmountPerUnit);
}
else
{
ii.ServiceDescription = String.Format("{0:dd.MM.yyyy} bis {1:dd.MM.yyyy}: {2:0.##} FLS {3}x {4:c}",
ii.AccountingPeriodStart, ii.AccountingPeriodEnd,
ii.UnitCount, "", ii.AmountPerUnit);
}
//amountTotal += ii.NetAmount ?? 0;
}

View File

@@ -55,6 +55,8 @@ namespace BeWo.WegweiserBetreuungsdienstReports
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.DetailReport1 = new DevExpress.XtraReports.UI.DetailReportBand();
this.Detail2 = new DevExpress.XtraReports.UI.DetailBand();
this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
@@ -70,11 +72,9 @@ namespace BeWo.WegweiserBetreuungsdienstReports
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.fieldGruppe = new DevExpress.XtraReports.UI.CalculatedField();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -351,6 +351,30 @@ namespace BeWo.WegweiserBetreuungsdienstReports
this.Detail2.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
this.Detail2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel12
//
this.xrLabel12.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel12.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(0F, 71.72922F);
this.xrLabel12.Multiline = true;
this.xrLabel12.Name = "xrLabel12";
this.xrLabel12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel12.SizeF = new System.Drawing.SizeF(327.2084F, 56.29164F);
this.xrLabel12.StylePriority.UseBorders = false;
this.xrLabel12.StylePriority.UseFont = false;
this.xrLabel12.StylePriority.UseTextAlignment = false;
this.xrLabel12.Text = "Datum";
this.xrLabel12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel2
//
this.xrLabel2.Borders = DevExpress.XtraPrinting.BorderSide.Bottom;
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 46.72921F);
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(292.9169F, 25F);
this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel5
//
this.xrLabel5.Borders = DevExpress.XtraPrinting.BorderSide.None;
@@ -501,7 +525,7 @@ namespace BeWo.WegweiserBetreuungsdienstReports
this.xrLabel1.SizeF = new System.Drawing.SizeF(650F, 25F);
this.xrLabel1.StylePriority.UseFont = false;
this.xrLabel1.StylePriority.UseTextAlignment = false;
this.xrLabel1.Text = "Stunden-Dokumentation Betreutes Wohnen";
this.xrLabel1.Text = "Stunden-Dokumentation";
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel9
@@ -524,6 +548,14 @@ namespace BeWo.WegweiserBetreuungsdienstReports
this.topMarginBand1.HeightF = 150F;
this.topMarginBand1.Name = "topMarginBand1";
//
// xrPictureBox1
//
this.xrPictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox1.Image")));
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 61.66665F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(250F, 50F);
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// bottomMarginBand1
//
this.bottomMarginBand1.HeightF = 30F;
@@ -536,38 +568,6 @@ namespace BeWo.WegweiserBetreuungsdienstReports
this.fieldGruppe.FieldType = DevExpress.XtraReports.UI.FieldType.String;
this.fieldGruppe.Name = "fieldGruppe";
//
// xrPictureBox1
//
this.xrPictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox1.Image")));
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 61.66665F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(250F, 50F);
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// xrLabel2
//
this.xrLabel2.Borders = DevExpress.XtraPrinting.BorderSide.Bottom;
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 46.72921F);
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(292.9169F, 25F);
this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrLabel12
//
this.xrLabel12.Borders = DevExpress.XtraPrinting.BorderSide.None;
this.xrLabel12.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel12.LocationFloat = new DevExpress.Utils.PointFloat(0F, 71.72922F);
this.xrLabel12.Multiline = true;
this.xrLabel12.Name = "xrLabel12";
this.xrLabel12.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel12.SizeF = new System.Drawing.SizeF(327.2084F, 56.29164F);
this.xrLabel12.StylePriority.UseBorders = false;
this.xrLabel12.StylePriority.UseFont = false;
this.xrLabel12.StylePriority.UseTextAlignment = false;
this.xrLabel12.Text = "Datum";
this.xrLabel12.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// Stundenzettel
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {

View File

@@ -39,7 +39,7 @@ namespace BeWo.Service.Plugins
//t = "1378137009"; // BeWo Direkt
//t = "3010479871"; // Aachener Verein
//t = "3849764093"; // Club 74
//t = "5805202339"; // Wegweiser Betreuungsdienst
t = "5805202339"; // Wegweiser Betreuungsdienst
//t = "2301474784"; // Hauskrankenpflege Leiendecker
//t = "8243565510"; // Der Karren
//t = "7709306800"; // Der Karren SBD
@@ -171,7 +171,7 @@ namespace BeWo.Service.Plugins
//t = "6586058528"; // Freundeskreis Suchtkrankenhilfe e.V.
//t = "2632162696"; // Pro BeWo Düren
//t = "6340891020"; // Caritas Ahlen
//t = "3659854106"; // alpha e.V.
t = "3659854106"; // alpha e.V.
//t = "5809130435"; // Lebenshilfe Kusel
//t = "3367947706"; // PaS Mönchengladbach
//t = "2331203795"; // BeWo für dich
@@ -193,7 +193,7 @@ namespace BeWo.Service.Plugins
//t = "4693476852"; // HSH Netzwerk
//t = "3884496709"; // Wahl e.V.
//t = "9883255779"; // VKM Menden
t = "9556218062"; // Diakonie Landshut
//t = "9556218062"; // Diakonie Landshut
//t = "2279593936"; // Diakonie Mülheim
//t = "3623837005"; // Betreuwo Wesel
//t = "8407321888"; // AWO Wesel