Пример #1
0
 /**
  * Checks if totals from shopgate and magento differ by 1 cent
  *
  * @param ShopgateOrder             $shopgateOrder
  * @param Mage_Sales_Model_Order    $magentoOrder
  * @return bool
  */
 public function oneCentBugDetected($shopgateOrder, $magentoOrder)
 {
     $config = $this->getConfig();
     $bugDetected = round(abs($shopgateOrder->getAmountComplete() - $magentoOrder->getQuoteBaseGrandTotal()), 2) == 0.01;
     $shouldFixBug = $config->getFixOneCentBug();
     return $bugDetected && $shouldFixBug;
 }