1 /*
2 * Copyright 2006-2009 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
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 /*
17 * Created on Mar 7, 2006
18 *
19 */
20 package org.kuali.ole.module.purap.service;
21
22 import org.kuali.ole.module.purap.businessobject.ElectronicInvoice;
23 import org.kuali.ole.module.purap.businessobject.ElectronicInvoiceItem;
24 import org.kuali.ole.module.purap.businessobject.ElectronicInvoiceOrder;
25
26 import java.util.Map;
27
28 public interface ElectronicInvoiceMappingService {
29
30 // default values
31 public static String DEFAULT_BELOW_LINE_ITEM_DESCRIPTION = "Electronically entered amount";
32 // ELECTRONIC INVOICE SHIPPING DESCRIPTION
33 public static String E_INVOICE_SHIPPING_DESCRIPTION = "Shipping";
34
35
36 // role id of the address we use as the Ship To address
37 public static String CXML_ADDRESS_SHIP_TO_ROLE_ID = "shipTo";
38 public static String CXML_ADDRESS_BILL_TO_ROLE_ID = "billTo";
39 public static String CXML_ADDRESS_REMIT_TO_ROLE_ID = "remitTo";
40
41 // name of our default address name we use (null for first available)
42 public static String CXML_ADDRESS_SHIP_TO_NAME = null;
43 public static String CXML_ADDRESS_BILL_TO_NAME = null;
44 public static String CXML_ADDRESS_REMIT_TO_NAME = null;
45
46 /*
47 * These mappings link E-Invoice CXML item types to PREQ Item Types
48 *
49 * If the PREQ ITEM TYPE is null then we do not accept or care
50 * about these items
51 */
52 public static String ITEM_TYPE_RETURN_VALUE_UNACCEPTED = "";
53
54 // ELECTRONIC INVOICE CXML US DOLLAR CODE
55 public static String[] CXML_VALID_CURRENCY_CODES = {"USD"};
56
57 // ELECTRONIC INVOICE CXML OPERATION CODE
58 public static String[] CXML_VALID_OPERATION_CODES = {"new"};
59
60 // ELECTRONIC INVOICE CXML PURPOSE CODE
61 public static String[] CXML_VALID_PURPOSE_CODES = {"standard"};
62
63 public Map getDefaultItemMappingMap();
64
65 public Map getItemMappingMap(Integer vendorHeaderId, Integer vendorDetailId);
66
67 public boolean acceptAmountType(String cxmlAmountType);
68
69 /**
70 * This method defines which field out of the ElectronicInvoiceOrder that the
71 * purchase order number is coming in as
72 *
73 * @param invoiceOrder ElectronicInvoiceOrder we need to get the PO ID from
74 * @return the String value of the purchase order id
75 */
76 public String getInvoicePurchaseOrderID(ElectronicInvoiceOrder invoiceOrder);
77
78 /**
79 * This method defines which field out of the ElectronicInvoiceItem that the
80 * catalog number is coming in as
81 *
82 * @param eii ElectronicInvoiceItem we need to get the catalog number from
83 * @return catalog number value
84 */
85 public String getCatalogNumber(ElectronicInvoiceItem item);
86
87 /**
88 * This method defines which field out of the ElectronicInvoice that the
89 * customer number field is coming in as
90 *
91 * @param ei ElectronicInvoice we need to get the customer number from
92 * @return customer number value
93 */
94 public String getInvoiceCustomerNumber(ElectronicInvoice ei);
95
96 /**
97 * This method contains the mapping check for valid Currency Code(s)
98 */
99 public String checkCodeForValidCurrency(String code);
100
101 /**
102 * This method contains the mapping check for valid Currency Code(s)
103 */
104 public boolean isCodeValidCurrency(String code);
105 }