In this article, we will show you how to create non-billable users for a customer. The idea to show non-billable users in Atria is to create billing rules in the service billing Configuration page, we will use a query to retrieve Test users from the database. This way the report will prioritize and run the created rule and will mark the Test Users as non-billable.
Database Configuration
Run SQL Server Management Studio on your Atria database server and connect to your database engine, then add the following table function to your OLM database:
- USE [OLM]
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- Create FUNCTION [dbo].[tf_ExcludeTestUsers]
- (
- @BillPeriodID int
- )
- RETURNS @Result TABLE
- (
- ObjectID INT,
- MaxAuditID INT
- )
- AS
- Begin
- INSERT INTO @Result (
- ObjectID
- ,MaxAuditID)
- SELECT ObjectID
- ,max(AuditID) AuditID
- FROM PropertyValues_AT
- WHERE PropertyID = (
- SELECT PropertyID
- FROM Properties p
- WHERE p.Name = 'employeetype')
- AND ActionDate <= (
- SELECT EndDate
- FROM BillPeriod
- WHERE BillPeriodID = @BillPeriodID)
- AND (PropertyValues_AT.Value = 'True')
- GROUP BY ObjectID
- RETURN
- End