Ejemplo n.º 1
0
 function hasPaymentDue()
 {
     require_once DIR_FS_CLASSES . 'order_total.php';
     $otModules = new order_total();
     global $gCommerceSystem;
     $ret = TRUE;
     if (($ret = $this->getField('total') > 0) && $gCommerceSystem->getConfig('MODULE_ORDER_TOTAL_INSTALLED')) {
         $totalDeductions = 0;
         $totalDue = $this->getField('total');
         foreach ($otModules->modules as $modName) {
             $modClass = substr($modName, 0, strrpos($modName, '.'));
             $totalDue = $otModules->get_order_total_main($modClass, $totalDue);
             if (!empty($GLOBALS[$modClass]->credit_class)) {
                 $totalDeductions += $GLOBALS[$modClass]->pre_confirmation_check($totalDue);
                 $totalDue -= $GLOBALS[$modClass]->pre_confirmation_check($totalDue);
             }
         }
         if ($this->getField('total') - $totalDeductions <= 0.008999999999999999) {
             $ret = FALSE;
         }
     }
     return $ret;
 }