Esempio n. 1
0
 function initQuery($params)
 {
     $tables = TaxExempts::getTables();
     $columns = $tables['order_full_tax_exempts']['columns'];
     $this->addSelectField($columns['order_id'], 'order_id');
     $this->addSelectField($columns['exempt_status'], 'exempt_status');
     $this->addSelectField($columns['exempt_reason_customer_input'], 'exempt_reason_customer_input');
     $this->WhereValue('', '', '1');
     if ($params['order_id'] !== NULL) {
         $this->WhereAnd();
         $this->WhereValue($columns["order_id"], DB_EQ, $params['order_id']);
     }
     if ($params['b_exempted_only'] === true) {
         $this->WhereAnd();
         $this->WhereValue($columns["exempt_status"], DB_EQ, DB_TRUE);
     }
 }
 /**
  * Uninstall the module.
  *                           .
  *
  *       uninstall()                      .
  *
  *                                          ,         ,
  * TaxExempts::getTables()        $this->getTables()
  */
 function uninstall()
 {
     $query = new DB_Table_Delete(TaxExempts::getTables());
     global $application;
     $application->db->getDB_Result($query);
 }