diff --git a/modules/entry/front/index/locale/es.yml b/modules/entry/front/index/locale/es.yml index 2770ccfe9..519f8e39a 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 0b9825752..b480df64a 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 c4101e4dc..196a9d076 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 7b0c3315a..468972523 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 15052c5fe..037b0657a 100644 --- a/modules/invoiceIn/front/basic-data/index.html +++ b/modules/invoiceIn/front/basic-data/index.html @@ -7,21 +7,6 @@