AutismusKoelnBonn, AutimusLeben, PerspektivenEV, AKGG und Varo
This commit is contained in:
@@ -10,7 +10,7 @@ namespace Akgg
|
||||
{
|
||||
public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
|
||||
{
|
||||
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay);
|
||||
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
|
||||
|
||||
if (lROs.Count > 0)
|
||||
{
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
<DependentUpon>InvoiceCustomerReport.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
<EmbeddedResource Include="Quittierungsbeleg.resx">
|
||||
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace AutismusKoelnBonn
|
||||
|
||||
string team = "MoveAut Team Köln";
|
||||
Customer c;
|
||||
if (pRO.ServiceInvoicePeriods[0].Customer.Oid.HasValue)
|
||||
if (pRO.ServiceInvoicePeriods.Count > 0 && pRO.ServiceInvoicePeriods[0].Customer.Oid.HasValue)
|
||||
{
|
||||
c = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.ServiceInvoicePeriods[0].Customer.Oid ?? 0);
|
||||
team = c.Team2CustomerList[0].Team.Name;
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace AutismusKoelnBonn
|
||||
lblAdresse.Text = sb.ToString();
|
||||
string team = "MoveAut Team Köln";
|
||||
Customer c;
|
||||
if (pRO.ServiceInvoicePeriods[0].Customer.Oid.HasValue)
|
||||
if (pRO.ServiceInvoicePeriods.Count > 0 && pRO.ServiceInvoicePeriods[0].Customer.Oid.HasValue)
|
||||
{
|
||||
c = DAOFactory.GenericDAO.LoadByID<Customer>(pRO.ServiceInvoicePeriods[0].Customer.Oid ?? 0);
|
||||
team = c.Team2CustomerList[0].Team.Name;
|
||||
|
||||
@@ -713,11 +713,13 @@ namespace AutismusLeben
|
||||
//
|
||||
// lblSchlusssatz
|
||||
//
|
||||
this.lblSchlusssatz.Font = new System.Drawing.Font("Arial", 10F);
|
||||
this.lblSchlusssatz.LocationFloat = new DevExpress.Utils.PointFloat(0.0003814697F, 55.76045F);
|
||||
this.lblSchlusssatz.Multiline = true;
|
||||
this.lblSchlusssatz.Name = "lblSchlusssatz";
|
||||
this.lblSchlusssatz.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.lblSchlusssatz.SizeF = new System.Drawing.SizeF(700.9995F, 67.27083F);
|
||||
this.lblSchlusssatz.StylePriority.UseFont = false;
|
||||
//
|
||||
// xrTable4
|
||||
//
|
||||
|
||||
@@ -515,7 +515,7 @@ namespace AutismusLeben
|
||||
// xrLabel20
|
||||
//
|
||||
this.xrLabel20.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "DebitorNumber")});
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceBase.SupportConceptCostBearerRelDc.SupportConcept.Customer.DebitorNumber")});
|
||||
this.xrLabel20.Font = new System.Drawing.Font("Arial", 9F);
|
||||
this.xrLabel20.LocationFloat = new DevExpress.Utils.PointFloat(534.75F, 34.00005F);
|
||||
this.xrLabel20.Name = "xrLabel20";
|
||||
@@ -581,6 +581,8 @@ namespace AutismusLeben
|
||||
//
|
||||
this.xrLabel21.BackColor = System.Drawing.Color.Transparent;
|
||||
this.xrLabel21.CanShrink = true;
|
||||
this.xrLabel21.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "InvoiceBase.CustomerReferenceNumber", "Aktenzeichen LVR: {0}")});
|
||||
this.xrLabel21.Font = new System.Drawing.Font("Arial", 10F);
|
||||
this.xrLabel21.LocationFloat = new DevExpress.Utils.PointFloat(0F, 338.9285F);
|
||||
this.xrLabel21.Multiline = true;
|
||||
@@ -589,7 +591,6 @@ namespace AutismusLeben
|
||||
this.xrLabel21.SizeF = new System.Drawing.SizeF(683.0002F, 20F);
|
||||
this.xrLabel21.StylePriority.UseBackColor = false;
|
||||
this.xrLabel21.StylePriority.UseFont = false;
|
||||
this.xrLabel21.Text = "Aktenzeichen LVR: [CustomerReferenceNumber]";
|
||||
this.xrLabel21.WordWrap = false;
|
||||
//
|
||||
// xrLabel4
|
||||
@@ -604,7 +605,8 @@ namespace AutismusLeben
|
||||
this.xrLabel4.SizeF = new System.Drawing.SizeF(683.0002F, 20F);
|
||||
this.xrLabel4.StylePriority.UseBackColor = false;
|
||||
this.xrLabel4.StylePriority.UseFont = false;
|
||||
this.xrLabel4.Text = "[CustomerLastName], [CustomerFirstName]; [CustomerBirthdate!dd.MM.yyyy]";
|
||||
this.xrLabel4.Text = "[InvoiceBase.CustomerLastName], [InvoiceBase.CustomerFirstName]; [CustomerBirthda" +
|
||||
"te!dd.MM.yyyy]";
|
||||
this.xrLabel4.WordWrap = false;
|
||||
//
|
||||
// xrLabel3
|
||||
@@ -855,8 +857,6 @@ namespace AutismusLeben
|
||||
this.xrTableCell43.BorderColor = System.Drawing.Color.Black;
|
||||
this.xrTableCell43.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
|
||||
| DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.xrTableCell43.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ServiceInvoicePeriods.ServiceInvoiceItems.ServiceDescription", "{0:0.00}")});
|
||||
this.xrTableCell43.Font = new System.Drawing.Font("Arial", 9F);
|
||||
this.xrTableCell43.Name = "xrTableCell43";
|
||||
this.xrTableCell43.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 2, 2, 2, 100F);
|
||||
@@ -865,7 +865,7 @@ namespace AutismusLeben
|
||||
this.xrTableCell43.StylePriority.UseFont = false;
|
||||
this.xrTableCell43.StylePriority.UsePadding = false;
|
||||
this.xrTableCell43.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell43.Text = "xrTableCell43";
|
||||
this.xrTableCell43.Text = "Betreuungsleistungen";
|
||||
this.xrTableCell43.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
|
||||
this.xrTableCell43.Weight = 1.5008078450454461D;
|
||||
//
|
||||
@@ -917,11 +917,13 @@ namespace AutismusLeben
|
||||
//
|
||||
// lblSchlusssatz
|
||||
//
|
||||
this.lblSchlusssatz.Font = new System.Drawing.Font("Arial", 10F);
|
||||
this.lblSchlusssatz.LocationFloat = new DevExpress.Utils.PointFloat(0F, 49.86458F);
|
||||
this.lblSchlusssatz.Multiline = true;
|
||||
this.lblSchlusssatz.Name = "lblSchlusssatz";
|
||||
this.lblSchlusssatz.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.lblSchlusssatz.SizeF = new System.Drawing.SizeF(682.9998F, 67.27084F);
|
||||
this.lblSchlusssatz.StylePriority.UseFont = false;
|
||||
//
|
||||
// xrTable2
|
||||
//
|
||||
|
||||
@@ -25,7 +25,27 @@ namespace AutismusLeben
|
||||
//{
|
||||
// lblAbrechnungszeitraum.Text = String.Format("hiermit berechnen wir für den Zeitraum {0:MMMM yyyy} - {1:MMMM yyyy} folgende erbrachte Tätigkeiten:", start, end);
|
||||
//}
|
||||
lblSchlusssatz.Text = string.Format("Zahlbar bis {0:dd.MM.yyyy} ohne Abzug.\nUmsatzsteuerfrei gemäß §4 Nr. 18 UStG.", pRO.InvoiceDateTime.Value.AddDays(14));
|
||||
foreach (var sip in pRO.ServiceInvoicePeriods)
|
||||
{
|
||||
if (sip.ServiceInvoiceItems != null)
|
||||
{
|
||||
foreach (var ii in sip.ServiceInvoiceItems)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(ii.RateFactor))
|
||||
{
|
||||
var rfStr = ii.RateFactor.Replace("%", "").Replace(",00", "").Trim();
|
||||
int rfInt = 0;
|
||||
Int32.TryParse(rfStr, out rfInt);
|
||||
|
||||
decimal rateFactor = (100m + rfInt) / 100m;
|
||||
|
||||
ii.Hours = ii.Hours * rateFactor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lblSchlusssatz.Text = string.Format("Zahlbar bis {0:dd.MM.yyyy} ohne Abzug.\nUmsatzsteuerfrei gemäß §4 Nr. 18 UStG.", pRO.InvoiceDateTime.Value.AddDays(14));
|
||||
|
||||
this.bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,16 @@ namespace PerspektivenEV.Export
|
||||
if (!String.IsNullOrWhiteSpace(s))
|
||||
sb.Append(s);
|
||||
|
||||
|
||||
var sAllg = GetMonatlicheAllgRechnungenString(date);
|
||||
if (!String.IsNullOrWhiteSpace(sAllg))
|
||||
{
|
||||
if (sb.Length > 0)
|
||||
sb.AppendLine();
|
||||
|
||||
sb.Append(sAllg);
|
||||
}
|
||||
|
||||
var sLWV = GetMonatlicheRechnungLWVString(date);
|
||||
if (!String.IsNullOrWhiteSpace(sLWV))
|
||||
{
|
||||
@@ -130,6 +140,92 @@ namespace PerspektivenEV.Export
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static String GetMonatlicheAllgRechnungenString(DateTime date)
|
||||
{
|
||||
var sql = GetMonatlicheAllgRechnungenSql(date);
|
||||
|
||||
/*
|
||||
0 sip.Claim,
|
||||
1 c.DebitorNumber,
|
||||
2 ib.InvoiceDate,
|
||||
3 ib.invoicenumber,
|
||||
4 ib.Oid AS InvoiceOID,
|
||||
5 c.CostCenter,
|
||||
6 c2s.Oid,
|
||||
7 ib.InvoiceId,
|
||||
8 ib.RecipientOrganisation,
|
||||
9 ii.ItemDescription,
|
||||
10 ii.UnitDescription,
|
||||
11 ii.SupportConceptAproOID
|
||||
12 ii.Notice,
|
||||
13 ii.AmountPerUnit,
|
||||
14 ii.UnitCount,
|
||||
15 ii.AmountTotal
|
||||
*/
|
||||
|
||||
//Kontonummer; Umsatz; Gegenkonto; Belegdatum; Kost 1; Belegfeld 1; Buchungstext; Festschreibung
|
||||
var dt = ExecuteQuery(sql, date);
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
String orgaName = "";
|
||||
String itemDescription = "";
|
||||
String unitDescription = "";
|
||||
String isApproved = "";
|
||||
|
||||
if (row[8] != null)
|
||||
orgaName = row[8].ToString();
|
||||
|
||||
if (row[9] != null)
|
||||
itemDescription = row[9].ToString();
|
||||
|
||||
if (row[10] != null)
|
||||
unitDescription = row[10].ToString();
|
||||
|
||||
if (row[12] != null)
|
||||
isApproved = row[12].ToString();
|
||||
|
||||
if (sb.Length > 0)
|
||||
sb.AppendLine();
|
||||
|
||||
DateTime lastDate = new DateTime(date.Year, date.Month, 1);
|
||||
lastDate = lastDate.AddMonths(1).AddDays(-1);
|
||||
|
||||
//sb.Append(String.Format("{0}", row[1])); //Debitornr. als Kontonummer
|
||||
sb.Append("999998;");
|
||||
sb.Append(String.Format("{0:0.00}", row[15])); //Umsatz - der Rechnungsposition
|
||||
sb.Append(";");
|
||||
//var gegenkto = GetErloeskonto(itemDescription, unitDescription, orgaName, isApproved);
|
||||
//sb.Append(gegenkto); //Gegenkonto - Auffang/Fehlerkonto 999999
|
||||
sb.Append("999999;");
|
||||
sb.Append(String.Format("{0:ddMM}", lastDate));
|
||||
sb.Append(";");
|
||||
//var kostenstelle = GetKostenstelle(itemDescription, unitDescription, orgaName);
|
||||
//sb.Append(kostenstelle); //Kostenstelle - Auffang/Fehlerkostenstelle 999
|
||||
sb.Append("999;");
|
||||
sb.Append(String.Format("{0}", row[3]));
|
||||
sb.Append(";");
|
||||
String buchungstext = String.Format("Allgemeine Rechnung - {0}", orgaName);
|
||||
if (row[6].ToString().Length > 0)
|
||||
{
|
||||
int index = 0;
|
||||
index = row[6].ToString().IndexOf("\r\n");
|
||||
if (index == 0)
|
||||
index = row[6].ToString().IndexOf("BEZAHLT");
|
||||
else if (index > 0)
|
||||
buchungstext = row[6].ToString().Remove(index);
|
||||
else
|
||||
buchungstext = row[6].ToString();
|
||||
|
||||
}
|
||||
sb.Append(buchungstext);
|
||||
sb.Append(";");
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static String GetMonatlicheRechnungLWVString(DateTime date)
|
||||
{
|
||||
/*
|
||||
@@ -350,6 +446,38 @@ namespace PerspektivenEV.Export
|
||||
return sql;
|
||||
}
|
||||
|
||||
private static String GetMonatlicheAllgRechnungenSql(DateTime date)
|
||||
{
|
||||
String sql = @"
|
||||
select
|
||||
'SUMME' AS 'sip.Claim',
|
||||
'nix' AS 'c.DebitorNumber',
|
||||
ib.InvoiceDate,
|
||||
ib.invoicenumber,
|
||||
ib.Oid AS InvoiceOID,
|
||||
'nix' AS 'c.CostCenter',
|
||||
ib.Notice AS 'c2s.Oid',
|
||||
ib.InvoiceId,
|
||||
ib.RecipientOrganisation,
|
||||
ii.ItemDescription,
|
||||
ii.UnitDescription,
|
||||
ii.SupportConceptApprovalPeriodOid,
|
||||
ii.Notice,
|
||||
ii.AmountPerUnit,
|
||||
ii.UnitCount,
|
||||
ii.AmountTotal
|
||||
from
|
||||
invoicebase ib
|
||||
inner join invoiceitem ii on ii.InvoiceBaseOid = ib.Oid
|
||||
WHERE ib.`AccountingPeriodEnd` >= ':Monat_Start' AND ib.`AccountingPeriodEnd` < ':Monat_End' and ib.IsActive = 1
|
||||
AND ib.SupportConceptOid IS NULL
|
||||
ORDER BY invoiceoid, ii.ItemDescription
|
||||
";
|
||||
|
||||
return sql;
|
||||
}
|
||||
|
||||
|
||||
private static String GetMonatlicheRechnungPositionenLWVSql(DateTime date)
|
||||
{
|
||||
|
||||
|
||||
@@ -84,21 +84,23 @@ namespace PerspektivenEV.Invoicing
|
||||
{
|
||||
if (ap.ServiceCategory.Name.Contains("Tagesstätte"))
|
||||
ap.ServiceCategory.Name = "Tagesstätte";
|
||||
|
||||
String key = ap.ServiceCategory.Name;
|
||||
if (!cat2Daten.ContainsKey(key))
|
||||
else
|
||||
{
|
||||
cat2Daten.Add(key, new List<Abrechnungsdaten>());
|
||||
}
|
||||
String key = ap.ServiceCategory.Name;
|
||||
if (!cat2Daten.ContainsKey(key))
|
||||
{
|
||||
cat2Daten.Add(key, new List<Abrechnungsdaten>());
|
||||
}
|
||||
|
||||
var daten = new Abrechnungsdaten();
|
||||
daten.CategoryName = key;
|
||||
daten.AbrechnungsStartDate = invoicePeriod.StartDate;
|
||||
daten.AbrechnungsEndDate = invoicePeriod.EndDate;
|
||||
daten.CompactSupportConcept = item.Key;
|
||||
daten.CostBearer2SupportConcept = c2s;
|
||||
daten.SupportConceptApprovalPeriod = ap;
|
||||
cat2Daten[key].Add(daten);
|
||||
var daten = new Abrechnungsdaten();
|
||||
daten.CategoryName = key;
|
||||
daten.AbrechnungsStartDate = invoicePeriod.StartDate;
|
||||
daten.AbrechnungsEndDate = invoicePeriod.EndDate;
|
||||
daten.CompactSupportConcept = item.Key;
|
||||
daten.CostBearer2SupportConcept = c2s;
|
||||
daten.SupportConceptApprovalPeriod = ap;
|
||||
cat2Daten[key].Add(daten);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,6 +133,7 @@
|
||||
<DependentUpon>InvoiceCustomerReport.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
<EmbeddedResource Include="Quittierungsbeleg.resx">
|
||||
<DependentUpon>Quittierungsbeleg.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
@@ -227,13 +227,19 @@ namespace VaroSozialagentur.Invoicing
|
||||
public override InvoiceItem CreateInvoiceItem(ServiceRecordDC iServiceRecord, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
{
|
||||
var invoiceItem = base.CreateInvoiceItem(iServiceRecord, scap, calc);
|
||||
if (iServiceRecord != null)
|
||||
if (iServiceRecord.CostBearer.Name.Contains("Hannover"))
|
||||
{
|
||||
invoiceItem.UnitCount = 120 * invoiceItem.UnitCount / 100;
|
||||
invoiceItem.GrossAmountTotal = 120 * invoiceItem.GrossAmountTotal / 100;
|
||||
}
|
||||
|
||||
if (iServiceRecord != null)
|
||||
{
|
||||
var cat = iServiceRecord.ServiceDescription.CategoryName;
|
||||
var desc = iServiceRecord.ServiceDescription.Name;
|
||||
|
||||
|
||||
if (cat == "Fachleistungsstunde")
|
||||
if (cat.Contains("Fachleistungsstunde"))
|
||||
{
|
||||
invoiceItem.ItemDescription = desc;
|
||||
invoiceItem.UnitDescription = "Fachleistungsstunde (FLS)";
|
||||
|
||||
Reference in New Issue
Block a user