~mikel-martin/+junk/g-yvy

« back to all changes in this revision

Viewing changes to admin/classes/eventtype.php

  • Committer: mikel
  • Date: 2011-10-21 08:46:57 UTC
  • Revision ID: mikel@pcl2-20111021084657-i3lkww203j11i7j8
*Solución problemas importación UTF-8, caracter de envoltura
*Borrado en cascada de insriptondatacarrera
*dorsal tipo int

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
                        }
105
105
                }
106
106
                //BEOF Commissión
107
 
                $model =& JModel::getInstance('Paymentmethod','YoVoyModel');
108
 
                $name = $model->getPaymentMethod($post['payment_method_id'])->payment_method_classname;
109
 
                require_once(JPATH_COMPONENT_ADMINISTRATOR.DS.'classes'.DS.'payment_methods'.DS.strtolower($name).'.php');
110
 
                $pmCls = new $name();
111
 
                $fee = 0.0;
112
 
                if($pmCls->_configuration['com_fix'] || $pmCls->_configuration['com_var'] || $pmCls->_configuration['com_min']){
113
 
                        $fee = ((float)$pmCls->_configuration['com_fix']+(float)$pmCls->_configuration['com_var']*$price/100)/(1-(float)$pmCls->_configuration['com_var']/100);
114
 
                        $fee = max(array($fee,(float)$pmCls->_configuration['com_min']));
 
107
                if($post['payment_method_id']>0){
 
108
                        $model =& JModel::getInstance('Paymentmethod','YoVoyModel');
 
109
                        $name = $model->getPaymentMethod($post['payment_method_id'])->payment_method_classname;
 
110
                        require_once(JPATH_COMPONENT_ADMINISTRATOR.DS.'classes'.DS.'payment_methods'.DS.strtolower($name).'.php');
 
111
                        $pmCls = new $name();
 
112
                        $fee = 0.0;
 
113
                        if($pmCls->_configuration['com_fix'] || $pmCls->_configuration['com_var'] || $pmCls->_configuration['com_min']){
 
114
                                $fee = ((float)$pmCls->_configuration['com_fix']+(float)$pmCls->_configuration['com_var']*$price/100)/(1-(float)$pmCls->_configuration['com_var']/100);
 
115
                                $fee = max(array($fee,(float)$pmCls->_configuration['com_min']));
 
116
                        }
115
117
                }
116
118
                //EOF Commission                
117
119
                return $fee+$price;