Merge branch 'master' into laravel-7
This commit is contained in:
commit
3a04958a04
2
.github/workflows/labeler.yml
vendored
2
.github/workflows/labeler.yml
vendored
@ -13,5 +13,5 @@ jobs:
|
||||
- uses: actions/labeler@v2
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
Language Change:
|
||||
"Language Change":
|
||||
- resources/lang/en-GB/*
|
||||
|
@ -98,7 +98,7 @@ abstract class DocumentModel extends Model
|
||||
$default_model->currency_code = $item->currency_code;
|
||||
$default_model->currency_rate = $currencies[$item->currency_code];
|
||||
|
||||
$default_amount = (double) $default_model->getDivideConvertedAmount();
|
||||
$default_amount = (double) $default_model->getAmountConvertedToDefault();
|
||||
|
||||
$convert_model = new Transaction();
|
||||
$convert_model->default_currency_code = $item->currency_code;
|
||||
@ -106,7 +106,7 @@ abstract class DocumentModel extends Model
|
||||
$convert_model->currency_code = $this->currency_code;
|
||||
$convert_model->currency_rate = $currencies[$this->currency_code];
|
||||
|
||||
$amount = (double) $convert_model->getAmountConvertedFromCustomDefault();
|
||||
$amount = (double) $convert_model->getAmountConvertedFromDefault();
|
||||
}
|
||||
|
||||
$paid += $amount;
|
||||
|
@ -30,7 +30,7 @@ abstract class Controller extends BaseController
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setPermissions()
|
||||
public function setPermissions()
|
||||
{
|
||||
// No need to check for permission in console
|
||||
if (app()->runningInConsole()) {
|
||||
@ -90,33 +90,4 @@ abstract class Controller extends BaseController
|
||||
|
||||
return new LengthAwarePaginator($items->forPage($page, $perPage), $items->count(), $perPage, $page, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispatch a job to its appropriate handler and return a response array for ajax calls.
|
||||
*
|
||||
* @param mixed $job
|
||||
* @return mixed
|
||||
*/
|
||||
public function ajaxDispatch($job)
|
||||
{
|
||||
try {
|
||||
$data = $this->dispatch($job);
|
||||
|
||||
$response = [
|
||||
'success' => true,
|
||||
'error' => false,
|
||||
'data' => $data,
|
||||
'message' => '',
|
||||
];
|
||||
} catch(\Exception $e) {
|
||||
$response = [
|
||||
'success' => false,
|
||||
'error' => true,
|
||||
'data' => null,
|
||||
'message' => $e->getMessage(),
|
||||
];
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
10
app/Abstracts/Observer.php
Normal file
10
app/Abstracts/Observer.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Abstracts;
|
||||
|
||||
use Monooso\Unobserve\CanMute;
|
||||
|
||||
abstract class Observer
|
||||
{
|
||||
use CanMute;
|
||||
}
|
@ -67,6 +67,9 @@ abstract class Report
|
||||
'datasets' => [],
|
||||
];
|
||||
|
||||
public $column_name_width = 'report-column-name';
|
||||
public $column_value_width = 'report-column-value';
|
||||
|
||||
public function __construct(Model $model = null, $load_data = true)
|
||||
{
|
||||
$this->setGroups();
|
||||
@ -95,6 +98,7 @@ abstract class Report
|
||||
$this->setFilters();
|
||||
$this->setRows();
|
||||
$this->setData();
|
||||
$this->setColumnWidth();
|
||||
|
||||
$this->loaded = true;
|
||||
}
|
||||
@ -198,6 +202,30 @@ abstract class Report
|
||||
return \Excel::download(new Export($this->views['content'], $this), \Str::filename($this->model->name) . '.xlsx');
|
||||
}
|
||||
|
||||
public function setColumnWidth()
|
||||
{
|
||||
if (empty($this->model->settings->period)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$width = '';
|
||||
|
||||
switch ($this->model->settings->period) {
|
||||
case 'quarterly':
|
||||
$width = 'col-sm-2';
|
||||
break;
|
||||
case 'yearly':
|
||||
$width = 'col-sm-4';
|
||||
break;
|
||||
}
|
||||
|
||||
if (empty($width)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->column_name_width = $this->column_value_width = $width;
|
||||
}
|
||||
|
||||
public function setYear()
|
||||
{
|
||||
$this->year = request('year', Date::now()->year);
|
||||
|
@ -32,6 +32,9 @@ class BillReminder extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
// Disable model cache
|
||||
config(['laravel-model-caching.enabled' => false]);
|
||||
|
||||
// Get all companies
|
||||
$companies = Company::enabled()->cursor();
|
||||
|
||||
|
@ -32,6 +32,9 @@ class InvoiceReminder extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
// Disable model cache
|
||||
config(['laravel-model-caching.enabled' => false]);
|
||||
|
||||
// Get all companies
|
||||
$companies = Company::enabled()->cursor();
|
||||
|
||||
|
@ -45,6 +45,9 @@ class RecurringCheck extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
// Disable model cache
|
||||
config(['laravel-model-caching.enabled' => false]);
|
||||
|
||||
// Get all companies
|
||||
$companies = Company::enabled()->cursor();
|
||||
|
||||
|
22
app/Events/Banking/TransactionCreated.php
Normal file
22
app/Events/Banking/TransactionCreated.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Banking;
|
||||
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class TransactionCreated
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public $transaction;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param $transaction
|
||||
*/
|
||||
public function __construct($transaction)
|
||||
{
|
||||
$this->transaction = $transaction;
|
||||
}
|
||||
}
|
22
app/Events/Banking/TransactionCreating.php
Normal file
22
app/Events/Banking/TransactionCreating.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Banking;
|
||||
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class TransactionCreating
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
public $request;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @param $request
|
||||
*/
|
||||
public function __construct($request)
|
||||
{
|
||||
$this->request = $request;
|
||||
}
|
||||
}
|
@ -198,7 +198,7 @@ class Reconciliations extends Controller
|
||||
$total = $account->opening_balance;
|
||||
|
||||
// Sum income transactions
|
||||
$transactions = $account->income_transacions()->whereDate('paid_at', '<', $started_at)->get();
|
||||
$transactions = $account->income_transactions()->whereDate('paid_at', '<', $started_at)->get();
|
||||
foreach ($transactions as $item) {
|
||||
$total += $item->amount;
|
||||
}
|
||||
|
65
app/Http/Controllers/Modals/Accounts.php
Normal file
65
app/Http/Controllers/Modals/Accounts.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Modals;
|
||||
|
||||
use App\Abstracts\Http\Controller;
|
||||
use App\Http\Requests\Banking\Account as Request;
|
||||
use App\Jobs\Banking\CreateAccount;
|
||||
use App\Models\Banking\Account;
|
||||
use App\Models\Setting\Currency;
|
||||
|
||||
class Accounts extends Controller
|
||||
{
|
||||
/**
|
||||
* Instantiate a new controller instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// Add CRUD permission check
|
||||
$this->middleware('permission:create-banking-accounts')->only(['create', 'store', 'duplicate', 'import']);
|
||||
$this->middleware('permission:read-banking-accounts')->only(['index', 'show', 'edit', 'export']);
|
||||
$this->middleware('permission:update-banking-accounts')->only(['update', 'enable', 'disable']);
|
||||
$this->middleware('permission:delete-banking-accounts')->only('destroy');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$currencies = Currency::enabled()->pluck('name', 'code');
|
||||
|
||||
$currency = Currency::where('code', '=', setting('default.currency'))->first();
|
||||
|
||||
$html = view('modals.accounts.create', compact('currencies', 'currency'))->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)
|
||||
{
|
||||
$request['enabled'] = 1;
|
||||
|
||||
$response = $this->ajaxDispatch(new CreateAccount($request));
|
||||
|
||||
if ($response['success']) {
|
||||
$response['message'] = trans('messages.success.added', ['type' => trans_choice('general.accounts', 1)]);
|
||||
}
|
||||
|
||||
return response()->json($response);
|
||||
}
|
||||
}
|
@ -100,7 +100,7 @@ class Invoices extends Controller
|
||||
if ($invoice->currency_code != $item->currency_code) {
|
||||
$item->default_currency_code = $invoice->currency_code;
|
||||
|
||||
$amount = $item->getAmountConvertedFromCustomDefault();
|
||||
$amount = $item->getAmountConvertedFromDefault();
|
||||
}
|
||||
|
||||
$paid += $amount;
|
||||
@ -129,7 +129,7 @@ class Invoices extends Controller
|
||||
if ($invoice->currency_code != $item->currency_code) {
|
||||
$item->default_currency_code = $invoice->currency_code;
|
||||
|
||||
$amount = $item->getAmountConvertedFromCustomDefault();
|
||||
$amount = $item->getAmountConvertedFromDefault();
|
||||
}
|
||||
|
||||
$paid += $amount;
|
||||
|
@ -108,7 +108,9 @@ class Bills extends Controller
|
||||
|
||||
$categories = Category::type('expense')->enabled()->orderBy('name')->pluck('name', 'id');
|
||||
|
||||
return view('purchases.bills.create', compact('vendors', 'currencies', 'currency', 'items', 'taxes', 'categories'));
|
||||
$number = $this->getNextBillNumber();
|
||||
|
||||
return view('purchases.bills.create', compact('vendors', 'currencies', 'currency', 'items', 'taxes', 'categories', 'number'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -369,7 +371,7 @@ class Bills extends Controller
|
||||
if ($bill->currency_code != $item->currency_code) {
|
||||
$item->default_currency_code = $bill->currency_code;
|
||||
|
||||
$amount = $item->getAmountConvertedFromCustomDefault();
|
||||
$amount = $item->getAmountConvertedFromDefault();
|
||||
}
|
||||
|
||||
$paid += $amount;
|
||||
|
@ -447,7 +447,7 @@ class Invoices extends Controller
|
||||
if ($invoice->currency_code != $item->currency_code) {
|
||||
$item->default_currency_code = $invoice->currency_code;
|
||||
|
||||
$amount = $item->getAmountConvertedFromCustomDefault();
|
||||
$amount = $item->getAmountConvertedFromDefault();
|
||||
}
|
||||
|
||||
$paid += $amount;
|
||||
|
@ -22,15 +22,10 @@ class Money
|
||||
$sale_price = $request->get('sale_price');
|
||||
$purchase_price = $request->get('purchase_price');
|
||||
$opening_balance = $request->get('opening_balance');
|
||||
$currency_code = $request->get('currency_code');
|
||||
$items = $request->get('items');
|
||||
|
||||
if (empty($currency_code)) {
|
||||
$currency_code = setting('default.currency');
|
||||
}
|
||||
|
||||
if (!empty($amount)) {
|
||||
$amount = money($request->get('amount'), $currency_code)->getAmount();
|
||||
$amount = money($amount)->getAmount();
|
||||
|
||||
$request->request->set('amount', $amount);
|
||||
}
|
||||
@ -42,11 +37,7 @@ class Money
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isset($item['currency']) && $item['currency'] != $currency_code) {
|
||||
$items[$key]['price'] = money($item['price'], $item['currency'])->getAmount();
|
||||
} else {
|
||||
$items[$key]['price'] = money($item['price'], $currency_code)->getAmount();
|
||||
}
|
||||
$items[$key]['price'] = money($item['price'])->getAmount();
|
||||
}
|
||||
|
||||
$request->request->set('items', $items);
|
||||
@ -54,24 +45,10 @@ class Money
|
||||
}
|
||||
|
||||
if (isset($opening_balance)) {
|
||||
$opening_balance = money($opening_balance, $currency_code)->getAmount();
|
||||
$opening_balance = money($opening_balance)->getAmount();
|
||||
|
||||
$request->request->set('opening_balance', $opening_balance);
|
||||
}
|
||||
|
||||
/* check item price use money
|
||||
if (isset($sale_price)) {
|
||||
$sale_price = money($sale_price, $currency_code)->getAmount();
|
||||
|
||||
$request->request->set('sale_price', $sale_price);
|
||||
}
|
||||
|
||||
if (isset($purchase_price)) {
|
||||
$purchase_price = money($purchase_price, $currency_code)->getAmount();
|
||||
|
||||
$request->request->set('purchase_price', $purchase_price);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
@ -37,7 +37,7 @@ class Contact extends FormRequest
|
||||
$id = null;
|
||||
}
|
||||
|
||||
if (!empty($this->request->get('create_user')) && empty($this->request->get('user_id'))) {
|
||||
if (($this->request->get('create_user', 'false') === 'true') && empty($this->request->get('user_id'))) {
|
||||
$required = 'required|';
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ class CreateDocumentTransaction extends Job
|
||||
$default_amount_model->currency_code = $this->request['currency_code'];
|
||||
$default_amount_model->currency_rate = $currencies[$this->request['currency_code']];
|
||||
|
||||
$default_amount = (double) $default_amount_model->getDivideConvertedAmount();
|
||||
$default_amount = (double) $default_amount_model->getAmountConvertedToDefault();
|
||||
|
||||
$convert_amount_model = new Transaction();
|
||||
$convert_amount_model->default_currency_code = $this->request['currency_code'];
|
||||
@ -100,7 +100,7 @@ class CreateDocumentTransaction extends Job
|
||||
$convert_amount_model->currency_code = $this->model->currency_code;
|
||||
$convert_amount_model->currency_rate = $currencies[$this->model->currency_code];
|
||||
|
||||
$amount = (double) $convert_amount_model->getAmountConvertedFromCustomDefault();
|
||||
$amount = (double) $convert_amount_model->getAmountConvertedFromDefault();
|
||||
}
|
||||
|
||||
$total_amount -= $this->model->paid;
|
||||
@ -126,7 +126,7 @@ class CreateDocumentTransaction extends Job
|
||||
$error_amount_model->currency_code = $this->model->currency_code;
|
||||
$error_amount_model->currency_rate = $currencies[$this->model->currency_code];
|
||||
|
||||
$error_amount = (double) $error_amount_model->getDivideConvertedAmount();
|
||||
$error_amount = (double) $error_amount_model->getAmountConvertedToDefault();
|
||||
|
||||
$convert_amount_model = new Transaction();
|
||||
$convert_amount_model->default_currency_code = $this->model->currency_code;
|
||||
@ -134,7 +134,7 @@ class CreateDocumentTransaction extends Job
|
||||
$convert_amount_model->currency_code = $this->request['currency_code'];
|
||||
$convert_amount_model->currency_rate = $currencies[$this->request['currency_code']];
|
||||
|
||||
$error_amount = (double) $convert_amount_model->getAmountConvertedFromCustomDefault();
|
||||
$error_amount = (double) $convert_amount_model->getAmountConvertedFromDefault();
|
||||
}
|
||||
|
||||
$message = trans('messages.error.over_payment', ['amount' => money($error_amount, $this->request['currency_code'], true)]);
|
||||
|
@ -3,12 +3,16 @@
|
||||
namespace App\Jobs\Banking;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
use App\Events\Banking\TransactionCreated;
|
||||
use App\Events\Banking\TransactionCreating;
|
||||
use App\Models\Banking\Transaction;
|
||||
|
||||
class CreateTransaction extends Job
|
||||
{
|
||||
protected $request;
|
||||
|
||||
protected $transaction;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
@ -26,18 +30,22 @@ class CreateTransaction extends Job
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$transaction = Transaction::create($this->request->all());
|
||||
event(new TransactionCreating($this->request));
|
||||
|
||||
$this->transaction = Transaction::create($this->request->all());
|
||||
|
||||
// Upload attachment
|
||||
if ($this->request->file('attachment')) {
|
||||
$media = $this->getMedia($this->request->file('attachment'), 'transactions');
|
||||
|
||||
$transaction->attachMedia($media, 'attachment');
|
||||
$this->transaction->attachMedia($media, 'attachment');
|
||||
}
|
||||
|
||||
// Recurring
|
||||
$transaction->createRecurring();
|
||||
$this->transaction->createRecurring();
|
||||
|
||||
return $transaction;
|
||||
event(new TransactionCreated($this->transaction));
|
||||
|
||||
return $this->transaction;
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class CreateTransfer extends Job
|
||||
$default_amount_model->currency_code = $expense_currency_code;
|
||||
$default_amount_model->currency_rate = $currencies[$expense_currency_code];
|
||||
|
||||
$default_amount = $default_amount_model->getAmountDivided();
|
||||
$default_amount = $default_amount_model->getAmountConvertedToDefault();
|
||||
}
|
||||
|
||||
$transfer_amount = new Transfer();
|
||||
@ -74,7 +74,7 @@ class CreateTransfer extends Job
|
||||
$transfer_amount->currency_code = $income_currency_code;
|
||||
$transfer_amount->currency_rate = $currencies[$income_currency_code];
|
||||
|
||||
$amount = $transfer_amount->getAmountConvertedFromCustomDefault();
|
||||
$amount = $transfer_amount->getAmountConvertedFromDefault();
|
||||
} else {
|
||||
$amount = $this->request->get('amount');
|
||||
}
|
||||
|
@ -41,6 +41,12 @@ class DeleteTransaction extends Job
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
if ($this->transaction->reconciled) {
|
||||
$message = trans('messages.warning.reconciled_tran');
|
||||
|
||||
throw new \Exception($message);
|
||||
}
|
||||
|
||||
if ($this->transaction->category->id == Category::transfer()) {
|
||||
throw new \Exception('Unauthorized');
|
||||
}
|
||||
|
@ -30,6 +30,8 @@ class UpdateTransaction extends Job
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->authorize();
|
||||
|
||||
$this->transaction->update($this->request->all());
|
||||
|
||||
// Upload attachment
|
||||
@ -44,4 +46,18 @@ class UpdateTransaction extends Job
|
||||
|
||||
return $this->transaction;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if this action is applicable.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
if ($this->transaction->reconciled) {
|
||||
$message = trans('messages.warning.reconciled_tran');
|
||||
|
||||
throw new \Exception($message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ class UpdateTransfer extends Job
|
||||
$default_amount_model->currency_code = $expense_currency_code;
|
||||
$default_amount_model->currency_rate = $currencies[$expense_currency_code];
|
||||
|
||||
$default_amount = $default_amount_model->getDivideConvertedAmount();
|
||||
$default_amount = $default_amount_model->getAmountConvertedToDefault();
|
||||
}
|
||||
|
||||
$transfer_amount = new Transfer();
|
||||
@ -81,7 +81,7 @@ class UpdateTransfer extends Job
|
||||
$transfer_amount->currency_code = $income_currency_code;
|
||||
$transfer_amount->currency_rate = $currencies[$income_currency_code];
|
||||
|
||||
$amount = $transfer_amount->getAmountConvertedFromCustomDefault();
|
||||
$amount = $transfer_amount->getAmountConvertedFromDefault();
|
||||
} else {
|
||||
$amount = $this->request->get('amount');
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ class CreateContact extends Job
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
if (!empty($this->request->input('create_user'))) {
|
||||
if ($this->request->get('create_user', 'false') === 'true') {
|
||||
$this->createUser();
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ class UpdateContact extends Job
|
||||
{
|
||||
$this->authorize();
|
||||
|
||||
if (!empty($this->request->input('create_user'))) {
|
||||
if ($this->request->get('create_user', 'false') === 'true') {
|
||||
$this->createUser();
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ namespace App\Jobs\Purchase;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
use App\Models\Purchase\Bill;
|
||||
use App\Observers\Transaction;
|
||||
|
||||
class DeleteBill extends Job
|
||||
{
|
||||
@ -26,7 +27,9 @@ class DeleteBill extends Job
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
session(['deleting_bill' => true]);
|
||||
$this->authorize();
|
||||
|
||||
Transaction::mute();
|
||||
|
||||
$this->deleteRelationships($this->bill, [
|
||||
'items', 'item_taxes', 'histories', 'transactions', 'recurring', 'totals'
|
||||
@ -34,8 +37,22 @@ class DeleteBill extends Job
|
||||
|
||||
$this->bill->delete();
|
||||
|
||||
session()->forget('deleting_bill');
|
||||
Transaction::unmute();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if this action is applicable.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
if ($this->bill->transactions()->isReconciled()->count()) {
|
||||
$message = trans('messages.warning.reconciled_doc', ['type' => trans_choice('general.bills', 1)]);
|
||||
|
||||
throw new \Exception($message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ namespace App\Jobs\Sale;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
use App\Models\Sale\Invoice;
|
||||
use App\Observers\Transaction;
|
||||
|
||||
class DeleteInvoice extends Job
|
||||
{
|
||||
@ -26,7 +27,9 @@ class DeleteInvoice extends Job
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
session(['deleting_invoice' => true]);
|
||||
$this->authorize();
|
||||
|
||||
Transaction::mute();
|
||||
|
||||
$this->deleteRelationships($this->invoice, [
|
||||
'items', 'item_taxes', 'histories', 'transactions', 'recurring', 'totals'
|
||||
@ -34,8 +37,22 @@ class DeleteInvoice extends Job
|
||||
|
||||
$this->invoice->delete();
|
||||
|
||||
session()->forget('deleting_invoice');
|
||||
Transaction::unmute();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if this action is applicable.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
if ($this->invoice->transactions()->isReconciled()->count()) {
|
||||
$message = trans('messages.warning.reconciled_doc', ['type' => trans_choice('general.invoices', 1)]);
|
||||
|
||||
throw new \Exception($message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
23
app/Listeners/Purchase/IncreaseNextBillNumber.php
Normal file
23
app/Listeners/Purchase/IncreaseNextBillNumber.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Listeners\Purchase;
|
||||
|
||||
use App\Events\Purchase\BillCreated as Event;
|
||||
use App\Traits\Purchases;
|
||||
|
||||
class IncreaseNextBillNumber
|
||||
{
|
||||
use Purchases;
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(Event $event)
|
||||
{
|
||||
// Update next bill number
|
||||
$this->increaseNextBillNumber();
|
||||
}
|
||||
}
|
100
app/Listeners/Update/V20/Version205.php
Normal file
100
app/Listeners/Update/V20/Version205.php
Normal file
@ -0,0 +1,100 @@
|
||||
<?php
|
||||
|
||||
namespace App\Listeners\Update\V20;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class Version205 extends Listener
|
||||
{
|
||||
const ALIAS = 'core';
|
||||
|
||||
const VERSION = '2.0.5';
|
||||
|
||||
protected $items;
|
||||
|
||||
protected $categories;
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(Event $event)
|
||||
{
|
||||
if ($this->skipThisUpdate($event)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->items = [];
|
||||
|
||||
$this->updateBillItems();
|
||||
|
||||
$this->updateInvoiceItems();
|
||||
}
|
||||
|
||||
protected function updateBillItems()
|
||||
{
|
||||
$bill_items = DB::table('bill_items')->whereNull('deleted_at')->where('item_id', 0)->cursor();
|
||||
|
||||
foreach ($bill_items as $bill_item) {
|
||||
$item_id = $this->getItemId($bill_item);
|
||||
|
||||
DB::table('bill_items')
|
||||
->where('id', $bill_item->id)
|
||||
->update(['item_id' => $item_id]);
|
||||
}
|
||||
}
|
||||
|
||||
protected function updateInvoiceItems()
|
||||
{
|
||||
$invoice_items = DB::table('invoice_items')->whereNull('deleted_at')->where('item_id', 0)->cursor();
|
||||
|
||||
foreach ($invoice_items as $invoice_item) {
|
||||
$item_id = $this->getItemId($invoice_item);
|
||||
|
||||
DB::table('invoice_items')
|
||||
->where('id', $invoice_item->id)
|
||||
->update(['item_id' => $item_id]);
|
||||
|
||||
DB::table('items')
|
||||
->where('id', $item_id)
|
||||
->update(['sale_price' => $invoice_item->price]);
|
||||
}
|
||||
}
|
||||
|
||||
protected function getItemId($item)
|
||||
{
|
||||
// Set category_id for company.
|
||||
if (!isset($this->categories[$item->company_id])) {
|
||||
$this->categories[$item->company_id] = DB::table('categories')->where('company_id', $item->company_id)->where('type', 'item')->first()->id;
|
||||
}
|
||||
|
||||
// Return set item_id for item name.
|
||||
if (isset($this->items[$item->company_id]) && in_array($item->name, $this->items[$item->company_id])) {
|
||||
return array_search($item->name, $this->items[$item->company_id]);
|
||||
}
|
||||
|
||||
// Insert new item.
|
||||
$item_id = DB::table('items')->insertGetId([
|
||||
'company_id' => $item->company_id,
|
||||
'name' => $item->name,
|
||||
'description' => null,
|
||||
'sale_price' => $item->price,
|
||||
'purchase_price' => $item->price,
|
||||
'category_id' => $this->categories[$item->company_id],
|
||||
'tax_id' => null,
|
||||
'enabled' => 1,
|
||||
'created_at' => $item->created_at,
|
||||
'updated_at' => $item->updated_at,
|
||||
'deleted_at' => null,
|
||||
]);
|
||||
|
||||
// Set item_id for item name.
|
||||
$this->items[$item->company_id][$item_id] = $item->name;
|
||||
|
||||
return $item_id;
|
||||
}
|
||||
}
|
@ -39,7 +39,7 @@ class Account extends Model
|
||||
return $this->transactions()->where('type', 'expense');
|
||||
}
|
||||
|
||||
public function income_transacions()
|
||||
public function income_transactions()
|
||||
{
|
||||
return $this->transactions()->where('type', 'income');
|
||||
}
|
||||
@ -81,7 +81,7 @@ class Account extends Model
|
||||
$total = $this->opening_balance;
|
||||
|
||||
// Sum Incomes
|
||||
$total += $this->income_transacions->sum('amount');
|
||||
$total += $this->income_transactions->sum('amount');
|
||||
|
||||
// Subtract Expenses
|
||||
$total -= $this->expense_transactions->sum('amount');
|
||||
|
@ -174,6 +174,28 @@ class Transaction extends Model
|
||||
return $query->sum('amount');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get only reconciled.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function scopeIsReconciled($query)
|
||||
{
|
||||
return $query->where('reconciled', 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get only not reconciled.
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function scopeIsNotReconciled($query)
|
||||
{
|
||||
return $query->where('reconciled', 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert amount to double.
|
||||
*
|
||||
@ -211,9 +233,4 @@ class Transaction extends Model
|
||||
|
||||
return $this->getMedia('attachment')->last();
|
||||
}
|
||||
|
||||
public function getDivideConvertedAmount($format = false)
|
||||
{
|
||||
return $this->divide($this->amount, $this->currency_code, $this->currency_rate, $format);
|
||||
}
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ class Contact extends Model
|
||||
$this->$collection()->accrued()->notPaid()->each(function ($item) use (&$amount) {
|
||||
$unpaid = $item->amount - $item->paid;
|
||||
|
||||
$amount += $this->convertFromDefault($unpaid, $item->currency_code, $item->currency_rate, false);
|
||||
$amount += $this->convertFromDefault($unpaid, $item->currency_code, $item->currency_rate);
|
||||
});
|
||||
|
||||
return $amount;
|
||||
|
@ -99,5 +99,6 @@ class Bill extends DocumentModel
|
||||
public function onCloning($src, $child = null)
|
||||
{
|
||||
$this->status = 'draft';
|
||||
$this->bill_number = $this->getNextBillNumber();
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,15 @@ class BillItem extends Model
|
||||
*/
|
||||
public $cloneable_relations = ['taxes'];
|
||||
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::retrieved(function($model) {
|
||||
$model->setTaxIds();
|
||||
});
|
||||
}
|
||||
|
||||
public function bill()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Purchase\Bill');
|
||||
@ -74,4 +83,20 @@ class BillItem extends Model
|
||||
{
|
||||
$this->attributes['tax'] = (double) $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert tax to Array.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setTaxIds()
|
||||
{
|
||||
$tax_ids = [];
|
||||
|
||||
foreach ($this->taxes as $tax) {
|
||||
$tax_ids[] = (string) $tax->tax_id;
|
||||
}
|
||||
|
||||
$this->setAttribute('tax_id', $tax_ids);
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,15 @@ class InvoiceItem extends Model
|
||||
*/
|
||||
public $cloneable_relations = ['taxes'];
|
||||
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
|
||||
static::retrieved(function($model) {
|
||||
$model->setTaxIds();
|
||||
});
|
||||
}
|
||||
|
||||
public function invoice()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Sale\Invoice');
|
||||
@ -73,4 +82,20 @@ class InvoiceItem extends Model
|
||||
{
|
||||
$this->attributes['tax'] = (double) $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert tax to Array.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setTaxIds()
|
||||
{
|
||||
$tax_ids = [];
|
||||
|
||||
foreach ($this->taxes as $tax) {
|
||||
$tax_ids[] = (string) $tax->tax_id;
|
||||
}
|
||||
|
||||
$this->setAttribute('tax_id', $tax_ids);
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ class Category extends Model
|
||||
return $this->transactions()->where('type', 'expense');
|
||||
}
|
||||
|
||||
public function income_transacions()
|
||||
public function income_transactions()
|
||||
{
|
||||
return $this->transactions()->where('type', 'income');
|
||||
}
|
||||
|
@ -2,12 +2,13 @@
|
||||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\Abstracts\Observer;
|
||||
use App\Jobs\Purchase\CreateBillHistory;
|
||||
use App\Jobs\Sale\CreateInvoiceHistory;
|
||||
use App\Models\Banking\Transaction as Model;
|
||||
use App\Traits\Jobs;
|
||||
|
||||
class Transaction
|
||||
class Transaction extends Observer
|
||||
{
|
||||
use Jobs;
|
||||
|
||||
@ -30,10 +31,6 @@ class Transaction
|
||||
|
||||
protected function updateInvoice($transaction)
|
||||
{
|
||||
if (session('deleting_invoice')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$invoice = $transaction->invoice;
|
||||
|
||||
$invoice->status = ($invoice->transactions->count() > 1) ? 'partial' : 'sent';
|
||||
@ -45,10 +42,6 @@ class Transaction
|
||||
|
||||
protected function updateBill($transaction)
|
||||
{
|
||||
if (session('deleting_bill')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$bill = $transaction->bill;
|
||||
|
||||
$bill->status = ($bill->transactions->count() > 1) ? 'partial' : 'received';
|
||||
|
@ -16,6 +16,7 @@ class Event extends Provider
|
||||
'App\Listeners\Update\CreateModuleUpdatedHistory',
|
||||
'App\Listeners\Update\V20\Version200',
|
||||
'App\Listeners\Update\V20\Version203',
|
||||
'App\Listeners\Update\V20\Version205',
|
||||
],
|
||||
'Illuminate\Auth\Events\Login' => [
|
||||
'App\Listeners\Auth\Login',
|
||||
@ -25,6 +26,7 @@ class Event extends Provider
|
||||
],
|
||||
'App\Events\Purchase\BillCreated' => [
|
||||
'App\Listeners\Purchase\CreateBillCreatedHistory',
|
||||
'App\Listeners\Purchase\IncreaseNextBillNumber',
|
||||
],
|
||||
'App\Events\Purchase\BillReceived' => [
|
||||
'App\Listeners\Purchase\MarkBillReceived',
|
||||
|
@ -3,46 +3,31 @@
|
||||
namespace App\Traits;
|
||||
|
||||
use Akaunting\Money\Money;
|
||||
use Akaunting\Money\Currency;
|
||||
|
||||
trait Currencies
|
||||
{
|
||||
public function convert($amount, $from, $to, $rate, $format = false)
|
||||
public function convert($method, $amount, $from, $to, $rate, $format = false)
|
||||
{
|
||||
$money = Money::$from($amount, $format);
|
||||
$money = Money::$to($amount, $format);
|
||||
|
||||
// No need to convert same currency
|
||||
if ($from == $to) {
|
||||
return $format ? $money->format() : $money->getAmount();
|
||||
}
|
||||
|
||||
$money = $money->convert(new Currency($to), (double) $rate);
|
||||
$money = $money->$method((double) $rate);
|
||||
|
||||
return $format ? $money->format() : $money->getAmount();
|
||||
}
|
||||
|
||||
public function divide($amount, $code, $rate, $format = false)
|
||||
{
|
||||
$money = Money::$code($amount, $format);
|
||||
|
||||
$money = $money->divide((double) $rate);
|
||||
|
||||
return $format ? $money->format() : $money->getAmount();
|
||||
}
|
||||
|
||||
public function getAmount($with_tax = true)
|
||||
{
|
||||
return $with_tax ? $this->amount : (isset($this->amount_without_tax) ? $this->amount_without_tax : $this->amount);
|
||||
}
|
||||
|
||||
public function convertToDefault($amount, $from, $rate, $format = false)
|
||||
{
|
||||
return $this->convert($amount, $from, $this->getDefaultCurrency(), $rate, $format);
|
||||
return $this->convert('divide', $amount, $from, $this->getDefaultCurrency(), $rate, $format);
|
||||
}
|
||||
|
||||
public function convertFromDefault($amount, $to, $rate, $format = false)
|
||||
{
|
||||
return $this->convert($amount, $this->getDefaultCurrency(), $to, $rate, $format);
|
||||
return $this->convert('multiply', $amount, $this->getDefaultCurrency(), $to, $rate, $format);
|
||||
}
|
||||
|
||||
public function getAmountConvertedToDefault($format = false, $with_tax = true)
|
||||
@ -55,18 +40,13 @@ trait Currencies
|
||||
return $this->convertFromDefault($this->getAmount($with_tax), $this->currency_code, $this->currency_rate, $format);
|
||||
}
|
||||
|
||||
public function getAmountConvertedFromCustomDefault($format = false, $with_tax = true)
|
||||
public function getAmount($with_tax = true)
|
||||
{
|
||||
return $this->convert($this->getAmount($with_tax), $this->default_currency_code, $this->currency_code, $this->currency_rate, $format);
|
||||
return $with_tax ? $this->amount : (isset($this->amount_without_tax) ? $this->amount_without_tax : $this->amount);
|
||||
}
|
||||
|
||||
public function getAmountDivided($format = false, $with_tax = true)
|
||||
public function getDefaultCurrency()
|
||||
{
|
||||
return $this->divide($this->getAmount($with_tax), $this->currency_code, $this->currency_rate, $format);
|
||||
}
|
||||
|
||||
protected function getDefaultCurrency()
|
||||
{
|
||||
return setting('default.currency', 'USD');
|
||||
return !empty($this->default_currency_code) ? $this->default_currency_code : setting('default.currency', 'USD');
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,35 @@ trait Jobs
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispatch a job to its appropriate handler and return a response array for ajax calls.
|
||||
*
|
||||
* @param mixed $job
|
||||
* @return mixed
|
||||
*/
|
||||
public function ajaxDispatch($job)
|
||||
{
|
||||
try {
|
||||
$data = $this->dispatch($job);
|
||||
|
||||
$response = [
|
||||
'success' => true,
|
||||
'error' => false,
|
||||
'data' => $data,
|
||||
'message' => '',
|
||||
];
|
||||
} catch(\Exception $e) {
|
||||
$response = [
|
||||
'success' => false,
|
||||
'error' => true,
|
||||
'data' => null,
|
||||
'message' => $e->getMessage(),
|
||||
];
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function getDispatchFunction()
|
||||
{
|
||||
$config = config('queue.default');
|
||||
|
@ -4,6 +4,33 @@ namespace App\Traits;
|
||||
|
||||
trait Purchases
|
||||
{
|
||||
/**
|
||||
* Generate next bill number
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNextBillNumber()
|
||||
{
|
||||
$prefix = setting('bill.number_prefix', 'BIL-');
|
||||
$next = setting('bill.number_next', '1');
|
||||
$digit = setting('bill.number_digit', '5');
|
||||
|
||||
$number = $prefix . str_pad($next, $digit, '0', STR_PAD_LEFT);
|
||||
|
||||
return $number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Increase the next bill number
|
||||
*/
|
||||
public function increaseNextBillNumber()
|
||||
{
|
||||
$next = setting('bill.number_next', 1) + 1;
|
||||
|
||||
setting(['bill.number_next' => $next]);
|
||||
setting()->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a collection of bill statuses
|
||||
*
|
||||
|
@ -17,7 +17,7 @@ trait Recurring
|
||||
}
|
||||
|
||||
$frequency = ($request['recurring_frequency'] != 'custom') ? $request['recurring_frequency'] : $request['recurring_custom_frequency'];
|
||||
$interval = ($request['recurring_frequency'] != 'custom') ? 1 : (int) $request['recurring_interval'];
|
||||
$interval = (($request['recurring_frequency'] != 'custom') || ($request['recurring_interval'] < 1)) ? 1 : (int) $request['recurring_interval'];
|
||||
$started_at = $request->get('paid_at') ?: ($request->get('invoiced_at') ?: $request->get('billed_at'));
|
||||
|
||||
$this->recurring()->create([
|
||||
@ -39,7 +39,7 @@ trait Recurring
|
||||
}
|
||||
|
||||
$frequency = ($request['recurring_frequency'] != 'custom') ? $request['recurring_frequency'] : $request['recurring_custom_frequency'];
|
||||
$interval = ($request['recurring_frequency'] != 'custom') ? 1 : (int) $request['recurring_interval'];
|
||||
$interval = (($request['recurring_frequency'] != 'custom') || ($request['recurring_interval'] < 1)) ? 1 : (int) $request['recurring_interval'];
|
||||
$started_at = $request->get('paid_at') ?: ($request->get('invoiced_at') ?: $request->get('billed_at'));
|
||||
|
||||
$recurring = $this->recurring();
|
||||
|
@ -6,8 +6,8 @@ use Akaunting\Module\Module;
|
||||
use App\Traits\SiteApi;
|
||||
use Cache;
|
||||
use Date;
|
||||
use GrahamCampbell\Markdown\Facades\Markdown;
|
||||
use Illuminate\Support\Arr;
|
||||
use Parsedown;
|
||||
|
||||
class Versions
|
||||
{
|
||||
@ -27,8 +27,6 @@ class Versions
|
||||
return $output;
|
||||
}
|
||||
|
||||
$parsedown = new Parsedown();
|
||||
|
||||
$releases = json_decode($json);
|
||||
|
||||
foreach ($releases as $release) {
|
||||
@ -46,7 +44,7 @@ class Versions
|
||||
|
||||
$output .= '<h2><span class="badge badge-pill badge-success">' . $release->tag_name . '</span></h2>';
|
||||
|
||||
$output .= $parsedown->text($release->body);
|
||||
$output .= Markdown::convertToHtml($release->body);
|
||||
|
||||
$output .= '<hr>';
|
||||
}
|
||||
|
@ -15,10 +15,10 @@ class IncomeByCategory extends Widget
|
||||
|
||||
public function show()
|
||||
{
|
||||
Category::with('income_transacions')->type('income')->each(function ($category) {
|
||||
Category::with('income_transactions')->type('income')->each(function ($category) {
|
||||
$amount = 0;
|
||||
|
||||
$this->applyFilters($category->income_transacions())->each(function ($transaction) use (&$amount) {
|
||||
$this->applyFilters($category->income_transactions())->each(function ($transaction) use (&$amount) {
|
||||
$amount += $transaction->getAmountConvertedToDefault();
|
||||
});
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
"akaunting/language": "1.0.*",
|
||||
"akaunting/menu": "1.0.*",
|
||||
"akaunting/module": "1.0.*",
|
||||
"akaunting/money": "1.0.*",
|
||||
"akaunting/money": "1.1.*",
|
||||
"akaunting/setting": "1.1.*",
|
||||
"akaunting/version": "1.0.*",
|
||||
"barryvdh/laravel-debugbar": "3.2.*",
|
||||
@ -31,6 +31,7 @@
|
||||
"fideloper/proxy": "^4.2",
|
||||
"fruitcake/laravel-cors": "^1.0",
|
||||
"genealabs/laravel-model-caching": "0.8.*",
|
||||
"graham-campbell/markdown": "12.0.*",
|
||||
"guzzlehttp/guzzle": "^6.5",
|
||||
"intervention/image": "2.5.*",
|
||||
"jenssegers/date": "4.0.0-beta",
|
||||
|
750
composer.lock
generated
750
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,7 @@ return [
|
||||
| Auto-save every time the application shuts down
|
||||
|
|
||||
*/
|
||||
'auto_save' => false,
|
||||
'auto_save' => env('SETTING_AUTO_SAVE', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -22,10 +22,10 @@ return [
|
||||
|
|
||||
*/
|
||||
'cache' => [
|
||||
'enabled' => true,
|
||||
'key' => 'setting',
|
||||
'ttl' => 21600,
|
||||
'auto_clear' => true,
|
||||
'enabled' => env('SETTING_CACHE_ENABLED', true),
|
||||
'key' => env('SETTING_CACHE_KEY', 'setting'),
|
||||
'ttl' => env('SETTING_CACHE_TTL', 21600),
|
||||
'auto_clear' => env('SETTING_CACHE_AUTO_CLEAR', true),
|
||||
],
|
||||
|
||||
/*
|
||||
@ -38,7 +38,7 @@ return [
|
||||
| Supported: "database", "json"
|
||||
|
|
||||
*/
|
||||
'driver' => 'database',
|
||||
'driver' => env('SETTING_DRIVER', 'database'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -50,10 +50,10 @@ return [
|
||||
|
|
||||
*/
|
||||
'database' => [
|
||||
'connection' => null,
|
||||
'table' => 'settings',
|
||||
'key' => 'key',
|
||||
'value' => 'value',
|
||||
'connection' => env('SETTING_DATABASE_CONNECTION', null),
|
||||
'table' => env('SETTING_DATABASE_TABLE', 'settings'),
|
||||
'key' => env('SETTING_DATABASE_KEY', 'key'),
|
||||
'value' => env('SETTING_DATABASE_VALUE', 'value'),
|
||||
],
|
||||
|
||||
/*
|
||||
@ -65,7 +65,7 @@ return [
|
||||
|
|
||||
*/
|
||||
'json' => [
|
||||
'path' => storage_path() . '/settings.json',
|
||||
'path' => env('SETTING_JSON_PATH', storage_path('settings.json')),
|
||||
],
|
||||
|
||||
/*
|
||||
|
@ -10,13 +10,13 @@ return [
|
||||
|
||||
'minor' => '0',
|
||||
|
||||
'patch' => '3',
|
||||
'patch' => '6',
|
||||
|
||||
'build' => '',
|
||||
|
||||
'status' => 'Stable',
|
||||
|
||||
'date' => '24-Feb-2020',
|
||||
'date' => '13-Mar-2020',
|
||||
|
||||
'time' => '18:30',
|
||||
|
||||
|
@ -27,12 +27,35 @@ class SampleData extends Seeder
|
||||
$count = (int) $this->command->option('count');
|
||||
$acc_count = ($count <= 10) ? $count : 10;
|
||||
|
||||
$this->command->info('Creating sample data...');
|
||||
|
||||
$bar = $this->command->getOutput()->createProgressBar(6);
|
||||
$bar->setFormat('verbose');
|
||||
|
||||
$bar->start();
|
||||
|
||||
factory(Contact::class, $count)->create();
|
||||
$bar->advance();
|
||||
|
||||
factory(Category::class, $count)->create();
|
||||
$bar->advance();
|
||||
|
||||
factory(Item::class, $count)->create();
|
||||
$bar->advance();
|
||||
|
||||
factory(Account::class, $acc_count)->create();
|
||||
$bar->advance();
|
||||
|
||||
factory(Bill::class, $count)->create();
|
||||
$bar->advance();
|
||||
|
||||
factory(Invoice::class, $count)->create();
|
||||
$bar->advance();
|
||||
|
||||
$bar->finish();
|
||||
|
||||
$this->command->info('');
|
||||
$this->command->info('Sample data created.');
|
||||
|
||||
Model::unguard();
|
||||
}
|
||||
|
@ -1,16 +1,24 @@
|
||||
<div>
|
||||
<div class="d-none">
|
||||
@if (!empty($setting['name']))
|
||||
<h2>{{ $setting['name'] }}</h2>
|
||||
@endif
|
||||
|
||||
@if ($setting['description'])
|
||||
@if (!empty($setting['description']))
|
||||
<div class="well well-sm">
|
||||
{{ $setting['description'] }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="buttons">
|
||||
<div class="float-right">
|
||||
<div class="pull-right">
|
||||
<input type="button" value="{{ trans('offline-payments::general.confirm') }}" id="button-confirm" class="btn btn-success" data-loading-text="{{ trans('offline-payments::general.loading') }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-confirm').on('click', function() {
|
||||
$.ajax({
|
||||
|
@ -1,5 +1,8 @@
|
||||
<div>
|
||||
<div class="d-none">
|
||||
@if (!empty($setting['name']))
|
||||
<h2>{{ $setting['name'] }}</h2>
|
||||
@endif
|
||||
|
||||
@if ($setting['mode'] == 'sandbox')
|
||||
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> {{ trans('paypal-standard::general.test_mode') }}</div>
|
||||
@ -8,7 +11,11 @@
|
||||
<div class="well well-sm">
|
||||
{{ trans('paypal-standard::general.description') }}
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<div class="buttons">
|
||||
<div class="pull-right">
|
||||
<form action="{{ $setting['action'] }}" method="post">
|
||||
<input type="hidden" name="cmd" value="_cart" />
|
||||
<input type="hidden" name="upload" value="1" />
|
||||
@ -39,10 +46,8 @@
|
||||
<input type="hidden" name="custom" value="{{ $invoice->id }}" />
|
||||
<input type="hidden" name="bn" value="Akaunting_2.0_WPS" />
|
||||
|
||||
<div class="buttons">
|
||||
<div class="float-right">
|
||||
<input type="submit" value="{{ trans('general.confirm') }}" class="btn btn-success" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
19
public/css/akaunting-color.css
vendored
19
public/css/akaunting-color.css
vendored
@ -1981,7 +1981,7 @@ button.bg-yellow:focus
|
||||
/*--Selected Submenu Arrow Color Finish--*/
|
||||
|
||||
/*--Selected Icon Color--*/
|
||||
.navbar-vertical.navbar-expand-xs .navbar-nav > .nav-item > .nav-link.active
|
||||
.navbar-vertical.navbar-expand-xs, .navbar-vertical.navbar-expand-sm .navbar-nav > .nav-item > .nav-link.active
|
||||
{
|
||||
color: #161842 !important;
|
||||
}
|
||||
@ -1995,14 +1995,14 @@ button.bg-yellow:focus
|
||||
/*--Selected Text Color Finish--*/
|
||||
|
||||
/*--Selected Submenu Main Arrow Default Color--*/
|
||||
.navbar-vertical.navbar-expand-xs .navbar-nav > .nav-item > .nav-link.active.show[aria-expanded='false']:after
|
||||
.navbar-vertical.navbar-expand-xs, .navbar-vertical.navbar-expand-sm .navbar-nav > .nav-item > .nav-link.active.show[aria-expanded='false']:after
|
||||
{
|
||||
color: #161842 !important;
|
||||
}
|
||||
/*--Selected Submenu Main Arrow Default Color Finish--*/
|
||||
|
||||
/*--Selected Submenu Main Arrow Selected Color--*/
|
||||
.navbar-vertical.navbar-expand-xs .navbar-nav > .nav-item > .nav-link.active.show[aria-expanded='true']:after
|
||||
.navbar-vertical.navbar-expand-xs, .navbar-vertical.navbar-expand-sm .navbar-nav > .nav-item > .nav-link.active.show[aria-expanded='true']:after
|
||||
{
|
||||
color: #161842 !important;
|
||||
}
|
||||
@ -2087,6 +2087,11 @@ div.required .form-control-label:not(span):after, td.required:after
|
||||
box-shadow: rgba(248, 248, 255) 0 0 0 1px, rgba(248, 248, 255) 0 4px 16px;
|
||||
}
|
||||
|
||||
.btn-icon-clipboard:focus
|
||||
{
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/*--Settings Board Icon Color--*/
|
||||
.btn-icon-clipboard i
|
||||
{
|
||||
@ -2323,7 +2328,7 @@ option:focus
|
||||
/*--------Login Card Background Color Finish--------*/
|
||||
|
||||
|
||||
/*--------General Progress Bar Color--------*/
|
||||
/*--General Progress Bar Color---*/
|
||||
#nprogress .bar
|
||||
{
|
||||
background: #3f3c72 !important;
|
||||
@ -2340,10 +2345,10 @@ option:focus
|
||||
{
|
||||
box-shadow: 0 0 10px #3f3c72, 0 0 5px #3f3c72 !important;
|
||||
}
|
||||
/*--------General Progress Bar Color Finish--------*/
|
||||
/*--General Progress Bar Color Finish---*/
|
||||
|
||||
|
||||
/*--------List Group Item Active-------*/
|
||||
/*--List Group Item Active---*/
|
||||
.list-group-item.active
|
||||
{
|
||||
z-index: 2;
|
||||
@ -2351,7 +2356,7 @@ option:focus
|
||||
background-color: #3c3f72 !important;
|
||||
border-color: #3c3f72 !important;
|
||||
}
|
||||
/*--------List Group Item Active Finish-------*/
|
||||
/*--List Group Item Active Finish---*/
|
||||
|
||||
|
||||
/*--Wizard Delete Button Text--*/
|
||||
|
33
public/css/custom.css
vendored
33
public/css/custom.css
vendored
@ -526,7 +526,6 @@ button:focus
|
||||
box-shadow: none !important;
|
||||
}
|
||||
/*--------Shadow None Focus Finish--------*/
|
||||
|
||||
/*--------Settings Index Page Finish--------*/
|
||||
|
||||
|
||||
@ -635,10 +634,21 @@ table .align-items-center td span.badge
|
||||
|
||||
|
||||
/*--------Report Column--------*/
|
||||
.report-column
|
||||
.report-column-name
|
||||
{
|
||||
max-width: 100px;
|
||||
width: 160px !important;
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: 0 0 10%;
|
||||
flex: 0 0 10%;
|
||||
width: 10%;
|
||||
max-width: 10%;
|
||||
}
|
||||
|
||||
.report-column-value
|
||||
{
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: 0 0 6.66%;
|
||||
flex: 0 0 6.66%;
|
||||
max-width: 6.66%;
|
||||
}
|
||||
/*--------Report Column Finish--------*/
|
||||
|
||||
@ -849,10 +859,7 @@ table .align-items-center td span.badge
|
||||
/*--Sm Breakpoint--*/
|
||||
@media (min-width: 576px) and (max-width: 767.98px)
|
||||
{
|
||||
.dashboard-action
|
||||
{
|
||||
margin-left: 4rem !important;
|
||||
}
|
||||
|
||||
}
|
||||
/*--Sm Breakpoint Finish--*/
|
||||
|
||||
@ -863,11 +870,6 @@ table .align-items-center td span.badge
|
||||
{
|
||||
left: 1rem !important;
|
||||
}
|
||||
|
||||
.dashboard-action
|
||||
{
|
||||
margin-left: 3rem !important;
|
||||
}
|
||||
}
|
||||
/*--Md Breakpoint Finish--*/
|
||||
|
||||
@ -878,11 +880,6 @@ table .align-items-center td span.badge
|
||||
{
|
||||
left: 1rem;
|
||||
}
|
||||
|
||||
.dashboard-action
|
||||
{
|
||||
margin-left: 1rem !important;
|
||||
}
|
||||
}
|
||||
/*--Lg Breakpoint Finish--*/
|
||||
/*--------Responsive Finish--------*/
|
||||
|
59
public/css/element.css
vendored
59
public/css/element.css
vendored
@ -15664,3 +15664,62 @@
|
||||
color: #3c3f72 !important;
|
||||
}
|
||||
/*--------El Select Finish--------*/
|
||||
|
||||
@media (max-width: 575.98px)
|
||||
{
|
||||
/*--Date Time Picker--*/
|
||||
.el-date-range-picker.has-sidebar
|
||||
{
|
||||
width: 99% !important;
|
||||
}
|
||||
|
||||
.el-picker-panel__shortcut
|
||||
{
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.el-picker-panel__body-wrapper
|
||||
{
|
||||
flex-flow: column !important;
|
||||
}
|
||||
|
||||
.el-picker-panel__sidebar
|
||||
{
|
||||
position:unset !important;
|
||||
width: 100% !important;
|
||||
border-right:none !important;
|
||||
}
|
||||
|
||||
.el-picker-panel__body
|
||||
{
|
||||
position: unset !important;
|
||||
display: flex !important;
|
||||
flex-flow: column !important;
|
||||
}
|
||||
|
||||
.el-picker-panel__sidebar+.el-picker-panel__body
|
||||
{
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
.el-date-range-picker .el-picker-panel__body
|
||||
{
|
||||
min-width: 100% !important;
|
||||
}
|
||||
|
||||
.el-date-range-picker .el-picker-panel__content
|
||||
{
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.el-date-range-picker__content
|
||||
{
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.el-date-range-picker__content.is-left
|
||||
{
|
||||
border-right: none !important;
|
||||
}
|
||||
/*--Date Time Picker Finish--*/
|
||||
}
|
||||
|
69
public/css/print.css
vendored
69
public/css/print.css
vendored
@ -39,6 +39,16 @@ th, td
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.mt-0
|
||||
{
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.mt-1
|
||||
{
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.mt-2
|
||||
{
|
||||
margin-top: 16px;
|
||||
@ -111,6 +121,41 @@ th, td
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
.pl-3
|
||||
{
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.pl-4
|
||||
{
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
.pl-5
|
||||
{
|
||||
padding-left: 40px;
|
||||
}
|
||||
|
||||
.pl-6
|
||||
{
|
||||
padding-left: 48px;
|
||||
}
|
||||
|
||||
.pl-7
|
||||
{
|
||||
padding-left: 56px;
|
||||
}
|
||||
|
||||
.pl-8
|
||||
{
|
||||
padding-left: 64px;
|
||||
}
|
||||
|
||||
.pl-9
|
||||
{
|
||||
padding-left: 72px;
|
||||
}
|
||||
|
||||
.border-1
|
||||
{
|
||||
border: 1px solid #e5e5e5;
|
||||
@ -141,10 +186,15 @@ th, td
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
.font-size-unset
|
||||
{
|
||||
font-size: unset;
|
||||
}
|
||||
|
||||
.text
|
||||
{
|
||||
color: #3c3f72;
|
||||
margin-top:10px;
|
||||
margin-top:8px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
@ -280,7 +330,7 @@ th, td
|
||||
.invoice-classic-inline-frame
|
||||
{
|
||||
margin: 0.3% 1% 0.3% 1%;
|
||||
width: 95 !important;
|
||||
width: 95% !important;
|
||||
height: 59px;
|
||||
border: 3px solid #3c3f72;
|
||||
}
|
||||
@ -332,21 +382,14 @@ th, td
|
||||
/*--Print Template Classic Finish--*/
|
||||
|
||||
/*--Print Template Modern Start--*/
|
||||
.m-first-column
|
||||
.align-items-center
|
||||
{
|
||||
padding-top: 15px;
|
||||
padding-bottom:48px;
|
||||
align-items: center !important;
|
||||
}
|
||||
|
||||
.m-fc-left
|
||||
.d-flex
|
||||
{
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.m-fc-right
|
||||
{
|
||||
padding-left: 170px;
|
||||
margin-top: -70px;
|
||||
display: flex !important;
|
||||
}
|
||||
|
||||
.m-note
|
||||
|
94
resources/assets/js/components/AkauntingHtmlEditor.vue
Normal file
94
resources/assets/js/components/AkauntingHtmlEditor.vue
Normal file
@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<div class="quill">
|
||||
<div :id="toolbarId">
|
||||
<div class="ql-formats">
|
||||
<button class="ql-bold"></button>
|
||||
<button class="ql-italic"></button>
|
||||
<button class="ql-underline"></button>
|
||||
<button class="ql-link"></button>
|
||||
<button class="ql-blockquote"></button>
|
||||
<button type="button" class="ql-list" value="ordered"></button>
|
||||
<button type="button" class="ql-list" value="bullet"></button>
|
||||
</div>
|
||||
</div>
|
||||
<div :id="editorId" :name="name" class="" ref="editor">
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'akaunting-html-editor',
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
name: String
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
editor: null,
|
||||
content: null,
|
||||
lastHtmlValue: '',
|
||||
editorId: null,
|
||||
toolbarId: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initialize (Quill) {
|
||||
this.editor = new Quill(`#${this.editorId}`, {
|
||||
theme: 'snow',
|
||||
modules: {
|
||||
toolbar: `#${this.toolbarId}`
|
||||
}
|
||||
})
|
||||
|
||||
if (this.value.length > 0) {
|
||||
this.editor.pasteHTML(this.value)
|
||||
}
|
||||
|
||||
let editorRef = this.$refs.editor;
|
||||
let node = editorRef.children[0];
|
||||
this.editor.on('text-change', () => {
|
||||
let html = node.innerHTML
|
||||
if (html === '<p><br></p>') {
|
||||
html = '';
|
||||
}
|
||||
this.content = html
|
||||
this.$emit('input', this.content);
|
||||
})
|
||||
},
|
||||
pasteHTML () {
|
||||
if (!this.editor) {
|
||||
return
|
||||
}
|
||||
this.editor.pasteHTML(this.value)
|
||||
},
|
||||
randomString() {
|
||||
let text = "";
|
||||
let possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
for (let i = 0; i < 5; i++)
|
||||
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
||||
|
||||
return text;
|
||||
}
|
||||
},
|
||||
async mounted () {
|
||||
let Quill = await import('quill')
|
||||
Quill = Quill.default || Quill
|
||||
this.editorId = this.randomString();
|
||||
this.toolbarId = this.randomString();
|
||||
this.$nextTick(() => {
|
||||
this.initialize(Quill)
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
value (newVal) {
|
||||
if (newVal !== this.content) {
|
||||
this.pasteHTML(newVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -55,6 +55,8 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
|
||||
<el-option-group
|
||||
@ -67,10 +69,12 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
</el-option-group>
|
||||
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :value="add_new">
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :disabled="true" :value="add_new">
|
||||
<div @click="onAddItem">
|
||||
<i class="fas fa-plus"></i>
|
||||
<span>
|
||||
@ -124,6 +128,8 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
|
||||
<el-option-group
|
||||
@ -136,10 +142,12 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
</el-option-group>
|
||||
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :value="add_new">
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :disabled="true" :value="add_new">
|
||||
<div @click="onAddItem">
|
||||
<i class="fas fa-plus"></i>
|
||||
<span>
|
||||
@ -193,6 +201,8 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
|
||||
<el-option-group
|
||||
@ -205,10 +215,12 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
</el-option-group>
|
||||
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :value="add_new">
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :disabled="true" :value="add_new">
|
||||
<div @click="onAddItem">
|
||||
<i class="fas fa-plus"></i>
|
||||
<span>
|
||||
@ -262,6 +274,8 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
|
||||
<el-option-group
|
||||
@ -274,10 +288,12 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
</el-option-group>
|
||||
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :value="add_new">
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :disabled="true" :value="add_new">
|
||||
<div @click="onAddItem">
|
||||
<i class="fas fa-plus"></i>
|
||||
<span>
|
||||
@ -331,6 +347,8 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
|
||||
<el-option-group
|
||||
@ -343,10 +361,12 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
</el-option-group>
|
||||
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :value="add_new">
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :disabled="true" :value="add_new">
|
||||
<div @click="onAddItem">
|
||||
<i class="fas fa-plus"></i>
|
||||
<span>
|
||||
@ -356,10 +376,12 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<component v-bind:is="add_new_html" @submit="onSubmit"></component>
|
||||
<component v-bind:is="add_new_html" @submit="onSubmit" @cancel="onCancel"></component>
|
||||
|
||||
<span slot="infoBlock" class="badge badge-success badge-resize float-right" v-if="new_options[real_model]">{{ new_text }}</span>
|
||||
|
||||
<select :name="name" v-model="real_model" class="d-none">
|
||||
<option v-for="(label, value) in selectOptions" :value="value">{{ label }}</option>
|
||||
<option v-for="(label, value) in selectOptions" :key="value" :value="value">{{ label }}</option>
|
||||
</select>
|
||||
</base-input>
|
||||
</template>
|
||||
@ -371,6 +393,7 @@ import { Select, Option, OptionGroup, ColorPicker } from 'element-ui';
|
||||
|
||||
import AkauntingModalAddNew from './AkauntingModalAddNew';
|
||||
import AkauntingModal from './AkauntingModal';
|
||||
import AkauntingMoney from './AkauntingMoney';
|
||||
import AkauntingRadioGroup from './forms/AkauntingRadioGroup';
|
||||
import AkauntingSelect from './AkauntingSelect';
|
||||
import AkauntingDate from './AkauntingDate';
|
||||
@ -390,6 +413,7 @@ export default {
|
||||
AkauntingRadioGroup,
|
||||
AkauntingSelect,
|
||||
AkauntingModal,
|
||||
AkauntingMoney,
|
||||
AkauntingDate,
|
||||
AkauntingRecurring,
|
||||
},
|
||||
@ -446,7 +470,8 @@ export default {
|
||||
status: false,
|
||||
path: null,
|
||||
type: 'modal', // modal, inline
|
||||
field: 'name',
|
||||
field: {},
|
||||
new_text: 'New',
|
||||
buttons: {}
|
||||
};
|
||||
},
|
||||
@ -493,61 +518,90 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
add_new: this.addNew,
|
||||
add_new: {
|
||||
text: this.addNew.text,
|
||||
show: false,
|
||||
path: this.addNew.path,
|
||||
type: this.addNew.type, // modal, inline
|
||||
field: this.addNew.field,
|
||||
buttons: this.addNew.buttons
|
||||
},
|
||||
add_new_text: this.addNew.text,
|
||||
new_text: this.addNew.new_text,
|
||||
selectOptions: this.options,
|
||||
real_model: this.model,
|
||||
add_new_html: '',
|
||||
form: {},
|
||||
new_options: false,
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.new_options = {};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.real_model = this.value;
|
||||
|
||||
if (this.multiple && !this.real_model.length) {
|
||||
this.real_model = [];
|
||||
}
|
||||
|
||||
this.$emit('interface', this.real_model);
|
||||
},
|
||||
|
||||
methods: {
|
||||
change() {
|
||||
this.$emit('change', this.real_model);
|
||||
if (typeof(this.real_model) === 'object' && typeof(this.real_model.type) !== 'undefined') {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.$emit('interface', this.real_model);
|
||||
this.$emit('change', this.real_model);
|
||||
},
|
||||
|
||||
onAddItem() {
|
||||
async onAddItem() {
|
||||
// Get Select Input value
|
||||
if (this.title) {
|
||||
var value = this.$children[0].$children[0].$children[0].$refs.input.value;
|
||||
} else {
|
||||
var value = this.$children[0].$children[0].$refs.input.value;
|
||||
}
|
||||
|
||||
if (this.add_new.type == 'inline') {
|
||||
this.addInline(value);
|
||||
if (value === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
await this.addInline(value);
|
||||
} else {
|
||||
this.onModal(value);
|
||||
await this.onModal(value);
|
||||
}
|
||||
},
|
||||
|
||||
addInline(value) {
|
||||
|
||||
},
|
||||
|
||||
onModal(value) {
|
||||
let add_new = this.add_new;
|
||||
|
||||
axios.get(this.add_new.path)
|
||||
window.axios.get(this.add_new.path)
|
||||
.then(response => {
|
||||
add_new.status = true;
|
||||
add_new.show = true;
|
||||
add_new.html = response.data.html;
|
||||
|
||||
this.$children[0].$children[0].visible = false;
|
||||
|
||||
this.add_new_html = Vue.component('add-new-component', function (resolve, reject) {
|
||||
resolve({
|
||||
template: '<div><akaunting-modal-add-new :show="add_new.status" @submit="onSubmit" @cancel="add_new.status = false" :buttons="add_new.buttons" :title="add_new.text" :is_component=true :message="add_new.html"></akaunting-modal-add-new></div>',
|
||||
template: '<div><akaunting-modal-add-new :show="add_new.show" @submit="onSubmit" @cancel="onCancel" :buttons="add_new.buttons" :title="add_new.text" :is_component=true :message="add_new.html"></akaunting-modal-add-new></div>',
|
||||
|
||||
components: {
|
||||
AkauntingModalAddNew,
|
||||
AkauntingRadioGroup,
|
||||
AkauntingSelect,
|
||||
AkauntingModal,
|
||||
AkauntingMoney,
|
||||
AkauntingDate,
|
||||
AkauntingRecurring,
|
||||
[ColorPicker.name]: ColorPicker,
|
||||
@ -562,6 +616,10 @@ export default {
|
||||
methods: {
|
||||
onSubmit(event) {
|
||||
this.$emit('submit', event);
|
||||
},
|
||||
|
||||
onCancel(event) {
|
||||
this.$emit('cancel', event);
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -578,17 +636,66 @@ export default {
|
||||
onSubmit(event) {
|
||||
this.form = event;
|
||||
|
||||
axios.post(this.form.action, this.form.data())
|
||||
this.loading = true;
|
||||
|
||||
let data = this.form.data();
|
||||
|
||||
FormData.prototype.appendRecursive = function(data, wrapper = null) {
|
||||
for(var name in data) {
|
||||
if (wrapper) {
|
||||
if ((typeof data[name] == 'object' || data[name].constructor === Array) && ((data[name] instanceof File != true ) && (data[name] instanceof Blob != true))) {
|
||||
this.appendRecursive(data[name], wrapper + '[' + name + ']');
|
||||
} else {
|
||||
this.append(wrapper + '[' + name + ']', data[name]);
|
||||
}
|
||||
} else {
|
||||
if ((typeof data[name] == 'object' || data[name].constructor === Array) && ((data[name] instanceof File != true ) && (data[name] instanceof Blob != true))) {
|
||||
this.appendRecursive(data[name], name);
|
||||
} else {
|
||||
this.append(name, data[name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let form_data = new FormData();
|
||||
form_data.appendRecursive(data);
|
||||
|
||||
window.axios({
|
||||
method: this.form.method,
|
||||
url: this.form.action,
|
||||
data: form_data,
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': window.Laravel.csrfToken,
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.form.loading = false;
|
||||
|
||||
if (response.data.success) {
|
||||
this.selectOptions[response.data.data.id] = response.data.data['name'];
|
||||
this.real_model = response.data.data.id.toString();
|
||||
if (!Object.keys(this.options).length) {
|
||||
this.selectOptions = {};
|
||||
}
|
||||
|
||||
this.selectOptions[response.data.data[this.add_new.field.key]] = response.data.data[this.add_new.field.value];
|
||||
this.new_options[response.data.data[this.add_new.field.key]] = response.data.data[this.add_new.field.value];
|
||||
|
||||
if (this.multiple) {
|
||||
this.real_model.push(response.data.data[this.add_new.field.key].toString());
|
||||
} else {
|
||||
this.real_model = response.data.data[this.add_new.field.key].toString();
|
||||
}
|
||||
|
||||
this.add_new.show = false;
|
||||
|
||||
this.add_new.html = '';
|
||||
this.add_new_html = null;
|
||||
|
||||
this.$emit('new', response.data.data);
|
||||
|
||||
this.change();
|
||||
|
||||
//this.add_new.status = false;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
@ -600,6 +707,12 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
onCancel() {
|
||||
this.add_new.show = false;
|
||||
this.add_new.html = null;
|
||||
this.add_new_html = null;
|
||||
},
|
||||
|
||||
addModal() {
|
||||
|
||||
},
|
||||
@ -609,6 +722,18 @@ export default {
|
||||
options: function (options) {
|
||||
// update options
|
||||
this.selectOptions = options;
|
||||
|
||||
if (Object.keys(this.new_options).length) {
|
||||
if (!Object.keys(this.options).length) {
|
||||
this.selectOptions = {};
|
||||
}
|
||||
|
||||
for (let [key, value] of Object.entries(this.new_options)) {
|
||||
if (!this.selectOptions[key]) {
|
||||
this.selectOptions[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
value: function (value) {
|
||||
@ -667,4 +792,11 @@ export default {
|
||||
.el-select__footer div span {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.badge-resize {
|
||||
float: right;
|
||||
margin-top: -32px;
|
||||
margin-right: 35px;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,5 +1,16 @@
|
||||
<template>
|
||||
<base-input v-if="title" :label="title" :name="name" :class="formClasses" :error="formError">
|
||||
<base-input
|
||||
v-if="title"
|
||||
:label="title"
|
||||
:name="name"
|
||||
:readonly="readonly"
|
||||
:disabled="disabled"
|
||||
:class="[
|
||||
{'readonly': readonly},
|
||||
{'disabled': disabled},
|
||||
formClasses
|
||||
]"
|
||||
:error="formError">
|
||||
<el-select v-model="real_model" @input="change" disabled filterable v-if="disabled"
|
||||
:placeholder="placeholder">
|
||||
<div v-if="addNew.status && options.length != 0" class="el-select-dropdown__wrap" slot="empty">
|
||||
@ -44,6 +55,8 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
|
||||
<el-option-group
|
||||
@ -56,10 +69,12 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
</el-option-group>
|
||||
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :value="add_new">
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :disabled="true" :value="add_new">
|
||||
<div @click="onAddItem">
|
||||
<i class="fas fa-plus"></i>
|
||||
<span>
|
||||
@ -113,6 +128,8 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
|
||||
<el-option-group
|
||||
@ -125,10 +142,12 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
</el-option-group>
|
||||
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :value="add_new">
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :disabled="true" :value="add_new">
|
||||
<div @click="onAddItem">
|
||||
<i class="fas fa-plus"></i>
|
||||
<span>
|
||||
@ -182,6 +201,8 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
|
||||
<el-option-group
|
||||
@ -194,10 +215,12 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
</el-option-group>
|
||||
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :value="add_new">
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :disabled="true" :value="add_new">
|
||||
<div @click="onAddItem">
|
||||
<i class="fas fa-plus"></i>
|
||||
<span>
|
||||
@ -251,6 +274,8 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
|
||||
<el-option-group
|
||||
@ -263,10 +288,12 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
</el-option-group>
|
||||
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :value="add_new">
|
||||
<el-option v-if="addNew.status && options.length != 0" class="el-select__footer" :disabled="true" :value="add_new">
|
||||
<div @click="onAddItem">
|
||||
<i class="fas fa-plus"></i>
|
||||
<span>
|
||||
@ -278,12 +305,15 @@
|
||||
|
||||
<component v-bind:is="add_new_html" @submit="onSubmit"></component>
|
||||
|
||||
<select :name="name" class="d-none" v-model="real_model">
|
||||
<option v-for="(label, value) in selectOptions" :value="value">{{ label }}</option>
|
||||
<select :name="name" v-model="real_model" class="d-none">
|
||||
<option v-for="(label, value) in selectOptions" :key="value" :value="value">{{ label }}</option>
|
||||
</select>
|
||||
|
||||
<span slot="infoBlock" class="badge badge-success badge-resize float-right" v-if="new_options[real_model]">{{ new_text }}</span>
|
||||
</base-input>
|
||||
|
||||
<el-select v-else
|
||||
<span v-else>
|
||||
<el-select
|
||||
:class="'pl-20 mr-40'"
|
||||
v-model="real_model"
|
||||
@input="change"
|
||||
@ -341,6 +371,8 @@
|
||||
:key="option.id"
|
||||
:label="option.name"
|
||||
:value="option.id">
|
||||
<span class="float-left">{{ option.name }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[option.id]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
|
||||
<el-option-group
|
||||
@ -353,10 +385,12 @@
|
||||
:key="value"
|
||||
:label="label"
|
||||
:value="value">
|
||||
<span class="float-left">{{ label }}</span>
|
||||
<span class="badge badge-pill badge-success float-right mt-2" v-if="new_options[value]">{{ new_text }}</span>
|
||||
</el-option>
|
||||
</el-option-group>
|
||||
|
||||
<el-option v-if="!loading && addNew.status && selectOptions != null && selectOptions.length != 0" class="el-select__footer" :value="add_new">
|
||||
<el-option v-if="!loading && addNew.status && selectOptions != null && selectOptions.length != 0" class="el-select__footer" :disabled="true" :value="add_new">
|
||||
<div @click="onAddItem">
|
||||
<i class="fas fa-plus"></i>
|
||||
<span>
|
||||
@ -365,6 +399,9 @@
|
||||
</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<span class="badge badge-success badge-resize float-right mr-2" v-if="new_options[real_model]">{{ new_text }}</span>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -374,6 +411,7 @@ import { Select, Option, OptionGroup, ColorPicker } from 'element-ui';
|
||||
|
||||
import AkauntingModalAddNew from './AkauntingModalAddNew';
|
||||
import AkauntingModal from './AkauntingModal';
|
||||
import AkauntingMoney from './AkauntingMoney';
|
||||
import AkauntingRadioGroup from './forms/AkauntingRadioGroup';
|
||||
import AkauntingSelect from './AkauntingSelect';
|
||||
import AkauntingDate from './AkauntingDate';
|
||||
@ -393,6 +431,7 @@ export default {
|
||||
AkauntingRadioGroup,
|
||||
AkauntingSelect,
|
||||
AkauntingModal,
|
||||
AkauntingMoney,
|
||||
AkauntingDate,
|
||||
AkauntingRecurring,
|
||||
},
|
||||
@ -430,7 +469,11 @@ export default {
|
||||
},
|
||||
options: null,
|
||||
|
||||
model: null,
|
||||
model: {
|
||||
type: [String, Number],
|
||||
default: '',
|
||||
description: "Selectbox selected model"
|
||||
},
|
||||
|
||||
icon: {
|
||||
type: String,
|
||||
@ -446,6 +489,7 @@ export default {
|
||||
path: null,
|
||||
type: 'modal', // modal, inline
|
||||
field: 'name',
|
||||
new_text: 'New',
|
||||
buttons: {}
|
||||
};
|
||||
},
|
||||
@ -462,6 +506,11 @@ export default {
|
||||
default: false,
|
||||
description: "Multible feature status"
|
||||
},
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
description: "Selectbox disabled status"
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
@ -509,19 +558,36 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
add_new: this.addNew,
|
||||
add_new: {
|
||||
text: this.addNew.text,
|
||||
show: false,
|
||||
path: this.addNew.path,
|
||||
type: this.addNew.type, // modal, inline
|
||||
field: this.addNew.field,
|
||||
buttons: this.addNew.buttons
|
||||
},
|
||||
add_new_text: this.addNew.text,
|
||||
new_text: this.addNew.new_text,
|
||||
selectOptions: this.options,
|
||||
real_model: this.model,
|
||||
add_new_html: '',
|
||||
form: {},
|
||||
loading: false,
|
||||
new_options: false,
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.new_options = {};
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.real_model = this.value;
|
||||
|
||||
if (this.multiple && !this.real_model.length) {
|
||||
this.real_model = [];
|
||||
}
|
||||
|
||||
this.$emit('interface', this.real_model);
|
||||
},
|
||||
|
||||
@ -530,36 +596,32 @@ export default {
|
||||
if (query !== '') {
|
||||
this.loading = true;
|
||||
|
||||
/*
|
||||
this.list = [];
|
||||
this.selectOptions = this.options;
|
||||
|
||||
Object.keys(this.selectOptions).forEach(key => {
|
||||
const item = this.selectOptions[key];
|
||||
|
||||
if (item.toLowerCase().indexOf(query.toLowerCase()) > -1) {
|
||||
this.list.push(this.selectOptions[key]);
|
||||
}
|
||||
});
|
||||
|
||||
this.selectOptions = this.list;
|
||||
*/
|
||||
|
||||
if (!this.remoteAction) {
|
||||
this.remoteAction = url + '/common/items/autocomplete';
|
||||
}
|
||||
|
||||
axios.get(this.remoteAction, {
|
||||
window.axios({
|
||||
method: 'GET',
|
||||
url: this.remoteAction,
|
||||
params: {
|
||||
type: this.remoteType,
|
||||
query: query,
|
||||
currency_code: this.currencyCode,
|
||||
},
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': window.Laravel.csrfToken,
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.loading = false;
|
||||
|
||||
if (response.data.data) {
|
||||
this.selectOptions = response.data.data;
|
||||
} else {
|
||||
this.selectOptions = [];
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
})
|
||||
@ -572,20 +634,32 @@ export default {
|
||||
},
|
||||
|
||||
change() {
|
||||
this.$emit('change', this.real_model);
|
||||
if (typeof(this.real_model) === 'object') {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.$emit('interface', this.real_model);
|
||||
this.$emit('change', this.real_model);
|
||||
|
||||
this.selectOptions.forEach(item => {
|
||||
if (item.id == this.real_model) {
|
||||
this.$emit('label', item.name);
|
||||
this.$emit('option', item);
|
||||
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
onAddItem() {
|
||||
onPressEnter() {
|
||||
alert('Press Enter');
|
||||
},
|
||||
|
||||
OnPressTab() {
|
||||
alert('Press Tab');
|
||||
},
|
||||
|
||||
async onAddItem() {
|
||||
// Get Select Input value
|
||||
if (this.title) {
|
||||
var value = this.$children[0].$children[0].$children[0].$refs.input.value;
|
||||
@ -593,47 +667,56 @@ export default {
|
||||
var value = this.$children[0].$children[0].$refs.input.value;
|
||||
}
|
||||
|
||||
if (value === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.add_new.type == 'inline') {
|
||||
this.addInline(value);
|
||||
await this.addInline(value);
|
||||
} else {
|
||||
this.onModal(value);
|
||||
await this.onModal(value);
|
||||
}
|
||||
},
|
||||
|
||||
addInline(value) {
|
||||
axios.post(this.add_new.path, {
|
||||
window.axios.post(this.add_new.path, {
|
||||
'_token': window.Laravel.csrfToken,
|
||||
'type': 'inline',
|
||||
field: this.add_new.field,
|
||||
field: this.add_new.field.value,
|
||||
value: value,
|
||||
})
|
||||
.then(response => {
|
||||
if (response.data.success) {
|
||||
if (!Object.keys(this.options).length) {
|
||||
this.selectOptions = [];
|
||||
}
|
||||
|
||||
this.selectOptions.push(response.data.data);
|
||||
this.real_model = response.data.data.id;
|
||||
|
||||
this.change();
|
||||
this.new_options[response.data.data[this.add_new.field.key]] = response.data.data;
|
||||
this.real_model = response.data.data[this.add_new.field.key];
|
||||
|
||||
if (this.title) {
|
||||
this.$children[0].$children[0].visible = false;
|
||||
} else {
|
||||
this.$children[0].visible = false;
|
||||
}
|
||||
//this.add_new.status = false;
|
||||
|
||||
this.$emit('new', response.data.data);
|
||||
|
||||
this.change();
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
|
||||
onModal(value) {
|
||||
let add_new = this.add_new;
|
||||
|
||||
axios.get(this.add_new.path)
|
||||
window.axios.get(this.add_new.path)
|
||||
.then(response => {
|
||||
add_new.status = true;
|
||||
add_new.show = true;
|
||||
add_new.html = response.data.html;
|
||||
|
||||
if (this.title) {
|
||||
@ -644,13 +727,14 @@ export default {
|
||||
|
||||
this.add_new_html = Vue.component('add-new-component', function (resolve, reject) {
|
||||
resolve({
|
||||
template: '<div><akaunting-modal-add-new :show="add_new.status" @submit="onSubmit" @cancel="add_new.status = false" :buttons="add_new.buttons" :title="add_new.text" :is_component=true :message="add_new.html"></akaunting-modal-add-new></div>',
|
||||
template: '<div><akaunting-modal-add-new :show="add_new.show" @submit="onSubmit" @cancel="onCancel" :buttons="add_new.buttons" :title="add_new.text" :is_component=true :message="add_new.html"></akaunting-modal-add-new></div>',
|
||||
|
||||
components: {
|
||||
AkauntingModalAddNew,
|
||||
AkauntingRadioGroup,
|
||||
AkauntingSelect,
|
||||
AkauntingModal,
|
||||
AkauntingMoney,
|
||||
AkauntingDate,
|
||||
AkauntingRecurring,
|
||||
[ColorPicker.name]: ColorPicker,
|
||||
@ -665,6 +749,10 @@ export default {
|
||||
methods: {
|
||||
onSubmit(event) {
|
||||
this.$emit('submit', event);
|
||||
},
|
||||
|
||||
onCancel(event) {
|
||||
this.$emit('cancel', event);
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -681,17 +769,62 @@ export default {
|
||||
onSubmit(event) {
|
||||
this.form = event;
|
||||
|
||||
axios.post(this.form.action, this.form.data())
|
||||
this.loading = true;
|
||||
|
||||
let data = this.form.data();
|
||||
|
||||
FormData.prototype.appendRecursive = function(data, wrapper = null) {
|
||||
for(var name in data) {
|
||||
if (wrapper) {
|
||||
if ((typeof data[name] == 'object' || data[name].constructor === Array) && ((data[name] instanceof File != true ) && (data[name] instanceof Blob != true))) {
|
||||
this.appendRecursive(data[name], wrapper + '[' + name + ']');
|
||||
} else {
|
||||
this.append(wrapper + '[' + name + ']', data[name]);
|
||||
}
|
||||
} else {
|
||||
if ((typeof data[name] == 'object' || data[name].constructor === Array) && ((data[name] instanceof File != true ) && (data[name] instanceof Blob != true))) {
|
||||
this.appendRecursive(data[name], name);
|
||||
} else {
|
||||
this.append(name, data[name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let form_data = new FormData();
|
||||
form_data.appendRecursive(data);
|
||||
|
||||
window.axios({
|
||||
method: this.form.method,
|
||||
url: this.form.action,
|
||||
data: form_data,
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': window.Laravel.csrfToken,
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
'Content-Type': 'multipart/form-data'
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
this.form.loading = false;
|
||||
|
||||
if (response.data.success) {
|
||||
this.selectOptions[response.data.data.id] = response.data.data['name'];
|
||||
this.real_model = response.data.data.id.toString();
|
||||
if (!Object.keys(this.options).length) {
|
||||
this.selectOptions = [];
|
||||
}
|
||||
|
||||
this.selectOptions.push(response.data.data);
|
||||
//this.selectOptions[response.data.data[this.add_new.field.key]] = response.data.data[this.add_new.field.value];
|
||||
this.new_options[response.data.data[this.add_new.field.key]] = response.data.data[this.add_new.field.value];
|
||||
this.real_model = response.data.data[this.add_new.field.key];//.toString();
|
||||
|
||||
this.add_new.show = false;
|
||||
|
||||
this.add_new.html = '';
|
||||
this.add_new_html = null;
|
||||
|
||||
this.$emit('new', response.data.data);
|
||||
|
||||
this.change();
|
||||
|
||||
//this.add_new.status = false;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
@ -702,12 +835,32 @@ export default {
|
||||
this.method_show_html = error.message;
|
||||
});
|
||||
},
|
||||
|
||||
onCancel() {
|
||||
this.add_new.show = false;
|
||||
this.add_new.html = null;
|
||||
this.add_new_html = null;
|
||||
},
|
||||
|
||||
addModal() {
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
options: function (options) {
|
||||
// update options
|
||||
//this.selectOptions = options;
|
||||
this.selectOptions = options;
|
||||
|
||||
if (Object.keys(this.new_options).length) {
|
||||
if (!Object.keys(this.options).length) {
|
||||
this.selectOptions = [];
|
||||
}
|
||||
|
||||
Object.values(this.new_options).forEach(item => {
|
||||
this.selectOptions.push(item);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
value: function (value) {
|
||||
@ -771,4 +924,11 @@ export default {
|
||||
.el-select__footer div span {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.badge-resize {
|
||||
float: right;
|
||||
margin-top: -32px;
|
||||
margin-right: 35px;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
5
resources/assets/js/mixins/global.js
vendored
5
resources/assets/js/mixins/global.js
vendored
@ -11,12 +11,13 @@ import AkauntingSelect from './../components/AkauntingSelect';
|
||||
import AkauntingSelectRemote from './../components/AkauntingSelectRemote';
|
||||
import AkauntingDate from './../components/AkauntingDate';
|
||||
import AkauntingRecurring from './../components/AkauntingRecurring';
|
||||
import AkauntingHtmlEditor from './../components/AkauntingHtmlEditor';
|
||||
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
import NProgressAxios from './../plugins/nprogress-axios';
|
||||
|
||||
import { Select, Option, Steps, Step, Button, Link, Tooltip } from 'element-ui';
|
||||
import { Select, Option, Steps, Step, Button, Link, Tooltip, ColorPicker } from 'element-ui';
|
||||
|
||||
import Form from './../plugins/form';
|
||||
|
||||
@ -31,6 +32,7 @@ export default {
|
||||
AkauntingModalAddNew,
|
||||
AkauntingDate,
|
||||
AkauntingRecurring,
|
||||
AkauntingHtmlEditor,
|
||||
[Select.name]: Select,
|
||||
[Option.name]: Option,
|
||||
[Steps.name]: Steps,
|
||||
@ -38,6 +40,7 @@ export default {
|
||||
[Button.name]: Button,
|
||||
[Link.name]: Link,
|
||||
[Tooltip.name]: Tooltip,
|
||||
[ColorPicker.name]: ColorPicker,
|
||||
},
|
||||
|
||||
data: function () {
|
||||
|
4
resources/assets/js/views/auth/forgot.js
vendored
4
resources/assets/js/views/auth/forgot.js
vendored
@ -19,11 +19,7 @@ const app = new Vue({
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
onSubmit() {
|
||||
this.form.submit();
|
||||
},
|
||||
|
4
resources/assets/js/views/auth/login.js
vendored
4
resources/assets/js/views/auth/login.js
vendored
@ -19,11 +19,7 @@ const app = new Vue({
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
onSubmit() {
|
||||
this.form.submit();
|
||||
},
|
||||
|
6
resources/assets/js/views/purchases/bills.js
vendored
6
resources/assets/js/views/purchases/bills.js
vendored
@ -50,10 +50,12 @@ const app = new Vue({
|
||||
items: '',
|
||||
discount: false,
|
||||
taxes: null,
|
||||
colspan: 5,
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.colspan = document.getElementById("items").rows[0].cells.length - 1;
|
||||
this.form.items = [];
|
||||
|
||||
if (this.form.method) {
|
||||
@ -255,11 +257,13 @@ const app = new Vue({
|
||||
},
|
||||
|
||||
onSelectItem(item, index) {
|
||||
let tax_id = (item.tax_id) ? [item.tax_id.toString()] : '';
|
||||
|
||||
this.form.items[index].item_id = item.id;
|
||||
this.form.items[index].name = item.name;
|
||||
this.form.items[index].price = (item.purchase_price).toFixed(2);
|
||||
this.form.items[index].quantity = 1;
|
||||
this.form.items[index].tax_id = [item.tax_id.toString()];
|
||||
this.form.items[index].tax_id = tax_id;
|
||||
this.form.items[index].total = (item.purchase_price).toFixed(2);
|
||||
},
|
||||
|
||||
|
6
resources/assets/js/views/sales/invoices.js
vendored
6
resources/assets/js/views/sales/invoices.js
vendored
@ -50,10 +50,12 @@ const app = new Vue({
|
||||
items: '',
|
||||
discount: false,
|
||||
taxes: null,
|
||||
colspan: 5,
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.colspan = document.getElementById("items").rows[0].cells.length - 1;
|
||||
this.form.items = [];
|
||||
|
||||
if (this.form.method) {
|
||||
@ -255,11 +257,13 @@ const app = new Vue({
|
||||
},
|
||||
|
||||
onSelectItem(item, index) {
|
||||
let tax_id = (item.tax_id) ? [item.tax_id.toString()] : '';
|
||||
|
||||
this.form.items[index].item_id = item.id;
|
||||
this.form.items[index].name = item.name;
|
||||
this.form.items[index].price = (item.sale_price).toFixed(2);
|
||||
this.form.items[index].quantity = 1;
|
||||
this.form.items[index].tax_id = [item.tax_id.toString()];
|
||||
this.form.items[index].tax_id = tax_id;
|
||||
this.form.items[index].total = (item.sale_price).toFixed(2);
|
||||
},
|
||||
|
||||
|
10
resources/assets/js/views/settings/settings.js
vendored
10
resources/assets/js/views/settings/settings.js
vendored
@ -14,11 +14,9 @@ import Global from './../../mixins/global';
|
||||
|
||||
import Form from './../../plugins/form';
|
||||
import BulkAction from './../../plugins/bulk-action';
|
||||
import HtmlEditor from './../../components/Inputs/HtmlEditor';
|
||||
import {ColorPicker} from 'element-ui';
|
||||
|
||||
// plugin setup
|
||||
Vue.use(DashboardPlugin, ColorPicker);
|
||||
Vue.use(DashboardPlugin);
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
@ -27,13 +25,9 @@ const app = new Vue({
|
||||
Global
|
||||
],
|
||||
|
||||
components: {
|
||||
HtmlEditor,
|
||||
[ColorPicker.name]: ColorPicker,
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.onChangeProtocol(this.form.protocol);
|
||||
|
||||
this.color = this.form.color;
|
||||
},
|
||||
|
||||
|
@ -33,7 +33,7 @@ return [
|
||||
'throttle' => 'عدد كبير جداً من محاولات تسجيل الدخول. يرجى إعادة المحاولة خلال :seconds ثواني.',
|
||||
|
||||
'notification' => [
|
||||
'message_1' => 'تم إرسال هذه الرسالة لإبلاغك بوجود طلب إعادة كلمة المرور على الحساب الخاص بك.',
|
||||
'message_1' => 'تم إرسال هذه الرسالة لإبلاغك بوجود طلب إعادة تعيين كلمة المرور على الحساب الخاص بك.',
|
||||
'message_2' => 'لا داعي لاتخاذ أي إجراء إذا لم تقم بطلب إعادة كلمة المرور.',
|
||||
'button' => 'إعادة تعيين كلمة المرور',
|
||||
],
|
||||
|
@ -22,8 +22,8 @@ return [
|
||||
'add_discount' => 'إضافة خصم',
|
||||
'discount_desc' => 'من المجموع الجزئي',
|
||||
|
||||
'payment_due' => 'استحقاق الدفع',
|
||||
'amount_due' => 'استحقاق المبلغ',
|
||||
'payment_due' => 'الدفع المستحق',
|
||||
'amount_due' => 'المبلغ المستحق',
|
||||
'paid' => 'مدفوع',
|
||||
'histories' => 'سجلات',
|
||||
'payments' => 'المدفوعات',
|
||||
@ -46,12 +46,12 @@ return [
|
||||
|
||||
'messages' => [
|
||||
'received' => 'تم تحويل فاتورة الشراء إلى فاتورة مستلمة بنجاح!',
|
||||
'draft' => 'هذة فاتورة شراء عبارة عن <b> مسودة </b> و سوف يتم تحويلها الى مخطط بعد ان يتم استحقاقها.',
|
||||
'draft' => 'هذة فاتورة شراء عبارة عن <b> مسودة </b> و سوف يتم اظهارها بالنظام بعد ان يتم استحقاقها.',
|
||||
|
||||
'status' => [
|
||||
'created' => 'إضافة في: تاريخ',
|
||||
'receive' => [
|
||||
'draft' => 'عدم الإرسال',
|
||||
'draft' => 'لم يتم ارسالها',
|
||||
'received' => 'وردت في: تاريخ',
|
||||
],
|
||||
'paid' => [
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
return [
|
||||
|
||||
'bulk_actions' => 'العمل بالجملة|الاعمال بالجملة',
|
||||
'bulk_actions' => 'الإجراء الجماعي - الإجراءات الجماعية',
|
||||
'selected' => 'مُحدد',
|
||||
|
||||
'message' => [
|
||||
@ -11,9 +11,9 @@ return [
|
||||
'export' => 'هل أنت متأكد من<b/> تصدير<b> السجلات المحددة؟',
|
||||
'enable' => 'هل أنت متأكد من<b/> تفعيل<b> السجلات المحددة؟',
|
||||
'disable' => 'هل أنت متأكد من <b/>تعطيل<b> السجلات المحددة؟',
|
||||
'paid' => 'هل تريد بالتأكيد وضع علامة على الفاتورة المحددة على أنها </b>مدفوعة<b> ؟',
|
||||
'sent' => 'هل تريد بالتأكيد وضع علامة على الفاتورة المحددة على أنها <b/>مرسلة<b>؟',
|
||||
'received' => 'هل تريد بالتأكيد وضع علامة على الفاتورة المحددة على أنها <b/>مستلمة<b>؟',
|
||||
'paid' => 'هل تريد وضع علامة على الفاتورة المحددة على أنها </b>مدفوعة<b> ؟',
|
||||
'sent' => 'هل تريد وضع علامة على الفاتورة المحددة على أنها <b/>تم أرسالها<b>؟',
|
||||
'received' => 'هل تريد وضع علامة على الفاتورة المحددة على أنها <b/>تم استلامها<b>؟',
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -3,7 +3,7 @@
|
||||
return [
|
||||
|
||||
'code' => 'كود',
|
||||
'rate' => 'القيمة',
|
||||
'rate' => 'المعدل',
|
||||
'default' => 'العملة الافتراضية',
|
||||
'decimal_mark' => 'علامة عشرية',
|
||||
'thousands_separator' => 'فاصل الآلاف',
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
return [
|
||||
|
||||
'can_login' => 'يستطيع تسجيل الدخول؟',
|
||||
'can_login' => 'هل يمكنك الدخول؟',
|
||||
'user_created' => 'تم إنشاء المستخدم',
|
||||
|
||||
'error' => [
|
||||
|
@ -3,9 +3,9 @@
|
||||
return [
|
||||
|
||||
'error' => [
|
||||
'not_user_dashboard' => 'خطأ: غير مسموح لك بتغيير لوحة القيادة هذه!',
|
||||
'delete_last' => 'خطأ: لا يمكن حذف لوحة القيادة الأخيرة. من فضلك ، قم بإنشاء واحدة جديدة أولا!',
|
||||
'disable_last' => 'خطأ: لا يمكن تعطيل لوحة القيادة الأخيرة. من فضلك ، قم بإنشاء واحدة جديدة أولا!',
|
||||
'not_user_dashboard' => 'خطأ: غير مسموح لك بتغيير لوحة المعلومات هذه!',
|
||||
'delete_last' => 'خطأ: لا يمكن حذف لوحة المعلومات الأخيرة. من فضلك ، قم بإنشاء واحدة جديدة أولا!',
|
||||
'disable_last' => 'خطأ: لا يمكن تعطيل لوحة المعلومات الأخيرة. من فضلك ، قم بإنشاء واحدة جديدة أولا!',
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -3,7 +3,7 @@
|
||||
return [
|
||||
|
||||
'accounts' => [
|
||||
'cash' => 'المال',
|
||||
'cash' => 'النقدية',
|
||||
],
|
||||
|
||||
'categories' => [
|
||||
@ -19,7 +19,7 @@ return [
|
||||
],
|
||||
|
||||
'offline_payments' => [
|
||||
'cash' => 'المال',
|
||||
'cash' => 'نقدا',
|
||||
'bank' => 'تحويل بنكي',
|
||||
],
|
||||
|
||||
|
@ -9,42 +9,42 @@ return [
|
||||
|
||||
'invoice_remind_customer' => [
|
||||
'subject' => 'إشعار بتأخر فاتورة رقم {invoice_number}',
|
||||
'body' => 'عزيزي {customer_name}،<br /><br /> هذا اشعار بتاخر فاتورة رقم <strong>{invoice_number}</strong>.<br /><br /> مجموع الفاتورة هو {invoice_total} و تاريخ الاستحقاق <strong>{invoice_due_date}</strong>.<br /><br /> يمكنك مشاهدة تفاصيل الفاتورة و اكمال الدفع عن طريق الرابط التالي: <a href="{invoice_guest_link}">{invoice_number}</a><br /><br />تقبل تحيّاتي،<br />{company_name}',
|
||||
'body' => 'عزيزي {customer_name}،<br /><br /> هذا اشعار بتأخر فاتورة رقم <strong>{invoice_number}</strong>.<br /><br /> مجموع الفاتورة هو {invoice_total} و تاريخ الاستحقاق <strong>{invoice_due_date}</strong>.<br /><br /> يمكنك مشاهدة تفاصيل الفاتورة و اكمال الدفع عن طريق الرابط التالي: <a href="{invoice_guest_link}">{invoice_number}</a><br /><br />تقبل تحيّاتي،<br />{company_name}',
|
||||
],
|
||||
|
||||
'invoice_remind_admin' => [
|
||||
'subject' => 'إشعار بتأخر فاتورة رقم {invoice_number}',
|
||||
'body' => 'مرحبا {customer_name}،<br /><br /> تلقى اشعار بتاخر فاتورة رقم <strong>{invoice_number}</strong>.<br /><br /> مجموع الفاتورة هو {invoice_total} و تاريخ الاستحقاق <strong>{invoice_due_date}</strong>.<br /><br /> يمكنك مشاهدة تفاصيل الفاتورة و اكمال الدفع عن طريق الرابط التالي: <a href="{invoice_admin_link}">{invoice_number}</a><br /><br />تقبل تحيّاتي،<br />{company_name}',
|
||||
'body' => 'مرحبا {customer_name}،<br /><br /> تلقى اشعار بتأخر فاتورة رقم <strong>{invoice_number}</strong>.<br /><br /> مجموع الفاتورة هو {invoice_total} و تاريخ الاستحقاق <strong>{invoice_due_date}</strong>.<br /><br /> يمكنك مشاهدة تفاصيل الفاتورة و اكمال الدفع عن طريق الرابط التالي: <a href="{invoice_admin_link}">{invoice_number}</a><br /><br />تقبل تحيّاتي،<br />{company_name}',
|
||||
],
|
||||
|
||||
'invoice_recur_customer' => [
|
||||
'subject' => 'تم إنشاء فاتورة متكررة',
|
||||
'body' => 'عزيزي {customer_name}،<br /><br /> قمنا باصدار الفاتورة التالية:<strong>{invoice_number}</strong>.<br /><br /> يمكنك اﻹطلاع على تفاصيل الفاتورة و اكمال الدفع عن طريق الرابط التالي: <a href="{invoice_guest_link}">{invoice_number}</a>.<br /><br />لاتتردد بالتواصل معنا لأي سؤال.<br /><br />تحيّاتي،<br />{company_name}',
|
||||
'body' => 'عزيزي {customer_name}،<br /><br /> بناء على الإتفاق الدورى, قمنا باصدار الفاتورة التالية:<strong>{invoice_number}</strong>.<br /><br /> يمكنك اﻹطلاع على تفاصيل الفاتورة و اكمال الدفع عن طريق الرابط التالي: <a href="{invoice_guest_link}">{invoice_number}</a>.<br /><br />لاتتردد بالتواصل معنا لأي سؤال.<br /><br />تحيّاتي،<br />{company_name}',
|
||||
],
|
||||
|
||||
'invoice_recur_admin' => [
|
||||
'subject' => '{invoice_number} تم إنشاء فاتورة متكررة',
|
||||
'body' => 'مرحبا,<br /><br /> استنادا الى الدائرة المتكررة ل {customer_name},<strong>{invoice_number}</strong> تم إنشاء الفاتورة أتوماتكيا <br /><br /> يمكنك الاطلاع على تفاصيل الفاتورة من الرابط:<a href="{invoice_admin_link}">{invoice_number}</a>.<br /><br />مع أطيب التحيات{br /> {company_name>',
|
||||
'body' => 'مرحبا,<br /><br /> بناء على الإتفاق الدورى ل {customer_name},<strong>{invoice_number}</strong> تم إنشاء الفاتورة أتوماتكيا <br /><br /> يمكنك الاطلاع على تفاصيل الفاتورة من الرابط:<a href="{invoice_admin_link}">{invoice_number}</a>.<br /><br />مع أطيب التحيات{br /> {company_name>',
|
||||
],
|
||||
|
||||
'invoice_payment_customer' => [
|
||||
'subject' => 'تم استلام الدفعة لفاتورة رقم {invoice_number}',
|
||||
'body' => 'عزيزي {customer_name}،<br /><br />شكرا للسداد، تجد تفاصيل الدفع في اﻷسفل:<br /><br />-------------------------------------------------<br /><br />القيمة: <strong>{transaction_total}<br /></strong> التاريخ: <strong>{transaction_paid_date}</strong><br /> رقم الفاتورة: <strong>{invoice_number}<br /><br /></strong>-------------------------------------------------<br /><br /> يمكنك بالتاكيد اﻹطلاع على تفاصيل الفاتورة من خلال الرابط التالي: <a href="{invoice_guest_link}">{invoice_number}</a>.<br /><br />لاتتردد بالتواصل معنا لأي سؤال.<br /><br />تحيّاتي،<br />{company_name}',
|
||||
'body' => 'عزيزي {customer_name}،<br /><br />شكرا للسداد، سوف تجد تفاصيل الدفع في اﻷسفل:<br /><br />-------------------------------------------------<br /><br />القيمة: <strong>{transaction_total}<br /></strong> التاريخ: <strong>{transaction_paid_date}</strong><br /> رقم الفاتورة: <strong>{invoice_number}<br /><br /></strong>-------------------------------------------------<br /><br /> يمكنك بالتاكيد اﻹطلاع على تفاصيل الفاتورة من خلال الرابط التالي: <a href="{invoice_guest_link}">{invoice_number}</a>.<br /><br />لاتتردد بالتواصل معنا لأي سؤال.<br /><br />تحيّاتي،<br />{company_name}',
|
||||
],
|
||||
|
||||
'invoice_payment_admin' => [
|
||||
'subject' => 'تم استلام الدفعة لفاتورة رقم {invoice_number}',
|
||||
'body' => 'مرحبا، <br /><br />{customer_name} قام بتسديد فاتورة <strong>{invoice_number}</strong>.<br /><br />يمكنك اﻹطلاع على تفاصيل الفاتورة من خلال الرابط التالي: <a href="{invoice_admin_link}">{invoice_number}</a>.<br /><br />تحيّاتي،<br />{company_name}',
|
||||
'body' => 'مرحبا، <br /><br />{customer_name} قام بتسديد فاتورة رقم <strong>{invoice_number}</strong>.<br /><br />يمكنك اﻹطلاع على تفاصيل الفاتورة من خلال الرابط التالي: <a href="{invoice_admin_link}">{invoice_number}</a>.<br /><br />تحيّاتي،<br />{company_name}',
|
||||
],
|
||||
|
||||
'bill_remind_admin' => [
|
||||
'subject' => '{bill_number} إشعار للتذكير بالفاتورة',
|
||||
'body' => 'مرحبا {customer_name}،<br /><br /> هذا إشعار بتاخر فاتورة رقم <strong>{invoice_number}</strong>.<br /><br /> مجموع الفاتورة هو {invoice_total} و تاريخ الاستحقاق <strong>{invoice_due_date}</strong>.<br /><br /> يمكنك مشاهدة تفاصيل الفاتورة و اكمال الدفع عن طريق الرابط التالي: <a href="{invoice_admin_link}">{invoice_number}</a><br /><br />تقبل تحيّاتي،<br />{company_name}',
|
||||
'body' => 'مرحبا {customer_name}،<br /><br /> هذا إشعار بتأخر فاتورة رقم <strong>{invoice_number}</strong>.<br /><br /> مجموع الفاتورة هو {invoice_total} و تاريخ الاستحقاق <strong>{invoice_due_date}</strong>.<br /><br /> يمكنك مشاهدة تفاصيل الفاتورة و اكمال الدفع عن طريق الرابط التالي: <a href="{invoice_admin_link}">{invoice_number}</a><br /><br />تقبل تحيّاتي،<br />{company_name}',
|
||||
],
|
||||
|
||||
'bill_recur_admin' => [
|
||||
'subject' => '{invoice_number} تم إنشاء فاتورة متكررة',
|
||||
'body' => 'مرحبا,<br /><br /> استنادا الى الدائرة المتكررة ل <vendor_name} <strong>{bill_number}</strong} تم إنشاء الفاتورة أتوماتكيا <br /><br /> يمكنك الاطلاع على تفاصيل الفاتورة من الرابط: <a href="{bill_admin_link}">{bill_number}</a>.<br /><br /< Regards,<br />{company_name} مع أطيب التحيات{br /> {company_name>',
|
||||
'body' => 'مرحبا,<br /><br /> بناء على الإتفاق الدورى ل <vendor_name} <strong>{bill_number}</strong} تم إنشاء الفاتورة أتوماتكيا <br /><br /> يمكنك الاطلاع على تفاصيل الفاتورة من الرابط: <a href="{bill_admin_link}">{bill_number}</a>.<br /><br /< Regards,<br />{company_name} مع أطيب التحيات{br /> {company_name>',
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -33,19 +33,19 @@ return [
|
||||
'payment_methods' => 'طريقة الدفع|طرق الدفع',
|
||||
'compares' => 'الإيراد مقابل المصروف|الإيرادات مقابل المصروفات',
|
||||
'notes' => 'ملحوظة|الملاحظات',
|
||||
'totals' => 'المجموع|المجاميع',
|
||||
'totals' => 'اجمالى|اجماليات',
|
||||
'languages' => 'اللغة|اللغات',
|
||||
'updates' => 'التحديث|التحديثات',
|
||||
'numbers' => 'الرقم|الأرقام',
|
||||
'statuses' => 'الحالة|الحالات',
|
||||
'others' => 'الأخرى|الأخريات',
|
||||
'contacts' => 'جهة اتصال|جهات اتصال',
|
||||
'reconciliations' => 'المصالحة | المصالحات',
|
||||
'reconciliations' => 'التسوية | التسويات',
|
||||
'developers' => 'مطور|مطورين',
|
||||
'schedules' => 'جدولة|جدولة',
|
||||
'groups' => 'مجموعة|مجموعات',
|
||||
'charts' => 'رسم بياني|رسوم بيانات',
|
||||
'localisations' => 'تحديد الموقع | تحديد المواقع',
|
||||
'localisations' => 'الاعدادات المحلية | الاعدادات المحلية',
|
||||
'defaults' => 'افتراضي|افتراضيات',
|
||||
'widgets' => 'أداة | أدوات',
|
||||
'templates' => 'قالب | قوالب',
|
||||
@ -131,14 +131,14 @@ return [
|
||||
'created_date' => 'تاريخ الإنشاء',
|
||||
'period' => 'فترة',
|
||||
'frequency' => 'التكرار',
|
||||
'start' => 'إبدأ',
|
||||
'end' => 'انهاء',
|
||||
'start' => 'البداية',
|
||||
'end' => 'النهاية',
|
||||
'clear' => 'مسح',
|
||||
'difference' => 'الاختلاف',
|
||||
'difference' => 'الفرق',
|
||||
'footer' => 'تذييل الصفحة',
|
||||
'start_date' => 'تاريخ البدء',
|
||||
'end_date' => 'تاريخ الانتهاء',
|
||||
'basis' => 'أساس',
|
||||
'basis' => 'الأساس',
|
||||
'accrual' => 'مستحقات',
|
||||
'cash' => 'نقدي',
|
||||
'group_by' => 'مجموعة من قبل',
|
||||
@ -150,8 +150,8 @@ return [
|
||||
'type_item_name' => 'اكتب اسم العنصر',
|
||||
'no_data' => 'لا توجد بيانات',
|
||||
'no_matching_data' => 'لا توجد بيانات مطابقة',
|
||||
'clear_cache' => 'مسح التخزين المؤقت',
|
||||
'go_to_dashboard' => 'الذهاب الى لوحة القيادة',
|
||||
'clear_cache' => 'مسح الذاكرة المؤقتة',
|
||||
'go_to_dashboard' => 'الذهاب الى لوحة التحكم',
|
||||
|
||||
'card' => [
|
||||
'name' => 'الإسم على البطاقة',
|
||||
@ -191,13 +191,13 @@ return [
|
||||
|
||||
'empty' => [
|
||||
'documentation' => 'راجع <a href=":url" target="_blank">الوثائق</a>للمزيد من التفاصيل.',
|
||||
'items' => 'يمكن أن تكون العناصر منتجات أو خدمات. يمكنك استخدام العناصر عند إنشاء الفواتير للحصول على حقول السعر والضرائب إلخ.',
|
||||
'items' => 'يمكن أن تكون الأصناف منتجات أو خدمات. يمكنك استخدام الأصناف عند إنشاء الفواتير للحصول على حقول السعر والضرائب إلخ.',
|
||||
'invoices' => 'يمكن أن تكون الفواتير مرة واحدة أو متكررة. يمكنك إرسالها إلى العملاء والبدء في قبول المدفوعات عبر الإنترنت.',
|
||||
'revenues' => 'الايرادات هي معاملة الدخل المدفوع. يمكن أن يكون سجلًا مستقلًا (أي الإيداع) أو مرفقًا بفاتورة.',
|
||||
'customers' => 'مطلوب العملاء إذا كنت ترغب في إنشاء الفواتير. يمكنهم أيضًا تسجيل الدخول إلى Client Portal ورؤية رصيدهم.',
|
||||
'bills' => 'يمكن أن تكون الفواتير مرة واحدة أو متكررة. إنها تشير إلى ما تدين به للبائعين للمنتجات أو الخدمات التي تشتريها.',
|
||||
'payments' => 'الدفع هو معاملة لمصاريف مدفوعة. يمكن أن يكون سجلًا مستقلًا (مثل إيصال الطعام) أو مرفقًا به فاتورة.',
|
||||
'vendors' => 'البائعين مطلوبين إذا كنت ترغب في إنشاء فواتير. يمكنك رؤية الرصيد الذي تدين به وتصفية تقارير البائع.',
|
||||
'customers' => 'العملاء مطلوبون إذا كنت ترغب في إنشاء الفواتير. يمكنهم أيضًا تسجيل الدخول إلى Client Portal ورؤية رصيدهم.',
|
||||
'bills' => 'يمكن أن تكون الفواتير مرة واحدة أو متكررة. إنها تشير إلى ما تدين به للموردين للمنتجات أو الخدمات التي تشتريها.',
|
||||
'payments' => 'الدفع هو معاملة لمصاريف مدفوعة. يمكن أن يكون سجلًا مستقلًا (مثل إيصال الطعام) أو مرفقًا بفاتورة.',
|
||||
'vendors' => 'الموردين مطلوبين إذا كنت ترغب في إنشاء فواتير. يمكنك رؤية الرصيد الذي تدين به وتصفية تقارير المورد.',
|
||||
'transfers' => 'تتيح لك التحويلات نقل الأموال من حساب إلى آخر ، سواء كانت تستخدم العملة نفسها أم لا.',
|
||||
'taxes' => 'يتم استخدام الضرائب لتطبيق رسوم إضافية على الفواتير. تتأثر بياناتك المالية بهذه الضرائب التنظيمية.',
|
||||
'reconciliations' => 'التسوية المصرفية هي عملية يتم تنفيذها للتأكد من صحة السجلات المصرفية لشركتك.',
|
||||
|
@ -7,7 +7,7 @@ return [
|
||||
'notifications' => [
|
||||
'counter' => '{0} ليس لديك تنبيهات|{1} لديك :count تنبيهات|[2,*] لديك :count تنبيهات',
|
||||
'overdue_invoices' => '{1} :count فاتورة متأخرة|[2,*] :count فواتير متأخرة',
|
||||
'upcoming_bills' => '{1} :count فاتورة بيع قادمة|[2,*] :count فواتير بيع قادمة',
|
||||
'upcoming_bills' => '{1} :count فاتورة قادمة|[2,*] :count فواتير قادمة',
|
||||
'view_all' => 'عرض الكل'
|
||||
],
|
||||
'docs_link' => 'https://akaunting.com/docs',
|
||||
|
@ -26,10 +26,10 @@ return [
|
||||
'paid' => 'مدفوع',
|
||||
'histories' => 'سجلات',
|
||||
'payments' => 'المدفوعات',
|
||||
'add_payment' => 'إضافة مدفوعات',
|
||||
'add_payment' => 'إضافة الدفع',
|
||||
'mark_paid' => 'التحديد كمدفوع',
|
||||
'mark_sent' => 'التحديد كمرسل',
|
||||
'mark_viewed' => 'المُعَلَمَة شُوهدت',
|
||||
'mark_viewed' => 'وضع علامة مشاهدة',
|
||||
'download_pdf' => 'تحميل PDF',
|
||||
'send_mail' => 'إرسال بريد إلكتروني',
|
||||
'all_invoices' => 'سجّل الدخول لعرض جميع الفواتير',
|
||||
@ -54,7 +54,7 @@ return [
|
||||
'marked_sent' => 'الفاتورة عُلّمت كمرسلة!',
|
||||
'marked_paid' => 'الفاتورة عُلّمت كمدفوع!',
|
||||
'email_required' => 'لا يوجد عنوان البريد إلكتروني لهذا العميل!',
|
||||
'draft' => 'هذه <b>مسودة</b> الفاتورة و سوف تظهر في الرسوم البيانيّة بعد ارسالها.',
|
||||
'draft' => 'هذه <b>مسودة</b> الفاتورة و سوف تظهر في النظام بعد ارسالها.',
|
||||
|
||||
'status' => [
|
||||
'created' => 'أنشئت في :date',
|
||||
|
@ -4,7 +4,7 @@ return [
|
||||
|
||||
'title' => 'تحت الصيانة',
|
||||
|
||||
'message' => 'آسف ، نحن في الصيانة. الرجاء معاودة المحاولة في وقت لاحق!',
|
||||
'message' => 'نأسف للإزعاج، النظام قيد الصيانة. الرجاء معاودة المحاولة في وقت لاحق!',
|
||||
|
||||
'last-updated' => 'اخر تحديث لهذه الرسالة :timestamp',
|
||||
|
||||
|
@ -8,7 +8,7 @@ return [
|
||||
'deleted' => 'تم حذف :type!',
|
||||
'duplicated' => 'تم نسخ :type!',
|
||||
'imported' => 'تم استيراد :type!',
|
||||
'exported' => 'تم استيراد :type!',
|
||||
'exported' => 'تم تصدير :type!',
|
||||
'enabled' => 'تم تفعيل :type!',
|
||||
'disabled' => 'تم تعطيل :type!',
|
||||
],
|
||||
@ -16,7 +16,7 @@ return [
|
||||
'error' => [
|
||||
'over_payment' => 'خطأ: الدفعه لم تُضاف! المبلغ المدخل يتخطى المجموع: :amount',
|
||||
'not_user_company' => 'خطأ: غير مسموح لك بإدارة هذه الشركة!',
|
||||
'customer' => 'خطأ: لم تتم إضافة المستخدم! :name يستخدم هذا البريد الإلكتروني مسبقاً.',
|
||||
'customer' => 'خطأ: لم تتم إضافة المستخدم! :name يستخدم بالفعل هذا البريد الإلكتروني.',
|
||||
'no_file' => 'خطأ: لم يتم تحديد أي ملف!',
|
||||
'last_category' => 'خطأ: لا يمكن حذف آخر فئة من :type!',
|
||||
'change_type' => 'خطأ: لا يمكنك تغيير النوع لارتباطه مع :text!',
|
||||
|
@ -5,9 +5,9 @@ return [
|
||||
'api_key' => 'مفتاح API',
|
||||
'my_apps' => 'تطبيقاتي',
|
||||
'pre_sale' => 'قبل البيع',
|
||||
'top_paid' => 'أعلى المدفوعات',
|
||||
'top_paid' => 'أعلى مدفوعات',
|
||||
'new' => 'جديد',
|
||||
'top_free' => 'المجانيات الأعلى',
|
||||
'top_free' => 'أعلى مجانيات ',
|
||||
'free' => 'مجاناً',
|
||||
'search' => 'بحث',
|
||||
'install' => 'تثبيت',
|
||||
@ -36,7 +36,7 @@ return [
|
||||
'installation' => 'التثبيت',
|
||||
'faq' => 'الأسئلة الشائعة',
|
||||
'changelog' => 'سجل التغييرات',
|
||||
'reviews' => 'مراجعات',
|
||||
'reviews' => 'التقييمات',
|
||||
],
|
||||
|
||||
'installation' => [
|
||||
@ -52,7 +52,7 @@ return [
|
||||
'errors' => [
|
||||
'download' => 'لم نتمكن من تحميل :module',
|
||||
'zip' => 'لم نتمكن من انشاء ملف zip :module',
|
||||
'unzip' => 'لم نتمكن من إستخراج :module',
|
||||
'unzip' => 'لم نتمكن من فك ضغط :module',
|
||||
'file_copy' => 'لم نتمكن من نسخ ملفات :module',
|
||||
'finish' => 'لم نتمكن من انهاء تثبيت :module',
|
||||
],
|
||||
@ -75,10 +75,10 @@ return [
|
||||
|
||||
'reviews' => [
|
||||
'button' => [
|
||||
'add' => 'أضف مراجعة'
|
||||
'add' => 'أضف تقييمك'
|
||||
],
|
||||
|
||||
'na' => 'لا يوجد مراجعات.'
|
||||
'na' => 'لا يوجد تقييمات.'
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -6,7 +6,7 @@ return [
|
||||
'reconciled' => 'تمت التسوية',
|
||||
'closing_balance' => 'الرصيد الختامي',
|
||||
'unreconciled' => 'لم تتم التسوية',
|
||||
'transactions' => 'الإجراءات',
|
||||
'transactions' => 'المعاملات',
|
||||
'start_date' => 'تاريخ البدء',
|
||||
'end_date' => 'تاريخ الانتهاء',
|
||||
'cleared_amount' => 'صافي القيمة',
|
||||
|
@ -3,7 +3,7 @@
|
||||
return [
|
||||
|
||||
'company' => [
|
||||
'description' => 'تغيير اسم الشركه، البريد اﻹلكتروني، العناوين، الرقم الضريبي الخ',
|
||||
'description' => 'تغيير اسم الشركه، البريد اﻹلكتروني، العنوان، الرقم الضريبي الخ',
|
||||
'name' => 'الاسم',
|
||||
'email' => 'البريد الإلكتروني',
|
||||
'phone' => 'رقم الهاتف',
|
||||
@ -12,7 +12,7 @@ return [
|
||||
],
|
||||
|
||||
'localisation' => [
|
||||
'description' => 'قم بتعيين السنة المالية والمنطقة الزمنية وتنسيق التاريخ والمزيد من المواقع',
|
||||
'description' => 'قم بتحديد السنة المالية والمنطقة الزمنية وصيغة التاريخ والمزيد من الاعدادات',
|
||||
'financial_start' => 'بدء السنة المالية',
|
||||
'timezone' => 'التوقيت',
|
||||
'date' => [
|
||||
@ -44,7 +44,7 @@ return [
|
||||
'service' => 'الخدمات',
|
||||
'price_name' => 'اسم السعر',
|
||||
'price' => 'السعر',
|
||||
'rate' => 'قيّم',
|
||||
'rate' => 'معدل',
|
||||
'quantity_name' => 'اسم الكمية',
|
||||
'quantity' => 'الكمية',
|
||||
'payment_terms' => 'شروط الدفع',
|
||||
@ -105,7 +105,7 @@ return [
|
||||
'send_bill' => 'إرسال تذكير لفاتورة الشراء',
|
||||
'bill_days' => 'إرسال قبل ميعاد الاستحقاق بأيام',
|
||||
'cron_command' => 'أمر التكرار',
|
||||
'schedule_time' => 'ساعة البدء',
|
||||
'schedule_time' => 'ساعة التنفيذ',
|
||||
],
|
||||
|
||||
'categories' => [
|
||||
|
@ -13,7 +13,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'accepted' => 'يجب أن يتم القبول على خانة :attribute.',
|
||||
'accepted' => 'يجب أن يتم قبول خانة :attribute.',
|
||||
'active_url' => 'خانة :attribute تحتوي على رابط غير صحيح.',
|
||||
'after' => 'يجب على خانة :attribute أن تكون تاريخًا لاحقًا للتاريخ :date.',
|
||||
'after_or_equal' => 'يجب على خانة :attribute أن تكون تاريخًا لاحقًا أو مطابقًا للتاريخ :date.',
|
||||
@ -76,15 +76,15 @@ return [
|
||||
'required_without_all' => 'الخانة :attribute إلزامية إذا لم يتوفّر أياً من :values.',
|
||||
'same' => 'يجب أن تتطابق خانة :attribute مع :other.',
|
||||
'size' => [
|
||||
'numeric' => 'يجب أن تكون قيمة خانة :attribute مساوية للعدد :size.',
|
||||
'numeric' => 'يجب أن تكون قيمة خانة :attribute مساوية ل :size.',
|
||||
'file' => 'يجب أن يكون حجم الملف :attribute يساوي :size كيلوبايت.',
|
||||
'string' => 'هذه الخانة :attribute يجب ان تكون <strong>:size حرف</strong>.',
|
||||
'array' => 'يجب أن تحتوي خانة :attribute على :size من العناصر.',
|
||||
],
|
||||
'string' => 'هذه الخانة :attribute يجب ان تكون <strong>نص</strong>.',
|
||||
'timezone' => 'يجب أن تكون خانة :attribute نطاقًا زمنيًا صحيحًا.',
|
||||
'unique' => 'هذه الخانة :attribute <strong>مأخوذة</strong>.',
|
||||
'uploaded' => 'هذه الخانة :attribute <strong>فشلت</strong> عند الرفع.',
|
||||
'unique' => 'هذه الخانة :attribute <strong>مستخدمة بالفعل</strong>.',
|
||||
'uploaded' => 'هذه الخانة :attribute <strong>فشلت</strong> عند تحميلها على النظام.',
|
||||
'url' => 'تنسيق هذه الخانة :attribute <strong>غير صالح</strong>.',
|
||||
|
||||
/*
|
||||
|
@ -7,7 +7,7 @@ return [
|
||||
'open_invoices' => 'الفواتير المفتوحة',
|
||||
'overdue_invoices' => 'الفواتير المتأخرة',
|
||||
'total_expenses' => 'إجمالي المصاريف',
|
||||
'payables' => 'إمكانية الدفع',
|
||||
'payables' => 'المستحقات علينا',
|
||||
'open_bills' => 'فواتير مفتوحة',
|
||||
'overdue_bills' => 'فواتير متأخرة',
|
||||
'total_profit' => 'إجمالي الربح',
|
||||
|
@ -28,6 +28,8 @@ return [
|
||||
'warning' => [
|
||||
'deleted' => 'Warning: You are not allowed to delete <b>:name</b> because it has :text related.',
|
||||
'disabled' => 'Warning: You are not allowed to disable <b>:name</b> because it has :text related.',
|
||||
'reconciled_tran' => 'Warning: You are not allowed to change/delete transaction because it is reconciled!',
|
||||
'reconciled_doc' => 'Warning: You are not allowed to change/delete :type because it has reconciled transactions!',
|
||||
'disable_code' => 'Warning: You are not allowed to disable or change the currency of <b>:name</b> because it has :text related.',
|
||||
'payment_cancel' => 'Warning: You have cancelled your recent :method payment!',
|
||||
],
|
||||
|
@ -13,6 +13,7 @@ return [
|
||||
'current_email' => 'वर्तमान ईमेल',
|
||||
'reset' => 'रीसेट',
|
||||
'never' => 'कभी नहीँ',
|
||||
'landing_page' => 'लैंडिंग पेज',
|
||||
|
||||
'password' => [
|
||||
'current' => 'पासवर्ड',
|
||||
|
@ -40,6 +40,8 @@ return [
|
||||
'received' => 'स्वीकार किया',
|
||||
'partial' => 'आंशिक',
|
||||
'paid' => 'भुगतान किया',
|
||||
'overdue' => 'समय पर भुगतान नहीं किया',
|
||||
'unpaid' => 'भुगतान नहीं किया है',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
|
@ -6,14 +6,14 @@ return [
|
||||
'selected' => 'चयनित',
|
||||
|
||||
'message' => [
|
||||
'duplicate' => 'Are you sure you want to <b>duplicate</b> selected record?',
|
||||
'delete' => 'Are you sure you want to <b>delete</b> selected record?|Are you sure you want to <b>delete</b> selected records?',
|
||||
'export' => 'Are you sure you want to <b>export</b> selected record?|Are you sure you want to <b>export</b> selected records?',
|
||||
'enable' => 'Are you sure you want to <b>enable</b> selected record?|Are you sure you want to <b>enable</b> selected records?',
|
||||
'disable' => 'Are you sure you want to <b>disable</b> selected record?|Are you sure you want to <b>disable</b> selected records?',
|
||||
'paid' => 'Are you sure you want to mark selected invoice as <b>paid</b>?|Are you sure you want to mark selected invoices as <b>paid</b>?',
|
||||
'sent' => 'Are you sure you want to mark selected invoice as <b>sent</b>?|Are you sure you want to mark selected invoices as <b>sent</b>?',
|
||||
'received' => 'Are you sure you want to mark selected bill as <b>received</b>?|Are you sure you want to mark selected bills as <b>received</b>?',
|
||||
'duplicate' => 'क्या आप वाकई चयनित रिकॉर्ड की <b>प्रतिलिपि</b> करना चाहते हैं?',
|
||||
'delete' => 'क्या आप वाकई चयनित रिकॉर्ड <b>हटाना</b> चाहते हैं?|क्या आप सुनिश्चित हैं कि आप चयनित रिकॉर्ड <b>हटाना</b> चाहते हैं?',
|
||||
'export' => 'क्या आप सुनिश्चित हैं कि आप चयनित रिकॉर्ड <b>निर्यात</b> करना चाहते हैं?|क्या आप सुनिश्चित हैं कि आप चयनित रिकॉर्ड <b>निर्यात</b> करना चाहते हैं?',
|
||||
'enable' => 'क्या आप वाकई चयनित रिकॉर्ड को <b>सक्रिय</b> करना चाहते हैं?|क्या आप वाकई चयनित रिकॉर्ड को <b>सक्रिय</b> करना चाहते हैं?',
|
||||
'disable' => 'क्या आप वाकई चयनित रिकॉर्ड को <b>निष्क्रिय</b> करना चाहते हैं?|क्या आप वाकई चयनित रिकॉर्ड को <b>निष्क्रिय</b> करना चाहते हैं?',
|
||||
'paid' => 'क्या आप वाकई चयनित चालान को <b>भुगतान</b> के रूप में चिह्नित करना चाहते हैं?|क्या आप सुनिश्चित हैं कि आप चयनित चालान को <b>भुगतान</b> के रूप में चिह्नित करना चाहते हैं?',
|
||||
'sent' => 'क्या आप सुनिश्चित हैं कि आप चयनित चालान को <b>भेजे गए</b> के रूप में चिह्नित करना चाहते हैं?|क्या आप सुनिश्चित हैं कि आप चयनित चालान को <b>भेजे गए</b> के रूप में चिह्नित करना चाहते हैं?',
|
||||
'received' => 'क्या आप वाकई चयनित बिल को <b>प्राप्त किये</b> गए के रूप में चिह्नित करना चाहते हैं?|क्या आप वाकई चयनित बिलों को <b>प्राप्त किये</b> गए के रूप में चिह्नित करना चाहते हैं?',
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -4,12 +4,11 @@ return [
|
||||
|
||||
'domain' => 'डोमेन',
|
||||
'logo' => 'लोगो',
|
||||
'manage' => 'कंपनियों का प्रबंधन करें',
|
||||
'all' => 'सभी कंपनियां',
|
||||
|
||||
'error' => [
|
||||
'not_user_company' => 'त्रुटि: आपको इस कंपनी को बदलने की अनुमति नहीं है!',
|
||||
'delete_active' => 'त्रुटि: सक्रिय कंपनी को हटा नहीं सकते, कृपया, इसे पहले बदलें!',
|
||||
'delete_active' => 'त्रुटि: सक्रिय कंपनी को हटा नहीं सकते। कृपया, पहले दूसरे पर स्विच करें!',
|
||||
'disable_active' => 'त्रुटि: सक्रिय कंपनी को निष्क्रिय नहीं कर सकते। कृपया, पहले दूसरे पर स्विच करें!',
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -6,7 +6,7 @@ return [
|
||||
'user_created' => 'उपयोगकर्ता बनाया गया',
|
||||
|
||||
'error' => [
|
||||
'email' => 'ईमेल पहले ही ली जा चुकी हैं।'
|
||||
'email' => 'ईमेल पहले ही ली जा चुकी हैं।',
|
||||
],
|
||||
|
||||
];
|
||||
|
11
resources/lang/hi-IN/dashboards.php
Normal file
11
resources/lang/hi-IN/dashboards.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'error' => [
|
||||
'not_user_dashboard' => 'त्रुटि: आपको इस डैशबोर्ड को बदलने की अनुमति नहीं है!',
|
||||
'delete_last' => 'त्रुटि: अंतिम डैशबोर्ड को हटा नहीं सकते। कृपया, पहले एक नया बनाएं!',
|
||||
'disable_last' => 'त्रुटि: अंतिम डैशबोर्ड को निष्क्रिय नहीं कर सकते। कृपया, पहले एक नया बनाएं!',
|
||||
],
|
||||
|
||||
];
|
@ -2,12 +2,33 @@
|
||||
|
||||
return [
|
||||
|
||||
'accounts_cash' => 'नकद',
|
||||
'categories_deposit' => 'जमा',
|
||||
'categories_sales' => 'बिक्री',
|
||||
'currencies_usd' => 'अमेरिकी डॉलर',
|
||||
'currencies_eur' => 'यूरो',
|
||||
'currencies_gbp' => 'ब्रिटिश पाउंड',
|
||||
'currencies_try' => 'तुर्की लीरा',
|
||||
'accounts' => [
|
||||
'cash' => 'नकद',
|
||||
],
|
||||
|
||||
'categories' => [
|
||||
'deposit' => 'जमा',
|
||||
'sales' => 'बिक्री',
|
||||
],
|
||||
|
||||
'currencies' => [
|
||||
'usd' => 'अमेरिकी डॉलर',
|
||||
'eur' => 'यूरो',
|
||||
'gbp' => 'ब्रिटिश पाउंड',
|
||||
'try' => 'तुर्की लीरा',
|
||||
],
|
||||
|
||||
'offline_payments' => [
|
||||
'cash' => 'नकद',
|
||||
'bank' => 'बैंक ट्रांसफर',
|
||||
],
|
||||
|
||||
'reports' => [
|
||||
'income' => 'श्रेणी के द्वारा मासिक आय सारांश।',
|
||||
'expense' => 'श्रेणी के अनुसार मासिक व्यय सारांश।',
|
||||
'income_expense' => 'श्रेणी के हिसाब से मासिक आय vs व्यय।',
|
||||
'tax' => 'त्रैमासिक कर सारांश।',
|
||||
'profit_loss' => 'श्रेणी के अनुसार त्रैमासिक लाभ और हानि।',
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -2,23 +2,22 @@
|
||||
|
||||
return [
|
||||
|
||||
'forbidden_access' => 'प्रवेश निषिद्ध',
|
||||
'error_page' => 'त्रुटि पृष्ठ',
|
||||
'page_not_found' => 'पृष्ठ नहीं मिला',
|
||||
|
||||
'body' => [
|
||||
'forbidden_access' => 'ऊप्स! प्रवेश निषिद्ध।',
|
||||
'error_page' => 'ऊप्स! कुछ गलत हो गया।',
|
||||
'page_not_found' => 'ऊप्स! पृष्ठ नहीं मिला।',
|
||||
'title' => [
|
||||
'403' => 'ऊप्स! प्रवेश वर्जित',
|
||||
'404' => 'ऊप्स! पृष्ठ नहीं मिला',
|
||||
'500' => 'ऊप्स! कुछ गलत हो गया',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
'forbidden_access' => 'आप इस पेज तक नहीं पहुँच सकते।
|
||||
इस बीच, आप <a href=":link"> डैशबोर्ड पर लौट सकते हैं।</a>',
|
||||
'error_page' => 'हम उस समय को ठीक करने पर काम करेंगे।
|
||||
इस बीच, आप <a href=":link"> डैशबोर्ड पर लौट सकते हैं।</a>',
|
||||
'page_not_found' => 'आपको वह पृष्ठ नहीं मिला, जिसकी आप तलाश कर रहे थे।
|
||||
इस बीच, आप <a href=":link"> डैशबोर्ड पर लौट सकते हैं।</a>',
|
||||
'header' => [
|
||||
'403' => '403 वर्जित',
|
||||
'404' => '404 नहीं मिला',
|
||||
'500' => '500 आंतरिक सर्वर त्रुटि',
|
||||
],
|
||||
|
||||
'message' => [
|
||||
'403' => 'आप इस पेज तक नहीं पहुँच सकते।',
|
||||
'404' => 'आपको वह पृष्ठ नहीं मिला, जिसकी आप तलाश कर रहे थे।',
|
||||
'500' => 'हम इसे ठीक करने पर तुरंत काम करेंगे।',
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -48,8 +48,10 @@ return [
|
||||
'localisations' => 'स्थानीयकरण|स्थानीयकरण',
|
||||
'defaults' => 'डिफ़ॉल्ट|डिफ़ॉल्ट',
|
||||
'widgets' => 'विजेट|विजेट',
|
||||
'templates' => 'टेम्पलेट|टेम्पलेट्स',
|
||||
'sales' => 'बिक्री|बिक्री',
|
||||
'purchases' => 'खरीद|खरीद',
|
||||
|
||||
'dashboard' => 'डैशबोर्ड',
|
||||
'welcome' => 'स्वागत हे',
|
||||
'banking' => 'बैंकिंग',
|
||||
'general' => 'सामान्य',
|
||||
@ -68,10 +70,13 @@ return [
|
||||
'yearly' => 'वार्षिक',
|
||||
'add' => 'जोड़ें',
|
||||
'add_new' => 'नया जोड़ें',
|
||||
'add_income' => 'आय जोड़ें',
|
||||
'add_expense' => 'व्यय जोड़ें',
|
||||
'show' => 'देखें',
|
||||
'edit' => 'संपादित करें',
|
||||
'delete' => 'हटायें',
|
||||
'send' => 'भेजें',
|
||||
'share' => 'शेयर',
|
||||
'download' => 'डाउनलोड',
|
||||
'delete_confirm' => ':name :type हटाने की पुष्टि करें?',
|
||||
'name' => 'नाम',
|
||||
@ -89,7 +94,7 @@ return [
|
||||
'reference' => 'संदर्भ',
|
||||
'attachment' => 'अटैचमेंट',
|
||||
'change' => 'बदलें',
|
||||
'change_type' => 'Change :type',
|
||||
'change_type' => ':type प्रकार बदलें',
|
||||
'switch' => 'बदलें',
|
||||
'color' => 'रंग',
|
||||
'save' => 'सेव करे',
|
||||
@ -123,7 +128,6 @@ return [
|
||||
'disable' => 'निष्क्रिय',
|
||||
'select_all' => 'सभी का चयन करे',
|
||||
'unselect_all' => 'सभी का चयन रद्द करे',
|
||||
'go_to' => ':name पर जाये',
|
||||
'created_date' => 'रचना तारीख',
|
||||
'period' => 'अवधि',
|
||||
'frequency' => 'आवृत्ति',
|
||||
@ -133,11 +137,28 @@ return [
|
||||
'difference' => 'अंतर',
|
||||
'footer' => 'फुटर',
|
||||
'start_date' => 'आरंभ करने की तारीख',
|
||||
'end_date' => 'समाप्ति की तारीख',
|
||||
'basis' => 'आधार',
|
||||
'accrual' => 'प्रोद्भवन',
|
||||
'cash' => 'नकद',
|
||||
'group_by' => 'समूह द्वारा',
|
||||
'accounting' => 'लेखांकन',
|
||||
'sort' => 'छाँटें',
|
||||
'width' => 'चौड़ाई',
|
||||
'month' => 'महीना',
|
||||
'year' => 'वर्ष',
|
||||
'type_item_name' => 'एक आइटम नाम लिखें',
|
||||
'no_data' => 'कोई आकड़ा उपलब्ध नहीं है',
|
||||
'no_matching_data' => 'कोई मिलान डेटा नहीं',
|
||||
'clear_cache' => 'कैश को साफ़ करें',
|
||||
'go_to_dashboard' => 'डैशबोर्ड पर जाएं',
|
||||
|
||||
'card' => [
|
||||
'name' => 'कार्ड पर नाम',
|
||||
'number' => 'कार्ड नंबर',
|
||||
'expiration_date' => 'समाप्ति तिथि',
|
||||
'cvv' => 'कार्ड CVV',
|
||||
],
|
||||
|
||||
'title' => [
|
||||
'new' => 'नई :type',
|
||||
@ -147,6 +168,7 @@ return [
|
||||
'send' => ':type भेजें',
|
||||
'get' => ':type ले आओ',
|
||||
'add' => ':type जोड़ें',
|
||||
'manage' => ':type प्रबंधित',
|
||||
],
|
||||
|
||||
'form' => [
|
||||
@ -176,6 +198,9 @@ return [
|
||||
'bills' => 'बिल एक समय या आवर्ती हो सकते हैं। वे संकेत करते हैं कि आपके द्वारा खरीदे जाने वाले उत्पादों या सेवाओं के लिए आप अपने विक्रेताओं को क्या देते हैं।',
|
||||
'payments' => 'भुगतान एक भुगतान व्यय लेनदेन है। यह एक स्वतंत्र रिकॉर्ड (यानी खाद्य रसीद) हो सकता है या बिल से जुड़ा हो सकता है।',
|
||||
'vendors' => 'यदि आप बिल बनाना चाहते हैं तो विक्रेताओं की आवश्यकता है। आप शेष राशि देख सकते हैं और विक्रेता द्वारा रिपोर्ट फ़िल्टर कर सकते हैं।',
|
||||
'transfers' => 'ट्रांसफ़र आपको एक खाते से दूसरे खाते में पैसा स्थानांतरित करने की अनुमति देते हैं, चाहे वे एक ही मुद्रा का उपयोग करें या नहीं।',
|
||||
'taxes' => 'टैक्स का उपयोग चालान और बिलों में अतिरिक्त शुल्क लगाने के लिए किया जाता है। आपके वित्तीय इन नियामक करों से प्रभावित होते हैं।',
|
||||
'reconciliations' => 'बैंक सुलह एक प्रक्रिया है जो यह सुनिश्चित करने के लिए की जाती है कि आपकी कंपनी के बैंक रिकॉर्ड भी सही हैं।',
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -29,6 +29,7 @@ return [
|
||||
'add_payment' => 'भुगतान जोड़ें',
|
||||
'mark_paid' => 'मार्क करे की भुगतान किया हुआ है',
|
||||
'mark_sent' => 'मार्क करे की भेजा गया',
|
||||
'mark_viewed' => 'मार्क किया हुआ देखे',
|
||||
'download_pdf' => 'डाउनलोड PDF',
|
||||
'send_mail' => 'ईमेल भेजें',
|
||||
'all_invoices' => 'सभी चालान देखने के लिए लॉगिन करें',
|
||||
@ -39,11 +40,13 @@ return [
|
||||
|
||||
'statuses' => [
|
||||
'draft' => 'ड्राफ्ट',
|
||||
'sent' => 'भेजें',
|
||||
'sent' => 'भेजे गए',
|
||||
'viewed' => 'देखा गया',
|
||||
'approved' => 'मंजूर करें',
|
||||
'approved' => 'स्वीकृत',
|
||||
'partial' => 'आंशिक',
|
||||
'paid' => 'भुगतान किया',
|
||||
'paid' => 'भुगतान किया है',
|
||||
'overdue' => 'समय पर भुगतान नहीं किया',
|
||||
'unpaid' => 'भुगतान नहीं किया है',
|
||||
],
|
||||
|
||||
'messages' => [
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
return [
|
||||
|
||||
'title' => 'रखरखाव मोड',
|
||||
'title' => 'रखरखाव जारी',
|
||||
|
||||
'message' => 'वर्तमान में हम साइट पर काम कर रहे हैं, कृपया बाद में पुनः प्रयास करें!',
|
||||
'message' => 'क्षमा करें, हम रखरखाव के लिए डाउन हैं। बाद में पुन: प्रयास करें!',
|
||||
|
||||
'last-updated' => 'यह संदेश अंतिम बार अपडेट किया गया था :timestamp',
|
||||
'last-updated' => ':timestamp यह संदेश अंतिम बार अपडेट किया गया था।',
|
||||
|
||||
];
|
@ -8,6 +8,7 @@ return [
|
||||
'deleted' => ':type हटा दिया गया!',
|
||||
'duplicated' => ':type प्रतिलिपि बनाई गई!',
|
||||
'imported' => ':type इम्पोर्ट किया गया!',
|
||||
'exported' => ':type निर्यात!',
|
||||
'enabled' => ':type सक्रिय किया गया!',
|
||||
'disabled' => ':type निष्क्रिय किया गया!!',
|
||||
],
|
||||
@ -19,7 +20,7 @@ return [
|
||||
'no_file' => 'त्रुटि: कोई फ़ाइल चयनित नहीं!',
|
||||
'last_category' => 'त्रुटि: अंतिम :type श्रेणी को हटा नहीं सकते हैं!',
|
||||
'change_type' => 'त्रुटि: प्रकार बदल नहीं सकता क्योंकि इसमें :text संबंधित है!',
|
||||
'invalid_apikey' => 'Error: The API Key entered is invalid!',
|
||||
'invalid_apikey' => 'त्रुटि: दर्ज की गई API कुंजी अमान्य है!',
|
||||
'import_column' => 'त्रुटि: :message शीट का नाम: :sheet। पंक्ति संख्या::line।',
|
||||
'import_sheet' => 'त्रुटि: शीट का नाम मान्य नहीं है। कृपया, नमूना फ़ाइल की जाँच करें।',
|
||||
],
|
||||
|
@ -12,10 +12,9 @@ return [
|
||||
'search' => 'खोज',
|
||||
'install' => 'इंस्टॉल करें',
|
||||
'buy_now' => 'अभी खरीदें',
|
||||
'api_key_link' => 'अपनी API कुंजी प्राप्त करने के लिए <a class="text-red" href="https://akaunting.com/profile" target="_blank"> यहां क्लिक करें </a>।',
|
||||
'get_api_key' => 'अपनी एपीआई कुंजी प्राप्त करने के लिए यहां <a href=":url" target="_blank">क्लिक</a> करें।',
|
||||
'no_apps' => 'इस श्रेणी में अभी तक कोई एप्लिकेशन नहीं हैं।',
|
||||
'developer' => 'क्या आप एक डेवलपर हैं? <a href="https://akaunting.com/developers" target="_blank">यहां</a> आप सीख सकते हैं कि ऐप कैसे बनाएं और आज से बिक्री शुरू करें!',
|
||||
|
||||
'become_developer' => 'क्या आप एक डेवलपर हैं? <a href=":url" target="_blank">यहां</a> आप सीख सकते हैं कि ऐप कैसे बनाएं और आज बेचना शुरू करें!',
|
||||
'recommended_apps' => 'अनुशंसित ऐप्स',
|
||||
|
||||
'about' => 'के बारे में',
|
||||
@ -80,5 +79,6 @@ return [
|
||||
],
|
||||
|
||||
'na' => 'कोई समीक्षा नहीं है।'
|
||||
]
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
return [
|
||||
|
||||
'previous' => '« पिछला',
|
||||
'next' => 'अगला »',
|
||||
'showing' => ':first-:last of :total records.',
|
||||
'previous' => 'पिछला',
|
||||
'next' => 'अगला',
|
||||
'showing' => ':total में से :first-:last रिकॉर्ड।',
|
||||
'page' => 'प्रति पेज।',
|
||||
|
||||
];
|
||||
|
@ -12,7 +12,7 @@ return [
|
||||
'net_profit' => 'शुद्ध लाभ',
|
||||
'total_expenses' => 'कुल व्यय',
|
||||
'net' => 'शुद्ध',
|
||||
'income-expense' => 'आय & व्यय',
|
||||
'income_expense' => 'आय & व्यय',
|
||||
|
||||
'summary' => [
|
||||
'income' => 'आय का सारांश',
|
||||
|
@ -52,6 +52,10 @@ return [
|
||||
'subheading' => 'उपशीर्षक',
|
||||
'due_receipt' => 'प्राप्ति पर देय',
|
||||
'due_days' => ':days दिनों के भीतर देय',
|
||||
'choose_template' => 'चालान टेम्पलेट चुनें',
|
||||
'default' => 'पूर्व निर्धारित',
|
||||
'classic' => 'क्लासिक',
|
||||
'modern' => 'नवीन',
|
||||
],
|
||||
|
||||
'default' => [
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
return [
|
||||
|
||||
'total_incomes' => 'कुल आय',
|
||||
'total_income' => 'कुल आय',
|
||||
'receivables' => 'प्राप्तियां',
|
||||
'open_invoices' => 'वर्तमान चालान',
|
||||
'overdue_invoices' => 'समय पर भुगतान नहीं किये हुए चालान',
|
||||
@ -15,9 +15,9 @@ return [
|
||||
'overdue_profit' => 'समय पर भुगतान नहीं किया हुआ लाभ',
|
||||
'cash_flow' => 'नकद प्रवाह',
|
||||
'no_profit_loss' => 'ना लाभ ना हानि',
|
||||
'incomes_by_category' => 'श्रेणी के अनुसार आय',
|
||||
'income_by_category' => 'श्रेणी के अनुसार आय',
|
||||
'expenses_by_category' => 'श्रेणी के अनुसार व्यय',
|
||||
'account_balance' => 'खाते का बैलेंस',
|
||||
'latest_incomes' => 'नवीनतम आय',
|
||||
'latest_income' => 'नवीनतम आय',
|
||||
'latest_expenses' => 'नवीनतम व्यय',
|
||||
];
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user