/**
  * Update all webstore orders before a timestamp 
  * **DEPRECIATED - DO NOT USE, USED ONLY AS A WRAPPER FOR LIGHTSPEED DOWNLOAD REQUESTS, DO NOT DELETE**
  * We also piggyback on this statement for pseudo-cron jobs since we know it's triggered at least once an hour
  *
  * @param string $passkey
  * @param int $intDttSubmitted
  * @param int $intDownloaded
  * @return string
  */
 public function update_order_downloaded_status_by_ts($passkey, $intDttSubmitted, $intDownloaded)
 {
     //Make sure we have our Any/Any default tax set in Destinations
     TaxCode::VerifyAnyDestination();
     Yii::app()->cronJobs->run();
     return self::OK;
 }
Ejemplo n.º 2
0
 /**
  * Add a tax code into the WS
  *
  * @param string $passkey
  * @param int $intRowid
  * @param string $strCode
  * @param int $intListOrder
  * @param double $fltTax1Rate
  * @param double $fltTax2Rate
  * @param double $fltTax3Rate
  * @param double $fltTax4Rate
  * @param double $fltTax5Rate
  * @return string
  * @throws SoapFault
  * @soap
  */
 public function add_tax_code($passkey, $intRowid, $strCode, $intListOrder, $fltTax1Rate, $fltTax2Rate, $fltTax3Rate, $fltTax4Rate, $fltTax5Rate)
 {
     self::check_passkey($passkey);
     if ($strCode == "") {
         //ignore blank tax codes
         return self::OK;
     }
     // Loads tax
     $tax = TaxCode::LoadByLS($intRowid);
     if (!$tax) {
         $tax = new TaxCode();
     }
     $tax->lsid = $intRowid;
     $tax->code = $strCode;
     $tax->list_order = $intListOrder;
     $tax->tax1_rate = $fltTax1Rate;
     $tax->tax2_rate = $fltTax2Rate;
     $tax->tax3_rate = $fltTax3Rate;
     $tax->tax4_rate = $fltTax4Rate;
     $tax->tax5_rate = $fltTax5Rate;
     if (!$tax->save()) {
         $strMsg = "Error saving tax {$strCode}";
         Yii::log("SOAP ERROR : {$strMsg} " . print_r($tax->getErrors(), true), CLogger::LEVEL_ERROR, 'application.' . __CLASS__ . "." . __FUNCTION__);
         throw new SoapFault($strMsg, WsSoapException::ERROR_UNKNOWN);
     }
     TaxCode::VerifyAnyDestination();
     return self::OK;
 }