01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.module.purap.fixtures;
17:
18: import java.sql.Date;
19:
20: import org.kuali.core.util.KualiDecimal;
21: import org.kuali.module.purap.document.PaymentRequestDocument;
22: import org.kuali.module.purap.fixtures.PurapTestConstants.PREQInvoice;
23:
24: public enum PaymentRequestInvoiceTabFixture {
25:
26: WITH_POID_WITH_DATE_WITH_NUMBER_WITH_AMOUNT(PREQInvoice.PO_ID,
27: PREQInvoice.INVOICE_DATE, PREQInvoice.INVOICE_NUMBER,
28: PREQInvoice.AMOUNT), NO_POID_WITH_DATE_WITH_NUMBER_WITH_AMOUNT(
29: null, PREQInvoice.INVOICE_DATE, PREQInvoice.INVOICE_NUMBER,
30: PREQInvoice.AMOUNT), WITH_POID_NO_DATE_WITH_NUMBER_WITH_AMOUNT(
31: PREQInvoice.PO_ID, null, PREQInvoice.INVOICE_NUMBER,
32: PREQInvoice.AMOUNT), WITH_POID_WITH_DATE_NO_NUMBER_WITH_AMOUNT(
33: PREQInvoice.PO_ID, PREQInvoice.INVOICE_DATE, null,
34: PREQInvoice.AMOUNT), WITH_POID_WITH_DATE_WITH_NUMBER_NO_AMOUNT(
35: PREQInvoice.PO_ID, PREQInvoice.INVOICE_DATE,
36: PREQInvoice.INVOICE_NUMBER, null)
37:
38: ;
39:
40: private Integer po_id;
41: private Date invoice_date;
42: private String invoice_num;
43: private KualiDecimal amount;
44:
45: private PaymentRequestInvoiceTabFixture(Integer po_id,
46: Date invoice_date, String invoice_num, KualiDecimal amount) {
47: this .po_id = po_id;
48: this .invoice_date = invoice_date;
49: this .invoice_num = invoice_num;
50: this .amount = amount;
51: }
52:
53: public PaymentRequestDocument populate(
54: PaymentRequestDocument preqDocument) {
55: preqDocument.setPurchaseOrderIdentifier(po_id);
56: preqDocument.setInvoiceDate(invoice_date);
57: preqDocument.setInvoiceNumber(invoice_num);
58: preqDocument.setVendorInvoiceAmount(amount);
59: return preqDocument;
60: }
61: }
|