Deletes a price rule
486799
protected function deletePriceRule()
    {
        $this->controlAccess('price_rule_delete');

        if ($this->price_rule->delete($this->data_rule['price_rule_id'])) {
            $this->redirect('admin/sale/price', $this->text('Price rule has been deleted'), 'success');
        }

        $this->redirect('', $this->text('Price rule has not been deleted'), 'warning');
    }
1253464
def truncate_to(value: Decimal, currency: str) -> Decimal:
    """"""
    decimal_places = DECIMALS.get(currency.upper(), 2)
    return truncate(value, decimal_places)
782172
public function removeStale()
    {
        /** @var \Illuminate\Database\Eloquent\Builder $query */
        $query = $this->importer->getModelInstance()
            ->where('updated_at', '<', $this->now)
            ->orWhereNull('updated_at');

        $this->deleted = $query->count();

        $query->delete();
    }
835476
@Override
	public void removeByUuid(String uuid) {
		for (CommercePriceList commercePriceList : findByUuid(uuid,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commercePriceList);
		}
	}
159439
@Override
	public void removeByCommercePriceListId(long commercePriceListId) {
		for (CommercePriceListAccountRel commercePriceListAccountRel : findByCommercePriceListId(
				commercePriceListId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commercePriceListAccountRel);
		}
	}
200237
def clean(self, data):
        """"""
        cleaned_data = list()

        if not isinstance(data, list):
            data = [data]

        for item in data:
            date = datetime.datetime.strptime(item['Date'], '%Y-%m-%d').date()
            cleaned_data.append(dict(price=item['Adj_Close'], date=date))

        return cleaned_data
399060
def remove(self, key, value, element):
        """"""
        self.neoindex.delete(key, value, element.neoelement)
415301
@Override
	public void removeByUuid(String uuid) {
		for (CommercePriceListUserSegmentEntryRel commercePriceListUserSegmentEntryRel : findByUuid(
				uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commercePriceListUserSegmentEntryRel);
		}
	}
74546
def remove_rules(self, description):
        '''
        
        '''
        rm = []
        description = description.lower()

        for i in range(0, len(self.extract_rules)):
            if self.extract_rules[i]['regex'].search(description):
                rm.append(i)

        for i in rm:
            self.extract_rules.pop(i)

        return len(rm)
1011835
def delete_firewall_rule(self, firewall_rule):
        '''
        
        '''
        firewall_rule_id = self._find_firewall_rule_id(firewall_rule)
        ret = self.network_conn.delete_firewall_rule(firewall_rule_id)
        return ret if ret else True
835312
def ikey(self, value):
        
        if value == self._defaults['iKey'] and 'iKey' in self._values:
            del self._values['iKey']
        else:
            self._values['iKey'] = value
870966
function () {
      var sheet = Foundation.stylesheet;

      if (typeof this.rule_idx !== 'undefined') {
        sheet.deleteRule(this.rule_idx);
        sheet.deleteRule(this.rule_idx);
        delete this.rule_idx;
      }
    }
363397
@Override
	public void removeByG_S(long groupId, int status) {
		for (CommercePriceList commercePriceList : findByG_S(groupId, status,
				QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commercePriceList);
		}
	}
725631
@Override
	public void removeByCompanyId(long companyId) {
		for (CommercePriceEntry commercePriceEntry : findByCompanyId(
				companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
			remove(commercePriceEntry);
		}
	}
427963
function() {
        for (var i=0, len=this.rules.length; i<len; i++) {
            this.rules[i].destroy();
        }
        delete this.rules;
    }
262094
function removeThis()
    {
        $vatID = $this->ID;
        $db = eZDB::instance();
        $db->begin();

        // remove dependent VAT rules
        $dependentRules = eZVatRule::fetchByVatType( $vatID );
        foreach ( $dependentRules as $rule )
        {
            eZVatRule::removeVatRule( $rule->attribute( 'id' ) );
        }

        // replace VAT type in dependent products.
        eZVatType::resetToDefaultInProducts( $vatID );

        // Remove the VAT type itself.
        eZPersistentObject::removeObject( eZVatType::definition(),
                                          array( "id" => $vatID ) );

        $db->commit();
    }
1350457
def _RemoveForemanRule(self):
    """"""
    if data_store.RelationalDBEnabled():
      data_store.REL_DB.RemoveForemanRule(hunt_id=self.session_id.Basename())
      return

    with aff4.FACTORY.Open(
        "aff4:/foreman", mode="rw", token=self.token) as foreman:
      aff4_rules = foreman.Get(foreman.Schema.RULES)
      aff4_rules = foreman.Schema.RULES(
          # Remove those rules which fire off this hunt id.
          [r for r in aff4_rules if r.hunt_id != self.session_id])
      foreman.Set(aff4_rules)