Compare commits

..

2 Commits

Author SHA1 Message Date
0c821b8ae9 Removed telescope service provider file 2022-10-20 19:13:44 +05:30
bbddd88573 fixed report pdf issue 2022-10-15 13:10:56 +05:30
7 changed files with 1528 additions and 938 deletions

View File

@ -38,7 +38,7 @@
"barryvdh/laravel-ide-helper": "^2.6", "barryvdh/laravel-ide-helper": "^2.6",
"beyondcode/laravel-dump-server": "^1.0", "beyondcode/laravel-dump-server": "^1.0",
"facade/ignition": "^2.3.6", "facade/ignition": "^2.3.6",
"friendsofphp/php-cs-fixer": "^3.8", "friendsofphp/php-cs-fixer": "^3.0",
"fakerphp/faker": "^1.9.1", "fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.3.1", "mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^5.0", "nunomaduro/collision": "^5.0",
@ -81,10 +81,7 @@
"config": { "config": {
"optimize-autoloader": true, "optimize-autoloader": true,
"preferred-install": "dist", "preferred-install": "dist",
"sort-packages": true, "sort-packages": true
"allow-plugins": {
"pestphp/pest-plugin": true
}
}, },
"extra": { "extra": {
"laravel": { "laravel": {

2365
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,6 @@
#!/bin/sh #!/bin/sh
docker compose exec app composer config --no-plugins allow-plugins.pestphp/pest-plugin true
docker-compose exec app composer install --no-interaction --prefer-dist --optimize-autoloader docker-compose exec app composer install --no-interaction --prefer-dist --optimize-autoloader
docker-compose exec app php artisan storage:link || true docker-compose exec app php artisan storage:link || true

View File

@ -17,7 +17,18 @@
<td class="px-5 py-4 text-left align-top"> <td class="px-5 py-4 text-left align-top">
<div class="flex justify-start"> <div class="flex justify-start">
<div <div
class="flex items-center justify-center w-5 h-5 mt-2 mr-2 text-gray-300 cursor-move handle" class="
flex
items-center
justify-center
w-5
h-5
mt-2
text-gray-300
cursor-move
handle
mr-2
"
> >
<DragIcon /> <DragIcon />
</div> </div>
@ -97,7 +108,7 @@
<BaseIcon <BaseIcon
name="ChevronDownIcon" name="ChevronDownIcon"
class="w-4 h-4 ml-1 text-gray-500" class="w-4 h-4 text-gray-500 ml-1"
/> />
</span> </span>
</BaseButton> </BaseButton>
@ -144,7 +155,7 @@
<BaseContentPlaceholders v-if="loading"> <BaseContentPlaceholders v-if="loading">
<BaseContentPlaceholdersText <BaseContentPlaceholdersText
:lines="1" :lines="1"
class="w-24 h-8 border rounded-md" class="w-24 h-8 rounded-md border"
/> />
</BaseContentPlaceholders> </BaseContentPlaceholders>
@ -164,7 +175,6 @@
:ability="abilities.CREATE_INVOICE" :ability="abilities.CREATE_INVOICE"
:store="store" :store="store"
:store-prop="storeProp" :store-prop="storeProp"
:discount="discount"
@update="updateTax" @update="updateTax"
/> />
</td> </td>

View File

@ -30,13 +30,24 @@
<template v-if="userStore.hasAbilities(ability)" #action> <template v-if="userStore.hasAbilities(ability)" #action>
<button <button
type="button" type="button"
class="flex items-center justify-center w-full px-2 py-2 bg-gray-200 border-none outline-none cursor-pointer " class="
flex
items-center
justify-center
w-full
px-2
cursor-pointer
py-2
bg-gray-200
border-none
outline-none
"
@click="openTaxModal" @click="openTaxModal"
> >
<BaseIcon name="CheckCircleIcon" class="h-5 text-primary-400" /> <BaseIcon name="CheckCircleIcon" class="h-5 text-primary-400" />
<label <label
class="ml-2 text-sm leading-none cursor-pointer text-primary-400" class="ml-2 text-sm leading-none text-primary-400 cursor-pointer"
>{{ $t('invoices.add_new_tax') }}</label >{{ $t('invoices.add_new_tax') }}</label
> >
</button> </button>
@ -104,10 +115,6 @@ const props = defineProps({
type: Number, type: Number,
default: 0, default: 0,
}, },
discountedTotal: {
type: Number,
default: 0,
},
currency: { currency: {
type: [Object, String], type: [Object, String],
required: true, required: true,
@ -146,19 +153,19 @@ const filteredTypes = computed(() => {
}) })
const taxAmount = computed(() => { const taxAmount = computed(() => {
if (localTax.compound_tax && props.discountedTotal) { if (localTax.compound_tax && props.total) {
return ((props.discountedTotal + props.totalTax) * localTax.percent) / 100 return ((props.total + props.totalTax) * localTax.percent) / 100
} }
if (props.discountedTotal && localTax.percent) { if (props.total && localTax.percent) {
return (props.discountedTotal * localTax.percent) / 100 return (props.total * localTax.percent) / 100
} }
return 0 return 0
}) })
watch( watch(
() => props.discountedTotal, () => props.total,
() => { () => {
updateRowTax() updateRowTax()
} }

View File

@ -29,7 +29,14 @@
<label <label
v-else v-else
class="flex items-center justify-center m-0 text-lg text-black uppercase " class="
flex
items-center
justify-center
m-0
text-lg text-black
uppercase
"
> >
<BaseFormatMoney <BaseFormatMoney
:amount="store.getSubTotal" :amount="store.getSubTotal"
@ -59,7 +66,14 @@
<label <label
v-else-if="store[storeProp].tax_per_item === 'YES'" v-else-if="store[storeProp].tax_per_item === 'YES'"
class="flex items-center justify-center m-0 text-lg text-black uppercase " class="
flex
items-center
justify-center
m-0
text-lg text-black
uppercase
"
> >
<BaseFormatMoney :amount="tax.amount" :currency="defaultCurrency" /> <BaseFormatMoney :amount="tax.amount" :currency="defaultCurrency" />
</label> </label>
@ -84,7 +98,7 @@
<BaseContentPlaceholders v-if="isLoading"> <BaseContentPlaceholders v-if="isLoading">
<BaseContentPlaceholdersText <BaseContentPlaceholdersText
:lines="1" :lines="1"
class="w-24 h-8 border rounded-md" class="w-24 h-8 rounded-md border"
/> />
</BaseContentPlaceholders> </BaseContentPlaceholders>
<div v-else class="flex" style="width: 140px" role="group"> <div v-else class="flex" style="width: 140px" role="group">
@ -100,7 +114,7 @@
<BaseDropdown position="bottom-end"> <BaseDropdown position="bottom-end">
<template #activator> <template #activator>
<BaseButton <BaseButton
class="p-2 rounded-none rounded-tr-md rounded-br-md" class="rounded-tr-md rounded-br-md p-2 rounded-none"
type="button" type="button"
variant="white" variant="white"
> >
@ -113,7 +127,7 @@
<BaseIcon <BaseIcon
name="ChevronDownIcon" name="ChevronDownIcon"
class="w-4 h-4 ml-1 text-gray-500" class="w-4 h-4 text-gray-500 ml-1"
/> />
</span> </span>
</BaseButton> </BaseButton>
@ -166,7 +180,15 @@
</div> </div>
<div <div
class="flex items-center justify-between w-full pt-2 mt-5 border-t border-gray-200 border-solid " class="
flex
items-center
justify-between
w-full
pt-2
mt-5
border-t border-gray-200 border-solid
"
> >
<BaseContentPlaceholders v-if="isLoading"> <BaseContentPlaceholders v-if="isLoading">
<BaseContentPlaceholdersText :lines="1" class="w-16 h-5" /> <BaseContentPlaceholdersText :lines="1" class="w-16 h-5" />
@ -182,7 +204,14 @@
</BaseContentPlaceholders> </BaseContentPlaceholders>
<label <label
v-else v-else
class="flex items-center justify-center text-lg uppercase text-primary-400" class="
flex
items-center
justify-center
text-lg
uppercase
text-primary-400
"
> >
<BaseFormatMoney :amount="store.getTotal" :currency="defaultCurrency" /> <BaseFormatMoney :amount="store.getTotal" :currency="defaultCurrency" />
</label> </label>
@ -305,7 +334,6 @@ function selectPercentage() {
function onSelectTax(selectedTax) { function onSelectTax(selectedTax) {
let amount = 0 let amount = 0
if (selectedTax.compound_tax && props.store.getSubtotalWithDiscount) { if (selectedTax.compound_tax && props.store.getSubtotalWithDiscount) {
amount = Math.round( amount = Math.round(
((props.store.getSubtotalWithDiscount + props.store.getTotalSimpleTax) * ((props.store.getSubtotalWithDiscount + props.store.getTotalSimpleTax) *

View File

@ -143,7 +143,7 @@
<template #activator> <template #activator>
<img <img
:src="previewAvatar" :src="previewAvatar"
class="block w-8 h-8 rounded md:h-9 md:w-9 object-cover" class="block w-8 h-8 rounded md:h-9 md:w-9"
/> />
</template> </template>