andrewdwallo / erpsaas Goto Github PK
View Code? Open in Web Editor NEWA Laravel and Filament-powered accounting platform, crafting a modern and automated solution for financial management.
License: MIT License
A Laravel and Filament-powered accounting platform, crafting a modern and automated solution for financial management.
License: MIT License
Steps to reproduce :
Command : php artisan db:seed
TypeError
App\Observers\TransactionObserver::convertToDefaultCurrency(): Argument #2 ($fromCurrency) must be of type string, null given, called in C:\Users\prati\OneDrive\Desktop\erpsaas\app\Observers\TransactionObserver.php on line 114
at app\Observers\TransactionObserver.php:122
118▕
119▕ return $transaction->amount;
120▕ }
121▕
➜ 122▕ private function convertToDefaultCurrency(string $amount, string $fromCurrency, string $toCurrency): string 123▕ {
124▕ $amountInCents = CurrencyConverter::prepareForAccessor($amount, $fromCurrency);
125▕
126▕ $convertedAmountInCents = CurrencyConverter::convertBalance($amountInCents, $fromCurrency, $toCurrency);
1 app\Observers\TransactionObserver.php:114
App\Observers\TransactionObserver::convertToDefaultCurrency("2,638.00", "USD")
2 app\Observers\TransactionObserver.php:88
App\Observers\TransactionObserver::getConvertedTransactionAmount(Object(App\Models\Accounting\Transaction))
Hello, did you maybe try to generate an invoice design to PDF?
I may be wrong, but when I tried it couldnt get any of tailwind css, so I added all into inline styles, where I needed to change a lot structure to tables with inline styles. Also, could not remove margins/padding fully..
Looks a bit different from tailwind ones, but if you tried maybe you can share what you used?
I used barryvdh/laravel-dompdf... It is quite slow when generating PDF with images..
Thanks
Invoice logo throws a 404 because the logos are inside storage folder so this would fix it:
Storage::url($logo)
Also when trying to add account type credit card I get error undefined key enabled
in $data array. Not sure why that happens.
Remove both bank_account_id
and account_id
. For the Transaction action forms, we would need to find a way to create 2 journal entries even though there would be no attributes on the Transaction model that could signify which one would be for a Bank Account vs Chart Account (nominal account). Repeaters wouldn't work well for the Transaction form either way, and their is no native Filament feature for this. We would possibly need to have 2 placeholder attributes in the Transaction action forms - 1 for bank account, 1 for nominal account, and then possibly in handleRecordCreation()
, create 2 journal entries based on those placeholder attribute values.
Potentially remove the polymorphic relationship with the Bank Account. It may not be needed and is unnecessary. Alternatively, consider using just a bool flag such as is_bank_account
and transfer all current BankAccount model attributes to the Account model and make them nullable. This would make querying much easier and it could lower processing time.
This may require much refactoring. I probably may release the current release-candidate
branch considering users have been waiting a while for a new release, and then for the next release start working on this.
I’m trying to install the new version of erpsaas and I get an error on
public const DEFAULT = self::Indigo->value;
I’m using php 8.1: can this be the problem?
The error is: constant expression contains invalid operations
All other commands runs good but command yarn run dev returns error like :
`
yarn run v1.22.19
$ vite
file:///media/asus/DiskD/OpenServer/domains/erpsaas/node_modules/vite/bin/vite.js:7
await import('source-map-support').then((r) => r.default.install())
^^^^^
SyntaxError: Unexpected reserved word
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
at async link (internal/modules/esm/module_job.js:42:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
`
And of course http://127.0.0.1:8000/admin/login shows error like:
Vite manifest not found at: /media/asus/DiskD/OpenServer/domains/erpsaas/public/build/manifest.json
What to do? Please help to fix it
Where can I find the file or codes for adding default categories when creating new company?
private function createCategories(Company $company, User $user): array
{
$incomeCategories = ['Other Charges', 'Sales', 'General Income', 'Interest Income', 'Late Fee Income', 'Discount', 'Shipping Charge'];
$expenseCategories = ['Lodging', 'Purchase Discount', 'Office Supplies', 'Advertising and Marketing', 'Bank Fees and Charges', 'Credit Card Charges', 'Travel Expense', 'Telephone Expense', 'Automobile Expense', 'IT and Internet Expenses', 'Rent Expense', 'Janitorial Expense', 'Postage', 'Bad Debt', 'Printing and Stationery', 'Uncategorized', 'Salaries and Employee Wages', 'Meals and Entertainment', 'Depreciation Expense', 'Consultant Expense', 'Repair and Maintenance', 'Other Expenses', 'Cost of Goods Sold', 'Exchange Gain or Loss'];
$assetsCategories = ['Prepaid Expenses', 'Advance Tax', 'Employee Advance', 'Undeposited Funds', 'Petty Cash', 'Accounts Receivable', 'Furniture and Equipment', 'Inventory Asset'];
$liabilityCategories = ['Tax Payable', 'Unearned Revenue', 'Opening Balance Adjustments', 'Employee Reimbursements', 'Accounts Payable', 'Dimension Adjustments'];
$equityCategories = ['Retained Earnings', 'Owner's Equity', 'Opening Balance Offset', 'Drawings'];
$shuffledCategories = [
...array_map(static fn ($name) => ['name' => $name, 'type' => CategoryType::Income->value], $incomeCategories),
...array_map(static fn ($name) => ['name' => $name, 'type' => CategoryType::Expense->value], $expenseCategories),
...array_map(static fn ($name) => ['name' => $name, 'type' => CategoryType::Assets->value], $assetsCategories),
...array_map(static fn ($name) => ['name' => $name, 'type' => CategoryType::Liability->value], $liabilityCategories),
...array_map(static fn ($name) => ['name' => $name, 'type' => CategoryType::Equity->value], $equityCategories),
];
shuffle($shuffledCategories);
$incomeEnabled = $expenseEnabled = false;
$enabledIncomeCategoryId = null;
$enabledExpenseCategoryId = null;
foreach ($shuffledCategories as $category) {
$enabled = false;
if (! $incomeEnabled && $category['type'] === CategoryType::Income->value) {
$enabled = $incomeEnabled = true;
} elseif (! $expenseEnabled && $category['type'] === CategoryType::Expense->value) {
$enabled = $expenseEnabled = true;
}
$categoryModel = Category::factory()->create([
'company_id' => $company->id,
'name' => $category['name'],
'type' => $category['type'],
'enabled' => $enabled,
'created_by' => $user->id,
'updated_by' => $user->id,
]);
if ($enabled && $category['type'] === CategoryType::Income->value) {
$enabledIncomeCategoryId = $categoryModel->id;
} elseif ($enabled && $category['type'] === CategoryType::Expense->value) {
$enabledExpenseCategoryId = $categoryModel->id;
}
}
return [
'income_category_id' => $enabledIncomeCategoryId,
'expense_category_id' => $enabledExpenseCategoryId,
];
}
TypeError:
App\ValueObjects\Money::__construct(): Argument #2 ($currencyCode) must be of type string, null given, called in /home/subin_928/Desktop/erpsaas/app/Services/AccountService.php on line 65
SQLSTATE[42830]: Invalid foreign key: 7 ERROR: there is no unique constraint that matches the given columns in the referred table «currencies» (Connection: pgsql, SQL: alter table "accounts" add constraint "accounts_currency_code_foreign" foreign key ("currency_code") references "currencies" ("code") on delete set null).
The same error in the creation of the accounts, company_defaults and contacts tables.
Too many enums. Remove some if needed. Possibly remove unnecessary company settings.
Remove EventServiceProvider
since Laravel automatically discovers events by default since Laravel 11.
Hello,
I'm trying to get API working, but i still get:
{ "message": "Unauthenticated." }
Can't find any information if it's implemented by default, o I have to implement it myself, thank you Andrew for your help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.