示例#1
0
文件: Data.php 项目: buttasg/cowgirlk
 /**
  * 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;
 }