From c776d34cdf4cefb835b6d2339dcc77ab95938679 Mon Sep 17 00:00:00 2001 From: carlosjr Date: Thu, 10 Jun 2021 17:08:21 +0200 Subject: [PATCH 1/2] invoiceIn basic data and summary added some fields --- modules/entry/front/index/locale/es.yml | 2 +- .../back/methods/invoice-in/filter.js | 1 + .../back/methods/invoice-in/summary.js | 12 +++++ modules/invoiceIn/back/models/invoice-in.json | 14 ++++-- modules/invoiceIn/front/basic-data/index.html | 44 ++++++++++++------- modules/invoiceIn/front/summary/index.html | 6 ++- modules/invoiceIn/front/summary/locale/es.yml | 2 +- modules/item/back/models/expense.json | 7 ++- modules/travel/back/models/currency.json | 8 ++-- 9 files changed, 68 insertions(+), 28 deletions(-) diff --git a/modules/entry/front/index/locale/es.yml b/modules/entry/front/index/locale/es.yml index 2770ccfe9b..519f8e39aa 100644 --- a/modules/entry/front/index/locale/es.yml +++ b/modules/entry/front/index/locale/es.yml @@ -10,7 +10,7 @@ Commission: ComisiĆ³n Landed: F. entrega Reference: Referencia Created: Creado -Booked: Facturado +Booked: Contabilizada Is inventory: Inventario Notes: Notas Status: Estado diff --git a/modules/invoiceIn/back/methods/invoice-in/filter.js b/modules/invoiceIn/back/methods/invoice-in/filter.js index 0b98257525..b480df64a8 100644 --- a/modules/invoiceIn/back/methods/invoice-in/filter.js +++ b/modules/invoiceIn/back/methods/invoice-in/filter.js @@ -139,6 +139,7 @@ module.exports = Self => { ii.supplierRef, ii.docFk AS dmsFk, ii.supplierFk, + ii.expenceFkDeductible deductibleExpenseFk, s.name AS supplierName, s.account, SUM(iid.amount) AS amount, diff --git a/modules/invoiceIn/back/methods/invoice-in/summary.js b/modules/invoiceIn/back/methods/invoice-in/summary.js index c4101e4dc0..196a9d0764 100644 --- a/modules/invoiceIn/back/methods/invoice-in/summary.js +++ b/modules/invoiceIn/back/methods/invoice-in/summary.js @@ -39,6 +39,18 @@ module.exports = Self => { scope: { fields: ['withholding'] } + }, + { + relation: 'expenseDeductible', + scope: { + fields: ['id', 'name', 'taxTypeFk'] + } + }, + { + relation: 'currency', + scope: { + fields: ['id', 'name'] + } } ] }; diff --git a/modules/invoiceIn/back/models/invoice-in.json b/modules/invoiceIn/back/models/invoice-in.json index 7b0c3315a3..468972523f 100644 --- a/modules/invoiceIn/back/models/invoice-in.json +++ b/modules/invoiceIn/back/models/invoice-in.json @@ -33,9 +33,6 @@ "isBooked": { "type": "boolean" }, - "isVatDeductible": { - "type": "boolean" - }, "booked": { "type": "date" }, @@ -50,6 +47,12 @@ "mysql": { "columnName": "docFk" } + }, + "deductibleExpenseFk": { + "type": "number", + "mysql": { + "columnName": "expenceFkDeductible" + } } }, "relations": { @@ -63,6 +66,11 @@ "model": "SageWithholding", "foreignKey": "withholdingSageFk" }, + "expenseDeductible": { + "type": "belongsTo", + "model": "Expense", + "foreignKey": "deductibleExpenseFk" + }, "company": { "type": "belongsTo", "model": "Company", diff --git a/modules/invoiceIn/front/basic-data/index.html b/modules/invoiceIn/front/basic-data/index.html index 15052c5fe4..037b0657a1 100644 --- a/modules/invoiceIn/front/basic-data/index.html +++ b/modules/invoiceIn/front/basic-data/index.html @@ -7,21 +7,6 @@
- - - - - - + + + + + + + + + + {{id}} - {{name}} + + + + + @@ -34,11 +36,11 @@ + + - - diff --git a/modules/invoiceIn/front/summary/locale/es.yml b/modules/invoiceIn/front/summary/locale/es.yml index 29bed3f9c6..6f7cefddb7 100644 --- a/modules/invoiceIn/front/summary/locale/es.yml +++ b/modules/invoiceIn/front/summary/locale/es.yml @@ -7,4 +7,4 @@ Booked date: Fecha contable Accounted date: Fecha contable Doc number: Numero documento Sage withholding: RetenciĆ³n sage -Deductible: Deducible \ No newline at end of file +Undeductible VAT: Iva no deducible \ No newline at end of file diff --git a/modules/item/back/models/expense.json b/modules/item/back/models/expense.json index c0ef2c4878..65af020139 100644 --- a/modules/item/back/models/expense.json +++ b/modules/item/back/models/expense.json @@ -9,14 +9,17 @@ "properties": { "id": { "id": true, - "type": "Number", + "type": "number", "description": "Identifier" }, "name": { "type": "String" }, "isWithheld": { - "type": "Number" + "type": "number" + }, + "taxTypeFk": { + "type": "number" } }, "relations": { diff --git a/modules/travel/back/models/currency.json b/modules/travel/back/models/currency.json index 9ee7640b25..f3241fad1b 100644 --- a/modules/travel/back/models/currency.json +++ b/modules/travel/back/models/currency.json @@ -8,18 +8,18 @@ }, "properties": { "id": { - "type": "Number", + "type": "number", "id": true, "description": "Identifier" }, "code": { - "type": "String" + "type": "string" }, "name": { - "type": "String" + "type": "string" }, "ratio": { - "type": "Number" + "type": "number" } }, "acls": [ From 7bf832079db52486bbac02ddf78984017618f1f4 Mon Sep 17 00:00:00 2001 From: carlosjr Date: Fri, 11 Jun 2021 13:02:18 +0200 Subject: [PATCH 2/2] route.tickets suggested tickets now shows both descriptors --- modules/route/front/tickets/index.html | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/modules/route/front/tickets/index.html b/modules/route/front/tickets/index.html index 012c45fe2f..19450b4ac3 100644 --- a/modules/route/front/tickets/index.html +++ b/modules/route/front/tickets/index.html @@ -149,11 +149,13 @@ ng-model="ticket.checked"> - {{::ticket.id}} - + + {{::ticket.id}} + + + + {{::ticket.nickname}} @@ -180,3 +182,9 @@ vn-bind="+" fixed-bottom-right> + + + +