diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue
index b78c99b8a..662e6006a 100644
--- a/src/components/common/VnSelect.vue
+++ b/src/components/common/VnSelect.vue
@@ -294,7 +294,7 @@ async function onScroll({ to, direction, from, index }) {
}
}
-defineExpose({ opts: myOptions });
+defineExpose({ opts: myOptions, vnSelectRef });
function handleKeyDown(event) {
if (event.key === 'Tab' && !event.shiftKey) {
diff --git a/src/components/common/VnSelectDialog.vue b/src/components/common/VnSelectDialog.vue
index 12322c3fa..a4cd0011d 100644
--- a/src/components/common/VnSelectDialog.vue
+++ b/src/components/common/VnSelectDialog.vue
@@ -1,5 +1,5 @@
emit('update:modelValue', ...args)"
diff --git a/src/css/app.scss b/src/css/app.scss
index 9060d2fa7..5891aa29a 100644
--- a/src/css/app.scss
+++ b/src/css/app.scss
@@ -306,6 +306,14 @@ input::-webkit-inner-spin-button {
.no-visible {
visibility: hidden;
}
+
+.q-item > .q-item__section:has(.q-checkbox) {
+ max-width: min-content;
+}
+
+.row > .column:has(.q-checkbox) {
+ max-width: min-content;
+}
.q-field__inner {
.q-field__control {
min-height: auto !important;
diff --git a/src/pages/InvoiceIn/Card/InvoiceInVat.vue b/src/pages/InvoiceIn/Card/InvoiceInVat.vue
index f7ef7d525..74fd02816 100644
--- a/src/pages/InvoiceIn/Card/InvoiceInVat.vue
+++ b/src/pages/InvoiceIn/Card/InvoiceInVat.vue
@@ -25,6 +25,7 @@ const sageTaxTypes = ref([]);
const sageTransactionTypes = ref([]);
const rowsSelected = ref([]);
const invoiceInFormRef = ref();
+const expenseRef = ref();
defineProps({
actionIcon: {
@@ -128,7 +129,7 @@ function autocompleteExpense(evt, row, col) {
({ id }) => id == useAccountShortToStandard(param)
);
- if (lookup) row[col.model] = lookup;
+ expenseRef.value.vnSelectDialogRef.vnSelectRef.toggleOption(lookup);
}
@@ -167,6 +168,7 @@ function autocompleteExpense(evt, row, col) {
route.params.id,
@@ -197,6 +196,7 @@ const changeQuantity = async (sale) => {
try {
if (!rowToUpdate.value) return;
rowToUpdate.value = null;
+ sale.isNew = false;
await updateQuantity(sale);
} catch (e) {
const { quantity } = tableRef.value.CrudModelRef.originalData.find(
@@ -214,9 +214,6 @@ const updateQuantity = async ({ quantity, id }) => {
};
const addSale = async (sale) => {
- if (isLoading.value) return;
-
- isLoading.value = true;
const params = {
barcode: sale.itemFk,
quantity: sale.quantity,
@@ -237,6 +234,7 @@ const addSale = async (sale) => {
sale.item = newSale.item;
notify('globals.dataSaved', 'positive');
+ sale.isNew = false;
arrayData.fetch({});
};
@@ -754,6 +752,7 @@ watch(
option-label="name"
option-value="id"
v-model="row.itemFk"
+ :use-like="false"
@update:model-value="updateItem(row)"
>