View Javadoc
1   /*
2    * Copyright 2005-2006 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.fp.document.web.struts;
17  
18  import java.io.ByteArrayOutputStream;
19  import java.util.Iterator;
20  import java.util.List;
21  
22  import javax.servlet.http.HttpServletRequest;
23  import javax.servlet.http.HttpServletResponse;
24  
25  import org.apache.struts.action.ActionForm;
26  import org.apache.struts.action.ActionForward;
27  import org.apache.struts.action.ActionMapping;
28  import org.kuali.ole.fp.businessobject.Check;
29  import org.kuali.ole.fp.businessobject.CoinDetail;
30  import org.kuali.ole.fp.businessobject.CurrencyDetail;
31  import org.kuali.ole.fp.document.CashReceiptDocument;
32  import org.kuali.ole.fp.document.service.CashReceiptCoverSheetService;
33  import org.kuali.ole.fp.document.service.CashReceiptService;
34  import org.kuali.ole.fp.document.validation.event.AddCheckEvent;
35  import org.kuali.ole.fp.document.validation.event.DeleteCheckEvent;
36  import org.kuali.ole.fp.document.validation.event.UpdateCheckEvent;
37  import org.kuali.ole.sys.OLEConstants;
38  import org.kuali.ole.sys.OLEKeyConstants;
39  import org.kuali.ole.sys.OLEPropertyConstants;
40  import org.kuali.ole.sys.context.SpringContext;
41  import org.kuali.rice.core.api.config.property.ConfigurationService;
42  import org.kuali.rice.kew.api.exception.WorkflowException;
43  import org.kuali.rice.kns.util.KNSGlobalVariables;
44  import org.kuali.rice.kns.util.WebUtils;
45  import org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase;
46  import org.kuali.rice.krad.service.DocumentService;
47  import org.kuali.rice.krad.service.KualiRuleService;
48  import org.kuali.rice.krad.util.GlobalVariables;
49  
50  /**
51   * 
52   */
53  public class CashReceiptAction extends CapitalAccountingLinesActionBase {
54      /**
55       * Adds handling for check updates
56       * 
57       * @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm,
58       *      javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
59       */
60      @Override
61      public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
62          CashReceiptForm cform = (CashReceiptForm) form;
63  
64          if (cform.hasDocumentId()) {
65              CashReceiptDocument cdoc = cform.getCashReceiptDocument();
66  
67              // handle change of checkEntryMode
68              processCheckEntryMode(cform, cdoc);
69  
70              // handle changes to checks (but only if current checkEntryMode is 'detail')
71              if (CashReceiptDocument.CHECK_ENTRY_DETAIL.equals(cdoc.getCheckEntryMode())) {
72                  cdoc.setTotalCheckAmount(cdoc.calculateCheckTotal()); // recalc b/c changes to the amounts could have happened
73                  cdoc.setTotalConfirmedCheckAmount(cdoc.calculateConfirmedCheckTotal());
74                  processChecks(cdoc, cform);
75              }
76  
77              // generate errors for negative cash totals (especially for the recalculate button)
78              SpringContext.getBean(CashReceiptService.class).areCashTotalsInvalid(cdoc);
79          }
80  
81          // proceed as usual
82          ActionForward result = super.execute(mapping, form, request, response);
83          return result;
84  
85      }
86  
87      /**
88       * Prepares and streams CR PDF Cover Sheet
89       * 
90       * @param mapping
91       * @param form
92       * @param request
93       * @param response
94       * @return ActionForward
95       * @throws Exception
96       */
97      public ActionForward printCoverSheet(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
98          CashReceiptForm crForm = (CashReceiptForm) form;
99          
100         // get directory of tempate
101         String directory = SpringContext.getBean(ConfigurationService.class).getPropertyValueAsString(OLEConstants.EXTERNALIZABLE_HELP_URL_KEY);
102 
103         // retrieve document
104         String documentNumber = request.getParameter(OLEPropertyConstants.DOCUMENT_NUMBER);
105 
106         CashReceiptDocument document = (CashReceiptDocument) SpringContext.getBean(DocumentService.class).getByDocumentHeaderId(documentNumber);
107 
108         // since this action isn't triggered by a post, we don't have the normal document data
109         // so we have to set the document into the form manually so that later authz processing
110         // has a document object instance to work with
111         crForm.setDocument(document);
112 
113         ByteArrayOutputStream baos = new ByteArrayOutputStream();
114         CashReceiptCoverSheetService coverSheetService = SpringContext.getBean(CashReceiptCoverSheetService.class);
115         coverSheetService.generateCoverSheet(document, directory, baos);
116         String fileName = documentNumber + "_cover_sheet.pdf";
117         WebUtils.saveMimeOutputStreamAsFile(response, "application/pdf", baos, fileName);
118 
119         return null;
120     }
121 
122     /**
123      * This method processes the check entry mode to determine if the user is entering checks or if they are just entering the
124      * total.
125      * 
126      * @param crForm
127      * @param crDoc
128      */
129     protected void processCheckEntryMode(CashReceiptForm crForm, CashReceiptDocument crDoc) {
130         String formMode = crForm.getCheckEntryMode();
131         String docMode = crDoc.getCheckEntryMode();
132 
133         if (CashReceiptDocument.CHECK_ENTRY_DETAIL.equals(formMode) || CashReceiptDocument.CHECK_ENTRY_TOTAL.equals(formMode)) {
134             if (!formMode.equals(docMode)) {
135                 if (formMode.equals(CashReceiptDocument.CHECK_ENTRY_DETAIL)) {
136                     // save current checkTotal, for future restoration
137                     crForm.setCheckTotal(crDoc.getTotalCheckAmount());
138 
139                     // change mode
140                     crDoc.setCheckEntryMode(formMode);
141                     crDoc.setTotalCheckAmount(crDoc.calculateCheckTotal());
142 
143                     // notify user
144                     KNSGlobalVariables.getMessageList().add(OLEKeyConstants.CashReceipt.MSG_CHECK_ENTRY_INDIVIDUAL);
145                 }
146                 else {
147                     // restore saved checkTotal
148                     crDoc.setTotalCheckAmount(crForm.getCheckTotal());
149 
150                     // change mode
151                     crDoc.setCheckEntryMode(formMode);
152 
153                     // notify user
154                     KNSGlobalVariables.getMessageList().add(OLEKeyConstants.CashReceipt.MSG_CHECK_ENTRY_TOTAL);
155                 }
156             }
157         }
158     }
159 
160     /**
161      * This method handles iterating over the check list and generating check events to apply rules to.
162      * 
163      * @param cdoc
164      * @param cform
165      */
166     protected void processChecks(CashReceiptDocument cdoc, CashReceiptForm cform) {
167         List formChecks = cdoc.getChecks();
168 
169         int index = 0;
170         Iterator i = formChecks.iterator();
171         while (i.hasNext()) {
172             Check formCheck = (Check) i.next();
173 
174             // only generate update events for specific action methods
175             String methodToCall = cform.getMethodToCall();
176             if (UPDATE_EVENT_ACTIONS.contains(methodToCall)) {
177                 SpringContext.getBean(KualiRuleService.class).applyRules(new UpdateCheckEvent(OLEPropertyConstants.DOCUMENT + "." + OLEPropertyConstants.CHECK + "[" + index + "]", cdoc, formCheck));
178             }
179             index++;
180         }
181     }
182 
183     /**
184      * Adds Check instance created from the current "new check" line to the document
185      * 
186      * @param mapping
187      * @param form
188      * @param request
189      * @param response
190      * @return ActionForward
191      * @throws Exception
192      */
193     public ActionForward addCheck(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
194         CashReceiptForm crForm = (CashReceiptForm) form;
195         CashReceiptDocument crDoc = crForm.getCashReceiptDocument();
196 
197         Check newCheck = crForm.getNewCheck();
198         newCheck.setDocumentNumber(crDoc.getDocumentNumber());
199 
200         // check business rules
201         boolean rulePassed = SpringContext.getBean(KualiRuleService.class).applyRules(new AddCheckEvent(OLEConstants.NEW_CHECK_PROPERTY_NAME, crDoc, newCheck));
202         if (rulePassed) {
203             // add check
204             crDoc.addCheck(newCheck);
205 
206             // clear the used newCheck
207             crForm.setNewCheck(crDoc.createNewCheck());
208         }
209 
210         return mapping.findForward(OLEConstants.MAPPING_BASIC);
211     }
212     
213     /**
214      * Adds confirmed Check instance created from the current "new check" line to the document
215      * 
216      * @param mapping
217      * @param form
218      * @param request
219      * @param response
220      * @return ActionForward
221      * @throws Exception
222      */
223     public ActionForward addConfirmedCheck(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
224         CashReceiptForm crForm = (CashReceiptForm) form;
225         CashReceiptDocument crDoc = crForm.getCashReceiptDocument();
226 
227         Check newCheck = crForm.getNewConfirmedCheck();
228         newCheck.setDocumentNumber(crDoc.getDocumentNumber());
229 
230         // check business rules
231         boolean rulePassed = SpringContext.getBean(KualiRuleService.class).applyRules(new AddCheckEvent(OLEConstants.NEW_CHECK_PROPERTY_NAME, crDoc, newCheck));
232         if (rulePassed) {
233             // add check
234             crDoc.addConfirmedCheck(newCheck);
235 
236             // clear the used newCheck
237             crForm.setNewConfirmedCheck(crDoc.createNewConfirmedCheck());
238         }
239 
240         return mapping.findForward(OLEConstants.MAPPING_BASIC);
241     }
242 
243     /**
244      * Deletes the selected check (line) from the document
245      * 
246      * @param mapping
247      * @param form
248      * @param request
249      * @param response
250      * @return ActionForward
251      * @throws Exception
252      */
253     public ActionForward deleteCheck(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
254         CashReceiptForm crForm = (CashReceiptForm) form;
255         CashReceiptDocument crDoc = crForm.getCashReceiptDocument();
256 
257         int deleteIndex = getLineToDelete(request);
258         Check oldCheck = crDoc.getCheck(deleteIndex);
259 
260 
261         boolean rulePassed = SpringContext.getBean(KualiRuleService.class).applyRules(new DeleteCheckEvent(OLEConstants.EXISTING_CHECK_PROPERTY_NAME, crDoc, oldCheck));
262 
263         if (rulePassed) {
264             // delete check
265             crDoc.removeCheck(deleteIndex);
266 
267             // delete baseline check, if any
268             if (crForm.hasBaselineCheck(deleteIndex)) {
269                 crForm.getBaselineChecks().remove(deleteIndex);
270             }
271         }
272         else {
273             GlobalVariables.getMessageMap().putError("document.check[" + deleteIndex + "]", OLEKeyConstants.Check.ERROR_CHECK_DELETERULE, Integer.toString(deleteIndex));
274         }
275 
276         return mapping.findForward(OLEConstants.MAPPING_BASIC);
277     }
278     
279     /**
280      * Deletes the selected check (line) from the document
281      * 
282      * @param mapping
283      * @param form
284      * @param request
285      * @param response
286      * @return ActionForward
287      * @throws Exception
288      */
289     public ActionForward deleteConfirmedCheck(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
290         CashReceiptForm crForm = (CashReceiptForm) form;
291         CashReceiptDocument crDoc = crForm.getCashReceiptDocument();
292 
293         int deleteIndex = getLineToDelete(request);
294         Check oldCheck = crDoc.getConfirmedCheck(deleteIndex);
295 
296 
297         boolean rulePassed = SpringContext.getBean(KualiRuleService.class).applyRules(new DeleteCheckEvent(OLEConstants.EXISTING_CHECK_PROPERTY_NAME, crDoc, oldCheck));
298 
299         if (rulePassed) {
300             // delete check
301             crDoc.removeConfirmedCheck(deleteIndex);
302 
303             // delete baseline check, if any
304             if (crForm.hasBaselineCheck(deleteIndex)) {
305                 crForm.getBaselineChecks().remove(deleteIndex);
306             }
307         }
308         else {
309             GlobalVariables.getMessageMap().putError("document.confirmedCheck[" + deleteIndex + "]", OLEKeyConstants.Check.ERROR_CHECK_DELETERULE, Integer.toString(deleteIndex));
310         }
311 
312         return mapping.findForward(OLEConstants.MAPPING_BASIC);
313     }
314 
315 
316     /**
317      * Changes the current check-entry mode, if necessary
318      * 
319      * @param mapping
320      * @param form
321      * @param request
322      * @param response
323      * @return ActionForward
324      * @throws Exception
325      */
326     public ActionForward changeCheckEntryMode(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
327 
328         CashReceiptForm crForm = (CashReceiptForm) form;
329         CashReceiptDocument crDoc = crForm.getCashReceiptDocument();
330 
331         String formMode = crForm.getCheckEntryMode();
332         String docMode = crDoc.getCheckEntryMode();
333 
334         if (CashReceiptDocument.CHECK_ENTRY_DETAIL.equals(formMode) || CashReceiptDocument.CHECK_ENTRY_TOTAL.equals(formMode)) {
335             if (!formMode.equals(docMode)) {
336 
337                 if (formMode.equals(CashReceiptDocument.CHECK_ENTRY_DETAIL)) {
338                     // save current checkTotal, for future restoration
339                     crForm.setCheckTotal(crDoc.getTotalCheckAmount());
340 
341                     // change mode
342                     crDoc.setCheckEntryMode(formMode);
343                     crDoc.setTotalCheckAmount(crDoc.calculateCheckTotal());
344 
345                     // notify user
346                     KNSGlobalVariables.getMessageList().add(OLEKeyConstants.CashReceipt.MSG_CHECK_ENTRY_INDIVIDUAL);
347                 }
348                 else {
349                     // restore saved checkTotal
350                     crDoc.setTotalCheckAmount(crForm.getCheckTotal());
351 
352                     // change mode
353                     crDoc.setCheckEntryMode(formMode);
354 
355                     // notify user
356                     KNSGlobalVariables.getMessageList().add(OLEKeyConstants.CashReceipt.MSG_CHECK_ENTRY_TOTAL);
357                 }
358             }
359         }
360 
361         return mapping.findForward(OLEConstants.MAPPING_BASIC);
362     }
363 
364 
365     /**
366      * @see org.kuali.ole.sys.web.struts.KualiAccountingDocumentActionBase#createDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase)
367      */
368     @Override
369     protected void createDocument(KualiDocumentFormBase kualiDocumentFormBase) throws WorkflowException {
370         super.createDocument(kualiDocumentFormBase);
371 
372         CashReceiptForm crForm = (CashReceiptForm) kualiDocumentFormBase;
373         CashReceiptDocument crDoc = crForm.getCashReceiptDocument();
374 
375         CashReceiptService crs = SpringContext.getBean(CashReceiptService.class);         
376         crDoc.initializeCampusLocationCode();
377 
378         /* initialize currency and coin detail */
379         CurrencyDetail currencyDetail = new CurrencyDetail();
380         currencyDetail.setCashieringStatus(OLEConstants.CurrencyCoinSources.CASH_RECEIPTS); 
381         currencyDetail.setFinancialDocumentTypeCode(CashReceiptDocument.DOCUMENT_TYPE);
382         currencyDetail.setDocumentNumber(crDoc.getDocumentNumber());
383         crDoc.setCurrencyDetail(currencyDetail);
384 
385         CoinDetail coinDetail = new CoinDetail();
386         coinDetail.setCashieringStatus(OLEConstants.CurrencyCoinSources.CASH_RECEIPTS);
387         coinDetail.setFinancialDocumentTypeCode(CashReceiptDocument.DOCUMENT_TYPE);
388         coinDetail.setDocumentNumber(crDoc.getDocumentNumber());
389         crDoc.setCoinDetail(coinDetail);
390         
391         CurrencyDetail confirmedCurrencyDetail = new CurrencyDetail();
392         confirmedCurrencyDetail.setCashieringStatus(OLEConstants.CurrencyCoinSources.CASH_MANAGEMENT_IN); 
393         confirmedCurrencyDetail.setFinancialDocumentTypeCode(CashReceiptDocument.DOCUMENT_TYPE);
394         confirmedCurrencyDetail.setDocumentNumber(crDoc.getDocumentNumber());
395         crDoc.setConfirmedCurrencyDetail(confirmedCurrencyDetail);
396         
397         CoinDetail confirmedCoinDetail = new CoinDetail();
398         confirmedCoinDetail.setCashieringStatus(OLEConstants.CurrencyCoinSources.CASH_MANAGEMENT_IN);
399         confirmedCoinDetail.setFinancialDocumentTypeCode(CashReceiptDocument.DOCUMENT_TYPE);
400         confirmedCoinDetail.setDocumentNumber(crDoc.getDocumentNumber());
401         crDoc.setConfirmedCoinDetail(confirmedCoinDetail);
402 
403         initDerivedCheckValues(crForm);
404     }
405 
406     /**
407      * @see org.kuali.ole.sys.web.struts.KualiAccountingDocumentActionBase#loadDocument(org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase)
408      */
409     @Override
410     protected void loadDocument(KualiDocumentFormBase kualiDocumentFormBase) throws WorkflowException {
411         super.loadDocument(kualiDocumentFormBase);
412 
413         initDerivedCheckValues((CashReceiptForm) kualiDocumentFormBase);
414     }
415 
416     /**
417      * Copy all original checks to cash manager confirmed checks
418      * 
419      * @param mapping
420      * @param form
421      * @param request
422      * @param response
423      * @return ActionForward
424      * @throws Exception
425      */
426     public ActionForward copyAllChecks(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
427         CashReceiptForm crForm = (CashReceiptForm) form;
428         CashReceiptDocument crDoc = crForm.getCashReceiptDocument();
429         
430         Check c, confirmedCheck;
431         for (Iterator<Check> i = crDoc.getChecks().iterator(); i.hasNext();) {
432             c = i.next();
433             confirmedCheck = crForm.getNewConfirmedCheck();
434             confirmedCheck.setDocumentNumber(c.getDocumentNumber());
435             confirmedCheck.setCheckDate(c.getCheckDate());
436             confirmedCheck.setCheckNumber(c.getCheckNumber());
437             confirmedCheck.setAmount(c.getAmount());
438             confirmedCheck.setDescription(c.getDescription());
439             
440             crDoc.addConfirmedCheck(confirmedCheck);
441             // clear the used newCheck
442             crForm.setNewConfirmedCheck(crDoc.createNewConfirmedCheck());
443         }
444 
445         return mapping.findForward(OLEConstants.MAPPING_BASIC);
446     }
447     
448     /**
449      * Copy all original currency and coin to cash manager confirmed currency and coin
450      * 
451      * @param mapping
452      * @param form
453      * @param request
454      * @param response
455      * @return ActionForward
456      * @throws Exception
457      */
458     public ActionForward copyAllCurrencyAndCoin(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
459         CashReceiptForm crForm = (CashReceiptForm) form;
460         CashReceiptDocument crDoc = crForm.getCashReceiptDocument();
461         CurrencyDetail currencyDetail = crDoc.getCurrencyDetail();
462         CoinDetail coinDetail = crDoc.getCoinDetail();
463         
464         //populate new confirmedCurrencyDetail object
465         CurrencyDetail confCurrencyDetail = new CurrencyDetail();
466         confCurrencyDetail.setDocumentNumber(crDoc.getDocumentNumber());
467         confCurrencyDetail.setFinancialDocumentTypeCode(CashReceiptDocument.DOCUMENT_TYPE);
468         confCurrencyDetail.setCashieringStatus(OLEConstants.CurrencyCoinSources.CASH_MANAGEMENT_IN);
469         confCurrencyDetail.setFinancialDocumentHundredDollarAmount(currencyDetail.getFinancialDocumentHundredDollarAmount());
470         confCurrencyDetail.setFinancialDocumentFiftyDollarAmount(currencyDetail.getFinancialDocumentFiftyDollarAmount());
471         confCurrencyDetail.setFinancialDocumentTwentyDollarAmount(currencyDetail.getFinancialDocumentTwentyDollarAmount());
472         confCurrencyDetail.setFinancialDocumentTenDollarAmount(currencyDetail.getFinancialDocumentTenDollarAmount());
473         confCurrencyDetail.setFinancialDocumentFiveDollarAmount(currencyDetail.getFinancialDocumentFiveDollarAmount());
474         confCurrencyDetail.setFinancialDocumentTwoDollarAmount(currencyDetail.getFinancialDocumentTwoDollarAmount());
475         confCurrencyDetail.setFinancialDocumentOneDollarAmount(currencyDetail.getFinancialDocumentOneDollarAmount());
476         confCurrencyDetail.setFinancialDocumentOtherDollarAmount(currencyDetail.getFinancialDocumentOtherDollarAmount());
477         
478         //populate new confirmedCoinDetail object
479         CoinDetail confCoinDetail = new CoinDetail();
480         confCoinDetail.setDocumentNumber(crDoc.getDocumentNumber());
481         confCoinDetail.setFinancialDocumentTypeCode(CashReceiptDocument.DOCUMENT_TYPE);
482         confCoinDetail.setCashieringStatus(OLEConstants.CurrencyCoinSources.CASH_MANAGEMENT_IN);
483         confCoinDetail.setFinancialDocumentHundredCentAmount(coinDetail.getFinancialDocumentHundredCentAmount());
484         confCoinDetail.setFinancialDocumentFiftyCentAmount(coinDetail.getFinancialDocumentFiftyCentAmount());
485         confCoinDetail.setFinancialDocumentTwentyFiveCentAmount(coinDetail.getFinancialDocumentTwentyFiveCentAmount());
486         confCoinDetail.setFinancialDocumentTenCentAmount(coinDetail.getFinancialDocumentTenCentAmount());
487         confCoinDetail.setFinancialDocumentFiveCentAmount(coinDetail.getFinancialDocumentFiveCentAmount());
488         confCoinDetail.setFinancialDocumentOneCentAmount(coinDetail.getFinancialDocumentOneCentAmount());
489         confCoinDetail.setFinancialDocumentOtherCentAmount(coinDetail.getFinancialDocumentOtherCentAmount());
490         
491         crDoc.setConfirmedCurrencyDetail(confCurrencyDetail);
492         crDoc.setConfirmedCoinDetail(confCoinDetail);
493 
494         return mapping.findForward(OLEConstants.MAPPING_BASIC);
495     }
496     
497 
498     /**
499      * Initializes form values which must be derived form document contents (i.e. those which aren't directly available from the
500      * document)
501      *
502      * @param cform
503      */
504     protected void initDerivedCheckValues(CashReceiptForm cform) {
505         CashReceiptDocument cdoc = cform.getCashReceiptDocument();
506 
507         cform.setCheckEntryMode(cdoc.getCheckEntryMode());
508         cform.setCheckTotal(cdoc.getTotalCheckAmount());
509 
510         cform.getBaselineChecks().clear();
511         cform.getBaselineChecks().addAll(cform.getCashReceiptDocument().getChecks());
512     }
513 
514     /**
515      * Overridden to guarantee that form of copied document is set to whatever the entry mode of the document is
516      * @see org.kuali.rice.kns.web.struts.action.KualiTransactionalDocumentActionBase#copy(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
517      */
518     @Override
519     public ActionForward copy(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
520         ActionForward forward = super.copy(mapping, form, request, response);
521         initDerivedCheckValues((CashReceiptForm)form);
522         return forward;
523     }
524 
525 }
526