diff --git a/CHANGELOG.md b/CHANGELOG.md index 95b3028de..73e4c96df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- +- ### Changed -- \ No newline at end of file +- Se ha eliminado la sección "Control clientes" dentro de Ticket diff --git a/db/changes/230201/.gitkeep b/db/changes/230201/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/db/changes/230201/00-kkearSaleChecked.sql b/db/changes/230201/00-kkearSaleChecked.sql new file mode 100644 index 000000000..03e854bbd --- /dev/null +++ b/db/changes/230201/00-kkearSaleChecked.sql @@ -0,0 +1,2 @@ +DELETE FROM `salix`.`ACL` WHERE model="SaleChecked"; +DROP TABLE IF EXISTS `vn`.`saleChecked`; diff --git a/modules/entry/front/buy/index/index.js b/modules/entry/front/buy/index/index.js index 6d9ee5760..322b81d4e 100644 --- a/modules/entry/front/buy/index/index.js +++ b/modules/entry/front/buy/index/index.js @@ -73,6 +73,12 @@ export default class Controller extends Section { this.vnApp.showSuccess(this.$t('Data saved!')); }); } + + itemSearchFunc($search) { + return /^\d+$/.test($search) + ? {id: $search} + : {name: {like: '%' + $search + '%'}}; + } } ngModule.vnComponent('vnEntryBuyIndex', { diff --git a/modules/ticket/back/model-config.json b/modules/ticket/back/model-config.json index d9f9fcccb..50cfbd08a 100644 --- a/modules/ticket/back/model-config.json +++ b/modules/ticket/back/model-config.json @@ -32,9 +32,6 @@ "Sale": { "dataSource": "vn" }, - "SaleChecked": { - "dataSource": "vn" - }, "SaleCloned": { "dataSource": "vn" }, diff --git a/modules/ticket/back/models/sale-checked.json b/modules/ticket/back/models/sale-checked.json deleted file mode 100644 index 96d790505..000000000 --- a/modules/ticket/back/models/sale-checked.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "SaleChecked", - "base": "VnModel", - "options": { - "mysql": { - "table": "saleChecked" - } - }, - "properties": { - "isChecked": { - "type": "number" - }, - "saleFk": { - "id": true - } - }, - "relations": { - "sale": { - "type": "belongsTo", - "model": "Sale", - "foreignKey": "saleFk" - } - } -} \ No newline at end of file diff --git a/modules/ticket/back/models/sale.json b/modules/ticket/back/models/sale.json index e18f0291f..b30954ad1 100644 --- a/modules/ticket/back/models/sale.json +++ b/modules/ticket/back/models/sale.json @@ -56,11 +56,6 @@ "foreignKey": "ticketFk", "required": true }, - "isChecked": { - "type": "hasOne", - "model": "SaleChecked", - "foreignKey": "saleFk" - }, "components": { "type": "hasMany", "model": "SaleComponent", @@ -80,6 +75,6 @@ "type": "hasOne", "model": "ItemShelvingSale", "foreignKey": "saleFk" - } + } } } diff --git a/modules/ticket/front/index.js b/modules/ticket/front/index.js index 5be9980c3..029dc16a4 100644 --- a/modules/ticket/front/index.js +++ b/modules/ticket/front/index.js @@ -20,7 +20,6 @@ import './package/index'; import './sale'; import './tracking/index'; import './tracking/edit'; -import './sale-checked'; import './services'; import './component'; import './sale-tracking'; diff --git a/modules/ticket/front/routes.json b/modules/ticket/front/routes.json index f3099bbb2..c86b3a1ef 100644 --- a/modules/ticket/front/routes.json +++ b/modules/ticket/front/routes.json @@ -23,7 +23,6 @@ {"state": "ticket.card.expedition", "icon": "icon-package"}, {"state": "ticket.card.service", "icon": "icon-services"}, {"state": "ticket.card.package", "icon": "icon-bucket"}, - {"state": "ticket.card.saleChecked", "icon": "assignment"}, {"state": "ticket.card.components", "icon": "icon-components"}, {"state": "ticket.card.saleTracking", "icon": "assignment"}, {"state": "ticket.card.dms.index", "icon": "cloud_download"}, @@ -159,15 +158,6 @@ }, "acl": ["production", "administrative", "salesPerson"] }, - { - "url" : "/sale-checked", - "state": "ticket.card.saleChecked", - "component": "vn-ticket-sale-checked", - "description": "Sale checked", - "params": { - "ticket": "$ctrl.ticket" - } - }, { "url" : "/components", "state": "ticket.card.components", diff --git a/modules/ticket/front/sale-checked/index.html b/modules/ticket/front/sale-checked/index.html deleted file mode 100644 index 1bc6f1f68..000000000 --- a/modules/ticket/front/sale-checked/index.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - Is checked - Item - Description - Quantity - - - - - - - - - - - {{::sale.itemFk | zeroFill:6}} - - - - - {{::sale.item.name}} - - {{::sale.item.subName}} - - - - - - {{::sale.quantity}} - - - - - - - diff --git a/modules/ticket/front/sale-checked/index.js b/modules/ticket/front/sale-checked/index.js deleted file mode 100644 index 857ac49e3..000000000 --- a/modules/ticket/front/sale-checked/index.js +++ /dev/null @@ -1,42 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -class Controller extends Section { - constructor($element, $) { - super($element, $); - this.filter = { - include: [ - { - relation: 'item' - }, { - relation: 'isChecked', - scope: { - fields: ['isChecked'] - } - } - ] - }; - } - showItemDescriptor(event, sale) { - this.quicklinks = { - btnThree: { - icon: 'icon-transaction', - state: `item.card.diary({ - id: ${sale.itemFk}, - warehouseFk: ${this.ticket.warehouseFk}, - lineFk: ${sale.id} - })`, - tooltip: 'Item diary' - } - }; - this.$.itemDescriptor.show(event.target, sale.itemFk); - } -} - -ngModule.vnComponent('vnTicketSaleChecked', { - template: require('./index.html'), - controller: Controller, - bindings: { - ticket: '<' - } -});