Merge branch 'dev' of https://git.verdnatura.es/salix into dev

This commit is contained in:
Gerard 2018-03-20 15:04:00 +01:00
commit cf06e6291a
15 changed files with 4021 additions and 10 deletions

View File

@ -30,6 +30,7 @@
value-field="id" value-field="id"
select-fields="name" select-fields="name"
label="Salesperson" label="Salesperson"
vn-acl="salesAssistant"
where="{or: [{firstName: {regexp: 'search'}}, {name: {regexp: 'search'}}]}"> where="{or: [{firstName: {regexp: 'search'}}, {name: {regexp: 'search'}}]}">
</vn-autocomplete> </vn-autocomplete>
<vn-autocomplete vn-one <vn-autocomplete vn-one

View File

@ -32,14 +32,21 @@ export default class Popover extends Component {
this.content = this.element.querySelector('.content'); this.content = this.element.querySelector('.content');
} }
set child(value) { /**
this.content.appendChild(value); * @type {HTMLElement} The popover child.
} */
get child() { get child() {
return this.content.firstChild; return this.content.firstChild;
} }
set child(value) {
this.content.innerHTML = '';
this.content.appendChild(value);
}
/**
* @type {Boolean} Wether to show or hide the popover.
*/
get shown() { get shown() {
return this._shown; return this._shown;
} }

View File

@ -87,6 +87,18 @@
"description": "Review", "description": "Review",
"icon": "remove_red_eye" "icon": "remove_red_eye"
} }
},
{
"url" : "/sale",
"state": "ticket.card.sale",
"component": "vn-ticket-sale",
"params": {
"ticket": "$ctrl.ticket"
},
"menu": {
"description": "Sale",
"icon": "icon-lines"
}
} }
] ]
} }

View File

@ -1,6 +1,13 @@
Tickets: Tickets Amount: Importe
Basic data: Datos básicos
Description: Descripción
Discount: Descuento
Item: Articulo
Notes: Notas Notes: Notas
Observation type: Tipo de observación Observation type: Tipo de observación
Description: Descripción Price: Precio
The observation type must be unique: El tipo de observación debe ser único Quantity: Cantidad
Sale: Lineas del pedido
Some fields are invalid: Algunos campos no son válidos Some fields are invalid: Algunos campos no son válidos
The observation type must be unique: El tipo de observación debe ser único
Tickets: Tickets

View File

View File

View File

@ -7,4 +7,5 @@ import './summary/ticket-summary';
import './data/ticket-data'; import './data/ticket-data';
import './notes/ticket-observations'; import './notes/ticket-observations';
import './package/list/package-list'; import './package/list/package-list';
import './sale/sale';
import './review/review'; import './review/review';

3934
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -19,6 +19,7 @@
"fs-extra": "^5.0.0", "fs-extra": "^5.0.0",
"material-design-lite": "^1.3.0", "material-design-lite": "^1.3.0",
"mg-crud": "^1.1.2", "mg-crud": "^1.1.2",
"npm": "^5.7.1",
"oclazyload": "^0.6.3", "oclazyload": "^0.6.3",
"require-yaml": "0.0.1", "require-yaml": "0.0.1",
"validator": "^6.2.1" "validator": "^6.2.1"

View File

@ -510,3 +510,10 @@ INSERT INTO `vn`.`recovery`(`id`, `clientFk`, `started`, `finished`, `amount`, `
( 2, 102, CURDATE(), date_add(CURDATE(),INTERVAL 3 MONTH), 100, 1), ( 2, 102, CURDATE(), date_add(CURDATE(),INTERVAL 3 MONTH), 100, 1),
( 3, 102, CURDATE(), date_add(CURDATE(),INTERVAL 1 MONTH), 50, 7), ( 3, 102, CURDATE(), date_add(CURDATE(),INTERVAL 1 MONTH), 50, 7),
( 4, 103, CURDATE(), NULL, 50, 7); ( 4, 103, CURDATE(), NULL, 50, 7);
INSERT INTO `bi`.`rotacion`(`Id_Article`, `warehouse_id`, `total`, `rotacion`, `cm3`, `almacenaje`, `manipulacion`, `auxiliar`, `mermas`)
VALUES
( 1, 1, 0, 0.0000, 1500, 0.0015, 0.0250, 0.0085, 0.0000),
( 1, 2, 0, 0.0000, 100, 0.0060, 0.0200, 0.0080, 0.0000),
( 2, 1, 10, 3.5000, 0, 0.0000, 0.0000, 0.0080, 0.0000),
( 3, 1, 50, 5.5000, 100, 0.0000, 0.0000, 0.0080, 0.0000);

View File

@ -0,0 +1,10 @@
USE `vn`;
CREATE
OR REPLACE ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `vn`.`annualAverageInvoiced` AS
SELECT
`e`.`Id_Cliente` AS `clientFk`, `e`.`Consumo` AS `invoiced`
FROM
`bi`.`facturacion_media_anual` `e`;

View File

@ -0,0 +1,24 @@
{
"name": "AnnualAverageInvoiced",
"base": "VnModel",
"options": {
"mysql": {
"table": "annualAverageInvoiced"
}
},
"properties": {
"invoiced": {
"type": "Number"
},
"clientFk": {
"id": true
}
},
"relations": {
"client": {
"type": "belongsTo",
"model": "client",
"foreignKey": "clientFk"
}
}
}

View File

@ -0,0 +1,3 @@
module.exports = function(Self) {
require('../methods/sale/filter.js')(Self);
};

View File

@ -41,6 +41,11 @@
"foreignKey": "itemFk", "foreignKey": "itemFk",
"required": true "required": true
}, },
"itemTag": {
"type": "hasMany",
"model": "ItemTag",
"foreignKey": "itemFk"
},
"ticket": { "ticket": {
"type": "belongsTo", "type": "belongsTo",
"model": "Ticket", "model": "Ticket",

View File

@ -28,6 +28,9 @@
}, },
"Expedition": { "Expedition": {
"dataSource": "vn" "dataSource": "vn"
},
"AnnualAverageInvoiced": {
"dataSource": "vn"
} }
} }