Merge branch 'dev' of http://git.verdnatura.es/salix into dev
This commit is contained in:
commit
8d60b3c1bc
|
@ -81,8 +81,7 @@
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"icon": "icon-actions"
|
"icon": "icon-actions"
|
||||||
},
|
}
|
||||||
"acl": ["salesAssistant"]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -18,11 +18,16 @@
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-tool-bar margin-medium-bottom>
|
<vn-tool-bar margin-medium-bottom>
|
||||||
<vn-button
|
<vn-button
|
||||||
vn-acl="salesAssistant"
|
|
||||||
label="Import claim"
|
label="Import claim"
|
||||||
ng-click="$ctrl.importToNewRefundTicket()"
|
ng-click="$ctrl.importToNewRefundTicket()"
|
||||||
vn-tooltip="Imports claim details">
|
vn-tooltip="Imports claim details">
|
||||||
</vn-button>
|
</vn-button>
|
||||||
|
|
||||||
|
<vn-button
|
||||||
|
label="Import ticket"
|
||||||
|
ng-click="$ctrl.showLastTickets($event)"
|
||||||
|
vn-tooltip="Imports ticket lines">
|
||||||
|
</vn-button>
|
||||||
</vn-tool-bar>
|
</vn-tool-bar>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-table model="model">
|
<vn-table model="model">
|
||||||
|
@ -124,3 +129,37 @@
|
||||||
</vn-table>
|
</vn-table>
|
||||||
</tpl-body>
|
</tpl-body>
|
||||||
</vn-dialog>
|
</vn-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<vn-crud-model
|
||||||
|
vn-id="lastTicketsModel"
|
||||||
|
url="/claim/api/Tickets"
|
||||||
|
filter="{}"
|
||||||
|
data="lastTickets" auto-load="false">
|
||||||
|
</vn-crud-model>
|
||||||
|
<!-- Transfer Popover -->
|
||||||
|
<vn-popover class="lastTicketsPopover" vn-id="lastTicketsPopover">
|
||||||
|
<div class="ticketList" pad-medium>
|
||||||
|
<vn-table model="lastTicketsModel" class="vn-grid">
|
||||||
|
<vn-thead>
|
||||||
|
<vn-tr>
|
||||||
|
<vn-th field="id" number>ID</vn-th>
|
||||||
|
<vn-th field="shipped" default-order="DESC">F. envio</vn-th>
|
||||||
|
<vn-th>Agencia</vn-th>
|
||||||
|
<vn-th>Almacen</vn-th>
|
||||||
|
</vn-tr>
|
||||||
|
</vn-thead>
|
||||||
|
<vn-tbody>
|
||||||
|
<vn-tr
|
||||||
|
class="clickable"
|
||||||
|
ng-repeat="ticket in lastTickets"
|
||||||
|
ng-click="$ctrl.importTicketLines(ticket.id)">
|
||||||
|
<vn-td number>{{::ticket.id}}</vn-td>
|
||||||
|
<vn-td>{{::ticket.shipped | date: 'dd/MM/yyyy'}}</vn-td>
|
||||||
|
<vn-td>{{::ticket.agencyMode.name}}</vn-td>
|
||||||
|
<vn-td>{{::ticket.warehouse.name}}</vn-td>
|
||||||
|
</vn-tr>
|
||||||
|
</vn-tbody>
|
||||||
|
</vn-table>
|
||||||
|
</div>
|
||||||
|
</vn-popover>
|
|
@ -2,14 +2,14 @@ import ngModule from '../module';
|
||||||
import './style.scss';
|
import './style.scss';
|
||||||
|
|
||||||
class Controller {
|
class Controller {
|
||||||
constructor($state, $scope, $http, $translate, vnApp) {
|
constructor($stateParams, $scope, $http, $translate, vnApp) {
|
||||||
this.$state = $state;
|
this.$stateParams = $stateParams;
|
||||||
this.$ = $scope;
|
this.$ = $scope;
|
||||||
this.$http = $http;
|
this.$http = $http;
|
||||||
this.$translate = $translate;
|
this.$translate = $translate;
|
||||||
this.vnApp = vnApp;
|
this.vnApp = vnApp;
|
||||||
this.filter = {
|
this.filter = {
|
||||||
where: {claimFk: $state.params.id},
|
where: {claimFk: $stateParams.id},
|
||||||
include: [
|
include: [
|
||||||
{relation: 'sale',
|
{relation: 'sale',
|
||||||
scope: {
|
scope: {
|
||||||
|
@ -60,7 +60,7 @@ class Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
importToNewRefundTicket() {
|
importToNewRefundTicket() {
|
||||||
let query = `claim/api/ClaimBeginnings/${this.$state.params.id}/importToNewRefundTicket`;
|
let query = `claim/api/ClaimBeginnings/${this.$stateParams.id}/importToNewRefundTicket`;
|
||||||
this.$http.post(query).then(() => {
|
this.$http.post(query).then(() => {
|
||||||
this.$.model.refresh();
|
this.$.model.refresh();
|
||||||
this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
|
this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
|
||||||
|
@ -88,9 +88,39 @@ class Controller {
|
||||||
this.claimedTotal += (sale.sale.quantity * sale.sale.price) - ((sale.sale.discount * (sale.sale.quantity * sale.sale.price)) / 100);
|
this.claimedTotal += (sale.sale.quantity * sale.sale.price) - ((sale.sale.discount * (sale.sale.quantity * sale.sale.price)) / 100);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showLastTickets(event) {
|
||||||
|
let pastWeek = new Date();
|
||||||
|
pastWeek.setDate(-7);
|
||||||
|
|
||||||
|
let filter = {
|
||||||
|
include: [
|
||||||
|
{relation: 'agencyMode', fields: ['name']},
|
||||||
|
{relation: 'warehouse', fields: ['name']}
|
||||||
|
],
|
||||||
|
where: {
|
||||||
|
created: {gt: pastWeek}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.$.lastTicketsModel.filter = filter;
|
||||||
|
this.$.lastTicketsModel.refresh();
|
||||||
|
this.$.lastTicketsPopover.parent = event.target;
|
||||||
|
this.$.lastTicketsPopover.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
importTicketLines(ticketFk) {
|
||||||
|
let data = {claimFk: this.$stateParams.id, ticketFk: ticketFk};
|
||||||
|
|
||||||
|
let query = `/claim/api/ClaimEnds/importTicketSales`;
|
||||||
|
this.$http.post(query, data).then(() => {
|
||||||
|
this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
|
||||||
|
this.$.lastTicketsPopover.hide();
|
||||||
|
this.$.model.refresh();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.$inject = ['$state', '$scope', '$http', '$translate', 'vnApp'];
|
Controller.$inject = ['$stateParams', '$scope', '$http', '$translate', 'vnApp'];
|
||||||
|
|
||||||
ngModule.component('vnClaimAction', {
|
ngModule.component('vnClaimAction', {
|
||||||
template: require('./index.html'),
|
template: require('./index.html'),
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import './index.js';
|
import './index.js';
|
||||||
|
import {crudModel} from '../../../helpers/crudModelHelper';
|
||||||
|
|
||||||
describe('claim', () => {
|
describe('claim', () => {
|
||||||
describe('Component vnClaimAction', () => {
|
describe('Component vnClaimAction', () => {
|
||||||
|
@ -25,6 +26,11 @@ describe('claim', () => {
|
||||||
hide: () => {},
|
hide: () => {},
|
||||||
show: () => {}
|
show: () => {}
|
||||||
};
|
};
|
||||||
|
controller.$.lastTicketsModel = crudModel;
|
||||||
|
controller.$.lastTicketsPopover = {
|
||||||
|
hide: () => {},
|
||||||
|
show: () => {}
|
||||||
|
};
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('openAddSalesDialog()', () => {
|
describe('openAddSalesDialog()', () => {
|
||||||
|
@ -116,5 +122,32 @@ describe('claim', () => {
|
||||||
expect(controller.vnApp.showSuccess).toHaveBeenCalledWith('Data saved!');
|
expect(controller.vnApp.showSuccess).toHaveBeenCalledWith('Data saved!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('showLastTickets()', () => {
|
||||||
|
it('should get a list of tickets and call lastTicketsPopover show() method', () => {
|
||||||
|
spyOn(controller.$.lastTicketsModel, 'refresh');
|
||||||
|
spyOn(controller.$.lastTicketsPopover, 'show');
|
||||||
|
controller.showLastTickets({});
|
||||||
|
|
||||||
|
expect(controller.$.lastTicketsModel.refresh).toHaveBeenCalledWith();
|
||||||
|
expect(controller.$.lastTicketsPopover.show).toHaveBeenCalledWith();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('importTicketLines()', () => {
|
||||||
|
it('should perform a post quer', () => {
|
||||||
|
spyOn(controller.$.model, 'refresh');
|
||||||
|
spyOn(controller.vnApp, 'showSuccess');
|
||||||
|
spyOn(controller.$.lastTicketsPopover, 'hide');
|
||||||
|
let data = {claimFk: 1, ticketFk: 1};
|
||||||
|
$httpBackend.expect('POST', `/claim/api/ClaimEnds/importTicketSales`, data).respond({});
|
||||||
|
controller.importTicketLines(1);
|
||||||
|
$httpBackend.flush();
|
||||||
|
|
||||||
|
expect(controller.$.model.refresh).toHaveBeenCalledWith();
|
||||||
|
expect(controller.vnApp.showSuccess).toHaveBeenCalledWith('Data saved!');
|
||||||
|
expect(controller.$.lastTicketsPopover.hide).toHaveBeenCalledWith();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,3 +3,5 @@ Action: Actuaciones
|
||||||
Total claimed: Total Reclamado
|
Total claimed: Total Reclamado
|
||||||
Import claim: Importar reclamacion
|
Import claim: Importar reclamacion
|
||||||
Imports claim details: Importa detalles de la reclamacion
|
Imports claim details: Importa detalles de la reclamacion
|
||||||
|
Import ticket: Importar ticket
|
||||||
|
Imports ticket lines: Importa las lineas de un ticket
|
|
@ -12,4 +12,16 @@ vn-claim-action {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vn-popover.lastTicketsPopover {
|
||||||
|
vn-table {
|
||||||
|
min-width: 650px;
|
||||||
|
overflow: auto
|
||||||
|
}
|
||||||
|
|
||||||
|
div.ticketList {
|
||||||
|
overflow: auto;
|
||||||
|
max-height: 350px
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
const UserError = require('vn-loopback/common/helpers').UserError;
|
||||||
|
|
||||||
|
module.exports = Self => {
|
||||||
|
Self.remoteMethodCtx('importTicketSales', {
|
||||||
|
description: 'Imports lines from claimBeginning to a new ticket with specific shipped, landed dates, agency and company',
|
||||||
|
accessType: 'WRITE',
|
||||||
|
accepts: [{
|
||||||
|
arg: 'params',
|
||||||
|
type: 'object',
|
||||||
|
http: {source: 'body'}
|
||||||
|
}],
|
||||||
|
returns: {
|
||||||
|
type: ['Object'],
|
||||||
|
root: true
|
||||||
|
},
|
||||||
|
http: {
|
||||||
|
path: `/importTicketSales`,
|
||||||
|
verb: 'POST'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Self.importTicketSales = async(ctx, params) => {
|
||||||
|
let models = Self.app.models;
|
||||||
|
let userId = ctx.req.accessToken.userId;
|
||||||
|
let worker = await models.Worker.findOne({where: {userFk: userId}});
|
||||||
|
|
||||||
|
let ticketSales = await models.Sale.find({
|
||||||
|
where: {ticketFk: params.ticketFk}
|
||||||
|
});
|
||||||
|
|
||||||
|
let claimEnds = [];
|
||||||
|
ticketSales.forEach(sale => {
|
||||||
|
claimEnds.push({
|
||||||
|
saleFk: sale.id,
|
||||||
|
claimFk: params.claimFk,
|
||||||
|
workerFk: worker.id
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
return await Self.create(claimEnds);
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,23 @@
|
||||||
|
const app = require(`${servicesDir}/claim/server/server`);
|
||||||
|
|
||||||
|
describe('Claim importTicketSales()', () => {
|
||||||
|
let claimEnds;
|
||||||
|
|
||||||
|
afterAll(async() => {
|
||||||
|
claimEnds.forEach(async line => {
|
||||||
|
await line.destroy();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should import sales to a claim actions from an specific ticket', async() => {
|
||||||
|
let ctx = {req: {accessToken: {userId: 5}}};
|
||||||
|
claimEnds = await app.models.ClaimEnd.importTicketSales(ctx, {
|
||||||
|
claimFk: 1,
|
||||||
|
ticketFk: 1
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(claimEnds.length).toEqual(4);
|
||||||
|
expect(claimEnds[0].saleFk).toEqual(1);
|
||||||
|
expect(claimEnds[2].saleFk).toEqual(3);
|
||||||
|
});
|
||||||
|
});
|
|
@ -1,5 +1,6 @@
|
||||||
module.exports = Self => {
|
module.exports = Self => {
|
||||||
require('../methods/claim-beginning/importToNewRefundTicket')(Self);
|
require('../methods/claim-beginning/importToNewRefundTicket')(Self);
|
||||||
|
|
||||||
Self.validatesUniquenessOf('saleFk', {
|
Self.validatesUniquenessOf('saleFk', {
|
||||||
message: `A claim with that sale already exists`
|
message: `A claim with that sale already exists`
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
module.exports = Self => {
|
||||||
|
require('../methods/claim-end/importTicketSales')(Self);
|
||||||
|
};
|
|
@ -0,0 +1,2 @@
|
||||||
|
ALTER TABLE `vn`.`clientLog`
|
||||||
|
CHANGE COLUMN `newInstance` `newInstance` TEXT NULL DEFAULT NULL ;
|
|
@ -0,0 +1,11 @@
|
||||||
|
DROP TRIGGER IF EXISTS `vn`.`clientLog_BEFORE_INSERT`;
|
||||||
|
|
||||||
|
DELIMITER $$
|
||||||
|
USE `vn`$$
|
||||||
|
CREATE DEFINER=`root`@`%` TRIGGER `vn`.`clientLog_BEFORE_INSERT` BEFORE INSERT ON `clientLog` FOR EACH ROW
|
||||||
|
BEGIN
|
||||||
|
IF NEW.newInstance is NULL THEN
|
||||||
|
SET NEW.newInstance = NEW.description;
|
||||||
|
END IF;
|
||||||
|
END$$
|
||||||
|
DELIMITER ;
|
|
@ -0,0 +1,89 @@
|
||||||
|
USE `vn`;
|
||||||
|
DROP procedure IF EXISTS `ticketCalculateClon`;
|
||||||
|
|
||||||
|
DELIMITER $$
|
||||||
|
USE `vn`$$
|
||||||
|
CREATE DEFINER=`root`@`%` PROCEDURE `ticketCalculateClon`(IN vTicketNew INT, vTicketOld INT)
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @vTicketNew id del nuevo ticket clonado
|
||||||
|
* @vTicketOld id ticket original, a partir del qual se clonara el nuevo
|
||||||
|
* Este procedimiento "rebioniza" una linea, eliminando los componentes existentes e insertandolos de nuevo
|
||||||
|
*/
|
||||||
|
DECLARE vShipped DATE;
|
||||||
|
DECLARE vClient INT;
|
||||||
|
DECLARE vWarehouse SMALLINT;
|
||||||
|
DECLARE vAgencyMode INT;
|
||||||
|
DECLARE vAddress INT;
|
||||||
|
DECLARE vLanded DATE;
|
||||||
|
DECLARE vAgency INT;
|
||||||
|
|
||||||
|
INSERT INTO orderTicket(orderFk,ticketFk)
|
||||||
|
SELECT orderFk, vTicketNew
|
||||||
|
FROM orderTicket
|
||||||
|
WHERE ticketFk = vTicketOld;
|
||||||
|
|
||||||
|
SELECT t.clientFk , t.warehouseFk, date(t.shipped), t.addressFk, t.agencyModeFk, t.landed, a.agencyFk
|
||||||
|
INTO vClient, vWarehouse, vShipped, vAddress, vAgencyMode, vLanded, vAgency
|
||||||
|
FROM vn.agencyMode a
|
||||||
|
JOIN vn.ticket t ON t.agencyModeFk = a.id
|
||||||
|
WHERE t.id = vTicketNew;
|
||||||
|
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS tmp.agencyHourGetShipped;
|
||||||
|
CREATE TEMPORARY TABLE tmp.agencyHourGetShipped ENGINE = MEMORY
|
||||||
|
SELECT vWarehouse warehouseFk, vShipped shipped, vLanded landed;
|
||||||
|
|
||||||
|
CALL buyUltimate(vWarehouse, vShipped); -- rellena la tabla tmp.buyUltimate con la ultima compra
|
||||||
|
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
|
||||||
|
CREATE TEMPORARY TABLE tmp.ticketLot
|
||||||
|
SELECT vWarehouse warehouseFk,NULL available,s.itemFk, bu.buyFk
|
||||||
|
FROM sale s
|
||||||
|
LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
|
||||||
|
WHERE s.ticketFk = vTicketNew GROUP BY s.itemFk;
|
||||||
|
|
||||||
|
CALL ticketComponentCalculate(vAddress,vAgencyMode);
|
||||||
|
|
||||||
|
-- Bionizamos lineas con Preu = 0
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS tmp.sale;
|
||||||
|
CREATE TEMPORARY TABLE tmp.sale
|
||||||
|
(PRIMARY KEY (saleFk)) ENGINE = MEMORY
|
||||||
|
SELECT s.id saleFk, vWarehouse warehouseFk
|
||||||
|
FROM sale s
|
||||||
|
JOIN ticket t on t.id = s.ticketFk WHERE s.ticketFk = vTicketNew AND s.price = 0;
|
||||||
|
|
||||||
|
CALL ticketComponentUpdateSale(1);
|
||||||
|
|
||||||
|
-- Bionizamos lineas con Preu > 0
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS tmp.sale;
|
||||||
|
CREATE TEMPORARY TABLE tmp.sale
|
||||||
|
(PRIMARY KEY (saleFk)) ENGINE = MEMORY
|
||||||
|
SELECT s.id saleFk, vWarehouse warehouseFk
|
||||||
|
FROM sale s
|
||||||
|
JOIN ticket t on t.id = s.ticketFk WHERE s.ticketFk = vTicketNew
|
||||||
|
AND s.price > 0;
|
||||||
|
|
||||||
|
CALL ticketComponentUpdateSale(6);
|
||||||
|
|
||||||
|
IF vLanded IS NULL THEN
|
||||||
|
CALL agencyHourGetLanded(vShipped, vAddress, vAgency,vWarehouse);
|
||||||
|
|
||||||
|
UPDATE ticket t
|
||||||
|
JOIN tmp.agencyHourGetLanded ah ON t.warehouseFk = ah.warehouseFk
|
||||||
|
SET t.landed = ah.landed
|
||||||
|
WHERE t.id = vTicketNew;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
-- Log
|
||||||
|
CALL `logAdd`(vTicketNew, 'update', ' ticket' , 'Bioniza Ticket');
|
||||||
|
|
||||||
|
-- Limpieza
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS tmp.buyUltimate;
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS tmp.sale;
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
|
||||||
|
DROP TEMPORARY TABLE IF EXISTS agencyHourGetShipped;
|
||||||
|
END$$
|
||||||
|
|
||||||
|
DELIMITER ;
|
||||||
|
|
|
@ -852,13 +852,13 @@ INSERT INTO `vn`.`claim`(`id`, `ticketCreated`, `claimStateFk`, `observation`, `
|
||||||
VALUES
|
VALUES
|
||||||
( 1, CURDATE(), 1, 'observation one' , 101, 18, 1, 0, CURDATE()),
|
( 1, CURDATE(), 1, 'observation one' , 101, 18, 1, 0, CURDATE()),
|
||||||
( 2, CURDATE(), 2, 'observation two' , 101, 18, 2, 0, CURDATE()),
|
( 2, CURDATE(), 2, 'observation two' , 101, 18, 2, 0, CURDATE()),
|
||||||
( 3, CURDATE(), 3, 'observation three' , 101, 18, 3, 0, CURDATE());
|
( 3, DATE_ADD(CURDATE(), INTERVAL -5 DAY), 3, 'observation three' , 101, 18, 3, 0, CURDATE());
|
||||||
|
|
||||||
INSERT INTO `vn`.`claimBeginning`(`id`, `claimFk`, `saleFk`, `quantity`)
|
INSERT INTO `vn`.`claimBeginning`(`id`, `claimFk`, `saleFk`, `quantity`)
|
||||||
VALUES
|
VALUES
|
||||||
( 1, 1, 1, 5),
|
( 1, 1, 7, 5),
|
||||||
( 2, 1, 2, 4),
|
( 2, 1, 8, 4),
|
||||||
( 3, 2, 5, 10),
|
( 3, 2, 10, 10),
|
||||||
( 4, 3, 6, 5);
|
( 4, 3, 6, 5);
|
||||||
|
|
||||||
INSERT INTO `vn`.`claimDevelopment`(`id`, `claimFk`, `claimResponsibleFk`, `workerFk`, `claimReasonFk`, `claimResultFk`, `claimRedeliveryFk`, `claimDestinationFk`)
|
INSERT INTO `vn`.`claimDevelopment`(`id`, `claimFk`, `claimResponsibleFk`, `workerFk`, `claimReasonFk`, `claimResultFk`, `claimRedeliveryFk`, `claimDestinationFk`)
|
||||||
|
@ -873,8 +873,6 @@ INSERT INTO `hedera`.`tpvMerchant`(`id`, `description`, `companyFk`, `bankFk`, `
|
||||||
( 1, 'Arkham Bank', 442, 1, 'h12387193H10238'),
|
( 1, 'Arkham Bank', 442, 1, 'h12387193H10238'),
|
||||||
( 2, 'NewYork Bank', 442, 1, '7981ugsgd1hsdad');
|
( 2, 'NewYork Bank', 442, 1, '7981ugsgd1hsdad');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `hedera`.`tpvTransaction`(`id`,`merchantFk`, `clientFk`,`receiptFk`, `amount`, `response`, `errorCode`, `status`, `created`)
|
INSERT INTO `hedera`.`tpvTransaction`(`id`,`merchantFk`, `clientFk`,`receiptFk`, `amount`, `response`, `errorCode`, `status`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 1, 101, NULL, 2000, NULL, 'SIS0042', 'ok', CURDATE()),
|
(1, 1, 101, NULL, 2000, NULL, 'SIS0042', 'ok', CURDATE()),
|
||||||
|
|
|
@ -5,6 +5,6 @@ describe('sale getClaimableFromTicket()', () => {
|
||||||
let claimableFromTicket = await app.models.Sale.getClaimableFromTicket(16);
|
let claimableFromTicket = await app.models.Sale.getClaimableFromTicket(16);
|
||||||
|
|
||||||
expect(claimableFromTicket[0].concept).toBe('Gem of Time');
|
expect(claimableFromTicket[0].concept).toBe('Gem of Time');
|
||||||
expect(claimableFromTicket.length).toBe(4);
|
expect(claimableFromTicket.length).toBe(3);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue