mirror of
https://github.com/frappe/books.git
synced 2025-01-03 07:12:21 +00:00
chore: refactor code
This commit is contained in:
parent
8a9017423b
commit
1e67214796
@ -1,4 +1,4 @@
|
||||
import { Fyo, t } from 'fyo';
|
||||
import { Fyo } from 'fyo';
|
||||
import { DocValueMap } from 'fyo/core/types';
|
||||
import { Doc } from 'fyo/model/doc';
|
||||
import {
|
||||
|
@ -112,6 +112,7 @@
|
||||
:item-qty-map="itemQtyMap"
|
||||
@add-item="addItem"
|
||||
/>
|
||||
|
||||
<ItemsGrid
|
||||
v-else
|
||||
:items="items"
|
||||
@ -254,11 +255,7 @@
|
||||
'dark:bg-gray-600 cursor-not-allowed':
|
||||
!sinvDoc.party || !sinvDoc.items?.length,
|
||||
}"
|
||||
@click="
|
||||
sinvDoc.party && sinvDoc.items?.length
|
||||
? toggleModal('CouponCode', true)
|
||||
: null
|
||||
"
|
||||
@click="openCouponModal()"
|
||||
>
|
||||
<svg
|
||||
fill="#000000"
|
||||
@ -1006,6 +1003,11 @@ export default defineComponent({
|
||||
});
|
||||
}
|
||||
},
|
||||
openCouponModal() {
|
||||
if (this.sinvDoc.party && this.sinvDoc.items?.length) {
|
||||
this.toggleModal('CouponCode', true);
|
||||
}
|
||||
},
|
||||
async submitSinvDoc(shouldPrint: boolean) {
|
||||
this.sinvDoc.once('afterSubmit', async () => {
|
||||
showToast({
|
||||
|
Loading…
Reference in New Issue
Block a user