diff --git a/client/client/src/create/create.html b/client/client/src/create/create.html index adb4f08d2..943533ba0 100644 --- a/client/client/src/create/create.html +++ b/client/client/src/create/create.html @@ -10,15 +10,19 @@ Create client - + + + + - + - - - + + + + + + + + + + + diff --git a/client/core/src/components/grid/grid.js b/client/core/src/components/grid/grid.js new file mode 100644 index 000000000..423b033ce --- /dev/null +++ b/client/core/src/components/grid/grid.js @@ -0,0 +1 @@ +import './style.scss'; diff --git a/client/core/src/components/grid/style.scss b/client/core/src/components/grid/style.scss new file mode 100644 index 000000000..b46e94865 --- /dev/null +++ b/client/core/src/components/grid/style.scss @@ -0,0 +1,16 @@ +.vn-grid { + border-collapse: collapse; + td, th{ + text-align: left; + padding: 10px; + } + & > thead, & > tbody { + border-bottom: 3px solid #9D9D9D; + } + & > tbody > tr{ + border-bottom: 1px solid #9D9D9D; + } + td[number], th[number]{ + text-align: right; + } +} \ No newline at end of file diff --git a/client/core/src/components/index.js b/client/core/src/components/index.js index 774971572..dbebc74e5 100644 --- a/client/core/src/components/index.js +++ b/client/core/src/components/index.js @@ -16,6 +16,7 @@ import './drop-down/drop-down'; import './menu/menu'; import './column-header/column-header'; import './grid-header/grid-header'; +import './grid/grid'; import './multi-check/multi-check'; import './date-picker/date-picker'; import './button/button'; diff --git a/client/item/src/create/item-create.html b/client/item/src/create/item-create.html index 6e8fd57ab..0194275d9 100644 --- a/client/item/src/create/item-create.html +++ b/client/item/src/create/item-create.html @@ -23,14 +23,14 @@ {{code}} : {{name}} + url="/item/api/Intrastats" + label="Intrastat" + show-field="description" + value-field="id" + field="$ctrl.item.intrastatFk" + where="{or: [{id: {regexp: 'search'}}, {description: {regexp: 'search'}}]}"> {{id}} : {{description}} - + - - diff --git a/client/ticket/src/sale/sale.html b/client/ticket/src/sale/sale.html index e69de29bb..5fcee01e4 100644 --- a/client/ticket/src/sale/sale.html +++ b/client/ticket/src/sale/sale.html @@ -0,0 +1,39 @@ + + + + + Sale + + + + + + + + + + + + + + + + + + + + + +
ItemDescriptionQuantityPriceDiscountAmount
{{::sale.itemFk}} + + {{::sale.concept}} + + + {{::fetchedTag.tag.name}} {{::fetchedTag.value}} + + + + {{::sale.quantity}}{{::sale.price | currency:'€':2}}{{::sale.discount}} %{{::sale.quantity * sale.price | currency:'€':2}}
+
+
+
diff --git a/client/ticket/src/sale/sale.js b/client/ticket/src/sale/sale.js index e69de29bb..feaafefbe 100644 --- a/client/ticket/src/sale/sale.js +++ b/client/ticket/src/sale/sale.js @@ -0,0 +1,7 @@ +import ngModule from '../module'; +import FilterTicketList from '../filter-ticket-list'; + +ngModule.component('vnTicketSale', { + template: require('./sale.html'), + controller: FilterTicketList +}); diff --git a/services/loopback/common/locale/es.json b/services/loopback/common/locale/es.json index edf12882c..1cf509d2b 100644 --- a/services/loopback/common/locale/es.json +++ b/services/loopback/common/locale/es.json @@ -10,5 +10,7 @@ "Ya existe un usuario con ese nombre": "Ya existe un usuario con ese nombre", "ValidationError: The `Item` instance is not valid. Details: `originFk` Cannot be blank (value: undefined).": "ValidationError: The `Item` instance is not valid. Details: `originFk` Cannot be blank (value: undefined).", "Error: ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (`vn2008`.`Articles`, CONSTRAINT `Articles_ibfk_5` FOREIGN KEY (`tipo_id`) REFERENCES `Tipos` (`tipo_id`) ON UPDATE CASCADE)": "Error: ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (`vn2008`.`Articles`, CONSTRAINT `Articles_ibfk_5` FOREIGN KEY (`tipo_id`) REFERENCES `Tipos` (`tipo_id`) ON UPDATE CASCADE)", - "Error: ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (`vn2008`.`Articles`, CONSTRAINT `expenceFk` FOREIGN KEY (`expenceFk`) REFERENCES `Gastos` (`Id_Gasto`) ON UPDATE CASCADE)": "Error: ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (`vn2008`.`Articles`, CONSTRAINT `expenceFk` FOREIGN KEY (`expenceFk`) REFERENCES `Gastos` (`Id_Gasto`) ON UPDATE CASCADE)" + "Error: ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (`vn2008`.`Articles`, CONSTRAINT `expenceFk` FOREIGN KEY (`expenceFk`) REFERENCES `Gastos` (`Id_Gasto`) ON UPDATE CASCADE)": "Error: ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (`vn2008`.`Articles`, CONSTRAINT `expenceFk` FOREIGN KEY (`expenceFk`) REFERENCES `Gastos` (`Id_Gasto`) ON UPDATE CASCADE)", + "INVALID_USER_NAME": "INVALID_USER_NAME", + "La razón social debe ser única": "La razón social debe ser única" } \ No newline at end of file diff --git a/services/loopback/common/methods/client/createWithUser.js b/services/loopback/common/methods/client/createWithUser.js index f5220a839..54ec90579 100644 --- a/services/loopback/common/methods/client/createWithUser.js +++ b/services/loopback/common/methods/client/createWithUser.js @@ -35,7 +35,12 @@ module.exports = function(Self) { fi: data.fi, socialName: data.socialName, email: data.email, - salesPersonFk: data.salesPersonFk + salesPersonFk: data.salesPersonFk, + postcode: data.postcode, + street: data.street, + city: data.city, + provinceFk: data.provinceFk, + isEqualizated: data.isEqualizated }; newClient = await Self.create(client, {transaction}); await transaction.commit();