001/* 002 * Copyright 2011 The Kuali Foundation. 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.ole.select.document.web.struts; 017 018import org.kuali.ole.module.purap.PurapConstants; 019import org.kuali.ole.module.purap.businessobject.LineItemReceivingItem; 020import org.kuali.ole.module.purap.document.LineItemReceivingDocument; 021import org.kuali.ole.module.purap.document.web.struts.LineItemReceivingForm; 022import org.kuali.ole.select.businessobject.OleLineItemReceivingItem; 023import org.kuali.ole.select.businessobject.OleRequisitionCopies; 024 025/** 026 * This class is the KualiForm class for Ole Line Item Receiving 027 */ 028public class OleLineItemReceivingForm extends LineItemReceivingForm { 029 030 private OleRequisitionCopies newOleCopies = new OleRequisitionCopies(); 031 032 033 /** 034 * Gets the newOleCopies attribute. 035 * 036 * @return Returns the newOleCopies. 037 */ 038 public OleRequisitionCopies getNewOleCopies() { 039 return newOleCopies; 040 } 041 042 /** 043 * Sets the newOleCopies attribute value. 044 * 045 * @param newOleCopies The newOleCopies to set. 046 */ 047 public void setNewOleCopies(OleRequisitionCopies newOleCopies) { 048 this.newOleCopies = newOleCopies; 049 } 050 051 /** 052 * This method is overridden to return OleLineItemReceivingItem as the Receiving Line Item 053 * 054 * @return LineItemReceivingItem 055 * @see org.kuali.ole.module.purap.document.web.struts.LineItemReceivingForm#setupNewLineIemReceivingItemLine() 056 */ 057 @Override 058 public LineItemReceivingItem setupNewLineItemReceivingItemLine() { 059 return new OleLineItemReceivingItem(); 060 } 061 062 /** 063 * This method is used to set ItemTypeCode for the new receiving lineitem 064 * 065 * @return LineItemReceivingItem 066 * @see org.kuali.ole.module.purap.document.web.struts.LineItemReceivingForm#setupNewReceivingItemLine() 067 */ 068 @Override 069 public LineItemReceivingItem setupNewReceivingItemLine() { 070 OleLineItemReceivingItem lineItemReceivingItem = new OleLineItemReceivingItem((LineItemReceivingDocument) getDocument()); 071 newLineItemReceivingItemLine.setItemTypeCode(PurapConstants.ItemTypeCodes.ITEM_TYPE_UNORDERED_ITEM_CODE); 072 lineItemReceivingItem.setItemUnitOfMeasureCode(PurapConstants.LineItemReceivingDocumentStrings.CUSTOMER_INVOICE_DETAIL_UOM_DEFAULT); 073 return lineItemReceivingItem; 074 } 075}