refs #5835 migrateInvoiceIn #110

Merged
jorgep merged 29 commits from 5835-migrateInvoiceIn into dev 2023-12-13 10:25:07 +00:00
Member
No description provided.
jorgep added 8 commits 2023-11-22 08:04:39 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
112e057cfa
ref #5835 invoiceIn created
gitea/salix-front/pipeline/head This commit looks good Details
a9241b17f5
ref #5835 tests basicData and list
gitea/salix-front/pipeline/head There was a failure building this commit Details
c31b4fa770
ref #5835 e2e & unit tests done
gitea/salix-front/pipeline/head There was a failure building this commit Details
46ee2a0075
ref #5835 fix test
gitea/salix-front/pipeline/head There was a failure building this commit Details
b6e8658de9
ref #5835 fix due-day
gitea/salix-front/pipeline/head There was a failure building this commit Details
195bd4c6d7
refs 5835 fix bordered box
jorgep changed title from 5835-migrateInvoiceIn to WIP 5835-migrateInvoiceIn 2023-11-22 08:27:44 +00:00
jorgep added 1 commit 2023-11-22 09:11:02 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
7e7154525d
refs #5835 fix front test
jorgep added the
CR / Tests passed
label 2023-11-22 09:11:45 +00:00
jorgep requested review from jgallego 2023-11-22 09:11:59 +00:00
jorgep requested review from jsegarra 2023-11-22 09:12:11 +00:00
jorgep changed title from WIP 5835-migrateInvoiceIn to 5835-migrateInvoiceIn 2023-11-22 09:12:21 +00:00
jsegarra reviewed 2023-11-22 13:50:39 +00:00
@ -0,0 +49,4 @@
async function setEditDms(dmsId) {
const { data } = await axios.get(`Dms/${dmsId}`);
dms.value = {
Member

lo miramos

lo miramos
jorgep marked this conversation as resolved
@ -0,0 +117,4 @@
}
}
async function create() {
Member

Yo movería la lógica de create y save a funciones constantes porque estás duplicando código que hacen lo mismo

Yo movería la lógica de create y save a funciones constantes porque estás duplicando código que hacen lo mismo
jorgep marked this conversation as resolved
jsegarra reviewed 2023-11-22 13:58:18 +00:00
@ -0,0 +85,4 @@
async function edit() {
try {
if (!dms.value.companyId) throw Error(t(`The company can't be empty`));
Member

Incluso te diría que en vez de tantos ifs, haría un objeto de validaciones, donde la key es el campo y el value es el mensaje a mostrar.

const validations = {
  companyId:'The company can\'t be empty'
}

Object.entries(validations).forEach(([key, value])=>{
  if(!dms.value[key])
    throw Error(t(value))
});

Para la que aplica en edit, usuaria la bandera que hemos comentado

Incluso te diría que en vez de tantos ifs, haría un objeto de validaciones, donde la key es el campo y el value es el mensaje a mostrar. ``` const validations = { companyId:'The company can\'t be empty' } Object.entries(validations).forEach(([key, value])=>{ if(!dms.value[key]) throw Error(t(value)) }); ``` Para la que aplica en edit, usuaria la bandera que hemos comentado
jorgep marked this conversation as resolved
jorgep changed title from 5835-migrateInvoiceIn to refs #5835 migrateInvoiceIn 2023-11-22 14:03:41 +00:00
jorgep added 1 commit 2023-11-22 14:20:31 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
9388b873c6
refs #5835 refactor basicData
jorgep added 1 commit 2023-11-22 14:24:37 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
dfddde1d5c
refs #5835 refactor upsert
jorgep added 1 commit 2023-11-23 07:44:21 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
d97f694563
refs #5835 upsert refactor
jgallego approved these changes 2023-11-23 08:47:10 +00:00
Dismissed
jgallego left a comment
Owner

Ahora lo miramos en tu pc como ha quedado

Ahora lo miramos en tu pc como ha quedado
@ -0,0 +5,4 @@
const token = session.getToken();
export async function downloadFile(dmsId) {
let appUrl = await getUrl('', 'lilium');
Owner

confirma con @alexm que lilum en el código a piñón es correcto

confirma con @alexm que lilum en el código a piñón es correcto
Member

Lo veo bien. Si se llega a repetir mucho, se podria llegar a hacer getUrlLilium o alho

Lo veo bien. Si se llega a repetir mucho, se podria llegar a hacer getUrlLilium o alho
jorgep marked this conversation as resolved
jsegarra approved these changes 2023-11-24 07:52:06 +00:00
Dismissed
jorgep added 1 commit 2023-11-24 08:37:07 +00:00
jorgep dismissed jgallego’s review 2023-11-24 08:37:07 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jorgep dismissed jsegarra’s review 2023-11-24 08:37:07 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jorgep added 1 commit 2023-11-24 09:11:05 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
b00cff8b0b
refs #5835 refactor getTotals
jorgep added 1 commit 2023-11-24 10:09:17 +00:00
jorgep added 1 commit 2023-11-24 10:11:28 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
7595c01293
refs #5835 fix InvoiceInDescriptor
jgallego approved these changes 2023-11-24 12:36:57 +00:00
Dismissed
jsegarra approved these changes 2023-11-24 13:10:52 +00:00
Dismissed
jorgep added 1 commit 2023-11-28 11:08:00 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
0282f8dde8
refs #5835 rate fixed & options descriptor created
jorgep dismissed jgallego’s review 2023-11-28 11:08:00 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jorgep dismissed jsegarra’s review 2023-11-28 11:08:00 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jorgep added 1 commit 2023-11-28 11:10:39 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
f75b81db71
refs #5835 fix conflicts
jsegarra approved these changes 2023-11-28 11:18:31 +00:00
Dismissed
jorgep added 1 commit 2023-12-01 07:30:33 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
8d04036836
refs #5835 change descriptor menu style
jorgep dismissed jsegarra’s review 2023-12-01 07:30:33 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jorgep added 1 commit 2023-12-04 13:24:01 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
3d046e4bf7
refs #5835 summary grid updated
jgallego approved these changes 2023-12-04 13:32:51 +00:00
Dismissed
@ -394,0 +395,4 @@
pageTitles: {
invoiceIns: 'Fact. recibidas',
list: 'Listado',
createInvoiceOut: 'Crear fact. recibida',
Owner

invoice Out es factura emitida
pero dejalo en Crear factura

invoice Out es factura emitida pero dejalo en Crear factura
jorgep marked this conversation as resolved
@ -394,0 +401,4 @@
vat: 'IVA',
dueDay: 'Vencimiento',
intrastat: 'Intrastat',
log: 'Registros de auditoría',
Owner

aquí creo que en salix es historico, puede ser?

aquí creo que en salix es historico, puede ser?
Author
Member

En salix se llama histórico pero en Lilium le han puesto ese nombre en las otras secciones

En salix se llama histórico pero en Lilium le han puesto ese nombre en las otras secciones
jorgep marked this conversation as resolved
jsegarra approved these changes 2023-12-04 14:01:02 +00:00
Dismissed
@ -0,0 +208,4 @@
<!--Basic Data-->
<QCard class="vn-one">
<QCardSection class="q-pa-none">
<a class="header" :href="`#/invoice-in/${entityId}/basic-data`">
Member

4 llamadas al mismo formato de URL, podríamos tenerlo en un método con un argumento?

4 llamadas al mismo formato de URL, podríamos tenerlo en un método con un argumento?
jorgep marked this conversation as resolved
jorgep added 1 commit 2023-12-04 14:28:49 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
b43985b9db
refs #5835 refactor
jorgep dismissed jgallego’s review 2023-12-04 14:28:49 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jorgep dismissed jsegarra’s review 2023-12-04 14:28:49 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jorgep added 1 commit 2023-12-05 07:34:18 +00:00
jorgep added 1 commit 2023-12-07 14:52:49 +00:00
jgallego approved these changes 2023-12-07 14:57:30 +00:00
Dismissed
jorgep added 1 commit 2023-12-11 07:30:00 +00:00
jorgep dismissed jgallego’s review 2023-12-11 07:30:00 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jorgep added 1 commit 2023-12-11 11:03:54 +00:00
jorgep added 1 commit 2023-12-11 11:40:11 +00:00
jsegarra reviewed 2023-12-11 11:47:08 +00:00
@ -0,0 +187,4 @@
intrastatTotals.value = { ...getIntrastatTotals(entity.invoiceInIntrastat) };
}
function taxRate(taxableBase, rate) {
Member

Revisamos si añadiendo valores por defecto podemos quitar líneas

Revisamos si añadiendo valores por defecto podemos quitar líneas
jorgep marked this conversation as resolved
jorgep added 1 commit 2023-12-11 12:52:27 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
22a634e7eb
refs #5835 refactor taxRate
jsegarra reviewed 2023-12-12 07:43:03 +00:00
@ -87,3 +88,4 @@
padding: 15px;
> .q-card.vn-one {
width: 350px;
Member

tamaño fijo? Es correcto?

tamaño fijo? Es correcto?
Author
Member

Según hablé con Juan sí, lo ideal es que tengan el mismo tamaño.

Según hablé con Juan sí, lo ideal es que tengan el mismo tamaño.
jorgep marked this conversation as resolved
jgallego requested changes 2023-12-12 07:43:25 +00:00
@ -404,0 +405,4 @@
pageTitles: {
invoiceIns: 'Fact. recibidas',
list: 'Listado',
createInvoiceOut: 'Crear fact. recibida',
Owner

invoice out es emitida, mira si esta mal la clave o el valor

invoice out es emitida, mira si esta mal la clave o el valor
jorgep marked this conversation as resolved
jsegarra reviewed 2023-12-12 07:49:50 +00:00
@ -0,0 +452,4 @@
option-value="id"
option-label="code"
@input-value="companiesRef.fetch()"
:rules="[(val) => val || t('Required field')]"
Member

Esta rule esta muchas veces en el código y es la misma en todos los casos.
Se podría sacar del HTML y definir en el script setup?

Esta rule esta muchas veces en el código y es la misma en todos los casos. Se podría sacar del HTML y definir en el script setup?
jorgep marked this conversation as resolved
jsegarra reviewed 2023-12-12 07:50:50 +00:00
@ -0,0 +363,4 @@
v-model="data.booked"
clearable
clear-icon="close"
mask="####-##-##"
Member

Los valores de las propiedades de mask, podrían ser globales en el componente?

Los valores de las propiedades de mask, podrían ser globales en el componente?
jorgep marked this conversation as resolved
jorgep added 1 commit 2023-12-12 08:04:33 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
2c5dc276b2
refs #5835
jorgep requested review from jgallego 2023-12-12 08:04:52 +00:00
jsegarra requested changes 2023-12-12 08:29:10 +00:00
@ -0,0 +222,4 @@
>
<template #menu="{ entity }">
<QItem
v-if="!entity.isBooked && hasAny(['administrative'])"
Member

Igual que has hecho isAgricultural, podrías hacer para isAdministrative?

Igual que has hecho isAgricultural, podrías hacer para isAdministrative?
jorgep marked this conversation as resolved
@ -0,0 +305,4 @@
<style lang="scss" scoped>
.q-dialog {
.q-card {
width: 35em;
Member

tiene sentido tener un width y un max-width de igual tamaño?
Se puede dar el caso que el valor de la qcard sea mas pequeño¿?

tiene sentido tener un width y un max-width de igual tamaño? Se puede dar el caso que el valor de la qcard sea mas pequeño¿?
jorgep marked this conversation as resolved
@ -0,0 +67,4 @@
const isNotEuro = (code) => code != 'EUR';
async function insert() {
await axios.post('/InvoiceInDueDays/new ', { id: Number(invoiceId) });
Member

TIP: es igual poner Number(invoiceId) que +invoiceId

TIP: es igual poner Number(invoiceId) que +invoiceId
jorgep marked this conversation as resolved
@ -0,0 +99,4 @@
<QInput
v-model="row.dueDated"
mask="date"
placeholder="yyyy/mm/dd"
Member

Quizás debería ser una valor constante

Quizás debería ser una valor constante
jorgep marked this conversation as resolved
@ -0,0 +116,4 @@
{
name: 'code',
label: 'invoiceIn.summary.code',
field: (row) => {
Member

({intrastat}) en vez de row

({intrastat}) en vez de row
jorgep marked this conversation as resolved
@ -0,0 +112,4 @@
const isNotEuro = (code) => code != 'EUR';
function taxRate(invoiceInTax, sageTaxTypeId) {
Member

Lo revisamos

Lo revisamos
jorgep marked this conversation as resolved
@ -0,0 +332,4 @@
<QInput
:label="t('Taxable base')"
:class="{
'no-pointer-events': isNotEuro(
Member

En InvoiceInDueDay, la condición estaba al revés, correcto?

En InvoiceInDueDay, la condición estaba al revés, correcto?
jorgep marked this conversation as resolved
jorgep added 1 commit 2023-12-12 11:14:28 +00:00
gitea/salix-front/pipeline/head This commit looks good Details
d1a5029ef7
refs #5835 refactor
jorgep requested review from jsegarra 2023-12-12 11:14:36 +00:00
jgallego approved these changes 2023-12-13 06:16:13 +00:00
jsegarra approved these changes 2023-12-13 09:34:56 +00:00
jorgep merged commit 055f10e6ff into dev 2023-12-13 10:25:07 +00:00
jorgep deleted branch 5835-migrateInvoiceIn 2023-12-13 10:25:07 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix-front#110
No description provided.