*/
void setReceiptBranchOffice (final BranchOffice receiptBranch);
+ /**
+ * Getter for receipt resumption (which other receipt this one is based on).
+ * <p>
+ * @return Receipt this one is based on
+ */
+ BillableReceipt getReceiptResumptionOf ();
+
+ /**
+ * Setter for receipt resumption (which other receipt this one is based on).
+ * <p>
+ * @param receiptResumptionOf Receipt this one is based on
+ */
+ void setReceiptResumptionOf (final BillableReceipt receiptResumptionOf);
+
/**
* Getter for payment type
* <p>
@Column (name = "receipt_register_number")
private Long receiptRegisterNumber;
+ /**
+ * Receipt resumes an other existing receipt
+ */
+ @JoinColumn (name = "receipt_resumption_id", referencedColumnName = "receipt_id")
+ @OneToOne (targetEntity = FinancialReceipt.class, cascade = CascadeType.REFRESH)
+ private BillableReceipt receiptResumptionOf;
+
/**
* Selling employee instance
*/
this.receiptRegisterNumber = receiptRegisterNumber;
}
+ @Override
+ public BillableReceipt getReceiptResumptionOf () {
+ return this.receiptResumptionOf;
+ }
+
+ @Override
+ public void setReceiptResumptionOf (final BillableReceipt receiptResumptionOf) {
+ this.receiptResumptionOf = receiptResumptionOf;
+ }
+
@Override
public Employable getReceiptSellerEmployee () {
return this.receiptSellerEmployee;