Application->GetVar( 'currency_list' )) { $object =& $event->getObject( Array('skip_autoload' => true) ); $this->Application->setUnitOption('pt','AutoLoad',true); $payment_type_object =& $this->Application->recallObject('pt'); $parent_info = $object->getLinkedInfo(); $pt_id = $parent_info['ParentId']; if(!$pt_id) return; $sql = 'DELETE FROM '.$object->TableName.' WHERE PaymentTypeId = '.$pt_id; $this->Conn->Query($sql); if($currency_id_list) { foreach($currency_id_list as $id) { $object->SetDBField('CurrencyId', $id); $object->SetDBField('PaymentTypeId', $pt_id); $this->customProcessing($event,'before'); if( $object->Create() ) { if ( $object->IsTempTable() ) $object->setTempID(); $this->customProcessing($event,'after'); $event->status=erSUCCESS; } else { $event->status=erFAIL; $event->redirect=false; $this->Application->SetVar($event->Prefix_Special.'_SaveEvent','OnCreate'); $object->setID(0); } } } } } } ?>