$cobmiscs = $co->cobmiscs();
foreach ($cobmiscs as $cobmisc){
+ $invchead = $cobmisc->invchead();
+ $aropen = $invchead->aropen();
+
+ if(!empty($aropen->pid())){
+ $cashrcptitem = DB_DataObject::factory('cashrcptitem');
+ $cashrcptitem->cashrcptitem_aropen_id = $aropen->pid();
+
+ if($cashrcptitem->count()){
+ $cashrcpt = DB_DataObject::factory('cashrcpt');
+ $cashrcpt->whereAddIn('cashrcpt_id', $cashrcptitem->fetchAll('cashrcptitem_cashrcpt_id'), 'int');
+ $cashrcpt->cashrcpt_posted = TRUE;
+ $cashrcpt->cashrcpt_void = FALSE;
+ foreach($cashrcpt->fetchAll() as $cashr){
+ $cashr->void($this);
+ $this->addEvent("VOIDED", $cashr);
+ }
+ }
+ }
+
+
}