mirror of
https://github.com/frappe/books.git
synced 2025-02-02 03:58:26 +00:00
fix: removed returnInvoice option from POSsettings schema
This commit is contained in:
parent
792c6769ad
commit
26cfbb246e
@ -57,13 +57,6 @@
|
||||
"default": false,
|
||||
"hidden": true
|
||||
},
|
||||
{
|
||||
"fieldname": "returnInvoice",
|
||||
"label": "Return Invoice",
|
||||
"fieldtype": "Check",
|
||||
"default": true,
|
||||
"section": "Default"
|
||||
},
|
||||
{
|
||||
"fieldname": "weightEnabledBarcode",
|
||||
"label": "Weigth Enabled Barcode",
|
||||
|
@ -253,11 +253,7 @@
|
||||
<div class="w-full flex gap-2">
|
||||
<Button
|
||||
class="w-full bg-violet-500 dark:bg-violet-700"
|
||||
:class="`${
|
||||
fyo.doc.singles.POSSettings.returnInvoice
|
||||
? 'py-5'
|
||||
: 'py-6'
|
||||
}`"
|
||||
:class="`${isEnableInvoiceReturn ? 'py-5' : 'py-6'}`"
|
||||
:disabled="!sinvDoc?.party || !sinvDoc?.items?.length"
|
||||
@click="$emit('saveInvoiceAction')"
|
||||
>
|
||||
@ -269,11 +265,7 @@
|
||||
</Button>
|
||||
<Button
|
||||
class="w-full bg-red-500 dark:bg-red-700"
|
||||
:class="`${
|
||||
fyo.doc.singles.POSSettings.returnInvoice
|
||||
? 'py-5'
|
||||
: 'py-6'
|
||||
}`"
|
||||
:class="`${isEnableInvoiceReturn ? 'py-5' : 'py-6'}`"
|
||||
:disabled="!sinvDoc?.items?.length"
|
||||
@click="() => $emit('clearValues')"
|
||||
>
|
||||
@ -286,17 +278,11 @@
|
||||
</div>
|
||||
<div
|
||||
class="w-full flex gap-2"
|
||||
:class="`${
|
||||
fyo.doc.singles.POSSettings.returnInvoice ? 'mt-2' : 'mt-4'
|
||||
}`"
|
||||
:class="`${isEnableInvoiceReturn ? 'mt-2' : 'mt-4'}`"
|
||||
>
|
||||
<Button
|
||||
class="w-full bg-blue-500 dark:bg-blue-700"
|
||||
:class="`${
|
||||
fyo.doc.singles.POSSettings.returnInvoice
|
||||
? 'py-5'
|
||||
: 'py-6'
|
||||
}`"
|
||||
:class="`${isEnableInvoiceReturn ? 'py-5' : 'py-6'}`"
|
||||
@click="emitEvent('toggleModal', 'SavedInvoice', true)"
|
||||
>
|
||||
<slot>
|
||||
@ -307,7 +293,7 @@
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
v-if="fyo.doc.singles.POSSettings.returnInvoice"
|
||||
v-if="isEnableInvoiceReturn"
|
||||
class="w-full bg-orange-500 dark:bg-orange-700 py-5"
|
||||
@click="
|
||||
emitEvent('toggleModal', 'ReturnSalesInvoice', true)
|
||||
@ -322,11 +308,7 @@
|
||||
<Button
|
||||
v-else
|
||||
class="w-full bg-green-500 dark:bg-green-700"
|
||||
:class="`${
|
||||
fyo.doc.singles.POSSettings.returnInvoice
|
||||
? 'py-5'
|
||||
: 'py-6'
|
||||
}`"
|
||||
:class="`${isEnableInvoiceReturn ? 'py-5' : 'py-6'}`"
|
||||
:disabled="disablePayButton"
|
||||
@click="emitEvent('toggleModal', 'Payment', true)"
|
||||
>
|
||||
@ -338,7 +320,7 @@
|
||||
</Button>
|
||||
</div>
|
||||
<Button
|
||||
v-if="fyo.doc.singles.POSSettings.returnInvoice"
|
||||
v-if="isEnableInvoiceReturn"
|
||||
class="w-full bg-green-500 mt-2 dark:bg-green-700 py-5"
|
||||
:disabled="disablePayButton"
|
||||
@click="emitEvent('toggleModal', 'Payment', true)"
|
||||
@ -487,6 +469,10 @@ export default defineComponent({
|
||||
itemSearchTerm: '',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isEnableInvoiceReturn: () =>
|
||||
fyo.singles.AccountingSettings?.enableInvoiceReturns ?? undefined,
|
||||
},
|
||||
methods: {
|
||||
emitEvent(
|
||||
eventName: PosEmits,
|
||||
|
@ -210,7 +210,7 @@
|
||||
</slot>
|
||||
</Button>
|
||||
<Button
|
||||
v-if="fyo.doc.singles.POSSettings.returnInvoice"
|
||||
v-if="isEnableInvoiceReturn"
|
||||
class="mt-2 w-full bg-orange-500 dark:bg-orange-700 py-5"
|
||||
@click="emitEvent('toggleModal', 'ReturnSalesInvoice', true)"
|
||||
>
|
||||
@ -235,7 +235,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<Button
|
||||
v-if="fyo.doc.singles.POSSettings.returnInvoice"
|
||||
v-if="isEnableInvoiceReturn"
|
||||
class="mt-2 w-full bg-green-500 dark:bg-green-700 py-5"
|
||||
:disabled="disablePayButton"
|
||||
@click="emitEvent('toggleModal', 'Payment', true)"
|
||||
@ -476,6 +476,10 @@ export default defineComponent({
|
||||
itemSearchTerm: '',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isEnableInvoiceReturn: () =>
|
||||
fyo.singles.AccountingSettings?.enableInvoiceReturns ?? undefined,
|
||||
},
|
||||
methods: {
|
||||
emitEvent(
|
||||
eventName: PosEmits,
|
||||
|
Loading…
x
Reference in New Issue
Block a user