mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-30 21:21:09 -04:00 
			
		
		
		
	Compare commits
	
		
			16 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| b7370ed85c | |||
| 818f2fbaf7 | |||
| 91a1dbf91c | |||
| a4d556f41e | |||
| 83de1c47ee | |||
| 678ace744a | |||
| 9e26fee1b0 | |||
| e455c3de50 | |||
| c4db50d3f0 | |||
| 411ee57946 | |||
| 9c5e9e56f5 | |||
| 8eeafd3fed | |||
| ed978d0174 | |||
| 607b1795bb | |||
| ead0ebb012 | |||
| 8b04e94446 | 
| @ -22,10 +22,17 @@ class Company extends Model implements HasMedia | |||||||
|     public function getLogoAttribute() |     public function getLogoAttribute() | ||||||
|     { |     { | ||||||
|         $logo = $this->getMedia('logo')->first(); |         $logo = $this->getMedia('logo')->first(); | ||||||
|  |  | ||||||
|  |         $isSystem = FileDisk::whereSetAsDefault(true)->first()->isSystem(); | ||||||
|  |  | ||||||
|         if ($logo) { |         if ($logo) { | ||||||
|             return  asset($logo->getUrl()); |             if ($isSystem) { | ||||||
|  |                 return $logo->getPath(); | ||||||
|  |             } else  { | ||||||
|  |                 return $logo->getFullUrl(); | ||||||
|             } |             } | ||||||
|         return ; |         } | ||||||
|  |         return null; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     public function user() |     public function user() | ||||||
|  | |||||||
| @ -33,9 +33,7 @@ class Estimate extends Model implements HasMedia | |||||||
|     protected $dates = [ |     protected $dates = [ | ||||||
|         'created_at', |         'created_at', | ||||||
|         'updated_at', |         'updated_at', | ||||||
|         'deleted_at', |         'deleted_at' | ||||||
|         'estimate_date', |  | ||||||
|         'expiry_date' |  | ||||||
|     ]; |     ]; | ||||||
|  |  | ||||||
|     protected $appends = [ |     protected $appends = [ | ||||||
| @ -428,16 +426,7 @@ class Estimate extends Model implements HasMedia | |||||||
|         $estimateTemplate = EstimateTemplate::find($this->estimate_template_id); |         $estimateTemplate = EstimateTemplate::find($this->estimate_template_id); | ||||||
|  |  | ||||||
|         $company = Company::find($this->company_id); |         $company = Company::find($this->company_id); | ||||||
|         $logo = $company->getMedia('logo')->first(); |         $logo = $company->logo; | ||||||
|  |  | ||||||
|         $isSystem = FileDisk::whereSetAsDefault(true)->first()->isSystem(); |  | ||||||
|         $isLocalhost = config('session.domain') === 'localhost'; |  | ||||||
|  |  | ||||||
|         if ($logo && $isLocalhost && $isSystem) { |  | ||||||
|             $logo = $logo->getPath(); |  | ||||||
|         } else if ($logo) { |  | ||||||
|             $logo = $logo->getFullUrl(); |  | ||||||
|         } |  | ||||||
|  |  | ||||||
|         view()->share([ |         view()->share([ | ||||||
|             'estimate' => $this, |             'estimate' => $this, | ||||||
|  | |||||||
| @ -39,9 +39,7 @@ class Invoice extends Model implements HasMedia | |||||||
|     protected $dates = [ |     protected $dates = [ | ||||||
|         'created_at', |         'created_at', | ||||||
|         'updated_at', |         'updated_at', | ||||||
|         'deleted_at', |         'deleted_at' | ||||||
|         'invoice_date', |  | ||||||
|         'due_date' |  | ||||||
|     ]; |     ]; | ||||||
|  |  | ||||||
|     protected $casts = [ |     protected $casts = [ | ||||||
| @ -512,16 +510,7 @@ class Invoice extends Model implements HasMedia | |||||||
|  |  | ||||||
|         $company = Company::find($this->company_id); |         $company = Company::find($this->company_id); | ||||||
|  |  | ||||||
|         $logo = $company->getMedia('logo')->first(); |         $logo = $company->logo; | ||||||
|  |  | ||||||
|         $isSystem = FileDisk::whereSetAsDefault(true)->first()->isSystem(); |  | ||||||
|         $isLocalhost = config('session.domain') === 'localhost'; |  | ||||||
|  |  | ||||||
|         if ($logo && $isLocalhost && $isSystem) { |  | ||||||
|             $logo = $logo->getPath(); |  | ||||||
|         } else if ($logo) { |  | ||||||
|             $logo = $logo->getFullUrl(); |  | ||||||
|         } |  | ||||||
|  |  | ||||||
|         view()->share([ |         view()->share([ | ||||||
|             'invoice' => $this, |             'invoice' => $this, | ||||||
|  | |||||||
| @ -31,7 +31,7 @@ class Payment extends Model implements HasMedia | |||||||
|     const PAYMENT_MODE_CREDIT_CARD = 'CREDIT_CARD'; |     const PAYMENT_MODE_CREDIT_CARD = 'CREDIT_CARD'; | ||||||
|     const PAYMENT_MODE_BANK_TRANSFER = 'BANK_TRANSFER'; |     const PAYMENT_MODE_BANK_TRANSFER = 'BANK_TRANSFER'; | ||||||
|  |  | ||||||
|     protected $dates = ['created_at', 'updated_at', 'payment_date']; |     protected $dates = ['created_at', 'updated_at']; | ||||||
|  |  | ||||||
|     protected $guarded = ['id']; |     protected $guarded = ['id']; | ||||||
|  |  | ||||||
| @ -373,16 +373,7 @@ class Payment extends Model implements HasMedia | |||||||
|     { |     { | ||||||
|         $company = Company::find($this->company_id); |         $company = Company::find($this->company_id); | ||||||
|  |  | ||||||
|         $logo = $company->getMedia('logo')->first(); |         $logo = $company->logo; | ||||||
|  |  | ||||||
|         $isSystem = FileDisk::whereSetAsDefault(true)->first()->isSystem(); |  | ||||||
|         $isLocalhost = config('session.domain') === 'localhost'; |  | ||||||
|  |  | ||||||
|         if ($logo && $isLocalhost && $isSystem) { |  | ||||||
|             $logo = $logo->getPath(); |  | ||||||
|         } else if($logo) { |  | ||||||
|             $logo = $logo->getFullUrl(); |  | ||||||
|         } |  | ||||||
|  |  | ||||||
|         view()->share([ |         view()->share([ | ||||||
|             'payment' => $this, |             'payment' => $this, | ||||||
|  | |||||||
| @ -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
									
									
									
								
							
							
						
						
									
										13055
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										17
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								package.json
									
									
									
									
									
								
							| @ -1,11 +1,11 @@ | |||||||
| { | { | ||||||
|     "private": true, |     "private": true, | ||||||
|     "scripts": { |     "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", |         "dev": "mix", | ||||||
|     "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": "mix watch", | ||||||
|     "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", |         "watch-poll": "mix watch -- --watch-options-poll=1000", | ||||||
|     "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", |         "hot": "mix watch --hot", | ||||||
|     "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" |         "production": "mix --production" | ||||||
|     }, |     }, | ||||||
|     "devDependencies": { |     "devDependencies": { | ||||||
|         "babel-eslint": "^8.2.6", |         "babel-eslint": "^8.2.6", | ||||||
| @ -15,7 +15,8 @@ | |||||||
|         "eslint-loader": "^3.0.4", |         "eslint-loader": "^3.0.4", | ||||||
|         "eslint-plugin-prettier": "^3.3.0", |         "eslint-plugin-prettier": "^3.3.0", | ||||||
|         "eslint-plugin-vue": "^4.7.1", |         "eslint-plugin-vue": "^4.7.1", | ||||||
|     "laravel-mix": "^5.0.7", |         "laravel-mix": "^6.0.6", | ||||||
|  |         "postcss": "^8.1", | ||||||
|         "prettier": "^2.2.1", |         "prettier": "^2.2.1", | ||||||
|         "resolve-url-loader": "3.1.0", |         "resolve-url-loader": "3.1.0", | ||||||
|         "sass": "^1.29.0", |         "sass": "^1.29.0", | ||||||
| @ -24,7 +25,7 @@ | |||||||
|         "vue-template-compiler": "^2.6.10" |         "vue-template-compiler": "^2.6.10" | ||||||
|     }, |     }, | ||||||
|     "dependencies": { |     "dependencies": { | ||||||
|     "@bytefury/spacewind": "^0.3.3", |         "@bytefury/spacewind": "^0.5.0", | ||||||
|         "@vue-hero-icons/outline": "^1.6.3", |         "@vue-hero-icons/outline": "^1.6.3", | ||||||
|         "@vue-hero-icons/solid": "^1.6.3", |         "@vue-hero-icons/solid": "^1.6.3", | ||||||
|         "axios": "^0.19", |         "axios": "^0.19", | ||||||
| @ -34,7 +35,7 @@ | |||||||
|         "moment": "^2.29.1", |         "moment": "^2.29.1", | ||||||
|         "sweet-modal-vue": "^2.0.0", |         "sweet-modal-vue": "^2.0.0", | ||||||
|         "sweetalert": "^2.1.2", |         "sweetalert": "^2.1.2", | ||||||
|     "tailwindcss": "^1.9.1", |         "tailwindcss": "^2.0.1", | ||||||
|         "toastr": "^2.1.4", |         "toastr": "^2.1.4", | ||||||
|         "v-tooltip": "^2.0.2", |         "v-tooltip": "^2.0.2", | ||||||
|         "vue": "^2.6.10", |         "vue": "^2.6.10", | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								public/assets/css/crater.css
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								public/assets/css/crater.css
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -1,24 +1,24 @@ | |||||||
| /*! | /*! | ||||||
|     * tiptap v1.29.6 |     * tiptap v1.30.0 | ||||||
|     * (c) 2020 überdosis GbR (limited liability) |     * (c) 2021 überdosis GbR (limited liability) | ||||||
|     * @license MIT |     * @license MIT | ||||||
|     */ |     */ | ||||||
|  |  | ||||||
| /*! | /*! | ||||||
|     * tiptap-commands v1.14.6 |     * tiptap-commands v1.15.0 | ||||||
|     * (c) 2020 überdosis GbR (limited liability) |     * (c) 2021 überdosis GbR (limited liability) | ||||||
|     * @license MIT |     * @license MIT | ||||||
|     */ |     */ | ||||||
|  |  | ||||||
| /*! | /*! | ||||||
|     * tiptap-extensions v1.33.1 |     * tiptap-extensions v1.33.2 | ||||||
|     * (c) 2020 überdosis GbR (limited liability) |     * (c) 2021 überdosis GbR (limited liability) | ||||||
|     * @license MIT |     * @license MIT | ||||||
|     */ |     */ | ||||||
|  |  | ||||||
| /*! | /*! | ||||||
|     * tiptap-utils v1.10.4 |     * tiptap-utils v1.11.0 | ||||||
|     * (c) 2020 überdosis GbR (limited liability) |     * (c) 2021 überdosis GbR (limited liability) | ||||||
|     * @license MIT |     * @license MIT | ||||||
|     */ |     */ | ||||||
|  |  | ||||||
| @ -67,13 +67,6 @@ | |||||||
|  * Date: 2020-03-14 |  * 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 |  * Vue.js v2.6.12 | ||||||
|  * (c) 2014-2020 Evan You |  * (c) 2014-2020 Evan You | ||||||
| @ -94,6 +87,12 @@ | |||||||
|  * Date: 2020-05-04T22:49Z |  * Date: 2020-05-04T22:49Z | ||||||
|  */ |  */ | ||||||
|  |  | ||||||
|  | /*! | ||||||
|  |  * vue-i18n v8.22.2  | ||||||
|  |  * (c) 2020 kazuya kawaguchi | ||||||
|  |  * Released under the MIT License. | ||||||
|  |  */ | ||||||
|  |  | ||||||
| /*! | /*! | ||||||
|  * vue2-transitions v0.3.0 |  * vue2-transitions v0.3.0 | ||||||
|  * (c) 2019-present cristij <joracristi@gmail.com> |  * (c) 2019-present cristij <joracristi@gmail.com> | ||||||
| @ -108,18 +107,6 @@ | |||||||
|  |  | ||||||
| /*! For license information please see index.js.LICENSE.txt */ | /*! 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 |  * @license | ||||||
|  * Lodash <https://lodash.com/> |  * Lodash <https://lodash.com/> | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| { | { | ||||||
|     "/assets/js/app.js": "/assets/js/app.js?id=311e432a0e58e62c984f", |     "/assets/js/app.js": "/assets/js/app.js?id=2fe48b55fc5693cab09f", | ||||||
|     "/assets/css/crater.css": "/assets/css/crater.css?id=912348e74f68a41a1b35" |     "/assets/css/crater.css": "/assets/css/crater.css?id=7a822f915d7e413148f6" | ||||||
| } | } | ||||||
|  | |||||||
| @ -3,6 +3,7 @@ | |||||||
|  * include Vue and Vue Resource. This gives a great starting point for |  * include Vue and Vue Resource. This gives a great starting point for | ||||||
|  * building robust, powerful web applications using Vue and Laravel. |  * building robust, powerful web applications using Vue and Laravel. | ||||||
|  */ |  */ | ||||||
|  | import Vue from 'vue' | ||||||
| import router from './router.js' | import router from './router.js' | ||||||
| import store from './store/index' | import store from './store/index' | ||||||
| import utils from './helpers/utilities' | import utils from './helpers/utilities' | ||||||
| @ -11,7 +12,7 @@ import swal from 'sweetalert' | |||||||
|  |  | ||||||
| require('./bootstrap') | require('./bootstrap') | ||||||
|  |  | ||||||
| window.Vue.prototype.$utils = utils | Vue.prototype.$utils = utils | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * Next, we will create a fresh Vue application instance and attach it to |  * Next, we will create a fresh Vue application instance and attach it to | ||||||
|  | |||||||
							
								
								
									
										13
									
								
								resources/assets/js/bootstrap.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								resources/assets/js/bootstrap.js
									
									
									
									
										vendored
									
									
								
							| @ -25,13 +25,6 @@ Vue.use(Vuelidate) | |||||||
| Vue.use(Transitions) | Vue.use(Transitions) | ||||||
|  |  | ||||||
| window._ = require('lodash') | 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 |  * Custom Directives | ||||||
| @ -97,7 +90,8 @@ global.axios.interceptors.response.use(undefined, function (err) { | |||||||
|   } |   } | ||||||
|   if (!err.response) { |   if (!err.response) { | ||||||
|     window.toastr['error']( |     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 { |   } else { | ||||||
|     if ( |     if ( | ||||||
| @ -121,7 +115,8 @@ global.axios.interceptors.response.use(undefined, function (err) { | |||||||
|       window.toastr['error']( |       window.toastr['error']( | ||||||
|         err.response.data.message |         err.response.data.message | ||||||
|           ? err.response.data.message |           ? err.response.data.message | ||||||
|           : err.response.data || 'Unknown error occurred', 'Error' |           : err.response.data || 'Unknown error occurred', | ||||||
|  |         'Error' | ||||||
|       ) |       ) | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -1,3 +1,5 @@ | |||||||
|  | import Vue from 'vue' | ||||||
|  |  | ||||||
| import BaseModal from './modal/BaseModal.vue' | import BaseModal from './modal/BaseModal.vue' | ||||||
| import BaseLoader from './BaseLoader.vue' | import BaseLoader from './BaseLoader.vue' | ||||||
| import BaseCustomerSelect from './BaseCustomerSelect.vue' | import BaseCustomerSelect from './BaseCustomerSelect.vue' | ||||||
|  | |||||||
| @ -12,7 +12,7 @@ export default { | |||||||
|   disabledMultiSelectTags: 'bg-gray-200 text-gray-400', |   disabledMultiSelectTags: 'bg-gray-200 text-gray-400', | ||||||
|   multiselectTagsWrap: 'multiselect__tags-wrap inline', |   multiselectTagsWrap: 'multiselect__tags-wrap inline', | ||||||
|   multiselectTag: |   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: |   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', |     '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', |   multiselectStrong: 'mb-2 leading-5 inline-block align-top', | ||||||
| @ -26,6 +26,6 @@ export default { | |||||||
|   multiselectContent: |   multiselectContent: | ||||||
|     'multiselect__content list-none inline-block p-0 m-0 min-w-full align-top', |     'multiselect__content list-none inline-block p-0 m-0 min-w-full align-top', | ||||||
|   multiselectOption: |   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', |   multiselectElement: 'multiselect__element block', | ||||||
| } | } | ||||||
|  | |||||||
| @ -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', |         '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', | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
| } | } | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ export default { | |||||||
|     itemContainer: |     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', |       '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: |     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', |     itemIcon: 'w-5 h-5 mr-3 text-secondary', | ||||||
|   }, |   }, | ||||||
|   variants: { |   variants: { | ||||||
| @ -16,7 +16,7 @@ export default { | |||||||
|       divider: |       divider: | ||||||
|         'border-t border-solid border-gray-200 my-2 mx-0 overflow-hidden', |         'border-t border-solid border-gray-200 my-2 mx-0 overflow-hidden', | ||||||
|       item: |       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: |       itemContainer: | ||||||
|         'z-10 p-2 text-base text-left list-none rounded border-0 shadow bg-white text-black', |         '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', |       itemIcon: 'w-5 h-5 mr-3 text-secondary', | ||||||
|  | |||||||
| @ -1,3 +1,5 @@ | |||||||
|  | import Vue from 'vue' | ||||||
|  |  | ||||||
| Vue.directive('click-outside', { | Vue.directive('click-outside', { | ||||||
|   bind: function (el, binding, vnode) { |   bind: function (el, binding, vnode) { | ||||||
|     el.event = function (event) { |     el.event = function (event) { | ||||||
| @ -17,7 +19,9 @@ Vue.directive('click-outside', { | |||||||
| Vue.directive('autoresize', { | Vue.directive('autoresize', { | ||||||
|   inserted: function (el) { |   inserted: function (el) { | ||||||
|     el.style.height = el.scrollHeight + 'px' |     el.style.height = el.scrollHeight + 'px' | ||||||
|  |     if (el.style.overflow && el.style.overflow.y) { | ||||||
|       el.style.overflow.y = 'hidden' |       el.style.overflow.y = 'hidden' | ||||||
|  |     } | ||||||
|     el.style.resize = 'none' |     el.style.resize = 'none' | ||||||
|     function OnInput() { |     function OnInput() { | ||||||
|       this.style.height = 'auto' |       this.style.height = 'auto' | ||||||
|  | |||||||
| @ -2,10 +2,10 @@ | |||||||
|   <base-page class="customer-create"> |   <base-page class="customer-create"> | ||||||
|     <sw-page-header :title="$t('customers.title')"> |     <sw-page-header :title="$t('customers.title')"> | ||||||
|       <sw-breadcrumb slot="breadcrumbs"> |       <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 |         <sw-breadcrumb-item | ||||||
|           to="#" |  | ||||||
|           :title="$tc('customers.customer', 2)" |           :title="$tc('customers.customer', 2)" | ||||||
|  |           to="#" | ||||||
|           active |           active | ||||||
|         /> |         /> | ||||||
|       </sw-breadcrumb> |       </sw-breadcrumb> | ||||||
| @ -159,7 +159,7 @@ | |||||||
|           :filterable="false" |           :filterable="false" | ||||||
|           cell-class="no-click" |           cell-class="no-click" | ||||||
|         > |         > | ||||||
|           <div class="relative block" slot-scope="row"> |           <div slot-scope="row" class="relative block"> | ||||||
|             <sw-checkbox |             <sw-checkbox | ||||||
|               :id="row.id" |               :id="row.id" | ||||||
|               v-model="selectField" |               v-model="selectField" | ||||||
| @ -243,16 +243,16 @@ | |||||||
|               <dot-icon slot="activator" /> |               <dot-icon slot="activator" /> | ||||||
|  |  | ||||||
|               <sw-dropdown-item |               <sw-dropdown-item | ||||||
|                 tag-name="router-link" |  | ||||||
|                 :to="`customers/${row.id}/edit`" |                 :to="`customers/${row.id}/edit`" | ||||||
|  |                 tag-name="router-link" | ||||||
|               > |               > | ||||||
|                 <pencil-icon class="h-5 mr-3 text-gray-600" /> |                 <pencil-icon class="h-5 mr-3 text-gray-600" /> | ||||||
|                 {{ $t('general.edit') }} |                 {{ $t('general.edit') }} | ||||||
|               </sw-dropdown-item> |               </sw-dropdown-item> | ||||||
|  |  | ||||||
|               <sw-dropdown-item |               <sw-dropdown-item | ||||||
|                 tag-name="router-link" |  | ||||||
|                 :to="`customers/${row.id}/view`" |                 :to="`customers/${row.id}/view`" | ||||||
|  |                 tag-name="router-link" | ||||||
|               > |               > | ||||||
|                 <eye-icon class="h-5 mr-3 text-gray-600" /> |                 <eye-icon class="h-5 mr-3 text-gray-600" /> | ||||||
|                 {{ $t('general.view') }} |                 {{ $t('general.view') }} | ||||||
| @ -281,7 +281,6 @@ import { | |||||||
|   EyeIcon, |   EyeIcon, | ||||||
| } from '@vue-hero-icons/solid' | } from '@vue-hero-icons/solid' | ||||||
| import AstronautIcon from '../../components/icon/AstronautIcon' | import AstronautIcon from '../../components/icon/AstronautIcon' | ||||||
| import { request } from 'http' |  | ||||||
|  |  | ||||||
| export default { | export default { | ||||||
|   components: { |   components: { | ||||||
|  | |||||||
| @ -35,10 +35,10 @@ | |||||||
|           <sw-dropdown-item class="flex cursor-pointer"> |           <sw-dropdown-item class="flex cursor-pointer"> | ||||||
|             <sw-input-group class="-mt-3 font-normal"> |             <sw-input-group class="-mt-3 font-normal"> | ||||||
|               <sw-radio |               <sw-radio | ||||||
|                 :label="$t('customers.create_date')" |  | ||||||
|                 size="sm" |  | ||||||
|                 id="filter_create_date" |                 id="filter_create_date" | ||||||
|  |                 :label="$t('customers.create_date')" | ||||||
|                 v-model="searchData.orderByField" |                 v-model="searchData.orderByField" | ||||||
|  |                 size="sm" | ||||||
|                 name="filter" |                 name="filter" | ||||||
|                 value="invoices.created_at" |                 value="invoices.created_at" | ||||||
|                 @change="onSearch" |                 @change="onSearch" | ||||||
| @ -49,10 +49,10 @@ | |||||||
|           <sw-dropdown-item class="flex cursor-pointer"> |           <sw-dropdown-item class="flex cursor-pointer"> | ||||||
|             <sw-input-group class="-mt-3 font-normal"> |             <sw-input-group class="-mt-3 font-normal"> | ||||||
|               <sw-radio |               <sw-radio | ||||||
|                 :label="$t('customers.display_name')" |  | ||||||
|                 size="sm" |  | ||||||
|                 id="filter_display_name" |                 id="filter_display_name" | ||||||
|  |                 :label="$t('customers.display_name')" | ||||||
|                 v-model="searchData.orderByField" |                 v-model="searchData.orderByField" | ||||||
|  |                 size="sm" | ||||||
|                 name="filter" |                 name="filter" | ||||||
|                 value="users.name" |                 value="users.name" | ||||||
|                 @change="onSearch" |                 @change="onSearch" | ||||||
| @ -62,8 +62,8 @@ | |||||||
|         </sw-dropdown> |         </sw-dropdown> | ||||||
|  |  | ||||||
|         <sw-button |         <sw-button | ||||||
|           class="ml-1" |  | ||||||
|           v-tooltip.top-center="{ content: getOrderName }" |           v-tooltip.top-center="{ content: getOrderName }" | ||||||
|  |           class="ml-1" | ||||||
|           size="md" |           size="md" | ||||||
|           variant="gray-light" |           variant="gray-light" | ||||||
|           @click="sortData" |           @click="sortData" | ||||||
| @ -102,13 +102,13 @@ | |||||||
|             {{ customer.name }} |             {{ customer.name }} | ||||||
|           </div> |           </div> | ||||||
|           <div |           <div | ||||||
|             class="mt-1 text-xs not-italic font-medium leading-5 text-gray-600" |  | ||||||
|             v-if="customer.contact_name" |             v-if="customer.contact_name" | ||||||
|  |             class="mt-1 text-xs not-italic font-medium leading-5 text-gray-600" | ||||||
|           > |           > | ||||||
|             {{ customer.contact_name }} |             {{ customer.contact_name }} | ||||||
|           </div> |           </div> | ||||||
|         </div> |         </div> | ||||||
|         <div class="flex-1 whitespace-no-wrap right"> |         <div class="flex-1 whitespace-nowrap right"> | ||||||
|           <div |           <div | ||||||
|             class="text-xl not-italic font-semibold leading-8 text-right text-gray-900" |             class="text-xl not-italic font-semibold leading-8 text-right text-gray-900" | ||||||
|             v-html="$utils.formatMoney(customer.due_amount, customer.currency)" |             v-html="$utils.formatMoney(customer.due_amount, customer.currency)" | ||||||
|  | |||||||
| @ -9,7 +9,7 @@ | |||||||
|           {{ $t('general.you_got_lost') }} |           {{ $t('general.you_got_lost') }} | ||||||
|         </h5> |         </h5> | ||||||
|         <router-link |         <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" |           to="/admin/dashboard" | ||||||
|         > |         > | ||||||
|           <arrow-left-icon class="mr-2 text-white icon" /> |           <arrow-left-icon class="mr-2 text-white icon" /> | ||||||
|  | |||||||
| @ -218,7 +218,7 @@ | |||||||
|           <div class="mb-6"> |           <div class="mb-6"> | ||||||
|             <sw-popup |             <sw-popup | ||||||
|               ref="notePopup" |               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"> |               <div slot="activator" class="float-right mt-1"> | ||||||
|                 + {{ $t('general.insert_note') }} |                 + {{ $t('general.insert_note') }} | ||||||
| @ -322,8 +322,8 @@ | |||||||
|                 <sw-button |                 <sw-button | ||||||
|                   slot="activator" |                   slot="activator" | ||||||
|                   type="button" |                   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" |                   data-toggle="dropdown" | ||||||
|  |                   size="discount" | ||||||
|                   aria-haspopup="true" |                   aria-haspopup="true" | ||||||
|                   aria-expanded="false" |                   aria-expanded="false" | ||||||
|                   style="height: 43px" |                   style="height: 43px" | ||||||
| @ -954,12 +954,15 @@ export default { | |||||||
|       let amount = 0 |       let amount = 0 | ||||||
|  |  | ||||||
|       if (selectedTax.compound_tax && this.subtotalWithDiscount) { |       if (selectedTax.compound_tax && this.subtotalWithDiscount) { | ||||||
|         amount = |         amount = Math.round( | ||||||
|           ((this.subtotalWithDiscount + this.totalSimpleTax) * |           ((this.subtotalWithDiscount + this.totalSimpleTax) * | ||||||
|             selectedTax.percent) / |             selectedTax.percent) / | ||||||
|             100 |             100 | ||||||
|  |         ) | ||||||
|       } else if (this.subtotalWithDiscount && selectedTax.percent) { |       } else if (this.subtotalWithDiscount && selectedTax.percent) { | ||||||
|         amount = (this.subtotalWithDiscount * selectedTax.percent) / 100 |         amount = Math.round( | ||||||
|  |           (this.subtotalWithDiscount * selectedTax.percent) / 100 | ||||||
|  |         ) | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       this.newEstimate.taxes.push({ |       this.newEstimate.taxes.push({ | ||||||
| @ -972,7 +975,7 @@ export default { | |||||||
|         amount, |         amount, | ||||||
|       }) |       }) | ||||||
|  |  | ||||||
|       if (this.$$refs) { |       if (this.$refs) { | ||||||
|         this.$refs.taxModal.close() |         this.$refs.taxModal.close() | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  | |||||||
| @ -25,7 +25,7 @@ | |||||||
|         <div v-if="selectedCustomer.billing_address"> |         <div v-if="selectedCustomer.billing_address"> | ||||||
|           <div class="flex flex-col"> |           <div class="flex flex-col"> | ||||||
|             <label |             <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') }} |               {{ $t('general.bill_to') }} | ||||||
|             </label> |             </label> | ||||||
| @ -77,7 +77,7 @@ | |||||||
|         <div v-if="selectedCustomer.shipping_address"> |         <div v-if="selectedCustomer.shipping_address"> | ||||||
|           <div class="flex flex-col"> |           <div class="flex flex-col"> | ||||||
|             <label |             <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') }} |               {{ $t('general.ship_to') }} | ||||||
|             </label> |             </label> | ||||||
|  | |||||||
| @ -45,11 +45,13 @@ export default { | |||||||
|   computed: { |   computed: { | ||||||
|     taxAmount() { |     taxAmount() { | ||||||
|       if (this.tax.compound_tax && this.total) { |       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) { |       if (this.total && this.tax.percent) { | ||||||
|         return (this.total * this.tax.percent) / 100 |         return Math.round((this.total * this.tax.percent) / 100) | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       return 0 |       return 0 | ||||||
|  | |||||||
| @ -85,9 +85,10 @@ | |||||||
|                       slot="activator" |                       slot="activator" | ||||||
|                       type="button" |                       type="button" | ||||||
|                       data-toggle="dropdown" |                       data-toggle="dropdown" | ||||||
|  |                       size="discount" | ||||||
|                       aria-haspopup="true" |                       aria-haspopup="true" | ||||||
|                       aria-expanded="false" |                       aria-expanded="false" | ||||||
|                       style="height: 43px; padding: 6px" |                       style="height: 43px" | ||||||
|                       variant="white" |                       variant="white" | ||||||
|                     > |                     > | ||||||
|                       <span class="flex"> |                       <span class="flex"> | ||||||
| @ -266,22 +267,26 @@ export default { | |||||||
|       return this.subtotal - this.item.discount_val |       return this.subtotal - this.item.discount_val | ||||||
|     }, |     }, | ||||||
|     totalSimpleTax() { |     totalSimpleTax() { | ||||||
|       return window._.sumBy(this.item.taxes, function (tax) { |       return Math.round( | ||||||
|  |         window._.sumBy(this.item.taxes, function (tax) { | ||||||
|           if (!tax.compound_tax) { |           if (!tax.compound_tax) { | ||||||
|             return tax.amount |             return tax.amount | ||||||
|           } |           } | ||||||
|  |  | ||||||
|           return 0 |           return 0 | ||||||
|         }) |         }) | ||||||
|  |       ) | ||||||
|     }, |     }, | ||||||
|     totalCompoundTax() { |     totalCompoundTax() { | ||||||
|       return window._.sumBy(this.item.taxes, function (tax) { |       return Math.round( | ||||||
|  |         window._.sumBy(this.item.taxes, function (tax) { | ||||||
|           if (tax.compound_tax) { |           if (tax.compound_tax) { | ||||||
|             return tax.amount |             return tax.amount | ||||||
|           } |           } | ||||||
|  |  | ||||||
|           return 0 |           return 0 | ||||||
|         }) |         }) | ||||||
|  |       ) | ||||||
|     }, |     }, | ||||||
|     totalTax() { |     totalTax() { | ||||||
|       return this.totalSimpleTax + this.totalCompoundTax |       return this.totalSimpleTax + this.totalCompoundTax | ||||||
|  | |||||||
| @ -32,8 +32,8 @@ | |||||||
|           </sw-dropdown-item> |           </sw-dropdown-item> | ||||||
|  |  | ||||||
|           <sw-dropdown-item |           <sw-dropdown-item | ||||||
|             tag-name="router-link" |  | ||||||
|             :to="`/admin/estimates/${$route.params.id}/edit`" |             :to="`/admin/estimates/${$route.params.id}/edit`" | ||||||
|  |             tag-name="router-link" | ||||||
|           > |           > | ||||||
|             <pencil-icon class="h-5 mr-3 text-primary-800" /> |             <pencil-icon class="h-5 mr-3 text-primary-800" /> | ||||||
|             {{ $t('general.edit') }} |             {{ $t('general.edit') }} | ||||||
| @ -96,8 +96,8 @@ | |||||||
|                 <sw-radio |                 <sw-radio | ||||||
|                   id="filter_due_date" |                   id="filter_due_date" | ||||||
|                   v-model="searchData.orderByField" |                   v-model="searchData.orderByField" | ||||||
|                   value="expiry_date" |  | ||||||
|                   :label="$t('estimates.due_date')" |                   :label="$t('estimates.due_date')" | ||||||
|  |                   value="expiry_date" | ||||||
|                   size="sm" |                   size="sm" | ||||||
|                   name="filter" |                   name="filter" | ||||||
|                   @change="onSearched" |                   @change="onSearched" | ||||||
| @ -110,8 +110,8 @@ | |||||||
|                 <sw-radio |                 <sw-radio | ||||||
|                   id="filter_estimate_number" |                   id="filter_estimate_number" | ||||||
|                   v-model="searchData.orderByField" |                   v-model="searchData.orderByField" | ||||||
|                   value="estimate_number" |  | ||||||
|                   :label="$t('estimates.estimate_number')" |                   :label="$t('estimates.estimate_number')" | ||||||
|  |                   value="estimate_number" | ||||||
|                   size="sm" |                   size="sm" | ||||||
|                   name="filter" |                   name="filter" | ||||||
|                   @change="onSearched" |                   @change="onSearched" | ||||||
| @ -121,8 +121,8 @@ | |||||||
|           </sw-dropdown> |           </sw-dropdown> | ||||||
|  |  | ||||||
|           <sw-button |           <sw-button | ||||||
|             class="ml-1" |  | ||||||
|             v-tooltip.top-center="{ content: getOrderName }" |             v-tooltip.top-center="{ content: getOrderName }" | ||||||
|  |             class="ml-1" | ||||||
|             size="md" |             size="md" | ||||||
|             variant="gray-light" |             variant="gray-light" | ||||||
|             @click="sortData" |             @click="sortData" | ||||||
| @ -168,15 +168,15 @@ | |||||||
|             </div> |             </div> | ||||||
|  |  | ||||||
|             <sw-badge |             <sw-badge | ||||||
|               class="px-1 text-xs" |  | ||||||
|               :bg-color="$utils.getBadgeStatusColor(estimate.status).bgColor" |               :bg-color="$utils.getBadgeStatusColor(estimate.status).bgColor" | ||||||
|               :color="$utils.getBadgeStatusColor(estimate.status).color" |               :color="$utils.getBadgeStatusColor(estimate.status).color" | ||||||
|  |               class="px-1 text-xs" | ||||||
|             > |             > | ||||||
|               {{ estimate.status }} |               {{ estimate.status }} | ||||||
|             </sw-badge> |             </sw-badge> | ||||||
|           </div> |           </div> | ||||||
|  |  | ||||||
|           <div class="flex-1 whitespace-no-wrap right"> |           <div class="flex-1 whitespace-nowrap right"> | ||||||
|             <div |             <div | ||||||
|               class="mb-2 text-xl not-italic font-semibold leading-8 text-right text-gray-900" |               class="mb-2 text-xl not-italic font-semibold leading-8 text-right text-gray-900" | ||||||
|               v-html=" |               v-html=" | ||||||
|  | |||||||
| @ -211,7 +211,7 @@ | |||||||
|           <div class="mb-6"> |           <div class="mb-6"> | ||||||
|             <sw-popup |             <sw-popup | ||||||
|               ref="notePopup" |               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"> |               <div slot="activator" class="float-right mt-1"> | ||||||
|                 + {{ $t('general.insert_note') }} |                 + {{ $t('general.insert_note') }} | ||||||
| @ -315,8 +315,8 @@ | |||||||
|                 <sw-button |                 <sw-button | ||||||
|                   slot="activator" |                   slot="activator" | ||||||
|                   type="button" |                   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" |                   data-toggle="dropdown" | ||||||
|  |                   size="discount" | ||||||
|                   aria-haspopup="true" |                   aria-haspopup="true" | ||||||
|                   aria-expanded="false" |                   aria-expanded="false" | ||||||
|                   style="height: 43px" |                   style="height: 43px" | ||||||
| @ -565,23 +565,27 @@ export default { | |||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     totalSimpleTax() { |     totalSimpleTax() { | ||||||
|       return window._.sumBy(this.newInvoice.taxes, function (tax) { |       return Math.round( | ||||||
|  |         window._.sumBy(this.newInvoice.taxes, function (tax) { | ||||||
|           if (!tax.compound_tax) { |           if (!tax.compound_tax) { | ||||||
|             return tax.amount |             return tax.amount | ||||||
|           } |           } | ||||||
|  |  | ||||||
|           return 0 |           return 0 | ||||||
|         }) |         }) | ||||||
|  |       ) | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     totalCompoundTax() { |     totalCompoundTax() { | ||||||
|       return window._.sumBy(this.newInvoice.taxes, function (tax) { |       return Math.round( | ||||||
|  |         window._.sumBy(this.newInvoice.taxes, function (tax) { | ||||||
|           if (tax.compound_tax) { |           if (tax.compound_tax) { | ||||||
|             return tax.amount |             return tax.amount | ||||||
|           } |           } | ||||||
|  |  | ||||||
|           return 0 |           return 0 | ||||||
|         }) |         }) | ||||||
|  |       ) | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     totalTax() { |     totalTax() { | ||||||
| @ -589,9 +593,11 @@ export default { | |||||||
|         return this.totalSimpleTax + this.totalCompoundTax |         return this.totalSimpleTax + this.totalCompoundTax | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       return window._.sumBy(this.newInvoice.items, function (tax) { |       return Math.round( | ||||||
|  |         window._.sumBy(this.newInvoice.items, function (tax) { | ||||||
|           return tax.tax |           return tax.tax | ||||||
|         }) |         }) | ||||||
|  |       ) | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|     allTaxes() { |     allTaxes() { | ||||||
| @ -951,12 +957,15 @@ export default { | |||||||
|       let amount = 0 |       let amount = 0 | ||||||
|  |  | ||||||
|       if (selectedTax.compound_tax && this.subtotalWithDiscount) { |       if (selectedTax.compound_tax && this.subtotalWithDiscount) { | ||||||
|         amount = |         amount = Math.round( | ||||||
|           ((this.subtotalWithDiscount + this.totalSimpleTax) * |           ((this.subtotalWithDiscount + this.totalSimpleTax) * | ||||||
|             selectedTax.percent) / |             selectedTax.percent) / | ||||||
|             100 |             100 | ||||||
|  |         ) | ||||||
|       } else if (this.subtotalWithDiscount && selectedTax.percent) { |       } else if (this.subtotalWithDiscount && selectedTax.percent) { | ||||||
|         amount = (this.subtotalWithDiscount * selectedTax.percent) / 100 |         amount = Math.round( | ||||||
|  |           (this.subtotalWithDiscount * selectedTax.percent) / 100 | ||||||
|  |         ) | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       this.newInvoice.taxes.push({ |       this.newInvoice.taxes.push({ | ||||||
|  | |||||||
| @ -27,7 +27,7 @@ | |||||||
|         <div v-if="selectedCustomer.billing_address"> |         <div v-if="selectedCustomer.billing_address"> | ||||||
|           <div class="flex flex-col"> |           <div class="flex flex-col"> | ||||||
|             <label |             <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') }} |               {{ $t('general.bill_to') }} | ||||||
|             </label> |             </label> | ||||||
| @ -79,7 +79,7 @@ | |||||||
|         <div v-if="selectedCustomer.shipping_address" class="col col-6"> |         <div v-if="selectedCustomer.shipping_address" class="col col-6"> | ||||||
|           <div class="flex flex-col"> |           <div class="flex flex-col"> | ||||||
|             <label |             <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') }} |               {{ $t('general.ship_to') }} | ||||||
|             </label> |             </label> | ||||||
|  | |||||||
| @ -45,11 +45,13 @@ export default { | |||||||
|   computed: { |   computed: { | ||||||
|     taxAmount() { |     taxAmount() { | ||||||
|       if (this.tax.compound_tax && this.total) { |       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) { |       if (this.total && this.tax.percent) { | ||||||
|         return (this.total * this.tax.percent) / 100 |         return Math.round((this.total * this.tax.percent) / 100) | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       return 0 |       return 0 | ||||||
|  | |||||||
| @ -83,8 +83,8 @@ | |||||||
|                     <sw-button |                     <sw-button | ||||||
|                       slot="activator" |                       slot="activator" | ||||||
|                       type="button" |                       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" |                       data-toggle="dropdown" | ||||||
|  |                       size="discount" | ||||||
|                       aria-haspopup="true" |                       aria-haspopup="true" | ||||||
|                       aria-expanded="false" |                       aria-expanded="false" | ||||||
|                       style="height: 43px" |                       style="height: 43px" | ||||||
| @ -266,22 +266,26 @@ export default { | |||||||
|       return this.subtotal - this.item.discount_val |       return this.subtotal - this.item.discount_val | ||||||
|     }, |     }, | ||||||
|     totalSimpleTax() { |     totalSimpleTax() { | ||||||
|       return window._.sumBy(this.item.taxes, function (tax) { |       return Math.round( | ||||||
|  |         window._.sumBy(this.item.taxes, function (tax) { | ||||||
|           if (!tax.compound_tax) { |           if (!tax.compound_tax) { | ||||||
|             return tax.amount |             return tax.amount | ||||||
|           } |           } | ||||||
|  |  | ||||||
|           return 0 |           return 0 | ||||||
|         }) |         }) | ||||||
|  |       ) | ||||||
|     }, |     }, | ||||||
|     totalCompoundTax() { |     totalCompoundTax() { | ||||||
|       return window._.sumBy(this.item.taxes, function (tax) { |       return Math.round( | ||||||
|  |         window._.sumBy(this.item.taxes, function (tax) { | ||||||
|           if (tax.compound_tax) { |           if (tax.compound_tax) { | ||||||
|             return tax.amount |             return tax.amount | ||||||
|           } |           } | ||||||
|  |  | ||||||
|           return 0 |           return 0 | ||||||
|         }) |         }) | ||||||
|  |       ) | ||||||
|     }, |     }, | ||||||
|     totalTax() { |     totalTax() { | ||||||
|       return this.totalSimpleTax + this.totalCompoundTax |       return this.totalSimpleTax + this.totalCompoundTax | ||||||
|  | |||||||
| @ -105,11 +105,13 @@ export default { | |||||||
|     }, |     }, | ||||||
|     taxAmount() { |     taxAmount() { | ||||||
|       if (this.tax.compound_tax && this.total) { |       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) { |       if (this.total && this.tax.percent) { | ||||||
|         return (this.total * this.tax.percent) / 100 |         return Math.round((this.total * this.tax.percent) / 100) | ||||||
|       } |       } | ||||||
|  |  | ||||||
|       return 0 |       return 0 | ||||||
|  | |||||||
| @ -27,8 +27,8 @@ | |||||||
|             invoice.status === 'OVERDUE' || |             invoice.status === 'OVERDUE' || | ||||||
|             invoice.status === 'VIEWED' |             invoice.status === 'VIEWED' | ||||||
|           " |           " | ||||||
|           tag-name="router-link" |  | ||||||
|           :to="`/admin/payments/${$route.params.id}/create`" |           :to="`/admin/payments/${$route.params.id}/create`" | ||||||
|  |           tag-name="router-link" | ||||||
|           variant="primary" |           variant="primary" | ||||||
|           class="text-sm" |           class="text-sm" | ||||||
|         > |         > | ||||||
| @ -45,8 +45,8 @@ | |||||||
|           </sw-dropdown-item> |           </sw-dropdown-item> | ||||||
|  |  | ||||||
|           <sw-dropdown-item |           <sw-dropdown-item | ||||||
|             tag-name="router-link" |  | ||||||
|             :to="`/admin/invoices/${$route.params.id}/edit`" |             :to="`/admin/invoices/${$route.params.id}/edit`" | ||||||
|  |             tag-name="router-link" | ||||||
|           > |           > | ||||||
|             <pencil-icon class="h-5 mr-3 text-gray-600" /> |             <pencil-icon class="h-5 mr-3 text-gray-600" /> | ||||||
|             {{ $t('general.edit') }} |             {{ $t('general.edit') }} | ||||||
| @ -125,10 +125,10 @@ | |||||||
|                 <sw-radio |                 <sw-radio | ||||||
|                   id="filter_invoice_number" |                   id="filter_invoice_number" | ||||||
|                   v-model="searchData.orderByField" |                   v-model="searchData.orderByField" | ||||||
|  |                   :label="$t('invoices.invoice_number')" | ||||||
|                   size="sm" |                   size="sm" | ||||||
|                   type="radio" |                   type="radio" | ||||||
|                   name="filter" |                   name="filter" | ||||||
|                   :label="$t('invoices.invoice_number')" |  | ||||||
|                   value="invoice_number" |                   value="invoice_number" | ||||||
|                   @change="onSearch" |                   @change="onSearch" | ||||||
|                 /> |                 /> | ||||||
| @ -137,8 +137,8 @@ | |||||||
|           </sw-dropdown> |           </sw-dropdown> | ||||||
|  |  | ||||||
|           <sw-button |           <sw-button | ||||||
|             class="ml-1" |  | ||||||
|             v-tooltip.top-center="{ content: getOrderName }" |             v-tooltip.top-center="{ content: getOrderName }" | ||||||
|  |             class="ml-1" | ||||||
|             size="md" |             size="md" | ||||||
|             variant="gray-light" |             variant="gray-light" | ||||||
|             @click="sortData" |             @click="sortData" | ||||||
| @ -184,16 +184,16 @@ | |||||||
|             </div> |             </div> | ||||||
|  |  | ||||||
|             <sw-badge |             <sw-badge | ||||||
|               class="px-1 text-xs" |  | ||||||
|               :bg-color="$utils.getBadgeStatusColor(invoice.status).bgColor" |               :bg-color="$utils.getBadgeStatusColor(invoice.status).bgColor" | ||||||
|               :color="$utils.getBadgeStatusColor(invoice.status).color" |               :color="$utils.getBadgeStatusColor(invoice.status).color" | ||||||
|               :font-size="$utils.getBadgeStatusColor(invoice.status).fontSize" |               :font-size="$utils.getBadgeStatusColor(invoice.status).fontSize" | ||||||
|  |               class="px-1 text-xs" | ||||||
|             > |             > | ||||||
|               {{ invoice.status }} |               {{ invoice.status }} | ||||||
|             </sw-badge> |             </sw-badge> | ||||||
|           </div> |           </div> | ||||||
|  |  | ||||||
|           <div class="flex-1 whitespace-no-wrap right"> |           <div class="flex-1 whitespace-nowrap right"> | ||||||
|             <div |             <div | ||||||
|               class="mb-2 text-xl not-italic font-semibold leading-8 text-right text-gray-900" |               class="mb-2 text-xl not-italic font-semibold leading-8 text-right text-gray-900" | ||||||
|               v-html=" |               v-html=" | ||||||
|  | |||||||
| @ -20,8 +20,8 @@ | |||||||
|           </sw-dropdown-item> |           </sw-dropdown-item> | ||||||
|  |  | ||||||
|           <sw-dropdown-item |           <sw-dropdown-item | ||||||
|             tag-name="router-link" |  | ||||||
|             :to="`/admin/payments/${$route.params.id}/edit`" |             :to="`/admin/payments/${$route.params.id}/edit`" | ||||||
|  |             tag-name="router-link" | ||||||
|           > |           > | ||||||
|             <pencil-icon class="h-5 mr-3 text-gray-600" /> |             <pencil-icon class="h-5 mr-3 text-gray-600" /> | ||||||
|             {{ $t('general.edit') }} |             {{ $t('general.edit') }} | ||||||
| @ -68,10 +68,10 @@ | |||||||
|             <sw-dropdown-item class="flex cursor-pointer"> |             <sw-dropdown-item class="flex cursor-pointer"> | ||||||
|               <sw-input-group class="-mt-3 font-normal"> |               <sw-input-group class="-mt-3 font-normal"> | ||||||
|                 <sw-radio |                 <sw-radio | ||||||
|                   :label="$t('invoices.title')" |  | ||||||
|                   size="sm" |  | ||||||
|                   id="filter_invoice_number" |                   id="filter_invoice_number" | ||||||
|  |                   :label="$t('invoices.title')" | ||||||
|                   v-model="searchData.orderByField" |                   v-model="searchData.orderByField" | ||||||
|  |                   size="sm" | ||||||
|                   name="filter" |                   name="filter" | ||||||
|                   value="invoice_number" |                   value="invoice_number" | ||||||
|                   @change="onSearch" |                   @change="onSearch" | ||||||
| @ -82,10 +82,10 @@ | |||||||
|             <sw-dropdown-item class="flex cursor-pointer"> |             <sw-dropdown-item class="flex cursor-pointer"> | ||||||
|               <sw-input-group class="-mt-3 font-normal"> |               <sw-input-group class="-mt-3 font-normal"> | ||||||
|                 <sw-radio |                 <sw-radio | ||||||
|                   :label="$t('payments.date')" |  | ||||||
|                   size="sm" |  | ||||||
|                   id="filter_payment_date" |                   id="filter_payment_date" | ||||||
|  |                   :label="$t('payments.date')" | ||||||
|                   v-model="searchData.orderByField" |                   v-model="searchData.orderByField" | ||||||
|  |                   size="sm" | ||||||
|                   name="filter" |                   name="filter" | ||||||
|                   value="payment_date" |                   value="payment_date" | ||||||
|                   @change="onSearch" |                   @change="onSearch" | ||||||
| @ -109,8 +109,8 @@ | |||||||
|           </sw-dropdown> |           </sw-dropdown> | ||||||
|  |  | ||||||
|           <sw-button |           <sw-button | ||||||
|             class="ml-1" |  | ||||||
|             v-tooltip.top-center="{ content: getOrderName }" |             v-tooltip.top-center="{ content: getOrderName }" | ||||||
|  |             class="ml-1" | ||||||
|             size="md" |             size="md" | ||||||
|             variant="gray-light" |             variant="gray-light" | ||||||
|             @click="sortData" |             @click="sortData" | ||||||
| @ -162,7 +162,7 @@ | |||||||
|             </div> |             </div> | ||||||
|           </div> |           </div> | ||||||
|  |  | ||||||
|           <div class="flex-1 whitespace-no-wrap right"> |           <div class="flex-1 whitespace-nowrap right"> | ||||||
|             <div |             <div | ||||||
|               class="mb-2 text-xl not-italic font-semibold leading-8 text-right text-gray-900" |               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)" |               v-html="$utils.formatMoney(payment.amount, payment.user.currency)" | ||||||
|  | |||||||
| @ -65,7 +65,7 @@ | |||||||
|       /> |       /> | ||||||
|  |  | ||||||
|       <a |       <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" |         @click="viewReportsPDF" | ||||||
|       > |       > | ||||||
|         <document-text-icon /> |         <document-text-icon /> | ||||||
|  | |||||||
| @ -67,7 +67,7 @@ | |||||||
|       /> |       /> | ||||||
|  |  | ||||||
|       <a |       <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" |         @click="viewReportsPDF" | ||||||
|       > |       > | ||||||
|         <document-text-icon /> |         <document-text-icon /> | ||||||
|  | |||||||
| @ -79,7 +79,7 @@ | |||||||
|         class="hidden w-full h-screen border-gray-100 border-solid rounded md:flex" |         class="hidden w-full h-screen border-gray-100 border-solid rounded md:flex" | ||||||
|       /> |       /> | ||||||
|       <a |       <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" |         @click="viewReportsPDF" | ||||||
|       > |       > | ||||||
|         <document-text-icon /> |         <document-text-icon /> | ||||||
|  | |||||||
| @ -61,7 +61,7 @@ | |||||||
|         class="hidden w-full h-screen border-gray-100 border-solid rounded md:flex" |         class="hidden w-full h-screen border-gray-100 border-solid rounded md:flex" | ||||||
|       /> |       /> | ||||||
|       <a |       <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" |         @click="viewReportsPDF" | ||||||
|       > |       > | ||||||
|         <document-text-icon /> |         <document-text-icon /> | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="relative setting-main-container backup"> |   <div class="relative setting-main-container backup"> | ||||||
|     <sw-card variant="setting-card"> |     <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> |         <div> | ||||||
|           <h6 class="sw-section-title"> |           <h6 class="sw-section-title"> | ||||||
|             {{ $tc('settings.backup.title', 1) }} |             {{ $tc('settings.backup.title', 1) }} | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| <template> | <template> | ||||||
|   <sw-card variant="setting-card"> |   <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> |       <div> | ||||||
|         <h6 class="sw-section-title"> |         <h6 class="sw-section-title"> | ||||||
|           {{ $t('settings.menu_title.custom_fields') }} |           {{ $t('settings.menu_title.custom_fields') }} | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| <template> | <template> | ||||||
|   <sw-card variant="setting-card"> |   <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> |       <div> | ||||||
|         <h6 class="sw-section-title"> |         <h6 class="sw-section-title"> | ||||||
|           {{ $t('settings.expense_category.title') }} |           {{ $t('settings.expense_category.title') }} | ||||||
| @ -51,7 +51,7 @@ | |||||||
|           }}</span> |           }}</span> | ||||||
|           <div class="w-48 overflow-hidden notes"> |           <div class="w-48 overflow-hidden notes"> | ||||||
|             <div |             <div | ||||||
|               class="overflow-hidden whitespace-no-wrap" |               class="overflow-hidden whitespace-nowrap" | ||||||
|               style="text-overflow: ellipsis" |               style="text-overflow: ellipsis" | ||||||
|             > |             > | ||||||
|               {{ row.description }} |               {{ row.description }} | ||||||
|  | |||||||
| @ -1,7 +1,7 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="setting-main-container backup"> |   <div class="setting-main-container backup"> | ||||||
|     <sw-card variant="setting-card"> |     <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> |         <div> | ||||||
|           <h6 class="sw-section-title"> |           <h6 class="sw-section-title"> | ||||||
|             {{ $tc('settings.disk.title', 1) }} |             {{ $tc('settings.disk.title', 1) }} | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| <template> | <template> | ||||||
|   <sw-card variant="setting-card"> |   <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> |       <div> | ||||||
|         <h6 class="sw-section-title"> |         <h6 class="sw-section-title"> | ||||||
|           {{ $t('settings.customization.notes.title') }} |           {{ $t('settings.customization.notes.title') }} | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| <template> | <template> | ||||||
|   <sw-card variant="setting-card"> |   <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> |       <div> | ||||||
|         <h6 class="sw-section-title"> |         <h6 class="sw-section-title"> | ||||||
|           {{ $t('settings.customization.payments.payment_modes') }} |           {{ $t('settings.customization.payments.payment_modes') }} | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| <template> | <template> | ||||||
|   <sw-card variant="setting-card"> |   <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> |       <div> | ||||||
|         <h6 class="sw-section-title"> |         <h6 class="sw-section-title"> | ||||||
|           {{ $t('settings.tax_types.title') }} |           {{ $t('settings.tax_types.title') }} | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| <template> | <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" /> |     <base-loader v-if="isRequestOnGoing" :show-bg-overlay="true" /> | ||||||
|     <sw-card variant="setting-card"> |     <sw-card variant="setting-card"> | ||||||
|       <template slot="header"> |       <template slot="header"> | ||||||
| @ -17,7 +17,7 @@ | |||||||
|       <div class="grid mb-4 md:grid-cols-6"> |       <div class="grid mb-4 md:grid-cols-6"> | ||||||
|         <div> |         <div> | ||||||
|           <label |           <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') }} |             {{ $tc('settings.account_settings.profile_picture') }} | ||||||
|           </label> |           </label> | ||||||
| @ -114,9 +114,9 @@ | |||||||
|       </div> |       </div> | ||||||
|  |  | ||||||
|       <sw-button |       <sw-button | ||||||
|         class="mt-6" |  | ||||||
|         :loading="isLoading" |         :loading="isLoading" | ||||||
|         :disabled="isLoading" |         :disabled="isLoading" | ||||||
|  |         class="mt-6" | ||||||
|         variant="primary" |         variant="primary" | ||||||
|       > |       > | ||||||
|         <save-icon v-if="!isLoading" class="mr-2 -ml-1" /> |         <save-icon v-if="!isLoading" class="mr-2 -ml-1" /> | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| <template> | <template> | ||||||
|   <div> |   <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"> |       <sw-button size="lg" variant="primary-outline" @click="addItemUnit"> | ||||||
|         <plus-icon class="w-6 h-6 mr-1 -ml-2" /> |         <plus-icon class="w-6 h-6 mr-1 -ml-2" /> | ||||||
|         {{ $t('settings.customization.items.add_item_unit') }} |         {{ $t('settings.customization.items.add_item_unit') }} | ||||||
|  | |||||||
							
								
								
									
										8
									
								
								resources/assets/sass/crater.scss
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								resources/assets/sass/crater.scss
									
									
									
									
										vendored
									
									
								
							| @ -1,11 +1,9 @@ | |||||||
| // Tailwind | @tailwind base; | ||||||
| //---------------------------------- |  | ||||||
|  |  | ||||||
| @import 'tailwindcss/base'; | @tailwind components; | ||||||
|  |  | ||||||
| @import 'tailwindcss/components'; | @tailwind utilities; | ||||||
|  |  | ||||||
| @import 'tailwindcss/utilities'; |  | ||||||
|  |  | ||||||
| // Plugins | // Plugins | ||||||
| //---------------------------------- | //---------------------------------- | ||||||
|  | |||||||
| @ -94,7 +94,7 @@ | |||||||
|                 </tr> |                 </tr> | ||||||
|             @endforeach |             @endforeach | ||||||
|         @endif |         @endif | ||||||
|  |         @if($estimate->discount > 0) | ||||||
|             @if ($estimate->discount_per_item === 'NO') |             @if ($estimate->discount_per_item === 'NO') | ||||||
|                 <tr> |                 <tr> | ||||||
|                     <td class="pl-10 border-0 total-table-attribute-label"> |                     <td class="pl-10 border-0 total-table-attribute-label"> | ||||||
| @ -115,6 +115,7 @@ | |||||||
|                     </td> |                     </td> | ||||||
|                 </tr> |                 </tr> | ||||||
|             @endif |             @endif | ||||||
|  |         @endif | ||||||
|         <tr> |         <tr> | ||||||
|             <td class="py-3"></td> |             <td class="py-3"></td> | ||||||
|             <td class="py-3"></td> |             <td class="py-3"></td> | ||||||
|  | |||||||
| @ -39,6 +39,7 @@ | |||||||
|             > |             > | ||||||
|                 {!! format_money_pdf($item->price, $invoice->user->currency) !!} |                 {!! format_money_pdf($item->price, $invoice->user->currency) !!} | ||||||
|             </td> |             </td> | ||||||
|  |  | ||||||
|             @if($invoice->discount_per_item === 'YES') |             @if($invoice->discount_per_item === 'YES') | ||||||
|                 <td |                 <td | ||||||
|                     class="pl-10 text-right item-cell" |                     class="pl-10 text-right item-cell" | ||||||
| @ -52,6 +53,7 @@ | |||||||
|                         @endif |                         @endif | ||||||
|                 </td> |                 </td> | ||||||
|             @endif |             @endif | ||||||
|  |  | ||||||
|             <td |             <td | ||||||
|                 class="text-right item-cell" |                 class="text-right item-cell" | ||||||
|                 style="vertical-align: top;" |                 style="vertical-align: top;" | ||||||
| @ -100,6 +102,7 @@ | |||||||
|             @endforeach |             @endforeach | ||||||
|         @endif |         @endif | ||||||
|  |  | ||||||
|  |         @if($invoice->discount > 0) | ||||||
|             @if ($invoice->discount_per_item === 'NO') |             @if ($invoice->discount_per_item === 'NO') | ||||||
|                 <tr> |                 <tr> | ||||||
|                     <td class="border-0 total-table-attribute-label"> |                     <td class="border-0 total-table-attribute-label"> | ||||||
| @ -120,6 +123,8 @@ | |||||||
|                     </td> |                     </td> | ||||||
|                 </tr> |                 </tr> | ||||||
|             @endif |             @endif | ||||||
|  |         @endif | ||||||
|  |  | ||||||
|         <tr> |         <tr> | ||||||
|             <td class="py-3"></td> |             <td class="py-3"></td> | ||||||
|             <td class="py-3"></td> |             <td class="py-3"></td> | ||||||
|  | |||||||
| @ -6,10 +6,11 @@ module.exports = { | |||||||
|     './resources/assets/js/**/*.js', |     './resources/assets/js/**/*.js', | ||||||
|     './resources/assets/js/**/*.vue', |     './resources/assets/js/**/*.vue', | ||||||
|     './resources/assets/sass/**/*.scss', |     './resources/assets/sass/**/*.scss', | ||||||
|     './node_modules/@bytefury/spacewind/**/*.js', |     './node_modules/\\@bytefury/spacewind/src/**/*.js', | ||||||
|     './node_modules/@bytefury/spacewind/**/*.vue', |     './node_modules/\\@bytefury/spacewind/src/**/*.vue', | ||||||
|     './node_modules/flatpickr/**/*.js', |     './node_modules/\\@bytefury/spacewind/plugin/**/*.js', | ||||||
|     './node_modules/toastr/**/*.js', |     'flatpickr/**/*.js', | ||||||
|  |     'toastr/**/*.js', | ||||||
|     './public/js/pace/**/*.js', |     './public/js/pace/**/*.js', | ||||||
|   ], |   ], | ||||||
|   theme: { |   theme: { | ||||||
|  | |||||||
| @ -1,5 +1,6 @@ | |||||||
| const mix = require('laravel-mix') | const mix = require('laravel-mix') | ||||||
| const tailwindcss = require('tailwindcss') | const tailwindcss = require('tailwindcss') | ||||||
|  | const path = require('path') | ||||||
|  |  | ||||||
| mix.webpackConfig({ | mix.webpackConfig({ | ||||||
|   resolve: { |   resolve: { | ||||||
| @ -9,17 +10,14 @@ mix.webpackConfig({ | |||||||
|   }, |   }, | ||||||
| }) | }) | ||||||
|  |  | ||||||
| /* |  | ||||||
|  |-------------------------------------------------------------------------- |  | ||||||
|  | Admin |  | ||||||
|  |-------------------------------------------------------------------------- |  | ||||||
|  */ |  | ||||||
|  |  | ||||||
| mix | mix | ||||||
|   .js('resources/assets/js/app.js', 'public/assets/js/') |   .js('resources/assets/js/app.js', 'public/assets/js/') | ||||||
|  |   .vue({ | ||||||
|  |     version: 2, | ||||||
|  |     extractVueStyles: true, | ||||||
|  |   }) | ||||||
|   .sass('resources/assets/sass/crater.scss', 'public/assets/css/') |   .sass('resources/assets/sass/crater.scss', 'public/assets/css/') | ||||||
|   .options({ |   .options({ | ||||||
|     processCssUrls: false, |  | ||||||
|     postCss: [tailwindcss('./tailwind.config.js')], |     postCss: [tailwindcss('./tailwind.config.js')], | ||||||
|   }) |   }) | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	