Skip to main content
Version: 3.1

Billing settings

Definition​

The billing settings of a facility are the values that Care uses to work out discounts on charge items and to number invoices. They are the facility's discount codes, discount components and discount configuration, and its invoice number expression. The same area also shows the tax codes, tax components and informational codes that the deployment sets for every facility.

The billing settings are in the facility settings, under Billing.

Each facility keeps its own discount codes, discount components, discount configuration and invoice number expression.

Key Attributes​

ComponentsWhat it captures
Discount CodesCodes, each with a name, that group discount components. The deployment provides some codes, and the facility can add its own.
Discount ComponentsThe named discounts. Each one is a percentage or a fixed amount, with an optional discount code and optional conditions. Charge item definitions and invoices can use the discount components that have a discount code.
Discount ConfigurationThe limit on how many discounts apply to one charge item, and the order in which Care picks them.
Tax CodesThe names and codes of the taxes that the deployment sets. You can only read them.
Tax ComponentsThe tax rates that the deployment sets. Charge item definitions offer them as taxes. You can only read them.
Informational CodesCodes for amounts that never change a price, for example MRP. You can only read them.
Invoice Number ExpressionThe pattern that Care uses to give each new invoice of the facility its number. The sidebar names this page Settings.

Deployment and facility values​

The discount lists hold two kinds of rows. Rows with the Instance badge come from the deployment, and every facility of the deployment sees the same rows. Rows with the Facility badge belong to this facility only.

Rows with the Instance badge are read only: they have no edit or delete buttons. Only rows with the Facility badge have these buttons.

A facility cannot add a discount code that repeats a code of the deployment. Care refuses it with a message that contains "Redefining system codes are not allowed."

The deployment sets its values in its server configuration, so they can differ from one deployment to another. For example, the default values give the discount components Old Age Discount and Child Discount, each 10%. Your deployment can replace these values.

Discount codes and components​

A discount code is a name and a code. It groups discount components: each discount component can carry one discount code. When you add discounts to a charge item definition or to an invoice line, Care finds the discount components by their discount code.

Each discount code must be unique in the facility. If two discount codes of the facility have the same Code, Care refuses the save with a message that contains "Duplicate codes are not allowed."

A discount component is a named discount. Its value is either a percentage (Factor, from 0 to 100) or a fixed amount (Amount, 0 or more), never both. The sidebar entry Discount Components opens a page titled Discount Monetary Components.

Care works out each discount on the price of the charge item, which is the base price times the quantity, plus any surcharges. A percentage is that share of the price. A fixed amount is multiplied by the quantity.

A discount component can also have conditions, which decide when the discount applies. When Care makes a charge item from a charge item definition, it leaves out each discount component whose conditions are not met.

The discount code of a discount component is optional on the form. But a charge item definition and an invoice line offer only discount components that have a discount code. Give a discount component a discount code if you want to use it there.

A charge item definition offers the facility's discount components and the deployment's discount components under Discounts. Discount components that share a discount code show as one group, and you choose one value from the group.

You cannot delete a discount code, or change its Code, while a discount component uses it. Care refuses the save with a message that contains "All monetary components code must be defined." Change or delete those discount components first.

A facility can have at most 99 discount codes and 99 discount components. Care refuses the 100th.

Note: Set the discount configuration first. A facility that has never saved a discount configuration cannot save discount codes or discount components.

Use facility global value​

A discount that you pick in a charge item definition is set to Use facility global value by default. Each time Care makes a charge item from the definition, it looks for the facility's own discount component with the same discount code. It uses the current value of that discount component. If the facility has no such discount component, Care uses the copy saved in the charge item definition.

When you edit a facility discount component, the new value reaches the charge items that Care makes after the edit. This applies when their charge item definition uses Use facility global value for the discount code of that discount component. Charge items that already exist keep the discounts they were made with.

Deleting a facility discount component does not remove it from charge item definitions. Care does not check whether a charge item definition uses it. If the facility has no other discount component with the same discount code, a definition that used it with Use facility global value uses the copy saved in the definition.

Discount configuration​

The discount configuration sets two values for the facility: Maximum Applicable Discounts, a whole number of 0 or more, and Applicability Order, which is Highest value first or Lowest value first.

When Care makes a charge item from a charge item definition, it saves the facility's discount configuration on that charge item. Care then works out every discount that applies and sorts the discounts by their amount on that charge item, in the chosen order. It keeps only as many discounts as Maximum Applicable Discounts allows.

Care subtracts the discounts that it keeps from the price, and then works out the taxes on the price after discounts.

The limit counts the discounts on each charge item, not on the whole invoice. A value of 0 removes every discount. If the facility has never saved a discount configuration, there is no limit, and Care keeps every discount that applies.

Note: The form starts Maximum Applicable Discounts at 0 when the facility has no saved discount configuration. With 0, new charge items from charge item definitions get no discounts. Enter the number of discounts that you allow on one charge item.

A change to the discount configuration reaches only the charge items that Care makes after the change. A charge item that already exists keeps the discount configuration that Care saved on it, also when someone edits the charge item later.

Charge items that someone adds directly, not from a charge item definition, have no saved discount configuration, so no limit applies to their discounts.

Invoice numbers​

Care gives an invoice its number when the invoice is created, as a draft. Invoices that you create in Care always take their number from the invoice number expression of the facility. Refund invoices for returned items take their number from the same expression.

The expression starts with the letter f, followed by the invoice number text in quotes. Care fills in three variables in that text: {invoice_count}, {current_year_yy} and {current_year_yyyy}. If the f is missing, Care saves the expression but fills in nothing. The years come from the date on which Care creates the invoice.

{invoice_count} is the number of invoices that the facility already has, of every status and including refund invoices. It is 0 for the first invoice of the facility, so you add a start value to it. For example, f'INV-{invoice_count + 1}' numbers the first invoice INV-1 and the next invoice INV-2.

Numbering is separate for each facility. Two facilities can each have an invoice numbered INV-1.

If the facility has no invoice number expression, Care gives new invoices no number.

When you save an expression, Care tests it with sample values. If the test fails, Care refuses the expression with a message that contains "Invalid Expression". Care does not show a preview of the number.

Care numbers one invoice at a time in a facility. If two invoices are created in the same facility at the same moment, Care refuses the second one. The message is "The resource you are trying to access is locked".

Taxes and informational codes​

Tax Codes, Tax Components and Informational Codes show lists that the deployment sets for every facility. You can search these lists, but you cannot add, change or delete their entries.

Tax codes are the names and codes of the taxes, for example IGST, CGST, SGST, UTGST and GST in the default values. Tax components are the tax rates, for example "CGST @ 9" down to "GST @ 0" in the default values.

A charge item definition offers the tax components under Taxes.

Informational codes name amounts that never change a price, for example MRP in the default values. The charge item definition form takes its MRP code from this list, and each informational code adds a column to the supply delivery tables.

Permissions​

Care checks one permission when you save a billing setting. A second permission matters only when you add a condition on a tag to a discount component.

PermissionWhat it allowsRoles
Can Update on FacilitySave the discount codes, the discount components, the discount configuration and the invoice number expression of the facility.Facility Admin, Administrator, Staff
Can Read Tag ConfigList the tags in the tag picker when you add a condition on a tag to a discount component. Held in any organization of the facility.Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer, Pharmacist

You hold Can Update on Facility through a role in the facility's root organization, which Care names Administration. A role in the facility's geographic organization, or in an organization above it, also gives it. A role in a department or team of the facility does not give it.

Facility Admin is a facility role only. In a geographic organization, the Administrator and Staff roles give this permission.

Every member of the facility can open all the billing settings pages and see their buttons. Without Can Update on Facility, Care refuses the save with a message that contains "You do not have permission to create Facilities".

These are the default roles. Your deployment can change which roles hold each permission.