2
0
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:
AbleKSaju 2024-10-18 11:11:56 +05:30
parent 8a9017423b
commit 1e67214796
2 changed files with 8 additions and 6 deletions

View File

@ -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 {

View File

@ -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({