PCR-360 Wiki

Calling saveGla using GLA API Parameters

For full details of this API Endpoint, see GLA API.

type

  • Data Type: String

  • Required Field: No*

Notes:

*This is Required to be set to “CHARGES” when interacting with GLA Charges.

recid

  • Data Type: Integer

  • Required Field: No*

Notes:

*Required if attempting UPDATE on GLA

ledger

  • Data Type: Integer

  • Required Field: No

  • Default Value: 0

Notes:

Denotes if the GLA is a Ledger. “1” for Yes, “0” for No.

status

  • Data Type: Integer

  • Required Field: No

  • Default Value: 1

Notes:

The status of the GLA, “1” for Active and “0” for Inactive.

speed_code

  • Data Type: String

  • Required Field: No

Notes:

Speed Code for the GLA

description

  • Data Type: String

  • Required Field: No

Notes:

Description of the GLA

format

  • Data Type: String

  • Required Field: Yes

Notes:

Name of the GLA Format

revenue

  • Data Type: Integer

  • Required Field: Yes*

  • Default Value: 0

Notes:

Is the GLA an Revenue type? “1” for Yes, “0” for No.

*Either 'revenue', 'expense', or 'both' need to be set to '1'.

expense

  • Data Type: Integer

  • Required Field: Yes*

  • Default Value: 0

Notes:

Is the GLA an Expense type? “1” for Yes, “0” for No.

*Either 'revenue', 'expense', or 'both' need to be set to '1'.

taxable

  • Data Type: Integer

  • Required Field: No

  • Default Value: 0

Notes:

Is the GLA Taxable? “1” for Yes, “0” for No.

gla_item_1

  • Data Type: String

  • Required Field: Yes

Notes:

The first component of the GLA

gla_item_n

  • Data Type: String

  • Required Field: System Specific

Notes:

The value ‘gla_item_n’ represents any additional GLA Components a specific installation may have, where 'n' is a sequential number starting at 2 and incrementing by 1 for each additional GLA Component. The necessity to provide each additional Component also depends on your installation of PCR-360. If Users have any questions about how many GLA Components their system has and if the Components are Required, please get in touch with your System Administrator.

gla

  • Data Type: Integer

  • Required Field: Yes

  • Required Type: “CHARGES”

Notes:

The recid for the GLA to add the Charge to.

charge_catalog_recid

  • Data Type: Integer

  • Required Field: Yes

  • Required Type: “CHARGES”

Notes:

The Charge Catalog recid for the new Charge.

prorate

  • Data Type: Integer

  • Required Field: No

  • Required Type: “CHARGES”

  • Default Value: 0

Notes:

1 = Prorate, 0 = Do not Prorate. Only allowed if BILL_MRC_CHANGE_FORCE_PRORATE config option is false.

description

  • Data Type: String

  • Required Field: No

  • Required Type: “CHARGES”

Notes:

Description of the Charge.

amount

  • Data Type: Decimal

  • Required Field: No

  • Required Type: “CHARGES”

Notes:

Will be used if Charge Catalog does not have a Default Amount set.

quantity

  • Data Type: Integer

  • Required Field: No

  • Required Type: “CHARGES”

Notes:

The quantity of Charge to be applied. Only allowed if Charge Catalog allows it.

start_date

  • Data Type: String

  • Required Field: No

  • Required Type: “CHARGES”

Notes:

The Start Date of a Charge. YYYY-MM-DD format. Other formats may give unexpected results.

Used for Monthly Recurring Charges and Alternate Recurring Charges.

stop_date

  • Data Type: String

  • Required Field: No

  • Required Type: “CHARGES”

Notes:

YYYY-MM-DD format. Other formats may give unexpected results.

Used for Monthly Recurring Charges and Alternate Recurring Charges.

recurring_date

  • Data Type: String

  • Required Field: No

  • Required Type: “CHARGES”

Notes:

YYYY-MM-DD format. Other formats may give unexpected results.

Used for Alternate Recurring Charges.

transaction_date

  • Data Type: String

  • Required Field: No

  • Required Type: “CHARGES”

Notes:

YYYY-MM-DD format. Other formats may give unexpected results.

Used for Non-Recurring Charges.

billing_group

  • Data Type: String

  • Required Field: No

  • Required Type: “CHARGES”

Notes:

The recid of the Billing Group, if applicable.

owner_type

  • Data Type: String

  • Required Field: Yes

  • Required Type: “CHARGES”

Notes:

Type of Owner of the Charge. “Contact” or “Department”.

owner

  • Data Type: Integer

  • Required Field: Yes

  • Required Type: “CHARGES”

Notes:

The recid of the Owner

override_amount

  • Data Type: Decimal

  • Required Field: No

  • Required Type: “CHARGES”

Notes:

Amount to override the default amount with, if applicable.

effective

  • Data Type: String

  • Required Field: No

  • Required Type: “CHARGES”

  • Default Value: “today”

Notes:

Effective flag for the charge being added/stopped. “today” or “backdate”.

Alternate Recurring Charges (Quarterly, Semi-Annual, and Annual), when updated will always use backdate as the Effective Date.

Add a New Revenue GLA

PHP
$params = [
    "description" => "New Revenue GLA example",
    "format" => "ADMIN",
    "revenue" => 1,
    "gla_item_1" => "Component 1",
    "gla_item_2" => "Component 2",
    "gla_item_3" => "Component 3",
    "gla_item_4" => "Component 4"
];

$api_call = $this->call('saveGla', $params, true)

Add a Charge to a GLA Example

PHP
$params = [
    "type" => "CHARGES",
    "gla" => 1,
    "charge_catalog_recid" => 1,
    "prorate" => 0,
    "description" => "Sample Adding a Charge to a GLA",
    "amount" => "10.00",
    "start_date" => "2024/08/19",
    "billing_group" => 1,
    "owner_type" => "Department",
    "owner" => "1",
    "effective" => "backdate"
];

$api_call = $this->call('saveGla', $params, true)