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

This commit is contained in:
Carlos Jimenez 2018-04-18 14:37:23 +02:00
commit e5bd430ff8
8 changed files with 231 additions and 26 deletions

View File

@ -3,6 +3,14 @@
id="user">
<h6>{{currentUserName}}</h6>
</div>
<a href="/salix/version-notes.html"
target="version-notes">
<vn-icon
id="version-notes"
icon="info"
translate-attr="{title: 'What is new'}">
</vn-icon>
</a>
<vn-icon
id="apps"
icon="apps"

View File

@ -6,7 +6,7 @@ vn-main-menu {
height: 2.5em;
vertical-align: middle;
}
& > div > vn-icon {
& > div > vn-icon, & > div > a > vn-icon {
font-size: 2.2em;
cursor: pointer;

View File

@ -1,26 +1,27 @@
Applications: Aplicaciones
Home: Inicio
Notifications: Notificaciones
Logout: Cerrar sesión
Change language: Cambiar idioma
Profile: Perfil
Data saved!: ¡Datos guardados!
Can't contact with server: No se pudo contactar con el servidor
Push on applications menu: Para abrir un módulo pulsa en el menú de aplicaciones
Clients: Clientes
Routes : Rutas
Production : Producción
Modules access : Acceso a módulos
Locator: Localizador
Items: Artículos
name: Nombre
credit: Crédito
phone: Teléfono
creditInsurance: Crédito Asegurado
Return to module index: Volver a la página principal del módulo
Preview: Vista previa
Client has debt: Cliente con riesgo
Web Account inactive: Sin acceso Web
Change language: Cambiar idioma
Client Frozen: Cliente congelado
Client has debt: Cliente con riesgo
Client inactive: Cliente inactivo
Client not checked: Cliente no comprobado
Client not checked: Cliente no comprobado
Clients: Clientes
credit: Crédito
creditInsurance: Crédito Asegurado
Data saved!: ¡Datos guardados!
Home: Inicio
Items: Artículos
Locator: Localizador
Logout: Cerrar sesión
Modules access : Acceso a módulos
Notifications: Notificaciones
name: Nombre
phone: Teléfono
Preview: Vista previa
Production : Producción
Profile: Perfil
Push on applications menu: Para abrir un módulo pulsa en el menú de aplicaciones
Return to module index: Volver a la página principal del módulo
Routes: Rutas
What is new: Novedades de la versión
Web Account inactive: Sin acceso Web

View File

@ -151,6 +151,13 @@ INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city
(109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'BruceBanner@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 0, 1, NULL, 0, 0, 19, 0, 1),
(110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'JessicaJones@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 0, 1, NULL, 0, 0, NULL, 0, 1);
INSERT INTO `vn`.`clientManaCache`(`clientFk`, `mana`, `dated`)
VALUES
( 101, 50, CURDATE()),
( 102, 100, CURDATE()),
( 103, 0, CURDATE()),
( 104, -30, CURDATE());
INSERT INTO `vn`.`address`(`id`, `nickname`, `street`, `city`, `postalCode`, `provinceFk`, `phone`, `mobile`, `isActive`, `isDefaultAddress`, `clientFk`, `agencyModeFk`, `longitude`, `latitude`, `isEqualizated`)
VALUES
(101, '01', 'Somewhere in Thailand', 'Silla', 46460, 1, NULL, NULL, 1, 0, 109, 2, NULL, NULL, 0),
@ -537,7 +544,7 @@ INSERT INTO `bi`.`rotacion`(`Id_Article`, `warehouse_id`, `total`, `rotacion`, `
INSERT INTO `vn`.`annualAverageInvoiced`(`clientFk`, `invoiced`)
VALUES
( 101, 0),
( 101, 1500),
( 102, 100),
( 103, 1000),
( 104, 500),

View File

@ -0,0 +1,29 @@
USE `vn`;
DROP procedure IF EXISTS `ticketVolume`;
DELIMITER $$
USE `vn`$$
CREATE DEFINER=`root`@`%` PROCEDURE `ticketVolume`(IN vTicketId INT)
BEGIN
DECLARE vWarehouseId INTEGER;
DECLARE vShippedDate DATE;
DROP TEMPORARY TABLE IF EXISTS ticketVolume;
SELECT warehouseFk, shipped INTO vWarehouseId,vShippedDate FROM vn.ticket WHERE id = vTicketId;
CREATE TEMPORARY TABLE IF NOT EXISTS ticketVolume ENGINE MEMORY
SELECT itemFk, saleFk, quantity, concept, VolUd as m3_uni, volume as m3, volume * quantity as volumeTimesQuantity, @m3:= @m3 + ifnull(volume,0) as m3_total
FROM
(
SELECT round(r.cm3 / 1000000,3) as VolUd ,s.quantity, round(r.cm3 * s.quantity / 1000000,3) as volume,
s.itemFk, s.id AS saleFk, s.concept, @m3:= 0, @vol:=0, t.agencyModeFk
FROM sale s
JOIN vn.ticket t on t.id = s.ticketFk
JOIN bi.rotacion r ON r.Id_Article = s.itemFk AND r.warehouse_id = t.warehouseFk
WHERE s.ticketFk = vTicketId
) sub;
END$$
DELIMITER ;

View File

@ -12,7 +12,7 @@ describe('client getAverageInvoiced()', () => {
it('should call the getAverageInvoiced method', done => {
model.getAverageInvoiced(101)
.then(response => {
expect(response.invoiced).toEqual(0);
expect(response.invoiced).toEqual(1500);
done();
});
});

View File

@ -12,7 +12,7 @@ describe('client getMana()', () => {
it('should call the getMana method', done => {
model.getMana(101)
.then(response => {
expect(response.mana).toEqual(0);
expect(response.mana).toEqual(30.02);
done();
});
});

View File

@ -0,0 +1,160 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252"/>
<title></title>
<meta name="generator" content="LibreOffice 6.0.1.1 (Windows)"/>
<meta name="created" content="00:00:00"/>
<meta name="changed" content="2018-04-18T12:46:42.134000000"/>
<style type="text/css">
body,div,table,thead,tbody,tfoot,tr,th,td,p { font-family:"Liberation Sans"; font-size:x-small }
a.comment-indicator:hover + comment { background:#ffd; position:absolute; display:block; border:1px solid black; padding:0.5em; }
a.comment-indicator { background:red; display:inline-block; border:1px solid black; width:0.5em; height:0.5em; }
comment { display:none; }
</style>
</head>
<body>
<table cellspacing="0" border="0">
<colgroup width="33"></colgroup>
<colgroup width="81"></colgroup>
<colgroup width="386"></colgroup>
<tr>
<td height="17" align="left">#</td>
<td align="left">Estado</td>
<td align="left">Asunto</td>
</tr>
<tr>
<td height="17" align="right" sdval="166" sdnum="3082;">166</td>
<td align="left">In Progress</td>
<td align="left">refactorizar buscador avanzado de articulos</td>
</tr>
<tr>
<td height="17" align="right" sdval="171" sdnum="3082;">171</td>
<td align="left">In Progress</td>
<td align="left">A&ntilde;adir revision</td>
</tr>
<tr>
<td height="17" align="right" sdval="211" sdnum="3082;">211</td>
<td align="left">In Progress</td>
<td align="left">Forzar a ciertos tags</td>
</tr>
<tr>
<td height="17" align="right" sdval="213" sdnum="3082;">213</td>
<td align="left">In Progress</td>
<td align="left">Sumario Tickets</td>
</tr>
<tr>
<td height="17" align="right" sdval="216" sdnum="3082;">216</td>
<td align="left">In Progress</td>
<td align="left">Seccion Configuracion paso 2</td>
</tr>
<tr>
<td height="17" align="right" sdval="124" sdnum="3082;">124</td>
<td align="left">Resolved</td>
<td align="left">address observations validations</td>
</tr>
<tr>
<td height="17" align="right" sdval="199" sdnum="3082;">199</td>
<td align="left">Resolved</td>
<td align="left">A&ntilde;adir manejador de cliente que no existe</td>
</tr>
<tr>
<td height="17" align="right" sdval="138" sdnum="3082;">138</td>
<td align="left">Resolved</td>
<td align="left">Refactorizaci&oacute;n Popover</td>
</tr>
<tr>
<td height="17" align="right" sdval="172" sdnum="3082;">172</td>
<td align="left">Resolved</td>
<td align="left">E2E revision</td>
</tr>
<tr>
<td height="17" align="right" sdval="175" sdnum="3082;">175</td>
<td align="left">Resolved</td>
<td align="left">E2E embalajes</td>
</tr>
<tr>
<td height="17" align="right" sdval="177" sdnum="3082;">177</td>
<td align="left">Resolved</td>
<td align="left">Listar modelo saleChecked</td>
</tr>
<tr>
<td height="17" align="right" sdval="182" sdnum="3082;">182</td>
<td align="left">Resolved</td>
<td align="left">Listar volumen del ticket</td>
</tr>
<tr>
<td height="17" align="right" sdval="196" sdnum="3082;">196</td>
<td align="left">Resolved</td>
<td align="left">E2E listar lineas ticket</td>
</tr>
<tr>
<td height="17" align="right" sdval="198" sdnum="3082;">198</td>
<td align="left">Resolved</td>
<td align="left">refactorizar tag con nuevo + - </td>
</tr>
<tr>
<td height="17" align="right" sdval="201" sdnum="3082;">201</td>
<td align="left">Resolved</td>
<td align="left">Listar Mana del cliente</td>
</tr>
<tr>
<td height="17" align="right" sdval="202" sdnum="3082;">202</td>
<td align="left">Resolved</td>
<td align="left">A&ntilde;adir a Sumario Cliente una seccion financia</td>
</tr>
<tr>
<td height="17" align="right" sdval="209" sdnum="3082;">209</td>
<td align="left">Resolved</td>
<td align="left">Contratos de credito</td>
</tr>
<tr>
<td height="17" align="right" sdval="210" sdnum="3082;">210</td>
<td align="left">Resolved</td>
<td align="left">item tags</td>
</tr>
<tr>
<td height="17" align="right" sdval="212" sdnum="3082;">212</td>
<td align="left">Resolved</td>
<td align="left">Mostrar solo las agencias con el campo isActive(tpv) en TRUE</td>
</tr>
<tr>
<td height="17" align="right" sdval="215" sdnum="3082;">215</td>
<td align="left">Resolved</td>
<td align="left">Seccion Configuracion paso 1</td>
</tr>
<tr>
<td height="17" align="right" sdval="220" sdnum="3082;">220</td>
<td align="left">Resolved</td>
<td align="left">Al crear un consignatario mirar RE</td>
</tr>
<tr>
<td height="17" align="right" sdval="222" sdnum="3082;">222</td>
<td align="left">Resolved</td>
<td align="left">nuevo dni espa&ntilde;a</td>
</tr>
<tr>
<td height="17" align="right" sdval="223" sdnum="3082;">223</td>
<td align="left">Resolved</td>
<td align="left">Manejador de errores global</td>
</tr>
<tr>
<td height="17" align="right" sdval="227" sdnum="3082;">227</td>
<td align="left">Resolved</td>
<td align="left">traducciones pendientes</td>
</tr>
<tr>
<td height="17" align="right" sdval="219" sdnum="3082;">219</td>
<td align="left">Feedback</td>
<td align="left">Pair programming</td>
</tr>
</table>
<!-- ************************************************************************** -->
</body>
</html>