use of org.kuali.kfs.module.purap.document.PurchasingDocument in project cu-kfs by CU-CommunityApps.
the class PurchasingActionBase method clearAllTaxes.
@Override
public ActionForward clearAllTaxes(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
PurchasingAccountsPayableFormBase purchasingForm = (PurchasingAccountsPayableFormBase) form;
PurchasingDocument purDoc = (PurchasingDocument) purchasingForm.getDocument();
SpringContext.getBean(PurapService.class).clearAllTaxes(purDoc);
return super.clearAllTaxes(mapping, form, request, response);
}
use of org.kuali.kfs.module.purap.document.PurchasingDocument in project cu-kfs by CU-CommunityApps.
the class PurchasingActionBase method clearNotCurrentYearByItem.
public ActionForward clearNotCurrentYearByItem(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
PurchasingAccountsPayableFormBase purchasingForm = (PurchasingAccountsPayableFormBase) form;
PurchasingDocument document = (PurchasingDocument) purchasingForm.getDocument();
PurchasingCapitalAssetItem assetItem = document.getPurchasingCapitalAssetItems().get(getSelectedLine(request));
CapitalAssetSystem system = assetItem.getPurchasingCapitalAssetSystem();
if (system != null) {
system.setCapitalAssetNotReceivedCurrentFiscalYearIndicator(false);
system.setCapitalAssetTypeCode("");
}
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 useOtherDeliveryBuilding.
/**
* Setup document to use "OTHER" building
*
* @param mapping An ActionMapping
* @param form An ActionForm
* @param request A HttpServletRequest
* @param response A HttpServletResponse
* @return An ActionForward
* @throws Exception
*/
public ActionForward useOtherDeliveryBuilding(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
PurchasingFormBase baseForm = (PurchasingFormBase) form;
PurchasingDocument document = (PurchasingDocument) baseForm.getDocument();
document.setDeliveryBuildingOtherIndicator(true);
clearDeliveryBuildingInfo(document, true);
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 useOffCampusAssetLocationBuildingByItem.
public ActionForward useOffCampusAssetLocationBuildingByItem(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
PurchasingFormBase baseForm = (PurchasingFormBase) form;
PurchasingDocument document = (PurchasingDocument) baseForm.getDocument();
String fullParameter = (String) request.getAttribute(KFSConstants.METHOD_TO_CALL_ATTRIBUTE);
String assetItemIndex = StringUtils.substringBetween(fullParameter, KFSConstants.METHOD_TO_CALL_PARM1_LEFT_DEL, KFSConstants.METHOD_TO_CALL_PARM1_RIGHT_DEL);
String assetLocationIndex = StringUtils.substringBetween(fullParameter, KFSConstants.METHOD_TO_CALL_PARM2_LEFT_DEL, KFSConstants.METHOD_TO_CALL_PARM2_RIGHT_DEL);
PurchasingCapitalAssetItem assetItem = document.getPurchasingCapitalAssetItems().get(Integer.parseInt(assetItemIndex));
CapitalAssetSystem system = assetItem.getPurchasingCapitalAssetSystem();
if ("new".equals(assetLocationIndex)) {
useOffCampusAssetLocationBuilding(system.getNewPurchasingCapitalAssetLocationLine());
} else {
useOffCampusAssetLocationBuilding(system.getCapitalAssetLocations().get(Integer.parseInt(assetLocationIndex)));
}
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 deleteCapitalAssetLocationByDocument.
public ActionForward deleteCapitalAssetLocationByDocument(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
PurchasingFormBase purchasingForm = (PurchasingFormBase) form;
PurchasingDocument purDocument = (PurchasingDocument) purchasingForm.getDocument();
String fullParameter = (String) request.getAttribute(KFSConstants.METHOD_TO_CALL_ATTRIBUTE);
String systemIndex = StringUtils.substringBetween(fullParameter, KFSConstants.METHOD_TO_CALL_PARM1_LEFT_DEL, KFSConstants.METHOD_TO_CALL_PARM1_RIGHT_DEL);
String locationIndex = StringUtils.substringBetween(fullParameter, KFSConstants.METHOD_TO_CALL_PARM2_LEFT_DEL, KFSConstants.METHOD_TO_CALL_PARM2_RIGHT_DEL);
// get specific asset item and grab system as well and attach asset number
CapitalAssetSystem system = purDocument.getPurchasingCapitalAssetSystems().get(Integer.parseInt(systemIndex));
system.getCapitalAssetLocations().remove(Integer.parseInt(locationIndex));
return mapping.findForward(KFSConstants.MAPPING_BASIC);
}
Aggregations