CB
This commit is contained in:
@@ -187,15 +187,33 @@ namespace BeWo.View.Detail.Accounting
|
||||
{
|
||||
ViewModel.NewVM.RecipientOrganisationOid = _SelectedOrganisation.OrganisationOid;
|
||||
ViewModel.NewVM.RecipientOrganisation = r.Name;
|
||||
ViewModel.NewVM.RecipientStreet = r.InvoiceAddressStreet;
|
||||
ViewModel.NewVM.RecipientTown = r.InvoiceAddressTown;
|
||||
ViewModel.NewVM.RecipientDivision = r.Name2;
|
||||
|
||||
|
||||
if (r.ContactInformations.FirstOrDefault(f => f.ContactType == ContactType.business_POBox) != null)
|
||||
if (r.ContactInformations.FirstOrDefault(f => f.ContactType == ContactType.private_POBox) != null)
|
||||
{
|
||||
ViewModel.NewVM.RecipientPostBox = r.ContactInformations.First(f => f.ContactType == ContactType.private_POBox).ContactValue;
|
||||
}
|
||||
else if (r.ContactInformations.FirstOrDefault(f => f.ContactType == ContactType.business_POBox) != null)
|
||||
{
|
||||
ViewModel.NewVM.RecipientPostBox = r.ContactInformations.First(f => f.ContactType == ContactType.business_POBox).ContactValue;
|
||||
}
|
||||
|
||||
ViewModel.NewVM.RecipientStreet = r.InvoiceAddressStreet;
|
||||
ViewModel.NewVM.RecipientTown = r.InvoiceAddressTown;
|
||||
ViewModel.NewVM.RecipientPostCode = r.InvoiceAddressPostalCode;
|
||||
if (String.IsNullOrEmpty(ViewModel.NewVM.RecipientStreet))
|
||||
{
|
||||
ViewModel.NewVM.RecipientStreet = r.Street;
|
||||
}
|
||||
if (String.IsNullOrEmpty(ViewModel.NewVM.RecipientTown))
|
||||
{
|
||||
ViewModel.NewVM.RecipientTown = r.Town;
|
||||
}
|
||||
if (String.IsNullOrEmpty(ViewModel.NewVM.RecipientPostCode))
|
||||
{
|
||||
ViewModel.NewVM.RecipientPostCode = r.PostalCode;
|
||||
}
|
||||
StartEditNewVM();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -97,7 +97,12 @@ namespace BeWo.View.Detail
|
||||
|
||||
AdditionalServiceAssessmentSheetCategories = new List<AssessmentSheetCategoryDC>();
|
||||
|
||||
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungNurEigeneAnsehen) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungAnsehen))
|
||||
|
||||
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungNurEigeneAnsehen) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungAnsehen))
|
||||
{
|
||||
tabitem_Bargeldverwaltung.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
else if (BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungNurEigeneAnsehen) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungAnsehen))
|
||||
{
|
||||
tabitem_Bargeldverwaltung.Visibility = pCustomerVM.IsNew || BeWoApp.LoggedOnEmployee.RelatedCustomers.Any(a => a.Customer.CustomerOid.Equals(pCustomerVM.CommitToDataContract().CustomerOid.Value)) ? Visibility.Visible : Visibility.Collapsed;
|
||||
}
|
||||
|
||||
@@ -840,6 +840,7 @@ namespace BeWo.ViewModel
|
||||
_Notice = pDataContract.Notice;
|
||||
_DunningLetterCount = pDataContract.DunningLetterCount;
|
||||
_TotalAmount = pDataContract.TotalAmount;
|
||||
_CustomerReferenceNumber = pDataContract.CustomerReferenceNumber;
|
||||
|
||||
foreach (var iContactDC in pDataContract.SenderContactInformations)
|
||||
{
|
||||
@@ -852,7 +853,10 @@ namespace BeWo.ViewModel
|
||||
{
|
||||
_SenderPhone = iContactDC.ContactValue;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var iContactDC in pDataContract.RecipientContactInformations)
|
||||
{
|
||||
if (iContactDC.ContactType == ContactType.business_POBox)
|
||||
{
|
||||
_RecipientPostBox = iContactDC.ContactValue;
|
||||
@@ -893,10 +897,11 @@ namespace BeWo.ViewModel
|
||||
pDataContract.Notice = _Notice;
|
||||
pDataContract.DunningLetterCount = _DunningLetterCount;
|
||||
pDataContract.TotalAmount = _TotalAmount;
|
||||
pDataContract.CustomerReferenceNumber = _CustomerReferenceNumber;
|
||||
|
||||
CommitSenderContact(_SenderFax, ContactType.business_Fax);
|
||||
CommitSenderContact(_SenderPhone, ContactType.business_Phone);
|
||||
CommitSenderContact(_RecipientPostBox, ContactType.business_POBox);
|
||||
CommitReceiverContact(_RecipientPostBox, ContactType.business_POBox);
|
||||
|
||||
pDataContract.InvoiceItems = _InvoiceItems.CopyToDCList(doCommit);
|
||||
|
||||
@@ -906,7 +911,23 @@ namespace BeWo.ViewModel
|
||||
private void CommitSenderContact(string pValue, ContactType pContactType)
|
||||
{
|
||||
var lOldContactDCs = DataContract.SenderContactInformations != null ? DataContract.SenderContactInformations.ToList() : new List<ContactDC>();
|
||||
var lContactDC = lOldContactDCs.SingleOrDefault(con => con.ContactType == pContactType);
|
||||
CommitContact(pValue, pContactType, lOldContactDCs);
|
||||
|
||||
DataContract.SenderContactInformations = lOldContactDCs;
|
||||
}
|
||||
|
||||
|
||||
private void CommitReceiverContact(string pValue, ContactType pContactType)
|
||||
{
|
||||
var lOldContactDCs = DataContract.RecipientContactInformations != null ? DataContract.RecipientContactInformations.ToList() : new List<ContactDC>();
|
||||
CommitContact(pValue, pContactType, lOldContactDCs);
|
||||
|
||||
DataContract.RecipientContactInformations = lOldContactDCs;
|
||||
}
|
||||
|
||||
private void CommitContact(string pValue, ContactType pContactType, List<ContactDC> lOldContactDCs)
|
||||
{
|
||||
var lContactDC = lOldContactDCs.SingleOrDefault(con => con.ContactType == pContactType);
|
||||
|
||||
if (string.IsNullOrEmpty(pValue) && lContactDC != null)
|
||||
{
|
||||
@@ -926,8 +947,6 @@ namespace BeWo.ViewModel
|
||||
|
||||
lContactDC.ContactValue = pValue;
|
||||
}
|
||||
|
||||
DataContract.SenderContactInformations = lOldContactDCs;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
OperationsServiceImp xc = new OperationsServiceImp();
|
||||
|
||||
var mandator = xc.GetMandator();
|
||||
var mandator = xc.GetMandator2(false);
|
||||
|
||||
if (mandator.Apikey == apikey) {
|
||||
|
||||
|
||||
@@ -2081,8 +2081,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
checkSR.ServiceDescription = OperationsService.GetServiceDescription(Model.SelectedServiceDescriptionOid.Value);
|
||||
|
||||
var man = OperationsService.GetMandator();
|
||||
var s = man.Settings ?? string.Empty;
|
||||
var manx = OperationsService.GetMandator();
|
||||
var s = manx.Settings ?? string.Empty;
|
||||
var einzeln = s.Split(';');
|
||||
var g = einzeln.ToList().FirstOrDefault(f => f.Contains("MaxDaysEditServiceRecordsAllowed"));
|
||||
var t = g != null ? int.Parse(g.Split('=')[1]) : 0;
|
||||
|
||||
@@ -1367,15 +1367,25 @@ namespace BeWo.Data.Access
|
||||
return c.Select(s => s.SequencePosition).ToList();
|
||||
}
|
||||
|
||||
public IEnumerable<InvoiceBase> GetInvoiceBases(DateTime? startDate, DateTime? endDate)
|
||||
public IEnumerable<InvoiceBase> GetInvoiceBases(DateTime? startDate, DateTime? endDate, bool useInvoiceDate = true)
|
||||
{
|
||||
var lCriteria = CreateCriteriaIsActive<InvoiceBase>();
|
||||
if (startDate.HasValue)
|
||||
lCriteria.Add(Restrictions.Ge(InvoiceBase.PropertyName_InvoiceDate, startDate));
|
||||
if (endDate.HasValue)
|
||||
lCriteria.Add(Restrictions.Le(InvoiceBase.PropertyName_InvoiceDate, endDate));
|
||||
if (useInvoiceDate)
|
||||
{
|
||||
if (startDate.HasValue)
|
||||
lCriteria.Add(Restrictions.Ge(InvoiceBase.PropertyName_InvoiceDate, startDate));
|
||||
if (endDate.HasValue)
|
||||
lCriteria.Add(Restrictions.Le(InvoiceBase.PropertyName_InvoiceDate, endDate));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (startDate.HasValue)
|
||||
lCriteria.Add(Restrictions.Ge(InvoiceBase.PropertyName_AccountingPeriodEnd, startDate));
|
||||
if (endDate.HasValue)
|
||||
lCriteria.Add(Restrictions.Le(InvoiceBase.PropertyName_AccountingPeriodStart, endDate));
|
||||
}
|
||||
|
||||
return lCriteria.List<InvoiceBase>();
|
||||
return lCriteria.List<InvoiceBase>();
|
||||
}
|
||||
|
||||
public IEnumerable<SupportConcept> GetAllActiveSupportConceptsByCustomers(List<long> customerOids, bool expiredOnesToo = false)
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
<Compile Include="Access\UserDAO.cs" />
|
||||
<Compile Include="ASPHibernateSessionManager.cs" />
|
||||
<Compile Include="DefaultHibernateSessionManager.cs" />
|
||||
<Compile Include="Entities\BuchungsExport.cs" />
|
||||
<Compile Include="Entities\NotizenKategorie.cs" />
|
||||
<Compile Include="Entities\NotizenEintrag.cs" />
|
||||
<Compile Include="Entities\Feiertag.cs" />
|
||||
@@ -573,6 +574,9 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="ICD10\icd10gm2012syst_claml_20110923.xml" />
|
||||
<EmbeddedResource Include="Mappings\BuchungsExport.hbm.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Mappings\Feiertag.hbm.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -393,7 +393,7 @@ namespace BeWo.Service.Invoicing
|
||||
if (LoggedInUserOperationContextExt.Current != null)
|
||||
{
|
||||
var lLoggedInEmployee = LoggedInUserOperationContextExt.Current.User.Employee;
|
||||
var mandator = new OperationsServiceImp().GetMandator();
|
||||
var mandator = new OperationsServiceImp().GetMandator2(false);
|
||||
|
||||
if (lLoggedInEmployee != null)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace BeWo.Service.Invoicing
|
||||
public virtual InvoiceCreation CreateInvoiceCreator(string specificId, string tenant, Dictionary<BS.Shared.DataContracts.Compact.CompactSupportConceptDC, List<BS.Shared.DataContracts.ServiceRecordDC>> supportConcepts2ServiceRecords)
|
||||
{
|
||||
var os = new OperationsServiceImp();
|
||||
var m = os.GetMandator();
|
||||
var m = os.GetMandator2(false);
|
||||
if (m.AllowSbd)
|
||||
{
|
||||
return new SbdDefaultInvoiceCreation();
|
||||
|
||||
@@ -691,6 +691,11 @@ namespace BeWo.Service.Invoicing
|
||||
CalculateInvoiceItemAmounts(ii);
|
||||
}
|
||||
|
||||
if (ii.UnitCount.HasValue)
|
||||
{
|
||||
si.RecordedBillableFLSBrutto = (si.RecordedBillableFLSBrutto ?? 0) + ii.UnitCount;
|
||||
}
|
||||
|
||||
var list = CreateAdditionalInvoiceItems(ap);
|
||||
invoiceItems.AddRange(list);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.Core;
|
||||
@@ -12,6 +13,7 @@ using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Services;
|
||||
using BS.Shared.Translation;
|
||||
using NHibernate.Util;
|
||||
using Utils = BS.Shared.Core.Utils;
|
||||
|
||||
namespace BeWo.Service.Plugins
|
||||
@@ -191,5 +193,42 @@ namespace BeWo.Service.Plugins
|
||||
{
|
||||
return new ExcelDownload(pHeaderCaption, pContent).CreateExcelOutputString();
|
||||
}
|
||||
|
||||
public virtual void CreateBuchungsExportProtokollEintrag(QueryDC query)
|
||||
{
|
||||
var export = new BuchungsExport();
|
||||
export.Datum = DateTime.Now;
|
||||
export.Name = query.Title;
|
||||
export.FileName = query.FileName;
|
||||
export.Export = query.QueryResult;
|
||||
export.Parameter = CreateParameterString(query);
|
||||
DAOFactory.GenericDAO.Insert(export);
|
||||
|
||||
}
|
||||
|
||||
private string CreateParameterString(QueryDC query)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
if (query.Parameter != null)
|
||||
{
|
||||
foreach (var p in query.Parameter)
|
||||
{
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
sb.Append(";");
|
||||
}
|
||||
|
||||
sb.Append(p.Name);
|
||||
sb.Append("=");
|
||||
if (p.Value != null)
|
||||
{
|
||||
sb.Append(p.Value.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace BeWo.Service.Plugins
|
||||
{
|
||||
#if DEBUG
|
||||
var t = "demo";
|
||||
//t = "irgendwaswasesnichtgibt";
|
||||
t = "irgendwaswasesnichtgibt";
|
||||
//t = "2356097460"; // Lebenshilfe Würzburg
|
||||
//t = "1234567890"; // Präsentationsdatenbank
|
||||
//t = "5687373602"; // LH Duisburg
|
||||
@@ -54,7 +54,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "6923790936"; // Integra e.V.
|
||||
//t = "2392153512"; // Christopherus Haus
|
||||
//t = "2918696314"; // Caritas Frankfurt 2
|
||||
//t = "9495336024"; // VKMAachen app1
|
||||
//t = "9495336024"; // VKM Aachen
|
||||
//t = "5237724939"; // Indro ABW
|
||||
//t = "7635986435"; // Köln Ring
|
||||
//t = "4074176860"; // Soziale Dienstleistung Gessner
|
||||
@@ -82,9 +82,9 @@ namespace BeWo.Service.Plugins
|
||||
//t = "4867997795"; // ADiK Kleve
|
||||
//t = "3184859776"; // Sergej Becker
|
||||
//t = "7752610643"; // BWK Gbr
|
||||
t = "3785623125"; // Betreuwo
|
||||
//t = "3785623125"; // Betreuwo
|
||||
//t = "7130228334"; // LH Borken
|
||||
//t = "4209820830"; // VKM Hamm
|
||||
//t = "4209820830"; // VKM HammTalpha
|
||||
//t = "5700328131"; // Betreutes Wohnen St. Ludgerus Essen-Werden
|
||||
//t = "1907984777"; // Soziale Dienste Katrin Schmidt
|
||||
//t = "9033246467"; // SKM Menden
|
||||
@@ -95,7 +95,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "2727001973"; // SD Julia Schönberg
|
||||
//t = "5653806613"; // Feid und Kollegen
|
||||
//t = "3830114427"; // FiZ Familie im Zentrum Hof
|
||||
//t = "7138297573"; // Tagwerk betreutes wohnen
|
||||
t = "7138297573"; // Tagwerk betreutes wohnen
|
||||
//t = "1008896531"; // BeWo Auxilio
|
||||
//t = "9383760246"; // Die Kette
|
||||
//t = "5915565037"; // LH Remscheid
|
||||
@@ -177,7 +177,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "2331203795"; // BeWo für dich
|
||||
//t = "5426234256"; // SKM Leverkusen
|
||||
//t = "4137042939"; // MLG Lebengestalten / Haus Müllestumpe
|
||||
//t = "5260936181"; // LORI
|
||||
t = "5260936181"; // LORI
|
||||
//t = "1931553444"; // HIBA
|
||||
//t = "7185338722"; // BeWo Walz & Paiva
|
||||
//t = "3196643272"; // Betreutes Wohnen Lisa Wöll
|
||||
@@ -185,21 +185,23 @@ namespace BeWo.Service.Plugins
|
||||
//t = "2591682148"; // Humanitas
|
||||
//t = "9805564204"; // LeWo Aachen
|
||||
//t = "7215356798"; // Triathlon
|
||||
//t = "3664416736"; // LH Mönchengladbach
|
||||
//t = "4290816992"; // BeWo im flow
|
||||
//t = "3612443220"; // ABW Weeger
|
||||
//t = "6265842607"; // BeWo Dienstleistungen Pougin und Klaasen
|
||||
//t = "9273332501"; // Pflegedienst Wessel
|
||||
//t = "4693476852"; // HSH Netzwerk
|
||||
//t = "3884496709"; // Wahl e.V.
|
||||
//t = "9883255779"; // VKM Menden
|
||||
//t = "9556218062"; // Diakonie Landshut
|
||||
//t = "2279593936"; // Diakonie Mülheim
|
||||
//t = "3623837005"; // Betreuwo Wesel
|
||||
//t = "8407321888"; // AWO Wesel
|
||||
//t = "8454426692"; // Mit-Menschen
|
||||
|
||||
//t = "ABC";
|
||||
//t = "3664416736"; // LH Mönchengladbach
|
||||
//t = "4290816992"; // BeWo im flow
|
||||
//t = "3612443220"; // ABW Weeger
|
||||
//t = "6265842607"; // BeWo Dienstleistungen Pougin und Klaasen
|
||||
//t = "9273332501"; // Pflegedienst Wessel
|
||||
//t = "4693476852"; // HSH Netzwerk
|
||||
//t = "3884496709"; // Wahl e.V.
|
||||
//t = "9883255779"; // VKM Menden
|
||||
//t = "9556218062"; // Diakonie Landshut
|
||||
//t = "2279593936"; // Diakonie Mülheim
|
||||
//t = "3623837005"; // Betreuwo Wesel
|
||||
//t = "8407321888"; // AWO Wesel
|
||||
//t = "8454426692"; // Mit-Menschen
|
||||
//t = "0629004412"; // BeWo-Colonia Basaran
|
||||
//t = "7668701607"; // Wohnstätten Essen
|
||||
//t = "3833058951"; // Aids Hilfe Duisburg (Self)
|
||||
//t = "9463879250"; // ABW Dziallas und Muhrin
|
||||
|
||||
return t;
|
||||
#else
|
||||
|
||||
@@ -198,13 +198,10 @@ namespace BeWo.Service.Plugins
|
||||
return result;
|
||||
}
|
||||
|
||||
public virtual List<ServiceRecordValidationResultDC> ValidateServiceRecord(ServiceRecordDC newServiceRecord,
|
||||
SupportConceptStatisticsDC statistics, int maxDaysEditServiceRecordsAllowed,
|
||||
IList<long> employeeOids, IList<long> cb2scOids)
|
||||
public virtual List<ServiceRecordValidationResultDC> ValidateServiceRecord(ServiceRecordDC newServiceRecord, SupportConceptStatisticsDC statistics, int maxDaysEditServiceRecordsAllowed, IList<long> employeeOids, IList<long> cb2scOids)
|
||||
{
|
||||
var result = new List<ServiceRecordValidationResultDC>();
|
||||
|
||||
|
||||
|
||||
if (!newServiceRecord.Start.HasValue)
|
||||
return result;
|
||||
|
||||
|
||||
@@ -73,32 +73,32 @@ namespace BeWo.Service.Plugins
|
||||
rootDC.Groups = new List<FLSAnalysisGroupDC>();
|
||||
rootDC.Customer = MapperFactory.CompactCustomerDC_Customer.MapToNewDC(customer);
|
||||
|
||||
IList<ServiceRecord> serviceRecordes = null;
|
||||
IList<ServiceRecord> serviceRecords = null;
|
||||
|
||||
if (config.StartDate != null && config.EndDate != null)
|
||||
{
|
||||
var span = new DateTimeSpan();
|
||||
span.StartDateTime = config.StartDate.Value;
|
||||
span.EndDateTime = config.EndDate.Value;
|
||||
serviceRecordes = DAOFactory.SearchDAO.FindCustomerServiceRecords(customer.Oid.Value, span, null, config.ShowOnlyMarker ? ServiceRecordTypeId.Content : (ServiceRecordTypeId?)null, false);
|
||||
serviceRecords = DAOFactory.SearchDAO.FindCustomerServiceRecords(customer.Oid.Value, span, null, config.ShowOnlyMarker ? ServiceRecordTypeId.Content : (ServiceRecordTypeId?)null, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
serviceRecordes = customer.ServiceRecordList;
|
||||
serviceRecords = customer.ServiceRecordList;
|
||||
}
|
||||
|
||||
Dictionary<long, FLSAnalysisGroupDC> flsGroupDict = new Dictionary<long, FLSAnalysisGroupDC>();
|
||||
Dictionary<string, SupportConceptFLSOverviewDC> supportConceptOverviewDict = new Dictionary<string, SupportConceptFLSOverviewDC>();
|
||||
|
||||
|
||||
bool createGroups = AllowCustomerAnalysis(customer, config);
|
||||
bool createGroups = AllowCustomerAnalysis(customer, config, serviceRecords);
|
||||
|
||||
|
||||
|
||||
if (createGroups)
|
||||
{
|
||||
Dictionary<long, ServiceRecord> groupBookingDict = new Dictionary<long, ServiceRecord>();
|
||||
foreach (ServiceRecord sr in serviceRecordes)
|
||||
foreach (ServiceRecord sr in serviceRecords)
|
||||
{
|
||||
bool cont = true;
|
||||
if (sr.Employee != null && sr.Employee.IsActive == ActivationTypeId.Deleted)
|
||||
@@ -190,13 +190,13 @@ namespace BeWo.Service.Plugins
|
||||
return rootDC;
|
||||
}
|
||||
|
||||
public virtual bool AllowCustomerAnalysis(Customer customer, FLSAnalysisConfigDC config)
|
||||
public virtual bool AllowCustomerAnalysis(Customer customer, FLSAnalysisConfigDC config, IList<ServiceRecord> serviceRecords)
|
||||
{
|
||||
bool allow = true;
|
||||
if (config.EmployeeOid != null)
|
||||
{
|
||||
allow = false;
|
||||
foreach (ServiceRecord sr in customer.ServiceRecordList)
|
||||
foreach (ServiceRecord sr in serviceRecords)
|
||||
{
|
||||
if (sr.Employee != null && sr.Employee.Oid.Value == config.EmployeeOid.Value)
|
||||
{
|
||||
|
||||
@@ -322,6 +322,7 @@
|
||||
<Compile Include="Multitenancy\MultitenancyBehaviorExtension.cs" />
|
||||
<Compile Include="Multitenancy\MultitenancyContextInitializer.cs" />
|
||||
<Compile Include="Multitenancy\MultitenancyEndpointBehavior.cs" />
|
||||
<Compile Include="Plugins\AccountingService.cs" />
|
||||
<Compile Include="Plugins\CustomerService.cs" />
|
||||
<Compile Include="Plugins\StundenuebersichtAuswertung.cs" />
|
||||
<Compile Include="Plugins\EmployeeService.cs" />
|
||||
|
||||
@@ -29,7 +29,10 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
try
|
||||
{
|
||||
ServiceLogic.SetActivationType<InvoiceBase>(invoices.ToDictionary(i => i.InvoiceBaseOid.Value, i => i.InvoiceBaseVersion.Value), ActivationTypeId.Deleted);
|
||||
var s = PluginLoader.FindClass<AccountingService>();
|
||||
s.DeactivateInvoiceBases(invoices);
|
||||
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -41,8 +44,8 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
try
|
||||
{
|
||||
ServiceLogic.SetActivationType<ServiceInvoice>(invoices.ToDictionary(i => i.ServiceInvoiceOid.Value, i => i.ServiceInvoiceVersion.Value), ActivationTypeId.Deleted);
|
||||
ServiceLogic.SetActivationType<InvoiceBase>(invoices.ToDictionary(i => i.InvoiceBase.InvoiceBaseOid.Value, i => i.InvoiceBase.InvoiceBaseVersion.Value), ActivationTypeId.Deleted);
|
||||
var s = PluginLoader.FindClass<AccountingService>();
|
||||
s.DeactivateServiceInvoices(invoices);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -147,14 +150,10 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime? end = endDate;
|
||||
if (end.HasValue)
|
||||
{
|
||||
end = end.Value.Date.AddDays(1).AddTicks(-1);
|
||||
}
|
||||
var list = DAOFactory.SearchDAO.GetInvoiceBases(startDate, end);
|
||||
var s = PluginLoader.FindClass<AccountingService>();
|
||||
|
||||
return MapperFactory.InvoiceBaseDC_InvoiceBase.MapToNewDCs(list);
|
||||
return s.GetInvoiceBases(startDate, endDate);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@@ -388,6 +388,16 @@ namespace BeWo.Service.ServiceImplementations
|
||||
dc = financeItemsByCb2scOid[oid];
|
||||
dc.AmountPaid += at.Amount;
|
||||
|
||||
//DateTime dt = at.BookingDate.Value;
|
||||
//if (at.GueltigkeitsDatum.HasValue)
|
||||
//{
|
||||
// dt = at.GueltigkeitsDatum.Value;
|
||||
//}
|
||||
|
||||
//if (start <= dt && dt <= end)
|
||||
//{
|
||||
// dc.AmountPaidInReportTimeSpan += at.Amount;
|
||||
//}
|
||||
//AccountingTransactionDC atdc = this.CreateAccountingTransactionDC(at);
|
||||
//dc.AccountingTransactions.Add(atdc);
|
||||
}
|
||||
|
||||
@@ -992,13 +992,55 @@ namespace BeWo.Service.ServiceImplementations
|
||||
Dictionary<long, bool> processedGroups = new Dictionary<long, bool>();
|
||||
Employee emp = DAOFactory.GenericDAO.LoadByID<Employee>(employeeOid.Value);
|
||||
|
||||
|
||||
ApplicationUser loggedInUser = null;
|
||||
|
||||
if (LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null)
|
||||
{
|
||||
loggedInUser = LoggedInUserOperationContextExt.Current.User;
|
||||
}
|
||||
else
|
||||
{
|
||||
loggedInUser = SessionFacade.LoggedInUser;
|
||||
}
|
||||
|
||||
bool nurEigene = true;
|
||||
if (loggedInUser != null)
|
||||
{
|
||||
|
||||
//Alle
|
||||
if (Utils.UserHasRight(loggedInUser, UserRightType.SupportConcept_ViewAllSupportConcepts))
|
||||
{
|
||||
nurEigene = false;
|
||||
}
|
||||
//Vom Team
|
||||
else if (Utils.UserHasRight(loggedInUser, UserRightType.SupportConcept_ViewMyTeams))
|
||||
{
|
||||
//?
|
||||
}
|
||||
//Eigene
|
||||
else if (Utils.UserHasRight(loggedInUser, UserRightType.SupportConceptView_View))
|
||||
{
|
||||
nurEigene = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach (var groupOfPeople in allgroups)
|
||||
{
|
||||
if (!processedGroups.ContainsKey(groupOfPeople.Oid.Value))
|
||||
{
|
||||
processedGroups.Add(groupOfPeople.Oid.Value, true);
|
||||
if (employeeOid.Value == groupOfPeople.CreatedByEmployeeOid || ContainsMemberOfEmployee(groupOfPeople, emp))
|
||||
|
||||
if (nurEigene)
|
||||
{
|
||||
if (employeeOid.Value == groupOfPeople.CreatedByEmployeeOid || ContainsMemberOfEmployee(groupOfPeople, emp))
|
||||
groups.Add(groupOfPeople);
|
||||
}
|
||||
else
|
||||
{
|
||||
groups.Add(groupOfPeople);
|
||||
}
|
||||
}
|
||||
}
|
||||
return groups;
|
||||
|
||||
@@ -883,6 +883,11 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
|
||||
public MandatorDC GetMandator()
|
||||
{
|
||||
return GetMandator2(true);
|
||||
}
|
||||
|
||||
public MandatorDC GetMandator2(bool fetchContractState)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -891,18 +896,22 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
Dictionary<string, string> settingValueDict = GetSettingsValueDict(manDc.Settings);
|
||||
|
||||
|
||||
string contractState = GetContractState();
|
||||
Dictionary<string, string> contractStateDict = GetSettingsValueDict(contractState);
|
||||
|
||||
foreach (var kv in contractStateDict)
|
||||
if (fetchContractState)
|
||||
{
|
||||
if (settingValueDict.ContainsKey(kv.Key))
|
||||
string contractState = GetContractState();
|
||||
Dictionary<string, string> contractStateDict = GetSettingsValueDict(contractState);
|
||||
|
||||
foreach (var kv in contractStateDict)
|
||||
{
|
||||
settingValueDict.Remove(kv.Key);
|
||||
if (settingValueDict.ContainsKey(kv.Key))
|
||||
{
|
||||
settingValueDict.Remove(kv.Key);
|
||||
}
|
||||
|
||||
settingValueDict.Add(kv.Key, kv.Value);
|
||||
}
|
||||
settingValueDict.Add(kv.Key, kv.Value);
|
||||
}
|
||||
|
||||
if (!settingValueDict.ContainsKey("ShowScheduler") && man.IsSchedulerAllowed)
|
||||
{
|
||||
settingValueDict.Add("ShowScheduler", "1");
|
||||
@@ -911,6 +920,15 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
settingValueDict.Add("ShowMedication", "1");
|
||||
}
|
||||
if (!settingValueDict.ContainsKey("ShowDistanceFields") && settingValueDict.ContainsKey("ShowKilometer"))
|
||||
{
|
||||
if (settingValueDict["ShowKilometer"] != "0")
|
||||
{
|
||||
settingValueDict.Add("ShowDistanceFields", "1");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
manDc.Settings = "";
|
||||
|
||||
|
||||
|
||||
@@ -132,7 +132,8 @@ namespace BS.Shared
|
||||
ChatBewoMessageSync = 125,
|
||||
Feiertag = 126,
|
||||
NotizenKategorie = 127,
|
||||
NotizenEintrag = 128
|
||||
NotizenEintrag = 128,
|
||||
BuchungsExport = 129
|
||||
}
|
||||
|
||||
public enum SystemEntryID
|
||||
|
||||
@@ -545,12 +545,20 @@ namespace BS.Shared.Core
|
||||
if (min.X < int.MaxValue && min.Y < int.MaxValue && max.X > int.MinValue && max.Y > int.MinValue)
|
||||
{
|
||||
Rectangle cropRectangle = new Rectangle(min.X, min.Y, max.X - min.X, max.Y - min.Y);
|
||||
Bitmap newBitmap = new Bitmap(cropRectangle.Width, cropRectangle.Height);
|
||||
using (Graphics g = Graphics.FromImage(newBitmap))
|
||||
if (cropRectangle.Width > 0 && cropRectangle.Height > 0)
|
||||
{
|
||||
g.DrawImage(originalBitmap, 0, 0, cropRectangle, GraphicsUnit.Pixel);
|
||||
Bitmap newBitmap = new Bitmap(cropRectangle.Width, cropRectangle.Height);
|
||||
using (Graphics g = Graphics.FromImage(newBitmap))
|
||||
{
|
||||
g.DrawImage(originalBitmap, 0, 0, cropRectangle, GraphicsUnit.Pixel);
|
||||
}
|
||||
|
||||
return newBitmap;
|
||||
}
|
||||
else
|
||||
{
|
||||
int test = 0;
|
||||
}
|
||||
return newBitmap;
|
||||
}
|
||||
|
||||
return originalBitmap;
|
||||
|
||||
@@ -27,6 +27,9 @@ namespace BS.Shared.DataContracts
|
||||
[DataMember]
|
||||
public decimal AmountPaid { get; set; }
|
||||
|
||||
//[DataMember]
|
||||
//public decimal AmountPaidInReportTimeSpan { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public decimal AmountTotal { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user