-
- $curr = DB_DataObject::factory('core_curr_rate');
-
- $curr->curr = $c;
-
- $o = false;
-
- if($curr->find(true)){
- $o = clone($curr);
- }
-
- $curr->setFrom(array(
- 'rate' => $rate,
- 'from_dt' => date('Y-m-d H:i:s', strtotime($fromDate)),
- 'to_dt' => date('Y-m-d H:i:s', strtotime($toDate))
- ));
-
- (empty($o)) ? $curr->insert() : $curr->update($o);
+ $this->processCurrRate($this->mapping[$c], $rate, $fromDate, $toDate);