Service/Plugins/AccountingService - Funktionen auf public und SetzeRechnungspositionenServiceInvoice auf virtual gesetzt

This commit is contained in:
2025-10-21 16:25:51 +02:00
parent 55170c7121
commit 30c78c700c

View File

@@ -127,7 +127,7 @@ namespace BeWo.Service.Plugins
SetzeStornoInfos(counterInvoice);
SetzeRechnungspositionenServiceInvoice(diffRechnung, counterInvoice, item);
diffRechnung.InvoiceBase.NeuErstellen = true;
diffRechnung.InvoiceBase.NeuErstellen = true;
diffRechnung.InvoiceBase.Hinweise = String.Format("Rechnungsdifferenz zu Rechnung {0} in Höhe von {1:c}", letzteRg.InvoiceBase.InvoiceNumber, letzteRg.InvoiceBase.TotalAmount.Value);
}
}
@@ -361,7 +361,7 @@ namespace BeWo.Service.Plugins
}
}
private void CopyServiceInvoice(ServiceInvoice existingInvoice, ServiceInvoice copyInvoice)
public void CopyServiceInvoice(ServiceInvoice existingInvoice, ServiceInvoice copyInvoice)
{
copyInvoice.AmountAdvancePayments = existingInvoice.AmountAdvancePayments;
copyInvoice.AmountEquityContribution = existingInvoice.AmountEquityContribution;
@@ -386,7 +386,7 @@ namespace BeWo.Service.Plugins
// }
private void CopyInvoiceBase(InvoiceBase existing, InvoiceBase copy)
public void CopyInvoiceBase(InvoiceBase existing, InvoiceBase copy)
{
copy.AccountingPeriodEnd = existing.AccountingPeriodEnd;
copy.AccountingPeriodStart = existing.AccountingPeriodStart;
@@ -504,7 +504,7 @@ namespace BeWo.Service.Plugins
diffRechnung.InvoiceBase.Type = orgRechnung.Type;
}
private Contact CreateCopyContact(Contact existingContact)
public Contact CreateCopyContact(Contact existingContact)
{
Contact newContact = new Contact();
newContact.Value = existingContact.Value;
@@ -513,7 +513,7 @@ namespace BeWo.Service.Plugins
return newContact;
}
private Address CreateCopyAddress(Address address)
public Address CreateCopyAddress(Address address)
{
Address newAddress = new Address();
newAddress.AddressLine1 = address.AddressLine1;
@@ -527,7 +527,7 @@ namespace BeWo.Service.Plugins
return newAddress;
}
private void CopyServiceInvoicePeriod(ServiceInvoicePeriod existingSip, ServiceInvoicePeriod copySip)
public void CopyServiceInvoicePeriod(ServiceInvoicePeriod existingSip, ServiceInvoicePeriod copySip)
{
copySip.AccountingInterval = existingSip.AccountingInterval;
copySip.ApprovedAmountDefaultHourlyRate = existingSip.ApprovedAmountDefaultHourlyRate;
@@ -554,7 +554,7 @@ namespace BeWo.Service.Plugins
}
private void CopyInvoiceItem(InvoiceItem existingItem, InvoiceItem copyItem)
public void CopyInvoiceItem(InvoiceItem existingItem, InvoiceItem copyItem)
{
copyItem.AccountingInterval = existingItem.AccountingInterval;
copyItem.AmountPerUnit = existingItem.AmountPerUnit;
@@ -576,7 +576,7 @@ namespace BeWo.Service.Plugins
copyItem.ServiceRecord = existingItem.ServiceRecord;
}
private void SetzeRechnungspositionenServiceInvoice(ServiceInvoiceDC diffRechnung, ServiceInvoice counterInvoice, DifferenzRechnungCheck item)
public virtual void SetzeRechnungspositionenServiceInvoice(ServiceInvoiceDC diffRechnung, ServiceInvoice counterInvoice, DifferenzRechnungCheck item)
{
var siDCAlt = MapperFactory.ServiceInvoiceDC_ServiceInvoice.MapToNewDC(counterInvoice);
if (siDCAlt.ServiceInvoicePeriods != null && siDCAlt.ServiceInvoicePeriods.Count > 0)