Compare commits

..

16 Commits
4.0.3 ... 4.0.4

Author SHA1 Message Date
b7370ed85c update version on migration 2021-01-22 14:49:05 +05:30
818f2fbaf7 build 404 2021-01-22 14:27:30 +05:30
91a1dbf91c new build 2021-01-22 14:17:08 +05:30
a4d556f41e fix tax rounding issues 2021-01-22 14:15:44 +05:30
83de1c47ee fix tax rounding errors and styling issues 2021-01-22 13:44:59 +05:30
678ace744a fix purgecss issue and insert-note z-index 2021-01-22 12:00:10 +05:30
9e26fee1b0 upgrade tailwind 2021-01-21 18:31:11 +05:30
e455c3de50 Merge branch 'date-issue' into 'master'
solve date issue

See merge request mohit.panjvani/crater-web!665
2021-01-15 10:17:51 +00:00
c4db50d3f0 Merge branch 'logo-issue' into 'master'
fix logo display issue

See merge request mohit.panjvani/crater-web!664
2021-01-15 10:16:28 +00:00
411ee57946 solve date issue 2021-01-15 14:26:35 +05:30
9c5e9e56f5 fix logo display issue 2021-01-15 14:22:42 +05:30
8eeafd3fed fix tailwind-v2 issues 2021-01-06 21:12:22 +05:30
ed978d0174 upgrade tailwind version and laravel-mix 2021-01-06 14:18:41 +05:30
607b1795bb Merge branch 'discount-issue' into 'master'
fix total discount issue

See merge request mohit.panjvani/crater-web!655
2021-01-06 06:58:07 +00:00
ead0ebb012 fix note button z-index issue 2021-01-04 11:43:00 +05:30
8b04e94446 fix total discount issue 2020-12-24 13:43:29 +05:30
52 changed files with 2018 additions and 15037 deletions

View File

@ -22,10 +22,17 @@ class Company extends Model implements HasMedia
public function getLogoAttribute()
{
$logo = $this->getMedia('logo')->first();
$isSystem = FileDisk::whereSetAsDefault(true)->first()->isSystem();
if ($logo) {
return asset($logo->getUrl());
if ($isSystem) {
return $logo->getPath();
} else {
return $logo->getFullUrl();
}
}
return ;
return null;
}
public function user()

View File

@ -33,9 +33,7 @@ class Estimate extends Model implements HasMedia
protected $dates = [
'created_at',
'updated_at',
'deleted_at',
'estimate_date',
'expiry_date'
'deleted_at'
];
protected $appends = [
@ -428,16 +426,7 @@ class Estimate extends Model implements HasMedia
$estimateTemplate = EstimateTemplate::find($this->estimate_template_id);
$company = Company::find($this->company_id);
$logo = $company->getMedia('logo')->first();
$isSystem = FileDisk::whereSetAsDefault(true)->first()->isSystem();
$isLocalhost = config('session.domain') === 'localhost';
if ($logo && $isLocalhost && $isSystem) {
$logo = $logo->getPath();
} else if ($logo) {
$logo = $logo->getFullUrl();
}
$logo = $company->logo;
view()->share([
'estimate' => $this,

View File

@ -39,9 +39,7 @@ class Invoice extends Model implements HasMedia
protected $dates = [
'created_at',
'updated_at',
'deleted_at',
'invoice_date',
'due_date'
'deleted_at'
];
protected $casts = [
@ -512,16 +510,7 @@ class Invoice extends Model implements HasMedia
$company = Company::find($this->company_id);
$logo = $company->getMedia('logo')->first();
$isSystem = FileDisk::whereSetAsDefault(true)->first()->isSystem();
$isLocalhost = config('session.domain') === 'localhost';
if ($logo && $isLocalhost && $isSystem) {
$logo = $logo->getPath();
} else if ($logo) {
$logo = $logo->getFullUrl();
}
$logo = $company->logo;
view()->share([
'invoice' => $this,

View File

@ -31,7 +31,7 @@ class Payment extends Model implements HasMedia
const PAYMENT_MODE_CREDIT_CARD = 'CREDIT_CARD';
const PAYMENT_MODE_BANK_TRANSFER = 'BANK_TRANSFER';
protected $dates = ['created_at', 'updated_at', 'payment_date'];
protected $dates = ['created_at', 'updated_at'];
protected $guarded = ['id'];
@ -373,16 +373,7 @@ class Payment extends Model implements HasMedia
{
$company = Company::find($this->company_id);
$logo = $company->getMedia('logo')->first();
$isSystem = FileDisk::whereSetAsDefault(true)->first()->isSystem();
$isLocalhost = config('session.domain') === 'localhost';
if ($logo && $isLocalhost && $isSystem) {
$logo = $logo->getPath();
} else if($logo) {
$logo = $logo->getFullUrl();
}
$logo = $company->logo;
view()->share([
'payment' => $this,

View File

@ -0,0 +1,29 @@
<?php
use Crater\Models\Setting;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class UpdateCraterVersion404 extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Setting::setSetting('version', '4.0.4');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

13055
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,49 +1,50 @@
{
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"babel-eslint": "^8.2.6",
"cross-env": "^5.1",
"eslint": "^4.19.1",
"eslint-config-prettier": "^6.15.0",
"eslint-loader": "^3.0.4",
"eslint-plugin-prettier": "^3.3.0",
"eslint-plugin-vue": "^4.7.1",
"laravel-mix": "^5.0.7",
"prettier": "^2.2.1",
"resolve-url-loader": "3.1.0",
"sass": "^1.29.0",
"sass-loader": "^8.0.2",
"tailwindcss-plugins": "^0.3.0",
"vue-template-compiler": "^2.6.10"
},
"dependencies": {
"@bytefury/spacewind": "^0.3.3",
"@vue-hero-icons/outline": "^1.6.3",
"@vue-hero-icons/solid": "^1.6.3",
"axios": "^0.19",
"chart.js": "^2.7.3",
"guid": "0.0.12",
"lodash": "^4.17.13",
"moment": "^2.29.1",
"sweet-modal-vue": "^2.0.0",
"sweetalert": "^2.1.2",
"tailwindcss": "^1.9.1",
"toastr": "^2.1.4",
"v-tooltip": "^2.0.2",
"vue": "^2.6.10",
"vue-i18n": "^8.22.0",
"vue-loader": "^15.9.3",
"vue-router": "2.7.0",
"vue2-transitions": "^0.3.0",
"vuedraggable": "^2.24.2",
"vuelidate": "^0.6.2",
"vuex": "^3.0.1"
}
"private": true,
"scripts": {
"dev": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"production": "mix --production"
},
"devDependencies": {
"babel-eslint": "^8.2.6",
"cross-env": "^5.1",
"eslint": "^4.19.1",
"eslint-config-prettier": "^6.15.0",
"eslint-loader": "^3.0.4",
"eslint-plugin-prettier": "^3.3.0",
"eslint-plugin-vue": "^4.7.1",
"laravel-mix": "^6.0.6",
"postcss": "^8.1",
"prettier": "^2.2.1",
"resolve-url-loader": "3.1.0",
"sass": "^1.29.0",
"sass-loader": "^8.0.2",
"tailwindcss-plugins": "^0.3.0",
"vue-template-compiler": "^2.6.10"
},
"dependencies": {
"@bytefury/spacewind": "^0.5.0",
"@vue-hero-icons/outline": "^1.6.3",
"@vue-hero-icons/solid": "^1.6.3",
"axios": "^0.19",
"chart.js": "^2.7.3",
"guid": "0.0.12",
"lodash": "^4.17.13",
"moment": "^2.29.1",
"sweet-modal-vue": "^2.0.0",
"sweetalert": "^2.1.2",
"tailwindcss": "^2.0.1",
"toastr": "^2.1.4",
"v-tooltip": "^2.0.2",
"vue": "^2.6.10",
"vue-i18n": "^8.22.0",
"vue-loader": "^15.9.3",
"vue-router": "2.7.0",
"vue2-transitions": "^0.3.0",
"vuedraggable": "^2.24.2",
"vuelidate": "^0.6.2",
"vuex": "^3.0.1"
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,24 +1,24 @@
/*!
* tiptap v1.29.6
* (c) 2020 überdosis GbR (limited liability)
* tiptap v1.30.0
* (c) 2021 überdosis GbR (limited liability)
* @license MIT
*/
/*!
* tiptap-commands v1.14.6
* (c) 2020 überdosis GbR (limited liability)
* tiptap-commands v1.15.0
* (c) 2021 überdosis GbR (limited liability)
* @license MIT
*/
/*!
* tiptap-extensions v1.33.1
* (c) 2020 überdosis GbR (limited liability)
* tiptap-extensions v1.33.2
* (c) 2021 überdosis GbR (limited liability)
* @license MIT
*/
/*!
* tiptap-utils v1.10.4
* (c) 2020 überdosis GbR (limited liability)
* tiptap-utils v1.11.0
* (c) 2021 überdosis GbR (limited liability)
* @license MIT
*/
@ -67,13 +67,6 @@
* Date: 2020-03-14
*/
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
/*!
* Vue.js v2.6.12
* (c) 2014-2020 Evan You
@ -94,6 +87,12 @@
* Date: 2020-05-04T22:49Z
*/
/*!
* vue-i18n v8.22.2
* (c) 2020 kazuya kawaguchi
* Released under the MIT License.
*/
/*!
* vue2-transitions v0.3.0
* (c) 2019-present cristij <joracristi@gmail.com>
@ -108,18 +107,6 @@
/*! For license information please see index.js.LICENSE.txt */
/*! https://mths.be/punycode v1.4.1 by @mathias */
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
/**
* vue-router v2.7.0
* (c) 2017 Evan You
* @license MIT
*/
/**
* @license
* Lodash <https://lodash.com/>

View File

@ -1,4 +1,4 @@
{
"/assets/js/app.js": "/assets/js/app.js?id=311e432a0e58e62c984f",
"/assets/css/crater.css": "/assets/css/crater.css?id=912348e74f68a41a1b35"
"/assets/js/app.js": "/assets/js/app.js?id=2fe48b55fc5693cab09f",
"/assets/css/crater.css": "/assets/css/crater.css?id=7a822f915d7e413148f6"
}

View File

@ -3,6 +3,7 @@
* include Vue and Vue Resource. This gives a great starting point for
* building robust, powerful web applications using Vue and Laravel.
*/
import Vue from 'vue'
import router from './router.js'
import store from './store/index'
import utils from './helpers/utilities'
@ -11,7 +12,7 @@ import swal from 'sweetalert'
require('./bootstrap')
window.Vue.prototype.$utils = utils
Vue.prototype.$utils = utils
/**
* Next, we will create a fresh Vue application instance and attach it to

View File

@ -25,13 +25,6 @@ Vue.use(Vuelidate)
Vue.use(Transitions)
window._ = require('lodash')
/**
* Vue is a modern JavaScript library for building interactive web interfaces
* using reactive data binding and reusable components. Vue's API is clean
* and simple, leaving you to focus on building your next great project.
*/
window.Vue = require('vue')
/**
* Custom Directives
@ -97,7 +90,8 @@ global.axios.interceptors.response.use(undefined, function (err) {
}
if (!err.response) {
window.toastr['error'](
'Please check your internet connection or wait until servers are back online', 'Network Error'
'Please check your internet connection or wait until servers are back online',
'Network Error'
)
} else {
if (
@ -121,7 +115,8 @@ global.axios.interceptors.response.use(undefined, function (err) {
window.toastr['error'](
err.response.data.message
? err.response.data.message
: err.response.data || 'Unknown error occurred', 'Error'
: err.response.data || 'Unknown error occurred',
'Error'
)
}
}

View File

@ -1,3 +1,5 @@
import Vue from 'vue'
import BaseModal from './modal/BaseModal.vue'
import BaseLoader from './BaseLoader.vue'
import BaseCustomerSelect from './BaseCustomerSelect.vue'

View File

@ -12,7 +12,7 @@ export default {
disabledMultiSelectTags: 'bg-gray-200 text-gray-400',
multiselectTagsWrap: 'multiselect__tags-wrap inline',
multiselectTag:
'multiselect__tag relative inline-block pt-1 pr-6 pb-1 pl-2 rounded mr-2 text-white leading-none mb-1 whitespace-no-wrap overflow-hidden max-w-full',
'multiselect__tag relative inline-block pt-1 pr-6 pb-1 pl-2 rounded mr-2 text-white leading-none mb-1 whitespace-nowrap overflow-hidden max-w-full',
multiselectTagIcon:
'multiselect__tag-icon cursor-pointer ml-2 absolute right-0 top-0 bottom-0 font-bold w-5 text-center leading-5 delay-200 transition-all ease-linear rounded',
multiselectStrong: 'mb-2 leading-5 inline-block align-top',
@ -26,6 +26,6 @@ export default {
multiselectContent:
'multiselect__content list-none inline-block p-0 m-0 min-w-full align-top',
multiselectOption:
'multiselect__option block p-3 no-underline leading-4 normal-case align-middle relative cursor-pointer whitespace-no-wrap text-sm',
'multiselect__option block p-3 no-underline leading-4 normal-case align-middle relative cursor-pointer whitespace-nowrap text-sm',
multiselectElement: 'multiselect__element block',
}

View File

@ -13,4 +13,10 @@ export default {
'inline-flex items-center justify-center text-black transition px-2 duration-150 ease-in-out border border-gray-300 border-solid focus:outline-none bg-white',
},
},
sizes: {
discount: {
button: 'py-2 px-2 text-sm leading-5 rounded',
loadingIcon: 'w-4 h-4 -ml-2',
},
},
}

View File

@ -6,7 +6,7 @@ export default {
itemContainer:
'z-10 p-2 max-h-60 text-base text-left list-none rounded border-0 shadow bg-white text-black overflow-auto sw-scroll',
item:
'flex p-2 text-sm font-light text-left text-black bg-transparent rounded cursor-pointer none hover:bg-gray-200 whitespace-no-wrap',
'flex p-2 text-sm font-light text-left text-black bg-transparent rounded cursor-pointer none hover:bg-gray-200 whitespace-nowrap',
itemIcon: 'w-5 h-5 mr-3 text-secondary',
},
variants: {
@ -16,7 +16,7 @@ export default {
divider:
'border-t border-solid border-gray-200 my-2 mx-0 overflow-hidden',
item:
'flex p-0 text-sm font-light text-left text-black bg-transparent rounded cursor-pointer none hover:bg-gray-200 whitespace-no-wrap',
'flex p-0 text-sm font-light text-left text-black bg-transparent rounded cursor-pointer none hover:bg-gray-200 whitespace-nowrap',
itemContainer:
'z-10 p-2 text-base text-left list-none rounded border-0 shadow bg-white text-black',
itemIcon: 'w-5 h-5 mr-3 text-secondary',

View File

@ -1,3 +1,5 @@
import Vue from 'vue'
Vue.directive('click-outside', {
bind: function (el, binding, vnode) {
el.event = function (event) {
@ -17,7 +19,9 @@ Vue.directive('click-outside', {
Vue.directive('autoresize', {
inserted: function (el) {
el.style.height = el.scrollHeight + 'px'
el.style.overflow.y = 'hidden'
if (el.style.overflow && el.style.overflow.y) {
el.style.overflow.y = 'hidden'
}
el.style.resize = 'none'
function OnInput() {
this.style.height = 'auto'

View File

@ -2,10 +2,10 @@
<base-page class="customer-create">
<sw-page-header :title="$t('customers.title')">
<sw-breadcrumb slot="breadcrumbs">
<sw-breadcrumb-item to="dashboard" :title="$t('general.home')" />
<sw-breadcrumb-item :title="$t('general.home')" to="dashboard" />
<sw-breadcrumb-item
to="#"
:title="$tc('customers.customer', 2)"
to="#"
active
/>
</sw-breadcrumb>
@ -159,7 +159,7 @@
:filterable="false"
cell-class="no-click"
>
<div class="relative block" slot-scope="row">
<div slot-scope="row" class="relative block">
<sw-checkbox
:id="row.id"
v-model="selectField"
@ -243,16 +243,16 @@
<dot-icon slot="activator" />
<sw-dropdown-item
tag-name="router-link"
:to="`customers/${row.id}/edit`"
tag-name="router-link"
>
<pencil-icon class="h-5 mr-3 text-gray-600" />
{{ $t('general.edit') }}
</sw-dropdown-item>
<sw-dropdown-item
tag-name="router-link"
:to="`customers/${row.id}/view`"
tag-name="router-link"
>
<eye-icon class="h-5 mr-3 text-gray-600" />
{{ $t('general.view') }}
@ -281,7 +281,6 @@ import {
EyeIcon,
} from '@vue-hero-icons/solid'
import AstronautIcon from '../../components/icon/AstronautIcon'
import { request } from 'http'
export default {
components: {

View File

@ -35,10 +35,10 @@
<sw-dropdown-item class="flex cursor-pointer">
<sw-input-group class="-mt-3 font-normal">
<sw-radio
:label="$t('customers.create_date')"
size="sm"
id="filter_create_date"
:label="$t('customers.create_date')"
v-model="searchData.orderByField"
size="sm"
name="filter"
value="invoices.created_at"
@change="onSearch"
@ -49,10 +49,10 @@
<sw-dropdown-item class="flex cursor-pointer">
<sw-input-group class="-mt-3 font-normal">
<sw-radio
:label="$t('customers.display_name')"
size="sm"
id="filter_display_name"
:label="$t('customers.display_name')"
v-model="searchData.orderByField"
size="sm"
name="filter"
value="users.name"
@change="onSearch"
@ -62,8 +62,8 @@
</sw-dropdown>
<sw-button
class="ml-1"
v-tooltip.top-center="{ content: getOrderName }"
class="ml-1"
size="md"
variant="gray-light"
@click="sortData"
@ -102,13 +102,13 @@
{{ customer.name }}
</div>
<div
class="mt-1 text-xs not-italic font-medium leading-5 text-gray-600"
v-if="customer.contact_name"
class="mt-1 text-xs not-italic font-medium leading-5 text-gray-600"
>
{{ customer.contact_name }}
</div>
</div>
<div class="flex-1 whitespace-no-wrap right">
<div class="flex-1 whitespace-nowrap right">
<div
class="text-xl not-italic font-semibold leading-8 text-right text-gray-900"
v-html="$utils.formatMoney(customer.due_amount, customer.currency)"

View File

@ -9,7 +9,7 @@
{{ $t('general.you_got_lost') }}
</h5>
<router-link
class="flex items-center w-32 h-12 px-2 py-1 text-base font-medium leading-none text-center text-white whitespace-no-wrap rounded bg-primary-500 btn-lg hover:text-white"
class="flex items-center w-32 h-12 px-2 py-1 text-base font-medium leading-none text-center text-white whitespace-nowrap rounded bg-primary-500 btn-lg hover:text-white"
to="/admin/dashboard"
>
<arrow-left-icon class="mr-2 text-white icon" />

View File

@ -218,7 +218,7 @@
<div class="mb-6">
<sw-popup
ref="notePopup"
class="text-sm font-semibold leading-5 text-primary-400"
class="z-10 text-sm font-semibold leading-5 text-primary-400"
>
<div slot="activator" class="float-right mt-1">
+ {{ $t('general.insert_note') }}
@ -322,8 +322,8 @@
<sw-button
slot="activator"
type="button"
class="flex items-center justify-center w-12 border border-gray-300 border-solid rounded-tl-none rounded-bl-none font-base"
data-toggle="dropdown"
size="discount"
aria-haspopup="true"
aria-expanded="false"
style="height: 43px"
@ -954,12 +954,15 @@ export default {
let amount = 0
if (selectedTax.compound_tax && this.subtotalWithDiscount) {
amount =
amount = Math.round(
((this.subtotalWithDiscount + this.totalSimpleTax) *
selectedTax.percent) /
100
100
)
} else if (this.subtotalWithDiscount && selectedTax.percent) {
amount = (this.subtotalWithDiscount * selectedTax.percent) / 100
amount = Math.round(
(this.subtotalWithDiscount * selectedTax.percent) / 100
)
}
this.newEstimate.taxes.push({
@ -972,7 +975,7 @@ export default {
amount,
})
if (this.$$refs) {
if (this.$refs) {
this.$refs.taxModal.close()
}
},

View File

@ -25,7 +25,7 @@
<div v-if="selectedCustomer.billing_address">
<div class="flex flex-col">
<label
class="mb-1 text-sm font-medium text-gray-500 uppercase whitespace-no-wrap"
class="mb-1 text-sm font-medium text-gray-500 uppercase whitespace-nowrap"
>
{{ $t('general.bill_to') }}
</label>
@ -77,7 +77,7 @@
<div v-if="selectedCustomer.shipping_address">
<div class="flex flex-col">
<label
class="mb-1 text-sm font-medium text-gray-500 uppercase whitespace-no-wrap"
class="mb-1 text-sm font-medium text-gray-500 uppercase whitespace-nowrap"
>
{{ $t('general.ship_to') }}
</label>

View File

@ -45,11 +45,13 @@ export default {
computed: {
taxAmount() {
if (this.tax.compound_tax && this.total) {
return ((this.total + this.totalTax) * this.tax.percent) / 100
return Math.round(
((this.total + this.totalTax) * this.tax.percent) / 100
)
}
if (this.total && this.tax.percent) {
return (this.total * this.tax.percent) / 100
return Math.round((this.total * this.tax.percent) / 100)
}
return 0

View File

@ -85,9 +85,10 @@
slot="activator"
type="button"
data-toggle="dropdown"
size="discount"
aria-haspopup="true"
aria-expanded="false"
style="height: 43px; padding: 6px"
style="height: 43px"
variant="white"
>
<span class="flex">
@ -266,22 +267,26 @@ export default {
return this.subtotal - this.item.discount_val
},
totalSimpleTax() {
return window._.sumBy(this.item.taxes, function (tax) {
if (!tax.compound_tax) {
return tax.amount
}
return Math.round(
window._.sumBy(this.item.taxes, function (tax) {
if (!tax.compound_tax) {
return tax.amount
}
return 0
})
return 0
})
)
},
totalCompoundTax() {
return window._.sumBy(this.item.taxes, function (tax) {
if (tax.compound_tax) {
return tax.amount
}
return Math.round(
window._.sumBy(this.item.taxes, function (tax) {
if (tax.compound_tax) {
return tax.amount
}
return 0
})
return 0
})
)
},
totalTax() {
return this.totalSimpleTax + this.totalCompoundTax

View File

@ -32,8 +32,8 @@
</sw-dropdown-item>
<sw-dropdown-item
tag-name="router-link"
:to="`/admin/estimates/${$route.params.id}/edit`"
tag-name="router-link"
>
<pencil-icon class="h-5 mr-3 text-primary-800" />
{{ $t('general.edit') }}
@ -96,8 +96,8 @@
<sw-radio
id="filter_due_date"
v-model="searchData.orderByField"
value="expiry_date"
:label="$t('estimates.due_date')"
value="expiry_date"
size="sm"
name="filter"
@change="onSearched"
@ -110,8 +110,8 @@
<sw-radio
id="filter_estimate_number"
v-model="searchData.orderByField"
value="estimate_number"
:label="$t('estimates.estimate_number')"
value="estimate_number"
size="sm"
name="filter"
@change="onSearched"
@ -121,8 +121,8 @@
</sw-dropdown>
<sw-button
class="ml-1"
v-tooltip.top-center="{ content: getOrderName }"
class="ml-1"
size="md"
variant="gray-light"
@click="sortData"
@ -168,15 +168,15 @@
</div>
<sw-badge
class="px-1 text-xs"
:bg-color="$utils.getBadgeStatusColor(estimate.status).bgColor"
:color="$utils.getBadgeStatusColor(estimate.status).color"
class="px-1 text-xs"
>
{{ estimate.status }}
</sw-badge>
</div>
<div class="flex-1 whitespace-no-wrap right">
<div class="flex-1 whitespace-nowrap right">
<div
class="mb-2 text-xl not-italic font-semibold leading-8 text-right text-gray-900"
v-html="

View File

@ -211,7 +211,7 @@
<div class="mb-6">
<sw-popup
ref="notePopup"
class="text-sm font-semibold leading-5 text-primary-400"
class="z-10 text-sm font-semibold leading-5 text-primary-400"
>
<div slot="activator" class="float-right mt-1">
+ {{ $t('general.insert_note') }}
@ -315,8 +315,8 @@
<sw-button
slot="activator"
type="button"
class="flex items-center justify-center w-12 border border-gray-300 border-solid rounded-tl-none rounded-bl-none font-base"
data-toggle="dropdown"
size="discount"
aria-haspopup="true"
aria-expanded="false"
style="height: 43px"
@ -565,23 +565,27 @@ export default {
},
totalSimpleTax() {
return window._.sumBy(this.newInvoice.taxes, function (tax) {
if (!tax.compound_tax) {
return tax.amount
}
return Math.round(
window._.sumBy(this.newInvoice.taxes, function (tax) {
if (!tax.compound_tax) {
return tax.amount
}
return 0
})
return 0
})
)
},
totalCompoundTax() {
return window._.sumBy(this.newInvoice.taxes, function (tax) {
if (tax.compound_tax) {
return tax.amount
}
return Math.round(
window._.sumBy(this.newInvoice.taxes, function (tax) {
if (tax.compound_tax) {
return tax.amount
}
return 0
})
return 0
})
)
},
totalTax() {
@ -589,9 +593,11 @@ export default {
return this.totalSimpleTax + this.totalCompoundTax
}
return window._.sumBy(this.newInvoice.items, function (tax) {
return tax.tax
})
return Math.round(
window._.sumBy(this.newInvoice.items, function (tax) {
return tax.tax
})
)
},
allTaxes() {
@ -951,12 +957,15 @@ export default {
let amount = 0
if (selectedTax.compound_tax && this.subtotalWithDiscount) {
amount =
amount = Math.round(
((this.subtotalWithDiscount + this.totalSimpleTax) *
selectedTax.percent) /
100
100
)
} else if (this.subtotalWithDiscount && selectedTax.percent) {
amount = (this.subtotalWithDiscount * selectedTax.percent) / 100
amount = Math.round(
(this.subtotalWithDiscount * selectedTax.percent) / 100
)
}
this.newInvoice.taxes.push({

View File

@ -27,7 +27,7 @@
<div v-if="selectedCustomer.billing_address">
<div class="flex flex-col">
<label
class="mb-1 text-sm font-medium text-gray-500 uppercase whitespace-no-wrap"
class="mb-1 text-sm font-medium text-gray-500 uppercase whitespace-nowrap"
>
{{ $t('general.bill_to') }}
</label>
@ -79,7 +79,7 @@
<div v-if="selectedCustomer.shipping_address" class="col col-6">
<div class="flex flex-col">
<label
class="mb-1 text-sm font-medium text-gray-500 uppercase whitespace-no-wrap"
class="mb-1 text-sm font-medium text-gray-500 uppercase whitespace-nowrap"
>
{{ $t('general.ship_to') }}
</label>

View File

@ -45,11 +45,13 @@ export default {
computed: {
taxAmount() {
if (this.tax.compound_tax && this.total) {
return ((this.total + this.totalTax) * this.tax.percent) / 100
return Math.round(
((this.total + this.totalTax) * this.tax.percent) / 100
)
}
if (this.total && this.tax.percent) {
return (this.total * this.tax.percent) / 100
return Math.round((this.total * this.tax.percent) / 100)
}
return 0

View File

@ -83,8 +83,8 @@
<sw-button
slot="activator"
type="button"
class="flex items-center px-5 py-1 text-sm font-medium leading-none text-center text-gray-500 whitespace-no-wrap border border-gray-300 border-solid rounded rounded-tl-none rounded-bl-none dropdown-toggle"
data-toggle="dropdown"
size="discount"
aria-haspopup="true"
aria-expanded="false"
style="height: 43px"
@ -266,22 +266,26 @@ export default {
return this.subtotal - this.item.discount_val
},
totalSimpleTax() {
return window._.sumBy(this.item.taxes, function (tax) {
if (!tax.compound_tax) {
return tax.amount
}
return Math.round(
window._.sumBy(this.item.taxes, function (tax) {
if (!tax.compound_tax) {
return tax.amount
}
return 0
})
return 0
})
)
},
totalCompoundTax() {
return window._.sumBy(this.item.taxes, function (tax) {
if (tax.compound_tax) {
return tax.amount
}
return Math.round(
window._.sumBy(this.item.taxes, function (tax) {
if (tax.compound_tax) {
return tax.amount
}
return 0
})
return 0
})
)
},
totalTax() {
return this.totalSimpleTax + this.totalCompoundTax

View File

@ -105,11 +105,13 @@ export default {
},
taxAmount() {
if (this.tax.compound_tax && this.total) {
return ((this.total + this.totalTax) * this.tax.percent) / 100
return Math.round(
((this.total + this.totalTax) * this.tax.percent) / 100
)
}
if (this.total && this.tax.percent) {
return (this.total * this.tax.percent) / 100
return Math.round((this.total * this.tax.percent) / 100)
}
return 0

View File

@ -27,8 +27,8 @@
invoice.status === 'OVERDUE' ||
invoice.status === 'VIEWED'
"
tag-name="router-link"
:to="`/admin/payments/${$route.params.id}/create`"
tag-name="router-link"
variant="primary"
class="text-sm"
>
@ -45,8 +45,8 @@
</sw-dropdown-item>
<sw-dropdown-item
tag-name="router-link"
:to="`/admin/invoices/${$route.params.id}/edit`"
tag-name="router-link"
>
<pencil-icon class="h-5 mr-3 text-gray-600" />
{{ $t('general.edit') }}
@ -125,10 +125,10 @@
<sw-radio
id="filter_invoice_number"
v-model="searchData.orderByField"
:label="$t('invoices.invoice_number')"
size="sm"
type="radio"
name="filter"
:label="$t('invoices.invoice_number')"
value="invoice_number"
@change="onSearch"
/>
@ -137,8 +137,8 @@
</sw-dropdown>
<sw-button
class="ml-1"
v-tooltip.top-center="{ content: getOrderName }"
class="ml-1"
size="md"
variant="gray-light"
@click="sortData"
@ -184,16 +184,16 @@
</div>
<sw-badge
class="px-1 text-xs"
:bg-color="$utils.getBadgeStatusColor(invoice.status).bgColor"
:color="$utils.getBadgeStatusColor(invoice.status).color"
:font-size="$utils.getBadgeStatusColor(invoice.status).fontSize"
class="px-1 text-xs"
>
{{ invoice.status }}
</sw-badge>
</div>
<div class="flex-1 whitespace-no-wrap right">
<div class="flex-1 whitespace-nowrap right">
<div
class="mb-2 text-xl not-italic font-semibold leading-8 text-right text-gray-900"
v-html="

View File

@ -20,8 +20,8 @@
</sw-dropdown-item>
<sw-dropdown-item
tag-name="router-link"
:to="`/admin/payments/${$route.params.id}/edit`"
tag-name="router-link"
>
<pencil-icon class="h-5 mr-3 text-gray-600" />
{{ $t('general.edit') }}
@ -68,10 +68,10 @@
<sw-dropdown-item class="flex cursor-pointer">
<sw-input-group class="-mt-3 font-normal">
<sw-radio
:label="$t('invoices.title')"
size="sm"
id="filter_invoice_number"
:label="$t('invoices.title')"
v-model="searchData.orderByField"
size="sm"
name="filter"
value="invoice_number"
@change="onSearch"
@ -82,10 +82,10 @@
<sw-dropdown-item class="flex cursor-pointer">
<sw-input-group class="-mt-3 font-normal">
<sw-radio
:label="$t('payments.date')"
size="sm"
id="filter_payment_date"
:label="$t('payments.date')"
v-model="searchData.orderByField"
size="sm"
name="filter"
value="payment_date"
@change="onSearch"
@ -109,8 +109,8 @@
</sw-dropdown>
<sw-button
class="ml-1"
v-tooltip.top-center="{ content: getOrderName }"
class="ml-1"
size="md"
variant="gray-light"
@click="sortData"
@ -162,7 +162,7 @@
</div>
</div>
<div class="flex-1 whitespace-no-wrap right">
<div class="flex-1 whitespace-nowrap right">
<div
class="mb-2 text-xl not-italic font-semibold leading-8 text-right text-gray-900"
v-html="$utils.formatMoney(payment.amount, payment.user.currency)"

View File

@ -65,7 +65,7 @@
/>
<a
class="flex items-center justify-center h-10 px-5 py-1 text-sm font-medium leading-none text-center text-white whitespace-no-wrap rounded md:hidden bg-primary-500"
class="flex items-center justify-center h-10 px-5 py-1 text-sm font-medium leading-none text-center text-white whitespace-nowrap rounded md:hidden bg-primary-500"
@click="viewReportsPDF"
>
<document-text-icon />

View File

@ -67,7 +67,7 @@
/>
<a
class="flex items-center justify-center h-10 px-5 py-1 text-sm font-medium leading-none text-center text-white whitespace-no-wrap rounded md:hidden bg-primary-500"
class="flex items-center justify-center h-10 px-5 py-1 text-sm font-medium leading-none text-center text-white whitespace-nowrap rounded md:hidden bg-primary-500"
@click="viewReportsPDF"
>
<document-text-icon />

View File

@ -79,7 +79,7 @@
class="hidden w-full h-screen border-gray-100 border-solid rounded md:flex"
/>
<a
class="flex items-center justify-center h-10 px-5 py-1 text-sm font-medium leading-none text-center text-white whitespace-no-wrap rounded md:hidden bg-primary-500"
class="flex items-center justify-center h-10 px-5 py-1 text-sm font-medium leading-none text-center text-white whitespace-nowrap rounded md:hidden bg-primary-500"
@click="viewReportsPDF"
>
<document-text-icon />

View File

@ -61,7 +61,7 @@
class="hidden w-full h-screen border-gray-100 border-solid rounded md:flex"
/>
<a
class="flex items-center justify-center h-10 px-5 py-1 text-sm font-medium leading-none text-center text-white whitespace-no-wrap rounded md:hidden bg-primary-500"
class="flex items-center justify-center h-10 px-5 py-1 text-sm font-medium leading-none text-center text-white whitespace-nowrap rounded md:hidden bg-primary-500"
@click="viewReportsPDF"
>
<document-text-icon />

View File

@ -1,7 +1,7 @@
<template>
<div class="relative setting-main-container backup">
<sw-card variant="setting-card">
<div slot="header" class="flex flex-wrap justify-between lg:flex-no-wrap">
<div slot="header" class="flex flex-wrap justify-between lg:flex-nowrap">
<div>
<h6 class="sw-section-title">
{{ $tc('settings.backup.title', 1) }}

View File

@ -1,6 +1,6 @@
<template>
<sw-card variant="setting-card">
<div slot="header" class="flex flex-wrap justify-between lg:flex-no-wrap">
<div slot="header" class="flex flex-wrap justify-between lg:flex-nowrap">
<div>
<h6 class="sw-section-title">
{{ $t('settings.menu_title.custom_fields') }}

View File

@ -1,6 +1,6 @@
<template>
<sw-card variant="setting-card">
<div slot="header" class="flex flex-wrap justify-between lg:flex-no-wrap">
<div slot="header" class="flex flex-wrap justify-between lg:flex-nowrap">
<div>
<h6 class="sw-section-title">
{{ $t('settings.expense_category.title') }}
@ -51,7 +51,7 @@
}}</span>
<div class="w-48 overflow-hidden notes">
<div
class="overflow-hidden whitespace-no-wrap"
class="overflow-hidden whitespace-nowrap"
style="text-overflow: ellipsis"
>
{{ row.description }}

View File

@ -1,7 +1,7 @@
<template>
<div class="setting-main-container backup">
<sw-card variant="setting-card">
<div slot="header" class="flex flex-wrap justify-between lg:flex-no-wrap">
<div slot="header" class="flex flex-wrap justify-between lg:flex-nowrap">
<div>
<h6 class="sw-section-title">
{{ $tc('settings.disk.title', 1) }}

View File

@ -1,6 +1,6 @@
<template>
<sw-card variant="setting-card">
<div slot="header" class="flex flex-wrap justify-between lg:flex-no-wrap">
<div slot="header" class="flex flex-wrap justify-between lg:flex-nowrap">
<div>
<h6 class="sw-section-title">
{{ $t('settings.customization.notes.title') }}

View File

@ -1,6 +1,6 @@
<template>
<sw-card variant="setting-card">
<div slot="header" class="flex flex-wrap justify-between lg:flex-no-wrap">
<div slot="header" class="flex flex-wrap justify-between lg:flex-nowrap">
<div>
<h6 class="sw-section-title">
{{ $t('settings.customization.payments.payment_modes') }}

View File

@ -1,6 +1,6 @@
<template>
<sw-card variant="setting-card">
<div slot="header" class="flex flex-wrap justify-between lg:flex-no-wrap">
<div slot="header" class="flex flex-wrap justify-between lg:flex-nowrap">
<div>
<h6 class="sw-section-title">
{{ $t('settings.tax_types.title') }}

View File

@ -1,5 +1,5 @@
<template>
<form @submit.prevent="updateUserData" class="relative h-full">
<form class="relative h-full" @submit.prevent="updateUserData">
<base-loader v-if="isRequestOnGoing" :show-bg-overlay="true" />
<sw-card variant="setting-card">
<template slot="header">
@ -17,7 +17,7 @@
<div class="grid mb-4 md:grid-cols-6">
<div>
<label
class="text-sm not-italic font-medium leading-4 text-black whitespace-no-wrap"
class="text-sm not-italic font-medium leading-4 text-black whitespace-nowrap"
>
{{ $tc('settings.account_settings.profile_picture') }}
</label>
@ -114,9 +114,9 @@
</div>
<sw-button
class="mt-6"
:loading="isLoading"
:disabled="isLoading"
class="mt-6"
variant="primary"
>
<save-icon v-if="!isLoading" class="mr-2 -ml-1" />

View File

@ -1,6 +1,6 @@
<template>
<div>
<div class="flex flex-wrap justify-end mt-8 lg:flex-no-wrap">
<div class="flex flex-wrap justify-end mt-8 lg:flex-nowrap">
<sw-button size="lg" variant="primary-outline" @click="addItemUnit">
<plus-icon class="w-6 h-6 mr-1 -ml-2" />
{{ $t('settings.customization.items.add_item_unit') }}

View File

@ -1,11 +1,9 @@
// Tailwind
//----------------------------------
@tailwind base;
@import 'tailwindcss/base';
@tailwind components;
@import 'tailwindcss/components';
@tailwind utilities;
@import 'tailwindcss/utilities';
// Plugins
//----------------------------------

View File

@ -94,26 +94,27 @@
</tr>
@endforeach
@endif
@if ($estimate->discount_per_item === 'NO')
<tr>
<td class="pl-10 border-0 total-table-attribute-label">
@if($estimate->discount_type === 'fixed')
@lang('pdf_discount_label')
@endif
@if($estimate->discount_type === 'percentage')
@lang('pdf_discount_label') ({{$estimate->discount}}%)
@endif
</td>
<td class="text-right border-0 item-cell total-table-attribute-value">
@if($estimate->discount_type === 'fixed')
{!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!}
@endif
@if($estimate->discount_type === 'percentage')
{!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!}
@endif
</td>
</tr>
@if($estimate->discount > 0)
@if ($estimate->discount_per_item === 'NO')
<tr>
<td class="pl-10 border-0 total-table-attribute-label">
@if($estimate->discount_type === 'fixed')
@lang('pdf_discount_label')
@endif
@if($estimate->discount_type === 'percentage')
@lang('pdf_discount_label') ({{$estimate->discount}}%)
@endif
</td>
<td class="text-right border-0 item-cell total-table-attribute-value">
@if($estimate->discount_type === 'fixed')
{!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!}
@endif
@if($estimate->discount_type === 'percentage')
{!! format_money_pdf($estimate->discount_val, $estimate->user->currency) !!}
@endif
</td>
</tr>
@endif
@endif
<tr>
<td class="py-3"></td>

View File

@ -39,19 +39,21 @@
>
{!! format_money_pdf($item->price, $invoice->user->currency) !!}
</td>
@if($invoice->discount_per_item === 'YES')
<td
class="pl-10 text-right item-cell"
style="vertical-align: top;"
>
@if($item->discount_type === 'fixed')
{!! format_money_pdf($item->discount_val, $invoice->user->currency) !!}
@endif
@if($item->discount_type === 'percentage')
{{$item->discount}}%
@endif
{!! format_money_pdf($item->discount_val, $invoice->user->currency) !!}
@endif
@if($item->discount_type === 'percentage')
{{$item->discount}}%
@endif
</td>
@endif
<td
class="text-right item-cell"
style="vertical-align: top;"
@ -100,26 +102,29 @@
@endforeach
@endif
@if ($invoice->discount_per_item === 'NO')
<tr>
<td class="border-0 total-table-attribute-label">
@if($invoice->discount_type === 'fixed')
@lang('pdf_discount_label')
@endif
@if($invoice->discount_type === 'percentage')
@lang('pdf_discount_label') ({{$invoice->discount}}%)
@endif
</td>
<td class="py-2 border-0 item-cell total-table-attribute-value" >
@if($invoice->discount_type === 'fixed')
{!! format_money_pdf($invoice->discount_val, $invoice->user->currency) !!}
@endif
@if($invoice->discount_type === 'percentage')
{!! format_money_pdf($invoice->discount_val, $invoice->user->currency) !!}
@endif
</td>
</tr>
@if($invoice->discount > 0)
@if ($invoice->discount_per_item === 'NO')
<tr>
<td class="border-0 total-table-attribute-label">
@if($invoice->discount_type === 'fixed')
@lang('pdf_discount_label')
@endif
@if($invoice->discount_type === 'percentage')
@lang('pdf_discount_label') ({{$invoice->discount}}%)
@endif
</td>
<td class="py-2 border-0 item-cell total-table-attribute-value" >
@if($invoice->discount_type === 'fixed')
{!! format_money_pdf($invoice->discount_val, $invoice->user->currency) !!}
@endif
@if($invoice->discount_type === 'percentage')
{!! format_money_pdf($invoice->discount_val, $invoice->user->currency) !!}
@endif
</td>
</tr>
@endif
@endif
<tr>
<td class="py-3"></td>
<td class="py-3"></td>

View File

@ -6,10 +6,11 @@ module.exports = {
'./resources/assets/js/**/*.js',
'./resources/assets/js/**/*.vue',
'./resources/assets/sass/**/*.scss',
'./node_modules/@bytefury/spacewind/**/*.js',
'./node_modules/@bytefury/spacewind/**/*.vue',
'./node_modules/flatpickr/**/*.js',
'./node_modules/toastr/**/*.js',
'./node_modules/\\@bytefury/spacewind/src/**/*.js',
'./node_modules/\\@bytefury/spacewind/src/**/*.vue',
'./node_modules/\\@bytefury/spacewind/plugin/**/*.js',
'flatpickr/**/*.js',
'toastr/**/*.js',
'./public/js/pace/**/*.js',
],
theme: {

View File

@ -1,5 +1,6 @@
const mix = require('laravel-mix')
const tailwindcss = require('tailwindcss')
const path = require('path')
mix.webpackConfig({
resolve: {
@ -9,17 +10,14 @@ mix.webpackConfig({
},
})
/*
|--------------------------------------------------------------------------
| Admin
|--------------------------------------------------------------------------
*/
mix
.js('resources/assets/js/app.js', 'public/assets/js/')
.vue({
version: 2,
extractVueStyles: true,
})
.sass('resources/assets/sass/crater.scss', 'public/assets/css/')
.options({
processCssUrls: false,
postCss: [tailwindcss('./tailwind.config.js')],
})

3364
yarn.lock

File diff suppressed because it is too large Load Diff