invoice: Add missing file from
@@ -225,6 +225,11 @@ public class DefaultInvoiceUserApi implements InvoiceUserApi {
return new DefaultInvoice(invoice, getCatalogSafelyForPrettyNames(internalTenantContext));
}
+ @Override
+ public Invoice getInvoiceByInvoiceItem(final UUID uuid, final TenantContext tenantContext) throws InvoiceApiException {
+ return null;
+ }
+
@Override
public List<Invoice> getUnpaidInvoicesByAccountId(final UUID accountId, final LocalDate upToDate, final TenantContext context) {
final InternalTenantContext internalTenantContext = internalCallContextFactory.createInternalTenantContext(accountId, context);
@@ -232,9 +237,9 @@ public class DefaultInvoiceUserApi implements InvoiceUserApi {
return fromInvoiceModelDao(unpaidInvoicesByAccountId, getCatalogSafelyForPrettyNames(internalTenantContext));
}
+
@Override
- public Invoice triggerInvoiceGeneration(final UUID accountId, @Nullable final LocalDate targetDate, final DryRunArguments dryRunArguments,
- final CallContext context) throws InvoiceApiException {
+ public Invoice triggerDryRunInvoiceGeneration(final UUID accountId, final LocalDate targetDate, final DryRunArguments dryRunArguments, final CallContext context) throws InvoiceApiException {
final InternalCallContext internalContext = internalCallContextFactory.createInternalCallContext(accountId, context);
final Invoice result = dispatcher.processAccount(true, accountId, targetDate, dryRunArguments, false, internalContext);
@@ -245,6 +250,18 @@ public class DefaultInvoiceUserApi implements InvoiceUserApi {
}
}
+ @Override
+ public Invoice triggerInvoiceGeneration(final UUID accountId, @Nullable final LocalDate targetDate, final CallContext context) throws InvoiceApiException {
+ final InternalCallContext internalContext = internalCallContextFactory.createInternalCallContext(accountId, context);
+
+ final Invoice result = dispatcher.processAccount(true, accountId, targetDate, null, false, internalContext);
+ if (result == null) {
+ throw new InvoiceApiException(ErrorCode.INVOICE_NOTHING_TO_DO, accountId, targetDate != null ? targetDate : "null");
+ } else {
+ return result;
+ }
+ }
+
@Override
public void tagInvoiceAsWrittenOff(final UUID invoiceId, final CallContext context) throws TagApiException, InvoiceApiException {
// Note: the tagApi is audited
@@ -412,7 +429,7 @@ public class DefaultInvoiceUserApi implements InvoiceUserApi {
}
@Override
- public void consumeExstingCBAOnAccountWithUnpaidInvoices(final UUID accountId, final CallContext context) {
+ public void consumeExistingCBAOnAccountWithUnpaidInvoices(final UUID accountId, final CallContext context) {
dao.consumeExstingCBAOnAccountWithUnpaidInvoices(accountId, internalCallContextFactory.createInternalCallContext(accountId, context));
}
