1 /*
2 * Copyright 2011 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 package org.kuali.ole.select.document.web.struts;
17
18 import org.kuali.ole.module.purap.PurapConstants;
19 import org.kuali.ole.module.purap.businessobject.LineItemReceivingItem;
20 import org.kuali.ole.module.purap.document.LineItemReceivingDocument;
21 import org.kuali.ole.module.purap.document.web.struts.LineItemReceivingForm;
22 import org.kuali.ole.select.businessobject.OleLineItemReceivingItem;
23 import org.kuali.ole.select.businessobject.OleRequisitionCopies;
24
25 /**
26 * This class is the KualiForm class for Ole Line Item Receiving
27 */
28 public class OleLineItemReceivingForm extends LineItemReceivingForm {
29
30 private OleRequisitionCopies newOleCopies = new OleRequisitionCopies();
31
32
33 /**
34 * Gets the newOleCopies attribute.
35 *
36 * @return Returns the newOleCopies.
37 */
38 public OleRequisitionCopies getNewOleCopies() {
39 return newOleCopies;
40 }
41
42 /**
43 * Sets the newOleCopies attribute value.
44 *
45 * @param newOleCopies The newOleCopies to set.
46 */
47 public void setNewOleCopies(OleRequisitionCopies newOleCopies) {
48 this.newOleCopies = newOleCopies;
49 }
50
51 /**
52 * This method is overridden to return OleLineItemReceivingItem as the Receiving Line Item
53 *
54 * @return LineItemReceivingItem
55 * @see org.kuali.ole.module.purap.document.web.struts.LineItemReceivingForm#setupNewLineIemReceivingItemLine()
56 */
57 @Override
58 public LineItemReceivingItem setupNewLineItemReceivingItemLine() {
59 return new OleLineItemReceivingItem();
60 }
61
62 /**
63 * This method is used to set ItemTypeCode for the new receiving lineitem
64 *
65 * @return LineItemReceivingItem
66 * @see org.kuali.ole.module.purap.document.web.struts.LineItemReceivingForm#setupNewReceivingItemLine()
67 */
68 @Override
69 public LineItemReceivingItem setupNewReceivingItemLine() {
70 OleLineItemReceivingItem lineItemReceivingItem = new OleLineItemReceivingItem((LineItemReceivingDocument) getDocument());
71 newLineItemReceivingItemLine.setItemTypeCode(PurapConstants.ItemTypeCodes.ITEM_TYPE_UNORDERED_ITEM_CODE);
72 lineItemReceivingItem.setItemUnitOfMeasureCode(PurapConstants.LineItemReceivingDocumentStrings.CUSTOMER_INVOICE_DETAIL_UOM_DEFAULT);
73 return lineItemReceivingItem;
74 }
75 }