Merge branch '1.3-dev' of github.com:akaunting/akaunting into 1.3-dev

This commit is contained in:
denisdulici 2018-10-27 18:01:38 +03:00
commit e53efb952a
73 changed files with 3176 additions and 22 deletions

View File

@ -15,4 +15,4 @@ class AdminMenuCreated
{
$this->menu = $menu;
}
}
}

View File

@ -15,4 +15,4 @@ class BillCreated
{
$this->bill = $bill;
}
}
}

View File

@ -15,4 +15,4 @@ class BillUpdated
{
$this->bill = $bill;
}
}
}

View File

@ -15,4 +15,4 @@ class CompanySwitched
{
$this->company = $company;
}
}
}

View File

@ -15,4 +15,4 @@ class CustomerMenuCreated
{
$this->menu = $menu;
}
}
}

View File

@ -15,4 +15,4 @@ class InvoiceCreated
{
$this->invoice = $invoice;
}
}
}

View File

@ -15,4 +15,4 @@ class InvoicePrinting
{
$this->invoice = $invoice;
}
}
}

View File

@ -15,4 +15,4 @@ class InvoiceUpdated
{
$this->invoice = $invoice;
}
}
}

View File

@ -19,4 +19,4 @@ class ModuleInstalled
$this->alias = $alias;
$this->company_id = $company_id;
}
}
}

View File

@ -23,4 +23,4 @@ class UpdateFinished
$this->old = $old;
$this->new = $new;
}
}
}

View File

@ -79,6 +79,11 @@ class Login extends Controller
return redirect($path);
}
// Check wizard
if (!setting('general.wizard', false)) {
return redirect('wizard');
}
return redirect('/');
}

View File

@ -264,6 +264,11 @@ class Companies extends Controller
event(new CompanySwitched($company));
}
// Check wizard
if (!setting('general.wizard', false)) {
return redirect('wizard');
}
return redirect('/');
}

View File

@ -0,0 +1,81 @@
<?php
namespace App\Http\Controllers\Wizard;
use App\Http\Controllers\Controller;
use App\Http\Requests\Wizard\Company as Request;
use App\Models\Common\Company;
use App\Traits\Uploads;
class Companies extends Controller
{
use Uploads;
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function edit()
{
if (setting('general.wizard', false)) {
return redirect('/');
}
$company = Company::find(session('company_id'));
$company->setSettings();
return view('wizard.companies.edit', compact('company'));
}
/**
* Update the specified resource in storage.
*
* @param Company $company
* @param Request $request
*
* @return Response
*/
public function update(Request $request)
{
// Company
$company = Company::find(session('company_id'));
$fields = $request->all();
$skip_keys = ['company_id', '_method', '_token'];
$file_keys = ['company_logo', 'invoice_logo'];
foreach ($fields as $key => $value) {
// Don't process unwanted keys
if (in_array($key, $skip_keys)) {
continue;
}
// Process file uploads
if (in_array($key, $file_keys)) {
// Upload attachment
if ($request->file($key)) {
$media = $this->getMedia($request->file($key), 'settings');
$company->attachMedia($media, $key);
$value = $media->id;
}
// Prevent reset
if (empty($value)) {
continue;
}
}
setting()->set('general.' . $key, $value);
}
// Save all settings
setting()->save();
return redirect('wizard/currencies');
}
}

View File

@ -0,0 +1,311 @@
<?php
namespace App\Http\Controllers\Wizard;
use Akaunting\Money\Currency as MoneyCurrency;
use App\Http\Controllers\Controller;
use App\Http\Requests\Setting\Currency as Request;
use App\Models\Banking\Account;
use App\Models\Setting\Currency;
class Currencies extends Controller
{
/**
* Show the form for editing the specified resource.
*
* @param Currency $currency
*
* @return Response
*/
public function index()
{
if (setting('general.wizard', false)) {
return redirect('/');
}
$currencies = Currency::all();
return view('wizard.currencies.index', compact('currencies'));
}
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create()
{
if (setting(setting('general.wizard', false))) {
return redirect('/');
}
// Get current currencies
$current = Currency::pluck('code')->toArray();
// Prepare codes
$codes = array();
$currencies = MoneyCurrency::getCurrencies();
foreach ($currencies as $key => $item) {
// Don't show if already available
if (in_array($key, $current)) {
continue;
}
$codes[$key] = $key;
}
$html = view('wizard.currencies.create', compact('codes'))->render();
return response()->json([
'success' => true,
'error' => false,
'message' => 'null',
'html' => $html,
]);
}
/**
* Store a newly created resource in storage.
*
* @param Request $request
*
* @return Response
*/
public function store(Request $request)
{
// Force the rate to be 1 for default currency
if ($request['default_currency']) {
$request['rate'] = '1';
}
$currency = Currency::create($request->all());
// Update default currency setting
if ($request['default_currency']) {
setting()->set('general.default_currency', $request['code']);
setting()->save();
}
$message = trans('messages.success.added', ['type' => trans_choice('general.currencies', 1)]);
return response()->json([
'success' => true,
'error' => false,
'message' => $message,
'data' => $currency,
]);
}
/**
* Show the form for editing the specified resource.
*
* @param Currency $currency
*
* @return Response
*/
public function edit(Currency $currency)
{
if (setting('general.wizard', false)) {
return redirect('/');
}
// Get current currencies
$current = Currency::pluck('code')->toArray();
// Prepare codes
$codes = array();
$currencies = MoneyCurrency::getCurrencies();
foreach ($currencies as $key => $item) {
// Don't show if already available
if (($key != $currency->code) && in_array($key, $current)) {
continue;
}
$codes[$key] = $key;
}
$item = $currency;
$html = view('wizard.currencies.edit', compact('item', 'codes'))->render();
return response()->json([
'success' => true,
'error' => false,
'message' => 'null',
'html' => $html,
]);
}
/**
* Update the specified resource in storage.
*
* @param Currency $currency
* @param Request $request
*
* @return Response
*/
public function update(Currency $currency, Request $request)
{
// Check if we can disable or change the code
if (!$request['enabled'] || ($currency->code != $request['code'])) {
$relationships = $this->countRelationships($currency, [
'accounts' => 'accounts',
'customers' => 'customers',
'invoices' => 'invoices',
'revenues' => 'revenues',
'bills' => 'bills',
'payments' => 'payments',
]);
if ($currency->code == setting('general.default_currency')) {
$relationships[] = strtolower(trans_choice('general.companies', 1));
}
}
if (empty($relationships)) {
// Force the rate to be 1 for default currency
if ($request['default_currency']) {
$request['rate'] = '1';
}
$currency->update($request->all());
// Update default currency setting
if ($request['default_currency']) {
setting()->set('general.default_currency', $request['code']);
setting()->save();
}
$message = trans('messages.success.updated', ['type' => trans_choice('general.currencies', 1)]);
return response()->json([
'success' => true,
'error' => false,
'message' => $message,
'data' => $currency,
]);
} else {
$message = trans('messages.warning.disabled', ['name' => $currency->name, 'text' => implode(', ', $relationships)]);
return response()->json([
'success' => true,
'error' => false,
'message' => $message,
'data' => $currency,
]);
}
}
/**
* Enable the specified resource.
*
* @param Currency $currency
*
* @return Response
*/
public function enable(Currency $currency)
{
$currency->enabled = 1;
$currency->save();
$message = trans('messages.success.enabled', ['type' => trans_choice('general.currencies', 1)]);
return response()->json([
'success' => true,
'error' => false,
'message' => $message,
'data' => $currency,
]);
}
/**
* Disable the specified resource.
*
* @param Currency $currency
*
* @return Response
*/
public function disable(Currency $currency)
{
$relationships = $this->countRelationships($currency, [
'accounts' => 'accounts',
'customers' => 'customers',
'invoices' => 'invoices',
'revenues' => 'revenues',
'bills' => 'bills',
'payments' => 'payments',
]);
if ($currency->code == setting('general.default_currency')) {
$relationships[] = strtolower(trans_choice('general.companies', 1));
}
if (empty($relationships)) {
$currency->enabled = 0;
$currency->save();
$message = trans('messages.success.disabled', ['type' => trans_choice('general.currencies', 1)]);
return response()->json([
'success' => true,
'error' => false,
'message' => $message,
'data' => $currency,
]);
} else {
$message = trans('messages.warning.disabled', ['name' => $currency->name, 'text' => implode(', ', $relationships)]);
return response()->json([
'success' => false,
'error' => true,
'message' => $message,
'data' => $currency,
]);
}
}
/**
* Remove the specified resource from storage.
*
* @param Currency $currency
*
* @return Response
*/
public function destroy(Currency $currency)
{
$relationships = $this->countRelationships($currency, [
'accounts' => 'accounts',
'customers' => 'customers',
'invoices' => 'invoices',
'revenues' => 'revenues',
'bills' => 'bills',
'payments' => 'payments',
]);
if ($currency->code == setting('general.default_currency')) {
$relationships[] = strtolower(trans_choice('general.companies', 1));
}
if (empty($relationships)) {
$currency->delete();
$message = trans('messages.success.deleted', ['type' => trans_choice('general.currencies', 1)]);
return response()->json([
'success' => true,
'error' => false,
'message' => $message,
'data' => $currency,
]);
} else {
$message = trans('messages.warning.deleted', ['name' => $currency->name, 'text' => implode(', ', $relationships)]);
return response()->json([
'success' => false,
'error' => true,
'message' => $message,
'data' => $currency,
]);
}
}
}

View File

@ -0,0 +1,39 @@
<?php
namespace App\Http\Controllers\Wizard;
use Illuminate\Routing\Controller;
use App\Traits\Modules;
use App\Models\Module\Module;
class Finish extends Controller
{
use Modules;
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function index()
{
if (setting(setting('general.wizard', false))) {
return redirect('/');
}
setting()->set('general.wizard', true);
// Save all settings
setting()->save();
$data = [
'query' => [
'limit' => 4
]
];
$modules = $this->getFeaturedModules($data);
return view('wizard.finish.index', compact('modules'));
}
}

View File

@ -0,0 +1,224 @@
<?php
namespace App\Http\Controllers\Wizard;
use App\Http\Controllers\Controller;
use App\Http\Requests\Setting\Tax as Request;
use App\Models\Setting\Tax;
class Taxes extends Controller
{
/**
* Show the form for editing the specified resource.
*
* @return Response
*/
public function index()
{
if (setting(setting('general.wizard', false))) {
return redirect('/');
}
$taxes = Tax::all();
return view('wizard.taxes.index', compact('taxes'));
}
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create()
{
if (setting(setting('general.wizard', false))) {
return redirect('/');
}
$html = view('wizard.taxes.create', compact('codes'))->render();
return response()->json([
'success' => true,
'error' => false,
'message' => 'null',
'html' => $html,
]);
}
/**
* Store a newly created resource in storage.
*
* @param Request $request
*
* @return Response
*/
public function store(Request $request)
{
$tax = Tax::create($request->all());
$message = trans('messages.success.added', ['type' => trans_choice('general.tax_rates', 1)]);
return response()->json([
'success' => true,
'error' => false,
'message' => $message,
'data' => $tax,
]);
}
/**
* Show the form for editing the specified resource.
*
* @param Tax $tax
*
* @return Response
*/
public function edit(Tax $tax)
{
if (setting(setting('general.wizard', false))) {
return redirect('/');
}
$item = $tax;
return view('wizard.taxes.edit', compact('item'));
}
/**
* Update the specified resource in storage.
*
* @param Tax $tax
* @param Request $request
*
* @return Response
*/
public function update(Tax $tax, Request $request)
{
$relationships = $this->countRelationships($tax, [
'items' => 'items',
'invoice_items' => 'invoices',
'bill_items' => 'bills',
]);
if (empty($relationships) || $request['enabled']) {
$tax->update($request->all());
$message = trans('messages.success.updated', ['type' => trans_choice('general.tax_rates', 1)]);
return response()->json([
'success' => true,
'error' => false,
'message' => $message,
'data' => $tax,
]);
} else {
$message = trans('messages.warning.disabled', ['name' => $tax->name, 'text' => implode(', ', $relationships)]);
return response()->json([
'success' => true,
'error' => false,
'message' => $message,
'data' => $tax,
]);
}
}
/**
* Enable the specified resource.
*
* @param Tax $tax
*
* @return Response
*/
public function enable(Tax $tax)
{
$tax->enabled = 1;
$tax->save();
$message = trans('messages.success.enabled', ['type' => trans_choice('general.tax_rates', 1)]);
return response()->json([
'success' => true,
'error' => false,
'message' => $message,
'data' => $tax,
]);
}
/**
* Disable the specified resource.
*
* @param Tax $tax
*
* @return Response
*/
public function disable(Tax $tax)
{
$relationships = $this->countRelationships($tax, [
'items' => 'items',
'invoice_items' => 'invoices',
'bill_items' => 'bills',
]);
if (empty($relationships)) {
$tax->enabled = 0;
$tax->save();
$message = trans('messages.success.disabled', ['type' => trans_choice('general.tax_rates', 1)]);
return response()->json([
'success' => true,
'error' => false,
'message' => $message,
'data' => $tax,
]);
} else {
$message = trans('messages.warning.disabled', ['name' => $tax->name, 'text' => implode(', ', $relationships)]);
return response()->json([
'success' => false,
'error' => true,
'message' => $message,
'data' => $tax,
]);
}
}
/**
* Remove the specified resource from storage.
*
* @param Tax $tax
*
* @return Response
*/
public function destroy(Tax $tax)
{
$relationships = $this->countRelationships($tax, [
'items' => 'items',
'invoice_items' => 'invoices',
'bill_items' => 'bills',
]);
if (empty($relationships)) {
$tax->delete();
$message = trans('messages.success.deleted', ['type' => trans_choice('general.taxes', 1)]);
return response()->json([
'success' => true,
'error' => false,
'message' => $message,
'data' => $tax,
]);
} else {
$message = trans('messages.warning.deleted', ['name' => $tax->name, 'text' => implode(', ', $relationships)]);
return response()->json([
'success' => false,
'error' => true,
'message' => $message,
'data' => $tax,
]);
}
}
}

View File

@ -41,6 +41,13 @@ class Kernel extends HttpKernel
'company.currencies',
],
'wizard' => [
'web',
'language',
'auth',
'permission:read-admin-panel',
],
'admin' => [
'web',
'language',

View File

@ -208,4 +208,4 @@ class AdminMenu
return $next($request);
}
}
}

View File

@ -0,0 +1,30 @@
<?php
namespace App\Http\Requests\Wizard;
use Illuminate\Foundation\Http\FormRequest;
class Company extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'company_logo' => 'mimes:' . setting('general.file_types') . '|between:0,' . setting('general.file_size') * 1024,
];
}
}

View File

@ -3,6 +3,8 @@
namespace App\Listeners\Updates;
use App\Events\UpdateFinished;
use App\Models\Auth\Role;
use App\Models\Auth\Permission;
use Artisan;
class Version130 extends Listener
@ -24,9 +26,27 @@ class Version130 extends Listener
return;
}
$permissions = $this->getPermissions();
// Attach permission to roles
$roles = Role::all();
foreach ($roles as $role) {
$allowed = ['admin'];
if (!in_array($role->name, $allowed)) {
continue;
}
foreach ($permissions as $permission) {
$role->attachPermission($permission);
}
}
// Set new Item Reminder settings
setting(['general.send_item_reminder' => '0']);
setting(['general.schedule_item_stocks' => '3,5,7']);
setting(['general.wizard' => '1']);
setting()->save();
@ -76,4 +96,86 @@ class Version130 extends Listener
}
}
}
protected function getPermissions()
{
$permissions = [];
// Create permissions
$permissions[] = Permission::firstOrCreate([
'name' => 'create-wizard-companies',
'display_name' => 'Create Wizard Compaines',
'description' => 'Create Wizard Compaines',
]);
$permissions[] = Permission::firstOrCreate([
'name' => 'create-wizard-currencies',
'display_name' => 'Create Wizard Currencies',
'description' => 'Create Wizard Currencies',
]);
$permissions[] = Permission::firstOrCreate([
'name' => 'create-wizard-taxes',
'display_name' => 'Create Wizard Taxes',
'description' => 'Create Wizard Taxes',
]);
$permissions[] = Permission::firstOrCreate([
'name' => 'create-wizard-finish',
'display_name' => 'Create Wizard Finish',
'description' => 'Create Wizard Finish',
]);
// Read permissions
$permissions[] = Permission::firstOrCreate([
'name' => 'read-wizard-companies',
'display_name' => 'Read Wizard Compaines',
'description' => 'Read Wizard Compaines',
]);
$permissions[] = Permission::firstOrCreate([
'name' => 'read-wizard-currencies',
'display_name' => 'Read Wizard Currencies',
'description' => 'Read Wizard Currencies',
]);
$permissions[] = Permission::firstOrCreate([
'name' => 'read-wizard-taxes',
'display_name' => 'Read Wizard Taxes',
'description' => 'Read Wizard Taxes',
]);
$permissions[] = Permission::firstOrCreate([
'name' => 'read-wizard-finish',
'display_name' => 'Read Wizard Finish',
'description' => 'Read Wizard Finish',
]);
// Update permissions
$permissions[] = Permission::firstOrCreate([
'name' => 'update-wizard-companies',
'display_name' => 'Update Wizard Compaines',
'description' => 'Update Wizard Compaines',
]);
$permissions[] = Permission::firstOrCreate([
'name' => 'update-wizard-currencies',
'display_name' => 'Update Wizard Currencies',
'description' => 'Update Wizard Currencies',
]);
$permissions[] = Permission::firstOrCreate([
'name' => 'update-wizard-taxes',
'display_name' => 'Update Wizard Taxes',
'description' => 'Update Wizard Taxes',
]);
$permissions[] = Permission::firstOrCreate([
'name' => 'update-wizard-finish',
'display_name' => 'Update Wizard Finish',
'description' => 'Update Wizard Finish',
]);
return $permissions;
}
}

View File

@ -31,7 +31,7 @@ class ViewComposerServiceProvider extends ServiceProvider
// Add notifications to header
View::composer(
['partials.admin.header', 'partials.customer.header'], 'App\Http\ViewComposers\Header'
['partials.wizard.header', 'partials.admin.header', 'partials.customer.header'], 'App\Http\ViewComposers\Header'
);
// Add limits to index

View File

@ -200,6 +200,17 @@ trait Modules
return [];
}
public function getFeaturedModules($data = [])
{
$response = $this->getRemote('apps/featured', 'GET', $data);
if ($response && ($response->getStatusCode() == 200)) {
return json_decode($response->getBody())->data;
}
return [];
}
public function getCoreVersion()
{
$data['query'] = Info::all();

View File

@ -157,7 +157,7 @@ class Installer
try {
DB::connection('install_test')->getPdo();
} catch (\Exception $e) {;
} catch (\Exception $e) {
return false;
}

View File

@ -115,7 +115,7 @@ return [
|
*/
'allowed' => ['ar-SA', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-GB', 'es-ES', 'es-MX', 'fa-IR', 'fr-FR', 'he-IL', 'hr-HR', 'id-ID', 'it-IT', 'lv-LV', 'mk-MK', 'nb-NO', 'nl-NL', 'pt-BR', 'pt-PT', 'ro-RO', 'ru-RU', 'sk-SK', 'sq-AL', 'sv-SE', 'th-TH', 'tr-TR', 'uk-UA', 'vi-VN', 'zh-CN', 'zh-TW'],
'allowed' => ['ar-SA', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-GB', 'es-ES', 'es-MX', 'fa-IR', 'fr-FR', 'he-IL', 'hr-HR', 'id-ID', 'it-IT', 'lt-LT', 'lv-LV', 'mk-MK', 'nb-NO', 'nl-NL', 'pt-BR', 'pt-PT', 'ro-RO', 'ru-RU', 'sk-SK', 'sq-AL', 'sv-SE', 'th-TH', 'tr-TR', 'uk-UA', 'vi-VN', 'zh-CN', 'zh-TW'],
/*
|--------------------------------------------------------------------------

View File

@ -63,6 +63,10 @@ class Roles extends Seeder
'reports-income-expense-summary' => 'r',
'reports-profit-loss' => 'r',
'reports-tax-summary' => 'r',
'wizard-companies' => 'c,r,u',
'wizard-currencies' => 'c,r,u',
'wizard-taxes' => 'c,r,u',
'wizard-finish' => 'c,r,u',
],
'manager' => [
'admin-panel' => 'r',

View File

@ -51,7 +51,8 @@ class Settings extends Seeder
'general.session_lifetime' => '30',
'general.file_size' => '2',
'general.file_types' => 'pdf,jpeg,jpg,png',
'offlinepayment.methods' => '[{"code":"offlinepayment.cash.1","name":"Cash","order":"1","description":null},{"code":"offlinepayment.bank_transfer.2","name":"Bank Transfer","order":"2","description":null}]',
'general.wizard' => '0',
'offlinepayment.methods' => '[{"code":"offlinepayment.cash.1","name":"Cash","order":"1","description":null},{"code":"offlinepayment.bank_transfer.2","name":"Bank Transfer","order":"2","description":null}]',
]);
}
}

67
public/css/app.css vendored
View File

@ -750,13 +750,14 @@ input[type="number"] {
}
#items .select2-container--default .select2-selection--multiple .select2-selection__choice {
background-color: #6da252;
border: 1px solid #6da252;
background-color: #f4f4f4;
color: #444;
border: 1px solid #ddd;
margin-bottom: 5px;
}
#items .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
color: #fffdfd;
color: #444;
}
#items span.select2.select2-container.select2-container--default .select2-selection.select2-selection--multiple {
@ -775,4 +776,62 @@ input[type="number"] {
#items .select2-search__field {
padding-left: 15px;
}
}
.stepwizard-step p {
margin-top: 5px;
font-size: 16px;
color:#666;
}
.stepwizard-row {
display: table-row;
}
.stepwizard {
display: table;
width: 100%;
position: relative;
margin-top: 20px;
}
.stepwizard-step button[disabled] {
/*opacity: 1 !important;
filter: alpha(opacity=100) !important;*/
}
.stepwizard .btn.disabled, .stepwizard .btn[disabled], .stepwizard fieldset[disabled] .btn {
opacity:1 !important;
color:#bbb;
}
.stepwizard-row:before {
top: 26px;
bottom: 0;
position: absolute;
content:" ";
width: 100%;
height: 1px;
background-color: #ccc;
z-index: 0;
}
.stepwizard-step {
display: table-cell;
text-align: center;
position: relative;
}
.btn-circle.btn-success {
color: #fff;
}
.btn-circle {
width: 50px;
height: 50px;
text-align: center;
padding: 1px 0;
font-size: 30px;
line-height: 1.428571;
border-radius: 30px;
}

4
public/js/app.js vendored
View File

@ -198,7 +198,9 @@ $(document).ready(function () {
return true;
});
$('.input-group-invoice-text select').select2();
if (document.getElementsByClassName('input-group-invoice-text').length) {
$('.input-group-invoice-text select').select2();
}
});
function confirmDelete(form_id, title, message, button_cancel, button_delete) {

View File

@ -106,11 +106,15 @@ return [
'partially' => 'Partially',
'partially_paid' => 'Partially Paid',
'export' => 'Export',
'finish' => 'Finish',
'wizard' => 'Wizard',
'skip' => 'Skip',
'enable' => 'Enable',
'disable' => 'Disable',
'select_all' => 'Select All',
'unselect_all' => 'Unselect All',
'create_date' => 'Create Date',
'go_to' => 'Go to :name',
'created_date' => 'Created Date',
'period' => 'Period',
'start' => 'Start',
'end' => 'End',

View File

@ -16,6 +16,8 @@ return [
'no_apps' => 'There are no apps in this category, yet.',
'developer' => 'Are you a developer? <a href="https://akaunting.com/blog/akaunting-app-store" target="_blank">Here</a> you can learn how to create an app and start selling today!',
'recommended_apps' => 'Recommended Apps',
'about' => 'About',
'added' => 'Added',

View File

@ -0,0 +1,14 @@
<?php
return [
'account_name' => 'Įmonės pavadinimas',
'number' => 'Numeris',
'opening_balance' => 'Pradinis likutis',
'current_balance' => 'Likutis',
'bank_name' => 'Banko pavadinimas',
'bank_phone' => 'Banko telefonas',
'bank_address' => 'Banko adresas',
'default_account' => 'Numatytoji įmonė',
];

View File

@ -0,0 +1,39 @@
<?php
return [
'profile' => 'Profilis',
'logout' => 'Atsijungti',
'login' => 'Prisijungti',
'login_to' => 'Prisijunkite, kad pradėtumėte sesiją',
'remember_me' => 'Prisiminti mane',
'forgot_password' => 'Pamiršau slaptažodį',
'reset_password' => 'Atstatyti slaptažodį',
'enter_email' => 'Įveskite savo el. pašto adresą',
'current_email' => 'Dabartinis el. paštas',
'reset' => 'Atstatyti',
'never' => 'niekada',
'password' => [
'current' => 'Slaptažodis',
'current_confirm' => 'Slaptažodžio patvirtinimas',
'new' => 'Naujas slaptažodis',
'new_confirm' => 'Naujo slaptažodžio patvirtinimas',
],
'error' => [
'self_delete' => 'Negalite ištrinti savęs!',
'no_company' => 'Nėra priskirtos kompanijos. Prašome susisiekti su sistemos administratoriumi.',
],
'failed' => 'Neteisingi prisijungimo duomenys.',
'disabled' => 'Šis vartotojas yra išjungtas. Prašome susisiekti su sistemos administratoriumi.',
'throttle' => 'Per daug bandymų prisijungti. Bandykite po :seconds sec.',
'notification' => [
'message_1' => 'Jūs gavote šį laišką, nes mes gavome prašymą atstatyti slaptažodį jūsų vartotojui.',
'message_2' => 'Jei jūs neprašėte atstatyti slaptažodžio - tiesiog nieko nedarykite.',
'button' => 'Atstatyti slaptažodį',
],
];

View File

@ -0,0 +1,46 @@
<?php
return [
'bill_number' => 'Sąskaitos numeris',
'bill_date' => 'Sąskaitos data',
'total_price' => 'Bendra suma',
'due_date' => 'Terminas',
'order_number' => 'Užsakymo numeris',
'bill_from' => 'Sąskaitas iš',
'quantity' => 'Kiekis',
'price' => 'Kaina',
'sub_total' => 'Tarpinė suma',
'discount' => 'Nuolaida',
'tax_total' => 'Mokesčių suma',
'total' => 'Iš viso',
'item_name' => 'Prekės/paslaugos pavadinimas',
'show_discount' => ':discount% nuolaida',
'add_discount' => 'Pridėti nuolaidą',
'discount_desc' => 'tarpinė suma',
'payment_due' => 'Mokėjimo terminas',
'amount_due' => 'Mokėtina suma',
'paid' => 'Apmokėta',
'histories' => 'Istorijos',
'payments' => 'Mokėjimai',
'add_payment' => 'Pridėti mokėjimą',
'mark_received' => 'Pažymėti kaip gautą',
'download_pdf' => 'Parsisiųsti PDF',
'send_mail' => 'Siųsti laišką',
'status' => [
'draft' => 'Juodraštis',
'received' => 'Gauta',
'partial' => 'Dalinis',
'paid' => 'Apmokėta',
],
'messages' => [
'received' => 'Sąskaita gauta sėkmingai!',
],
];

View File

@ -0,0 +1,13 @@
<?php
return [
'domain' => 'Domenas',
'logo' => 'Logotipas',
'manage' => 'Valdyti įmones',
'all' => 'Visos įmonės',
'error' => [
'delete_active' => 'Klaida: Negalite ištrinti aktyvios įmonės, pirma turite pakeisti ją!',
],
];

View File

@ -0,0 +1,18 @@
<?php
return [
'code' => 'Kodas',
'rate' => 'Kursas',
'default' => 'Numatytoji valiuta',
'decimal_mark' => 'Dešimtainis ženklas',
'thousands_separator' => 'Tūkstančių skyriklis',
'precision' => 'Tikslumas',
'symbol' => [
'symbol' => 'Simbolis',
'position' => 'Simbolio pozicija',
'before' => 'Suma prieš',
'after' => 'Suma po',
]
];

View File

@ -0,0 +1,11 @@
<?php
return [
'allow_login' => 'Leisti prisijungti?',
'user_created' => 'Vartotojas sukurtas',
'error' => [
'email' => 'Šis el. paštas jau užimtas.'
]
];

View File

@ -0,0 +1,24 @@
<?php
return [
'total_incomes' => 'Iš viso pajamų',
'receivables' => 'Gautinos sumos',
'open_invoices' => 'Atidaryti sąskaitas faktūras',
'overdue_invoices' => 'Vėluojančios sąskaitos faktūros',
'total_expenses' => 'Iš viso išlaidų',
'payables' => 'Mokėtinos sumos',
'open_bills' => 'Atidaryti sąskaitas',
'overdue_bills' => 'Vėluojančios sąskaitos',
'total_profit' => 'Pelnas iš viso',
'open_profit' => 'Pelnas prieš mokesčius',
'overdue_profit' => 'Vėluojantis pelnas',
'cash_flow' => 'Grynųjų pinigų srautai',
'no_profit_loss' => 'Nėra nuostolių',
'incomes_by_category' => 'Pajamos pagal kategoriją',
'expenses_by_category' => 'Išlaidos pagal kategoriją',
'account_balance' => 'Sąskaitos likutis',
'latest_incomes' => 'Naujausios pajamos',
'latest_expenses' => 'Paskutinis išlaidos',
];

View File

@ -0,0 +1,16 @@
<?php
return [
'accounts_cash' => 'Grynieji pinigai',
'categories_deposit' => 'Depozitas',
'categories_sales' => 'Pardavimai',
'currencies_usd' => 'JAV doleris',
'currencies_eur' => 'Euras',
'currencies_gbp' => 'Svarai sterlingai',
'currencies_try' => 'Turkijos Lira',
'taxes_exempt' => 'Neapmokestinamos pajamos',
'taxes_normal' => 'Įprastiniai mokesčiai',
'taxes_sales' => 'PVM',
];

View File

@ -0,0 +1,9 @@
<?php
return [
'version' => 'Versija',
'powered' => 'Sukurta Akaunting',
'software' => 'Nemokama apskaitos programa',
];

View File

@ -0,0 +1,121 @@
<?php
return [
'items' => 'Prekė|Prekės',
'incomes' => 'Pajamos|Pajamos',
'invoices' => 'Sąskaita|Sąskaitos',
'revenues' => 'Pajamos|Pajamos',
'customers' => 'Klientas|Klientai',
'expenses' => 'Išlaidos|Išlaidos',
'bills' => 'Sąskaitą|Sąskaitos',
'payments' => 'Mokėjimas|Mokėjimai',
'vendors' => 'Tiekėjas|Tiekėjai',
'accounts' => 'Vartotojas|Vartotojai',
'transfers' => 'Pervedimas|Pervedimai',
'transactions' => 'Transakcija|Transakcijos',
'reports' => 'Ataskaita|Ataskaitos',
'settings' => 'Nustatymas|Nustatymai',
'categories' => 'Kategorija|Kategorijos',
'currencies' => 'Valiuta|Valiutos',
'tax_rates' => 'Mokesčių tarifas|Mokesčių tarifai',
'users' => 'Vartotojas|Vartotojai',
'roles' => 'Rolė|Rolės',
'permissions' => 'Teisė|Teisės',
'modules' => 'Programėlė|Programėlės',
'companies' => 'Įmonė|įmonės',
'profits' => 'Pelnas|Pelnas',
'taxes' => 'Mokestis|Mokesčiai',
'logos' => 'Logotipas|Logotipai',
'pictures' => 'Paveikslėlis|Paveikslėliai',
'types' => 'Tipas|Tipai',
'payment_methods' => 'Mokėjimo būdas|Mokėjimo būdai',
'compares' => 'Pajamos - išlaidos|Pajamos - išlaidos',
'notes' => 'Pastaba|Pastabos',
'totals' => 'Iš viso|Iš viso',
'languages' => 'Kalba|Kalbos',
'updates' => 'Atnaujinimas|Atnaujinimai',
'numbers' => 'Skaičius|Skaičiai',
'statuses' => 'Statusas|Statusai',
'others' => 'Kiti|Kiti',
'dashboard' => 'Pradžia',
'banking' => 'Bankai ir finansai',
'general' => 'Bendras',
'no_records' => 'Nėra įrašų.',
'date' => 'Data',
'amount' => 'Kiekis',
'enabled' => 'Įjungta',
'disabled' => 'Įšjungta',
'yes' => 'Taip',
'no' => 'Ne',
'na' => 'N/A',
'daily' => 'Kasdien',
'monthly' => 'Kas mėnesį',
'quarterly' => 'Kas ketvirtį',
'yearly' => 'Kasmet',
'add' => 'Pridėti',
'add_new' => 'Pridėti naują',
'show' => 'Rodyti',
'edit' => 'Redaguoti',
'delete' => 'Ištrinti',
'send' => 'Siųsti',
'download' => 'Parsisiųsti',
'delete_confirm' => 'Ar tikrai norite ištrinti?',
'name' => 'Vardas',
'email' => 'El. paštas',
'tax_number' => 'PVM kodas',
'phone' => 'Telefonas',
'address' => 'Adresas',
'website' => 'Interneto svetainė',
'actions' => 'Veiksmai',
'description' => 'Aprašymas',
'manage' => 'Valdyti',
'code' => 'Kodas',
'alias' => 'Alternatyva',
'balance' => 'Balansas',
'reference' => 'Nuoroda',
'attachment' => 'Priedai',
'change' => 'Pakeisti',
'switch' => 'Perjungti',
'color' => 'Spalva',
'save' => 'Išsaugoti',
'cancel' => 'Atšaukti',
'from' => 'Nuo',
'to' => 'Iki',
'print' => 'Spausdinti',
'search' => 'Paieška',
'search_placeholder' => 'Ieškoti..',
'filter' => 'Filtras',
'help' => 'Pagalba',
'all' => 'Visi',
'all_type' => 'Visi :type',
'upcoming' => 'Artėjantys',
'created' => 'Sukurta',
'id' => 'ID',
'more_actions' => 'Daugiau veiksmų',
'duplicate' => 'Duplikuoti',
'unpaid' => 'Neapmokėta',
'paid' => 'Apmokėta',
'overdue' => 'Vėluojanti',
'partially' => 'Dalinis',
'partially_paid' => 'Dalinai apmokėta',
'export' => 'Eksportuoti',
'enable' => 'Įjungti',
'disable' => 'Išjungti',
'title' => [
'new' => 'Naujas :type',
'edit' => 'Redaguoti :type',
],
'form' => [
'enter' => 'Įveskite :field',
'select' => [
'field' => '- Pasirinkite :field -',
'file' => 'Pasirinkti failą',
],
'no_file_selected' => 'Nepasirinktas failas...',
],
];

View File

@ -0,0 +1,15 @@
<?php
return [
'change_language' => 'Keisti kalbą',
'last_login' => 'Paskutinis prisijungimas :laikas',
'notifications' => [
'counter' => '{0} Pranešimų nėra|{1} Turite :count pranešimą|[2,*] Turite :count pranešimus',
'overdue_invoices' => '{1} :count vėluojanti sąskaita|[2,*] :count vėluojančios sąskaitos',
'upcoming_bills' => '{1} :count artėjantis mokėjimasl|[2,*] :count artėjantys mokėjimai',
'items_stock' => '{1} :count prekės nebėra|[2,*] :count prekių nebėra',
'view_all' => 'Peržiūrėti visus'
],
];

View File

@ -0,0 +1,9 @@
<?php
return [
'import' => 'Importuoti',
'title' => 'Importuoti :type',
'message' => 'Leidžiami failų tipai: XLS, XLSX. Prašome <a target="_blank" href=":link"><strong>parsisiųsti</strong></a> pavyzdį.',
];

View File

@ -0,0 +1,44 @@
<?php
return [
'next' => 'Sekantis',
'refresh' => 'Atnaujinti',
'steps' => [
'requirements' => 'Prašome kreiptis į savo talpinimo paslaugų teikėją, kad ištaisytų klaidas!',
'language' => 'Žingsnis 1/3: Kalbos pasirinkimas',
'database' => 'Žingsnis 2/3: Duombazės nustatymai',
'settings' => 'Žingsnis 3/3: Įmonės ir administratoriaus nustatymai',
],
'language' => [
'select' => 'Pasirinkite kalbą',
],
'requirements' => [
'enabled' => ': feature turi būti įjungta!',
'disabled' => ': feature turi būti išjungta!',
'extension' => ':extension turi būti įrašytas ir įjungtas!',
'directory' => ':directory direktorijoje turi būti leidžiama įrašyti!',
],
'database' => [
'hostname' => 'Serverio adresas',
'username' => 'Vartotojo vardas',
'password' => 'Slaptažodis',
'name' => 'Duomenų bazė',
],
'settings' => [
'company_name' => 'Įmonės pavadinimas',
'company_email' => 'Įmonės el. paštas',
'admin_email' => 'Administratoriaus el. paštas',
'admin_password' => 'Administratoriaus slaptažodis',
],
'error' => [
'connection' => 'Klaida: Nepavyko prisijungti prie duomenų bazės! Prašome įsitikinkite, kad informacija yra teisinga.',
],
];

View File

@ -0,0 +1,55 @@
<?php
return [
'invoice_number' => 'Sąskaitos-faktūros numeris',
'invoice_date' => 'Sąskaitos-faktūros data',
'total_price' => 'Bendra kaina',
'due_date' => 'Terminas',
'order_number' => 'Užsakymo numeris',
'bill_to' => 'Pirkėjas',
'quantity' => 'Kiekis',
'price' => 'Kaina',
'sub_total' => 'Tarpinė suma',
'discount' => 'Nuolaida',
'tax_total' => 'Mokesčių suma',
'total' => 'Iš viso',
'item_name' => 'Prekė/paslauga|Prekės/paslaugos',
'show_discount' => ':discount% nuolaida',
'add_discount' => 'Pridėti nuolaidą',
'discount_desc' => 'tarpinė suma',
'payment_due' => 'Mokėjimo terminas',
'paid' => 'Apmokėta',
'histories' => 'Istorijos',
'payments' => 'Mokėjimai',
'add_payment' => 'Pridėti mokėjimą',
'mark_paid' => 'Pažymėti kaip apmokėtą',
'mark_sent' => 'Pažymėti kaip išsiųstą',
'download_pdf' => 'Parsisiųsti PDF',
'send_mail' => 'Siųsti laišką',
'status' => [
'draft' => 'Juodraštis',
'sent' => 'Išsiųsta',
'viewed' => 'Peržiūrėta',
'approved' => 'Patvirtinta',
'partial' => 'Dalinis',
'paid' => 'Apmokėta',
],
'messages' => [
'email_sent' => 'Sąskaitą-faktūrą išsiųsta sėkmingai!',
'marked_sent' => 'SF pažymėta kaip išsiųsta sėkmingai!',
'email_required' => 'Klientas neturi el. pašto!',
],
'notification' => [
'message' => 'Jūs gavote šį laišką, nes :customer jums išrašė sąskaitą už :amount.',
'button' => 'Apmokėti dabar',
],
];

View File

@ -0,0 +1,15 @@
<?php
return [
'quantities' => 'Kiekis|Kiekiai',
'sales_price' => 'Pardavimo kaina',
'purchase_price' => 'Pirkimo kaina',
'sku' => 'Prekės kodas',
'notification' => [
'message' => 'Jūs gavote šį laišką, nes baigiasi :name likutis.',
'button' => 'Peržiūrėti dabar',
],
];

View File

@ -0,0 +1,29 @@
<?php
return [
'success' => [
'added' => ':type pridėtas!',
'updated' => ':type atnaujintas!',
'deleted' => ':type ištrintas!',
'duplicated' => ':type duplikuotas!',
'imported' => ':type importuotas!',
'enabled' => ':type įjungtas!',
'disabled' => ':type išjungtas!',
],
'error' => [
'over_payment' => 'Klaida: Apmokėjimas nepridėtas! Užsakymo kiekis viršija turimą kiekį.',
'not_user_company' => 'Klaida: Jūs neturite teisės valdyti šios kompanijos!',
'customer' => 'Klaida: Vartotojas nebuvo sukurtas! :name jau naudoja šį el. pašto adresą.',
'no_file' => 'Klaida: Nepasirinktas failas!',
'last_category' => 'Klaida: Negalite ištrinti paskutinės :type kategorijos!',
'invalid_token' => 'Klaida: Neteisingas raktas!',
'import_column' => 'Klaida: :message :sheet lape. Eilutė: :line.',
'import_sheet' => 'Klaida: Lapo pavadinimas neteisingas Peržiūrėkite pavyzdį.',
],
'warning' => [
'deleted' => 'Negalima ištrinti <b>:name</b>, nes jis yra susijęs su :text.',
'disabled' => 'Negalima išjungti <b>:name</b>, nes jis yra susijęs su :text.',
],
];

View File

@ -0,0 +1,58 @@
<?php
return [
'title' => 'API raktas',
'api_token' => 'Raktas',
'my_apps' => 'Mano programėlės',
'top_paid' => 'Geriausios mokamos',
'new' => 'Nauji',
'top_free' => 'Geriausios nemokamos',
'free' => 'NEMOKAMOS',
'search' => 'Paieška',
'install' => 'Įrašyti',
'buy_now' => 'Pirkti dabar',
'token_link' => '<a href="https://akaunting.com/tokens" target="_blank">Spauskite čia</a>, kad gautumėte savo API raktą.',
'no_apps' => 'Nėra programėlių šioje kategorijoje.',
'developer' => 'Ar esate kūrėjas? <a href="https://akaunting.com/blog/akaunting-app-store" target="_blank">Čia</a> galite sužinoti, kaip sukurti programėlę ir pradėti pardavinėti šiandien!',
'about' => 'Apie',
'added' => 'Pridėta',
'updated' => 'Atnaujinta',
'compatibility' => 'Suderinamumas',
'installed' => ':module įrašytas',
'uninstalled' => ':module ištrintas',
//'updated' => ':module updated',
'enabled' => ':module įjungtas',
'disabled' => ':module įšjungtas',
'tab' => [
'installation' => 'Įrašymas',
'faq' => 'DUK',
'changelog' => 'Pakeitimų sąrašas',
],
'installation' => [
'header' => 'Įrašymas',
'download' => 'Parsisiunčiamas :module failas.',
'unzip' => 'Išskleidžiami :module failai.',
'install' => 'Įrašomi :module failai.',
],
'badge' => [
'installed' => 'Įrašytas',
],
'button' => [
'uninstall' => 'Ištrinti',
'disable' => 'Išjungti',
'enable' => 'Įjungti',
],
'my' => [
'purchased' => 'Nupirkta',
'installed' => 'Įrašyta',
],
];

View File

@ -0,0 +1,10 @@
<?php
return [
'whoops' => 'Oi!',
'hello' => 'Sveiki!',
'salutation' => 'Linkėjimai, <br>:company_name',
'subcopy' => 'Jei negalite paspausti ":text" nuorodos, nukopijuokite adresą ir nueikite į jį naršyklėje: [:url](:url)',
];

View File

@ -0,0 +1,9 @@
<?php
return [
'previous' => '&laquo; Ankstesnis',
'next' => 'Sekantis &raquo;',
'showing' => 'Rodoma nuo :first iki :last iš :total :type',
];

View File

@ -0,0 +1,22 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Password Reset Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are the default lines which match reasons
| that are given by the password broker for a password update attempt
| has failed, such as for an invalid token or invalid new password.
|
*/
'password' => 'Slaptažodžiai turi būti bent šešių simbolių ir sutapti.',
'reset' => 'Slaptažodis pakeistas!',
'sent' => 'Slaptažodžio keitimo nuoroda išsiųsta!',
'token' => 'Šis slaptažodžio atnaujinimas negaliojantis.',
'user' => "Vartotojas su tokiu el. pašu nerastas.",
];

View File

@ -0,0 +1,20 @@
<?php
return [
'recurring' => 'Pasikartojantis',
'every' => 'Kiekvieną',
'period' => 'Periodas',
'times' => 'Kartus',
'daily' => 'Kasdien',
'weekly' => 'Kas savaitę',
'monthly' => 'Kas mėnesį',
'yearly' => 'Kasmet',
'custom' => 'Pasirinktinis',
'days' => 'Diena(os)',
'weeks' => 'Savaite(ės)',
'months' => 'Mėnuo(iai)',
'years' => 'Metai(s)',
'message' => 'Tai pasikartojanti :type ir kita :type bus automatiškai sugeneruota :data',
];

View File

@ -0,0 +1,30 @@
<?php
return [
'this_year' => 'Šiais metais',
'previous_year' => 'Ankstesniais metais',
'this_quarter' => 'Šį ketvirtį',
'previous_quarter' => 'Praėjusį ketvirtį',
'last_12_months' => 'Per paskutinius 12 mėnesių',
'profit_loss' => 'Pelnas ir nuostoliai',
'gross_profit' => 'Grynasis pelnas',
'net_profit' => 'Pelnas prieš mokesčius',
'total_expenses' => 'Iš viso išlaidų',
'net' => 'NET',
'summary' => [
'income' => 'Pajamų suvestinė',
'expense' => 'Išlaidų suvestinė',
'income_expense' => 'Pajamos / išlaidos',
'tax' => 'Mokesčių suvestinė',
],
'quarter' => [
'1' => 'Sau-Kov',
'2' => 'Bal-Bir',
'3' => 'Lie-Rugs',
'4' => 'Spa-Gruo',
],
];

View File

@ -0,0 +1,90 @@
<?php
return [
'company' => [
'name' => 'Vardas',
'email' => 'El. paštas',
'phone' => 'Telefonas',
'address' => 'Adresas',
'logo' => 'Logotipas',
],
'localisation' => [
'tab' => 'Lokalizacija',
'date' => [
'format' => 'Datos formatas',
'separator' => 'Datos skirtukas',
'dash' => 'Brūkšnelis (-)',
'dot' => 'Taškas (.)',
'comma' => 'Kablelis (,)',
'slash' => 'Pasvirasis brūkšnys (/)',
'space' => 'Tarpas ( )',
],
'timezone' => 'Laiko juosta',
'percent' => [
'title' => 'Procentų (%) Pozicija',
'before' => 'Prieš skaičių',
'after' => 'Po skaičiaus',
],
],
'invoice' => [
'tab' => 'Sąskaita faktūra',
'prefix' => 'Sąskaitos serija',
'digit' => 'Skaitmenų kiekis',
'next' => 'Sekantis numeris',
'logo' => 'Logotipas',
],
'default' => [
'tab' => 'Numatytieji',
'account' => 'Numatytoji įmonė',
'currency' => 'Numatytoji valiuta',
'tax' => 'Numatytasis mokesčių tarifas',
'payment' => 'Numatytasis mokėjimo būdas',
'language' => 'Numatytoji kalba',
],
'email' => [
'protocol' => 'Protokolas',
'php' => 'PHP Mail',
'smtp' => [
'name' => 'SMTP',
'host' => 'SMTP adresas',
'port' => 'SMTP portas',
'username' => 'SMTP prisijungimo vardas',
'password' => 'SMTP slaptažodis',
'encryption' => 'SMTP saugumas',
'none' => 'Joks',
],
'sendmail' => 'Sendmail',
'sendmail_path' => 'Sendmail kelias',
'log' => 'Prisijungti el. Paštu',
],
'scheduling' => [
'tab' => 'Planavimas',
'send_invoice' => 'Siųsti SF priminimą',
'invoice_days' => 'Siųsti pavėlavus',
'send_bill' => 'Siųsti sąskaitos priminimą',
'bill_days' => 'Siųsti prieš pavėlavimą',
'cron_command' => 'Cron komanda',
'schedule_time' => 'Paleisti valandą',
],
'appearance' => [
'tab' => 'Išvaizda',
'theme' => 'Tema',
'light' => 'Šviesi',
'dark' => 'Tamsi',
'list_limit' => 'Įrašų puslapyje',
'use_gravatar' => 'Naudoti Gravatar',
],
'system' => [
'tab' => 'Sistema',
'session' => [
'lifetime' => 'Sesijos galiojimo laikas (min)',
'handler' => 'Sesijos valdiklis',
'file' => 'Failas',
'database' => 'Duomenų bazė',
],
'file_size' => 'Maksimalus failo dydis (MB)',
'file_types' => 'Leidžiami failų tipai',
],
];

View File

@ -0,0 +1,8 @@
<?php
return [
'rate' => 'Kursas',
'rate_percent' => 'Kursas (%)',
];

View File

@ -0,0 +1,12 @@
<?php
return [
'from_account' => 'Iš Sąskaitos',
'to_account' => 'Į Sąskaitą',
'messages' => [
'delete' => 'Iš :from į :to (:amount)',
],
];

View File

@ -0,0 +1,15 @@
<?php
return [
'installed_version' => 'Versija',
'latest_version' => 'Naujausia versija',
'update' => 'Atnaujinti Akaunting į :version versiją',
'changelog' => 'Pakeitimų sąrašas',
'check' => 'Tikrinti',
'new_core' => 'Yra naujesnė Akaunting versija.',
'latest_core' => 'Sveikiname! Jūs turite naujausią Akaunting versiją. Tolimesni atnaujinimai bus įrašomi automatiškai.',
'success' => 'Atnaujinimas pavyko sėkmingai.',
'error' => 'Įvyko klaida atnaujinant, prašome bandyti dar kartą.',
];

View File

@ -0,0 +1,120 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'accepted' => 'Laukas :attribute turi būti priimta.',
'active_url' => 'Laukas :attribute nėra galiojantis internetinis adresas.',
'after' => 'Lauko :attribute reikšmė turi būti po :date datos.',
'after_or_equal' => ':Attribute privalo būti data lygi arba vėlesnė už :date.',
'alpha' => 'Laukas :attribute gali turėti tik raides.',
'alpha_dash' => 'Laukas :attribute gali turėti tik raides, skaičius ir brūkšnelius.',
'alpha_num' => 'Laukas :attribute gali turėti tik raides ir skaičius.',
'array' => 'Laukas :attribute turi būti masyvas.',
'before' => 'Laukas :attribute turi būti data prieš :date.',
'before_or_equal' => ':Attribute privalo būti data ankstenė arba lygi :date.',
'between' => [
'numeric' => 'Lauko :attribute reikšmė turi būti tarp :min ir :max.',
'file' => 'Failo dydis lauke :attribute turi būti tarp :min ir :max kilobaitų.',
'string' => 'Simbolių skaičius lauke :attribute turi būti tarp :min ir :max.',
'array' => 'Elementų skaičius lauke :attribute turi turėti nuo :min iki :max.',
],
'boolean' => 'Lauko reikšmė :attribute turi būti \'taip\' arba \'ne\'.',
'confirmed' => 'Lauko :attribute patvirtinimas nesutampa.',
'date' => 'Lauko :attribute reikšmė nėra galiojanti data.',
'date_format' => 'Lauko :attribute reikšmė neatitinka formato :format.',
'different' => 'Laukų :attribute ir :other reikšmės turi skirtis.',
'digits' => 'Laukas :attribute turi būti sudarytas iš :digits skaitmenų.',
'digits_between' => 'Laukas :attribute tuti turėti nuo :min iki :max skaitmenų.',
'dimensions' => 'Lauke :attribute įkeltas paveiksliukas neatitinka išmatavimų reikalavimo.',
'distinct' => 'Laukas :attribute pasikartoja.',
'email' => 'Lauko :attribute reikšmė turi būti galiojantis el. pašto adresas.',
'exists' => 'Pasirinkta negaliojanti :attribute reikšmė.',
'file' => ':Attribute privalo būti failas.',
'filled' => 'Laukas :attribute turi būti užpildytas.',
'image' => 'Lauko :attribute reikšmė turi būti paveikslėlis.',
'in' => 'Pasirinkta negaliojanti :attribute reikšmė.',
'in_array' => 'Laukas :attribute neegzistuoja :other lauke.',
'integer' => 'Lauko :attribute reikšmė turi būti veikasis skaičius.',
'ip' => 'Lauko :attribute reikšmė turi būti galiojantis IP adresas.',
'json' => 'Lauko :attribute reikšmė turi būti JSON tekstas.',
'max' => [
'numeric' => 'Lauko :attribute reikšmė negali būti didesnė nei :max.',
'file' => 'Failo dydis lauke :attribute reikšmė negali būti didesnė nei :max kilobaitų.',
'string' => 'Simbolių kiekis lauke :attribute reikšmė negali būti didesnė nei :max simbolių.',
'array' => 'Elementų kiekis lauke :attribute negali turėti daugiau nei :max elementų.',
],
'mimes' => 'Lauko reikšmė :attribute turi būti failas vieno iš sekančių tipų: :values.',
'mimetypes' => 'Lauko reikšmė :attribute turi būti failas vieno iš sekančių tipų: :values.',
'min' => [
'numeric' => 'Lauko :attribute reikšmė turi būti ne mažesnė nei :min.',
'file' => 'Failo dydis lauke :attribute turi būti ne mažesnis nei :min kilobaitų.',
'string' => 'Simbolių kiekis lauke :attribute turi būti ne mažiau nei :min.',
'array' => 'Elementų kiekis lauke :attribute turi būti ne mažiau nei :min.',
],
'not_in' => 'Pasirinkta negaliojanti reikšmė :attribute.',
'numeric' => 'Lauko :attribute reikšmė turi būti skaičius.',
'present' => 'Laukas :attribute turi egzistuoti.',
'regex' => 'Negaliojantis lauko :attribute formatas.',
'required' => 'Privaloma užpildyti lauką :attribute.',
'required_if' => 'Privaloma užpildyti lauką :attribute kai :other yra :value.',
'required_unless' => 'Laukas :attribute yra privalomas, nebent :other yra tarp :values reikšmių.',
'required_with' => 'Privaloma užpildyti lauką :attribute kai pateikta :values.',
'required_with_all' => 'Privaloma užpildyti lauką :attribute kai pateikta :values.',
'required_without' => 'Privaloma užpildyti lauką :attribute kai nepateikta :values.',
'required_without_all' => 'Privaloma užpildyti lauką :attribute kai nepateikta nei viena iš reikšmių :values.',
'same' => 'Laukai :attribute ir :other turi sutapti.',
'size' => [
'numeric' => 'Lauko :attribute reikšmė turi būti :size.',
'file' => 'Failo dydis lauke :attribute turi būti :size kilobaitai.',
'string' => 'Simbolių skaičius lauke :attribute turi būti :size.',
'array' => 'Elementų kiekis lauke :attribute turi būti :size.',
],
'string' => 'Laukas :attribute turi būti tekstinis.',
'timezone' => 'Lauko :attribute reikšmė turi būti galiojanti laiko zona.',
'unique' => 'Tokia :attribute reikšmė jau pasirinkta.',
'uploaded' => 'Nepavyko įkelti :attribute.',
'url' => 'Negaliojantis lauko :attribute formatas.',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => 'Pasirinktinis pranešimas',
],
'invalid_currency' => ':Attribute kodas neteisingas.',
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap attribute place-holders
| with something more reader friendly such as E-Mail Address instead
| of "email". This simply helps us make messages a little cleaner.
|
*/
'attributes' => [],
];

View File

@ -31,7 +31,7 @@
<table class="table table-striped table-hover" id="tbl-reconciliations">
<thead>
<tr>
<th class="col-md-2">@sortablelink('created_at', trans('general.create_date'))</th>
<th class="col-md-2">@sortablelink('created_at', trans('general.created_date'))</th>
<th class="col-md-3">@sortablelink('account_id', trans_choice('general.accounts', 1))</th>
<th class="col-md-3 hidden-xs">{{ trans('general.period') }}</th>
<th class="col-md-2 text-right amount-space">@sortablelink('closing_balance', trans('reconciliations.closing_balance'))</th>

View File

@ -0,0 +1,20 @@
<html lang="{{ setting('general.default_locale') }}">
@include('partials.wizard.head')
<body class="hold-transition {{ setting('general.admin_theme', 'skin-green-light') }} sidebar-mini fixed">
@stack('body_start')
<!-- Site wrapper -->
<div class="wrapper">
@include('partials.wizard.content')
</div>
@stack('body_end')
<script type="text/javascript">
$('#wizard-skip, .stepwizard .btn.btn-default').on('click', function() {
$('#wizard-loading').html('<span class="wizard-loading-bar"><span class="wizard-loading-spin"><i class="fa fa-spinner fa-spin"></i></span></span>');
});
</script>
</body>
</html>

View File

@ -0,0 +1,39 @@
@stack('content_start')
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper no-margin">
@stack('content_wrapper_start')
<!-- Content Header (Page header) -->
<section class="content-header content-center">
@stack('content_header_start')
<h1>
@yield('title')
@yield('new_button')
</h1>
@stack('content_header_end')
</section>
<!-- Main content -->
<section class="content content-center">
@include('flash::message')
@stack('content_content_start')
@yield('content')
@stack('content_content_end')
</section>
<!-- /.content -->
@stack('content_wrapper_end')
</div>
<!-- /.content-wrapper -->
<script type="text/javascript">
$('div.alert').not('.alert-important').delay(3000).fadeOut(350);
</script>
@stack('content_end')

View File

@ -0,0 +1,101 @@
<head>
@stack('head_start')
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<title>@yield('title') - @setting('general.company_name')</title>
<!-- Bootstrap 3.3.6 -->
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/css/bootstrap.min.css') }}">
<!-- Font Awesome -->
<link rel="stylesheet" href="{{ asset('public/css/font-awesome.min.css') }}">
<!-- Ionicons -->
<link rel="stylesheet" href="{{ asset('public/css/ionicons.min.css') }}">
<!-- Theme style -->
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/AdminLTE.min.css') }}">
<!-- AdminLTE Skins -->
@if (setting('general.admin_theme', 'skin-green-light') == 'skin-green-light')
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/skins/skin-green-light.min.css') }}">
@else
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/dist/css/skins/skin-black.min.css') }}">
<link rel="stylesheet" href="{{ asset('public/css/skin-black.css?v=' . version('short')) }}">
@endif
<!-- Select2 -->
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/select2/select2.min.css') }}">
<!-- App style -->
<link rel="stylesheet" href="{{ asset('public/css/app.css?v=' . version('short')) }}">
<link rel="stylesheet" href="{{ asset('public/css/akaunting-green.css?v=' . version('short')) }}">
<link rel="shortcut icon" href="{{ asset('public/img/favicon.ico') }}">
@stack('css')
@stack('stylesheet')
<style type="text/css">
.wizard-loading-bar {
font-size: 35px;
position: absolute;
z-index: 999999;
width: 100%;
height: 100%;
background: rgb(136, 136, 136);
opacity: 0.2;
-moz-border-radius-bottomleft: 1px;
-moz-border-radius-bottomright: 1px;
border-bottom-left-radius: 1px;
border-bottom-right-radius: 1px;font-size: 35px;
position: absolute;
z-index: 999999;
width: 100%;
height: 100%;
background: rgb(136, 136, 136);
opacity: 0.2;
-moz-border-radius-bottomleft: 1px;
-moz-border-radius-bottomright: 1px;
border-bottom-left-radius: 1px;
border-bottom-right-radius: 1px;
}
.wizard-loading-spin {
font-size: 100px;
position: absolute;
margin: auto;
color: #fff;
padding: 8% 40%;
z-index: 9999;
}
</style>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- jQuery 2.2.3 -->
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/jQuery/jquery-2.2.3.min.js') }}"></script>
<!-- Bootstrap 3.3.6 -->
<script src="{{ asset('vendor/almasaeed2010/adminlte/bootstrap/js/bootstrap.min.js') }}"></script>
<!-- SlimScroll -->
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/slimScroll/jquery.slimscroll.min.js') }}"></script>
<!-- FastClick -->
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/fastclick/fastclick.js') }}"></script>
<!-- AdminLTE App -->
<script src="{{ asset('vendor/almasaeed2010/adminlte/dist/js/app.min.js') }}"></script>
<!-- Select2 -->
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/select2/select2.min.js') }}"></script>
<!-- Mask Money -->
<script src="{{ asset('public/js/jquery/jquery.maskMoney.js') }}"></script>
<script src="{{ asset('public/js/app.js?v=' . version('short')) }}"></script>
@stack('js')
@stack('scripts')
@stack('head_end')
</head>

View File

@ -0,0 +1,16 @@
@stack('pagination_start')
@if ($items->firstItem())
<div class="pull-left" style="margin-top: 7px;">
<small>{{ trans('pagination.showing', ['first' => $items->firstItem(), 'last' => $items->lastItem(), 'total' => $items->total(), 'type' => strtolower(trans_choice('general.' . $type, 2))]) }}</small>
</div>
<div class="pull-right">
{!! $items->appends(request()->except('page'))->links() !!}
</div>
@else
<div class="pull-left">
<small>{{ trans('general.no_records') }}</small>
</div>
@endif
@stack('pagination_end')

View File

@ -39,6 +39,8 @@
{{ Form::textareaGroup('company_address', trans('settings.company.address')) }}
{{ Form::fileGroup('company_logo', trans('settings.company.logo')) }}
{!! Form::hidden('wizard', null, ['id' => 'wizard']) !!}
</div>
<div class="tab-pane tab-margin" id="localisation">

View File

@ -0,0 +1,131 @@
@extends('layouts.wizard')
@section('title', trans('general.wizard'))
@section('content')
<!-- Default box -->
<div class="box box-solid">
<div class="box-body">
<div class="stepwizard">
<div class="stepwizard-row setup-panel">
<div class="stepwizard-step col-xs-3">
<a href="#step-1" type="button" class="btn btn-success btn-circle">1</a>
<p><small>{{ trans_choice('general.companies', 1) }}</small></p>
</div>
<div class="stepwizard-step col-xs-3">
<button type="button" class="btn btn-default btn-circle" disabled="disabled">2</button>
<p><small>{{ trans_choice('general.currencies', 2) }}</small></p>
</div>
<div class="stepwizard-step col-xs-3">
<button type="button" class="btn btn-default btn-circle" disabled="disabled">3</button>
<p><small>{{ trans_choice('general.taxes', 2) }}</small></p>
</div>
<div class="stepwizard-step col-xs-3">
<button type="button" class="btn btn-default btn-circle" disabled="disabled">4</button>
<p><small>{{ trans_choice('general.finish', 1) }}</small></p>
</div>
</div>
</div>
</div>
</div>
<div class="box box-success">
<div id="wizard-loading"></div>
{!! Form::model($company, ['method' => 'PATCH', 'files' => true, 'url' => ['wizard/companies'], 'role' => 'form', 'class' => 'form-loading-button']) !!}
<div class="box-header with-border">
<h3 class="box-title">{{ trans_choice('general.companies', 1) }}</h3>
</div>
<!-- /.box-header -->
<div class="box-body">
<div class="col-md-12 {!! (!setting('general.api_token', null)) ?: 'hidden' !!}">
<div class="form-group required {{ $errors->has('api_token') ? 'has-error' : ''}}">
{!! Form::label('sale_price', trans('modules.api_token'), ['class' => 'control-label']) !!}
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-key"></i></span>
{!! Form::text('api_token', setting('general.api_token', null), ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.enter', ['field' => trans('modules.api_token')])]) !!}
</div>
{!! $errors->first('api_token', '<p class="help-block">:message</p>') !!}
</div>
<p>
{!! trans('modules.token_link') !!}
</p>
</br>
</div>
{{ Form::textGroup('company_tax_number', trans('general.tax_number'), 'percent', []) }}
{{ Form::textGroup('company_phone', trans('settings.company.phone'), 'phone', []) }}
{{ Form::textareaGroup('company_address', trans('settings.company.address')) }}
{{ Form::fileGroup('company_logo', trans('settings.company.logo')) }}
</div>
<!-- /.box-body -->
<div class="box-footer">
<div class="col-md-12">
<div class="form-group no-margin">
{!! Form::button('<span class="fa fa-save"></span> &nbsp;' . trans('general.save'), ['type' => 'submit', 'class' => 'btn btn-success button-submit', 'data-loading-text' => trans('general.loading')]) !!}
<a href="{{ url('wizard/currencies') }}" id="wizard-skip" class="btn btn-default"><span class="fa fa-share"></span> &nbsp;{{ trans('general.skip') }}</a>
</div>
</div>
</div>
<!-- /.box-footer -->
{!! Form::close() !!}
</div>
@endsection
@push('js')
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
@endpush
@push('css')
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
@endpush
@push('scripts')
<script type="text/javascript">
var text_yes = '{{ trans('general.yes') }}';
var text_no = '{{ trans('general.no') }}';
$(document).ready(function() {
$('#company_logo').fancyfile({
text : '{{ trans('general.form.select.file') }}',
style : 'btn-default',
@if($company->company_logo)
placeholder : '{{ $company->company_logo->basename }}',
@else
placeholder : '{{ trans('general.form.no_file_selected') }}',
@endif
});
@if($company->company_logo)
company_logo_html = '<span class="company_logo">';
company_logo_html += ' <a href="{{ url('uploads/' . $company->company_logo->id . '/download') }}">';
company_logo_html += ' <span id="download-company_logo" class="text-primary">';
company_logo_html += ' <i class="fa fa-file-{{ $company->company_logo->aggregate_type }}-o"></i> {{ $company->company_logo->basename }}';
company_logo_html += ' </span>';
company_logo_html += ' </a>';
company_logo_html += ' {!! Form::open(['id' => 'company_logo-' . $company->company_logo->id, 'method' => 'DELETE', 'url' => [url('uploads/' . $company->company_logo->id)], 'style' => 'display:inline']) !!}';
company_logo_html += ' <a id="remove-company_logo" href="javascript:void();">';
company_logo_html += ' <span class="text-danger"><i class="fa fa fa-times"></i></span>';
company_logo_html += ' </a>';
company_logo_html += ' <input type="hidden" name="page" value="setting" />';
company_logo_html += ' <input type="hidden" name="key" value="general.company_logo" />';
company_logo_html += ' <input type="hidden" name="value" value="{{ $company->company_logo->id }}" />';
company_logo_html += ' {!! Form::close() !!}';
company_logo_html += '</span>';
$('.form-group.col-md-6 .fancy-file .fake-file').append(company_logo_html);
$(document).on('click', '#remove-company_logo', function (e) {
confirmDelete("#company_logo-{!! $company->company_logo->id !!}", "{!! trans('general.attachment') !!}", "{!! trans('general.delete_confirm', ['name' => '<strong>' . $company->company_logo->basename . '</strong>', 'type' => strtolower(trans('general.attachment'))]) !!}", "{!! trans('general.cancel') !!}", "{!! trans('general.delete') !!}");
});
@endif
});
</script>
@endpush

View File

@ -0,0 +1,30 @@
<tr id="currency-create">
<td>
{{ Form::textGroup('name', trans('general.name'), 'id-card-o', ['required' => 'required'], null, '') }}
</td>
<td class="hidden-xs">
{{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes, null, ['required' => 'required'], '') }}
</td>
<td>
{{ Form::textGroup('rate', trans('currencies.rate'), 'money', ['required' => 'required'], null, '') }}
</td>
<td class="hidden-xs">
{{ Form::radioGroup('enabled', trans('general.enabled'), trans('general.yes'), trans('general.no'), [], 'col-md-12 currency-enabled-radio-group') }}
</td>
<td class="text-center">
{!! Form::button('<span class="fa fa-save"></span>', ['type' => 'button', 'class' => 'btn btn-success currency-submit', 'data-loading-text' => trans('general.loading'), 'data-href' => url('wizard/currencies/'), 'style' => 'padding: 9px 14px; margin-top: 10px;']) !!}
</td>
<td class="hidden">
{{ Form::numberGroup('precision', trans('currencies.precision'), 'bullseye') }}
{{ Form::textGroup('symbol', trans('currencies.symbol.symbol'), 'font') }}
{{ Form::selectGroup('symbol_first', trans('currencies.symbol.position'), 'text-width', ['1' => trans('currencies.symbol.before'), '0' => trans('currencies.symbol.after')]) }}
{{ Form::textGroup('decimal_mark', trans('currencies.decimal_mark'), 'columns') }}
{{ Form::textGroup('thousands_separator', trans('currencies.thousands_separator'), 'columns', []) }}
{{ Form::radioGroup('default_currency', trans('currencies.default')) }}
</td>
</tr>

View File

@ -0,0 +1,32 @@
<tr id="currency-edit">
<td>
{{ Form::textGroup('name', trans('general.name'), 'id-card-o', [], $item->name, '') }}
</td>
<td class="hidden-xs">
{{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes, $item->code, [], '') }}
</td>
<td>
{{ Form::textGroup('rate', trans('currencies.rate'), 'money', [], $item->rate, '') }}
</td>
<td class="hidden-xs">
{{ Form::radioGroup('enabled', trans('general.enabled'), trans('general.yes'), trans('general.no'), [], 'col-md-12') }}
</td>
<td class="text-center">
{!! Form::button('<span class="fa fa-save"></span>', ['type' => 'button', 'class' => 'btn btn-success currency-updated', 'data-loading-text' => trans('general.loading'), 'data-href' => url('wizard/currencies/' . $item->id), 'style' => 'padding: 9px 14px; margin-top: 10px;']) !!}
</td>
<td class="hidden">
{{ Form::numberGroup('precision', trans('currencies.precision'), 'bullseye', [], $item->precision) }}
{{ Form::textGroup('symbol', trans('currencies.symbol.symbol'), 'font', [], $item->symbol, '') }}
{{ Form::selectGroup('symbol_first', trans('currencies.symbol.position'), 'text-width', ['1' => trans('currencies.symbol.before'), '0' => trans('currencies.symbol.after')], $item->symbol_first) }}
{{ Form::textGroup('decimal_mark', trans('currencies.decimal_mark'), 'columns', [], $item->decimal_mark, '') }}
{{ Form::textGroup('thousands_separator', trans('currencies.thousands_separator'), 'columns', [], $item->thousands_separator) }}
{{ Form::radioGroup('default_currency', trans('currencies.default')) }}
{{ Form::hidden('id', $item->id) }}
</td>
</tr>

View File

@ -0,0 +1,379 @@
@extends('layouts.wizard')
@section('title', trans('general.wizard'))
@section('content')
<!-- Default box -->
<div class="box box-solid">
<div class="box-body">
<div class="stepwizard">
<div class="stepwizard-row setup-panel">
<div class="stepwizard-step col-xs-3">
<a href="{{ url('wizard/companies') }}" type="button" class="btn btn-default btn-circle">1</a>
<p><small>{{ trans_choice('general.companies', 1) }}</small></p>
</div>
<div class="stepwizard-step col-xs-3">
<a href="#step-2" type="button" class="btn btn-success btn-circle">2</a>
<p><small>{{ trans_choice('general.currencies', 2) }}</small></p>
</div>
<div class="stepwizard-step col-xs-3">
<button type="button" class="btn btn-default btn-circle" disabled="disabled">3</button>
<p><small>{{ trans_choice('general.taxes', 2) }}</small></p>
</div>
<div class="stepwizard-step col-xs-3">
<button type="button" class="btn btn-default btn-circle" disabled="disabled">4</button>
<p><small>{{ trans_choice('general.finish', 1) }}</small></p>
</div>
</div>
</div>
</div>
</div>
<div class="box box-success">
<div id="wizard-loading"></div>
<div class="box-header with-border">
<h3 class="box-title">{{ trans_choice('general.currencies', 2) }}</h3>
<span class="new-button"><a href="javascript:void(0);" data-href="{{ url('wizard/currencies/create') }}" class="btn btn-success btn-sm currency-create"><span class="fa fa-plus"></span> &nbsp;{{ trans('general.add_new') }}</a></span>
</div>
<!-- /.box-header -->
<div class="box-body">
<div class="table table-responsive">
<table class="table table-striped table-hover" id="tbl-currencies">
<thead>
<tr>
<th class="col-md-4">@sortablelink('name', trans('general.name'))</th>
<th class="col-md-3 hidden-xs">@sortablelink('code', trans('currencies.code'))</th>
<th class="col-md-2">@sortablelink('rate', trans('currencies.rate'))</th>
<th class="col-md-2 hidden-xs">@sortablelink('enabled', trans_choice('general.statuses', 1))</th>
<th class="col-md-1 text-center">{{ trans('general.actions') }}</th>
</tr>
</thead>
<tbody>
@foreach($currencies as $item)
<tr id="currency-{{ $item->id }}" data-href="{{ url('wizard/currencies/' . $item->id . '/delete') }}">
<td class="currency-name"><a href="javascript:void(0);" data-id="{{ $item->id }}" data-href="{{ url('wizard/currencies/' . $item->id . '/edit') }}" class="currency-edit">{{ $item->name }}</a></td>
<td class="currency-code hidden-xs">{{ $item->code }}</td>
<td class="currency-rate">{{ $item->rate }}</td>
<td class="currency-status hidden-xs">
@if ($item->enabled)
<span class="label label-success">{{ trans('general.enabled') }}</span>
@else
<span class="label label-danger">{{ trans('general.disabled') }}</span>
@endif
</td>
<td class="currency-action text-center">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" data-toggle-position="left" aria-expanded="false">
<i class="fa fa-ellipsis-h"></i>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="javascript:void(0);" data-id="{{ $item->id }}" data-href="{{ url('wizard/currencies/' . $item->id . '/edit') }}" class="currency-edit">{{ trans('general.edit') }}</a></li>
@if ($item->enabled)
<li><a href="javascript:void(0);" data-href="{{ url('wizard/currencies/' . $item->id . '/disable') }}" class="currency-disable">{{ trans('general.disable') }}</a></li>
@else
<li><a href="javascript:void(0);" data-href="{{ url('wizard/currencies/' . $item->id . '/enable') }}" class="currency-enable">{{ trans('general.enable') }}</a></li>
@endif
@permission('delete-settings-currencies')
<li class="divider"></li>
<li>
{!! Form::button(trans('general.delete'), array(
'type' => 'button',
'class' => 'delete-link',
'title' => trans('general.delete'),
'onclick' => 'confirmCurrency("' . '#currency-' . $item->id . '", "' . trans_choice('general.currencies', 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . $item->name . '</strong>', 'type' => mb_strtolower(trans_choice('general.currencies', 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
)) !!}
</li>
@endpermission
</ul>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<!-- /.box-body -->
<div class="box-footer">
<div class="col-md-12">
<div class="form-group no-margin">
<a href="{{ url('wizard/taxes') }}" id="wizard-skip" class="btn btn-default"><span class="fa fa-share"></span> &nbsp;{{ trans('general.skip') }}</a>
</div>
</div>
</div>
<!-- /.box-footer -->
</div>
@endsection
@push('scripts')
<script type="text/javascript">
var text_yes = '{{ trans('general.yes') }}';
var text_no = '{{ trans('general.no') }}';
$(document).on('click', '.currency-create', function (e) {
$('#currency-create').remove();
$('#currency-edit').remove();
data_href = $(this).data('href');
$.ajax({
url: data_href,
type: 'GET',
dataType: 'JSON',
success: function(json) {
if (json['success']) {
$('#tbl-currencies tbody').append(json['html']);
$("#code").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans('currencies.code')]) }}"
});
$('.currency-enabled-radio-group #enabled_1').trigger('click');
$('#name').focus();
}
}
});
});
$(document).on('click', '.currency-submit', function (e) {
$(this).html('<span class="fa fa-spinner fa-pulse"></span>');
$('.help-block').remove();
data_href = $(this).data('href');
$.ajax({
url: '{{ url("wizard/currencies") }}',
type: 'POST',
dataType: 'JSON',
data: $('#tbl-currencies input[type=\'number\'], #tbl-currencies input[type=\'text\'], #tbl-currencies input[type=\'radio\'], #tbl-currencies input[type=\'hidden\'], #tbl-currencies textarea, #tbl-currencies select').serialize(),
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
success: function(json) {
$('.currency-submit').html('<span class="fa fa-save"></span>');
if (json['success']) {
currency = json['data'];
$('#currency-create').remove();
$('#currency-edit').remove();
html = '<tr id="currency-' + currency.id + '" data-href="wizard/currencies/' + currency.id + '/delete">';
html += ' <td class="currency-name">';
html += ' <a href="javascript:void(0);" data-id="' + currency.id + '" data-href="wizard/currencies/' + currency.id + '/edit" class="currency-edit">' + currency.name + '</a>';
html += ' </td>';
html += ' <td class="currency-code hidden-xs">' + currency.code + '</td>';
html += ' <td class="currency-rate">' + currency.rate + '</td>';
html += ' <td class="currency-status hidden-xs">';
html += ' <span class="label label-success">Enabled</span>';
html += ' </td>';
html += ' <td class="currency-action text-center">';
html += ' <div class="btn-group">';
html += ' <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" data-toggle-position="left" aria-expanded="false">';
html += ' <i class="fa fa-ellipsis-h"></i>';
html += ' </button>';
html += ' <ul class="dropdown-menu dropdown-menu-right">';
html += ' <li><a href="javascript:void(0);" data-id="' + currency.id + '" data-href="wizard/currencies/' + currency.id + '/edit" class="currency-edit">{{ trans('general.edit') }}</a></li>';
html += ' <li><a href="javascript:void(0);" data-href="wizard/currencies/' + currency.id + '/disable" class="currency-disable">{{ trans('general.disable') }}</a></li>';
html += ' <li class="divider"></li>';
html += ' <li>';
html += ' <button type="button" class="delete-link" title="{{ trans('general.delete') }}" onclick="confirmCurrency("#currency-' + currency.id + '", "{{ trans_choice('general.currencies', 2) }}", "{{ trans('general.delete_confirm', ['name' => '<strong>' . $item->name . '</strong>', 'type' => mb_strtolower(trans_choice('general.currencies', 1))]) }}", "{{ trans('general.cancel') }}", "{{ trans('general.delete') }}")">{{ trans('general.delete') }}</button>';
html += ' </li>';
html += ' </ul>';
html += ' </div>';
html += ' </td>';
html += '</tr>';
$('#tbl-currencies tbody').append(html);
}
},
error: function(data){
$('.currency-submit').html('<span class="fa fa-save"></span>');
var errors = data.responseJSON;
if (typeof errors !== 'undefined') {
if (errors.name) {
$('#tbl-currencies #name').parent().after('<p class="help-block" style="color: #ca1313;">' + errors.name + '</p>');
}
if (errors.code) {
$('#tbl-currencies #code').parent().after('<p class="help-block" style="color: #ca1313;">' + errors.code + '</p>');
}
if (errors.rate) {
$('#tbl-currencies #rate').parent().after('<p class="help-block" style="color: #ca1313;">' + errors.rate + '</p>');
}
}
}
});
});
$(document).on('click', '.currency-edit', function (e) {
$('#currency-create').remove();
$('#currency-edit').remove();
data_href = $(this).data('href');
data_id = $(this).data('id');
$.ajax({
url: data_href,
type: 'GET',
dataType: 'JSON',
success: function(json) {
if (json['success']) {
$('#currency-' + data_id).after(json['html']);
$("#code").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans('currencies.code')]) }}"
});
$('.currency-enabled-radio-group #enabled_1').trigger();
}
}
});
});
$(document).on('click', '.currency-updated', function (e) {
$(this).html('<span class="fa fa-spinner fa-pulse"></span>');
$('.help-block').remove();
data_href = $(this).data('href');
$.ajax({
url: data_href,
type: 'PATCH',
dataType: 'JSON',
data: $('#tbl-currencies input[type=\'number\'], #tbl-currencies input[type=\'text\'], #tbl-currencies input[type=\'radio\'], #tbl-currencies input[type=\'hidden\'], #tbl-currencies textarea, #tbl-currencies select').serialize(),
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
success: function(json) {
$('.currency-updated').html('<span class="fa fa-save"></span>');
if (json['success']) {
$('#currency-create').remove();
$('#currency-edit').remove();
}
},
error: function(data){
$('.currency-updated').html('<span class="fa fa-save"></span>');
var errors = data.responseJSON;
if (typeof errors !== 'undefined') {
if (errors.name) {
$('#tbl-currencies #name').parent().after('<p class="help-block" style="color: #ca1313;">' + errors.name + '</p>');
}
if (errors.code) {
$('#tbl-currencies #code').parent().after('<p class="help-block" style="color: #ca1313;">' + errors.code + '</p>');
}
if (errors.rate) {
$('#tbl-currencies #rate').parent().after('<p class="help-block" style="color: #ca1313;">' + errors.rate + '</p>');
}
}
}
});
});
$(document).on('click', '.currency-disable', function (e) {
data_href = $(this).data('href');
currency_tr = $(this).parent().parent().parent().parent().parent();
$.ajax({
url: data_href,
type: 'GET',
dataType: 'JSON',
success: function(json) {
if (json['success']) {
currency_tr.find('.currency-status').html('<span class="label label-danger">{{ trans('general.disabled') }}</span>');
}
}
});
});
$(document).on('click', '.currency-enable', function (e) {
data_href = $(this).data('href');
currency_tr = $(this).parent().parent().parent().parent().parent();
$.ajax({
url: data_href,
type: 'GET',
dataType: 'JSON',
success: function(json) {
if (json['success']) {
currency_tr.find('.currency-status').html('<span class="label label-success">{{ trans('general.enabled') }}</span>');
}
}
});
});
$(document).on('change', '#code', function (e) {
$.ajax({
url: '{{ url("settings/currencies/config") }}',
type: 'GET',
dataType: 'JSON',
data: 'code=' + $(this).val(),
success: function(data) {
$('#precision').val(data.precision);
$('#symbol').val(data.symbol);
$('#symbol_first').val(data.symbol_first);
$('#decimal_mark').val(data.decimal_mark);
$('#thousands_separator').val(data.thousands_separator);
// This event Select2 Stylesheet
$('#symbol_first').trigger('change');
}
});
});
function confirmCurrency(tr_id, title, message, button_cancel, button_delete) {
$('#confirm-modal').remove();
var html = '';
html += '<div class="modal fade" id="confirm-modal" tabindex="-1" role="dialog" aria-labelledby="confirmModalLabel" aria-hidden="true">';
html += ' <div class="modal-dialog">';
html += ' <div class="modal-content">';
html += ' <div class="modal-header">';
html += ' <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>';
html += ' <h4 class="modal-title" id="confirmModalLabel">' + title + '</h4>';
html += ' </div>';
html += ' <div class="modal-body">';
html += ' <p>' + message + '</p>';
html += ' <p></p>';
html += ' </div>';
html += ' <div class="modal-footer">';
html += ' <div class="pull-left">';
html += ' <button type="button" class="btn btn-danger" onclick="deleteCurrency(\'' + tr_id + '\');">' + button_delete + '</button>';
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">' + button_cancel + '</button>';
html += ' </div>';
html += ' </div>';
html += ' </div>';
html += ' </div>';
html += '</div>';
$('body').append(html);
$('#confirm-modal').modal('show');
}
function deleteCurrency(tr_id) {
data_href = $(tr_id).data('href');
$.ajax({
url: data_href,
type: 'GET',
dataType: 'JSON',
success: function(json) {
if (json['success']) {
$(tr_id).remove();
}
}
});
}
</script>
@endpush

View File

@ -0,0 +1,88 @@
@extends('layouts.wizard')
@section('title', trans('general.wizard'))
@section('content')
<!-- Default box -->
<div class="box box-solid">
<div class="box-body">
<div class="stepwizard">
<div class="stepwizard-row setup-panel">
<div class="stepwizard-step col-xs-3">
<a href="{{ url('wizard/companies') }}" type="button" class="btn btn-default btn-circle">1</a>
<p><small>{{ trans_choice('general.companies', 1) }}</small></p>
</div>
<div class="stepwizard-step col-xs-3">
<a href="{{ url('wizard/currencies') }}" type="button" class="btn btn-default btn-circle">2</a>
<p><small>{{ trans_choice('general.currencies', 2) }}</small></p>
</div>
<div class="stepwizard-step col-xs-3">
<a href="{{ url('wizard/taxes') }}" type="button" class="btn btn-default btn-circle">3</a>
<p><small>{{ trans_choice('general.taxes', 2) }}</small></p>
</div>
<div class="stepwizard-step col-xs-3">
<a href="#step-4" type="button" class="btn btn-success btn-circle">4</a>
<p><small>{{ trans_choice('general.finish', 1) }}</small></p>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="margin-top: 50px;">
<div class="col-md-12 no-padding-right text-center">
<a href="{{ url('/') }}" class="btn btn-lg btn-success"><span class="fa fa-dashboard"></span> &nbsp;{{ trans('general.go_to', ['name' => trans('general.dashboard')]) }}</a>
</div>
</div>
<div class="row">
<div class="col-md-12 no-padding-right">
<div class="content-header no-padding-left">
<h3>{{ trans('modules.recommended_apps') }}</h3>
</div>
@if ($modules)
@foreach ($modules->data as $module)
@include('partials.modules.item')
@endforeach
<div class="col-md-12 no-padding-left">
<ul class="pager nomargin">
@if ($modules->current_page < $modules->last_page)
<li class="next"><a href="{{ url(request()->path()) }}?page={{ $modules->current_page + 1 }}" class="btn btn-default btn-sm">{{ trans('pagination.next') }}</a></li>
@endif
@if ($modules->current_page > 1)
<li class="previous"><a href="{{ url(request()->path()) }}?page={{ $modules->current_page - 1 }}" class="btn btn-default btn-sm">{{ trans('pagination.previous') }}</a></li>
@endif
</ul>
</div>
@else
<div class="box box-success">
<div class="box-body">
<p class="col-md-12" style="margin-top: 15px">
{{ trans('modules.no_apps') }}
</p>
<p class="col-md-12" style="margin-top: 20px">
<small>{!! trans('modules.developer') !!}</small>
</p>
</div>
<!-- /.box-body -->
</div>
@endif
</div>
</div>
@endsection
@push('css')
<link rel="stylesheet" href="{{ asset('public/css/modules.css?v=' . version('short')) }}">
@endpush
@push('scripts')
<script type="text/javascript">
var text_yes = '{{ trans('general.yes') }}';
var text_no = '{{ trans('general.no') }}';
$(document).ready(function() {
});
</script>
@endpush

View File

@ -0,0 +1,14 @@
<tr id="tax-create">
<td>
{{ Form::textGroup('name', trans('general.name'), 'id-card-o', ['required' => 'required'], null, '') }}
</td>
<td>
{{ Form::textGroup('rate', trans('currencies.rate'), 'money', ['required' => 'required'], null, '') }}
</td>
<td class="hidden-xs">
{{ Form::radioGroup('enabled', trans('general.enabled'), trans('general.yes'), trans('general.no'), [], 'col-md-12 tax-enabled-radio-group') }}
</td>
<td class="text-center">
{!! Form::button('<span class="fa fa-save"></span>', ['type' => 'button', 'class' => 'btn btn-success tax-submit', 'data-loading-text' => trans('general.loading'), 'data-href' => url('wizard/taxes'), 'style' => 'padding: 9px 14px; margin-top: 10px;']) !!}
</td>
</tr>

View File

@ -0,0 +1,14 @@
<tr id="tax-edit">
<td>
{{ Form::textGroup('name', trans('general.name'), 'id-card-o', ['required' => 'required'], $item->name, '') }}
</td>
<td>
{{ Form::textGroup('rate', trans('currencies.rate'), 'money', ['required' => 'required'], $item->rate, '') }}
</td>
<td class="hidden-xs">
{{ Form::radioGroup('enabled', trans('general.enabled'), trans('general.yes'), trans('general.no'), [], 'col-md-12') }}
</td>
<td class="text-center">
{!! Form::button('<span class="fa fa-save"></span>', ['type' => 'button', 'class' => 'btn btn-success tax-updated', 'data-loading-text' => trans('general.loading'), 'data-href' => url('wizard/taxes/' . $item->id), 'style' => 'padding: 9px 14px; margin-top: 10px;']) !!}
</td>
</tr>

View File

@ -0,0 +1,377 @@
@extends('layouts.wizard')
@section('title', trans('general.wizard'))
@section('content')
<!-- Default box -->
<div class="box box-solid">
<div class="box-body">
<div class="stepwizard">
<div class="stepwizard-row setup-panel">
<div class="stepwizard-step col-xs-3">
<a href="{{ url('wizard/companies') }}" type="button" class="btn btn-default btn-circle">1</a>
<p><small>{{ trans_choice('general.companies', 1) }}</small></p>
</div>
<div class="stepwizard-step col-xs-3">
<a href="{{ url('wizard/currencies') }}" type="button" class="btn btn-default btn-circle">2</a>
<p><small>{{ trans_choice('general.currencies', 2) }}</small></p>
</div>
<div class="stepwizard-step col-xs-3">
<a href="#step-3" type="button" class="btn btn-success btn-circle">3</a>
<p><small>{{ trans_choice('general.taxes', 2) }}</small></p>
</div>
<div class="stepwizard-step col-xs-3">
<button type="button" class="btn btn-default btn-circle" disabled="disabled">4</button>
<p><small>{{ trans_choice('general.finish', 1) }}</small></p>
</div>
</div>
</div>
</div>
</div>
<div class="box box-success">
<div id="wizard-loading"></div>
<div class="box-header with-border">
<h3 class="box-title">{{ trans_choice('general.taxes', 2) }}</h3>
<span class="new-button"><a href="javascript:void(0);" data-href="{{ url('wizard/taxes/create') }}" class="btn btn-success btn-sm tax-create"><span class="fa fa-plus"></span> &nbsp;{{ trans('general.add_new') }}</a></span>
</div>
<!-- /.box-header -->
<div class="box-body">
<div class="table table-responsive">
<table class="table table-striped table-hover" id="tbl-taxes">
<thead>
<tr>
<th class="col-md-5">@sortablelink('name', trans('general.name'))</th>
<th class="col-md-4">@sortablelink('rate', trans('taxes.rate_percent'))</th>
<th class="col-md-2 hidden-xs">@sortablelink('enabled', trans_choice('general.statuses', 1))</th>
<th class="col-md-1 text-center">{{ trans('general.actions') }}</th>
</tr>
</thead>
<tbody>
@foreach($taxes as $item)
<tr id="tax-{{ $item->id }}" data-href="{{ url('wizard/taxes/' . $item->id . '/delete') }}">
<td class="tax-name"><a href="javascript:void(0);" data-id="{{ $item->id }}" data-href="{{ url('wizard/taxes/' . $item->id . '/edit') }}" class="tax-edit">{{ $item->name }}</a></td>
<td class="tax-rate">{{ $item->rate }}</td>
<td class="tax-status hidden-xs">
@if ($item->enabled)
<span class="label label-success">{{ trans('general.enabled') }}</span>
@else
<span class="label label-danger">{{ trans('general.disabled') }}</span>
@endif
</td>
<td class="tax-action text-center">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" data-toggle-position="left" aria-expanded="false">
<i class="fa fa-ellipsis-h"></i>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<li><a href="javascript:void(0);" data-href="{{ url('wizard/taxes/' . $item->id . '/edit') }}" class="tax-edit">{{ trans('general.edit') }}</a></li>
@if ($item->enabled)
<li><a href="javascript:void(0);" data-href="{{ url('wizard/taxes/' . $item->id . '/disable') }}" class="tax-disable">{{ trans('general.disable') }}</a></li>
@else
<li><a href="javascript:void(0);" data-href="{{ url('wizard/taxes/' . $item->id . '/enable') }}" class="tax-enable">{{ trans('general.enable') }}</a></li>
@endif
@permission('delete-settings-taxes')
<li class="divider"></li>
<li>
{!! Form::button(trans('general.delete'), array(
'type' => 'button',
'class' => 'delete-link',
'title' => trans('general.delete'),
'onclick' => 'confirmTax("' . '#tax-' . $item->id . '", "' . trans_choice('general.taxes', 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . $item->name . '</strong>', 'type' => mb_strtolower(trans_choice('general.taxes', 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
)) !!}
</li>
@endpermission
</ul>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<!-- /.box-body -->
<div class="box-footer">
<div class="col-md-12">
<div class="form-group no-margin">
<a href="{{ url('wizard/finish') }}" id="wizard-skip" class="btn btn-default"><span class="fa fa-share"></span> &nbsp;{{ trans('general.skip') }}</a>
</div>
</div>
</div>
<!-- /.box-footer -->
</div>
@endsection
@push('scripts')
<script type="text/javascript">
var text_yes = '{{ trans('general.yes') }}';
var text_no = '{{ trans('general.no') }}';
$(document).on('click', '.tax-create', function (e) {
$('#tax-create').remove();
$('#tax-edit').remove();
data_href = $(this).data('href');
$.ajax({
url: data_href,
type: 'GET',
dataType: 'JSON',
success: function(json) {
if (json['success']) {
$('#tbl-taxes tbody').append(json['html']);
$("#code").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans('taxes.code')]) }}"
});
$('.tax-enabled-radio-group #enabled_1').trigger('click');
$('#name').focus();
}
}
});
});
$(document).on('click', '.tax-submit', function (e) {
$(this).html('<span class="fa fa-spinner fa-pulse"></span>');
$('.help-block').remove();
data_href = $(this).data('href');
$.ajax({
url: '{{ url("wizard/taxes") }}',
type: 'POST',
dataType: 'JSON',
data: $('#tbl-taxes input[type=\'number\'], #tbl-taxes input[type=\'text\'], #tbl-taxes input[type=\'radio\'], #tbl-taxes input[type=\'hidden\'], #tbl-taxes textarea, #tbl-taxes select').serialize(),
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
success: function(json) {
$('.tax-submit').html('<span class="fa fa-save"></span>');
if (json['success']) {
tax = json['data'];
$('#tax-create').remove();
$('#tax-edit').remove();
html = '<tr id="tax-' + tax.id + '" data-href="wizard/taxes/' + tax.id + '/delete">';
html += ' <td class="tax-name">';
html += ' <a href="javascript:void(0);" data-id="' + tax.id + '" data-href="wizard/taxes/' + tax.id + '/edit" class="tax-edit">' + tax.name + '</a>';
html += ' </td>';
html += ' <td class="tax-rate">' + tax.rate + '</td>';
html += ' <td class="tax-status hidden-xs">';
html += ' <span class="label label-success">Enabled</span>';
html += ' </td>';
html += ' <td class="tax-action text-center">';
html += ' <div class="btn-group">';
html += ' <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" data-toggle-position="left" aria-expanded="false">';
html += ' <i class="fa fa-ellipsis-h"></i>';
html += ' </button>';
html += ' <ul class="dropdown-menu dropdown-menu-right">';
html += ' <li><a href="javascript:void(0);" data-id="' + tax.id + '" data-href="wizard/taxes/' + tax.id + '/edit" class="tax-edit">{{ trans('general.edit') }}</a></li>';
html += ' <li><a href="javascript:void(0);" data-href="wizard/taxes/' + tax.id + '/disable" class="tax-disable">{{ trans('general.disable') }}</a></li>';
html += ' <li class="divider"></li>';
html += ' <li>';
html += ' <button type="button" class="delete-link" title="{{ trans('general.delete') }}" onclick="confirmCurrency("#tax-' + tax.id + '", "{{ trans_choice('general.taxes', 2) }}", "{{ trans('general.delete_confirm', ['name' => '<strong>' . $item->name . '</strong>', 'type' => mb_strtolower(trans_choice('general.taxes', 1))]) }}", "{{ trans('general.cancel') }}", "{{ trans('general.delete') }}")">{{ trans('general.delete') }}</button>';
html += ' </li>';
html += ' </ul>';
html += ' </div>';
html += ' </td>';
html += '</tr>';
$('#tbl-taxes tbody').append(html);
}
},
error: function(data){
$('.tax-submit').html('<span class="fa fa-save"></span>');
var errors = data.responseJSON;
if (typeof errors !== 'undefined') {
if (errors.name) {
$('#tbl-taxes #name').parent().after('<p class="help-block" style="color: #ca1313;">' + errors.name + '</p>');
}
if (errors.code) {
$('#tbl-taxes #code').parent().after('<p class="help-block" style="color: #ca1313;">' + errors.code + '</p>');
}
if (errors.rate) {
$('#tbl-taxes #rate').parent().after('<p class="help-block" style="color: #ca1313;">' + errors.rate + '</p>');
}
}
}
});
});
$(document).on('click', '.tax-edit', function (e) {
$('#tax-create').remove();
$('#tax-edit').remove();
data_href = $(this).data('href');
data_id = $(this).data('id');
$.ajax({
url: data_href,
type: 'GET',
dataType: 'JSON',
success: function(json) {
if (json['success']) {
$('#tax-' + data_id).after(json['html']);
$("#code").select2({
placeholder: "{{ trans('general.form.select.field', ['field' => trans('taxes.code')]) }}"
});
$('.tax-enabled-radio-group #enabled_1').trigger();
}
}
});
});
$(document).on('click', '.tax-updated', function (e) {
$(this).html('<span class="fa fa-spinner fa-pulse"></span>');
$('.help-block').remove();
data_href = $(this).data('href');
$.ajax({
url: data_href,
type: 'PATCH',
dataType: 'JSON',
data: $('#tbl-taxes input[type=\'number\'], #tbl-taxes input[type=\'text\'], #tbl-taxes input[type=\'radio\'], #tbl-taxes input[type=\'hidden\'], #tbl-taxes textarea, #tbl-taxes select').serialize(),
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
success: function(json) {
$('.tax-updated').html('<span class="fa fa-save"></span>');
if (json['success']) {
$('#tax-create').remove();
$('#tax-edit').remove();
}
},
error: function(data){
$('.tax-updated').html('<span class="fa fa-save"></span>');
var errors = data.responseJSON;
if (typeof errors !== 'undefined') {
if (errors.name) {
$('#tbl-taxes #name').parent().after('<p class="help-block" style="color: #ca1313;">' + errors.name + '</p>');
}
if (errors.code) {
$('#tbl-taxes #code').parent().after('<p class="help-block" style="color: #ca1313;">' + errors.code + '</p>');
}
if (errors.rate) {
$('#tbl-taxes #rate').parent().after('<p class="help-block" style="color: #ca1313;">' + errors.rate + '</p>');
}
}
}
});
});
$(document).on('click', '.tax-disable', function (e) {
data_href = $(this).data('href');
tax_tr = $(this).parent().parent().parent().parent().parent();
$.ajax({
url: data_href,
type: 'GET',
dataType: 'JSON',
success: function(json) {
if (json['success']) {
tax_tr.find('.tax-status').html('<span class="label label-danger">{{ trans('general.disabled') }}</span>');
}
}
});
});
$(document).on('click', '.tax-enable', function (e) {
data_href = $(this).data('href');
tax_tr = $(this).parent().parent().parent().parent().parent();
$.ajax({
url: data_href,
type: 'GET',
dataType: 'JSON',
success: function(json) {
if (json['success']) {
tax_tr.find('.tax-status').html('<span class="label label-success">{{ trans('general.enabled') }}</span>');
}
}
});
});
$(document).on('change', '#code', function (e) {
$.ajax({
url: '{{ url("settings/taxes/config") }}',
type: 'GET',
dataType: 'JSON',
data: 'code=' + $(this).val(),
success: function(data) {
$('#precision').val(data.precision);
$('#symbol').val(data.symbol);
$('#symbol_first').val(data.symbol_first);
$('#decimal_mark').val(data.decimal_mark);
$('#thousands_separator').val(data.thousands_separator);
// This event Select2 Stylesheet
$('#symbol_first').trigger('change');
}
});
});
function confirmCurrency(tr_id, title, message, button_cancel, button_delete) {
$('#confirm-modal').remove();
var html = '';
html += '<div class="modal fade" id="confirm-modal" tabindex="-1" role="dialog" aria-labelledby="confirmModalLabel" aria-hidden="true">';
html += ' <div class="modal-dialog">';
html += ' <div class="modal-content">';
html += ' <div class="modal-header">';
html += ' <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>';
html += ' <h4 class="modal-title" id="confirmModalLabel">' + title + '</h4>';
html += ' </div>';
html += ' <div class="modal-body">';
html += ' <p>' + message + '</p>';
html += ' <p></p>';
html += ' </div>';
html += ' <div class="modal-footer">';
html += ' <div class="pull-left">';
html += ' <button type="button" class="btn btn-danger" onclick="deleteCurrency(\'' + tr_id + '\');">' + button_delete + '</button>';
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">' + button_cancel + '</button>';
html += ' </div>';
html += ' </div>';
html += ' </div>';
html += ' </div>';
html += '</div>';
$('body').append(html);
$('#confirm-modal').modal('show');
}
function deleteCurrency(tr_id) {
data_href = $(tr_id).data('href');
$.ajax({
url: data_href,
type: 'GET',
dataType: 'JSON',
success: function(json) {
if (json['success']) {
$(tr_id).remove();
}
}
});
}
</script>
@endpush

View File

@ -7,6 +7,34 @@ Route::group(['middleware' => 'language'], function () {
Route::get('{id}/download', 'Common\Uploads@download');
});
Route::group(['middleware' => 'permission:read-admin-panel'], function () {
Route::group(['prefix' => 'wizard'], function () {
Route::get('/', 'Wizard\Companies@edit')->name('wizard.index');
Route::get('companies', 'Wizard\Companies@edit')->name('wizard.companies.edit');
Route::patch('companies', 'Wizard\Companies@update')->name('wizard.companies.update');
Route::get('currencies', 'Wizard\Currencies@index')->name('wizard.currencies.index');
Route::get('currencies/create', 'Wizard\Currencies@create')->name('wizard.currencies.create');
Route::get('currencies/{currency}/edit', 'Wizard\Currencies@edit')->name('wizard.currencies.edit');
Route::get('currencies/{currency}/enable', 'Wizard\Currencies@enable')->name('wizard.currencies.enable');
Route::get('currencies/{currency}/disable', 'Wizard\Currencies@disable')->name('wizard.currencies.disable');
Route::get('currencies/{currency}/delete', 'Wizard\Currencies@destroy')->name('wizard.currencies.delete');
Route::post('currencies', 'Wizard\Currencies@store')->name('wizard.currencies.store');
Route::patch('currencies/{currency}', 'Wizard\Currencies@update')->name('wizard.currencies.update');
Route::get('taxes', 'Wizard\Taxes@index')->name('wizard.taxes.index');
Route::get('taxes/create', 'Wizard\Taxes@create')->name('wizard.taxes.create');
Route::get('taxes/{tax}/edit', 'Wizard\Taxes@edit')->name('wizard.taxes.edit');
Route::get('taxes/{tax}/enable', 'Wizard\Taxes@enable')->name('wizard.taxes.enable');
Route::get('taxes/{tax}/disable', 'Wizard\Taxes@disable')->name('wizard.taxes.disable');
Route::get('taxes/{tax}/delete', 'Wizard\Taxes@destroy')->name('wizard.taxes.delete');
Route::post('taxes', 'Wizard\Taxes@store')->name('wizard.taxes.store');
Route::patch('taxes/{tax}', 'Wizard\Taxes@update')->name('wizard.taxes.upadate');
Route::get('finish', 'Wizard\Finish@index')->name('wizard.finish.index');
});
});
Route::group(['middleware' => ['adminmenu', 'permission:read-admin-panel']], function () {
Route::get('/', 'Common\Dashboard@index');

View File

@ -0,0 +1,124 @@
<?php
namespace Tests\Feature\Expenses;
use App\Models\Common\Item;
use App\Models\Expense\Bill;
use App\Models\Expense\Vendor;
use Tests\Feature\FeatureTestCase;
class BillsTest extends FeatureTestCase
{
public function testItShouldSeeBillListPage()
{
$this->loginAs()
->get(route('bills.index'))
->assertStatus(200)
->assertSeeText(trans_choice('general.bills', 2));
}
public function testItShouldSeeBillCreatePage()
{
$this->loginAs()
->get(route('bills.create'))
->assertStatus(200)
->assertSeeText(trans('general.title.new', ['type' => trans_choice('general.bills', 1)]));
}
public function testItShouldCreateBill()
{
$this->loginAs()
->post(route('bills.store'), $this->getBillRequest())
->assertStatus(302)
->assertRedirect(route('bills.show', ['bill' => 1]));
$this->assertFlashLevel('success');
}
public function testItShouldCreateBillWithRecurring()
{
$this->loginAs()
->post(route('bills.store'), $this->getBillRequest(1))
->assertStatus(302)
->assertRedirect(route('bills.show', ['bill' => 1]));
$this->assertFlashLevel('success');
}
public function testItShouldSeeBillUpdatePage()
{
$bill = Bill::create($this->getBillRequest());
$this->loginAs()
->get(route('bills.edit', ['bill' => $bill->id]))
->assertStatus(200)
->assertSee($bill->vendor_name)
->assertSee($bill->vendor_email);
}
public function testItShouldUpdateBill()
{
$request = $this->getBillRequest();
$bill = Bill::create($request);
$request['vendor_name'] = $this->faker->name;
$this->loginAs()
->patch(route('bills.update', $bill->id), $request)
->assertStatus(302);
$this->assertFlashLevel('success');
}
public function testItShouldDeleteBill()
{
$bill = Bill::create($this->getBillRequest());
$this->loginAs()
->delete(route('bills.destroy', $bill->id))
->assertStatus(302)
->assertRedirect(route('bills.index'));
$this->assertFlashLevel('success');
}
private function getBillRequest($recurring = 0)
{
$amount = $this->faker->randomFloat(2, 2);
$items = [['name' => 'urun', 'item_id' => null, 'quantity' => '1', 'price' => $amount, 'currency' => 'USD', 'tax_id' => null]];
$data = [
'vendor_id' => '0',
'billed_at' => $this->faker->date(),
'due_at' => $this->faker->date(),
'bill_number' => '1',
'order_number' => '1',
'currency_code' => setting('general.default_currency'),
'currency_rate' => '1',
'item' => $items,
'discount' => '0',
'notes' => $this->faker->text(5),
'category_id' => $this->company->categories()->type('expense')->first()->id,
'recurring_frequency' => 'no',
'vendor_name' => $this->faker->name,
'vendor_email' =>$this->faker->email,
'vendor_tax_number' => null,
'vendor_phone' => null,
'vendor_address' => $this->faker->address,
'bill_status_code' => 'draft',
'amount' => $amount,
'company_id' => $this->company->id,
];
if ($recurring) {
$data['recurring_frequency'] = 'yes';
$data['recurring_interval'] = '1';
$data['recurring_custom_frequency'] = $this->faker->randomElement(['monthly', 'weekly']);
$data['recurring_count'] = '1';
}
return $data;
}
}