diff --git a/.gitignore b/.gitignore index 97bc03a0e..bc334f9e9 100644 --- a/.gitignore +++ b/.gitignore @@ -629,6 +629,8 @@ obj /DakotaUnitTest/obj /WohneinheitUnitTest/bin /WohneinheitUnitTest/obj +/XRechnungUnitTest/bin +/XRechnungUnitTest/obj /BeWoDatabaseTerminator/BeWoDatabaseTerminator/bin/Debug /BeWoDatabaseTerminator/BeWoDatabaseTerminator/bin/Release /ReportImp/TestLWV diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs index bd7f1511c..522360ee9 100644 --- a/BeWo/ServiceProxy/Generated.cs +++ b/BeWo/ServiceProxy/Generated.cs @@ -2066,6 +2066,7 @@ namespace BeWo.ServiceProxy [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary>))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Invoicing.BankAccountDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AccountingReportDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] @@ -2100,9 +2101,13 @@ namespace BeWo.ServiceProxy [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceInvoicePeriodDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.InvoiceNumberDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AppRequestDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AppResponseDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.InvoiceType))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.RequestType))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.GkvTransferResultType))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Invoicing.XRechnung.XRechnungRequest))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Invoicing.XRechnung.XRechnungResponse))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvTransferProtokollDC))] @@ -6332,6 +6337,7 @@ namespace BeWo.ServiceProxy [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary>))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Invoicing.BankAccountDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AccountingReportDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] @@ -6366,9 +6372,13 @@ namespace BeWo.ServiceProxy [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceInvoicePeriodDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.InvoiceNumberDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AppRequestDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AppResponseDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.InvoiceType))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.RequestType))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.GkvTransferResultType))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Invoicing.XRechnung.XRechnungRequest))] + [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Invoicing.XRechnung.XRechnungResponse))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))] [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GkvAbrechnung.GkvTransferProtokollDC))] @@ -9741,6 +9751,10 @@ namespace BeWo.ServiceProxy [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/StorniereInvoiceBasesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] void StorniereInvoiceBases(System.Collections.Generic.List invoices); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/GetXRechnung", ReplyAction="http://tempuri.org/IAccountingService/GetXRechnungResponse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/GetXRechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + BS.Shared.DataContracts.Invoicing.XRechnung.XRechnungResponse GetXRechnung(BS.Shared.DataContracts.Invoicing.XRechnung.XRechnungRequest req); + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/GetGkvAbrechnung", ReplyAction="http://tempuri.org/IAccountingService/GetGkvAbrechnungResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/GetGkvAbrechnungBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC GetGkvAbrechnung(long oid); @@ -9968,6 +9982,11 @@ namespace BeWo.ServiceProxy base.Channel.StorniereInvoiceBases(invoices); } + public BS.Shared.DataContracts.Invoicing.XRechnung.XRechnungResponse GetXRechnung(BS.Shared.DataContracts.Invoicing.XRechnung.XRechnungRequest req) + { + return base.Channel.GetXRechnung(req); + } + public BS.Shared.DataContracts.GkvAbrechnung.GkvAbrechnungDC GetGkvAbrechnung(long oid) { return base.Channel.GetGkvAbrechnung(oid); diff --git a/BeWoTests.sln b/BeWoTests.sln index f9a4282df..6424c7787 100644 --- a/BeWoTests.sln +++ b/BeWoTests.sln @@ -43,6 +43,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Translation", "Translation" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TranslationUnitTest", "TranslationUnitTest\TranslationUnitTest.csproj", "{83C43FEC-233D-49EF-BD23-BF842A3EBDF5}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Invoicing", "Invoicing", "{67C70649-9837-49F3-982A-993DBD5A7AD3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XRechnungUnitTest", "XRechnungUnitTest\XRechnungUnitTest.csproj", "{6CED1002-FFB1-46AD-97C7-583BA11208F3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|.NET = Debug|.NET @@ -189,6 +193,18 @@ Global {83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Release|Any CPU.Build.0 = Release|Any CPU {83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {83C43FEC-233D-49EF-BD23-BF842A3EBDF5}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {6CED1002-FFB1-46AD-97C7-583BA11208F3}.Debug|.NET.ActiveCfg = Debug|Any CPU + {6CED1002-FFB1-46AD-97C7-583BA11208F3}.Debug|.NET.Build.0 = Debug|Any CPU + {6CED1002-FFB1-46AD-97C7-583BA11208F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CED1002-FFB1-46AD-97C7-583BA11208F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CED1002-FFB1-46AD-97C7-583BA11208F3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6CED1002-FFB1-46AD-97C7-583BA11208F3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {6CED1002-FFB1-46AD-97C7-583BA11208F3}.Release|.NET.ActiveCfg = Release|Any CPU + {6CED1002-FFB1-46AD-97C7-583BA11208F3}.Release|.NET.Build.0 = Release|Any CPU + {6CED1002-FFB1-46AD-97C7-583BA11208F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CED1002-FFB1-46AD-97C7-583BA11208F3}.Release|Any CPU.Build.0 = Release|Any CPU + {6CED1002-FFB1-46AD-97C7-583BA11208F3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {6CED1002-FFB1-46AD-97C7-583BA11208F3}.Release|Mixed Platforms.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -207,6 +223,8 @@ Global {7630915F-DFE4-45A4-A7B1-B6D19B0126C1} = {2F7893AD-34FC-40A2-838A-3D2D8596E9AC} {B331128C-7E9F-4BDC-B509-A8DAE1B94E5C} = {CCD6B644-49E7-4A11-BD8F-607088A4AC83} {83C43FEC-233D-49EF-BD23-BF842A3EBDF5} = {B331128C-7E9F-4BDC-B509-A8DAE1B94E5C} + {67C70649-9837-49F3-982A-993DBD5A7AD3} = {CCD6B644-49E7-4A11-BD8F-607088A4AC83} + {6CED1002-FFB1-46AD-97C7-583BA11208F3} = {67C70649-9837-49F3-982A-993DBD5A7AD3} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {5352BE53-F2FD-442F-85A8-4157599AA153} diff --git a/Data/Data.csproj b/Data/Data.csproj index 5465251e0..fac167435 100644 --- a/Data/Data.csproj +++ b/Data/Data.csproj @@ -392,6 +392,16 @@ + + + + + + + + + + diff --git a/Data/Models/XRechnung/XRBuyer.cs b/Data/Models/XRechnung/XRBuyer.cs new file mode 100644 index 000000000..0a5adf43c --- /dev/null +++ b/Data/Models/XRechnung/XRBuyer.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeWo.Data.Models.XRechnung +{ + public class XRBuyer + { + public string Name { get; set; } + public string ID { get; set; } + public string Street { get; set; } + public string ZipCode { get; set; } + public string City { get; set; } + public string EMail { get; set; } + public string CountryCode { get; set; } + public string Reference { get; set; } + public XRBuyerBankAccount BankAccount { get; set; } + + public XRBuyer() + { + BankAccount = new XRBuyerBankAccount(); + } + } +} diff --git a/Data/Models/XRechnung/XRBuyerBankAccount.cs b/Data/Models/XRechnung/XRBuyerBankAccount.cs new file mode 100644 index 000000000..a8dfbf08b --- /dev/null +++ b/Data/Models/XRechnung/XRBuyerBankAccount.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeWo.Data.Models.XRechnung +{ + public class XRBuyerBankAccount + { + public string IBAN { get; set; } + public string BIC { get; set; } + public string Owner { get; set; } + public string MandateID { get; set; } + } +} diff --git a/Data/Models/XRechnung/XRInvoice.cs b/Data/Models/XRechnung/XRInvoice.cs new file mode 100644 index 000000000..510e9f77f --- /dev/null +++ b/Data/Models/XRechnung/XRInvoice.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeWo.Data.Models.XRechnung +{ + public class XRInvoice + { + public string Type { get; set; } + public string Number { get; set; } + public string Date { get; set; } + public string Currency { get; set; } + public string Notice { get; set; } + public XRInvoicePeriod Peroid { get; set; } + public XRInvoicePayment Payment { get; set; } + + public XRInvoice() + { + Peroid = new XRInvoicePeriod(); + Payment = new XRInvoicePayment(); + } + } +} diff --git a/Data/Models/XRechnung/XRInvoicePayment.cs b/Data/Models/XRechnung/XRInvoicePayment.cs new file mode 100644 index 000000000..94055a797 --- /dev/null +++ b/Data/Models/XRechnung/XRInvoicePayment.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeWo.Data.Models.XRechnung +{ + public class XRInvoicePayment + { + public string Type { get; set; } + public string Term { get; set; } + public string DueDate { get; set; } + } +} diff --git a/Data/Models/XRechnung/XRInvoicePeriod.cs b/Data/Models/XRechnung/XRInvoicePeriod.cs new file mode 100644 index 000000000..0bbbde108 --- /dev/null +++ b/Data/Models/XRechnung/XRInvoicePeriod.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeWo.Data.Models.XRechnung +{ + public class XRInvoicePeriod + { + public string Start { get; set; } + public string End { get; set; } + public string Description { get; set; } + } +} diff --git a/Data/Models/XRechnung/XRPosition.cs b/Data/Models/XRechnung/XRPosition.cs new file mode 100644 index 000000000..c076b298c --- /dev/null +++ b/Data/Models/XRechnung/XRPosition.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeWo.Data.Models.XRechnung +{ + public class XRPosition + { + public string Quantity { get; set; } + public string QuantityType { get; set; } + public string Text { get; set; } + public string Net { get; set; } + public string NetTotal { get; set; } + public string Tax { get; set; } + public string TaxSum { get; set; } + public string TaxType { get; set; } + } +} diff --git a/Data/Models/XRechnung/XRSeller.cs b/Data/Models/XRechnung/XRSeller.cs new file mode 100644 index 000000000..c425125fd --- /dev/null +++ b/Data/Models/XRechnung/XRSeller.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeWo.Data.Models.XRechnung +{ + public class XRSeller + { + public string Name { get; set; } + public string ID { get; set; } + public string TaxID { get; set; } + public string VatID { get; set; } + public string Street { get; set; } + public string ZipCode { get; set; } + public string City { get; set; } + public string EMail { get; set; } + public string CountryCode { get; set; } + public XRSellerContact Contact { get; set; } + public XRSellerBankAccount BankAccount { get; set; } + + public XRSeller() + { + Contact = new XRSellerContact(); + BankAccount = new XRSellerBankAccount(); + } + } +} diff --git a/Data/Models/XRechnung/XRSellerBankAccount.cs b/Data/Models/XRechnung/XRSellerBankAccount.cs new file mode 100644 index 000000000..a2517361f --- /dev/null +++ b/Data/Models/XRechnung/XRSellerBankAccount.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeWo.Data.Models.XRechnung +{ + public class XRSellerBankAccount + { + public string IBAN { get; set; } + public string BIC { get; set; } + public string Owner { get; set; } + public string Reference { get; set; } + public string ReferenceID { get; set; } + } +} diff --git a/Data/Models/XRechnung/XRSellerContact.cs b/Data/Models/XRechnung/XRSellerContact.cs new file mode 100644 index 000000000..e85ba8ae4 --- /dev/null +++ b/Data/Models/XRechnung/XRSellerContact.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeWo.Data.Models.XRechnung +{ + public class XRSellerContact + { + public string Name { get; set; } + public string Department { get; set; } + public string Phone { get; set; } + public string EMail { get; set; } + } +} diff --git a/Data/Models/XRechnung/XRechnung.cs b/Data/Models/XRechnung/XRechnung.cs new file mode 100644 index 000000000..8ffadcc8d --- /dev/null +++ b/Data/Models/XRechnung/XRechnung.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeWo.Data.Models.XRechnung +{ + public class XRechnung + { + public XRInvoice Invoice { get; set; } + public XRSeller Seller { get; set; } + public XRBuyer Buyer { get; set; } + public List Position { get; set; } + + public XRechnung() + { + Invoice = new XRInvoice(); + Seller = new XRSeller(); + Buyer = new XRBuyer(); + Position = new List(); + } + + //public static XRechnung GetExample() + //{ + // var xrec = new XRechnung(); + + // xrec.Invoice.Type = "380"; + // xrec.Invoice.Number = "BWP28418"; + // xrec.Invoice.Date = "20141002"; + // xrec.Invoice.Currency = "EUR"; + // xrec.Invoice.Notice = "Rechnung gemäß Bestellung vom 01.03.2018."; + //} + } +} diff --git a/Host/Host.csproj.user b/Host/Host.csproj.user index b2e12d1fa..05b240bab 100644 --- a/Host/Host.csproj.user +++ b/Host/Host.csproj.user @@ -3,7 +3,7 @@ BeWo2.0 true - Release|Any CPU + Debug|Any CPU false @@ -12,5 +12,29 @@ ProjectFiles - + + + + + + + CurrentPage + True + False + False + False + + + + + + + + + True + False + + + + \ No newline at end of file diff --git a/Service/ServiceContracts/IAccountingService.cs b/Service/ServiceContracts/IAccountingService.cs index 90f31269e..fe2192efb 100644 --- a/Service/ServiceContracts/IAccountingService.cs +++ b/Service/ServiceContracts/IAccountingService.cs @@ -6,171 +6,150 @@ using BS.Shared; using BS.Shared.Core; using BS.Shared.DataContracts; using BS.Shared.DataContracts.GkvAbrechnung; +using BS.Shared.DataContracts.Invoicing.XRechnung; using BS.Shared.DataContracts.Reports; namespace BeWo.Service.ServiceContracts { - [ServiceContract] - public interface IAccountingService - { - [FaultContract(typeof(BeWoFault))] - [OperationContract] - void DeactivateInvoiceBases(List invoices); + [ServiceContract] + public interface IAccountingService + { + [FaultContract(typeof(BeWoFault))] + [OperationContract] + void DeactivateInvoiceBases(List invoices); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - void DeactivateServiceInvoices(List invoices); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + void DeactivateServiceInvoices(List invoices); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - void DeactivateSettlementInvoice(List invoices); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + void DeactivateSettlementInvoice(List invoices); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GenerateInitialServiceInvoices(long costBearerOid, long? supportConceptOid, DateTimeSpan invoicePeriod); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List GenerateInitialServiceInvoices(long costBearerOid, long? supportConceptOid, DateTimeSpan invoicePeriod); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GetAllActiveInvoiceBases(); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List GetAllActiveInvoiceBases(); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GetInvoiceBases(DateTime? startDate, DateTime? endDate); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List GetInvoiceBases(DateTime? startDate, DateTime? endDate); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GetInvoiceBases2(DateTime? startDate, DateTime? endDate, bool filterByInvoiceDate); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List GetInvoiceBases2(DateTime? startDate, DateTime? endDate, bool filterByInvoiceDate); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GetInvoiceBasesForCostBearerAndId(DateTime? startDate, DateTime? endDate, long costBearerOid, String invoiceId); - - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GetInvoiceBasesForCostBearerAndIdAndIsUsed(DateTime? startDate, DateTime? endDate, long costBearerOid, String invoiceId); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List GetInvoiceBasesForCostBearerAndId(DateTime? startDate, DateTime? endDate, long costBearerOid, String invoiceId); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GetGeneralInvoiceBasesForCustomer(long customerOid); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List GetInvoiceBasesForCostBearerAndIdAndIsUsed(DateTime? startDate, DateTime? endDate, long costBearerOid, String invoiceId); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GetGeneralInvoiceBasesForOrganisation(long organisationOid); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List GetGeneralInvoiceBasesForCustomer(long customerOid); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GetGeneralInvoiceBasesForPerson(long personOid); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List GetGeneralInvoiceBasesForOrganisation(long organisationOid); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GetInvoiceBasesForSupportConcept(InvoiceType type, long supportConceptOid); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List GetGeneralInvoiceBasesForPerson(long personOid); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - ServiceInvoiceDC GetServiceInvoiceByInvoiceBaseOid(long invoiceBaseOid); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List GetInvoiceBasesForSupportConcept(InvoiceType type, long supportConceptOid); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GetServiceInvoices(long costBearerOid, long? supportConceptOid, DateTimeSpan period); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + ServiceInvoiceDC GetServiceInvoiceByInvoiceBaseOid(long invoiceBaseOid); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - Settlement2DC GetSettlementByInvoiceBaseOid(long invoiceBaseOid); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List GetServiceInvoices(long costBearerOid, long? supportConceptOid, DateTimeSpan period); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GetSettlementInvoicesForCostBearerAndPeriod(long costBearerOid, DateTime periodStart, DateTime periodEnd); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + Settlement2DC GetSettlementByInvoiceBaseOid(long invoiceBaseOid); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GetSettlementInvoicesForSupportConcept(long supportConceptOid); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List GetSettlementInvoicesForCostBearerAndPeriod(long costBearerOid, DateTime periodStart, DateTime periodEnd); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List InsertNewInvoiceBases(List invoices); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List GetSettlementInvoicesForSupportConcept(long supportConceptOid); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List InsertNewServiceInvoices(List invoices); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List InsertNewInvoiceBases(List invoices); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List InsertNewSettlementInvoice(List invoices); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List InsertNewServiceInvoices(List invoices); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - InvoiceBaseDC LoadInvoiceBaseByOid(long invoiceBaseOid); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List InsertNewSettlementInvoice(List invoices); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - InvoiceNumberDC LoadInvoiceNumber(); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + InvoiceBaseDC LoadInvoiceBaseByOid(long invoiceBaseOid); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - ServiceInvoiceDC LoadServiceInvoiceByOid(long serviceInvoiceOid); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + InvoiceNumberDC LoadInvoiceNumber(); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List UpdateInvoiceBases(List invoices); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + ServiceInvoiceDC LoadServiceInvoiceByOid(long serviceInvoiceOid); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List SetInvoicePaid(List invoices, bool isPaid); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List UpdateInvoiceBases(List invoices); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - InvoiceNumberDC UpdateInvoiceNumber(InvoiceNumberDC dc); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List SetInvoicePaid(List invoices, bool isPaid); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List UpdateServiceInvoices(List invoices); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + InvoiceNumberDC UpdateInvoiceNumber(InvoiceNumberDC dc); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - void UpdateSettlementInvoice(List invoices); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List UpdateServiceInvoices(List invoices); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List LoadInvoiceNumberList(); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + void UpdateSettlementInvoice(List invoices); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List UpdateInvoiceNumberList(List dclist); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List LoadInvoiceNumberList(); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - void StorniereInvoiceBases(List invoices); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + List UpdateInvoiceNumberList(List dclist); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - GkvAbrechnungDC GetGkvAbrechnung(long oid); + [FaultContract(typeof(BeWoFault))] + [OperationContract] + void StorniereInvoiceBases(List invoices); - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GetAllGkvAbrechnungen(); - - [FaultContract(typeof(BeWoFault))] - [OperationContract] - List GetFilteredGkvAbrechnungen(GkvAbrechnungViewFilterDC gkvAbrechnungViewFilter); - - [FaultContract(typeof(BeWoFault))] - [OperationContract] - GkvAbrechnungCreateResponseDC CreateNewGkvAbrechnung(GkvAbrechnungCreateRequestDC request); - - [FaultContract(typeof(BeWoFault))] - [OperationContract] - GkvAbrechnungDC UpdateGkvAbrechnung(GkvAbrechnungDC abrechnung); - - [FaultContract(typeof(BeWoFault))] - [OperationContract] - void DeleteGkvAbrechnung(GkvAbrechnungDC abrechnung); - - [FaultContract(typeof(BeWoFault))] - [OperationContract] - GkvAbrechnungSendResponseDC SendNewGkvAbrechnung(GkvAbrechnungSendRequestDC req); - - [FaultContract(typeof(BeWoFault))] - [OperationContract] - GkvAbrechnungGetIKResponseDC SendGetIKRequest(GkvAbrechnungGetIKRequestDC req); - } + [FaultContract(typeof(BeWoFault))] [OperationContract] XRechnungResponse GetXRechnung(XRechnungRequest req); + [FaultContract(typeof(BeWoFault))] [OperationContract] GkvAbrechnungDC GetGkvAbrechnung(long oid); + [FaultContract(typeof(BeWoFault))] [OperationContract] List GetAllGkvAbrechnungen(); + [FaultContract(typeof(BeWoFault))] [OperationContract] List GetFilteredGkvAbrechnungen(GkvAbrechnungViewFilterDC gkvAbrechnungViewFilter); + [FaultContract(typeof(BeWoFault))] [OperationContract] GkvAbrechnungCreateResponseDC CreateNewGkvAbrechnung(GkvAbrechnungCreateRequestDC request); + [FaultContract(typeof(BeWoFault))] [OperationContract] GkvAbrechnungDC UpdateGkvAbrechnung(GkvAbrechnungDC abrechnung); + [FaultContract(typeof(BeWoFault))] [OperationContract] void DeleteGkvAbrechnung(GkvAbrechnungDC abrechnung); + [FaultContract(typeof(BeWoFault))] [OperationContract] GkvAbrechnungSendResponseDC SendNewGkvAbrechnung(GkvAbrechnungSendRequestDC req); + [FaultContract(typeof(BeWoFault))] [OperationContract] GkvAbrechnungGetIKResponseDC SendGetIKRequest(GkvAbrechnungGetIKRequestDC req); + } } \ No newline at end of file diff --git a/Service/ServiceImplementations/AccountingServiceImp.cs b/Service/ServiceImplementations/AccountingServiceImp.cs index 9e4daf50f..7a4d1e066 100644 --- a/Service/ServiceImplementations/AccountingServiceImp.cs +++ b/Service/ServiceImplementations/AccountingServiceImp.cs @@ -28,6 +28,7 @@ using BS.Shared.Extensions; using BS.Shared.Exceptions; using BS.Shared.AppSender; using BeWo.Data.Security; +using BS.Shared.DataContracts.Invoicing.XRechnung; namespace BeWo.Service.ServiceImplementations { @@ -746,6 +747,11 @@ namespace BeWo.Service.ServiceImplementations } } + public XRechnungResponse GetXRechnung(XRechnungRequest req) + { + return null; + } + #region GKV public GkvAbrechnungDC GetGkvAbrechnung(long oid) { diff --git a/Shared/AppSender/OwnSoftSender.cs b/Shared/AppSender/OwnSoftSender.cs new file mode 100644 index 000000000..ad058b504 --- /dev/null +++ b/Shared/AppSender/OwnSoftSender.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace BS.Shared.AppSender +{ + public static class OwnSoftSender + { + public static string Send(string url, string dataString) + { + string response; + + using (WebClient client = new WebClient()) + { + client.Encoding = Encoding.UTF8; + + client.Headers.Add(HttpRequestHeader.ContentType, "application/xml"); + + response = client.UploadString(url, "POST", dataString); + } + + return response; + } + } +} diff --git a/Shared/DataContracts/AppRequestDC.cs b/Shared/DataContracts/AppRequestDC.cs index 2b3508d1e..9363cfa95 100644 --- a/Shared/DataContracts/AppRequestDC.cs +++ b/Shared/DataContracts/AppRequestDC.cs @@ -11,7 +11,7 @@ namespace BS.Shared.DataContracts /// Kann per RequestSender gesendet werden und als ResponseDC empfangen wird. /// [DataContract] - public abstract class AppRequestDC : IDataContract + public abstract class AppRequestDC { public AppRequestDC(RequestType type) { diff --git a/Shared/DataContracts/AppResponseDC.cs b/Shared/DataContracts/AppResponseDC.cs index 90994c38b..ac01ac7e9 100644 --- a/Shared/DataContracts/AppResponseDC.cs +++ b/Shared/DataContracts/AppResponseDC.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace BS.Shared.DataContracts { [DataContract] - public abstract class AppResponseDC : IDataContract + public abstract class AppResponseDC { [DataMember] public bool Success { get; set; } [DataMember] public string Message { get; set; } diff --git a/Shared/DataContracts/GkvAbrechnung/GkvRequestDC.cs b/Shared/DataContracts/GkvAbrechnung/GkvRequestDC.cs index 215005839..92bda6b46 100644 --- a/Shared/DataContracts/GkvAbrechnung/GkvRequestDC.cs +++ b/Shared/DataContracts/GkvAbrechnung/GkvRequestDC.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace BS.Shared.DataContracts.GkvAbrechnung { [DataContract] - public class GkvRequestDC : AppRequestDC + public class GkvRequestDC : AppRequestDC, IDataContract { public GkvRequestDC() : base(RequestType.Default) { } diff --git a/Shared/DataContracts/GkvAbrechnung/GkvResponseDC.cs b/Shared/DataContracts/GkvAbrechnung/GkvResponseDC.cs index 8e51ff31d..233880a43 100644 --- a/Shared/DataContracts/GkvAbrechnung/GkvResponseDC.cs +++ b/Shared/DataContracts/GkvAbrechnung/GkvResponseDC.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; namespace BS.Shared.DataContracts.GkvAbrechnung { [DataContract] - public class GkvResponseDC : AppResponseDC + public class GkvResponseDC : AppResponseDC, IDataContract { public GkvResponseDC() : base(false) { } public GkvResponseDC(bool success) : base(success) { } diff --git a/Shared/DataContracts/Invoicing/XRechnung/XRechnungRequest.cs b/Shared/DataContracts/Invoicing/XRechnung/XRechnungRequest.cs new file mode 100644 index 000000000..b5bdf1e94 --- /dev/null +++ b/Shared/DataContracts/Invoicing/XRechnung/XRechnungRequest.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BS.Shared.DataContracts.Invoicing.XRechnung +{ + public class XRechnungRequest : OwnSoftRequest + { + public string Data { get; set; } + } +} diff --git a/Shared/DataContracts/Invoicing/XRechnung/XRechnungResponse.cs b/Shared/DataContracts/Invoicing/XRechnung/XRechnungResponse.cs new file mode 100644 index 000000000..42569e864 --- /dev/null +++ b/Shared/DataContracts/Invoicing/XRechnung/XRechnungResponse.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BS.Shared.DataContracts.Invoicing.XRechnung +{ + public class XRechnungResponse : OwnSoftResponse + { + + } +} diff --git a/Shared/DataContracts/OwnSoftRequest.cs b/Shared/DataContracts/OwnSoftRequest.cs new file mode 100644 index 000000000..dd5b0dccf --- /dev/null +++ b/Shared/DataContracts/OwnSoftRequest.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BS.Shared.DataContracts +{ + public class OwnSoftRequest + { + } +} diff --git a/Shared/DataContracts/OwnSoftResponse.cs b/Shared/DataContracts/OwnSoftResponse.cs new file mode 100644 index 000000000..58720b6ab --- /dev/null +++ b/Shared/DataContracts/OwnSoftResponse.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BS.Shared.DataContracts +{ + public class OwnSoftResponse + { + } +} diff --git a/Shared/Shared.csproj b/Shared/Shared.csproj index 8285ee89e..2bc0ba8d8 100644 --- a/Shared/Shared.csproj +++ b/Shared/Shared.csproj @@ -133,6 +133,7 @@ + @@ -190,6 +191,10 @@ + + + + @@ -535,6 +540,7 @@ +