# Server-Side

{% tabs %}
{% tab title="vms\_bossmenu" %}
{% code expandable="true" %}

```lua
if Config.Banking ~= 'vms_bossmenu' then
    return
end

function GetSocietyMoney(societyName)
    local money = exports['vms_bossmenu']:getMoney(societyName)
    return money
end

---@class AddSocietyMoney
---@param reason string
---| 'salesContract'
function AddSocietyMoney(societyName, amount, reason)
    exports['vms_bossmenu']:addMoney(societyName, amount)
end

---@class RemoveSocietyMoney
---@param reason string
---| 'purchaseProperty'
function RemoveSocietyMoney(societyName, amount, reason)
    exports['vms_bossmenu']:removeMoney(societyName, amount)
end


---@class RegisterSocietyTransaction

---@class data
---@ propertyName
---@ propertyAddress
---@ propertyRegion
---@ agentName
---@ agentIdentifier
---@ buyerName
---@ buyerIdentifier
---@ sellerName
---@ sellerIdentifier
function RegisterSocietyTransaction(src, societyName, type, data)
    if type == 'propertyPurchase' then
        local title = ('Purchased Property %s %s'):format(data.propertyAddress, data.propertyRegion)
        exports['vms_bossmenu']:addTransaction(src, societyName, nil, 'transfer_outgoing', data.amount, title)
        
    elseif type == 'propertySale' then
        local title = ('Sold %s %s for %s'):format(data.propertyAddress, data.propertyRegion, data.buyerName)
        exports['vms_bossmenu']:addTransaction(src, societyName, nil, 'transfer_incoming', data.amount, title)

    end
end
```

{% endcode %}
{% endtab %}

{% tab title="okokBanking" %}
{% code expandable="true" %}

```lua
if Config.Banking ~= 'okokBanking' then
    return
end

function GetSocietyMoney(societyName)
    local money = exports['okokBanking']:GetAccount(societyName)
    return money
end

---@class AddSocietyMoney
---@param reason string
---| 'salesContract'
function AddSocietyMoney(societyName, amount, reason)
    exports['okokBanking']:AddMoney(societyName, amount)
end

---@class RemoveSocietyMoney
---@param reason string
---| 'purchaseProperty'
function RemoveSocietyMoney(societyName, amount, reason)
    exports['okokBanking']:RemoveMoney(societyName, amount)
end


---@class RegisterSocietyTransaction

---@class data
---@ propertyName
---@ propertyAddress
---@ propertyRegion
---@ agentName
---@ agentIdentifier
---@ buyerName
---@ buyerIdentifier
---@ sellerName
---@ sellerIdentifier
function RegisterSocietyTransaction(src, societyName, type, data)

end
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vames-store.com/assets/vms_housing/configuration-files/integration-files/banking/server-side.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
