public function increase( $code, $amount )
	{
		$context = $this->_getContext();

		$search = $this->createSearch();
		$search->setConditions( $search->compare( '==', 'coupon.code.siteid', $context->getLocale()->getSitePath() ) );

		$types = array(	'coupon.code.siteid' => $this->_searchConfig['coupon.code.siteid']['internaltype'] );
		$translations = array( 'coupon.code.siteid' => 'siteid' );
		$conditions = $search->getConditionString( $types, $translations );

		$dbm = $context->getDatabaseManager();
		$dbname = $this->_getResourceName();
		$conn = $dbm->acquire( $dbname );

		try
		{
			/** mshop/coupon/manager/code/default/item/counter
			 * Increases or decreases the counter of the coupon code record matched by the given code
			 *
			 * A counter is associated to each coupon code and it's decreased
			 * each time by one if a code used in an paid order was redeemed
			 * successfully. Shop owners can also use the coupon code counter to
			 * use the same code more often by setting it to an arbitrary value.
			 * In this case, the code can be redeemed until the counter reaches
			 * zero.
			 *
			 * The coupon codes must be from one of the sites that are configured
			 * via the context item. If the current site is part of a tree of
			 * sites, the statement can increase or decrease codes from the
			 * current site and all parent sites if the code is inherited by one
			 * of the parent sites.
			 *
			 * Each time the code is updated, the modification time is set to
			 * the current timestamp and the editor field is updated.
			 *
			 * @param string SQL statement for increasing/decreasing the coupon code count
			 * @since 2014.03
			 * @category Developer
			 * @see mshop/coupon/manager/code/default/item/insert
			 * @see mshop/coupon/manager/code/default/item/update
			 * @see mshop/coupon/manager/code/default/item/newid
			 * @see mshop/coupon/manager/code/default/item/delete
			 * @see mshop/coupon/manager/code/default/item/search
			 * @see mshop/coupon/manager/code/default/item/count
			 */
			$path = 'mshop/coupon/manager/code/default/item/counter';
			$stmt = $conn->create( str_replace( ':cond', $conditions, $context->getConfig()->get( $path, $path ) ) );

			$stmt->bind( 1, $amount, MW_DB_Statement_Abstract::PARAM_INT );
			$stmt->bind( 2, date( 'Y-m-d H:i:s' ) ); // mtime
			$stmt->bind( 3, $context->getEditor() );
			$stmt->bind( 4, $code );

			$stmt->execute()->finish();
		}
		catch( Exception $e )
		{
			$dbm->release( $conn, $dbname );
			throw $e;
		}

		$dbm->release( $conn, $dbname );
	}