fix: refs #7936 descriptor & dueday
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Jorge Penadés 2024-11-27 13:26:54 +01:00
parent 23e9579b7c
commit 8324c0587d
2 changed files with 11 additions and 3 deletions

View File

@ -126,14 +126,14 @@ const isNotFilled = computed(() => Object.values(correctionFormData).includes(nu
onBeforeMount(async () => {
await setInvoiceCorrection(entityId.value);
const { data } = await axios.get(`InvoiceIns/${entityId.value}/getTotals`);
totalAmount.value = data.totalDueDay;
totalAmount.value = data.totalTaxableBase;
});
onBeforeRouteUpdate(async (to, from) => {
if (to.params.id !== from.params.id) {
await setInvoiceCorrection(to.params.id);
const { data } = await axios.get(`InvoiceIns/${to.params.id}/getTotals`);
totalAmount.value = data.totalDueDay;
totalAmount.value = data.totalTaxableBase;
}
});

View File

@ -25,6 +25,7 @@ const banks = ref([]);
const invoiceInFormRef = ref();
const invoiceId = +route.params.id;
const filter = { where: { invoiceInFk: invoiceId } };
const areRows = ref(false);
const columns = computed(() => [
{
@ -230,7 +231,14 @@ async function insert() {
</template>
</CrudModel>
<QPageSticky position="bottom-right" :offset="[25, 25]">
<QBtn color="primary" icon="add" shortcut="+" size="lg" round @click="insert" />
<QBtn
color="primary"
icon="add"
shortcut="+"
size="lg"
round
@click="!areRows ? insert() : invoiceInFormRef.insert()"
/>
</QPageSticky>
</template>
<style lang="scss" scoped>