use of org.kuali.kfs.module.purap.document.PurchasingDocument in project cu-kfs by CU-CommunityApps.
the class PurchasingActionBase method setupCAMSSystem.
public ActionForward setupCAMSSystem(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
PurchasingAccountsPayableFormBase purchasingForm = (PurchasingAccountsPayableFormBase) form;
PurchasingDocument document = (PurchasingDocument) purchasingForm.getDocument();
SpringContext.getBean(PurchasingService.class).setupCapitalAssetSystem(document);
return mapping.findForward(KFSConstants.MAPPING_BASIC);
}
use of org.kuali.kfs.module.purap.document.PurchasingDocument in project cu-kfs by CU-CommunityApps.
the class PurchasingActionBase method setManufacturerFromVendorByItem.
public ActionForward setManufacturerFromVendorByItem(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
PurchasingAccountsPayableFormBase purchasingForm = (PurchasingAccountsPayableFormBase) form;
PurchasingDocument document = (PurchasingDocument) purchasingForm.getDocument();
String vendorName = document.getVendorName();
if (StringUtils.isEmpty(vendorName)) {
GlobalVariables.getMessageMap().putError(PurapConstants.CAPITAL_ASSET_TAB_ERRORS, PurapKeyConstants.ERROR_CAPITAL_ASSET_NO_VENDOR, (String[]) null);
} else {
PurchasingCapitalAssetItem assetItem = document.getPurchasingCapitalAssetItems().get(getSelectedLine(request));
CapitalAssetSystem system = assetItem.getPurchasingCapitalAssetSystem();
if (system != null) {
system.setCapitalAssetManufacturerName(vendorName);
}
}
return mapping.findForward(KFSConstants.MAPPING_BASIC);
}
use of org.kuali.kfs.module.purap.document.PurchasingDocument in project cu-kfs by CU-CommunityApps.
the class PurchasingFormBase method getPurchasingCapitalAssetSystemAvailability.
public String getPurchasingCapitalAssetSystemAvailability() {
String availability = PurapConstants.CapitalAssetAvailability.NONE;
PurchasingDocument pd = (PurchasingDocument) this.getDocument();
if ((PurapConstants.CapitalAssetSystemTypes.ONE_SYSTEM.equals(pd.getCapitalAssetSystemTypeCode()) && PurapConstants.CapitalAssetSystemStates.NEW.equals(pd.getCapitalAssetSystemStateCode()))) {
availability = PurapConstants.CapitalAssetAvailability.ONCE;
} else if ((PurapConstants.CapitalAssetSystemTypes.INDIVIDUAL.equals(pd.getCapitalAssetSystemTypeCode()) && PurapConstants.CapitalAssetSystemStates.NEW.equals(pd.getCapitalAssetSystemStateCode()))) {
availability = PurapConstants.CapitalAssetAvailability.EACH;
}
return availability;
}
use of org.kuali.kfs.module.purap.document.PurchasingDocument in project cu-kfs by CU-CommunityApps.
the class PurchasingFormBase method getPurchasingCapitalAssetLocationAvailability.
public String getPurchasingCapitalAssetLocationAvailability() {
String availability = PurapConstants.CapitalAssetAvailability.NONE;
PurchasingDocument pd = (PurchasingDocument) this.getDocument();
if ((PurapConstants.CapitalAssetSystemTypes.ONE_SYSTEM.equals(pd.getCapitalAssetSystemTypeCode()) && PurapConstants.CapitalAssetSystemStates.NEW.equals(pd.getCapitalAssetSystemStateCode()))) {
availability = PurapConstants.CapitalAssetAvailability.ONCE;
} else if ((PurapConstants.CapitalAssetSystemTypes.INDIVIDUAL.equals(pd.getCapitalAssetSystemTypeCode()) && PurapConstants.CapitalAssetSystemStates.NEW.equals(pd.getCapitalAssetSystemStateCode()))) {
availability = PurapConstants.CapitalAssetAvailability.EACH;
}
return availability;
}
use of org.kuali.kfs.module.purap.document.PurchasingDocument in project cu-kfs by CU-CommunityApps.
the class PurchasingFormBase method getPurchasingItemCapitalAssetAvailability.
// Availability once
public String getPurchasingItemCapitalAssetAvailability() {
String availability = PurapConstants.CapitalAssetAvailability.NONE;
PurchasingDocument pd = (PurchasingDocument) this.getDocument();
if ((PurapConstants.CapitalAssetSystemTypes.ONE_SYSTEM.equals(pd.getCapitalAssetSystemTypeCode()) && PurapConstants.CapitalAssetSystemStates.MODIFY.equals(pd.getCapitalAssetSystemStateCode())) || (PurapConstants.CapitalAssetSystemTypes.MULTIPLE.equals(pd.getCapitalAssetSystemTypeCode()) && PurapConstants.CapitalAssetSystemStates.MODIFY.equals(pd.getCapitalAssetSystemStateCode()))) {
availability = PurapConstants.CapitalAssetAvailability.ONCE;
} else if ((PurapConstants.CapitalAssetSystemTypes.INDIVIDUAL.equals(pd.getCapitalAssetSystemTypeCode()) && PurapConstants.CapitalAssetSystemStates.MODIFY.equals(pd.getCapitalAssetSystemStateCode()))) {
availability = PurapConstants.CapitalAssetAvailability.EACH;
}
return availability;
}
Aggregations