Merge branch 'master' into Hotfix-CustomerDescriptorIcons
gitea/salix-front/pipeline/pr-master This commit looks good Details

This commit is contained in:
Javier Segarra 2025-01-15 07:18:34 +00:00
commit 17f067144c
6 changed files with 29 additions and 15 deletions

View File

@ -773,6 +773,7 @@ travel:
totalEntries: Total entries totalEntries: Total entries
totalEntriesTooltip: Total entries totalEntriesTooltip: Total entries
daysOnward: Landed days onwards daysOnward: Landed days onwards
awb: AWB
summary: summary:
entryId: Entry Id entryId: Entry Id
freight: Freight freight: Freight

View File

@ -774,6 +774,7 @@ travel:
totalEntries: totalEntries:
totalEntriesTooltip: Entradas totales totalEntriesTooltip: Entradas totales
daysOnward: Días de llegada en adelante daysOnward: Días de llegada en adelante
awb: AWB
summary: summary:
entryId: Id entrada entryId: Id entrada
freight: Porte freight: Porte

View File

@ -38,7 +38,7 @@ const getBankEntities = (data, formData) => {
hide-selected hide-selected
option-label="name" option-label="name"
option-value="id" option-value="id"
v-model="data.payMethod" v-model="data.payMethodFk"
/> />
<VnInput :label="t('Due day')" clearable v-model="data.dueDay" /> <VnInput :label="t('Due day')" clearable v-model="data.dueDay" />
</VnRow> </VnRow>

View File

@ -59,6 +59,7 @@ const columns = computed(() => [
</script> </script>
<template> <template>
<VnTable <VnTable
:user-filter="{ include: filter.include }"
ref="tableRef" ref="tableRef"
data-key="ClientCredit" data-key="ClientCredit"
url="ClientCredits" url="ClientCredits"

View File

@ -79,6 +79,13 @@ const columns = computed(() => [
cardVisible: true, cardVisible: true,
create: true, create: true,
}, },
{
align: 'left',
name: 'awb',
label: t('travel.travelList.tableVisibleColumns.awb'),
columnFilter: false,
format: (row) => row.awbCode,
},
{ {
align: 'left', align: 'left',
name: 'warehouseInFk', name: 'warehouseInFk',

View File

@ -7,7 +7,14 @@ import useNotify from 'src/composables/useNotify.js';
import axios from 'axios'; import axios from 'axios';
const { notify } = useNotify(); const { notify } = useNotify();
const initInvoicing = {
invoicing: false,
nRequests: 0,
nPdfs: 0,
totalPdfs: 0,
addressIndex: 0,
errors: [],
};
export const useInvoiceOutGlobalStore = defineStore({ export const useInvoiceOutGlobalStore = defineStore({
id: 'invoiceOutGlobal', id: 'invoiceOutGlobal',
state: () => ({ state: () => ({
@ -23,16 +30,11 @@ export const useInvoiceOutGlobalStore = defineStore({
addresses: [], addresses: [],
minInvoicingDate: null, minInvoicingDate: null,
parallelism: null, parallelism: null,
invoicing: false,
isInvoicing: false,
status: null, status: null,
addressIndex: 0,
errors: [],
printer: null, printer: null,
nRequests: 0,
nPdfs: 0,
totalPdfs: 0,
formData: null, formData: null,
...initInvoicing,
}), }),
actions: { actions: {
async init() { async init() {
@ -117,12 +119,13 @@ export const useInvoiceOutGlobalStore = defineStore({
); );
throw new Error("There aren't addresses to invoice"); throw new Error("There aren't addresses to invoice");
} }
this.invoicing = false;
this.status = 'invoicing';
this.formData = formData; this.formData = formData;
this.addressIndex = 0; this.status = 'invoicing';
this.errors = []; //reset data
await this.invoiceClient(); for (const key in initInvoicing) {
this[key] = initInvoicing[key];
}
this.invoiceClient();
} catch (err) { } catch (err) {
this.handleError(err); this.handleError(err);
} }
@ -184,7 +187,6 @@ export const useInvoiceOutGlobalStore = defineStore({
async invoiceClient() { async invoiceClient() {
if (this.invoicing || this.nRequests >= this.parallelism) return; if (this.invoicing || this.nRequests >= this.parallelism) return;
const address = this.addresses[this.addressIndex]; const address = this.addresses[this.addressIndex];
if (!address || !this.status || this.status == 'stopping') { if (!address || !this.status || this.status == 'stopping') {
this.status = 'stopping'; this.status = 'stopping';
this.invoicing = false; this.invoicing = false;
@ -192,6 +194,7 @@ export const useInvoiceOutGlobalStore = defineStore({
} }
try { try {
this.invoicing = true; this.invoicing = true;
this.nRequests++;
const params = { const params = {
clientId: address.clientId, clientId: address.clientId,
addressId: address.id, addressId: address.id,
@ -215,6 +218,7 @@ export const useInvoiceOutGlobalStore = defineStore({
} }
} finally { } finally {
this.invoicing = false; this.invoicing = false;
this.nRequests--;
this.addressIndex++; this.addressIndex++;
this.invoiceClient(); this.invoiceClient();
} }