Compare commits

...

8 Commits

Author SHA1 Message Date
c8ee6389a4 update cs fixer package 2022-06-10 13:56:16 +05:30
e4bd002fae remove console log 2022-06-10 12:42:08 +05:30
05abf7fa74 fix tax issue 2022-06-10 12:06:12 +05:30
33bc9ded65 Bump guzzlehttp/guzzle from 7.4.1 to 7.4.3 (#936)
Bumps [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) from 7.4.1 to 7.4.3.
- [Release notes](https://github.com/guzzle/guzzle/releases)
- [Changelog](https://github.com/guzzle/guzzle/blob/master/CHANGELOG.md)
- [Commits](https://github.com/guzzle/guzzle/compare/7.4.1...7.4.3)

---
updated-dependencies:
- dependency-name: guzzlehttp/guzzle
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-05 14:10:27 +05:30
4271ef451e Php 8 compliant (#914) 2022-06-05 14:09:42 +05:30
6eb44fba93 Update cron.dockerfile (#949) 2022-06-05 14:09:11 +05:30
96e7300583 Make unit clearable (#918) 2022-05-28 11:55:09 +05:30
a479d966d1 Update en.json (#925)
Corrected sentence case from "Expiry date" to "Expiry Date"
2022-05-28 11:54:32 +05:30
8 changed files with 928 additions and 1526 deletions

View File

@ -38,15 +38,15 @@
"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.0", "friendsofphp/php-cs-fixer": "^3.8",
"fzaninotto/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",
"pestphp/pest": "^1.0", "pestphp/pest": "^1.0",
"pestphp/pest-plugin-faker": "^1.0", "pestphp/pest-plugin-faker": "^1.0",
"pestphp/pest-plugin-laravel": "^1.0", "pestphp/pest-plugin-laravel": "^1.0",
"pestphp/pest-plugin-parallel": "^0.2.1", "pestphp/pest-plugin-parallel": "^0.2.1",
"phpunit/phpunit": "^9.0" "phpunit/phpunit": "^9.3"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -88,4 +88,4 @@
"dont-discover": [] "dont-discover": []
} }
} }
} }

2347
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
FROM php:7.4-fpm-alpine FROM php:8.0-fpm-alpine
RUN apk add --no-cache \ RUN apk add --no-cache \
php7-bcmath php8-bcmath
RUN docker-php-ext-install pdo pdo_mysql bcmath RUN docker-php-ext-install pdo pdo_mysql bcmath

View File

@ -17,18 +17,7 @@
<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=" class="flex items-center justify-center w-5 h-5 mt-2 mr-2 text-gray-300 cursor-move handle"
flex
items-center
justify-center
w-5
h-5
mt-2
text-gray-300
cursor-move
handle
mr-2
"
> >
<DragIcon /> <DragIcon />
</div> </div>
@ -108,7 +97,7 @@
<BaseIcon <BaseIcon
name="ChevronDownIcon" name="ChevronDownIcon"
class="w-4 h-4 text-gray-500 ml-1" class="w-4 h-4 ml-1 text-gray-500"
/> />
</span> </span>
</BaseButton> </BaseButton>
@ -155,7 +144,7 @@
<BaseContentPlaceholders v-if="loading"> <BaseContentPlaceholders v-if="loading">
<BaseContentPlaceholdersText <BaseContentPlaceholdersText
:lines="1" :lines="1"
class="w-24 h-8 rounded-md border" class="w-24 h-8 border rounded-md"
/> />
</BaseContentPlaceholders> </BaseContentPlaceholders>
@ -175,6 +164,7 @@
: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,24 +30,13 @@
<template v-if="userStore.hasAbilities(ability)" #action> <template v-if="userStore.hasAbilities(ability)" #action>
<button <button
type="button" type="button"
class=" class="flex items-center justify-center w-full px-2 py-2 bg-gray-200 border-none outline-none cursor-pointer "
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 text-primary-400 cursor-pointer" class="ml-2 text-sm leading-none cursor-pointer text-primary-400"
>{{ $t('invoices.add_new_tax') }}</label >{{ $t('invoices.add_new_tax') }}</label
> >
</button> </button>
@ -115,6 +104,10 @@ 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,
@ -153,19 +146,19 @@ const filteredTypes = computed(() => {
}) })
const taxAmount = computed(() => { const taxAmount = computed(() => {
if (localTax.compound_tax && props.total) { if (localTax.compound_tax && props.discountedTotal) {
return ((props.total + props.totalTax) * localTax.percent) / 100 return ((props.discountedTotal + props.totalTax) * localTax.percent) / 100
} }
if (props.total && localTax.percent) { if (props.discountedTotal && localTax.percent) {
return (props.total * localTax.percent) / 100 return (props.discountedTotal * localTax.percent) / 100
} }
return 0 return 0
}) })
watch( watch(
() => props.total, () => props.discountedTotal,
() => { () => {
updateRowTax() updateRowTax()
} }

View File

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

@ -54,8 +54,6 @@
label="name" label="name"
:options="itemStore.itemUnits" :options="itemStore.itemUnits"
value-prop="id" value-prop="id"
:can-deselect="false"
:can-clear="false"
:placeholder="$t('items.select_a_unit')" :placeholder="$t('items.select_a_unit')"
searchable searchable
track-by="name" track-by="name"

View File

@ -1485,7 +1485,7 @@
"pdf_estimate_label": "Estimate", "pdf_estimate_label": "Estimate",
"pdf_estimate_number": "Estimate Number", "pdf_estimate_number": "Estimate Number",
"pdf_estimate_date": "Estimate Date", "pdf_estimate_date": "Estimate Date",
"pdf_estimate_expire_date": "Expiry date", "pdf_estimate_expire_date": "Expiry Date",
"pdf_invoice_label": "Invoice", "pdf_invoice_label": "Invoice",
"pdf_invoice_number": "Invoice Number", "pdf_invoice_number": "Invoice Number",
"pdf_invoice_date": "Invoice Date", "pdf_invoice_date": "Invoice Date",