question: protected void updateReceiptStatusWhenCancelled ( final String receiptNumber ) { final List < EgdmCollectedReceipt > egdmCollectedReceipts = demandGenericDAO . getAllEgdmCollectedReceipts ( receiptNumber ) ; if ( egdmCollectedReceipts != null && ! egdmCollectedReceipts . isEmpty ( ) ) for ( final EgdmCollectedReceipt egDmCollectedReceipt : egdmCollectedReceipts ) { egDmCollectedReceipt . setStatus ( DemandConstants . CANCELLED_RECEIPT ) ; egDmCollectedReceipt . setUpdatedTime ( new Date ( ) ) ; egdmCollectedReceiptDAO . update ( egDmCollectedReceipt ) ; } }
target:  When receipt is cancelled the status of the receipt in EgdmCollectedReceipts is updated as Cancelled.