/*
- * Copyright (C) 2017 Roland Häder
+ * Copyright (C) 2017 - 2024 Free Software Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
import java.io.Serializable;
import java.util.List;
import javax.ejb.Remote;
-import org.mxchange.jfinancials.exceptions.ReceiptAlreadyAddedException;
+import org.mxchange.jfinancials.exceptions.receipt.ReceiptAlreadyAddedException;
import org.mxchange.jusercore.model.user.User;
/**
- * A remote interface for financial receipt stuff
+ * A remote interface for financial receipts
* <p>
* @author Roland Häder<roland@mxchange.org>
*/
/**
* Returns a list of all receipts
* <p>
- * @return A list of all user's receipts
+ * @return A list of all receipts
*/
- List<BillableReceipt> allReceipts ();
+ List<BillableReceipt> fetchAllReceipts ();
/**
* Returns a list of all user's receipts
* <p>
* @return A list of all user's receipts
*/
- List<BillableReceipt> allUsersReceipts (final User user);
+ List<BillableReceipt> fetchAllUsersReceipts (final User user);
/**
* Adds given receipt and returns the updated version. If the receipt has
*/
BillableReceipt addReceipt (final BillableReceipt receipt) throws ReceiptAlreadyAddedException;
+ /**
+ * Checks if given receipt is already persisted by checking receipt number
+ * and branch office combination.
+ * <p>
+ * @param receipt Receipt instance
+ * <p>
+ * @return Whether the receipt has already been registered
+ */
+ boolean isReceiptRegistered (final BillableReceipt receipt);
+
}