first commit
This commit is contained in:
22
resources/assets/js/app.js
vendored
Normal file
22
resources/assets/js/app.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
/**
|
||||
* First we will load all of this project's JavaScript dependencies which
|
||||
* includes Vue and other libraries. It is a great starting point when
|
||||
* building robust, powerful web applications using Vue and Laravel.
|
||||
*/
|
||||
|
||||
require('./bootstrap');
|
||||
|
||||
window.Vue = require('vue');
|
||||
|
||||
/**
|
||||
* Next, we will create a fresh Vue application instance and attach it to
|
||||
* the page. Then, you may begin adding components to this application
|
||||
* or customize the JavaScript scaffolding to fit your unique needs.
|
||||
*/
|
||||
|
||||
Vue.component('example', require('./components/Example.vue'));
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app'
|
||||
});
|
||||
40
resources/assets/js/bootstrap.js
vendored
Normal file
40
resources/assets/js/bootstrap.js
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
|
||||
window._ = require('lodash');
|
||||
|
||||
/**
|
||||
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
|
||||
* for JavaScript based Bootstrap features such as modals and tabs. This
|
||||
* code may be modified to fit the specific needs of your application.
|
||||
*/
|
||||
|
||||
try {
|
||||
window.$ = window.jQuery = require('jquery');
|
||||
|
||||
require('bootstrap-sass');
|
||||
} catch (e) {}
|
||||
|
||||
/**
|
||||
* We'll load the axios HTTP library which allows us to easily issue requests
|
||||
* to our Laravel back-end. This library automatically handles sending the
|
||||
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
||||
*/
|
||||
|
||||
window.axios = require('axios');
|
||||
|
||||
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = window.Laravel.csrfToken;
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
/**
|
||||
* Echo exposes an expressive API for subscribing to channels and listening
|
||||
* for events that are broadcast by Laravel. Echo and event broadcasting
|
||||
* allows your team to easily build robust real-time web applications.
|
||||
*/
|
||||
|
||||
// import Echo from 'laravel-echo'
|
||||
|
||||
// window.Pusher = require('pusher-js');
|
||||
|
||||
// window.Echo = new Echo({
|
||||
// broadcaster: 'pusher',
|
||||
// key: 'your-pusher-key'
|
||||
// });
|
||||
23
resources/assets/js/components/Example.vue
Normal file
23
resources/assets/js/components/Example.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Example Component</div>
|
||||
|
||||
<div class="panel-body">
|
||||
I'm an example component!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
mounted() {
|
||||
console.log('Component mounted.')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
38
resources/assets/sass/_variables.scss
vendored
Normal file
38
resources/assets/sass/_variables.scss
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
// Body
|
||||
$body-bg: #f5f8fa;
|
||||
|
||||
// Borders
|
||||
$laravel-border-color: darken($body-bg, 10%);
|
||||
$list-group-border: $laravel-border-color;
|
||||
$navbar-default-border: $laravel-border-color;
|
||||
$panel-default-border: $laravel-border-color;
|
||||
$panel-inner-border: $laravel-border-color;
|
||||
|
||||
// Brands
|
||||
$brand-primary: #3097D1;
|
||||
$brand-info: #8eb4cb;
|
||||
$brand-success: #2ab27b;
|
||||
$brand-warning: #cbb956;
|
||||
$brand-danger: #bf5329;
|
||||
|
||||
// Typography
|
||||
$icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/";
|
||||
$font-family-sans-serif: "Raleway", sans-serif;
|
||||
$font-size-base: 14px;
|
||||
$line-height-base: 1.6;
|
||||
$text-color: #636b6f;
|
||||
|
||||
// Navbar
|
||||
$navbar-default-bg: #fff;
|
||||
|
||||
// Buttons
|
||||
$btn-default-color: $text-color;
|
||||
|
||||
// Inputs
|
||||
$input-border: lighten($text-color, 40%);
|
||||
$input-border-focus: lighten($brand-primary, 25%);
|
||||
$input-color-placeholder: lighten($text-color, 30%);
|
||||
|
||||
// Panels
|
||||
$panel-default-heading-bg: #fff;
|
||||
9
resources/assets/sass/app.scss
vendored
Normal file
9
resources/assets/sass/app.scss
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
// Fonts
|
||||
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
|
||||
|
||||
// Variables
|
||||
@import "variables";
|
||||
|
||||
// Bootstrap
|
||||
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
|
||||
15
resources/lang/en-GB/accounts.php
Normal file
15
resources/lang/en-GB/accounts.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'account_name' => 'Account Name',
|
||||
'number' => 'Number',
|
||||
'opening_balance' => 'Opening Balance',
|
||||
'current_balance' => 'Current Balance',
|
||||
'bank_name' => 'Bank Name',
|
||||
'bank_phone' => 'Bank Phone',
|
||||
'bank_address' => 'Bank Address',
|
||||
'default_account' => 'Default Account',
|
||||
'all' => 'All Accounts',
|
||||
|
||||
];
|
||||
29
resources/lang/en-GB/auth.php
Normal file
29
resources/lang/en-GB/auth.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'profile' => 'Profile',
|
||||
'logout' => 'Logout',
|
||||
'login' => 'Login',
|
||||
'login_to' => 'Login to start your session',
|
||||
'remember_me' => 'Remember Me',
|
||||
'forgot_password' => 'I forgot my password',
|
||||
'reset_password' => 'Reset Password',
|
||||
'enter_email' => 'Enter Your Email Address',
|
||||
'current_email' => 'Current Email',
|
||||
'reset' => 'Reset',
|
||||
'never' => 'never',
|
||||
'password' => [
|
||||
'current' => 'Password',
|
||||
'current_confirm' => 'Password Confirmation',
|
||||
'new' => 'New Password',
|
||||
'new_confirm' => 'New Password Confirmation',
|
||||
],
|
||||
'error' => [
|
||||
'self_delete' => 'Error: Can not delete yourself!'
|
||||
],
|
||||
|
||||
'failed' => 'These credentials do not match our records.',
|
||||
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
|
||||
|
||||
];
|
||||
36
resources/lang/en-GB/bills.php
Normal file
36
resources/lang/en-GB/bills.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'bill_number' => 'Bill Number',
|
||||
'bill_date' => 'Bill Date',
|
||||
'total_price' => 'Total Price',
|
||||
'due_date' => 'Due Date',
|
||||
'order_number' => 'Order Number',
|
||||
'bill_from' => 'Bill From',
|
||||
|
||||
'quantity' => 'Quantity',
|
||||
'price' => 'Price',
|
||||
'sub_total' => 'Subtotal',
|
||||
'tax_total' => 'Tax Total',
|
||||
'total' => 'Total',
|
||||
|
||||
'item_name' => 'Item Name|Item Names',
|
||||
|
||||
'payment_due' => 'Payment Due',
|
||||
'amount_due' => 'Amount Due',
|
||||
'paid' => 'Paid',
|
||||
'histories' => 'Histories',
|
||||
'payments' => 'Payments',
|
||||
'add_payment' => 'Add Payment',
|
||||
'download_pdf' => 'Download PDF',
|
||||
'send_mail' => 'Send Email',
|
||||
|
||||
'status' => [
|
||||
'new' => 'New',
|
||||
'updated' => 'Updated',
|
||||
'partial' => 'Partial',
|
||||
'paid' => 'Paid',
|
||||
],
|
||||
|
||||
];
|
||||
7
resources/lang/en-GB/categories.php
Normal file
7
resources/lang/en-GB/categories.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'all' => 'All Categories',
|
||||
'all_types' => 'All Types'
|
||||
];
|
||||
13
resources/lang/en-GB/companies.php
Normal file
13
resources/lang/en-GB/companies.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'domain' => 'Domain',
|
||||
'logo' => 'Logo',
|
||||
'manage' => 'Manage Companies',
|
||||
'all' => 'All Companies',
|
||||
'error' => [
|
||||
'delete_active' => 'Error: Can not delete active company, please, change it first!',
|
||||
],
|
||||
|
||||
];
|
||||
9
resources/lang/en-GB/currencies.php
Normal file
9
resources/lang/en-GB/currencies.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'code' => 'Code',
|
||||
'rate' => 'Rate',
|
||||
'default' => 'Default Currency',
|
||||
|
||||
];
|
||||
5
resources/lang/en-GB/customer.php
Normal file
5
resources/lang/en-GB/customer.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'all' => 'All Customers',
|
||||
];
|
||||
24
resources/lang/en-GB/dashboard.php
Normal file
24
resources/lang/en-GB/dashboard.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'total_incomes' => 'Total Incomes',
|
||||
'receivables' => 'Receivables',
|
||||
'open_invoices' => 'Open Invoices',
|
||||
'overdue_invoices' => 'Overdue Invoices',
|
||||
'total_expenses' => 'Total Expenses',
|
||||
'payables' => 'Payables',
|
||||
'open_bills' => 'Open Bills',
|
||||
'overdue_bills' => 'Overdue Bills',
|
||||
'total_profit' => 'Total Profit',
|
||||
'open_profit' => 'Open Profit',
|
||||
'overdue_profit' => 'Overdue Profit',
|
||||
'cash_flow' => 'Cash Flow',
|
||||
'no_profit_loss' => 'No Profit Loss',
|
||||
'incomes_by_category' => 'Incomes By Category',
|
||||
'expenses_by_category' => 'Expenses By Category',
|
||||
'account_balance' => 'Account Balance',
|
||||
'latest_incomes' => 'Latest Incomes',
|
||||
'latest_expenses' => 'Latest Expenses',
|
||||
|
||||
];
|
||||
17
resources/lang/en-GB/demo.php
Normal file
17
resources/lang/en-GB/demo.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'accounts_cash' => 'Cash',
|
||||
'categories_uncat' => 'Uncategorised',
|
||||
'categories_deposit' => 'Deposit',
|
||||
'categories_sales' => 'Sales',
|
||||
'currencies_usd' => 'US Dollar',
|
||||
'currencies_eur' => 'Euro',
|
||||
'currencies_gbp' => 'British Pound',
|
||||
'currencies_try' => 'Turkish Lira',
|
||||
'taxes_exempt' => 'Tax Exempt',
|
||||
'taxes_normal' => 'Normal',
|
||||
'taxes_sales' => 'Sales Tax',
|
||||
|
||||
];
|
||||
9
resources/lang/en-GB/footer.php
Normal file
9
resources/lang/en-GB/footer.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'version' => 'Version',
|
||||
'powered' => 'Powered By Akaunting',
|
||||
'software' => 'Free Accounting Software',
|
||||
|
||||
];
|
||||
109
resources/lang/en-GB/general.php
Normal file
109
resources/lang/en-GB/general.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'items' => 'Item|Items',
|
||||
'incomes' => 'Income|Incomes',
|
||||
'invoices' => 'Invoice|Invoices',
|
||||
'revenues' => 'Revenue|Revenues',
|
||||
'customers' => 'Customer|Customers',
|
||||
'expenses' => 'Expense|Expenses',
|
||||
'bills' => 'Bill|Bills',
|
||||
'payments' => 'Payment|Payments',
|
||||
'vendors' => 'Vendor|Vendors',
|
||||
'accounts' => 'Account|Accounts',
|
||||
'transfers' => 'Transfer|Transfers',
|
||||
'transactions' => 'Transaction|Transactions',
|
||||
'reports' => 'Report|Reports',
|
||||
'settings' => 'Setting|Settings',
|
||||
'categories' => 'Category|Categories',
|
||||
'currencies' => 'Currency|Currencies',
|
||||
'tax_rates' => 'Tax Rate|Tax Rates',
|
||||
'users' => 'User|Users',
|
||||
'roles' => 'Role|Roles',
|
||||
'permissions' => 'Permission|Permissions',
|
||||
'modules' => 'App|Apps',
|
||||
'companies' => 'Company|Companies',
|
||||
'profits' => 'Profit|Profits',
|
||||
'taxes' => 'Tax|Taxes',
|
||||
'pictures' => 'Picture|Pictures',
|
||||
'types' => 'Type|Types',
|
||||
'payment_methods' => 'Payment Method|Payment Methods',
|
||||
'compares' => 'Income vs Expense|Incomes vs Expenses',
|
||||
'notes' => 'Note|Notes',
|
||||
'totals' => 'Total|Totals',
|
||||
'languages' => 'Language|Languages',
|
||||
'updates' => 'Update|Updates',
|
||||
'numbers' => 'Number|Numbers',
|
||||
|
||||
'dashboard' => 'Dashboard',
|
||||
'banking' => 'Banking',
|
||||
'general' => 'General',
|
||||
'no_records' => 'No records.',
|
||||
'date' => 'Date',
|
||||
'amount' => 'Amount',
|
||||
'enabled' => 'Enabled',
|
||||
'disabled' => 'Disabled',
|
||||
'yes' => 'Yes',
|
||||
'no' => 'No',
|
||||
'na' => 'N/A',
|
||||
'daily' => 'Daily',
|
||||
'monthly' => 'Monthly',
|
||||
'yearly' => 'Yearly',
|
||||
'add' => 'Add',
|
||||
'add_new' => 'Add New',
|
||||
'show' => 'Show',
|
||||
'edit' => 'Edit',
|
||||
'delete' => 'Delete',
|
||||
'send' => 'Send',
|
||||
'download' => 'Download',
|
||||
'delete_confirm' => 'Confirm delete :name :type?',
|
||||
'name' => 'Name',
|
||||
'email' => 'Email',
|
||||
'tax_number' => 'Tax Number',
|
||||
'phone' => 'Phone',
|
||||
'address' => 'Address',
|
||||
'website' => 'Website',
|
||||
'actions' => 'Actions',
|
||||
'description' => 'Description',
|
||||
'manage' => 'Manage',
|
||||
'code' => 'Code',
|
||||
'alias' => 'Alias',
|
||||
'balance' => 'Balance',
|
||||
'reference' => 'Reference',
|
||||
'attachment' => 'Attachment',
|
||||
'change' => 'Change',
|
||||
'color' => 'Colour',
|
||||
'save' => 'Save',
|
||||
'cancel' => 'Cancel',
|
||||
'status' => 'Status',
|
||||
'from' => 'From',
|
||||
'to' => 'To',
|
||||
'print' => 'Print',
|
||||
'search' => 'Search',
|
||||
'search_placeholder' => 'Type to search..',
|
||||
'filter' => 'Filter',
|
||||
'create_user' => 'Create User',
|
||||
'created_user' => 'Created User',
|
||||
'all_statuses' => 'All Statuses',
|
||||
'bank' => 'Bank Transfer',
|
||||
'cash' => 'Cash',
|
||||
'paypal' => 'PayPal',
|
||||
'help' => 'Help',
|
||||
'all' => 'All',
|
||||
'upcoming' => 'Upcoming',
|
||||
|
||||
'title' => [
|
||||
'new' => 'New :type',
|
||||
'edit' => 'Edit :type',
|
||||
],
|
||||
'form' => [
|
||||
'enter' => 'Enter :field',
|
||||
'select' => [
|
||||
'field' => '- Select :field -',
|
||||
'file' => 'Select File',
|
||||
],
|
||||
'no_file_selected' => 'No file selected...',
|
||||
],
|
||||
|
||||
];
|
||||
14
resources/lang/en-GB/header.php
Normal file
14
resources/lang/en-GB/header.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'change_language' => 'Change Language',
|
||||
'last_login' => 'Last login :time',
|
||||
'notifications' => [
|
||||
'counter' => '{0} You have no notification|{1} You have :count notification|[2,*] You have :count notifications',
|
||||
'overdue_invoices' => '{1} :count overdue invoice|[2,*] :count overdue invoices',
|
||||
'upcoming_bills' => '{1} :count upcoming bill|[2,*] :count upcoming bills',
|
||||
'view_all' => 'View All'
|
||||
],
|
||||
|
||||
];
|
||||
45
resources/lang/en-GB/install.php
Normal file
45
resources/lang/en-GB/install.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'next' => 'Next',
|
||||
'refresh' => 'Refresh',
|
||||
|
||||
'steps' => [
|
||||
'requirements' => 'Please, meet the following requirements!',
|
||||
'language' => 'Step 1/3 : Language Selection',
|
||||
'database' => 'Step 2/3 : Database Setup',
|
||||
'settings' => 'Step 3/3 : Company and Admin Details',
|
||||
],
|
||||
|
||||
'language' => [
|
||||
'select' => 'Select Language',
|
||||
],
|
||||
|
||||
'requirements' => [
|
||||
'php_version' => 'PHP 5.6.4 or above needs to be used!',
|
||||
'enabled' => ':feature needs to be enabled!',
|
||||
'disabled' => ':feature needs to be disabled!',
|
||||
'extension' => ':extension extension needs to be loaded!',
|
||||
'directory' => ':directory directory needs to be writable!',
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'hostname' => 'Hostname',
|
||||
'username' => 'Username',
|
||||
'password' => 'Password',
|
||||
'name' => 'Database',
|
||||
],
|
||||
|
||||
'settings' => [
|
||||
'company_name' => 'Company Name',
|
||||
'company_email' => 'Company Email',
|
||||
'admin_email' => 'Admin Email',
|
||||
'admin_password' => 'Admin Password',
|
||||
],
|
||||
|
||||
'error' => [
|
||||
'connection' => 'Error: Could not connect to the database! Please, make sure the details are correct.',
|
||||
],
|
||||
|
||||
];
|
||||
37
resources/lang/en-GB/invoices.php
Normal file
37
resources/lang/en-GB/invoices.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'invoice_number' => 'Invoice Number',
|
||||
'invoice_date' => 'Invoice Date',
|
||||
'total_price' => 'Total Price',
|
||||
'due_date' => 'Due Date',
|
||||
'order_number' => 'Order Number',
|
||||
'bill_to' => 'Bill To',
|
||||
|
||||
'quantity' => 'Quantity',
|
||||
'price' => 'Price',
|
||||
'sub_total' => 'Subtotal',
|
||||
'tax_total' => 'Tax Total',
|
||||
'total' => 'Total',
|
||||
|
||||
'item_name' => 'Item Name|Item Names',
|
||||
|
||||
'payment_due' => 'Payment Due',
|
||||
'paid' => 'Paid',
|
||||
'histories' => 'Histories',
|
||||
'payments' => 'Payments',
|
||||
'add_payment' => 'Add Payment',
|
||||
'download_pdf' => 'Download PDF',
|
||||
'send_mail' => 'Send Email',
|
||||
|
||||
'status' => [
|
||||
'draft' => 'Draft',
|
||||
'sent' => 'Sent',
|
||||
'viewed' => 'Viewed',
|
||||
'approved' => 'Approved',
|
||||
'partial' => 'Partial',
|
||||
'paid' => 'Paid',
|
||||
],
|
||||
|
||||
];
|
||||
10
resources/lang/en-GB/items.php
Normal file
10
resources/lang/en-GB/items.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'quantities' => 'Quantity|Quantities',
|
||||
'sales_price' => 'Sale Price',
|
||||
'purchase_price' => 'Purchase Price',
|
||||
'sku' => 'SKU',
|
||||
|
||||
];
|
||||
17
resources/lang/en-GB/messages.php
Normal file
17
resources/lang/en-GB/messages.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'success' => [
|
||||
'added' => ':type added!',
|
||||
'updated' => ':type updated!',
|
||||
'deleted' => ':type deleted!',
|
||||
],
|
||||
'error' => [
|
||||
'not_user_company' => 'Error: You are not allowed to manage this company!',
|
||||
],
|
||||
'warning' => [
|
||||
'deleted' => 'Warning: You are not delete :type. Because it has :text',
|
||||
],
|
||||
|
||||
];
|
||||
42
resources/lang/en-GB/modules.php
Normal file
42
resources/lang/en-GB/modules.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'api_token' => 'Token',
|
||||
'enter_api_token' => 'Enter your API token',
|
||||
'top_paid' => 'Top Paid',
|
||||
'new' => 'New',
|
||||
'top_free' => 'Top Free',
|
||||
'free' => 'FREE',
|
||||
'install' => 'Install',
|
||||
'buy_now' => 'Buy Now',
|
||||
'faq' => 'FAQ',
|
||||
'changelog' => 'Changelog',
|
||||
'installed' => 'Changelog',
|
||||
'uninstalled' => 'Changelog',
|
||||
|
||||
'enabled' => ':module module enabled',
|
||||
'disabled' => ':module module disabled',
|
||||
|
||||
'installation' => [
|
||||
'header' => 'Module Installation',
|
||||
'start' => ':module installing.',
|
||||
'download' => 'Downloading :module file.',
|
||||
'unzip' => 'Extracting :module files.',
|
||||
'install' => 'Uploading :module files.',
|
||||
],
|
||||
|
||||
'history' => [
|
||||
'installed' => ':module installed',
|
||||
'uninstalled' => ':module uninstall',
|
||||
'updated' => ':module updated',
|
||||
'enabled' => ':module enabled',
|
||||
'disabled' => ':module disabled',
|
||||
],
|
||||
|
||||
'button' => [
|
||||
'uninstall' => 'Uninstall',
|
||||
'disable' => 'Disable',
|
||||
'enable' => 'Enable',
|
||||
],
|
||||
];
|
||||
9
resources/lang/en-GB/pagination.php
Normal file
9
resources/lang/en-GB/pagination.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'previous' => '« Previous',
|
||||
'next' => 'Next »',
|
||||
'showing' => 'Showing :first to :last of :total :type',
|
||||
|
||||
];
|
||||
22
resources/lang/en-GB/passwords.php
Normal file
22
resources/lang/en-GB/passwords.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are the default lines which match reasons
|
||||
| that are given by the password broker for a password update attempt
|
||||
| has failed, such as for an invalid token or invalid new password.
|
||||
|
|
||||
*/
|
||||
|
||||
'password' => 'Passwords must be at least six characters and match the confirmation.',
|
||||
'reset' => 'Your password has been reset!',
|
||||
'sent' => 'We have e-mailed your password reset link!',
|
||||
'token' => 'This password reset token is invalid.',
|
||||
'user' => "We can't find a user with that e-mail address.",
|
||||
|
||||
];
|
||||
11
resources/lang/en-GB/reports.php
Normal file
11
resources/lang/en-GB/reports.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'summary' => [
|
||||
'income' => 'Income Summary',
|
||||
'expense' => 'Expense Summary',
|
||||
'income_expense' => 'Income vs Expense',
|
||||
],
|
||||
|
||||
];
|
||||
7
resources/lang/en-GB/roles.php
Normal file
7
resources/lang/en-GB/roles.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'all' => 'All Roles',
|
||||
|
||||
];
|
||||
85
resources/lang/en-GB/settings.php
Normal file
85
resources/lang/en-GB/settings.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'company' => [
|
||||
'name' => 'Name',
|
||||
'email' => 'Email',
|
||||
'phone' => 'Phone',
|
||||
'address' => 'Address',
|
||||
'logo' => 'Logo',
|
||||
],
|
||||
'localisation' => [
|
||||
'tab' => 'Localisation',
|
||||
'date' => [
|
||||
'format' => 'Date Format',
|
||||
'separator' => 'Date Separator',
|
||||
'dash' => 'Dash (-)',
|
||||
'dot' => 'Dot (.)',
|
||||
'comma' => 'Comma (,)',
|
||||
'slash' => 'Slash (/)',
|
||||
'space' => 'Space ( )',
|
||||
],
|
||||
'timezone' => 'Time Zone',
|
||||
],
|
||||
'invoice' => [
|
||||
'tab' => 'Invoice',
|
||||
'prefix' => 'Invoice Prefix',
|
||||
'digit' => 'Invoice Number Digit',
|
||||
'start' => 'Invoice Start Number',
|
||||
'logo' => 'Invoice Logo',
|
||||
],
|
||||
'default' => [
|
||||
'tab' => 'Defaults',
|
||||
'account' => 'Default Account',
|
||||
'currency' => 'Default Currency',
|
||||
'tax' => 'Default Tax Rate',
|
||||
'payment' => 'Default Payment Method',
|
||||
'language' => 'Default Language',
|
||||
],
|
||||
'email' => [
|
||||
'protocol' => 'Protocol',
|
||||
'php' => 'PHP Mail',
|
||||
'smtp' => [
|
||||
'name' => 'SMTP',
|
||||
'host' => 'SMTP Host',
|
||||
'port' => 'SMTP Port',
|
||||
'username' => 'SMTP Username',
|
||||
'password' => 'SMTP Password',
|
||||
'encryption' => 'SMTP Security',
|
||||
'none' => 'None',
|
||||
],
|
||||
'sendmail' => 'Sendmail',
|
||||
'sendmail_path' => 'Sendmail Path',
|
||||
'log' => 'Log Emails',
|
||||
],
|
||||
'scheduling' => [
|
||||
'tab' => 'Scheduling',
|
||||
'send_invoice' => 'Send Invoice Reminder',
|
||||
'invoice_days' => 'Send After Due Days',
|
||||
'send_bill' => 'Send Bill Reminder',
|
||||
'bill_days' => 'Send Before Due Days',
|
||||
'cron_command' => 'Cron Command',
|
||||
'schedule_time' => 'Hour To Run',
|
||||
],
|
||||
'appearance' => [
|
||||
'tab' => 'Appearance',
|
||||
'theme' => 'Theme',
|
||||
'light' => 'Light',
|
||||
'dark' => 'Dark',
|
||||
'list_limit' => 'Records Per Page',
|
||||
'use_gravatar' => 'Use Gravatar',
|
||||
],
|
||||
'system' => [
|
||||
'tab' => 'System',
|
||||
'session' => [
|
||||
'lifetime' => 'Session Lifetime (Minutes)',
|
||||
'handler' => 'Session Handler',
|
||||
'file' => 'File',
|
||||
'database' => 'Database',
|
||||
],
|
||||
'file_size' => 'Max File Size (MB)',
|
||||
'file_types' => 'Allowed File Types',
|
||||
],
|
||||
|
||||
];
|
||||
8
resources/lang/en-GB/taxes.php
Normal file
8
resources/lang/en-GB/taxes.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'rate' => 'Rate',
|
||||
'rate_percent' => 'Rate (%)',
|
||||
|
||||
];
|
||||
8
resources/lang/en-GB/transfers.php
Normal file
8
resources/lang/en-GB/transfers.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'from_account' => 'From Account',
|
||||
'to_account' => 'To Account',
|
||||
|
||||
];
|
||||
12
resources/lang/en-GB/updates.php
Normal file
12
resources/lang/en-GB/updates.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'installed_version' => 'Installed Version',
|
||||
'latest_version' => 'Latest Version',
|
||||
'update' => 'Update Akaunting to :version version',
|
||||
'changelog' => 'Changelog',
|
||||
'new_core' => 'An updated version of Akaunting is available.',
|
||||
'latest_core' => 'Congratulations! You have the latest version of Akaunting. Future security updates will be applied automatically.',
|
||||
|
||||
];
|
||||
119
resources/lang/en-GB/validation.php
Normal file
119
resources/lang/en-GB/validation.php
Normal file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain the default error messages used by
|
||||
| the validator class. Some of these rules have multiple versions such
|
||||
| as the size rules. Feel free to tweak each of these messages here.
|
||||
|
|
||||
*/
|
||||
|
||||
'accepted' => 'The :attribute must be accepted.',
|
||||
'active_url' => 'The :attribute is not a valid URL.',
|
||||
'after' => 'The :attribute must be a date after :date.',
|
||||
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
||||
'alpha' => 'The :attribute may only contain letters.',
|
||||
'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
|
||||
'alpha_num' => 'The :attribute may only contain letters and numbers.',
|
||||
'array' => 'The :attribute must be an array.',
|
||||
'before' => 'The :attribute must be a date before :date.',
|
||||
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
||||
'between' => [
|
||||
'numeric' => 'The :attribute must be between :min and :max.',
|
||||
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
||||
'string' => 'The :attribute must be between :min and :max characters.',
|
||||
'array' => 'The :attribute must have between :min and :max items.',
|
||||
],
|
||||
'boolean' => 'The :attribute field must be true or false.',
|
||||
'confirmed' => 'The :attribute confirmation does not match.',
|
||||
'date' => 'The :attribute is not a valid date.',
|
||||
'date_format' => 'The :attribute does not match the format :format.',
|
||||
'different' => 'The :attribute and :other must be different.',
|
||||
'digits' => 'The :attribute must be :digits digits.',
|
||||
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
||||
'dimensions' => 'The :attribute has invalid image dimensions.',
|
||||
'distinct' => 'The :attribute field has a duplicate value.',
|
||||
'email' => 'The :attribute must be a valid email address.',
|
||||
'exists' => 'The selected :attribute is invalid.',
|
||||
'file' => 'The :attribute must be a file.',
|
||||
'filled' => 'The :attribute field must have a value.',
|
||||
'image' => 'The :attribute must be an image.',
|
||||
'in' => 'The selected :attribute is invalid.',
|
||||
'in_array' => 'The :attribute field does not exist in :other.',
|
||||
'integer' => 'The :attribute must be an integer.',
|
||||
'ip' => 'The :attribute must be a valid IP address.',
|
||||
'json' => 'The :attribute must be a valid JSON string.',
|
||||
'max' => [
|
||||
'numeric' => 'The :attribute may not be greater than :max.',
|
||||
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
||||
'string' => 'The :attribute may not be greater than :max characters.',
|
||||
'array' => 'The :attribute may not have more than :max items.',
|
||||
],
|
||||
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
||||
'min' => [
|
||||
'numeric' => 'The :attribute must be at least :min.',
|
||||
'file' => 'The :attribute must be at least :min kilobytes.',
|
||||
'string' => 'The :attribute must be at least :min characters.',
|
||||
'array' => 'The :attribute must have at least :min items.',
|
||||
],
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'numeric' => 'The :attribute must be a number.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'regex' => 'The :attribute format is invalid.',
|
||||
'required' => 'The :attribute field is required.',
|
||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||
'required_with' => 'The :attribute field is required when :values is present.',
|
||||
'required_with_all' => 'The :attribute field is required when :values is present.',
|
||||
'required_without' => 'The :attribute field is required when :values is not present.',
|
||||
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||
'same' => 'The :attribute and :other must match.',
|
||||
'size' => [
|
||||
'numeric' => 'The :attribute must be :size.',
|
||||
'file' => 'The :attribute must be :size kilobytes.',
|
||||
'string' => 'The :attribute must be :size characters.',
|
||||
'array' => 'The :attribute must contain :size items.',
|
||||
],
|
||||
'string' => 'The :attribute must be a string.',
|
||||
'timezone' => 'The :attribute must be a valid zone.',
|
||||
'unique' => 'The :attribute has already been taken.',
|
||||
'uploaded' => 'The :attribute failed to upload.',
|
||||
'url' => 'The :attribute format is invalid.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => [
|
||||
'attribute-name' => [
|
||||
'rule-name' => 'custom-message',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap attribute place-holders
|
||||
| with something more reader friendly such as E-Mail Address instead
|
||||
| of "email". This simply helps us make messages a little cleaner.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [],
|
||||
|
||||
];
|
||||
15
resources/lang/tr-TR/accounts.php
Normal file
15
resources/lang/tr-TR/accounts.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'account_name' => 'Hesap İsmi',
|
||||
'number' => 'Numara',
|
||||
'opening_balance' => 'Açılış Bakiyesi',
|
||||
'current_balance' => 'Mevcut Bakiye',
|
||||
'bank_name' => 'Banka İsmi',
|
||||
'bank_phone' => 'Banka Telefonu',
|
||||
'bank_address' => 'Banka Adresi',
|
||||
'default_account' => 'Varsayılan Hesap',
|
||||
'all' => 'Tüm Hesaplar'
|
||||
|
||||
];
|
||||
30
resources/lang/tr-TR/auth.php
Normal file
30
resources/lang/tr-TR/auth.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'profile' => 'Profil',
|
||||
'logout' => 'Çıkış',
|
||||
'login' => 'Giriş',
|
||||
'login_to' => 'Oturum açmak için giriş yapınız',
|
||||
'remember_me' => 'Beni Hatırla',
|
||||
'forgot_password' => 'Şifremi unuttum',
|
||||
'reset_password' => 'Şifremi Sıfırla',
|
||||
'enter_email' => 'Email Adresinizi Giriniz',
|
||||
'current_email' => 'Current Email',
|
||||
'reset' => 'Sıfırla',
|
||||
'never' => 'hiçbir zaman',
|
||||
|
||||
'password' => [
|
||||
'current' => 'Şifre',
|
||||
'current_confirm' => 'Şifre Onayı',
|
||||
'new' => 'Yeni Şifre',
|
||||
'new_confirm' => 'Yeni Şifre Onayı',
|
||||
],
|
||||
'error' => [
|
||||
'self_delete' => 'Hata: Kendinizi silemezsiniz!'
|
||||
],
|
||||
|
||||
'failed' => 'Bu kullanıcı bilgileri, bizim verilerimizle eşleşmiyor.',
|
||||
'throttle' => 'Çok fazla oturum açma girişimi. Lütfen :seconds saniye içinde tekrar deneyin.',
|
||||
|
||||
];
|
||||
25
resources/lang/tr-TR/bills.php
Normal file
25
resources/lang/tr-TR/bills.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'bill_number' => 'Fatura Numarası',
|
||||
'bill_date' => 'Fatura Tarihi',
|
||||
'total_price' => 'Toplam Tutar',
|
||||
'due_date' => 'Vade Tarihi',
|
||||
'order_number' => 'Sipariş Numarası',
|
||||
|
||||
'payment_due' => 'Son Ödeme Tarihi',
|
||||
'amount_due' => 'Ödenecek Miktar',
|
||||
'paid' => 'Ödenmiş',
|
||||
'quantity' => 'Adet',
|
||||
'total' => 'Toplam',
|
||||
'sub_total' => 'Ara Toplam',
|
||||
'tax_total' => 'Vergi Toplamı',
|
||||
|
||||
'add_payment' => 'Ödeme Ekle',
|
||||
'download_pdf' => 'PDF İndir',
|
||||
'send_mail' => 'Email Gönder',
|
||||
'histories' => 'Geçmiş',
|
||||
'payments' => 'Ödemeler',
|
||||
|
||||
];
|
||||
7
resources/lang/tr-TR/categories.php
Normal file
7
resources/lang/tr-TR/categories.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'all' => 'Tüm Kategoriler',
|
||||
'all_types' => 'Tümü'
|
||||
];
|
||||
13
resources/lang/tr-TR/companies.php
Normal file
13
resources/lang/tr-TR/companies.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'domain' => 'Alan Adı',
|
||||
'logo' => 'Logo',
|
||||
'manage' => 'Şirketleri Yönet',
|
||||
'all' => 'Tüm Şirketler',
|
||||
'error' => [
|
||||
'delete_active' => 'Hata: Etkin şirketi silemezsiniz, önce değiştirin lütfen!',
|
||||
],
|
||||
|
||||
];
|
||||
9
resources/lang/tr-TR/currencies.php
Normal file
9
resources/lang/tr-TR/currencies.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'code' => 'Kod',
|
||||
'rate' => 'Kur',
|
||||
'default' => 'Varsayılan Para Birimi',
|
||||
|
||||
];
|
||||
5
resources/lang/tr-TR/customer.php
Normal file
5
resources/lang/tr-TR/customer.php
Normal file
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'all' => 'Tüm Müşteriler',
|
||||
];
|
||||
24
resources/lang/tr-TR/dashboard.php
Normal file
24
resources/lang/tr-TR/dashboard.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'total_incomes' => 'Toplam Gelir',
|
||||
'receivables' => 'Alacak',
|
||||
'open_invoices' => 'Açık Faturalar',
|
||||
'overdue_invoices' => 'Gecikmiş Faturalar',
|
||||
'total_expenses' => 'Toplam Gider',
|
||||
'payables' => 'Verecek',
|
||||
'open_bills' => 'Açık Faturalar',
|
||||
'overdue_bills' => 'Gecikmiş Faturalar',
|
||||
'total_profit' => 'Toplam Kar',
|
||||
'open_profit' => 'Açık Kar',
|
||||
'overdue_profit' => 'Gecikmiş Kar',
|
||||
'cash_flow' => 'Nakit Akışı',
|
||||
'no_profit_loss' => 'No Profit Loss',
|
||||
'incomes_by_category' => 'Gelir Kategorileri',
|
||||
'expenses_by_category' => 'Gider Kategorileri',
|
||||
'account_balance' => 'Hesap Bakiyesi',
|
||||
'latest_incomes' => 'Son Gelirler',
|
||||
'latest_expenses' => 'Son Giderler',
|
||||
|
||||
];
|
||||
17
resources/lang/tr-TR/demo.php
Normal file
17
resources/lang/tr-TR/demo.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'accounts_cash' => 'Kasa',
|
||||
'categories_uncat' => 'Kategorize edilmemiş',
|
||||
'categories_deposit' => 'Depozito',
|
||||
'categories_sales' => 'Satış',
|
||||
'currencies_usd' => 'Amerikan Doları',
|
||||
'currencies_eur' => 'Avro',
|
||||
'currencies_gbp' => 'İngiliz Sterlini',
|
||||
'currencies_try' => 'Türk Lirası',
|
||||
'taxes_exempt' => 'Muaf',
|
||||
'taxes_normal' => 'Normal',
|
||||
'taxes_sales' => 'Satış',
|
||||
|
||||
];
|
||||
9
resources/lang/tr-TR/footer.php
Normal file
9
resources/lang/tr-TR/footer.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'version' => 'Sürüm',
|
||||
'powered' => 'Altyapı Akaunting',
|
||||
'software' => 'Ücretsiz Ön Muhasebe Programı',
|
||||
|
||||
];
|
||||
103
resources/lang/tr-TR/general.php
Normal file
103
resources/lang/tr-TR/general.php
Normal file
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'items' => 'Ürün / Hizmet|Ürünler / Hizmetler',
|
||||
'incomes' => 'Gelir|Gelirler',
|
||||
'invoices' => 'Fatura|Faturalar',
|
||||
'revenues' => 'Tahsilat|Tahsilatlar',
|
||||
'customers' => 'Müşteri|Müşteriler',
|
||||
'expenses' => 'Gider|Giderler',
|
||||
'bills' => 'Fatura|Faturalar',
|
||||
'payments' => 'Ödeme|Ödemeler',
|
||||
'vendors' => 'Tedarikçi|Tedarikçiler',
|
||||
'accounts' => 'Hesap|Hesaplar',
|
||||
'transfers' => 'Transfer|Transferler',
|
||||
'transactions' => 'İşlem|İşlemler',
|
||||
'reports' => 'Rapor|Raporlar',
|
||||
'settings' => 'Ayar|Ayarlar',
|
||||
'categories' => 'Kategori|Kategoriler',
|
||||
'currencies' => 'Para Birimi|Para Birimleri',
|
||||
'tax_rates' => 'Vergi Oranı|Vergi Oranları',
|
||||
'users' => 'Kullanıcı|Kullanıcılar',
|
||||
'roles' => 'Görev|Görevler',
|
||||
'permissions' => 'İzin|İzinler',
|
||||
'modules' => 'Uygulama|Uygulamalar',
|
||||
'companies' => 'Şirket|Şirketler',
|
||||
'profits' => 'Kar|Kar',
|
||||
'taxes' => 'Vergi Oranı|Vergi Oranları',
|
||||
'pictures' => 'Resim|Resimler',
|
||||
'types' => 'Tip|Tipler',
|
||||
'payment_methods' => 'Ödeme Yöntemi|Ödeme Yöntemleri',
|
||||
'compares' => 'Income vs Expense|Incomes vs Expenses',
|
||||
'notes' => 'Açıklama|Açıklamalar',
|
||||
'totals' => 'Toplam|Toplamlar',
|
||||
'languages' => 'Dil|Diller',
|
||||
'updates' => 'Güncelleme|Güncellemeler',
|
||||
'numbers' => 'Sayı|Sayılar',
|
||||
|
||||
'dashboard' => 'Kontrol Paneli',
|
||||
'banking' => 'Banka',
|
||||
'general' => 'Genel',
|
||||
'no_records' => 'Kayıt yok.',
|
||||
'date' => 'Tarih',
|
||||
'amount' => 'Tutar',
|
||||
'enabled' => 'Etkin',
|
||||
'disabled' => 'Devredışı',
|
||||
'yes' => 'Evet',
|
||||
'no' => 'Hayır',
|
||||
'na' => '- Yok -',
|
||||
'daily' => 'Günlük',
|
||||
'monthly' => 'Aylık',
|
||||
'yearly' => 'Yıllık',
|
||||
'add_new' => 'Yeni Ekle',
|
||||
'edit' => 'Düzenle',
|
||||
'delete' => 'Sil',
|
||||
'delete_confirm' => ':name :type silinsin mi?',
|
||||
'name' => 'İsim',
|
||||
'email' => 'Email',
|
||||
'phone' => 'Telefon',
|
||||
'address' => 'Adres',
|
||||
'website' => 'Website',
|
||||
'actions' => 'Eylem',
|
||||
'description' => 'Açıklama',
|
||||
'manage' => 'Yönet',
|
||||
'code' => 'Kod',
|
||||
'alias' => 'Rumuz',
|
||||
'balance' => 'Bakiye',
|
||||
'reference' => 'Referans',
|
||||
'attachment' => 'Dosya',
|
||||
'change' => 'Değiştir',
|
||||
'color' => 'Renk',
|
||||
'save' => 'Kaydet',
|
||||
'cancel' => 'İptal',
|
||||
'send' => 'Gönder',
|
||||
'status' => 'Durum',
|
||||
'filter' => 'Filtrele',
|
||||
'search' => 'Ara',
|
||||
'search_placeholder' => 'Aranacak kelime..',
|
||||
'show' => 'Göster',
|
||||
'all_statuses' => 'Tümü',
|
||||
'from' => 'Tarafından',
|
||||
'to' => 'Tarafına',
|
||||
'bank' => 'Banka Transferi',
|
||||
'cash' => 'Nakit',
|
||||
'paypal' => 'PayPal',
|
||||
'help' => 'Yardım',
|
||||
'all' => 'Hepsi',
|
||||
'upcoming' => 'Gelecek',
|
||||
|
||||
'title' => [
|
||||
'new' => 'Yeni :type',
|
||||
'edit' => ':type Düzenle',
|
||||
],
|
||||
'form' => [
|
||||
'enter' => ':field Girin',
|
||||
'select' => [
|
||||
'field' => '- :field Seçin -',
|
||||
'file' => 'Dosya Seçin',
|
||||
],
|
||||
'no_file_selected' => 'Dosya seçilmemiş...',
|
||||
],
|
||||
|
||||
];
|
||||
8
resources/lang/tr-TR/header.php
Normal file
8
resources/lang/tr-TR/header.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'change_language' => 'Dil Değiştir',
|
||||
'last_login' => 'Son giriş :time',
|
||||
|
||||
];
|
||||
44
resources/lang/tr-TR/install.php
Normal file
44
resources/lang/tr-TR/install.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'next' => 'İleri',
|
||||
|
||||
'steps' => [
|
||||
'requirements' => 'Lütfen, aşağıdaki sistem gereksinimlerini karşılayın!',
|
||||
'language' => 'Adım 1/3 : Dil Seçimi',
|
||||
'database' => 'Adım 2/3 : Veritabanı Ayarları',
|
||||
'settings' => 'Adım 3/3 : Şirket ve Yönetici Bilgileri',
|
||||
],
|
||||
|
||||
'language' => [
|
||||
'select' => 'Dil Seçin',
|
||||
],
|
||||
|
||||
'requirements' => [
|
||||
'php_version' => 'PHP sürümünüz 5.6.4 veya üstü olmalıdır!',
|
||||
'enabled' => ':feature etkin olmalıdır!',
|
||||
'disabled' => ':feature devre dışı bırakılmalıdır!',
|
||||
'extension' => ':extension eklentisi yüklenmelidir!',
|
||||
'directory' => ':directory dizini yazılabilir olmalıdır!',
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'hostname' => 'Sunucu',
|
||||
'username' => 'Kullanıcı',
|
||||
'password' => 'Şifre',
|
||||
'name' => 'Veritabanı',
|
||||
],
|
||||
|
||||
'settings' => [
|
||||
'company_name' => 'Şirket Adı',
|
||||
'company_email' => 'Şirket e-Postası',
|
||||
'admin_email' => 'Yönetici e-Postası',
|
||||
'admin_password' => 'Yönetici Şifresi',
|
||||
],
|
||||
|
||||
'error' => [
|
||||
'connection' => 'Hata: Veritabanına bağlanamıyoruz! Lütfen veritabanı bilgilerini kontrol ediniz.',
|
||||
],
|
||||
|
||||
];
|
||||
23
resources/lang/tr-TR/invoices.php
Normal file
23
resources/lang/tr-TR/invoices.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'invoice_number' => 'Fatura Numarası',
|
||||
'order_number' => 'Sipariş Numarası',
|
||||
'invoice_date' => 'Fatura Tarihi',
|
||||
'due_date' => 'Vade Tarihi',
|
||||
'payment_due' => 'Son Ödeme Tarihi',
|
||||
'total_price' => 'Toplam Tutar',
|
||||
'quantity' => 'Adet',
|
||||
'total' => 'Toplam',
|
||||
'sub_total' => 'Ara Toplam',
|
||||
'tax_total' => 'Vergi Toplamı',
|
||||
|
||||
'paid' => 'Ödenmiş',
|
||||
'histories' => 'Geçmiş',
|
||||
'payments' => 'Ödemeler',
|
||||
'add_payment' => 'Ödeme Ekle',
|
||||
'download_pdf' => 'PDF İndir',
|
||||
'send_mail' => 'Email Gönder',
|
||||
];
|
||||
|
||||
10
resources/lang/tr-TR/items.php
Normal file
10
resources/lang/tr-TR/items.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'quantities' => 'Adet|Adetler',
|
||||
'sales_price' => 'Satış Fiyatı',
|
||||
'purchase_price' => 'Alış Fiyatı',
|
||||
'sku' => 'Ürün Kodu',
|
||||
|
||||
];
|
||||
14
resources/lang/tr-TR/messages.php
Normal file
14
resources/lang/tr-TR/messages.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'success' => [
|
||||
'added' => ':type eklendi!',
|
||||
'updated' => ':type güncellendi!',
|
||||
'deleted' => ':type silindi!',
|
||||
],
|
||||
'error' => [
|
||||
'not_user_company' => 'Hata: Bu şirketi yönetme yetkiniz yok!',
|
||||
],
|
||||
|
||||
];
|
||||
9
resources/lang/tr-TR/pagination.php
Normal file
9
resources/lang/tr-TR/pagination.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'previous' => '« Önceki',
|
||||
'next' => 'Sonraki »',
|
||||
'showing' => ':total kayıttan :first ile :last arasındaki kayıtlar gösteriliyor',
|
||||
|
||||
];
|
||||
22
resources/lang/tr-TR/passwords.php
Normal file
22
resources/lang/tr-TR/passwords.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reminder Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are the default lines which match reasons
|
||||
| that are given by the password broker for a password update attempt
|
||||
| has failed, such as for an invalid token or invalid new password.
|
||||
|
|
||||
*/
|
||||
|
||||
'password' => 'Şifreler en az altı karakter olmalı ve onay ile eşleşmelidir.',
|
||||
'reset' => 'Şifreniz sıfırlandı!',
|
||||
'sent' => 'Şifre sıfırlama bağlantınızı size e-posta ile gönderdik!',
|
||||
'token' => 'Şifre sıfırlama adresi/kodu geçersiz.',
|
||||
'user' => 'Bu e-posta adresi ile kayıtlı bir üye bulunmuyor.',
|
||||
|
||||
];
|
||||
11
resources/lang/tr-TR/reports.php
Normal file
11
resources/lang/tr-TR/reports.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'summary' => [
|
||||
'income' => 'Gelir Özeti',
|
||||
'expense' => 'Gelir Özeti',
|
||||
'income_expense' => 'Gelir Gider Dengesi',
|
||||
],
|
||||
|
||||
];
|
||||
7
resources/lang/tr-TR/roles.php
Normal file
7
resources/lang/tr-TR/roles.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'all' => 'Tüm Roller',
|
||||
|
||||
];
|
||||
29
resources/lang/tr-TR/settings.php
Normal file
29
resources/lang/tr-TR/settings.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'company' => [
|
||||
'name' => 'Şirket İsmi',
|
||||
'email' => 'Şirket Emaili',
|
||||
'address' => 'Şirket Adresi',
|
||||
'logo' => 'Şirket Logosu',
|
||||
],
|
||||
'default' => [
|
||||
'tab' => 'Varsayılanlar',
|
||||
'account' => 'Varsayılan Hesap',
|
||||
'currency' => 'Varsayılan Para Birimi',
|
||||
'payment' => 'Varsayılan Ödeme Yöntemi',
|
||||
],
|
||||
'scheduling' => [
|
||||
'tab' => 'Scheduling',
|
||||
'send_invoice' => 'Gelir Faturası Hatırlat',
|
||||
'invoice_days' => 'Vade Gününden Sonra Gönder',
|
||||
'send_bill' => 'Gider Faturası Hatırlat',
|
||||
'bill_days' => 'Vade Gününden Önce Gönder',
|
||||
'cron_command' => 'Cron Komutu',
|
||||
'schedule_time' => 'Çalışma Saati',
|
||||
],
|
||||
|
||||
|
||||
];
|
||||
|
||||
8
resources/lang/tr-TR/taxes.php
Normal file
8
resources/lang/tr-TR/taxes.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'rate' => 'Oran',
|
||||
'rate_percent' => 'Oran (%)',
|
||||
|
||||
];
|
||||
8
resources/lang/tr-TR/transfers.php
Normal file
8
resources/lang/tr-TR/transfers.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'from_account' => 'Gönderen Hesap',
|
||||
'to_account' => 'Alan Hesap',
|
||||
|
||||
];
|
||||
123
resources/lang/tr-TR/validation.php
Normal file
123
resources/lang/tr-TR/validation.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain the default error messages used by
|
||||
| the validator class. Some of these rules have multiple versions such
|
||||
| as the size rules. Feel free to tweak each of these messages here.
|
||||
|
|
||||
*/
|
||||
|
||||
'accepted' => ':attribute kabul edilmelidir.',
|
||||
'active_url' => ':attribute geçerli bir URL olmalıdır.',
|
||||
'after' => ':attribute şundan daha eski bir tarih olmalıdır :date.',
|
||||
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
||||
'alpha' => ':attribute sadece harflerden oluşmalıdır.',
|
||||
'alpha_dash' => ':attribute sadece harfler, rakamlar ve tirelerden oluşmalıdır.',
|
||||
'alpha_num' => ':attribute sadece harfler ve rakamlar içermelidir.',
|
||||
'array' => ':attribute dizi olmalıdır.',
|
||||
'before' => ':attribute şundan daha önceki bir tarih olmalıdır :date.',
|
||||
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
||||
'between' => [
|
||||
'numeric' => ':attribute :min - :max arasında olmalıdır.',
|
||||
'file' => ':attribute :min - :max arasındaki kilobayt değeri olmalıdır.',
|
||||
'string' => ':attribute :min - :max arasında karakterden oluşmalıdır.',
|
||||
'array' => ':attribute :min - :max arasında nesneye sahip olmalıdır.',
|
||||
],
|
||||
'boolean' => ':attribute sadece doğru veya yanlış olmalıdır.',
|
||||
'confirmed' => ':attribute tekrarı eşleşmiyor.',
|
||||
'date' => ':attribute geçerli bir tarih olmalıdır.',
|
||||
'date_format' => ':attribute :format biçimi ile eşleşmiyor.',
|
||||
'different' => ':attribute ile :other birbirinden farklı olmalıdır.',
|
||||
'digits' => ':attribute :digits rakam olmalıdır.',
|
||||
'digits_between' => ':attribute :min ile :max arasında rakam olmalıdır.',
|
||||
'dimensions' => ':attribute görsel ölçüleri geçersiz.',
|
||||
'distinct' => ':attribute alanı yinelenen bir değere sahip.',
|
||||
'email' => ':attribute biçimi geçersiz.',
|
||||
'exists' => 'Seçili :attribute geçersiz.',
|
||||
'file' => ':attribute dosya olmalıdır.',
|
||||
'filled' => ':attribute alanı gereklidir.',
|
||||
'image' => ':attribute alanı resim dosyası olmalıdır.',
|
||||
'in' => ':attribute değeri geçersiz.',
|
||||
'in_array' => ':attribute alanı :other içinde mevcut değil.',
|
||||
'integer' => ':attribute tamsayı olmalıdır.',
|
||||
'ip' => ':attribute geçerli bir IP adresi olmalıdır.',
|
||||
'ipv4' => 'The :attribute must be a valid IPv4 address.',
|
||||
'ipv6' => 'The :attribute must be a valid IPv6 address.',
|
||||
'json' => ':attribute geçerli bir JSON değişkeni olmalıdır.',
|
||||
'max' => [
|
||||
'numeric' => ':attribute değeri :max değerinden küçük olmalıdır.',
|
||||
'file' => ':attribute değeri :max kilobayt değerinden küçük olmalıdır.',
|
||||
'string' => ':attribute değeri :max karakter değerinden küçük olmalıdır.',
|
||||
'array' => ':attribute değeri :max adedinden az nesneye sahip olmalıdır.',
|
||||
],
|
||||
'mimes' => ':attribute dosya biçimi :values olmalıdır.',
|
||||
'mimetypes' => ':attribute dosya biçimi :values olmalıdır.',
|
||||
'min' => [
|
||||
'numeric' => ':attribute değeri :min değerinden büyük olmalıdır.',
|
||||
'file' => ':attribute değeri :min kilobayt değerinden büyük olmalıdır.',
|
||||
'string' => ':attribute değeri :min karakter değerinden büyük olmalıdır.',
|
||||
'array' => ':attribute en az :min nesneye sahip olmalıdır.',
|
||||
],
|
||||
'not_in' => 'Seçili :attribute geçersiz.',
|
||||
'numeric' => ':attribute sayı olmalıdır.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'regex' => ':attribute biçimi geçersiz.',
|
||||
'required' => ':attribute alanı gereklidir.',
|
||||
'required_if' => ':attribute alanı, :other :value değerine sahip olduğunda zorunludur.',
|
||||
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||
'required_with' => ':attribute alanı :values varken zorunludur.',
|
||||
'required_with_all' => ':attribute alanı herhangi bir :values değeri varken zorunludur.',
|
||||
'required_without' => ':attribute alanı :values yokken zorunludur.',
|
||||
'required_without_all' => ':attribute alanı :values değerlerinden herhangi biri yokken zorunludur.',
|
||||
'same' => ':attribute ile :other eşleşmelidir.',
|
||||
'size' => [
|
||||
'numeric' => ':attribute :size olmalıdır.',
|
||||
'file' => ':attribute :size kilobyte olmalıdır.',
|
||||
'string' => ':attribute :size karakter olmalıdır.',
|
||||
'array' => ':attribute :size nesneye sahip olmalıdır.',
|
||||
],
|
||||
'string' => ':attribute dizge olmalıdır.',
|
||||
'timezone' => ':attribute geçerli bir saat dilimi olmalıdır.',
|
||||
'unique' => ':attribute daha önceden kayıt edilmiş.',
|
||||
'uploaded' => 'The :attribute failed to upload.',
|
||||
'url' => ':attribute biçimi geçersiz.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => [
|
||||
'attribute-name' => [
|
||||
'rule-name' => 'custom-message',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap attribute place-holders
|
||||
| with something more reader friendly such as E-Mail Address instead
|
||||
| of "email". This simply helps us make messages a little cleaner.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [
|
||||
//
|
||||
],
|
||||
|
||||
];
|
||||
27
resources/views/auth/forgot/create.blade.php
Normal file
27
resources/views/auth/forgot/create.blade.php
Normal file
@@ -0,0 +1,27 @@
|
||||
@extends('layouts.auth')
|
||||
|
||||
@section('title', trans('auth.reset_password'))
|
||||
@section('message', trans('auth.reset_password'))
|
||||
|
||||
@section('content')
|
||||
<form role="form" method="POST" action="{{ url('auth/forgot') }}">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
<input name="email" type="email" class="form-control" placeholder="{{ trans('auth.enter_email') }}" required>
|
||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||
@if ($errors->has('email'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- /.col -->
|
||||
<div class="col-sm-offset-8 col-sm-4">
|
||||
<button type="submit" class="btn btn-success btn-block btn-flat">{{ trans('general.send') }}</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
67
resources/views/auth/login/create.blade.php
Normal file
67
resources/views/auth/login/create.blade.php
Normal file
@@ -0,0 +1,67 @@
|
||||
@extends('layouts.auth')
|
||||
|
||||
@section('title', trans('auth.login'))
|
||||
@section('message', trans('auth.login_to'))
|
||||
|
||||
@section('content')
|
||||
<form role="form" method="POST" action="{{ url('auth/login') }}">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
<input name="email" type="email" class="form-control" placeholder="{{ trans('general.email') }}" required autofocus>
|
||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||
@if ($errors->has('email'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group has-feedback{{ $errors->has('password') ? ' has-error' : '' }}">
|
||||
<input name="password" type="password" class="form-control" placeholder="{{ trans('auth.password.current') }}" required>
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
@if ($errors->has('password'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="checkbox icheck">
|
||||
<label>
|
||||
<input name="remember" type="checkbox" {{ old('remember') ? 'checked' : '' }}> {{ trans('auth.remember_me') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
<div class="col-sm-4">
|
||||
<button type="submit" class="btn btn-success btn-block btn-flat">{{ trans('auth.login') }}</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<a href="{{ url('auth/forgot') }}">{{ trans('auth.forgot_password') }}</a><br>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<!-- iCheck -->
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/icheck.min.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<!-- iCheck -->
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/square/green.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(function () {
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-green',
|
||||
radioClass: 'iradio_square-green',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
25
resources/views/auth/permissions/create.blade.php
Normal file
25
resources/views/auth/permissions/create.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.permissions', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'auth/permissions', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('display_name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('name', trans('general.code'), 'code') }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('auth/permissions') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
32
resources/views/auth/permissions/edit.blade.php
Normal file
32
resources/views/auth/permissions/edit.blade.php
Normal file
@@ -0,0 +1,32 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.permission', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($permission, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['auth/permissions', $permission->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('display_name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('name', trans('general.code'), 'code') }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-auth-permissions')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('auth/permissions') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
62
resources/views/auth/permissions/index.blade.php
Normal file
62
resources/views/auth/permissions/index.blade.php
Normal file
@@ -0,0 +1,62 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.permissions', 2))
|
||||
|
||||
@permission('update-auth-permissions')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('auth/permissions/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'auth/permissions', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-permissions">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('display_name', trans('general.name'))</th>
|
||||
<th>@sortablelink('name', trans('general.code'))</th>
|
||||
<th>@sortablelink('description', trans('general.description'))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($permissions as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('auth/permissions/' . $item->id . '/edit') }}">{{ $item->display_name }}</a></td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ $item->description }}</td>
|
||||
<td>
|
||||
<a href="{{ url('auth/permissions/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('update-auth-permissions')
|
||||
{!! Form::deleteButton($item, 'auth/permissions', '', 'display_name') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $permissions, 'type' => 'permissions'])
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
50
resources/views/auth/reset/create.blade.php
Normal file
50
resources/views/auth/reset/create.blade.php
Normal file
@@ -0,0 +1,50 @@
|
||||
@extends('layouts.auth')
|
||||
|
||||
@section('title', trans('auth.reset_password'))
|
||||
@section('message', trans('auth.reset_password'))
|
||||
|
||||
@section('content')
|
||||
<form role="form" method="POST" action="{{ url('auth/reset') }}">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('email') ? ' has-error' : '' }}">
|
||||
<input name="email" type="email" class="form-control" placeholder="{{ trans('auth.current_email') }}" value="{{ $email or old('email') }}" required autofocus>
|
||||
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
|
||||
@if ($errors->has('email'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('email') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('password') ? ' has-error' : '' }}">
|
||||
<input name="password" type="password" class="form-control" placeholder="{{ trans('auth.password.new') }}" required>
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
@if ($errors->has('password'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('password') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group has-feedback{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
|
||||
<input name="password_confirmation" type="password" class="form-control" placeholder="{{ trans('auth.password.new_confirm') }}" required>
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
@if ($errors->has('password_confirmation'))
|
||||
<span class="help-block">
|
||||
<strong>{{ $errors->first('password_confirmation') }}</strong>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- /.col -->
|
||||
<div class="col-sm-offset-8 col-sm-4">
|
||||
<button type="submit" class="btn btn-success btn-block btn-flat">{{ trans('auth.reset') }}</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
28
resources/views/auth/roles/create.blade.php
Normal file
28
resources/views/auth/roles/create.blade.php
Normal file
@@ -0,0 +1,28 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.roles', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'auth/roles', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('display_name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('name', trans('general.code'), 'code') }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::checkboxGroup('permissions', trans_choice('general.permissions', 2), $permissions, 'display_name') }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('auth/roles') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
34
resources/views/auth/roles/edit.blade.php
Normal file
34
resources/views/auth/roles/edit.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.roles', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($role, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['auth/roles', $role->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('display_name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('name', trans('general.code'), 'code') }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::checkboxGroup('permissions', trans_choice('general.permissions', 2), $permissions, 'display_name') }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-auth-roles')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('auth/roles') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
62
resources/views/auth/roles/index.blade.php
Normal file
62
resources/views/auth/roles/index.blade.php
Normal file
@@ -0,0 +1,62 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.roles', 2))
|
||||
|
||||
@permission('create-auth-roles')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('auth/roles/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'auth/roles', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-roles">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('display_name', trans('general.name'))</th>
|
||||
<th>@sortablelink('name', trans('general.code'))</th>
|
||||
<th>@sortablelink('description', trans('general.description'))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($roles as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('auth/roles/' . $item->id . '/edit') }}">{{ $item->display_name }}</a></td>
|
||||
<td>{{ $item->name }}</td>
|
||||
<td>{{ $item->description }}</td>
|
||||
<td>
|
||||
<a href="{{ url('auth/roles/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-auth-roles')
|
||||
{!! Form::deleteButton($item, 'auth/roles', '', 'display_name') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $roles, 'type' => 'roles'])
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
71
resources/views/auth/users/create.blade.php
Normal file
71
resources/views/auth/users/create.blade.php
Normal file
@@ -0,0 +1,71 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.users', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'auth/users', 'files' => true, 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::emailGroup('email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::passwordGroup('password', trans('auth.password.current'), 'key') }}
|
||||
|
||||
{{ Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key') }}
|
||||
|
||||
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), setting('general.default_locale')) }}
|
||||
|
||||
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
|
||||
|
||||
@permission('read-companies-companies')
|
||||
{{ Form::checkboxGroup('companies', trans_choice('general.companies', 2), $companies, 'company_name') }}
|
||||
@endpermission
|
||||
|
||||
@permission('read-auth-roles')
|
||||
{{ Form::checkboxGroup('roles', trans_choice('general.roles', 2), $roles, 'display_name') }}
|
||||
@endpermission
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('auth/users') }}
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/icheck.min.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/square/green.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#locale").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.languages', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#picture').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||
});
|
||||
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-green',
|
||||
radioClass: 'iradio_square-green',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
79
resources/views/auth/users/edit.blade.php
Normal file
79
resources/views/auth/users/edit.blade.php
Normal file
@@ -0,0 +1,79 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.users', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($user, [
|
||||
'method' => 'PATCH',
|
||||
'files' => true,
|
||||
'url' => ['auth/users', $user->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::emailGroup('email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::passwordGroup('password', trans('auth.password.current'), 'key', []) }}
|
||||
|
||||
{{ Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', []) }}
|
||||
|
||||
{{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed()) }}
|
||||
|
||||
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1)) }}
|
||||
|
||||
@permission('read-companies-companies')
|
||||
{{ Form::checkboxGroup('companies', trans_choice('general.companies', 2), $companies, 'company_name') }}
|
||||
@endpermission
|
||||
|
||||
@permission('read-auth-roles')
|
||||
{{ Form::checkboxGroup('roles', trans_choice('general.roles', 2), $roles, 'display_name') }}
|
||||
@endpermission
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-auth-users')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('auth/users') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/icheck.min.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/square/green.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#locale").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.languages', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#picture').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '<?php echo $user->picture; ?>'
|
||||
});
|
||||
|
||||
$('input').iCheck({
|
||||
checkboxClass: 'icheckbox_square-green',
|
||||
radioClass: 'iradio_square-green',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
70
resources/views/auth/users/index.blade.php
Normal file
70
resources/views/auth/users/index.blade.php
Normal file
@@ -0,0 +1,70 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.users', 2))
|
||||
|
||||
@permission('create-auth-users')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('auth/users/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'auth/users', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('role', $roles, request('role'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('roles.all')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-users">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('name', trans('general.name'))</th>
|
||||
<th>@sortablelink('email', trans('general.email'))</th>
|
||||
<th>@sortablelink('roles', trans_choice('general.roles', 2))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($users as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('auth/users/' . $item->id . '/edit') }}"><img src="{{ asset($item->picture) }}" class="users-image" alt="{{ $item->name }}" title="{{ $item->name }}"> {{ $item->name }}</a></td>
|
||||
<td>{{ $item->email }}</td>
|
||||
<td style="vertical-align: middle;">
|
||||
@foreach($item->roles as $role)
|
||||
<label class="label label-default">{{ $role->display_name }}</label>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url('auth/users/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-auth-users')
|
||||
{!! Form::deleteButton($item, 'auth/users') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $users, 'type' => 'users'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
55
resources/views/banking/accounts/create.blade.php
Normal file
55
resources/views/banking/accounts/create.blade.php
Normal file
@@ -0,0 +1,55 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.accounts', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'banking/accounts', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('number', trans('accounts.number'), 'pencil') }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('general.default_currency')) }}
|
||||
|
||||
{{ Form::textGroup('opening_balance', trans('accounts.opening_balance'), 'money', ['required' => 'required'], 0) }}
|
||||
|
||||
{{ Form::textGroup('bank_name', trans('accounts.bank_name'), 'university', []) }}
|
||||
|
||||
{{ Form::textGroup('bank_phone', trans('accounts.bank_phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textareaGroup('bank_address', trans('accounts.bank_address')) }}
|
||||
|
||||
{{ Form::radioGroup('default_account', trans('accounts.default_account')) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('banking/accounts') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
57
resources/views/banking/accounts/edit.blade.php
Normal file
57
resources/views/banking/accounts/edit.blade.php
Normal file
@@ -0,0 +1,57 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.accounts', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($account, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['banking/accounts', $account->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('number', trans('accounts.number'), 'pencil') }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies) }}
|
||||
|
||||
{{ Form::textGroup('opening_balance', trans('accounts.opening_balance'), 'money') }}
|
||||
|
||||
{{ Form::textGroup('bank_name', trans('accounts.bank_name'), 'university', []) }}
|
||||
|
||||
{{ Form::textGroup('bank_phone', trans('accounts.bank_phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textareaGroup('bank_address', trans('accounts.bank_address')) }}
|
||||
|
||||
{{ Form::radioGroup('default_account', trans('accounts.default_account')) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-accounts')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('banking/accounts') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
75
resources/views/banking/accounts/index.blade.php
Normal file
75
resources/views/banking/accounts/index.blade.php
Normal file
@@ -0,0 +1,75 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.accounts', 2))
|
||||
|
||||
@permission('create-banking-accounts')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('banking/accounts/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'banking/accounts', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-accounts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('name', trans('general.name'))</th>
|
||||
<th>@sortablelink('number', trans('accounts.number'))</th>
|
||||
<th>@sortablelink('opening_balance', trans('accounts.current_balance'))</th>
|
||||
<th>@sortablelink('enabled', trans('general.status'))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($accounts as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('banking/accounts/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
||||
<td>{{ $item->number }}</td>
|
||||
<td>@money($item->balance, $item->currency_code, true)</td>
|
||||
<td>
|
||||
@if ($item->enabled)
|
||||
<span class="label label-success">{{ trans('general.enabled') }}</span>
|
||||
@else
|
||||
<span class="label label-danger">{{ trans('general.disabled') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url('banking/accounts/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-banking-accounts')
|
||||
{!! Form::deleteButton($item, 'banking/accounts') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $accounts, 'type' => 'accounts'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
58
resources/views/banking/transactions/index.blade.php
Normal file
58
resources/views/banking/transactions/index.blade.php
Normal file
@@ -0,0 +1,58 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.transactions', 2))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'banking/transactions', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-transactions">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('paid_at', trans('general.date'))</th>
|
||||
<th>@sortablelink('account.name', trans('accounts.account_name'))</th>
|
||||
<th>@sortablelink('type', trans_choice('general.types', 1))</th>
|
||||
<th>@sortablelink('category.name', trans_choice('general.categories', 1))</th>
|
||||
<th>@sortablelink('description', trans('general.description'))</th>
|
||||
<th>@sortablelink('amount', trans('general.amount'))</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($transactions as $item)
|
||||
<tr>
|
||||
<td>{{ Date::parse($item->paid_at)->format($date_format) }}</td>
|
||||
<td>{{ $item->account_name }}</td>
|
||||
<td>{{ $item->type }}</td>
|
||||
<td>{{ $item->category_name }}</td>
|
||||
<td>{{ $item->description }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
66
resources/views/banking/transfers/create.blade.php
Normal file
66
resources/views/banking/transfers/create.blade.php
Normal file
@@ -0,0 +1,66 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.transfers', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'banking/transfers', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::selectGroup('from_account_id', trans('transfers.from_account'), 'university', $accounts) }}
|
||||
|
||||
{{ Form::selectGroup('to_account_id', trans('transfers.to_account'), 'university', $accounts) }}
|
||||
|
||||
{{ Form::textGroup('amount', trans('general.amount'), 'money') }}
|
||||
|
||||
{{ Form::textGroup('transferred_at', trans('general.date'), 'calendar',['id' => 'transferred_at', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => ''], Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', ['cash' => 'Cash', 'bank' => 'Bank Transfer', 'paypal' => 'PayPal'], setting('general.default_payment_method')) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o', []) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('banking/transfers') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
//Date picker
|
||||
$('#transferred_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#from_account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#to_account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans_choice('general.payment_methods', 1) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
72
resources/views/banking/transfers/edit.blade.php
Normal file
72
resources/views/banking/transfers/edit.blade.php
Normal file
@@ -0,0 +1,72 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.transfers', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($transfer, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['banking/transfers', $transfer->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::selectGroup('from_account_id', trans('transfers.from_account'), 'university', $accounts) }}
|
||||
|
||||
{{ Form::selectGroup('to_account_id', trans('transfers.to_account'), 'university', $accounts) }}
|
||||
|
||||
{{ Form::textGroup('amount', trans('general.amount'), 'money') }}
|
||||
|
||||
{{ Form::textGroup('transferred_at', trans('general.date'), 'calendar',['id' => 'transferred_at', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => ''], Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card', ['cash' => 'Cash', 'bank' => 'Bank Transfer', 'paypal' => 'PayPal'], setting('general.default_payment_method')) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o', []) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-banking-transfers')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('banking/transfers') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
//Date picker
|
||||
$('#transferred_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#from_account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#to_account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans_choice('general.payment_methods', 1) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
62
resources/views/banking/transfers/index.blade.php
Normal file
62
resources/views/banking/transfers/index.blade.php
Normal file
@@ -0,0 +1,62 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.transfers', 2))
|
||||
|
||||
@permission('create-banking-transfers')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('banking/transfers/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'banking/transfers', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::select('from_account', $accounts, request('from_account'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('accounts.all')]) !!}
|
||||
{!! Form::select('to_account', $accounts, request('to_account'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('accounts.all')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-transfers">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('payment.paid_at', trans('general.date'))</th>
|
||||
<th>@sortablelink('payment.name', trans('transfers.from_account'))</th>
|
||||
<th>@sortablelink('revenue.name', trans('transfers.to_account'))</th>
|
||||
<th>@sortablelink('payment.amount', trans('general.amount'))</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($transfers as $item)
|
||||
<tr>
|
||||
<td>{{ Date::parse($item->paid_at)->format($date_format) }}</td>
|
||||
<td>{{ $item->from_account }}</td>
|
||||
<td>{{ $item->to_account }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $items, 'type' => 'transfers'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
55
resources/views/companies/companies/create.blade.php
Normal file
55
resources/views/companies/companies/create.blade.php
Normal file
@@ -0,0 +1,55 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.companies', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'companies/companies', 'files' => true, 'role' => 'form']) !!}
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('company_name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('domain', trans('companies.domain'), 'globe') }}
|
||||
|
||||
{{ Form::emailGroup('company_email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::selectGroup('default_currency', trans_choice('general.currencies', 1), 'money', $currencies) }}
|
||||
|
||||
{{ Form::textareaGroup('company_address', trans('general.address')) }}
|
||||
|
||||
{{ Form::fileGroup('company_logo', trans('companies.logo')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('companies/companies') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#default_currency").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#company_logo').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
63
resources/views/companies/companies/edit.blade.php
Normal file
63
resources/views/companies/companies/edit.blade.php
Normal file
@@ -0,0 +1,63 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.companies', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($company, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['companies/companies', $company->id],
|
||||
'files' => true,
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('company_name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('domain', trans('companies.domain'), 'globe') }}
|
||||
|
||||
{{ Form::emailGroup('company_email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::selectGroup('default_currency', trans_choice('general.currencies', 1), 'money', $currencies) }}
|
||||
|
||||
{{ Form::textareaGroup('company_address', trans('general.address')) }}
|
||||
|
||||
{{ Form::fileGroup('company_logo', trans('companies.logo')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-companies-companies')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('companies/companies') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#default_currency").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#company_logo').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '<?php echo $company->company_logo; ?>'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
64
resources/views/companies/companies/index.blade.php
Normal file
64
resources/views/companies/companies/index.blade.php
Normal file
@@ -0,0 +1,64 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.companies', 2))
|
||||
|
||||
@permission('create-companies-companies')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('companies/companies/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'companies/companies', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-companies">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('company_name', trans('general.name'))</th>
|
||||
<th>@sortablelink('domain', trans('companies.domain'))</th>
|
||||
<th>@sortablelink('company_email', trans('general.email'))</th>
|
||||
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($companies as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('companies/companies/' . $item->id . '/edit') }}">{{ $item->company_name }}</a></td>
|
||||
<td>{{ $item->domain }}</td>
|
||||
<td>{{ $item->company_email }}</td>
|
||||
<td>
|
||||
<a href="{{ url('companies/companies/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-companies-companies')
|
||||
{!! Form::deleteButton($item, 'companies/companies', '', 'company_name') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
102
resources/views/customers/dashboard/index.blade.php
Normal file
102
resources/views/customers/dashboard/index.blade.php
Normal file
@@ -0,0 +1,102 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans('general.dashboard'))
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- Invoices List-->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans_choice('general.invoices', 2) }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if ($user->invoices->count())
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_number') }}</th>
|
||||
<th>{{ trans_choice('general.customers', 1) }}</th>
|
||||
<th>{{ trans('invoices.total_price') }}</th>
|
||||
<th>{{ trans('general.status') }}</th>
|
||||
<th>{{ trans('invoices.invoice_date') }}</th>
|
||||
<th style="width: 18%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($user->invoices as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('customer/invoices/' . $item->id . '/edit') }}">{{ $item->invoice_number }}</a></td>
|
||||
<td>{{ $item->customer_name }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->status->name }}</td>
|
||||
<td>{{ Date::parse($item->invoiced_at)->format($date_format) }}</td>
|
||||
<td>
|
||||
<a href="{{ url('customers/invoices/' . $item->id . '') }}" class="btn btn-info btn-xs"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
<a href="{{ url('customers/invoices/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- Revenues List-->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans_choice('general.payments', 2) }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if ($user->revenues->count())
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.amount') }}</th>
|
||||
<th>{{ trans_choice('general.categories', 1) }}</th>
|
||||
<th>{{ trans_choice('general.accounts', 1) }}</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($user->revenues as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('customer/payments/' . $item->id . '') }}">{{ Date::parse($item->paid_at)->format($date_format) }}</a></td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->category->name }}</td>
|
||||
<td>{{ $item->account->name }}</td>
|
||||
<td>
|
||||
<a href="{{ url('customers/payments/' . $item->id . '') }}" class="btn btn-info btn-xs"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
68
resources/views/customers/invoices/index.blade.php
Normal file
68
resources/views/customers/invoices/index.blade.php
Normal file
@@ -0,0 +1,68 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 2))
|
||||
|
||||
@permission('create-customers-invoices')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('customers/invoices/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'customers/invoices', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('status', $status, request('status'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('status.all')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-invoices">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('invoice_number', trans('invoices.invoice_number'))</th>
|
||||
<th>@sortablelink('customer_name', trans_choice('general.customers', 1))</th>
|
||||
<th>@sortablelink('amount', trans('invoices.total_price'))</th>
|
||||
<th>@sortablelink('status.name', trans('general.status'))</th>
|
||||
<th>@sortablelink('invoiced_at', trans('invoices.invoice_date'))</th>
|
||||
<th>@sortablelink('due_at', trans('invoices.due_date'))</th>
|
||||
<th style="width: 18%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoices as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('customers/invoices/' . $item->id . '/edit') }}">{{ $item->invoice_number }}</a></td>
|
||||
<td>{{ $item->customer_name }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->status->name }}</td>
|
||||
<td>{{ Date::parse($item->invoiced_at)->format($date_format) }}</td>
|
||||
<td>{{ Date::parse($item->due_at)->format($date_format) }}</td>
|
||||
<td>
|
||||
<a href="{{ url('customers/invoices/' . $item->id . '') }}" class="btn btn-info btn-xs"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $invoices, 'type' => 'invoices'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
141
resources/views/customers/invoices/invoice.blade.php
Normal file
141
resources/views/customers/invoices/invoice.blade.php
Normal file
@@ -0,0 +1,141 @@
|
||||
@extends('layouts.invoice')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->invoice_number)
|
||||
|
||||
@section('content')
|
||||
<section class="invoice">
|
||||
<div class="row invoice-header">
|
||||
<div class="col-xs-7">
|
||||
@if (setting('general.invoice_logo'))
|
||||
<img src="{{ asset(setting('general.invoice_logo')) }}" class="invoice-logo" />
|
||||
@else
|
||||
<img src="{{ asset(setting('general.company_logo')) }}" class="invoice-logo" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5 invoice-company">
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
@if (setting('general.company_tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('general.company_tax_number') }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if (setting('general.company_phone'))
|
||||
{{ setting('general.company_phone') }}<br>
|
||||
@endif
|
||||
{{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
{{ trans('invoices.bill_to') }}
|
||||
<address>
|
||||
<strong>{{ $invoice->customer_name }}</strong><br>
|
||||
{{ $invoice->customer_address }}<br>
|
||||
@if ($invoice->customer_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $invoice->customer_tax_number }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if ($invoice->customer_phone)
|
||||
{{ $invoice->customer_phone }}<br>
|
||||
@endif
|
||||
{{ $invoice->customer_email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table no-border">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->invoice_number }}</td>
|
||||
</tr>
|
||||
@if ($invoice->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.order_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_date') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->invoiced_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.payment_due') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->due_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.items', 1) }}</th>
|
||||
<th class="text-center">{{ trans('invoices.quantity') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.price') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.total') }}</th>
|
||||
</tr>
|
||||
@foreach($invoice->items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $item->name }}
|
||||
@if ($item->sku)
|
||||
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">{{ $item->quantity }}</td>
|
||||
<td class="text-right">@money($item->price, $invoice->currency_code, true)</td>
|
||||
<td class="text-right">@money($item->total - $item->tax, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
@if ($invoice->notes)
|
||||
<p class="lead">{{ trans_choice('general.notes', 2) }}</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $invoice->notes }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="max-width: 214px">{{ trans('invoices.sub_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->sub_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.tax_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->tax_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@if($invoice->paid)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.paid') }}:</th>
|
||||
<td class="text-right">@money('-' . $invoice->paid, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.total') }}:</th>
|
||||
<td class="text-right">@money($invoice->grand_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
449
resources/views/customers/invoices/show.blade.php
Normal file
449
resources/views/customers/invoices/show.blade.php
Normal file
@@ -0,0 +1,449 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1) . ': ' . $invoice->invoice_number)
|
||||
|
||||
@section('content')
|
||||
<div class="box box-success">
|
||||
<section class="invoice">
|
||||
<span class="badge bg-aqua">{{ $invoice->status->name }}</span>
|
||||
|
||||
<div class="row invoice-header">
|
||||
<div class="col-xs-7">
|
||||
@if (setting('general.invoice_logo'))
|
||||
<img src="{{ asset(setting('general.invoice_logo')) }}" class="invoice-logo" />
|
||||
@else
|
||||
<img src="{{ asset(setting('general.company_logo')) }}" class="invoice-logo" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5 invoice-company">
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
@if (setting('general.company_tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('general.company_tax_number') }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if (setting('general.company_phone'))
|
||||
{{ setting('general.company_phone') }}<br>
|
||||
@endif
|
||||
{{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
{{ trans('invoices.bill_to') }}
|
||||
<address>
|
||||
<strong>{{ $invoice->customer_name }}</strong><br>
|
||||
{{ $invoice->customer_address }}<br>
|
||||
@if ($invoice->customer_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $invoice->customer_tax_number }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if ($invoice->customer_phone)
|
||||
{{ $invoice->customer_phone }}<br>
|
||||
@endif
|
||||
{{ $invoice->customer_email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table no-border">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->invoice_number }}</td>
|
||||
</tr>
|
||||
@if ($invoice->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.order_number') }}:</th>
|
||||
<td class="text-right">{{ $invoice->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.invoice_date') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->invoiced_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.payment_due') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($invoice->due_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.items', 1) }}</th>
|
||||
<th class="text-center">{{ trans('invoices.quantity') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.price') }}</th>
|
||||
<th class="text-right">{{ trans('invoices.total') }}</th>
|
||||
</tr>
|
||||
@foreach($invoice->items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $item->name }}
|
||||
@if ($item->sku)
|
||||
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">{{ $item->quantity }}</td>
|
||||
<td class="text-right">@money($item->price, $invoice->currency_code, true)</td>
|
||||
<td class="text-right">@money($item->total - $item->tax, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
@if ($invoice->notes)
|
||||
<p class="lead">{{ trans_choice('general.notes', 2) }}</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $invoice->notes }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.sub_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->sub_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('invoices.tax_total') }}:</th>
|
||||
<td class="text-right">@money($invoice->tax_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@if ($invoice->paid)
|
||||
<tr>
|
||||
<th>{{ trans('invoices.paid') }}:</th>
|
||||
<td class="text-right">@money('-' . $invoice->paid, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('invoices.total') }}:</th>
|
||||
<td class="text-right">@money($invoice->grand_total, $invoice->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-footer row no-print">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ url('incomes/invoices/' . $invoice->id . '/print') }}" target="_blank" class="btn btn-default">
|
||||
<i class="fa fa-print"></i> {{ trans('general.print') }}
|
||||
</a>
|
||||
<button type="button" id="button-email" class="btn btn-default" data-toggle="tooltip" title="{{ trans('invoices.send_mail') }}">
|
||||
<i class="fa fa-envelope-o"></i> {{ trans('general.send') }}
|
||||
</button>
|
||||
<button type="button" id="button-pdf" class="btn btn-default" data-toggle="tooltip" title="{{ trans('invoices.download_pdf') }}">
|
||||
<i class="fa fa-file-pdf-o"></i> {{ trans('general.download') }}
|
||||
</button>
|
||||
<button type="button" id="button-payment" class="btn btn-success">
|
||||
<i class="fa fa-credit-card"></i> {{ trans('invoices.add_payment') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 no-padding-left">
|
||||
<div class="box box-default collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('invoices.histories') }}</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.status') }}</th>
|
||||
<th>{{ trans('general.description') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoice->histories as $history)
|
||||
<tr>
|
||||
<td>{{ Date::parse($history->created_at)->format($date_format) }}</td>
|
||||
<td>{{ $history->status->name }}</td>
|
||||
<td>{{ $history->description }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 no-padding-right">
|
||||
<div class="box box-default collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('invoices.payments') }}</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.amount') }}</th>
|
||||
<th>{{ trans_choice('general.accounts', 1) }}</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($invoice->payments as $payment)
|
||||
<tr>
|
||||
<td>{{ Date::parse($payment->paid_at)->format($date_format) }}</td>
|
||||
<td>@money($payment->amount, $payment->currency_code, true)</td>
|
||||
<td>{{ $payment->account->name }}</td>
|
||||
<td>
|
||||
<a href="{{ url('incomes/invoices/' . $payment->id . '') }}" class="btn btn-info btn-xs hidden"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
<a href="{{ url('incomes/revenues/' . $payment->id . '/edit') }}" class="btn btn-primary btn-xs hidden"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
{!! Form::open([
|
||||
'id' => 'invoice-payment-' . $payment->id,
|
||||
'method' => 'DELETE',
|
||||
'url' => ['incomes/invoices/paymentDestroy', $payment->id],
|
||||
'style' => 'display:inline'
|
||||
]) !!}
|
||||
{!! Form::button('<i class="fa fa-trash-o" aria-hidden="true"></i> ' . trans('general.delete'), array(
|
||||
'type' => 'button',
|
||||
'class' => 'btn btn-danger btn-xs',
|
||||
'title' => trans('general.delete'),
|
||||
'onclick' => 'confirmDelete("' . '#invoice-payment-' . $payment->id . '", "' . trans_choice('general.payments', 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . Date::parse($payment->paid_at)->format($date_format) . ' - ' . money($payment->amount, $payment->currency_code, true) . ' - ' . $payment->account->name . '</strong>', 'type' => strtolower(trans_choice('general.revenues', 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
|
||||
)) !!}
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$(document).on('click', '#button-payment', function (e) {
|
||||
$('#payment-modal').remove();
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<div class="modal fade" id="payment-modal" tabindex="-1" role="dialog" aria-labelledby="paymentModalLabel">';
|
||||
html += ' <div class="modal-dialog" role="document">';
|
||||
html += ' <div class="modal-content box box-success">';
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>';
|
||||
html += ' <h4 class="modal-title" id="paymentModalLabel">{{ trans('invoices.add_payment') }}</h4>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-body box-body">';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('paid_at', trans('general.date'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-calendar"></i></div>';
|
||||
html += ' {!! Form::text('paid_at', \Carbon\Carbon::now()->toDateString(), ['id' => 'paid_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => '']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('amount', trans('general.amount'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-money"></i></div>';
|
||||
html += ' {!! Form::text('amount', $invoice->grand_total, ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.enter', ['field' => trans('general.amount')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('account_id', trans_choice('general.accounts', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-university"></i></div>';
|
||||
html += ' {!! Form::select('account_id', $accounts, setting('general.default_account'), ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('currency_code', trans_choice('general.currencies', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-exchange"></i></div>';
|
||||
html += ' {!! Form::text('currency', $currencies[$account_currency_code], ['id' => 'currency', 'class' => 'form-control', 'required' => 'required', 'disabled' => 'disabled']) !!}';
|
||||
html += ' {!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-12">';
|
||||
html += ' {!! Form::label('description', trans('general.description'), ['class' => 'control-label']) !!}';
|
||||
html += ' {!! Form::textarea('description', null, ['class' => 'form-control', 'rows' => '3', 'placeholder' => trans('general.form.enter', ['field' => trans('general.description')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('payment_method', trans_choice('general.payment_methods', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-folder-open-o"></i></div>';
|
||||
html += ' {!! Form::select('payment_method', $payment_methods, setting('general.default_payment_method'), ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6">';
|
||||
html += ' {!! Form::label('reference', trans('general.reference'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-file-text-o"></i></div>';
|
||||
html += ' {!! Form::text('reference', null, ['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => trans('general.reference')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' {!! Form::hidden('invoice_id', $invoice->id, ['id' => 'invoice_id', 'class' => 'form-control', 'required' => 'required']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-footer">';
|
||||
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.cancel') }}</button>';
|
||||
html += ' <button type="button" onclick="addPayment();" class="btn btn-success">{{ trans('general.save') }}</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('body').append(html);
|
||||
|
||||
$('#paid_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#payment-modal').modal('show');
|
||||
});
|
||||
|
||||
$(document).on('change', '#account_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'account_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency').val(data.currency_name);
|
||||
$('#currency_code').val(data.currency_code);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#button-pdf', function (e) {
|
||||
location.href = "{{ url('incomes/invoices/' . $invoice->id . '/pdf') }}";
|
||||
});
|
||||
|
||||
$(document).on('click', '#button-email', function (e) {
|
||||
$('#email-modal').remove();
|
||||
|
||||
var html = '<div class="modal fade" id="email-modal" tabindex="-1" role="dialog" aria-labelledby="emailModalLabel">';
|
||||
html += ' <div class="modal-dialog" role="document">';
|
||||
html += ' <div class="modal-content">';
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>';
|
||||
html += ' <h4 class="modal-title" id="emailModalLabel">Overflowing text</h4>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-body">';
|
||||
html += ' N/A';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-footer">';
|
||||
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.cancel') }}</button>';
|
||||
html += ' <button type="button" class="btn btn-success">Save changes</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('body').append(html);
|
||||
|
||||
$('#email-modal').modal('show');
|
||||
});
|
||||
});
|
||||
|
||||
function addPayment() {
|
||||
$('.help-block').remove();
|
||||
|
||||
$.ajax({
|
||||
url: '{{ url("incomes/invoices/payment") }}',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: $('#payment-modal input[type=\'text\'], #payment-modal input[type=\'hidden\'], #payment-modal textarea, #payment-modal select'),
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
beforeSend: function() {
|
||||
$('#payment-modal .modal-content').append('<div id="loading" class="text-center"><i class="fa fa-spinner fa-spin fa-5x checkout-spin"></i></div>');
|
||||
},
|
||||
complete: function() {
|
||||
$('#loading').remove();
|
||||
},
|
||||
success: function(data) {
|
||||
$("#payment-modal").modal('hide');
|
||||
|
||||
location.reload();
|
||||
},
|
||||
error: function(data){
|
||||
var errors = data.responseJSON;
|
||||
|
||||
if (typeof errors !== 'undefined') {
|
||||
if (errors.paid_at) {
|
||||
$('#payment-modal #paid_at').parent().after('<p class="help-block">' + errors.paid_at + '</p>');
|
||||
}
|
||||
|
||||
if (errors.amount) {
|
||||
$('#payment-modal #amount').parent().after('<p class="help-block">' + errors.amount + '</p>');
|
||||
}
|
||||
|
||||
if (errors.account_id) {
|
||||
$('#payment-modal #account_id').parent().after('<p class="help-block">' + errors.account_id + '</p>');
|
||||
}
|
||||
|
||||
if (errors.currency_code) {
|
||||
$('#payment-modal #currency_code').parent().after('<p class="help-block">' + errors.currency_code + '</p>');
|
||||
}
|
||||
|
||||
if (errors.category_id) {
|
||||
$('#payment-modal #category_id').parent().after('<p class="help-block">' + errors.category_id + '</p>');
|
||||
}
|
||||
|
||||
if (errors.payment_method) {
|
||||
$('#payment-modal #payment_method').parent().after('<p class="help-block">' + errors.payment_method + '</p>');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
64
resources/views/customers/payments/index.blade.php
Normal file
64
resources/views/customers/payments/index.blade.php
Normal file
@@ -0,0 +1,64 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.payments', 1))
|
||||
|
||||
@permission('create-customers-revenues')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('incomes/revenues/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'customers/payments', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('category_id', $categories, request('category_id'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('categories.all')]) !!}
|
||||
{!! Form::select('payment_method', $payment_methods, request('payment_method'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans_choice('general.payment_methods', 2)]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-revenues">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('paid_at', trans('general.date'))</th>
|
||||
<th>@sortablelink('amount', trans('general.amount'))</th>
|
||||
<th>@sortablelink('category.name', trans_choice('general.categories', 1))</th>
|
||||
<th>@sortablelink('payment_method', trans_choice('general.payment_methods', 1))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($payments as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('customers/payments/' . $item->id . '') }}">{{ Date::parse($item->paid_at)->format($date_format) }}</a></td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->category->name }}</td>
|
||||
<td>{{ $payment_methods[$item->payment_method] }}</td>
|
||||
<td>
|
||||
<a href="{{ url('customers/payments/' . $item->id . '') }}" class="btn btn-info btn-xs"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $payments, 'type' => 'payments'])
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
107
resources/views/customers/payments/show.blade.php
Normal file
107
resources/views/customers/payments/show.blade.php
Normal file
@@ -0,0 +1,107 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.invoices', 1))
|
||||
|
||||
@section('content')
|
||||
<div class="box box-success">
|
||||
<div class="invoice"><span class="badge" style="background-color : {{ $payment->category->color }}">{{ $payment->category->name }}</span>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h2 class="page-header">
|
||||
<i class="fa fa-globe"></i> {{ $payment->customer->name }}
|
||||
<small class="pull-right">{{ trans('general.date') }}: {{ Date::parse($payment->paid_at)->format($date_format) }}</small>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row invoice-info">
|
||||
<div class="col-sm-4 invoice-col">
|
||||
{{ trans('general.from') }}
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
{{ trans('general.phone') }}: (804) 123-5432<br>
|
||||
{{ trans('general.email') }}: {{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-sm-4 invoice-col">
|
||||
{{ trans('general.to') }}
|
||||
<address>
|
||||
<strong>{{ $payment->customer->name }}</strong><br>
|
||||
{{ $payment->customer->address }}<br>
|
||||
{{ trans('general.phone') }}: {{ $payment->customer->phone }}<br>
|
||||
{{ trans('general.email') }}: {{ $payment->customer->email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-sm-4 invoice-col">
|
||||
<b>{{ trans('invoices.payment_due') }}:</b> {{ Date::parse($payment->paid_at)->format($date_format) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.categories', 1) }}</th>
|
||||
<th>{{ trans_choice('general.payment_methods', 1) }}</th>
|
||||
<th>{{ trans('general.reference') }}</th>
|
||||
<th>{{ trans('general.amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ $payment->category->name }}</td>
|
||||
<td>{{ $payment_methods[$payment->payment_method] }}</td>
|
||||
<td>{{ $payment->reference }}</td>
|
||||
<td>@money($payment->amount, $payment->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@if ($payment->description)
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<p class="lead">{{ trans('general.description') }}:</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $payment->description }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($payment->attachment)
|
||||
<div class="box-footer">
|
||||
<ul class="mailbox-attachments clearfix">
|
||||
@if (1)
|
||||
<li>
|
||||
<span class="mailbox-attachment-icon"><i class="fa fa-file-pdf-o"></i></span>
|
||||
|
||||
<div class="mailbox-attachment-info">
|
||||
<a href="#" class="mailbox-attachment-name"><i class="fa fa-paperclip"></i> {{ basename($payment->attachment) }}</a>
|
||||
<span class="mailbox-attachment-size">
|
||||
<a href="#" class="btn btn-default btn-xs pull-right"><i class="fa fa-cloud-download"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
@else
|
||||
<li>
|
||||
<span class="mailbox-attachment-icon has-img"><img src="{{ asset($payment->attachment) }}" alt="Attachment"></span>
|
||||
|
||||
<div class="mailbox-attachment-info">
|
||||
<a href="#" class="mailbox-attachment-name"><i class="fa fa-camera"></i> {{ basename($payment->attachment) }}</a>
|
||||
<span class="mailbox-attachment-size">
|
||||
<a href="#" class="btn btn-default btn-xs pull-right"><i class="fa fa-cloud-download"></i></a>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
56
resources/views/customers/transactions/index.blade.php
Normal file
56
resources/views/customers/transactions/index.blade.php
Normal file
@@ -0,0 +1,56 @@
|
||||
@extends('layouts.customer')
|
||||
|
||||
@section('title', trans_choice('general.transactions', 2))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'customers/transactions', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-transactions">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('paid_at', trans('general.date'))</th>
|
||||
<th>@sortablelink('account.name', trans('accounts.account_name'))</th>
|
||||
<th>@sortablelink('type', trans_choice('general.types', 1))</th>
|
||||
<th>@sortablelink('category.name', trans_choice('general.categories', 1))</th>
|
||||
<th>@sortablelink('description', trans('general.description'))</th>
|
||||
<th>@sortablelink('amount', trans('general.amount'))</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($transactions as $item)
|
||||
<tr>
|
||||
<td>{{ Date::parse($item->date)->format($date_format) }}</td>
|
||||
<td>{{ $item->account }}</td>
|
||||
<td>{{ $item->type }}</td>
|
||||
<td>{{ $item->category }}</td>
|
||||
<td>{{ $item->description }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
467
resources/views/dashboard/dashboard/index.blade.php
Normal file
467
resources/views/dashboard/dashboard/index.blade.php
Normal file
@@ -0,0 +1,467 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.dashboard'))
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<!---Income-->
|
||||
<div class="col-md-4">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-aqua"><i class="fa fa-money"></i></span>
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">{{ trans('dashboard.total_incomes') }}</span>
|
||||
<span class="info-box-number">@money($total_incomes['total'], setting('general.default_currency'), true)</span>
|
||||
<div class="progress-group" title="{{ trans('dashboard.open_invoices') }}: {{ $total_incomes['open_invoice'] }}<br>{{ trans('dashboard.overdue_invoices') }}: {{ $total_incomes['overdue_invoice'] }}" data-toggle="tooltip" data-html="true">
|
||||
<div class="progress sm">
|
||||
<div class="progress-bar progress-bar-aqua" style="width: {{ $total_incomes['progress'] }}%"></div>
|
||||
</div>
|
||||
<span class="progress-text">{{ trans('dashboard.receivables') }}</span>
|
||||
<span class="progress-number">{{ $total_incomes['open_invoice'] }} / {{ $total_incomes['overdue_invoice'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!---Expense-->
|
||||
<div class="col-md-4">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-red"><i class="fa fa-shopping-cart"></i></span>
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">{{ trans('dashboard.total_expenses') }}</span>
|
||||
<span class="info-box-number">@money($total_expenses['total'], setting('general.default_currency'), true)</span>
|
||||
|
||||
<div class="progress-group" title="{{ trans('dashboard.open_bills') }}: {{ $total_expenses['open_bill'] }}<br>{{ trans('dashboard.overdue_bills') }}: {{ $total_expenses['overdue_bill'] }}" data-toggle="tooltip" data-html="true">
|
||||
<div class="progress sm">
|
||||
<div class="progress-bar progress-bar-red" style="width: {{ $total_expenses['progress'] }}%"></div>
|
||||
</div>
|
||||
<span class="progress-text">{{ trans('dashboard.payables') }}</span>
|
||||
<span class="progress-number">{{ $total_expenses['open_bill'] }} / {{ $total_expenses['overdue_bill'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!---Profit-->
|
||||
<div class="col-md-4">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-green"><i class="fa fa-heart"></i></span>
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">{{ trans('dashboard.total_profit') }}</span>
|
||||
<span class="info-box-number">@money($total_profit['total'], setting('general.default_currency'), true)</span>
|
||||
|
||||
<div class="progress-group" title="{{ trans('dashboard.open_profit') }}: {{ $total_profit['open'] }}<br>{{ trans('dashboard.overdue_profit') }}: {{ $total_profit['overdue'] }}" data-toggle="tooltip" data-html="true">
|
||||
<div class="progress sm">
|
||||
<div class="progress-bar progress-bar-green" style="width: {{ $total_profit['progress'] }}%"></div>
|
||||
</div>
|
||||
<span class="progress-text">{{ trans('general.upcoming') }}</span>
|
||||
<span class="progress-number">{{ $total_profit['open'] }} / {{ $total_profit['overdue'] }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!---Income, Expense and Profit Line Chart-->
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs pull-right ui-sortable-handle">
|
||||
<li class=""><a href="#monthly-chart" data-toggle="tab" aria-expanded="false">{{ trans('general.monthly') }}</a></li>
|
||||
<li class="active"><a href="#daily-chart" data-toggle="tab" aria-expanded="true">{{ trans('general.daily') }}</a></li>
|
||||
<li class="pull-left header" style="font-size: 18px;">{{ trans('dashboard.cash_flow') }}</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content no-padding">
|
||||
<div class="chart tab-pane active" id="daily-chart" style="position: relative; height: 300px;">
|
||||
<div class="row">
|
||||
<div class="chart">
|
||||
<canvas id="cash_flow_daily" style="height: 246px; width: 1069px;" height="246" width="1069"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row daily-footer">
|
||||
<div class="col-md-2">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div id="sale"></div>
|
||||
</div>
|
||||
<div class="col-md-8 scp">
|
||||
{{ trans_choice('general.incomes', 1) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div id="cost"></div>
|
||||
</div>
|
||||
<div class="col-md-8 scp">
|
||||
{{ trans_choice('general.expenses', 1) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div id="profit"></div>
|
||||
</div>
|
||||
<div class="col-md-8 scp">
|
||||
{{ trans_choice('general.profits', 1) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chart tab-pane" id="monthly-chart" style="position: relative; height: 300px;">
|
||||
@if ($cash_flow['monthly'])
|
||||
<div class="col-md-2">
|
||||
<div style="margin : 7px 0px; border-left: 3px solid #00c0ef; padding-left: 10px;">
|
||||
<p style="font-size: 16px; margin: 0px;">
|
||||
@money($total_incomes['total'], setting('general.default_currency'), true)
|
||||
</p>
|
||||
{{ trans_choice('general.incomes', 1) }}
|
||||
</div>
|
||||
<div style="margin : 7px 0px; border-left: 3px solid #C9302C; padding-left: 10px;">
|
||||
<p style="font-size: 16px; margin: 0px;">
|
||||
@money($total_expenses['total'], setting('general.default_currency'), true)
|
||||
</p>
|
||||
{{ trans_choice('general.expenses', 1) }}
|
||||
</div>
|
||||
<div style="margin : 7px 0px; border-left: 3px solid #00a65a; padding-left: 10px;">
|
||||
<p style="font-size: 16px; margin: 0px;">
|
||||
@money($total_incomes['total'] - $total_expenses['total'], setting('general.default_currency'), true)
|
||||
</p>
|
||||
{{ trans_choice('general.profits', 1) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<div id="cash_flow_monthly" style="min-width: 800px; height: 300px; margin: 0 auto"></div>
|
||||
</div>
|
||||
@else
|
||||
<h5 class="text-center">{{ trans('dashboard.no_profit_loss') }}</h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('dashboard.incomes_by_category') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="chart-responsive">
|
||||
<canvas id="income_category" height="155" width="328" style="width: 328px; height: 155px;"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<ul class="chart-legend clearfix">
|
||||
@foreach ($incomes as $item)
|
||||
<li><i class="fa fa-circle" style="color:{{ $item['color'] }};"></i> {{ $item['amount'] . ' ' . $item['label'] }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('dashboard.expenses_by_category') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="chart-responsive">
|
||||
<canvas id="expense_category" height="155" width="328" style="width: 328px; height: 155px;"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<ul class="chart-legend clearfix">
|
||||
@foreach ($expenses as $item)
|
||||
<li><i class="fa fa-circle" style="color:{{ $item['color'] }};"></i> {{ $item['amount'] . ' ' . $item['label'] }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<!-- Account Balance List-->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('dashboard.account_balance') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if ($accounts->count())
|
||||
@foreach($accounts as $item)
|
||||
<div style="min-height: 30px;">
|
||||
<div style="width:60%;float: left;">
|
||||
<div>{{ $item->name }}</div>
|
||||
</div>
|
||||
<div style="width:40%;float: left;text-align: right;">
|
||||
@money($item->balance, $item->currency_code, true)
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
@endforeach
|
||||
@else
|
||||
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Latest Incomes List-->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('dashboard.latest_incomes') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if ($latest_incomes->count())
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">{{ trans('general.date') }}</th>
|
||||
<th class="text-left">{{ trans_choice('general.categories', 1) }}</th>
|
||||
<th class="text-right">{{ trans('general.amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($latest_incomes as $item)
|
||||
<tr>
|
||||
<td align="left">{{ Date::parse($item->paid_at)->format($date_format) }}</td>
|
||||
<td align="left">{{ $item->category ? $item->category->name : trans_choice('general.invoices', 2) }}</td>
|
||||
<td align="right">@money($item->amount, $item->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Latest Expenses List-->
|
||||
<div class="box box-success">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('dashboard.latest_expenses') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if ($latest_expenses->count())
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left">{{ trans('general.date') }}</th>
|
||||
<th class="text-left">{{ trans_choice('general.categories', 1) }}</th>
|
||||
<th class="text-right">{{ trans('general.amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($latest_expenses as $item)
|
||||
<tr>
|
||||
<td align="left">{{ Date::parse($item->paid_at)->format($date_format) }}</td>
|
||||
<td align="left">{{ $item->category ? $item->category->name : trans_choice('general.bills', 2) }}</td>
|
||||
<td align="right">@money($item->amount, $item->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<h5 class="text-center">{{ trans('general.no_records') }}</h5>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/chartjs/Chart.min.js') }}"></script>
|
||||
<script src="{{ asset('public/js/highchart/highcharts.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var areaChartData = {
|
||||
labels: {!! $cash_flow['daily']['date'] !!},
|
||||
datasets: [
|
||||
{
|
||||
label: "{{ trans_choice('general.incomes', 1) }}",
|
||||
fillColor: "#00c0ef",
|
||||
strokeColor: "#00c0ef",
|
||||
pointColor: "#00c0ef",
|
||||
pointStrokeColor: "#00c0ef",
|
||||
pointHighlightFill: "#FFF",
|
||||
pointHighlightStroke: "#00c0ef",
|
||||
data: {!! $cash_flow['daily']['income'] !!}
|
||||
},
|
||||
{
|
||||
label: "{{ trans_choice('general.expenses', 1) }}",
|
||||
fillColor: "#F56954",
|
||||
strokeColor: "#F56954",
|
||||
pointColor: "#F56954",
|
||||
pointStrokeColor: "#F56954",
|
||||
pointHighlightFill: "#FFF",
|
||||
pointHighlightStroke: "#F56954",
|
||||
data: {!! $cash_flow['daily']['expense'] !!}
|
||||
},
|
||||
{
|
||||
label: "{{ trans_choice('general.profits', 1) }}",
|
||||
fillColor: "#6da252",
|
||||
strokeColor: "#6da252",
|
||||
pointColor: "#6da252",
|
||||
pointStrokeColor: "#6da252",
|
||||
pointHighlightFill: "#FFF",
|
||||
pointHighlightStroke: "#6da252",
|
||||
data: {!! $cash_flow['daily']['profit'] !!}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
var areaChartOptions = {
|
||||
showScale: true,
|
||||
scaleShowGridLines: true,
|
||||
scaleGridLineColor: "rgba(0,0,0,.05)",
|
||||
scaleGridLineWidth: 1,
|
||||
scaleShowHorizontalLines: true,
|
||||
scaleShowVerticalLines: true,
|
||||
bezierCurve: true,
|
||||
bezierCurveTension: 0.3,
|
||||
pointDot: false,
|
||||
pointDotRadius: 4,
|
||||
pointDotStrokeWidth: 1,
|
||||
pointHitDetectionRadius: 20,
|
||||
datasetStroke: true,
|
||||
datasetStrokeWidth: 2,
|
||||
datasetFill: true,
|
||||
legendTemplate: '<ul class="<%=name.toLowerCase()%>-legend"><% for (var i=0; i<datasets.length; i++){%><li><span style="background-color:<%=datasets[i].lineColor%>"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>',
|
||||
maintainAspectRatio: true,
|
||||
responsive: true
|
||||
};
|
||||
|
||||
var cashFlowDailyCanvas = $("#cash_flow_daily").get(0).getContext("2d");
|
||||
var cashFlowDaily = new Chart(cashFlowDailyCanvas);
|
||||
var cashFlowDailyOptions = areaChartOptions;
|
||||
|
||||
cashFlowDailyOptions.datasetFill = false;
|
||||
cashFlowDaily.Line(areaChartData, cashFlowDailyOptions);
|
||||
|
||||
var income_category_canvas = $("#income_category").get(0).getContext("2d");
|
||||
var income_category_pie_chart = new Chart(income_category_canvas);
|
||||
var income_category_data = jQuery.parseJSON('{!! $income_graph !!}');
|
||||
|
||||
var income_category_options = {
|
||||
segmentShowStroke: true,
|
||||
segmentStrokeColor: "#fff",
|
||||
segmentStrokeWidth: 1,
|
||||
percentageInnerCutout: 50, // This is 0 for Pie charts
|
||||
animationSteps: 100,
|
||||
animationEasing: "easeOutBounce",
|
||||
animateRotate: true,
|
||||
animateScale: false,
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
legendTemplate: "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>",
|
||||
tooltipTemplate: "<%=label%>"
|
||||
};
|
||||
|
||||
income_category_pie_chart.Doughnut(income_category_data, income_category_options);
|
||||
|
||||
var expense_category_canvas = $("#expense_category").get(0).getContext("2d");
|
||||
var expense_category_pie_chart = new Chart(expense_category_canvas);
|
||||
var expense_category_data = jQuery.parseJSON('{!! $expense_graph !!}');
|
||||
|
||||
var expense_category_options = {
|
||||
segmentShowStroke: true,
|
||||
segmentStrokeColor: "#fff",
|
||||
segmentStrokeWidth: 1,
|
||||
percentageInnerCutout: 50, // This is 0 for Pie charts
|
||||
animationSteps: 100,
|
||||
animationEasing: "easeOutBounce",
|
||||
animateRotate: true,
|
||||
animateScale: false,
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
legendTemplate: "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span style=\"background-color:<%=segments[i].fillColor%>\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>",
|
||||
tooltipTemplate: "<%=label%>"
|
||||
};
|
||||
|
||||
expense_category_pie_chart.Doughnut(expense_category_data, expense_category_options);
|
||||
|
||||
@if ($cash_flow['monthly'])
|
||||
Highcharts.chart('cash_flow_monthly', {
|
||||
chart: {
|
||||
type: 'column'
|
||||
},
|
||||
title: {
|
||||
text: ''
|
||||
},
|
||||
xAxis: {
|
||||
categories: {!! $cash_flow['monthly']['date'] !!}
|
||||
},
|
||||
credits: {
|
||||
enabled: false
|
||||
},
|
||||
series: [{
|
||||
name: '{{ trans_choice('general.incomes', 1) }}',
|
||||
data: {!! $cash_flow['monthly']['income'] !!}
|
||||
},{
|
||||
name: '{{ trans_choice('general.expenses', 1) }}',
|
||||
data: {!! $cash_flow['monthly']['expense'] !!}
|
||||
}, {
|
||||
name: '{{ trans_choice('general.profits', 1) }}',
|
||||
data: {!! $cash_flow['monthly']['profit'] !!}
|
||||
}]
|
||||
});
|
||||
@endif
|
||||
});
|
||||
|
||||
jQuery(document).on( 'shown.bs.tab', 'a[data-toggle="tab"]', function () {
|
||||
$('#cash_flow_monthly').each(function() {
|
||||
$(this).highcharts().reflow();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
13
resources/views/errors/403.blade.php
Normal file
13
resources/views/errors/403.blade.php
Normal file
@@ -0,0 +1,13 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', 'Forbidden Access')
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-body">
|
||||
<h1>You don't have permission.</h1>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
@endsection
|
||||
141
resources/views/expenses/bills/bill.blade.php
Normal file
141
resources/views/expenses/bills/bill.blade.php
Normal file
@@ -0,0 +1,141 @@
|
||||
@extends('layouts.bill')
|
||||
|
||||
@section('title', trans_choice('general.bills', 1) . ': ' . $bill->bill_number)
|
||||
|
||||
@section('content')
|
||||
<section class="bill">
|
||||
<div class="row invoice-header">
|
||||
<div class="col-xs-7">
|
||||
@if (setting('general.invoice_logo'))
|
||||
<img src="{{ asset(setting('general.invoice_logo')) }}" class="invoice-logo" />
|
||||
@else
|
||||
<img src="{{ asset(setting('general.company_logo')) }}" class="invoice-logo" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5 invoice-company">
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
@if (setting('general.company_tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('general.company_tax_number') }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if (setting('general.company_phone'))
|
||||
{{ setting('general.company_phone') }}<br>
|
||||
@endif
|
||||
{{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
{{ trans('bills.bill_from') }}
|
||||
<address>
|
||||
<strong>{{ $bill->vendor_name }}</strong><br>
|
||||
{{ $bill->vendor_address }}<br>
|
||||
@if ($bill->vendor_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $bill->vendor_tax_number }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if ($bill->vendor_phone)
|
||||
{{ $bill->vendor_phone }}<br>
|
||||
@endif
|
||||
{{ $bill->vendor_email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table no-border">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('bills.bill_number') }}:</th>
|
||||
<td class="text-right">{{ $bill->bill_number }}</td>
|
||||
</tr>
|
||||
@if ($bill->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('bills.order_number') }}:</th>
|
||||
<td class="text-right">{{ $bill->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('bills.bill_date') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($bill->billed_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('bills.payment_due') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($bill->due_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.items', 1) }}</th>
|
||||
<th class="text-center">{{ trans('bills.quantity') }}</th>
|
||||
<th class="text-right">{{ trans('bills.price') }}</th>
|
||||
<th class="text-right">{{ trans('bills.total') }}</th>
|
||||
</tr>
|
||||
@foreach($bill->items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $item->name }}
|
||||
@if ($item->sku)
|
||||
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">{{ $item->quantity }}</td>
|
||||
<td class="text-right">@money($item->price, $bill->currency_code, true)</td>
|
||||
<td class="text-right">@money($item->total - $item->tax, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
@if ($bill->notes)
|
||||
<p class="lead">{{ trans_choice('general.notes', 2) }}:</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $bill->notes }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="width:50%">{{ trans('bills.sub_total') }}:</th>
|
||||
<td class="text-right">@money($bill->sub_total, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('bills.tax_total') }}:</th>
|
||||
<td class="text-right">@money($bill->tax_total, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@if($bill->paid)
|
||||
<tr>
|
||||
<th>{{ trans('bills.paid') }}:</th>
|
||||
<td class="text-right">@money('-' . $bill->paid, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('bills.total') }}:</th>
|
||||
<td class="text-right">@money($bill->grand_total, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
||||
264
resources/views/expenses/bills/create.blade.php
Normal file
264
resources/views/expenses/bills/create.blade.php
Normal file
@@ -0,0 +1,264 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.bills', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'expenses/bills', 'files' => true, 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::selectGroup('vendor_id', trans_choice('general.vendors', 1), 'user', $vendors) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('general.default_currency')) }}
|
||||
|
||||
{{ Form::textGroup('billed_at', trans('bills.bill_date'), 'calendar',['id' => 'billed_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => ''],Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('due_at', trans('bills.due_date'), 'calendar',['id' => 'due_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => ''],Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('bill_number', trans('bills.bill_number'), 'file-text-o') }}
|
||||
|
||||
{{ Form::textGroup('order_number', trans('bills.order_number'), 'shopping-cart',[]) }}
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
{!! Form::label('items', trans_choice('general.items', 1), ['class' => 'control-label']) !!}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="items">
|
||||
<thead>
|
||||
<tr style="background-color: #f9f9f9;">
|
||||
<th width="5%" class="text-center">{{ trans('general.actions') }}</th>
|
||||
<th width="40%" class="text-left">{{ trans('general.name') }}</th>
|
||||
<th width="5%" class="text-center">{{ trans('bills.quantity') }}</th>
|
||||
<th width="10%" class="text-right">{{ trans('bills.price') }}</th>
|
||||
<th width="15%" class="text-right">{{ trans_choice('general.taxes', 1) }}</th>
|
||||
<th width="10%" class="text-right">{{ trans('bills.total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $item_row = 0; ?>
|
||||
<tr id="item-row-{{ $item_row }}">
|
||||
<td class="text-center" style="vertical-align: middle;">
|
||||
<button type="button" onclick="$(this).tooltip('destroy'); $('#item-row-{{ $item_row }}').remove(); totalItem();" data-toggle="tooltip" title="{{ trans('general.delete') }}" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control typeahead" required="required" placeholder="{{ trans('general.form.enter', ['field' => trans_choice('bills.item_name', 1)]) }}" name="item[{{ $item_row }}][name]" type="text" id="item-name-{{ $item_row }}">
|
||||
<input name="item[{{ $item_row }}][item_id]" type="hidden" id="item-id-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control text-center" required="required" name="item[{{ $item_row }}][quantity]" type="text" id="item-quantity-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control text-right" required="required" name="item[{{ $item_row }}][price]" type="text" id="item-price-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('item[' . $item_row . '][tax]', $taxes, setting('general.default_tax'), ['id'=> 'item-tax-'. $item_row, 'class' => 'form-control select2', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)])]) !!}
|
||||
</td>
|
||||
<td class="text-right" style="vertical-align: middle;">
|
||||
<span id="item-total-{{ $item_row }}">0</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $item_row++; ?>
|
||||
<tr id="addItem">
|
||||
<td class="text-center"><button type="button" onclick="addItem();" data-toggle="tooltip" title="{{ trans('general.add') }}" class="btn btn-xs btn-primary" data-original-title="{{ trans('general.add') }}"><i class="fa fa-plus"></i></button></td>
|
||||
<td class="text-right" colspan="5"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('bills.sub_total') }}</strong></td>
|
||||
<td class="text-right"><span id="sub-total">0</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans_choice('general.taxes', 1) }}</strong></td>
|
||||
<td class="text-right"><span id="tax-total">0</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('bills.total') }}</strong></td>
|
||||
<td class="text-right"><span id="grand-total">0</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment'),[]) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('expenses/bills') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var item_row = {{ $item_row }};
|
||||
|
||||
function addItem() {
|
||||
html = '<tr id="item-row-' + item_row + '">';
|
||||
html += ' <td class="text-center" style="vertical-align: middle;">';
|
||||
html += ' <button type="button" onclick="$(this).tooltip(\'destroy\'); $(\'#item-row-' + item_row + '\').remove(); totalItem();" data-toggle="tooltip" title="{{ trans('general.delete') }}" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control typeahead" required="required" placeholder="{{ trans('general.form.enter', ['field' => trans_choice('bills.item_name', 1)]) }}" name="item[' + item_row + '][name]" type="text" id="item-name-' + item_row + '">';
|
||||
html += ' <input name="item[' + item_row + '][item_id]" type="hidden" id="item-id-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control text-center" required="required" name="item[' + item_row + '][quantity]" type="text" id="item-quantity-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control text-right" required="required" name="item[' + item_row + '][price]" type="text" id="item-price-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <select class="form-control select2" name="item[' + item_row + '][tax]" id="item-tax-' + item_row + '">';
|
||||
html += ' <option selected="selected" value="">{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}</option>';
|
||||
@foreach($taxes as $tax_key => $tax_value)
|
||||
html += ' <option value="{{ $tax_key }}">{{ $tax_value }}</option>';
|
||||
@endforeach
|
||||
html += ' </select>';
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-right" style="vertical-align: middle;">';
|
||||
html += ' <span id="item-total-' + item_row + '">0</span>';
|
||||
html += ' </td>';
|
||||
|
||||
$('#items tbody #addItem').before(html);
|
||||
//$('[rel=tooltip]').tooltip();
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip('hide');
|
||||
|
||||
$('#item-row-' + item_row + ' .select2').select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
|
||||
});
|
||||
|
||||
item_row++;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
//Date picker
|
||||
$('#billed_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
//Date picker
|
||||
$('#due_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".select2").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#vendor_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#attachment').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||
});
|
||||
|
||||
var autocomplete_path = "{{ url('items/items/autocomplete') }}";
|
||||
|
||||
$(document).on('click', '.form-control.typeahead', function() {
|
||||
input_id = $(this).attr('id').split('-');
|
||||
|
||||
item_id = parseInt(input_id[input_id.length-1]);
|
||||
|
||||
$(this).typeahead({
|
||||
minLength: 3,
|
||||
displayText:function (data) {
|
||||
return data.name;
|
||||
},
|
||||
source: function (query, process) {
|
||||
$.ajax({
|
||||
url: autocomplete_path,
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'query=' + query + '&type=bill¤cy_code=' + $('#currency_code').val(),
|
||||
success: function(data) {
|
||||
return process(data);
|
||||
}
|
||||
});
|
||||
},
|
||||
afterSelect: function (data) {
|
||||
$('#item-id-' + item_id).val(data.item_id);
|
||||
$('#item-quantity-' + item_id).val('1');
|
||||
$('#item-price-' + item_id).val(data.purchase_price);
|
||||
$('#item-tax-' + item_id).val(data.tax_id);
|
||||
|
||||
// This event Select2 Stylesheet
|
||||
$('#item-tax-' + item_id).trigger('change');
|
||||
|
||||
$('#item-total-' + item_id).html(data.total);
|
||||
|
||||
totalItem();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', '#currency_code, #items tbody select', function(){
|
||||
totalItem();
|
||||
});
|
||||
|
||||
$(document).on('keyup', '#items tbody .form-control', function(){
|
||||
totalItem();
|
||||
});
|
||||
|
||||
$(document).on('change', '#vendor_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("expenses/vendors/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'vendor_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency_code').val(data.currency_code);
|
||||
|
||||
// This event Select2 Stylesheet
|
||||
$('#currency_code').trigger('change');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function totalItem() {
|
||||
$.ajax({
|
||||
url: '{{ url("items/items/totalItem") }}',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: $('#currency_code, #items input[type=\'text\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
$.each( data.items, function( key, value ) {
|
||||
$('#item-total-' + key).html(value);
|
||||
});
|
||||
|
||||
$('#sub-total').html(data.sub_total);
|
||||
$('#tax-total').html(data.tax_total);
|
||||
$('#grand-total').html(data.grand_total);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
294
resources/views/expenses/bills/edit.blade.php
Normal file
294
resources/views/expenses/bills/edit.blade.php
Normal file
@@ -0,0 +1,294 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.bills', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($bill, ['method' => 'PATCH', 'files' => true, 'url' => ['expenses/bills', $bill->id], 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::selectGroup('vendor_id', trans_choice('general.vendors', 1), 'user', $vendors) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies) }}
|
||||
|
||||
{{ Form::textGroup('billed_at', trans('bills.bill_date'), 'calendar',['id' => 'billed_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => ''],Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('due_at', trans('bills.due_date'), 'calendar',['id' => 'due_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy/mm/dd\'', 'data-mask' => ''],Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('bill_number', trans('bills.bill_number'), 'file-text-o') }}
|
||||
|
||||
{{ Form::textGroup('order_number', trans('bills.order_number'), 'shopping-cart',[]) }}
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
{!! Form::label('items', trans_choice('general.items', 1), ['class' => 'control-label']) !!}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="items">
|
||||
<thead>
|
||||
<tr style="background-color: #f9f9f9;">
|
||||
<th width="5%" class="text-center">{{ trans('general.actions') }}</th>
|
||||
<th width="40%" class="text-left">{{ trans('general.name') }}</th>
|
||||
<th width="5%" class="text-center">{{ trans('bills.quantity') }}</th>
|
||||
<th width="10%" class="text-right">{{ trans('bills.price') }}</th>
|
||||
<th width="15%" class="text-right">{{ trans_choice('general.taxes', 1) }}</th>
|
||||
<th width="10%" class="text-right">{{ trans('bills.total') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $item_row = 0; ?>
|
||||
@foreach($bill->items as $item)
|
||||
<tr id="item-row-{{ $item_row }}">
|
||||
<td class="text-center" style="vertical-align: middle;">
|
||||
<button type="button" onclick="$(this).tooltip('destroy'); $('#item-row-{{ $item_row }}').remove(); totalItem();" data-toggle="tooltip" title="Remove Item" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
<input value="{{ $item->name }}" class="form-control typeahead" required="required" placeholder="Enter Item Name" name="item[{{ $item_row }}][name]" type="text" id="item-name-{{ $item_row }}">
|
||||
<input value="{{ $item->item_id }}" name="item[{{ $item_row }}][item_id]" type="hidden" id="item-id-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input value="{{ $item->quantity }}" class="form-control text-center" required="required" name="item[{{ $item_row }}][quantity]" type="text" id="item-quantity-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input value="{{ $item->price }}" class="form-control text-right" required="required" name="item[{{ $item_row }}][price]" type="text" id="item-price-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('item[' . $item_row . '][tax]', $taxes, $item->tax, ['id'=> 'item-tax-'. $item_row, 'class' => 'form-control select2', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)])]) !!}
|
||||
</td>
|
||||
<td class="text-right" style="vertical-align: middle;">
|
||||
<span id="item-total-{{ $item_row }}">@money($item->total, $bill->currency_code, true)</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $item_row++; ?>
|
||||
@endforeach
|
||||
@if (empty($bill->items))
|
||||
<tr id="item-row-{{ $item_row }}">
|
||||
<td class="text-center" style="vertical-align: middle;">
|
||||
<button type="button" onclick="$(this).tooltip('destroy'); $('#item-row-{{ $item_row }}').remove(); totalItem();" data-toggle="tooltip" title="{{ trans('general.delete') }}" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control typeahead" required="required" placeholder="{{ trans('general.form.enter', ['field' => trans_choice('bills.item_name', 1)]) }}" name="item[{{ $item_row }}][name]" type="text" id="item-name-{{ $item_row }}">
|
||||
<input name="item[{{ $item_row }}][item_id]" type="hidden" id="item-id-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control text-center" required="required" name="item[{{ $item_row }}][quantity]" type="text" id="item-quantity-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control text-right" required="required" name="item[{{ $item_row }}][price]" type="text" id="item-price-{{ $item_row }}">
|
||||
</td>
|
||||
<td>
|
||||
{!! Form::select('item[' . $item_row . '][tax]', $taxes, null, ['id'=> 'item-tax-'. $item_row, 'class' => 'form-control select2', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)])]) !!}
|
||||
</td>
|
||||
<td class="text-right" style="vertical-align: middle;">
|
||||
<span id="item-total-{{ $item_row }}">0</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<?php $item_row++; ?>
|
||||
<tr id="addItem">
|
||||
<td class="text-center"><button type="button" onclick="addItem();" data-toggle="tooltip" title="{{ trans('general.add') }}" class="btn btn-xs btn-primary" data-original-title="{{ trans('general.add') }}"><i class="fa fa-plus"></i></button></td>
|
||||
<td class="text-right" colspan="5"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('bills.sub_total') }}</strong></td>
|
||||
<td class="text-right"><span id="sub-total">0</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans_choice('general.taxes', 1) }}</strong></td>
|
||||
<td class="text-right"><span id="tax-total">0</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right" colspan="5"><strong>{{ trans('bills.total') }}</strong></td>
|
||||
<td class="text-right"><span id="grand-total">0</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::textareaGroup('notes', trans_choice('general.notes', 2)) }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment'),[]) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-expenses-bills')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('expenses/bills') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.1/bootstrap3-typeahead.min.js"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var item_row = {{ $item_row }};
|
||||
|
||||
function addItem() {
|
||||
html = '<tr id="item-row-' + item_row + '">';
|
||||
html += ' <td class="text-center" style="vertical-align: middle;">';
|
||||
html += ' <button type="button" onclick="$(this).tooltip(\'destroy\'); $(\'#item-row-' + item_row + '\').remove(); totalItem();" data-toggle="tooltip" title="{{ trans('general.delete') }}" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i></button>';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control typeahead" required="required" placeholder="{{ trans('general.form.enter', ['field' => trans_choice('bills.item_name', 1)]) }}" name="item[' + item_row + '][name]" type="text" id="item-name-' + item_row + '">';
|
||||
html += ' <input name="item[' + item_row + '][item_id]" type="hidden" id="item-id-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control text-center" required="required" name="item[' + item_row + '][quantity]" type="text" id="item-quantity-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <input class="form-control text-right" required="required" name="item[' + item_row + '][price]" type="text" id="item-price-' + item_row + '">';
|
||||
html += ' </td>';
|
||||
html += ' <td>';
|
||||
html += ' <select class="form-control select2" name="item[' + item_row + '][tax]" id="item-tax-' + item_row + '">';
|
||||
html += ' <option selected="selected" value="">{{ trans('general.form.select.filed', ['field' => trans_choice('general.taxes', 1)]) }}</option>';
|
||||
@foreach($taxes as $tax_key => $tax_value)
|
||||
html += ' <option value="{{ $tax_key }}">{{ $tax_value }}</option>';
|
||||
@endforeach
|
||||
html += ' </select>';
|
||||
html += ' </td>';
|
||||
html += ' <td class="text-right" style="vertical-align: middle;">';
|
||||
html += ' <span id="item-total-' + item_row + '">0</span>';
|
||||
html += ' </td>';
|
||||
|
||||
$('#items tbody #addItem').before(html);
|
||||
//$('[rel=tooltip]').tooltip();
|
||||
|
||||
$('[data-toggle="tooltip"]').tooltip('hide');
|
||||
|
||||
$('#item-row-' + item_row + ' .select2').select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
|
||||
});
|
||||
|
||||
item_row++;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
totalItem();
|
||||
|
||||
//Date picker
|
||||
$('#billed_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
//Date picker
|
||||
$('#due_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$(".select2").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.taxes', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#vendor_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#attachment').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '<?php echo $bill->attachment; ?>'
|
||||
});
|
||||
|
||||
var autocomplete_path = "{{ url('items/items/autocomplete') }}";
|
||||
|
||||
$(document).on('click', '.form-control.typeahead', function() {
|
||||
input_id = $(this).attr('id').split('-');
|
||||
|
||||
item_id = parseInt(input_id[input_id.length-1]);
|
||||
|
||||
$(this).typeahead({
|
||||
minLength: 3,
|
||||
displayText:function (data) {
|
||||
return data.name;
|
||||
},
|
||||
source: function (query, process) {
|
||||
$.ajax({
|
||||
url: autocomplete_path,
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'query=' + query + '&type=bill¤cy_code=' + $('#currency_code').val(),
|
||||
success: function(data) {
|
||||
return process(data);
|
||||
}
|
||||
});
|
||||
},
|
||||
afterSelect: function (data) {
|
||||
$('#item-id-' + item_id).val(data.item_id);
|
||||
$('#item-quantity-' + item_id).val('1');
|
||||
$('#item-price-' + item_id).val(data.purchase_price);
|
||||
$('#item-tax-' + item_id).val(data.tax_id);
|
||||
|
||||
// This event Select2 Stylesheet
|
||||
$('#item-tax-' + item_id).trigger('change');
|
||||
|
||||
$('#item-total-' + item_id).html(data.total);
|
||||
|
||||
totalItem();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('change', '#currency_code, #items tbody select', function(){
|
||||
totalItem();
|
||||
});
|
||||
|
||||
$(document).on('keyup', '#items tbody .form-control', function(){
|
||||
totalItem();
|
||||
});
|
||||
|
||||
$(document).on('change', '#vendor_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("expenses/vendors/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'vendor_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency_code').val(data.currency_code);
|
||||
|
||||
// This event Select2 Stylesheet
|
||||
$('#currency_code').trigger('change');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function totalItem() {
|
||||
$.ajax({
|
||||
url: '{{ url("items/items/totalItem") }}',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: $('#currency_code, #items input[type=\'text\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
success: function(data) {
|
||||
if (data) {
|
||||
$.each( data.items, function( key, value ) {
|
||||
$('#item-total-' + key).html(value);
|
||||
});
|
||||
|
||||
$('#sub-total').html(data.sub_total);
|
||||
$('#tax-total').html(data.tax_total);
|
||||
$('#grand-total').html(data.grand_total);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
75
resources/views/expenses/bills/index.blade.php
Normal file
75
resources/views/expenses/bills/index.blade.php
Normal file
@@ -0,0 +1,75 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.bills', 2))
|
||||
|
||||
@permission('create-expenses-bills')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('expenses/bills/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'expenses/bills', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('status', $status, request('status'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('status.all')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-bills">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1">@sortablelink('bill_number', trans_choice('general.numbers', 1))</th>
|
||||
<th class="col-md-3">@sortablelink('vendor_name', trans_choice('general.vendors', 1))</th>
|
||||
<th class="col-md-1">@sortablelink('amount', trans('general.amount'))</th>
|
||||
<th class="col-md-1">@sortablelink('status.name', trans('general.status'))</th>
|
||||
<th>@sortablelink('billed_at', trans('bills.bill_date'))</th>
|
||||
<th>@sortablelink('due_at', trans('bills.due_date'))</th>
|
||||
<th class="col-md-3">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($bills as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('expenses/bills/' . $item->id . ' ') }}">{{ $item->bill_number }}</a></td>
|
||||
<td>{{ $item->vendor_name }}</td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->status->name }}</td>
|
||||
<td>{{ Date::parse($item->billed_at)->format($date_format) }}</td>
|
||||
<td>{{ Date::parse($item->due_at)->format($date_format) }}</td>
|
||||
<td>
|
||||
<a href="{{ url('expenses/bills/' . $item->id) }}" class="btn btn-info btn-xs"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
<a href="{{ url('expenses/bills/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-expenses-bills')
|
||||
{!! Form::deleteButton($item, 'expenses/bills') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $bills, 'type' => 'bills'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
449
resources/views/expenses/bills/show.blade.php
Normal file
449
resources/views/expenses/bills/show.blade.php
Normal file
@@ -0,0 +1,449 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.bills', 1) . ': ' . $bill->bill_number)
|
||||
|
||||
@section('content')
|
||||
<div class="box box-success">
|
||||
<div class="bill">
|
||||
<span class="badge bg-aqua">{{ $bill->status->name }}</span>
|
||||
|
||||
<div class="row invoice-header">
|
||||
<div class="col-xs-7">
|
||||
@if (setting('general.invoice_logo'))
|
||||
<img src="{{ asset(setting('general.invoice_logo')) }}" class="invoice-logo" />
|
||||
@else
|
||||
<img src="{{ asset(setting('general.company_logo')) }}" class="invoice-logo" />
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5 invoice-company">
|
||||
<address>
|
||||
<strong>{{ setting('general.company_name') }}</strong><br>
|
||||
{{ setting('general.company_address') }}<br>
|
||||
@if (setting('general.company_tax_number'))
|
||||
{{ trans('general.tax_number') }}: {{ setting('general.company_tax_number') }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if (setting('general.company_phone'))
|
||||
{{ setting('general.company_phone') }}<br>
|
||||
@endif
|
||||
{{ setting('general.company_email') }}
|
||||
</address>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
{{ trans('bills.bill_from') }}
|
||||
<address>
|
||||
<strong>{{ $bill->vendor_name }}</strong><br>
|
||||
{{ $bill->vendor_address }}<br>
|
||||
@if ($bill->vendor_tax_number)
|
||||
{{ trans('general.tax_number') }}: {{ $bill->vendor_tax_number }}<br>
|
||||
@endif
|
||||
<br>
|
||||
@if ($bill->vendor_phone)
|
||||
{{ $bill->vendor_phone }}<br>
|
||||
@endif
|
||||
{{ $bill->vendor_email }}
|
||||
</address>
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table no-border">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans('bills.bill_number') }}:</th>
|
||||
<td class="text-right">{{ $bill->bill_number }}</td>
|
||||
</tr>
|
||||
@if ($bill->order_number)
|
||||
<tr>
|
||||
<th>{{ trans('bills.order_number') }}:</th>
|
||||
<td class="text-right">{{ $bill->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('bills.bill_date') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($bill->billed_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('bills.payment_due') }}:</th>
|
||||
<td class="text-right">{{ Date::parse($bill->due_at)->format($date_format) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{{ trans_choice('general.items', 1) }}</th>
|
||||
<th class="text-center">{{ trans('bills.quantity') }}</th>
|
||||
<th class="text-right">{{ trans('bills.price') }}</th>
|
||||
<th class="text-right">{{ trans('bills.total') }}</th>
|
||||
</tr>
|
||||
@foreach($bill->items as $item)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $item->name }}
|
||||
@if ($item->sku)
|
||||
<br><small>{{ trans('items.sku') }}: {{ $item->sku }}</small>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">{{ $item->quantity }}</td>
|
||||
<td class="text-right">@money($item->price, $bill->currency_code, true)</td>
|
||||
<td class="text-right">@money($item->total - $item->tax, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-7">
|
||||
@if ($bill->notes)
|
||||
<p class="lead">{{ trans_choice('general.notes', 2) }}:</p>
|
||||
|
||||
<p class="text-muted well well-sm no-shadow" style="margin-top: 10px;">
|
||||
{{ $bill->notes }}
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="width:50%">{{ trans('bills.sub_total') }}:</th>
|
||||
<td class="text-right">@money($bill->sub_total, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ trans('bills.tax_total') }}:</th>
|
||||
<td class="text-right">@money($bill->tax_total, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@if($bill->paid)
|
||||
<tr>
|
||||
<th>{{ trans('bills.paid') }}:</th>
|
||||
<td class="text-right">@money('-' . $bill->paid, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<th>{{ trans('bills.total') }}:</th>
|
||||
<td class="text-right">@money($bill->grand_total, $bill->currency_code, true)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-footer row no-print">
|
||||
<div class="col-xs-12">
|
||||
<a href="{{ url('expenses/bills/' . $bill->id . '/edit') }}" class="btn btn-primary">
|
||||
<i class="fa fa-pencil-square-o"></i> {{ trans('general.edit') }}
|
||||
</a>
|
||||
<a href="{{ url('expenses/bills/' . $bill->id . '/print') }}" target="_blank" class="btn btn-default">
|
||||
<i class="fa fa-print"></i> {{ trans('general.print') }}
|
||||
</a>
|
||||
<button type="button" id="button-pdf" class="btn btn-default" data-toggle="tooltip" title="{{ trans('bills.download_pdf') }}">
|
||||
<i class="fa fa-file-pdf-o"></i> {{ trans('general.download') }}
|
||||
</button>
|
||||
<button type="button" id="button-payment" class="btn btn-success">
|
||||
<i class="fa fa-credit-card"></i> {{ trans('bills.add_payment') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 no-padding-left">
|
||||
<div class="box box-default collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('bills.histories') }}</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.status') }}</th>
|
||||
<th>{{ trans('general.description') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($bill->histories as $history)
|
||||
<tr>
|
||||
<td>{{ Date::parse($bill->created_at)->format($date_format) }}</td>
|
||||
<td>{{ $bill->status->name }}</td>
|
||||
<td>{{ $bill->description }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 no-padding-right">
|
||||
<div class="box box-default collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('bills.payments') }}</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.date') }}</th>
|
||||
<th>{{ trans('general.amount') }}</th>
|
||||
<th>{{ trans_choice('general.accounts', 1) }}</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($bill->payments as $payment)
|
||||
<tr>
|
||||
<td>{{ Date::parse($payment->paid_at)->format($date_format) }}</td>
|
||||
<td>@money($payment->amount, $payment->currency_code, true)</td>
|
||||
<td>{{ $payment->account->name }}</td>
|
||||
<td>
|
||||
<a href="{{ url('expenses/bills/' . $payment->id) }}" class="btn btn-info btn-xs hidden"><i class="fa fa-eye" aria-hidden="true"></i> {{ trans('general.show') }}</a>
|
||||
<a href="{{ url('expenses/bills/' . $payment->id . '/edit') }}" class="btn btn-primary btn-xs hidden"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
{!! Form::open([
|
||||
'id' => 'bill-payment-' . $payment->id,
|
||||
'method' => 'DELETE',
|
||||
'url' => ['expenses/bills/paymentDestroy', $payment->id],
|
||||
'style' => 'display:inline'
|
||||
]) !!}
|
||||
{!! Form::button('<i class="fa fa-trash-o" aria-hidden="true"></i> ' . trans('general.delete'), array(
|
||||
'type' => 'button',
|
||||
'class' => 'btn btn-danger btn-xs',
|
||||
'title' => trans('general.delete'),
|
||||
'onclick' => 'confirmDelete("' . '#bill-payment-' . $payment->id . '", "' . trans_choice('general.payments', 2) . '", "' . trans('general.delete_confirm', ['name' => '<strong>' . Date::parse($payment->paid_at)->format($date_format) . ' - ' . money($payment->amount, $payment->currency_code, true) . ' - ' . $payment->account->name . '</strong>', 'type' => strtolower(trans_choice('general.revenues', 1))]) . '", "' . trans('general.cancel') . '", "' . trans('general.delete') . '")'
|
||||
)) !!}
|
||||
{!! Form::close() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$(document).on('click', '#button-payment', function (e) {
|
||||
$('#payment-modal').remove();
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<div class="modal fade" id="payment-modal" tabindex="-1" role="dialog" aria-labelledby="paymentModalLabel">';
|
||||
html += ' <div class="modal-dialog" role="document">';
|
||||
html += ' <div class="modal-content box box-success">';
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>';
|
||||
html += ' <h4 class="modal-title" id="paymentModalLabel">{{ trans('bills.add_payment') }}</h4>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-body box-body">';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('paid_at', trans('general.date'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-calendar"></i></div>';
|
||||
html += ' {!! Form::text('paid_at', \Date::now()->toDateString(), ['id' => 'paid_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => '']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('amount', trans('general.amount'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-money"></i></div>';
|
||||
html += ' {!! Form::text('amount', $bill->grand_total, ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.enter', ['field' => trans('general.amount')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('account_id', trans_choice('general.accounts', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-university"></i></div>';
|
||||
html += ' {!! Form::select('account_id', $accounts, setting('general.default_account'), ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('currency_code', trans_choice('general.currencies', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-exchange"></i></div>';
|
||||
html += ' {!! Form::text('currency', $currencies[$account_currency_code], ['id' => 'currency', 'class' => 'form-control', 'required' => 'required', 'disabled' => 'disabled']) !!}';
|
||||
html += ' {!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-12">';
|
||||
html += ' {!! Form::label('description', trans('general.description'), ['class' => 'control-label']) !!}';
|
||||
html += ' {!! Form::textarea('description', null, ['class' => 'form-control', 'rows' => '3', 'placeholder' => trans('general.form.enter', ['field' => trans('general.description')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6 required">';
|
||||
html += ' {!! Form::label('payment_method', trans_choice('general.payment_methods', 1), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-folder-open-o"></i></div>';
|
||||
html += ' {!! Form::select('payment_method', $payment_methods, setting('general.default_payment_method'), ['class' => 'form-control', 'required' => 'required', 'placeholder' => trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="form-group col-md-6">';
|
||||
html += ' {!! Form::label('reference', trans('general.reference'), ['class' => 'control-label']) !!}';
|
||||
html += ' <div class="input-group">';
|
||||
html += ' <div class="input-group-addon"><i class="fa fa-file-text-o"></i></div>';
|
||||
html += ' {!! Form::text('reference', null, ['class' => 'form-control', 'placeholder' => trans('general.form.enter', ['field' => trans('general.reference')])]) !!}';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' {!! Form::hidden('bill_id', $bill->id, ['id' => 'bill_id', 'class' => 'form-control', 'required' => 'required']) !!}';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-footer">';
|
||||
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.cancel') }}</button>';
|
||||
html += ' <button type="button" onclick="addPayment();" class="btn btn-success">{{ trans('general.save') }}</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('body').append(html);
|
||||
|
||||
$('#paid_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#payment-modal').modal('show');
|
||||
});
|
||||
|
||||
$(document).on('change', '#account_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'account_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency').val(data.currency_name);
|
||||
$('#currency_code').val(data.currency_code);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#button-pdf', function (e) {
|
||||
location.href = "{{ url('expenses/bills/' . $bill->id . '/pdf') }}";
|
||||
});
|
||||
|
||||
$(document).on('click', '#button-email', function (e) {
|
||||
$('#email-modal').remove();
|
||||
|
||||
var html = '<div class="modal fade" id="email-modal" tabindex="-1" role="dialog" aria-labelledby="emailModalLabel">';
|
||||
html += ' <div class="modal-dialog" role="document">';
|
||||
html += ' <div class="modal-content">';
|
||||
html += ' <div class="modal-header">';
|
||||
html += ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>';
|
||||
html += ' <h4 class="modal-title" id="emailModalLabel">Overflowing text</h4>';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-body">';
|
||||
html += ' N/A';
|
||||
html += ' </div>';
|
||||
html += ' <div class="modal-footer">';
|
||||
html += ' <button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('general.cancel') }}</button>';
|
||||
html += ' <button type="button" class="btn btn-success">Save changes</button>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += ' </div>';
|
||||
html += '</div>';
|
||||
|
||||
$('body').append(html);
|
||||
|
||||
$('#email-modal').modal('show');
|
||||
});
|
||||
});
|
||||
|
||||
function addPayment() {
|
||||
$('.help-block').remove();
|
||||
|
||||
$.ajax({
|
||||
url: '{{ url("expenses/bills/payment") }}',
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
data: $('#payment-modal input[type=\'text\'], #payment-modal input[type=\'hidden\'], #payment-modal textarea, #payment-modal select'),
|
||||
headers: { 'X-CSRF-TOKEN': '{{ csrf_token() }}' },
|
||||
beforeSend: function() {
|
||||
$('#payment-modal .modal-content').append('<div id="loading" class="text-center"><i class="fa fa-spinner fa-spin fa-5x checkout-spin"></i></div>');
|
||||
},
|
||||
complete: function() {
|
||||
$('#loading').remove();
|
||||
},
|
||||
success: function(data) {
|
||||
$("#payment-modal").modal('hide');
|
||||
|
||||
location.reload();
|
||||
},
|
||||
error: function(data){
|
||||
var errors = data.responseJSON;
|
||||
|
||||
if (typeof errors !== 'undefined') {
|
||||
if (errors.paid_at) {
|
||||
$('#payment-modal #paid_at').parent().after('<p class="help-block">' + errors.paid_at + '</p>');
|
||||
}
|
||||
|
||||
if (errors.amount) {
|
||||
$('#payment-modal #amount').parent().after('<p class="help-block">' + errors.amount + '</p>');
|
||||
}
|
||||
|
||||
if (errors.account_id) {
|
||||
$('#payment-modal #account_id').parent().after('<p class="help-block">' + errors.account_id + '</p>');
|
||||
}
|
||||
|
||||
if (errors.currency_code) {
|
||||
$('#payment-modal #currency_code').parent().after('<p class="help-block">' + errors.currency_code + '</p>');
|
||||
}
|
||||
|
||||
if (errors.category_id) {
|
||||
$('#payment-modal #category_id').parent().after('<p class="help-block">' + errors.category_id + '</p>');
|
||||
}
|
||||
|
||||
if (errors.payment_method) {
|
||||
$('#payment-modal #payment_method').parent().after('<p class="help-block">' + errors.payment_method + '</p>');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
105
resources/views/expenses/payments/create.blade.php
Normal file
105
resources/views/expenses/payments/create.blade.php
Normal file
@@ -0,0 +1,105 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.payments', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'expenses/payments', 'files' => true, 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('paid_at', trans('general.date'), 'calendar',['id' => 'paid_at', 'class' => 'form-control', 'required' => 'required', 'data-inputmask' => '\'alias\': \'yyyy-mm-dd\'', 'data-mask' => ''], Date::now()->toDateString()) }}
|
||||
|
||||
{{ Form::textGroup('amount', trans('general.amount'), 'money', ['required' => 'required', 'autofocus' => 'autofocus']) }}
|
||||
|
||||
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('general.default_account')) }}
|
||||
|
||||
<div class="form-group col-md-6 {{ $errors->has('currency_code') ? 'has-error' : ''}}">
|
||||
{!! Form::label('currency_code', trans_choice('general.currencies', 1), ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-exchange"></i></div>
|
||||
{!! Form::text('currency', $currencies[$account_currency_code], ['id' => 'currency', 'class' => 'form-control', 'required' => 'required', 'disabled' => 'disabled']) !!}
|
||||
{!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
|
||||
</div>
|
||||
{!! $errors->first('currency_code', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }}
|
||||
|
||||
{{ Form::selectGroup('vendor_id', trans_choice('general.vendors', 1), 'user', $vendors, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card',['cash' => trans('general.cash'), 'bank' => trans('general.bank'), 'paypal' => trans('general.paypal')], setting('general.default_payment_method')) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o',[]) }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('expenses/payments') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
//Date picker
|
||||
$('#paid_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#category_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#vendor_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#attachment').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||
});
|
||||
|
||||
$(document).on('change', '#account_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'account_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency').val(data.currency_name);
|
||||
$('#currency_code').val(data.currency_code);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
112
resources/views/expenses/payments/edit.blade.php
Normal file
112
resources/views/expenses/payments/edit.blade.php
Normal file
@@ -0,0 +1,112 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.payments', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($payment, [
|
||||
'method' => 'PATCH',
|
||||
'files' => true,
|
||||
'url' => ['expenses/payments', $payment->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('paid_at', trans('general.date'), 'calendar') }}
|
||||
|
||||
{{ Form::textGroup('amount', trans('general.amount'), 'money', ['required' => 'required', 'autofocus' => 'autofocus']) }}
|
||||
|
||||
{{ Form::selectGroup('account_id', trans_choice('general.accounts', 1), 'university', $accounts, setting('general.default_account')) }}
|
||||
|
||||
<div class="form-group col-md-6 {{ $errors->has('currency_code') ? 'has-error' : ''}}">
|
||||
{!! Form::label('currency_code', trans_choice('general.currencies', 1), ['class' => 'control-label']) !!}
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon"><i class="fa fa-exchange"></i></div>
|
||||
{!! Form::text('currency', $currencies[$account_currency_code], ['id' => 'currency', 'class' => 'form-control', 'required' => 'required', 'disabled' => 'disabled']) !!}
|
||||
{!! Form::hidden('currency_code', $account_currency_code, ['id' => 'currency_code', 'class' => 'form-control', 'required' => 'required']) !!}
|
||||
</div>
|
||||
{!! $errors->first('currency_code', '<p class="help-block">:message</p>') !!}
|
||||
</div>
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::selectGroup('category_id', trans_choice('general.categories', 1), 'folder-open-o', $categories) }}
|
||||
|
||||
{{ Form::selectGroup('vendor_id', trans_choice('general.vendors', 1), 'user', $vendors, null, []) }}
|
||||
|
||||
{{ Form::selectGroup('payment_method', trans_choice('general.payment_methods', 1), 'credit-card',['cash' => 'Cash', 'bank' => 'Bank Transfer', 'paypal' => 'PayPal'], setting('general.default_payment_method')) }}
|
||||
|
||||
{{ Form::textGroup('reference', trans('general.reference'), 'file-text-o',[]) }}
|
||||
|
||||
{{ Form::fileGroup('attachment', trans('general.attachment')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-expenses-payments')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('expenses/payments') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/bootstrap-datepicker.js') }}"></script>
|
||||
<script src="{{ asset('public/js/bootstrap-fancyfile.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/datepicker/datepicker3.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('public/css/bootstrap-fancyfile.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
//Date picker
|
||||
$('#paid_at').datepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
autoclose: true
|
||||
});
|
||||
|
||||
$("#account_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.accounts', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#category_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.categories', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#vendor_id").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.vendors', 1)]) }}"
|
||||
});
|
||||
|
||||
$("#payment_method").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.payment_methods', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#attachment').fancyfile({
|
||||
text : '{{ trans('general.form.select.file') }}',
|
||||
style : 'btn-default',
|
||||
placeholder : '<?php echo ($payment->attachment) ? $payment->attachment : trans('general.form.no_file_selected'); ?>'
|
||||
});
|
||||
|
||||
$(document).on('change', '#account_id', function (e) {
|
||||
$.ajax({
|
||||
url: '{{ url("settings/currencies/currency") }}',
|
||||
type: 'GET',
|
||||
dataType: 'JSON',
|
||||
data: 'account_id=' + $(this).val(),
|
||||
success: function(data) {
|
||||
$('#currency').val(data.currency_name);
|
||||
$('#currency_code').val(data.currency_code);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
70
resources/views/expenses/payments/index.blade.php
Normal file
70
resources/views/expenses/payments/index.blade.php
Normal file
@@ -0,0 +1,70 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.payments', 2))
|
||||
|
||||
@permission('create-expenses-payments')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('expenses/payments/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'expenses/payments', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::select('category', $categories, request('category'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('categories.all')]) !!}
|
||||
{!! Form::select('account', $accounts, request('account'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('accounts.all')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-payments">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('paid_at', trans('general.date'))</th>
|
||||
<th>@sortablelink('amount', trans('general.amount'))</th>
|
||||
<th>@sortablelink('category.name', trans_choice('general.categories', 1))</th>
|
||||
<th>@sortablelink('account.name', trans_choice('general.accounts', 1))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($payments as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('expenses/payments/' . $item->id . '/edit') }}">{{ Date::parse($item->paid_at)->format($date_format) }}</a></td>
|
||||
<td>@money($item->amount, $item->currency_code, true)</td>
|
||||
<td>{{ $item->category->name }}</td>
|
||||
<td>{{ $item->account->name }}</td>
|
||||
<td>
|
||||
<a href="{{ url('expenses/payments/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-expenses-payments')
|
||||
{!! Form::deleteButton($item, 'expenses/payments') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $payments, 'type' => 'payments'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
53
resources/views/expenses/vendors/create.blade.php
vendored
Normal file
53
resources/views/expenses/vendors/create.blade.php
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.vendors', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'expenses/vendors', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('general.default_currency')) }}
|
||||
|
||||
{{ Form::textGroup('phone', trans('general.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textGroup('website', trans('general.website'), 'globe',[]) }}
|
||||
|
||||
{{ Form::textareaGroup('address', trans('general.address')) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('expenses/vendors') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
54
resources/views/expenses/vendors/edit.blade.php
vendored
Normal file
54
resources/views/expenses/vendors/edit.blade.php
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.vendors', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($vendor, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['expenses/vendors', $vendor->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies) }}
|
||||
|
||||
{{ Form::textGroup('phone', trans('general.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textGroup('website', trans('general.website'), 'globe',[]) }}
|
||||
|
||||
{{ Form::textareaGroup('address', trans('general.address')) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-expenses-vendors')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('expenses/vendors') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
73
resources/views/expenses/vendors/index.blade.php
vendored
Normal file
73
resources/views/expenses/vendors/index.blade.php
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.vendors', 2))
|
||||
|
||||
@permission('create-expenses-vendors')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('expenses/vendors/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'expenses/vendors', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-vendors">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('name', trans('general.name'))</th>
|
||||
<th>@sortablelink('email', trans('general.email'))</th>
|
||||
<th>@sortablelink('phone', trans('general.phone'))</th>
|
||||
<th>@sortablelink('enabled', trans('general.status'))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($vendors as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('expenses/vendors/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
||||
<td>{{ $item->email }}</td>
|
||||
<td>{{ $item->phone }}</td>
|
||||
<td>
|
||||
@if ($item->enabled)
|
||||
<span class="label label-success">{{ trans('general.enabled') }}</span>
|
||||
@else
|
||||
<span class="label label-danger">{{ trans('general.disabled') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url('expenses/vendors/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
@permission('delete-expenses-vendors')
|
||||
{!! Form::deleteButton($item, 'expenses/vendors') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $vendors, 'type' => 'vendors'])
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endsection
|
||||
|
||||
88
resources/views/incomes/customers/create.blade.php
Normal file
88
resources/views/incomes/customers/create.blade.php
Normal file
@@ -0,0 +1,88 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.new', ['type' => trans_choice('general.customers', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::open(['url' => 'incomes/customers', 'role' => 'form']) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies, setting('general.default_currency')) }}
|
||||
|
||||
{{ Form::textGroup('phone', trans('general.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textGroup('website', trans('general.website'), 'globe', []) }}
|
||||
|
||||
{{ Form::textareaGroup('address', trans('general.address')) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
{!! Form::label('create_user', trans('general.create_user'), ['class' => 'control-label']) !!}
|
||||
<br/>
|
||||
<div class="col-md-12">
|
||||
{{ Form::checkbox('create_user', '1') }} {{ trans('general.create_user') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::passwordGroup('password', trans('auth.password.current'), 'key', [], null, 'col-md-6 password hidden') }}
|
||||
|
||||
{{ Form::passwordGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', [], null, 'col-md-6 password hidden') }}
|
||||
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('incomes/customers') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/icheck.min.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/square/green.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#enabled_1').trigger('click');
|
||||
|
||||
$('#name').focus();
|
||||
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#create_user').iCheck({
|
||||
checkboxClass: 'icheckbox_square-green',
|
||||
radioClass: 'iradio_square-green',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
|
||||
$('#create_user').on('ifClicked', function (event) {
|
||||
if ($(this).prop('checked')) {
|
||||
$('.col-md-6.password').addClass('hidden');
|
||||
} else {
|
||||
$('.col-md-6.password').removeClass('hidden');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
93
resources/views/incomes/customers/edit.blade.php
Normal file
93
resources/views/incomes/customers/edit.blade.php
Normal file
@@ -0,0 +1,93 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans('general.title.edit', ['type' => trans_choice('general.customers', 1)]))
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
{!! Form::model($customer, [
|
||||
'method' => 'PATCH',
|
||||
'url' => ['incomes/customers', $customer->id],
|
||||
'role' => 'form'
|
||||
]) !!}
|
||||
|
||||
<div class="box-body">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||
|
||||
{{ Form::textGroup('email', trans('general.email'), 'envelope') }}
|
||||
|
||||
{{ Form::textGroup('tax_number', trans('general.tax_number'), 'percent', []) }}
|
||||
|
||||
{{ Form::selectGroup('currency_code', trans_choice('general.currencies', 1), 'exchange', $currencies) }}
|
||||
|
||||
{{ Form::textGroup('phone', trans('general.phone'), 'phone', []) }}
|
||||
|
||||
{{ Form::textGroup('website', trans('general.website'), 'globe',[]) }}
|
||||
|
||||
{{ Form::textareaGroup('address', trans('general.address')) }}
|
||||
|
||||
{{ Form::radioGroup('enabled', trans('general.enabled')) }}
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
{!! Form::label('create_user', trans('general.create_user'), ['class' => 'control-label']) !!}
|
||||
<br/>
|
||||
<div class="col-md-12">
|
||||
@if ($customer->user_id)
|
||||
{{ Form::checkbox('create_user', '1', 1, array('disabled')) }} {{ trans('general.created_user') }}
|
||||
@else
|
||||
{{ Form::checkbox('create_user', '1') }} {{ trans('general.create_user') }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::textGroup('password', trans('auth.password.current'), 'key', [], null, 'col-md-6 password hidden') }}
|
||||
|
||||
{{ Form::textGroup('password_confirmation', trans('auth.password.current_confirm'), 'key', [], null, 'col-md-6 password hidden') }}
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
|
||||
@permission('update-incomes-customers')
|
||||
<div class="box-footer">
|
||||
{{ Form::saveButtons('incomes/customers') }}
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
@endpermission
|
||||
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script src="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/icheck.min.js') }}"></script>
|
||||
@endsection
|
||||
|
||||
@section('css')
|
||||
<link rel="stylesheet" href="{{ asset('vendor/almasaeed2010/adminlte/plugins/iCheck/square/green.css') }}">
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
var text_yes = '{{ trans('general.yes') }}';
|
||||
var text_no = '{{ trans('general.no') }}';
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#currency_code").select2({
|
||||
placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.currencies', 1)]) }}"
|
||||
});
|
||||
|
||||
$('#create_user').iCheck({
|
||||
checkboxClass: 'icheckbox_square-green',
|
||||
radioClass: 'iradio_square-green',
|
||||
increaseArea: '20%' // optional
|
||||
});
|
||||
|
||||
$('#create_user').on('ifClicked', function (event) {
|
||||
if ($(this).prop('checked')) {
|
||||
$('.col-md-6.password').addClass('hidden');
|
||||
} else {
|
||||
$('.col-md-6.password').removeClass('hidden');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
75
resources/views/incomes/customers/index.blade.php
Normal file
75
resources/views/incomes/customers/index.blade.php
Normal file
@@ -0,0 +1,75 @@
|
||||
@extends('layouts.admin')
|
||||
|
||||
@section('title', trans_choice('general.customers', 2))
|
||||
|
||||
@permission('create-incomes-customers')
|
||||
@section('new_button')
|
||||
<span class="new-button"><a href="{{ url('incomes/customers/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||
@endsection
|
||||
@endpermission
|
||||
|
||||
@section('content')
|
||||
<!-- Default box -->
|
||||
<div class="box box-success">
|
||||
<div class="box-header">
|
||||
{!! Form::open(['url' => 'incomes/customers', 'role' => 'form', 'method' => 'GET']) !!}
|
||||
<div class="pull-left">
|
||||
<span class="title-filter">{{ trans('general.search') }}:</span>
|
||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||
{!! Form::button('<span class="fa fa-filter"></span> ' . trans('general.filter'), ['type' => 'submit', 'class' => 'btn btn-sm btn-default btn-filter']) !!}
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<span class="title-filter">{{ trans('general.show') }}:</span>
|
||||
{!! Form::select('limit', $limits, request('limit', setting('general.list_limit', '25')), ['class' => 'form-control input-filter input-sm', 'onchange' => 'this.form.submit()']) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover" id="tbl-customers">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@sortablelink('name', trans('general.name'))</th>
|
||||
<th>@sortablelink('email', trans('general.email'))</th>
|
||||
<th>@sortablelink('phone', trans('general.phone'))</th>
|
||||
<th>@sortablelink('enabled', trans('general.status'))</th>
|
||||
<th style="width: 15%;">{{ trans('general.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($customers as $item)
|
||||
<tr>
|
||||
<td><a href="{{ url('incomes/customers/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
||||
<td>{{ $item->email }}</td>
|
||||
<td>{{ $item->phone }}</td>
|
||||
<td>
|
||||
@if ($item->enabled)
|
||||
<span class="label label-success">{{ trans('general.enabled') }}</span>
|
||||
@else
|
||||
<span class="label label-danger">{{ trans('general.disabled') }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url('incomes/customers/' . $item->id . '/edit') }}" class="btn btn-primary btn-xs"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{ trans('general.edit') }}</a>
|
||||
|
||||
@permission('delete-incomes-customers')
|
||||
{!! Form::deleteButton($item, 'incomes/customers') !!}
|
||||
@endpermission
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
@include('partials.admin.pagination', ['items' => $customers, 'type' => 'customers'])
|
||||
</div>
|
||||
<!-- /.box-footer -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user