AddAccountMoney
exports['kartik-banking']:AddAccountMoney(account, amount, reason)🔹 Description
Adds money to a non-personal, non-shared bank account (e.g., business, government).
The function uses the account's linked debit card and processes the deposit using addMoney.
🔧 Parameters
| Name | Type | Required | Description |
|---|---|---|---|
account | string | ✅ | usually company or society account ( e.g police, bcso, banker ) |
amount | number | ✅ | The amount of money to deposit into the account. |
reason | string | ❌ | Reason |
📤 Returns
| Type | Description |
|---|---|
true | If the deposit was successful. |
false | If the deposit failed or the account is invalid. |
🧠 Example Usage
local success = exports['kartik-banking']:AddAccountMoney("gang_xyz", 10000)
if success then
print("Deposit successful.")
else
print("Deposit failed.")
end❌ Will Return false If:
- The account is not found.
- The account type is
"personal"or"shared". - The account does not have a linked debit card.
- The internal deposit (
addMoney) fails.