Merge
|
@ -6,7 +6,7 @@
|
|||
save="post"
|
||||
form="form">
|
||||
</vn-watcher>
|
||||
<form name="form" ng-submit="watcher.submitGo('client.card.addresses.index')">
|
||||
<form name="form" ng-submit="watcher.submitGo('client.card.address.index')">
|
||||
<vn-card pad-large>
|
||||
<vn-title>Address</vn-title>
|
||||
<vn-horizontal>
|
||||
|
|
|
@ -109,16 +109,16 @@ export default class Controller {
|
|||
);
|
||||
} else if (canSubmitWatcher && !canSubmitObservations) {
|
||||
this.$scope.watcher.submit().then(() => {
|
||||
this.$state.go('client.card.addresses.list', {id: this.$state.params.id});
|
||||
this.$state.go('client.card.address.index', {id: this.$state.params.id});
|
||||
this.card.reload();
|
||||
});
|
||||
} else if (!canSubmitWatcher && canSubmitObservations) {
|
||||
this._submitObservations(observationsObj).then(() => {
|
||||
this.$state.go('client.card.addresses.list', {id: this.$state.params.id});
|
||||
this.$state.go('client.card.address.index', {id: this.$state.params.id});
|
||||
});
|
||||
} else if (canSubmitWatcher && canSubmitObservations) {
|
||||
this.$q.all([this.$scope.watcher.submit(), this._submitObservations(observationsObj)]).then(() => {
|
||||
this.$state.go('client.card.addresses.list', {id: this.$state.params.id});
|
||||
this.$state.go('client.card.address.index', {id: this.$state.params.id});
|
||||
});
|
||||
} else {
|
||||
this.vnApp.showMessage(
|
||||
|
|
|
@ -27,10 +27,21 @@
|
|||
</i>
|
||||
</vn-none>
|
||||
<vn-one border-solid-right>
|
||||
<div><b>{{::address.nickname}}</b></div>
|
||||
<div>{{::address.street}}</div>
|
||||
<div>{{::address.city}}, {{::address.province}}</div>
|
||||
<div>{{::address.phone}}, {{::address.mobile}}</div>
|
||||
<vn-horizontal>
|
||||
<vn-one>
|
||||
<div><b>{{::address.nickname}}</b></div>
|
||||
<div name="street">{{::address.street}}</div>
|
||||
<div>{{::address.city}}, {{::address.province}}</div>
|
||||
<div>{{::address.phone}}, {{::address.mobile}}</div>
|
||||
</vn-one>
|
||||
<vn-one>
|
||||
<vn-check
|
||||
vn-one label="Is equalizated"
|
||||
field="address.isEqualizated"
|
||||
disabled="true">
|
||||
</vn-check>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-one>
|
||||
<vn-vertical vn-one pad-medium-h>
|
||||
<vn-one ng-repeat="observation in address.observations track by $index" ng-class="{'pad-small-top': $index}">
|
||||
|
|
|
@ -18,9 +18,8 @@ describe('Client', () => {
|
|||
$scope = $rootScope.$new();
|
||||
let submit = jasmine.createSpy('submit').and.returnValue(Promise.resolve());
|
||||
$scope.watcher = {submit};
|
||||
let show = jasmine.createSpy('show');
|
||||
$scope.sendMail = {show};
|
||||
controller = $componentController('vnClientBillingData', {$scope: $scope});
|
||||
$httpBackend.get = jasmine.createSpy('get').and.returnValue(Promise.resolve());
|
||||
controller = $componentController('vnClientBillingData', {$scope: $scope}, {$http: $httpBackend});
|
||||
}));
|
||||
|
||||
describe('copyData()', () => {
|
||||
|
@ -55,25 +54,15 @@ describe('Client', () => {
|
|||
controller.client = {marvelHero: 'Silver Surfer'};
|
||||
controller.checkPaymentChanges();
|
||||
|
||||
expect(controller.$.sendMail.show).not.toHaveBeenCalled();
|
||||
expect(controller.$http.get).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it(`should call sendMail.show() if there are changes on billing data object`, () => {
|
||||
controller.billData = {marvelHero: 'Silver Surfer'};
|
||||
controller.client = {marvelHero: 'Spider-Man'};
|
||||
controller.billData = {id: '123', marvelHero: 'Silver Surfer'};
|
||||
controller.client = {id: '123', marvelHero: 'Spider-Man'};
|
||||
controller.checkPaymentChanges();
|
||||
|
||||
expect(controller.$.sendMail.show).toHaveBeenCalledWith();
|
||||
});
|
||||
});
|
||||
|
||||
describe('returnDialog()', () => {
|
||||
it('should request to send notification email', () => {
|
||||
controller.client = {id: '123'};
|
||||
$httpBackend.when('POST', `/mailer/notification/payment-update/${controller.client.id}`).respond('done');
|
||||
$httpBackend.expectPOST(`/mailer/notification/payment-update/${controller.client.id}`);
|
||||
controller.returnDialog('ACCEPT');
|
||||
$httpBackend.flush();
|
||||
expect(controller.$http.get).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -55,10 +55,4 @@
|
|||
<vn-button-bar>
|
||||
<vn-submit label="Save" vn-acl="administrative, salesAssistant"></vn-submit>
|
||||
</vn-button-bar>
|
||||
</form>
|
||||
<vn-confirm
|
||||
vn-id="send-mail"
|
||||
on-response="$ctrl.returnDialog(response)"
|
||||
question="Changed terms"
|
||||
message="Notify customer?">
|
||||
</vn-confirm>
|
||||
</form>
|
|
@ -9,9 +9,11 @@ export default class Controller {
|
|||
this.billData = {};
|
||||
this.copyData();
|
||||
}
|
||||
|
||||
$onChanges() {
|
||||
this.copyData();
|
||||
}
|
||||
|
||||
copyData() {
|
||||
if (this.client) {
|
||||
this.billData.payMethodFk = this.client.payMethodFk;
|
||||
|
@ -19,10 +21,12 @@ export default class Controller {
|
|||
this.billData.dueDay = this.client.dueDay;
|
||||
}
|
||||
}
|
||||
|
||||
submit() {
|
||||
return this.$.watcher.submit().then(
|
||||
() => this.checkPaymentChanges());
|
||||
}
|
||||
|
||||
checkPaymentChanges() {
|
||||
let equals = true;
|
||||
Object.keys(this.billData).forEach(
|
||||
|
@ -35,12 +39,7 @@ export default class Controller {
|
|||
);
|
||||
|
||||
if (!equals) {
|
||||
this.$.sendMail.show();
|
||||
}
|
||||
}
|
||||
returnDialog(response) {
|
||||
if (response === 'ACCEPT') {
|
||||
this.$http.post(`/mailer/notification/payment-update/${this.client.id}`).then(
|
||||
this.$http.get(`/mailer/notification/payment-update/${this.client.id}`).then(
|
||||
() => this.vnApp.showMessage(this.translate.instant('Notification sent!'))
|
||||
);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<vn-float-button
|
||||
icon="edit"
|
||||
style="position: absolute; margin: 1em; bottom: 0; right: 0;"
|
||||
vn-visible-by="administrative, salesAssistant">
|
||||
vn-visible-by="marketing, buyer">
|
||||
</vn-float-button>
|
||||
</a>
|
||||
</vn-auto>
|
||||
|
|
|
@ -8,7 +8,15 @@
|
|||
vn-focus>
|
||||
</vn-textfield>
|
||||
<vn-textfield
|
||||
vn-three
|
||||
vn-one
|
||||
label="Name"
|
||||
model="$ctrl.filter.name"
|
||||
vn-focus>
|
||||
</vn-textfield>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
label="Description"
|
||||
model="$ctrl.filter.description">
|
||||
</vn-textfield>
|
||||
|
|
|
@ -36,7 +36,8 @@
|
|||
<tr>
|
||||
<td rowspan="{{
|
||||
::sale.components.length + 1
|
||||
}}" number>{{::sale.itemFk}}</td>
|
||||
}}" number pointer
|
||||
ng-click="$ctrl.showDescriptor($event, sale.itemFk)">{{::sale.itemFk}}</td>
|
||||
<td rowspan="{{
|
||||
::sale.components.length + 1
|
||||
}}"><vn-fetched-tags sale="sale"/></td>
|
||||
|
@ -69,3 +70,4 @@
|
|||
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
||||
</vn-card>
|
||||
</vn-vertical>
|
||||
<vn-item-descriptor-popover vn-id="descriptor"></vn-item-descriptor-popover>
|
||||
|
|
|
@ -43,6 +43,16 @@ class Controller extends FilterTicketList {
|
|||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
showDescriptor(event, itemFk) {
|
||||
this.$scope.descriptor.itemFk = itemFk;
|
||||
this.$scope.descriptor.parent = event.target;
|
||||
this.$scope.descriptor.show();
|
||||
}
|
||||
|
||||
onDescriptorLoad() {
|
||||
this.$scope.popover.relocate();
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$scope', '$timeout', '$state'];
|
||||
|
|
|
@ -1,27 +1,41 @@
|
|||
vn-ticket-components .vn-grid {
|
||||
tbody:not(:last-child) {
|
||||
border-bottom: none;
|
||||
}
|
||||
vn-ticket-components {
|
||||
vn-fetched-tags {
|
||||
& vn-horizontal {
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
|
||||
tfoot tr:first-child td {
|
||||
padding-top: 10px !important;
|
||||
& .inline-tag {
|
||||
display: inline-block;
|
||||
float: none
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tr {
|
||||
td {
|
||||
padding-top: .1em !important;
|
||||
padding-bottom: .1em !important;
|
||||
.vn-grid {
|
||||
tbody:not(:last-child) {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
td.first {
|
||||
tfoot tr:first-child td {
|
||||
padding-top: 10px !important;
|
||||
}
|
||||
|
||||
tr {
|
||||
td {
|
||||
padding-top: .1em !important;
|
||||
padding-bottom: .1em !important;
|
||||
}
|
||||
|
||||
td.last {
|
||||
padding-bottom: 10px !important;
|
||||
td.first {
|
||||
padding-top: 10px !important;
|
||||
}
|
||||
|
||||
td.last {
|
||||
padding-bottom: 10px !important;
|
||||
}
|
||||
}
|
||||
tr:not(:first-child):not(:last-child), {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
tr:not(:first-child):not(:last-child), {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
|
@ -25,7 +25,8 @@
|
|||
vn-tooltip="delete expedition"
|
||||
ng-click="$ctrl.deleteExpedition(expedition)">delete</i>
|
||||
</vn-one>
|
||||
<vn-one pad-medium-h>{{::expedition.itemFk}}</vn-one>
|
||||
<vn-one pointer number
|
||||
ng-click="$ctrl.showDescriptor($event, expedition.item.id)">{{::expedition.itemFk}}</vn-one>
|
||||
<vn-one pad-medium-h>{{::expedition.item.name}}</vn-one>
|
||||
<vn-one pad-medium-h>{{::expedition.package.name}}</vn-one>
|
||||
<vn-one pad-medium-h>{{::expedition.counter}}</vn-one>
|
||||
|
@ -41,3 +42,4 @@
|
|||
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
||||
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
||||
</vn-vertical>
|
||||
<vn-item-descriptor-popover vn-id="descriptor"></vn-item-descriptor-popover>
|
||||
|
|
|
@ -4,6 +4,7 @@ import FilterTicketList from '../filter-ticket-list';
|
|||
class Controller extends FilterTicketList {
|
||||
constructor($scope, $timeout, $stateParams, $http) {
|
||||
super($scope, $timeout, $stateParams);
|
||||
this.$scope = $scope;
|
||||
this.params = $stateParams;
|
||||
this.$http = $http;
|
||||
}
|
||||
|
@ -13,6 +14,16 @@ class Controller extends FilterTicketList {
|
|||
() => this.$.index.accept()
|
||||
);
|
||||
}
|
||||
|
||||
showDescriptor(event, itemFk) {
|
||||
this.$scope.descriptor.itemFk = itemFk;
|
||||
this.$scope.descriptor.parent = event.target;
|
||||
this.$scope.descriptor.show();
|
||||
}
|
||||
|
||||
onDescriptorLoad() {
|
||||
this.$scope.popover.relocate();
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$scope', '$timeout', '$state', '$http'];
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
<vn-vertical style="text-align:center">
|
||||
<vn-horizontal style="vertical-align:middle;">
|
||||
<vn-one>{{::$ctrl.sale.concept}}</vn-one>
|
||||
<vn-one>
|
||||
<vn-one ng-repeat="fetchedTag in $ctrl.sale.item.tags track by $index">
|
||||
<vn-label>{{::fetchedTag.tag.name}}</vn-label> {{::fetchedTag.value}}
|
||||
</vn-one>
|
||||
<vn-two>
|
||||
<section
|
||||
class="inline-tag ellipsize" ng-class="{'empty': !fetchedTag.value}"
|
||||
ng-repeat="fetchedTag in $ctrl.sale.item.tags track by $index"
|
||||
title="{{::fetchedTag.tag.name}}: {{::fetchedTag.value}}">
|
||||
{{::fetchedTag.value}}
|
||||
</section>
|
||||
</vn-one>
|
||||
</vn-vertical>
|
||||
</vn-horizontal>
|
|
@ -1,4 +1,5 @@
|
|||
import ngModule from '../module';
|
||||
import './style.scss';
|
||||
|
||||
ngModule.component('vnFetchedTags', {
|
||||
template: require('./index.html'),
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
@import "colors";
|
||||
|
||||
vn-fetched-tags {
|
||||
@media screen and (max-width: 1700px){
|
||||
& vn-horizontal {
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
|
||||
& .inline-tag {
|
||||
display: inline-block;
|
||||
float: none
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& vn-one:first-child {
|
||||
padding-top: 0.36em
|
||||
}
|
||||
|
||||
& .inline-tag {
|
||||
background-color: $secondary-font-color;
|
||||
margin: 0.4em 0.4em 0 0;
|
||||
color: $color-white;
|
||||
text-align: center;
|
||||
font-size: 0.8em;
|
||||
height: 1.25em;
|
||||
padding: 0.4em;
|
||||
float: left;
|
||||
width: 5em
|
||||
}
|
||||
|
||||
& .inline-tag.empty {
|
||||
background-color: $main-bg
|
||||
}
|
||||
|
||||
& .inline-tag.empty:after {
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
content: ' ';
|
||||
clear: both
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ Address: Consignatario
|
|||
Agency: Agencia
|
||||
Amount: Importe
|
||||
Basic data: Datos básicos
|
||||
Boxes: Cajas
|
||||
Checked: Comprobado
|
||||
Client: Cliente
|
||||
Company: Empresa
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<tr>
|
||||
<th style="text-align:center" translate>Is checked</th>
|
||||
<th number translate>Item</th>
|
||||
<th translate style="text-align:center">Description</th>
|
||||
<th translate>Description</th>
|
||||
<th number translate>Quantity</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -20,7 +20,8 @@
|
|||
disabled="true">
|
||||
</vn-check>
|
||||
</td>
|
||||
<td number>{{::sale.itemFk}}</td>
|
||||
<td number pointer
|
||||
ng-click="$ctrl.showDescriptor($event, sale.itemFk)">{{::sale.itemFk}}</td>
|
||||
<td><vn-fetched-tags sale="sale"/></td>
|
||||
<td number>{{::sale.quantity}}</td>
|
||||
</tr>
|
||||
|
@ -34,3 +35,4 @@
|
|||
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
||||
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
||||
</vn-vertical>
|
||||
<vn-item-descriptor-popover vn-id="descriptor"></vn-item-descriptor-popover>
|
||||
|
|
|
@ -4,9 +4,19 @@ import FilterTicketList from '../filter-ticket-list';
|
|||
class Controller extends FilterTicketList {
|
||||
constructor($scope, $timeout, $state) {
|
||||
super($scope, $timeout, $state);
|
||||
|
||||
this.$scope = $scope;
|
||||
this.onOrder('quantity', 'ASC');
|
||||
}
|
||||
|
||||
showDescriptor(event, itemFk) {
|
||||
this.$scope.descriptor.itemFk = itemFk;
|
||||
this.$scope.descriptor.parent = event.target;
|
||||
this.$scope.descriptor.show();
|
||||
}
|
||||
|
||||
onDescriptorLoad() {
|
||||
this.$scope.popover.relocate();
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$scope', '$timeout', '$state'];
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<vn-multi-check data="index.model.instances"></vn-multi-check>
|
||||
</th>
|
||||
<th number translate>Item</th>
|
||||
<th translate style="text-align:center">Description</th>
|
||||
<th translate>Description</th>
|
||||
<th number translate>Quantity</th>
|
||||
<th number translate>Price</th>
|
||||
<th number translate>Discount</th>
|
||||
|
@ -62,7 +62,5 @@
|
|||
</vn-card>
|
||||
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
||||
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="index.model.instances"></vn-auto-paging> -->
|
||||
<vn-item-descriptor-popover vn-id="descriptor">
|
||||
</vn-item-descriptor-popover>
|
||||
</vn-popover>
|
||||
<vn-item-descriptor-popover vn-id="descriptor"></vn-item-descriptor-popover>
|
||||
</vn-vertical>
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<tr>
|
||||
<th></th>
|
||||
<th number translate>Item</th>
|
||||
<th translate style="text-align:center">Description</th>
|
||||
<th translate>Description</th>
|
||||
<th number translate>Quantity</th>
|
||||
<th number translate>Price</th>
|
||||
<th number translate>Discount</th>
|
||||
|
@ -73,7 +73,10 @@
|
|||
vn-tooltip="delete expedition"
|
||||
ng-click="$ctrl.deleteExpedition(expedition)">warning</i> -->
|
||||
</td>
|
||||
<td number>{{("000000"+sale.itemFk).slice(-6)}}</td>
|
||||
<td number pointer
|
||||
ng-click="$ctrl.showDescriptor($event, sale.itemFk)">
|
||||
{{("000000"+sale.itemFk).slice(-6)}}
|
||||
</td>
|
||||
<td><vn-fetched-tags sale="sale"/></td>
|
||||
<td number>{{::sale.quantity}}</td>
|
||||
<td number>{{::sale.price | currency:'€':2}}</td>
|
||||
|
@ -84,4 +87,5 @@
|
|||
</table>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
</vn-card>
|
||||
<vn-item-descriptor-popover vn-id="descriptor"></vn-item-descriptor-popover>
|
||||
|
|
|
@ -2,7 +2,8 @@ import ngModule from '../module';
|
|||
import './style.scss';
|
||||
|
||||
class Controller {
|
||||
constructor($http) {
|
||||
constructor($scope, $http) {
|
||||
this.$scope = $scope;
|
||||
this.$http = $http;
|
||||
}
|
||||
|
||||
|
@ -15,9 +16,19 @@ class Controller {
|
|||
this.summary = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
showDescriptor(event, itemFk) {
|
||||
this.$scope.descriptor.itemFk = itemFk;
|
||||
this.$scope.descriptor.parent = event.target;
|
||||
this.$scope.descriptor.show();
|
||||
}
|
||||
|
||||
onDescriptorLoad() {
|
||||
this.$scope.popover.relocate();
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$http'];
|
||||
Controller.$inject = ['$scope', '$http'];
|
||||
|
||||
ngModule.component('vnTicketSummary', {
|
||||
template: require('./index.html'),
|
||||
|
|
|
@ -1,27 +1,33 @@
|
|||
<mg-ajax path="/ticket/api/sales/filter" options="vnIndexNonAuto" actions="$ctrl.setVolumes()"></mg-ajax>
|
||||
<mg-ajax path="/client/api/tickets/{{edit.params.id}}/getTotalVolume" options="mgEdit"></mg-ajax>
|
||||
<vn-vertical>
|
||||
<vn-card pad-large>
|
||||
<vn-vertical>
|
||||
<vn-title>Volumes</vn-title>
|
||||
<vn-one pad-small margin-medium-bottom pad-large class="totalBox">
|
||||
<vn-label-value label="Total"
|
||||
value="{{::edit.model.totalVolume}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Cajas"
|
||||
value="{{::edit.model.totalBoxes}}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
<table class="vn-grid">
|
||||
<thead>
|
||||
<tr>
|
||||
<th number translate>Item</th>
|
||||
<th translate style="text-align:center">Description</th>
|
||||
<th translate>Description</th>
|
||||
<th number translate>Quantity</th>
|
||||
<th number translate>m³ per unit</th>
|
||||
<th number translate>m³ per quantity</th>
|
||||
<th number translate>total m³</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="sale in index.model.instances track by sale.id" class="list list-element">
|
||||
<td number>{{::sale.itemFk}}</td>
|
||||
<td number pointer
|
||||
ng-click="$ctrl.showDescriptor($event, sale.itemFk)">{{::sale.itemFk}}</td>
|
||||
<td><vn-fetched-tags sale="sale"/></td>
|
||||
<td number>{{::sale.quantity}}</td>
|
||||
<td number>{{::sale.volume.m3_uni | number:3}}</td>
|
||||
<td number>{{::sale.volume.volumeTimesQuantity | number:3}}</td>
|
||||
<td number>{{::sale.volume.m3_total | number:3}}</td>
|
||||
<td number>{{::sale.volume.m3 | number:3}}</td>
|
||||
</tr>
|
||||
<tr ng-if="index.model.count === 0" class="list list-element">
|
||||
<td colspan="6" style="text-align: center" translate>No results</td>
|
||||
|
@ -33,3 +39,5 @@
|
|||
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
||||
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
||||
</vn-vertical>
|
||||
<vn-item-descriptor-popover vn-id="descriptor"></vn-item-descriptor-popover>
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import ngModule from '../module';
|
||||
import FilterTicketList from '../filter-ticket-list';
|
||||
import './style.scss';
|
||||
|
||||
class Controller extends FilterTicketList {
|
||||
constructor($scope, $http, $translate, $timeout, $state) {
|
||||
|
@ -8,7 +9,6 @@ class Controller extends FilterTicketList {
|
|||
this.$http = $http;
|
||||
this.$translate = $translate;
|
||||
this.onOrder('itemFk', 'ASC');
|
||||
|
||||
this.ticketVolumes = [];
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ class Controller extends FilterTicketList {
|
|||
.then(response => {
|
||||
if (response.data) {
|
||||
this.$scope.index.model.instances.forEach(sale => {
|
||||
response.data.volumes[0].forEach(volume => {
|
||||
response.data.volumes.forEach(volume => {
|
||||
if (sale.id === volume.saleFk) {
|
||||
sale.volume = volume;
|
||||
}
|
||||
|
@ -28,6 +28,16 @@ class Controller extends FilterTicketList {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
showDescriptor(event, itemFk) {
|
||||
this.$scope.descriptor.itemFk = itemFk;
|
||||
this.$scope.descriptor.parent = event.target;
|
||||
this.$scope.descriptor.show();
|
||||
}
|
||||
|
||||
onDescriptorLoad() {
|
||||
this.$scope.popover.relocate();
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$scope', '$http', '$translate', '$timeout', '$state'];
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
.totalBox {
|
||||
border: 1px solid #CCC;
|
||||
text-align: left;
|
||||
align-self: flex-end;
|
||||
}
|
|
@ -22,14 +22,14 @@ describe('ticket', () => {
|
|||
then: () => {}
|
||||
};
|
||||
}};
|
||||
$state = _$state_;
|
||||
$state = _$state_;
|
||||
$state.params.id = 101;
|
||||
controller = $componentController('vnTicketVolume', {$scope: $scope}, {$httpBackend: $httpBackend}, {$state: $state});
|
||||
}));
|
||||
|
||||
it('should join the sale volumes to its respective sale', () => {
|
||||
controller.ticket = {id: 1};
|
||||
let response = {volumes: [[{saleFk: 1, m3: 0.008}, {saleFk: 2, m3: 0.003}]]};
|
||||
let response = {volumes: [{saleFk: 1, m3: 0.008}, {saleFk: 2, m3: 0.003}]};
|
||||
$httpBackend.whenGET(`/api/tickets/1/getVolume`).respond(response);
|
||||
$httpBackend.expectGET(`/api/tickets/1/getVolume`);
|
||||
controller.setVolumes();
|
||||
|
|
|
@ -75,7 +75,6 @@ export default {
|
|||
payMethodOptionOne: `${components.vnAutocomplete}[field="$ctrl.client.payMethodFk"] vn-drop-down ul > li:nth-child(2)`,
|
||||
IBANInput: `${components.vnTextfield}[name="iban"]`,
|
||||
dueDayInput: `${components.vnTextfield}[name="dueDay"]`,
|
||||
cancelNotificationButton: 'vn-client-billing-data > vn-confirm button[response=CANCEL]',
|
||||
receivedCoreVNHCheckbox: `${components.vnCheck}[label='Received core VNH'] > label > input`,
|
||||
receivedCoreVNLCheckbox: `${components.vnCheck}[label='Received core VNL'] > label > input`,
|
||||
receivedB2BVNLCheckbox: `${components.vnCheck}[label='Received B2B VNL'] > label > input`,
|
||||
|
@ -83,7 +82,7 @@ export default {
|
|||
},
|
||||
clientAddresses: {
|
||||
addressesButton: `${components.vnMenuItem}[ui-sref="client.card.address.index"]`,
|
||||
createAddress: `${components.vnFloatButton}`,
|
||||
createAddress: `vn-client-address-index ${components.vnFloatButton}`,
|
||||
defaultCheckboxInput: `${components.vnCheck}[label='Default'] > label > input`,
|
||||
consigneeInput: `${components.vnTextfield}[name="nickname"]`,
|
||||
streetAddressInput: `${components.vnTextfield}[name="street"]`,
|
||||
|
@ -95,12 +94,12 @@ export default {
|
|||
agenctySecondOption: `${components.vnAutocomplete}[field="$ctrl.address.agencyModeFk"] vn-drop-down ul > li:nth-child(2)`,
|
||||
phoneInput: `${components.vnTextfield}[name="phone"]`,
|
||||
mobileInput: `${components.vnTextfield}[name="mobile"]`,
|
||||
defaultAddress: 'vn-client-address-index > vn-vertical > vn-card > div > vn-horizontal:nth-child(2) > vn-one > vn-horizontal > vn-one > div:nth-child(2)',
|
||||
defaultAddress: 'vn-client-address-index vn-horizontal:nth-child(2) div[name="street"]',
|
||||
secondMakeDefaultStar: 'vn-client-address-index > vn-vertical > vn-card > div > vn-horizontal:nth-child(3) > vn-one > vn-horizontal > vn-none > i',
|
||||
firstEditButton: `${components.vnIconButton}[icon='edit']`,
|
||||
secondEditButton: `vn-horizontal:nth-child(3) > vn-one > vn-horizontal > a > ${components.vnIconButton}[icon='edit']`,
|
||||
firstEditButton: `vn-client-address-index ${components.vnIconButton}[icon='edit']`,
|
||||
secondEditButton: `vn-client-address-index vn-horizontal:nth-child(3) ${components.vnIconButton}[icon='edit']`,
|
||||
activeCheckbox: `${components.vnCheck}[label='Enabled'] > label > input`,
|
||||
equalizationTaxCheckboxLabel: `${components.vnCheck}[label='Is equalizated'] > label > input`,
|
||||
equalizationTaxCheckboxLabel: `vn-client-address-edit ${components.vnCheck}[label='Is equalizated'] > label > input`,
|
||||
firstObservationTypeSelect: `${components.vnAutocomplete}[field="observation.observationTypeFk"]:nth-child(1) input`,
|
||||
firstObservationTypeSelectOptionOne: `${components.vnAutocomplete}[field="observation.observationTypeFk"] vn-drop-down ul > li:nth-child(1)`,
|
||||
firstObservationDescriptionInput: `vn-horizontal:nth-child(3) > vn-textfield[label="Description"] > div > input`,
|
||||
|
|
|
@ -56,7 +56,6 @@ describe('Client', () => {
|
|||
.waitToClick(selectors.clientPayMethod.receivedCoreVNLCheckbox)
|
||||
.waitToClick(selectors.clientPayMethod.receivedB2BVNLCheckbox)
|
||||
.waitToClick(selectors.clientPayMethod.saveButton)
|
||||
.waitToClick(selectors.clientPayMethod.cancelNotificationButton)
|
||||
.waitForSnackbar()
|
||||
.then(result => {
|
||||
expect(result).toContain('Error');
|
||||
|
@ -68,10 +67,9 @@ describe('Client', () => {
|
|||
.clearInput(selectors.clientPayMethod.IBANInput)
|
||||
.type(selectors.clientPayMethod.IBANInput, 'ES91 2100 0418 4502 0005 1332')
|
||||
.waitToClick(selectors.clientPayMethod.saveButton)
|
||||
.waitToClick(selectors.clientPayMethod.cancelNotificationButton)
|
||||
.waitForSnackbar()
|
||||
.then(result => {
|
||||
expect(result).toEqual('Data saved!');
|
||||
expect((result === 'Notification sent!' || result === 'Data saved!')).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ describe('Ticket', () => {
|
|||
.wait(selectors.ticketSales.firstSaleText)
|
||||
.getInnerText(selectors.ticketSales.firstSaleText)
|
||||
.then(value => {
|
||||
expect(value).toContain('Color Yellow');
|
||||
expect(value).toContain('Yellow');
|
||||
expect(value).toContain('5');
|
||||
expect(value).toContain('€1.50');
|
||||
expect(value).toContain('0 %');
|
||||
|
@ -64,7 +64,7 @@ describe('Ticket', () => {
|
|||
.wait(selectors.ticketSales.secondSaleText)
|
||||
.getInnerText(selectors.ticketSales.secondSaleText)
|
||||
.then(value => {
|
||||
expect(value).toContain('Color Yellow');
|
||||
expect(value).toContain('Yellow');
|
||||
expect(value).toContain('2');
|
||||
expect(value).toContain('€1.50');
|
||||
expect(value).toContain('0 %');
|
||||
|
|
|
@ -170,6 +170,7 @@ gulp.task('docker-compose', async () => {
|
|||
],
|
||||
container_name: `\${BRANCH_NAME}-${service.name}`,
|
||||
image: `${service.name}:\${TAG}`,
|
||||
volumes: ['/config:/config'],
|
||||
build: {
|
||||
context: `./services`,
|
||||
dockerfile: dockerFile
|
||||
|
|
|
@ -363,7 +363,7 @@ CREATE TABLE `user` (
|
|||
KEY `nickname` (`nickname`),
|
||||
KEY `lang` (`lang`),
|
||||
CONSTRAINT `user_ibfk_2` FOREIGN KEY (`role`) REFERENCES `role` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=14199 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global users';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=14209 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global users';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -2433,7 +2433,7 @@ CREATE TABLE `Agencias_dits` (
|
|||
`value_old` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`value_new` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
PRIMARY KEY (`idAgencia_dits`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=20674 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=20680 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -2533,7 +2533,7 @@ CREATE TABLE `Articles` (
|
|||
CONSTRAINT `Articles_ibfk_5` FOREIGN KEY (`tipo_id`) REFERENCES `Tipos` (`tipo_id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `expenceFk` FOREIGN KEY (`expenceFk`) REFERENCES `Gastos` (`Id_Gasto`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `producer_id` FOREIGN KEY (`producer_id`) REFERENCES `producer` (`producer_id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=312222 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=312492 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -2723,7 +2723,7 @@ CREATE TABLE `Articles_dits` (
|
|||
KEY `fgkey1_idx` (`idaccion_dits`),
|
||||
KEY `fgkey2_idx` (`Id_Ticket`),
|
||||
KEY `fgkey3_idx` (`Id_Trabajador`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=20192 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=20197 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -2745,7 +2745,7 @@ CREATE TABLE `Articles_nicho` (
|
|||
KEY `Articles_nicho_wh_fk` (`warehouse_id`),
|
||||
CONSTRAINT `Articles_nicho_wh_fk` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `Articles_nichos_fk` FOREIGN KEY (`Id_Article`) REFERENCES `Articles` (`Id_Article`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=464716 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=466709 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -2909,7 +2909,7 @@ CREATE TABLE `Cajas` (
|
|||
KEY `warehouse_id` (`warehouse_id`),
|
||||
KEY `fk_Cajas_Proveedores_account1_idx` (`Proveedores_account_Id`),
|
||||
CONSTRAINT `Cajas_ibfk_2` FOREIGN KEY (`Id_Banco`) REFERENCES `Bancos` (`Id_Banco`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=584875 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=585503 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -3056,7 +3056,7 @@ CREATE TABLE `Clientes` (
|
|||
CONSTRAINT `Clientes_ibfk_5` FOREIGN KEY (`province_id`) REFERENCES `province` (`province_id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `canal_nuevo_cliente` FOREIGN KEY (`chanel_id`) REFERENCES `chanel` (`chanel_id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `tipos_de_cliente` FOREIGN KEY (`clientes_tipo_id`) REFERENCES `clientes_tipo` (`clientes_tipo_id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=14199 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=14207 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -3339,7 +3339,7 @@ CREATE TABLE `Colas` (
|
|||
CONSTRAINT `Colas_ibfk_3` FOREIGN KEY (`Id_Prioridad`) REFERENCES `Prioridades` (`Id_Prioridad`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `Colas_ibfk_4` FOREIGN KEY (`Id_Impresora`) REFERENCES `Impresoras` (`Id_Impresora`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `Colas_ibfk_5` FOREIGN KEY (`Id_Trabajador`) REFERENCES `Trabajadores` (`Id_Trabajador`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=209559 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=212089 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -3421,7 +3421,7 @@ CREATE TABLE `Compres` (
|
|||
CONSTRAINT `Compres_ibfk_2` FOREIGN KEY (`Id_Cubo`) REFERENCES `Cubos` (`Id_Cubo`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `Compres_ibfk_3` FOREIGN KEY (`container_id`) REFERENCES `container` (`container_id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `buy_id` FOREIGN KEY (`Id_Entrada`) REFERENCES `Entradas` (`Id_Entrada`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=252873730 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=253422636 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -3717,7 +3717,7 @@ CREATE TABLE `Consignatarios` (
|
|||
CONSTRAINT `Consignatarios_ibfk_3` FOREIGN KEY (`province_id`) REFERENCES `province` (`province_id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `Consignatarios_ibfk_4` FOREIGN KEY (`Id_Agencia`) REFERENCES `Agencias` (`Id_Agencia`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `address_customer_id` FOREIGN KEY (`Id_cliente`) REFERENCES `Clientes` (`id_cliente`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=25095 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=25102 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -4098,7 +4098,7 @@ CREATE TABLE `Entradas` (
|
|||
CONSTRAINT `Entradas_ibfk_1` FOREIGN KEY (`Id_Proveedor`) REFERENCES `Proveedores` (`Id_Proveedor`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `Entradas_ibfk_6` FOREIGN KEY (`travel_id`) REFERENCES `travel` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `Entradas_ibfk_7` FOREIGN KEY (`empresa_id`) REFERENCES `empresa` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=142287 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='InnoDB free: 88064 kB; (`Id_Proveedor`) REFER `vn2008/Provee';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=142448 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='InnoDB free: 88064 kB; (`Id_Proveedor`) REFER `vn2008/Provee';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -4262,7 +4262,7 @@ CREATE TABLE `Entradas_dits` (
|
|||
CONSTRAINT `Entradas_dits_ibfk_1` FOREIGN KEY (`Id_Ticket`) REFERENCES `Entradas` (`Id_Entrada`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `fgkey_entradas_1` FOREIGN KEY (`idaccion_dits`) REFERENCES `accion_dits` (`idaccion_dits`) ON DELETE NO ACTION ON UPDATE CASCADE,
|
||||
CONSTRAINT `fgkey_entradas_3` FOREIGN KEY (`Id_Trabajador`) REFERENCES `Trabajadores` (`Id_Trabajador`) ON DELETE NO ACTION ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2792540 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2797253 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -4280,7 +4280,7 @@ CREATE TABLE `Entradas_kop` (
|
|||
PRIMARY KEY (`Id_Entradas_kop`),
|
||||
KEY `entradas_entradas_kop_idx` (`Id_Entrada`),
|
||||
CONSTRAINT `entradas_entradas_kop` FOREIGN KEY (`Id_Entrada`) REFERENCES `Entradas` (`Id_Entrada`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=236 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Relaciona las entradas con los origenes de compra';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=258 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Relaciona las entradas con los origenes de compra';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -4523,7 +4523,7 @@ CREATE TABLE `Facturas` (
|
|||
CONSTRAINT `Facturas_ibfk_4` FOREIGN KEY (`cplusTaxBreakFk`) REFERENCES `vn`.`cplusTaxBreak` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `invoice_bank_id` FOREIGN KEY (`Id_Banco`) REFERENCES `Bancos` (`Id_Banco`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `invoice_customer_id` FOREIGN KEY (`Id_Cliente`) REFERENCES `Clientes` (`id_cliente`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=453886 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=453920 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -4741,7 +4741,7 @@ CREATE TABLE `Greuges` (
|
|||
KEY `Id_Ticket_Greuge_Ticket_idx` (`Id_Ticket`),
|
||||
CONSTRAINT `Id_Ticket_Greuge_Ticket` FOREIGN KEY (`Id_Ticket`) REFERENCES `Tickets` (`Id_Ticket`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `greuges_type_fk` FOREIGN KEY (`Greuges_type_id`) REFERENCES `Greuges_type` (`Greuges_type_id`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2231053 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=FIXED;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2233651 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=FIXED;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -4942,7 +4942,7 @@ CREATE TABLE `Movimientos` (
|
|||
KEY `itemFk_ticketFk` (`Id_Article`,`Id_Ticket`),
|
||||
CONSTRAINT `Movimientos_ibfk_1` FOREIGN KEY (`Id_Article`) REFERENCES `Articles` (`Id_Article`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `movement_ticket_id` FOREIGN KEY (`Id_Ticket`) REFERENCES `Tickets` (`Id_Ticket`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=20893331 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=20917575 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -5091,7 +5091,7 @@ CREATE TABLE `Movimientos_mark` (
|
|||
`Id_Movimiento_mark` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`Id_Movimiento_mark`),
|
||||
KEY `Id_Movimiento` (`Id_Movimiento`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10611994 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10638135 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -5161,7 +5161,7 @@ CREATE TABLE `Ordenes` (
|
|||
KEY `Id_Comprador` (`CodCOMPRADOR`),
|
||||
KEY `Id_Movimiento` (`Id_Movimiento`),
|
||||
KEY `Id_Vendedor` (`CodVENDEDOR`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=30723 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=30788 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -5333,7 +5333,7 @@ CREATE TABLE `Proveedores` (
|
|||
CONSTRAINT `pay_dem_id` FOREIGN KEY (`pay_dem_id`) REFERENCES `pay_dem` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `pay_met_id` FOREIGN KEY (`pay_met_id`) REFERENCES `pay_met` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `province_id` FOREIGN KEY (`province_id`) REFERENCES `province` (`province_id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2498 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2503 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -5450,7 +5450,7 @@ CREATE TABLE `Recibos` (
|
|||
CONSTRAINT `Recibos_ibfk_1` FOREIGN KEY (`empresa_id`) REFERENCES `empresa` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `Recibos_ibfk_2` FOREIGN KEY (`Id_Banco`) REFERENCES `Bancos` (`Id_Banco`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `recibo_customer_id` FOREIGN KEY (`Id_Cliente`) REFERENCES `Clientes` (`id_cliente`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=461635 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=462009 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -5586,7 +5586,7 @@ CREATE TABLE `Reservas` (
|
|||
PRIMARY KEY (`Id_Reserva`),
|
||||
KEY `Id_1` (`Id_Ticket`),
|
||||
KEY `Id_Article` (`Id_Article`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=738 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=786 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -5617,7 +5617,7 @@ CREATE TABLE `Rutas` (
|
|||
KEY `Fecha` (`Fecha`),
|
||||
KEY `gestdoc_id` (`gestdoc_id`),
|
||||
CONSTRAINT `Rutas_ibfk_1` FOREIGN KEY (`gestdoc_id`) REFERENCES `gestdoc` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=38753 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=38837 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -5805,7 +5805,7 @@ CREATE TABLE `Split_lines` (
|
|||
KEY `Id_Compra` (`Id_Compra`),
|
||||
CONSTRAINT `Id_Compra` FOREIGN KEY (`Id_Compra`) REFERENCES `Compres` (`Id_Compra`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `Split_lines_ibfk_1` FOREIGN KEY (`Id_Split`) REFERENCES `Splits` (`Id_Split`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=321074 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=321219 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -5823,7 +5823,7 @@ CREATE TABLE `Splits` (
|
|||
`Notas` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
PRIMARY KEY (`Id_Split`),
|
||||
KEY `Id_Entrada` (`Id_Entrada`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=36233 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=36235 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -5851,7 +5851,7 @@ CREATE TABLE `Stockcontrol` (
|
|||
CONSTRAINT `Stockcontrol_ibfk_1` FOREIGN KEY (`Id_Article`) REFERENCES `Articles` (`Id_Article`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `Stockcontrol_ibfk_2` FOREIGN KEY (`Id_Remitente`) REFERENCES `Trabajadores` (`Id_Trabajador`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `Stockcontrol_ibfk_3` FOREIGN KEY (`Id_Solver`) REFERENCES `Trabajadores` (`Id_Trabajador`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=23500 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=23507 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -5909,7 +5909,7 @@ CREATE TABLE `Tickets` (
|
|||
CONSTRAINT `Tickets_ibfk_9` FOREIGN KEY (`Id_Ruta`) REFERENCES `Rutas` (`Id_Ruta`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `ticket_customer_id` FOREIGN KEY (`Id_Cliente`) REFERENCES `Clientes` (`id_cliente`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `tickets_fk10` FOREIGN KEY (`Factura`) REFERENCES `Facturas` (`Id_Factura`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1871564 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1874093 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -6118,7 +6118,7 @@ CREATE TABLE `Tickets_dits` (
|
|||
CONSTRAINT `Tickets_dits_ibfk_1` FOREIGN KEY (`Id_Ticket`) REFERENCES `Tickets` (`Id_Ticket`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `fgkey1` FOREIGN KEY (`idaccion_dits`) REFERENCES `accion_dits` (`idaccion_dits`) ON DELETE NO ACTION ON UPDATE CASCADE,
|
||||
CONSTRAINT `fgkey3` FOREIGN KEY (`Id_Trabajador`) REFERENCES `Trabajadores` (`Id_Trabajador`) ON DELETE NO ACTION ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=58908146 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=58938859 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -6167,7 +6167,7 @@ CREATE TABLE `Tickets_turno` (
|
|||
`weekDay` tinyint(1) DEFAULT NULL COMMENT 'funcion de mysql Lunes = 0, Domingo = 6',
|
||||
PRIMARY KEY (`Id_Ticket`),
|
||||
CONSTRAINT `Id_Ticket_fk` FOREIGN KEY (`Id_Ticket`) REFERENCES `Tickets` (`Id_Ticket`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1871387 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1873622 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -6473,7 +6473,7 @@ CREATE TABLE `Vehiculos_consumo` (
|
|||
PRIMARY KEY (`Vehiculos_consumo_id`,`Id_Vehiculo`),
|
||||
KEY `fk_Vehiculos_consumo_Vehiculos_idx` (`Id_Vehiculo`),
|
||||
CONSTRAINT `fk_Vehiculos_consumo_Vehiculos` FOREIGN KEY (`Id_Vehiculo`) REFERENCES `Vehiculos` (`Id_Vehiculo`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8132 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='En esta tabla apuntan el importe de los tickets de la gasolinera solred, con quien tenemos un contrato y nos facturan mensualmente';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8148 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='En esta tabla apuntan el importe de los tickets de la gasolinera solred, con quien tenemos un contrato y nos facturan mensualmente';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -6587,7 +6587,7 @@ CREATE TABLE `XDiario` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `empresa_id` (`empresa_id`),
|
||||
CONSTRAINT `XDiario_ibfk_1` FOREIGN KEY (`empresa_id`) REFERENCES `empresa` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3320103 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3321290 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -6695,7 +6695,7 @@ CREATE TABLE `account_conciliacion` (
|
|||
KEY `fg_accconciliacion_key1_idx` (`Id_Proveedores_account`),
|
||||
KEY `index_id_calculated` (`id_calculated`),
|
||||
CONSTRAINT `fg_key1_accountconc` FOREIGN KEY (`Id_Proveedores_account`) REFERENCES `Proveedores_account` (`Id_Proveedores_account`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1833 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1966 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -7105,7 +7105,7 @@ CREATE TABLE `awb` (
|
|||
CONSTRAINT `awbInvoiceIn` FOREIGN KEY (`invoiceInFk`) REFERENCES `recibida` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||
CONSTRAINT `awbTransitoryFk` FOREIGN KEY (`transitario_id`) REFERENCES `Proveedores` (`Id_Proveedor`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `awb_ibfk_1` FOREIGN KEY (`iva_id`) REFERENCES `iva_codigo` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2547 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2548 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -7363,7 +7363,7 @@ CREATE TABLE `awb_gestdoc` (
|
|||
KEY `awb_gestdoc_gestdoc_fk` (`gestdoc_id`),
|
||||
CONSTRAINT `awb_gestdoc_awb_fk` FOREIGN KEY (`awb_id`) REFERENCES `awb` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `awb_gestdoc_gestdoc_fk` FOREIGN KEY (`gestdoc_id`) REFERENCES `gestdoc` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2211 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2212 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -7481,7 +7481,7 @@ CREATE TABLE `barcodes` (
|
|||
UNIQUE KEY `Id_Article_2` (`Id_Article`,`code`),
|
||||
KEY `Id_Article` (`Id_Article`),
|
||||
CONSTRAINT `barcodes_ibfk_1` FOREIGN KEY (`Id_Article`) REFERENCES `Articles` (`Id_Article`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=35692 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=35736 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -7588,7 +7588,7 @@ CREATE TABLE `buy_edi` (
|
|||
`ref` int(11) NOT NULL,
|
||||
`item` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`pac` int(11) DEFAULT '0',
|
||||
`qty` int(10) unsigned NOT NULL,
|
||||
`qty` int(10) NOT NULL,
|
||||
`ori` varchar(3) COLLATE utf8_unicode_ci DEFAULT 'NL',
|
||||
`cat` varchar(2) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`agj` int(11) DEFAULT NULL,
|
||||
|
@ -7622,7 +7622,7 @@ CREATE TABLE `buy_edi` (
|
|||
KEY `kop` (`kop`),
|
||||
KEY `barcode` (`barcode`),
|
||||
KEY `fec` (`fec`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=697023 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=697977 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -7876,7 +7876,7 @@ CREATE TABLE `cl_act` (
|
|||
CONSTRAINT `cl_act_ibfk_1` FOREIGN KEY (`Id_Movimiento`) REFERENCES `Movimientos` (`Id_Movimiento`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `cl_act_ibfk_3` FOREIGN KEY (`Id_Trabajador`) REFERENCES `Trabajadores` (`Id_Trabajador`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `cl_act_ibfk_4` FOREIGN KEY (`cl_main_id`) REFERENCES `cl_main` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=83147 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Acciones en respuesta a las reclamaciones';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=83376 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Acciones en respuesta a las reclamaciones';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -7910,7 +7910,7 @@ CREATE TABLE `cl_cau` (
|
|||
CONSTRAINT `cl_cau_ibfk_7` FOREIGN KEY (`cl_mot_id`) REFERENCES `cl_mot` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `cl_cau_ibfk_8` FOREIGN KEY (`cl_con_id`) REFERENCES `cl_con` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `cl_cau_ibfk_9` FOREIGN KEY (`Id_Trabajador`) REFERENCES `Trabajadores` (`Id_Trabajador`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=45099 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Causas de las reclamaciones';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=45191 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Causas de las reclamaciones';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -7964,7 +7964,7 @@ CREATE TABLE `cl_det` (
|
|||
CONSTRAINT `cl_det_ibfk_6` FOREIGN KEY (`cl_pet_id`) REFERENCES `cl_pet` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `cl_det_ibfk_7` FOREIGN KEY (`Id_Movimiento`) REFERENCES `Movimientos` (`Id_Movimiento`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `cl_det_ibfk_8` FOREIGN KEY (`cl_main_id`) REFERENCES `cl_main` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=114977 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle de las reclamaciones';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=115084 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle de las reclamaciones';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -8021,7 +8021,7 @@ CREATE TABLE `cl_main` (
|
|||
CONSTRAINT `cl_main_ibfk_3` FOREIGN KEY (`cl_est_id`) REFERENCES `cl_est` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `cl_main_ibfk_4` FOREIGN KEY (`cl_dep_id`) REFERENCES `cl_dep` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `cl_main_ibfk_5` FOREIGN KEY (`Id_Cliente`) REFERENCES `Clientes` (`id_cliente`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=49485 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Reclamaciones, tabla principal';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=49559 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Reclamaciones, tabla principal';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -8134,7 +8134,7 @@ CREATE TABLE `client_observation` (
|
|||
KEY `Id_Cliente` (`Id_Cliente`),
|
||||
CONSTRAINT `client_observation_ibfk_1` FOREIGN KEY (`Id_Cliente`) REFERENCES `Clientes` (`id_cliente`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `client_observation_ibfk_2` FOREIGN KEY (`Id_Trabajador`) REFERENCES `Trabajadores` (`Id_Trabajador`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=63585 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=63623 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -8300,7 +8300,7 @@ CREATE TABLE `consignatarios_observation` (
|
|||
`text` text COLLATE utf8_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`consignatarios_observation_id`),
|
||||
UNIQUE KEY `Id_Consigna` (`Id_Consigna`,`observation_type_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3163 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Observaciones de los consignatarios';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3164 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Observaciones de los consignatarios';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -8382,7 +8382,7 @@ CREATE TABLE `credit` (
|
|||
KEY `credit_ClienteFk` (`Id_Cliente`),
|
||||
CONSTRAINT `credit_ClienteFk` FOREIGN KEY (`Id_Cliente`) REFERENCES `Clientes` (`id_cliente`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `workers_fk` FOREIGN KEY (`Id_Trabajador`) REFERENCES `Trabajadores` (`Id_Trabajador`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=63159 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=63214 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -8894,7 +8894,7 @@ CREATE TABLE `escritos_det` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `empresa_id` (`empresa_id`),
|
||||
CONSTRAINT `escritos_det_ibfk_1` FOREIGN KEY (`empresa_id`) REFERENCES `empresa` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=15401 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=15406 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -8923,7 +8923,7 @@ CREATE TABLE `expeditions` (
|
|||
KEY `index4` (`ticket_id`),
|
||||
CONSTRAINT `Id_Agencia` FOREIGN KEY (`agency_id`) REFERENCES `Agencias` (`Id_Agencia`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `ticket_id` FOREIGN KEY (`ticket_id`) REFERENCES `Tickets` (`Id_Ticket`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2409616 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2412876 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -9044,7 +9044,7 @@ CREATE TABLE `expeditions_deleted` (
|
|||
KEY `index2` (`EsBulto`),
|
||||
KEY `index3` (`odbc_date`),
|
||||
KEY `index4` (`ticket_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2409543 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2412323 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -9183,7 +9183,7 @@ CREATE TABLE `gestdoc` (
|
|||
UNIQUE KEY `emp_id` (`emp_id`,`orden`,`warehouse_id`),
|
||||
KEY `trabajador_id` (`trabajador_id`),
|
||||
KEY `warehouse_id` (`warehouse_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=982243 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=985305 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='document managment system';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -9382,7 +9382,7 @@ CREATE TABLE `intrastat_data` (
|
|||
KEY `recibida` (`recibida_id`),
|
||||
CONSTRAINT `intrastat_data_ibfk_1` FOREIGN KEY (`intrastat_id`) REFERENCES `Intrastat` (`Codintrastat`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `intrastat_data_ibfk_2` FOREIGN KEY (`recibida_id`) REFERENCES `recibida` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=65650 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=65725 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -9720,7 +9720,7 @@ CREATE TABLE `mail` (
|
|||
`recipientFk` int(11) DEFAULT NULL,
|
||||
`plainTextBody` text COLLATE utf8_unicode_ci,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=1341075 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=1342007 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -9778,7 +9778,7 @@ CREATE TABLE `mandato` (
|
|||
CONSTRAINT `mandato_fgkey1` FOREIGN KEY (`Id_Cliente`) REFERENCES `Clientes` (`id_cliente`) ON DELETE NO ACTION ON UPDATE CASCADE,
|
||||
CONSTRAINT `mandato_fgkey2` FOREIGN KEY (`empresa_id`) REFERENCES `empresa` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE,
|
||||
CONSTRAINT `mandato_fgkey3` FOREIGN KEY (`idmandato_tipo`) REFERENCES `mandato_tipo` (`idmandato_tipo`) ON DELETE NO ACTION ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=14987 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=14991 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -9987,7 +9987,7 @@ CREATE TABLE `pago` (
|
|||
CONSTRAINT `pago_moneda` FOREIGN KEY (`id_moneda`) REFERENCES `Monedas` (`Id_Moneda`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `pago_pay_met` FOREIGN KEY (`pay_met_id`) REFERENCES `pay_met` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `proveedor_pago` FOREIGN KEY (`id_proveedor`) REFERENCES `Proveedores` (`Id_Proveedor`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=41386 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=41495 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -10482,7 +10482,7 @@ CREATE TABLE `price_fixed` (
|
|||
KEY `date_end` (`date_end`),
|
||||
KEY `warehouse_id` (`warehouse_id`),
|
||||
CONSTRAINT `price_fixed_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `Articles` (`Id_Article`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=53527 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=53547 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -10544,7 +10544,7 @@ CREATE TABLE `producer` (
|
|||
`visible` tinyint(1) NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`producer_id`),
|
||||
UNIQUE KEY `name_UNIQUE` (`name`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4505 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4523 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -10713,7 +10713,7 @@ CREATE TABLE `recibida` (
|
|||
CONSTRAINT `recibida_ibfk_5` FOREIGN KEY (`cplusInvoiceType472Fk`) REFERENCES `vn`.`cplusInvoiceType472` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `recibida_ibfk_6` FOREIGN KEY (`cplusRectificationTypeFk`) REFERENCES `vn`.`cplusRectificationType` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `recibida_ibfk_7` FOREIGN KEY (`cplusTrascendency472Fk`) REFERENCES `vn`.`cplusTrascendency472` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=68014 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=68074 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -11302,7 +11302,7 @@ CREATE TABLE `recibida_iva` (
|
|||
CONSTRAINT `recibida_iva_ibfk_2` FOREIGN KEY (`iva_id`) REFERENCES `iva_codigo` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE,
|
||||
CONSTRAINT `recibida_iva_ibfk_5` FOREIGN KEY (`recibida_id`) REFERENCES `recibida` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `recibida_iva_ibfk_6` FOREIGN KEY (`gastos_id`) REFERENCES `Gastos` (`Id_Gasto`) ON DELETE NO ACTION ON UPDATE NO ACTION
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=91115 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=91322 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -11325,7 +11325,7 @@ CREATE TABLE `recibida_vencimiento` (
|
|||
KEY `banco_id` (`banco_id`),
|
||||
CONSTRAINT `recibida_vencimiento_ibfk_6` FOREIGN KEY (`banco_id`) REFERENCES `Bancos` (`Id_Banco`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `recibida_vencimiento_ibfk_7` FOREIGN KEY (`recibida_id`) REFERENCES `recibida` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=88294 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=88491 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -11368,7 +11368,7 @@ CREATE TABLE `recovery` (
|
|||
KEY `cliente_idx` (`Id_Cliente`),
|
||||
CONSTRAINT `cliente333` FOREIGN KEY (`Id_Cliente`) REFERENCES `Clientes` (`id_cliente`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `cliente_cliente` FOREIGN KEY (`Id_Cliente`) REFERENCES `Clientes` (`id_cliente`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=257 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='En esta tabla apuntaremos los acuerdos de recobro semanal a ';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=258 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='En esta tabla apuntaremos los acuerdos de recobro semanal a ';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -11562,7 +11562,7 @@ CREATE TABLE `scan` (
|
|||
`name` varchar(45) CHARACTER SET utf8 DEFAULT NULL,
|
||||
`odbc_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=56672 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Se borra automaticamente 8 dias en el pasado desde vn2008.clean';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=56856 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Se borra automaticamente 8 dias en el pasado desde vn2008.clean';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -11602,7 +11602,7 @@ CREATE TABLE `scan_line` (
|
|||
PRIMARY KEY (`scan_line_id`),
|
||||
KEY `id_scan_id_idx` (`scan_id`),
|
||||
CONSTRAINT `id_scan_id` FOREIGN KEY (`scan_id`) REFERENCES `scan` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=723254 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=725408 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -11624,7 +11624,7 @@ CREATE TABLE `sharingcart` (
|
|||
KEY `Suplent` (`Id_Suplente`),
|
||||
CONSTRAINT `Suplent_key` FOREIGN KEY (`Id_Suplente`) REFERENCES `Trabajadores` (`Id_Trabajador`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `Trabajador_key` FOREIGN KEY (`Id_Trabajador`) REFERENCES `Trabajadores` (`Id_Trabajador`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1785 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1786 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -12079,7 +12079,7 @@ CREATE TABLE `ticket_observation` (
|
|||
KEY `observation_type_id` (`observation_type_id`),
|
||||
CONSTRAINT `ticket_observation_ibfk_1` FOREIGN KEY (`Id_Ticket`) REFERENCES `Tickets` (`Id_Ticket`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `ticket_observation_ibfk_2` FOREIGN KEY (`observation_type_id`) REFERENCES `observation_type` (`observation_type_id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1070145 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1071942 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -12202,7 +12202,7 @@ CREATE TABLE `travel` (
|
|||
CONSTRAINT `travel_ibfk_2` FOREIGN KEY (`warehouse_id_out`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `travel_ibfk_3` FOREIGN KEY (`agency_id`) REFERENCES `Agencias` (`Id_Agencia`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `travel_ibfk_4` FOREIGN KEY (`cargoSupplierFk`) REFERENCES `Proveedores` (`Id_Proveedor`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=106224 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=106537 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -12339,7 +12339,7 @@ CREATE TABLE `travel_dits` (
|
|||
KEY `fgkey2_idx` (`Id_Ticket`),
|
||||
KEY `fgkey3_idx` (`Id_Trabajador`),
|
||||
CONSTRAINT `travel_dits_ibfk_1` FOREIGN KEY (`Id_Trabajador`) REFERENCES `Trabajadores` (`Id_Trabajador`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=167026 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=167282 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -31469,7 +31469,7 @@ BEGIN
|
|||
JOIN Movimientos m using(Id_Ticket)
|
||||
JOIN Movimientos_componentes mc using(Id_Movimiento)
|
||||
WHERE c.Id_Trabajador = worker AND Id_Componente IN (39, 37) -- maná auto y maná
|
||||
AND Fecha between MyFechaDesde and CURDATE()
|
||||
AND Fecha > MyFechaDesde and Fecha <= CURDATE()
|
||||
|
||||
UNION ALL
|
||||
|
||||
|
@ -31485,7 +31485,7 @@ BEGIN
|
|||
FROM Greuges g
|
||||
JOIN Clientes c using(Id_Cliente)
|
||||
WHERE c.Id_Trabajador = worker AND Greuges_type_id = 3 -- Maná
|
||||
AND Fecha between MyFechaDesde and CURDATE()
|
||||
AND Fecha > MyFechaDesde and Fecha < CURDATE()
|
||||
|
||||
UNION ALL
|
||||
|
||||
|
@ -40333,7 +40333,7 @@ SELECT
|
|||
loadPriority,
|
||||
-- CAST(awb.codigo AS DECIMAL(11,0)) as awb,
|
||||
e.Notas,
|
||||
pc.Proveedor as carguera
|
||||
pc.Alias as carguera
|
||||
|
||||
FROM Entradas e
|
||||
/* LEFT JOIN recibida_entrada re ON re.Id_Entrada = e.Id_Entrada
|
||||
|
@ -43218,7 +43218,7 @@ CREATE TABLE `clientLog` (
|
|||
KEY `userFk` (`userFk`),
|
||||
CONSTRAINT `clientLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `vn2008`.`Clientes` (`id_cliente`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `clientLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=163419 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=163558 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -43739,6 +43739,49 @@ SET character_set_client = utf8;
|
|||
1 AS `description`*/;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
|
||||
--
|
||||
-- Temporary table structure for view `dms`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `dms`;
|
||||
/*!50001 DROP VIEW IF EXISTS `dms`*/;
|
||||
SET @saved_cs_client = @@character_set_client;
|
||||
SET character_set_client = utf8;
|
||||
/*!50001 CREATE VIEW `dms` AS SELECT
|
||||
1 AS `id`,
|
||||
1 AS `dmsTypeFk`,
|
||||
1 AS `file`,
|
||||
1 AS `workerFk`,
|
||||
1 AS `created`*/;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
|
||||
--
|
||||
-- Temporary table structure for view `dmsTicket`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `dmsTicket`;
|
||||
/*!50001 DROP VIEW IF EXISTS `dmsTicket`*/;
|
||||
SET @saved_cs_client = @@character_set_client;
|
||||
SET character_set_client = utf8;
|
||||
/*!50001 CREATE VIEW `dmsTicket` AS SELECT
|
||||
1 AS `ticketFk`,
|
||||
1 AS `dmsFk`*/;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
|
||||
--
|
||||
-- Temporary table structure for view `dmsType`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `dmsType`;
|
||||
/*!50001 DROP VIEW IF EXISTS `dmsType`*/;
|
||||
SET @saved_cs_client = @@character_set_client;
|
||||
SET character_set_client = utf8;
|
||||
/*!50001 CREATE VIEW `dmsType` AS SELECT
|
||||
1 AS `id`,
|
||||
1 AS `name`,
|
||||
1 AS `path`*/;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
|
||||
--
|
||||
-- Table structure for table `dua`
|
||||
--
|
||||
|
@ -43765,7 +43808,7 @@ CREATE TABLE `dua` (
|
|||
CONSTRAINT `dua_fk1` FOREIGN KEY (`gestdocFk`) REFERENCES `vn2008`.`gestdoc` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||
CONSTRAINT `dua_fk2` FOREIGN KEY (`awbFk`) REFERENCES `vn2008`.`awb` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `dua_fk4` FOREIGN KEY (`companyFk`) REFERENCES `vn2008`.`empresa` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3160 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3162 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -43806,7 +43849,7 @@ CREATE TABLE `duaIntrastat` (
|
|||
KEY `duaIntrastat_fk2_idx` (`duaFk`),
|
||||
CONSTRAINT `duaIntrastat_fk1` FOREIGN KEY (`intrastatFk`) REFERENCES `vn2008`.`Intrastat` (`Codintrastat`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `duaIntrastat_fk2` FOREIGN KEY (`duaFk`) REFERENCES `dua` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4286 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4303 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -43826,7 +43869,7 @@ CREATE TABLE `duaInvoiceIn` (
|
|||
KEY `duaInvoiceIn_fk2_idx` (`invoiceInFk`),
|
||||
CONSTRAINT `duaInvoiceIn_fk1` FOREIGN KEY (`duaFk`) REFERENCES `dua` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `duaInvoiceIn_fk2` FOREIGN KEY (`invoiceInFk`) REFERENCES `vn2008`.`recibida` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4123 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Facturas asociadas a la declaración aduanera, básicamente la del agente transitario';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4125 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Facturas asociadas a la declaración aduanera, básicamente la del agente transitario';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -43851,7 +43894,7 @@ CREATE TABLE `duaTax` (
|
|||
CONSTRAINT `duaTax_fk1` FOREIGN KEY (`duaFk`) REFERENCES `dua` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `duaTax_fk2` FOREIGN KEY (`supplierFk`) REFERENCES `vn2008`.`Proveedores` (`Id_Proveedor`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `duaTax_fk3` FOREIGN KEY (`taxClassFk`) REFERENCES `vn2008`.`iva_group` (`iva_group_id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=771 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=829 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -43947,7 +43990,7 @@ CREATE TABLE `entryLog` (
|
|||
KEY `entryLog_ibfk_2` (`userFk`),
|
||||
CONSTRAINT `entryLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `vn2008`.`Entradas` (`Id_Entrada`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `entryLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=45752 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=46221 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -44531,7 +44574,7 @@ CREATE TABLE `invoiceOutExpence` (
|
|||
KEY `invoiceOutExpence_FK_2_idx` (`expenceFk`),
|
||||
CONSTRAINT `invoiceOutExpence_FK_1` FOREIGN KEY (`invoiceOutFk`) REFERENCES `vn2008`.`Facturas` (`factura_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `invoiceOutExpence_FK_2` FOREIGN KEY (`expenceFk`) REFERENCES `vn2008`.`Gastos` (`Id_Gasto`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=62409 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Desglosa la base imponible de una factura en funcion del tipo de gasto/venta';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=62443 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Desglosa la base imponible de una factura en funcion del tipo de gasto/venta';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -44574,7 +44617,7 @@ CREATE TABLE `invoiceOutTax` (
|
|||
KEY `pgcFk` (`pgcFk`),
|
||||
CONSTRAINT `invoiceOutFk` FOREIGN KEY (`invoiceOutFk`) REFERENCES `vn2008`.`Facturas` (`factura_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `invoiceOutTax_ibfk_1` FOREIGN KEY (`pgcFk`) REFERENCES `pgc` (`code`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=913378 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=913436 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -44785,7 +44828,7 @@ CREATE TABLE `itemTag` (
|
|||
KEY `priorityItem` (`itemFk`,`priority`),
|
||||
KEY `tagFk` (`tagFk`,`value`),
|
||||
CONSTRAINT `itemFK` FOREIGN KEY (`itemFk`) REFERENCES `vn2008`.`Articles` (`Id_Article`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=303458 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=303671 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -44847,7 +44890,7 @@ CREATE TABLE `itemTaxCountry` (
|
|||
CONSTRAINT `countryFK_paises` FOREIGN KEY (`countryFk`) REFERENCES `vn2008`.`Paises` (`Id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `itemFK_Article` FOREIGN KEY (`itemFk`) REFERENCES `vn2008`.`Articles` (`Id_Article`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `taxClassFK_Iva_Group` FOREIGN KEY (`taxClassFk`) REFERENCES `vn2008`.`iva_group` (`iva_group_id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=486014 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Define la clase de iva por artículo y pais';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=487058 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Define la clase de iva por artículo y pais';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -45078,7 +45121,7 @@ CREATE TABLE `message` (
|
|||
KEY `sender` (`sender`),
|
||||
KEY `recipient` (`recipient`),
|
||||
KEY `uuid` (`uuid`(8))
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1479567 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1481460 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -45100,7 +45143,7 @@ CREATE TABLE `messageInbox` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `uuid` (`uuid`(8)),
|
||||
KEY `finalRecipient` (`finalRecipient`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1625722 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1627657 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -46001,7 +46044,7 @@ CREATE TABLE `routeLog` (
|
|||
`creationDate` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`description` text COLLATE utf8_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=470430 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=473078 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -46088,7 +46131,7 @@ CREATE TABLE `sms` (
|
|||
`status` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=95408 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=95585 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -46252,7 +46295,7 @@ CREATE TABLE `stockBuyed` (
|
|||
UNIQUE KEY `date_UNIQUE` (`date`,`user`),
|
||||
KEY `stockBuyed_user_idx` (`user`),
|
||||
CONSTRAINT `stockBuyedUserFk` FOREIGN KEY (`user`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=315960 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=316355 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -46474,7 +46517,7 @@ CREATE TABLE `ticketLog` (
|
|||
KEY `logTicketuserFk` (`userFk`),
|
||||
CONSTRAINT `ticketLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `vn2008`.`Tickets` (`Id_Ticket`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `ticketLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=820588 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=828310 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -46574,7 +46617,7 @@ CREATE TABLE `ticketPackaging` (
|
|||
KEY `ticketPackaging_fk2_idx` (`packagingFk`),
|
||||
CONSTRAINT `ticketPackaging_fk1` FOREIGN KEY (`ticketFk`) REFERENCES `vn2008`.`Tickets` (`Id_Ticket`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `ticketPackaging_fk2` FOREIGN KEY (`packagingFk`) REFERENCES `vn2008`.`Cubos` (`Id_Cubo`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=25576 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=25940 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -47021,7 +47064,7 @@ CREATE TABLE `workerDocument` (
|
|||
KEY `workerDocument_ibfk_2` (`document`),
|
||||
CONSTRAINT `workerDocument_ibfk_1` FOREIGN KEY (`worker`) REFERENCES `vn2008`.`Trabajadores` (`user_id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `workerDocument_ibfk_2` FOREIGN KEY (`document`) REFERENCES `vn2008`.`gestdoc` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5147 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5249 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -47049,7 +47092,7 @@ CREATE TABLE `workerJourney` (
|
|||
PRIMARY KEY (`id`,`userFk`),
|
||||
KEY `fk_workerJourney_user_idx` (`userFk`),
|
||||
CONSTRAINT `fk_workerJourney_user` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=63859 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=121259 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -47071,7 +47114,7 @@ CREATE TABLE `workerLog` (
|
|||
KEY `userFk_idx` (`userFk`),
|
||||
CONSTRAINT `userFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
|
||||
CONSTRAINT `workerFk` FOREIGN KEY (`originFk`) REFERENCES `vn2008`.`Trabajadores` (`Id_Trabajador`) ON DELETE NO ACTION ON UPDATE NO ACTION
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3969 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3982 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -47138,7 +47181,7 @@ CREATE TABLE `workingHours` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `user_working_hour_idx` (`userId`),
|
||||
CONSTRAINT `user_working_hour` FOREIGN KEY (`userId`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=22349 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Almacena horas de Entrada y de Salida del personal';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=22501 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Almacena horas de Entrada y de Salida del personal';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
ALTER DATABASE `vn` CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
|
@ -56736,7 +56779,7 @@ CREATE TABLE `batch` (
|
|||
KEY `buy_edi_id` (`buy_edi_id`),
|
||||
CONSTRAINT `batch_ibfk_1` FOREIGN KEY (`message_id`) REFERENCES `message` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `batch_ibfk_2` FOREIGN KEY (`buy_edi_id`) REFERENCES `vn2008`.`buy_edi` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=322537 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=323068 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -57074,7 +57117,7 @@ CREATE TABLE `message` (
|
|||
UNIQUE KEY `mail_id` (`mail_id`),
|
||||
KEY `sender_id` (`sender_id`),
|
||||
CONSTRAINT `message_ibfk_2` FOREIGN KEY (`sender_id`) REFERENCES `mail` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=343878 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=344499 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -63151,7 +63194,7 @@ CREATE TABLE `cdr` (
|
|||
KEY `dstchannel` (`dst_channel`),
|
||||
KEY `disposition` (`disposition`),
|
||||
KEY `src` (`src`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=197977 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=198191 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -63930,7 +63973,7 @@ CREATE TABLE `cache_calc` (
|
|||
KEY `cache_id` (`cache_id`),
|
||||
KEY `cacheName` (`cacheName`),
|
||||
KEY `expires` (`expires`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=123230 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=124348 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -65699,7 +65742,7 @@ CREATE TABLE `inter` (
|
|||
CONSTRAINT `inter_ibfk_1` FOREIGN KEY (`Id_Ticket`) REFERENCES `vn2008`.`Tickets` (`Id_Ticket`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `inter_state` FOREIGN KEY (`state_id`) REFERENCES `vn2008`.`state` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `responsable` FOREIGN KEY (`Id_Supervisor`) REFERENCES `vn2008`.`Trabajadores` (`Id_Trabajador`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10733096 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10764998 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -65734,7 +65777,7 @@ BEGIN
|
|||
END IF;
|
||||
|
||||
/* PAK 08/05/18 Los tickets no se pueden marcar como servidos en el futuro */
|
||||
IF NEW.state_id = 16 AND (SELECT date(shipped) FROM vn.ticket WHERE id = NEW.Id_Ticket) > CURDATE() THEN -- Entregado
|
||||
IF NEW.state_id = 16 AND (SELECT date(landed) FROM vn.ticket WHERE id = NEW.Id_Ticket) > CURDATE() THEN -- Entregado
|
||||
|
||||
SET NEW.state_id = 22; -- ¿ Fecha ?
|
||||
|
||||
|
@ -66486,7 +66529,7 @@ CREATE TABLE `order` (
|
|||
CONSTRAINT `order_ibfk_5` FOREIGN KEY (`address_id`) REFERENCES `vn2008`.`Consignatarios` (`id_consigna`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `order_ibfk_8` FOREIGN KEY (`delivery_method_id`) REFERENCES `vn2008`.`Vistas` (`vista_id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `order_ibfk_9` FOREIGN KEY (`agency_id`) REFERENCES `vn2008`.`Agencias` (`Id_Agencia`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1398725 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1402020 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -66585,7 +66628,7 @@ CREATE TABLE `orderRow` (
|
|||
KEY `warehouse_shipment` (`warehouseFk`,`shipment`),
|
||||
CONSTRAINT `orderRow_ibfk_2` FOREIGN KEY (`itemFk`) REFERENCES `vn2008`.`Articles` (`Id_Article`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `orderRow_ibfk_3` FOREIGN KEY (`orderFk`) REFERENCES `order` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8608411 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8633130 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -66932,7 +66975,7 @@ CREATE TABLE `tpvTransaction` (
|
|||
CONSTRAINT `receipt_id` FOREIGN KEY (`receiptFk`) REFERENCES `vn2008`.`Recibos` (`Id`) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||
CONSTRAINT `tpvTransaction_ibfk_1` FOREIGN KEY (`clientFk`) REFERENCES `vn2008`.`Clientes` (`id_cliente`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `tpvTransaction_ibfk_2` FOREIGN KEY (`merchantFk`) REFERENCES `tpvMerchant` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=216690 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Transactions realized through the virtual TPV';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=217397 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Transactions realized through the virtual TPV';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -66967,7 +67010,7 @@ CREATE TABLE `visit` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `firstAgent` (`firstAgent`),
|
||||
CONSTRAINT `visit_ibfk_1` FOREIGN KEY (`firstAgent`) REFERENCES `visitAgent` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1262964 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1265990 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -66987,7 +67030,7 @@ CREATE TABLE `visitAccess` (
|
|||
KEY `visit_access_idx_agent` (`agent`),
|
||||
KEY `stamp` (`stamp`),
|
||||
CONSTRAINT `visitAccess_ibfk_1` FOREIGN KEY (`agent`) REFERENCES `visitAgent` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2750097 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2756759 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -67012,7 +67055,7 @@ CREATE TABLE `visitAgent` (
|
|||
KEY `firstAccess` (`firstAccess`),
|
||||
CONSTRAINT `visitAgent_ibfk_1` FOREIGN KEY (`visit`) REFERENCES `visit` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `visitAgent_ibfk_2` FOREIGN KEY (`firstAccess`) REFERENCES `visitAccess` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1801649 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1804929 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -67032,7 +67075,7 @@ CREATE TABLE `visitUser` (
|
|||
KEY `date_time` (`stamp`),
|
||||
KEY `user_id` (`user`),
|
||||
CONSTRAINT `visitUser_ibfk_1` FOREIGN KEY (`access`) REFERENCES `visitAccess` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2631394 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2636343 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -72303,6 +72346,60 @@ USE `vn`;
|
|||
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||
|
||||
--
|
||||
-- Final view structure for view `dms`
|
||||
--
|
||||
|
||||
/*!50001 DROP VIEW IF EXISTS `dms`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||
/*!50001 SET character_set_client = utf8 */;
|
||||
/*!50001 SET character_set_results = utf8 */;
|
||||
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||
/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
|
||||
/*!50001 VIEW `dms` AS select `g`.`id` AS `id`,`g`.`gesttip_id` AS `dmsTypeFk`,`g`.`file` AS `file`,`g`.`trabajador_id` AS `workerFk`,`g`.`odbc_date` AS `created` from `vn2008`.`gestdoc` `g` */;
|
||||
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||
|
||||
--
|
||||
-- Final view structure for view `dmsTicket`
|
||||
--
|
||||
|
||||
/*!50001 DROP VIEW IF EXISTS `dmsTicket`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||
/*!50001 SET character_set_client = utf8 */;
|
||||
/*!50001 SET character_set_results = utf8 */;
|
||||
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||
/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
|
||||
/*!50001 VIEW `dmsTicket` AS select `g`.`Id_Ticket` AS `ticketFk`,`g`.`gestdoc_id` AS `dmsFk` from `vn2008`.`tickets_gestdoc` `g` */;
|
||||
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||
|
||||
--
|
||||
-- Final view structure for view `dmsType`
|
||||
--
|
||||
|
||||
/*!50001 DROP VIEW IF EXISTS `dmsType`*/;
|
||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||
/*!50001 SET character_set_client = utf8 */;
|
||||
/*!50001 SET character_set_results = utf8 */;
|
||||
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||
/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
|
||||
/*!50001 VIEW `dmsType` AS select `g`.`id` AS `id`,`g`.`tipo` AS `name`,`g`.`path` AS `path` from `vn2008`.`gesttip` `g` */;
|
||||
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||
|
||||
--
|
||||
-- Final view structure for view `ediGenus`
|
||||
--
|
||||
|
@ -74963,4 +75060,4 @@ USE `stock`;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2018-05-25 12:47:10
|
||||
-- Dump completed on 2018-05-28 13:41:46
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
module.exports = Self => {
|
||||
Self.remoteMethod('getTotalVolume', {
|
||||
description: 'Returns the total volume of a ticket',
|
||||
accessType: 'READ',
|
||||
accepts: [{
|
||||
arg: 'id',
|
||||
type: 'number',
|
||||
required: true,
|
||||
description: 'ticket id',
|
||||
http: {source: 'path'}
|
||||
}],
|
||||
returns: {
|
||||
root: true
|
||||
},
|
||||
http: {
|
||||
path: `/:id/getTotalVolume`,
|
||||
verb: 'GET'
|
||||
}
|
||||
});
|
||||
|
||||
Self.getTotalVolume = async ticketFk => {
|
||||
return (await Self.rawSql(`SELECT vn.ticketTotalVolume(?) totalVolume, vn.ticketTotalVolumeBoxes(?) totalBoxes`, [ticketFk, ticketFk]))[0];
|
||||
};
|
||||
};
|
|
@ -19,6 +19,7 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.getVolume = async ticketFk => {
|
||||
return await Self.rawSql(`CALL vn.ticketListVolume(?);`, [ticketFk]);
|
||||
let [volume] = await Self.rawSql(`CALL vn.ticketListVolume(?)`, [ticketFk]);
|
||||
return volume;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@ describe('ticket getVolume()', () => {
|
|||
let ticketFk = 1;
|
||||
app.models.Ticket.getVolume(ticketFk)
|
||||
.then(response => {
|
||||
expect(response[0][0].m3).toEqual(0.008);
|
||||
expect(response[0].m3).toEqual(0.008);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,6 +3,7 @@ module.exports = Self => {
|
|||
require('../methods/ticket/changeWorker')(Self);
|
||||
require('../methods/ticket/filter')(Self);
|
||||
require('../methods/ticket/getVolume')(Self);
|
||||
require('../methods/ticket/getTotalVolume')(Self);
|
||||
require('../methods/ticket/summary')(Self);
|
||||
require('../methods/ticket/getTotal')(Self);
|
||||
require('../methods/ticket/getTaxes')(Self);
|
||||
|
|
|
@ -1,21 +1,30 @@
|
|||
require('require-yaml');
|
||||
var fs = require('fs-extra');
|
||||
const fs = require('fs-extra');
|
||||
const package = require('../package.json');
|
||||
let configPath = `/config/${package.name}`;
|
||||
let nginxConfigPath = '/config/nginx';
|
||||
|
||||
let env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development';
|
||||
|
||||
let config = require(`${__dirname}/config/datasources.json`);
|
||||
let configEnvFile = `${__dirname}/config/datasources.${env}.json`;
|
||||
if (env === 'development') {
|
||||
configPath = `${__dirname}/config`;
|
||||
nginxConfigPath = '../../nginx';
|
||||
}
|
||||
|
||||
let config = require(`${configPath}/datasources.json`);
|
||||
let configEnvFile = `${configPath}/datasources.${env}.json`;
|
||||
|
||||
if (fs.existsSync(configEnvFile))
|
||||
Object.assign(config, require(configEnvFile));
|
||||
|
||||
let proxyConf = require(`../../nginx/config.yml`);
|
||||
let proxyEnvFile = `../../nginx/config.${env}.yml`;
|
||||
let proxyConf = require(`${nginxConfigPath}/config.yml`);
|
||||
let proxyEnvFile = `${nginxConfigPath}/config.${env}.yml`;
|
||||
|
||||
if (fs.existsSync(proxyEnvFile))
|
||||
Object.assign(proxyConf, require(proxyEnvFile));
|
||||
|
||||
config.proxy = proxyConf;
|
||||
config.package = require('../package.json');
|
||||
config.package = package;
|
||||
config.env = env;
|
||||
|
||||
module.exports = config;
|
||||
module.exports = config;
|
|
@ -12,9 +12,6 @@ module.exports = {
|
|||
* Load mail config.
|
||||
*/
|
||||
init: function() {
|
||||
if (process.env.NODE_ENV == 'test')
|
||||
return;
|
||||
|
||||
this.transporter = nodemailer.createTransport(config.smtp);
|
||||
|
||||
this.transporter.verify(function(error, success) {
|
||||
|
@ -37,9 +34,6 @@ module.exports = {
|
|||
* @param {Object} cb - Callback
|
||||
*/
|
||||
send: function(recipient, subject, body, attachments, params, cb) {
|
||||
if (process.env.NODE_ENV == 'test')
|
||||
return;
|
||||
|
||||
let mailOptions = {
|
||||
from: '"' + config.app.senderName + '" <' + config.app.senderMail + '>',
|
||||
to: recipient,
|
||||
|
@ -48,8 +42,8 @@ module.exports = {
|
|||
attachments
|
||||
};
|
||||
|
||||
if (process.env.NODE_ENV != 'production')
|
||||
mailOptions.to = config.smtp.testEmail;
|
||||
if (config.env != 'production')
|
||||
mailOptions.to = config.app.senderMail;
|
||||
|
||||
this.transporter.sendMail(mailOptions, (error, info) => {
|
||||
try {
|
||||
|
|
|
@ -113,7 +113,7 @@ router.get('/letter-debtor-st/:companyId/:clientId', requestToken, function(requ
|
|||
url: path,
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Authorization': request.headers.authorization
|
||||
'Authorization': request.user.token
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ app.start = function(port) {
|
|||
var servicePath = 'http://' + listener.address().address + ':' + listener.address().port;
|
||||
mail.init();
|
||||
database.init();
|
||||
database.testEmail();
|
||||
|
||||
if (config.app.debug) {
|
||||
let packageJson = require('../package.json');
|
|
@ -1,4 +1,5 @@
|
|||
var database = require('./database.js');
|
||||
let config = require('./config.js');
|
||||
|
||||
module.exports = {
|
||||
|
||||
|
@ -19,21 +20,38 @@ module.exports = {
|
|||
/**
|
||||
* Validate auth token
|
||||
*/
|
||||
validateToken: function() {
|
||||
validateToken: async function() {
|
||||
let query = 'SELECT userId, ttl, created FROM salix.AccessToken WHERE id = ?';
|
||||
|
||||
database.pool.query(query, [this.getToken()], (error, result) => {
|
||||
try {
|
||||
let [result] = await database.pool.query(query, [this.getToken()]);
|
||||
let token = result[0];
|
||||
|
||||
if (error || result.length == 0)
|
||||
return this.response.status(401).send({message: 'Invalid token'});
|
||||
if (result.length == 0)
|
||||
throw new Error('Invalid token');
|
||||
|
||||
if (this.isTokenExpired(token.created, token.ttl))
|
||||
return this.response.status(401).send({message: 'Token expired'});
|
||||
throw new Error('Token expired');
|
||||
|
||||
this.request.userId = token.userId;
|
||||
// Set proxy host
|
||||
let proxy = config.proxy;
|
||||
|
||||
if (!proxy)
|
||||
proxy = {
|
||||
host: 'localhost',
|
||||
port: 80
|
||||
};
|
||||
|
||||
this.request.proxyHost = `http://${proxy.host}:${proxy.port}`;
|
||||
this.request.user = {
|
||||
id: token.userId,
|
||||
token: this.getToken()
|
||||
};
|
||||
this.next();
|
||||
});
|
||||
} catch (e) {
|
||||
this.response.status(401).send({message: e.message});
|
||||
this.next(e);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -59,4 +77,4 @@ module.exports = {
|
|||
if (currentDate > date)
|
||||
return true;
|
||||
}
|
||||
};
|
||||
};
|
|
@ -1,21 +1,30 @@
|
|||
require('require-yaml');
|
||||
var fs = require('fs-extra');
|
||||
const fs = require('fs-extra');
|
||||
const package = require('../package.json');
|
||||
let configPath = `/config/${package.name}`;
|
||||
let nginxConfigPath = '/config/nginx';
|
||||
|
||||
let env = process.env.NODE_ENV ? process.env.NODE_ENV : 'development';
|
||||
|
||||
let config = require(`${__dirname}/config/datasources.json`);
|
||||
let configEnvFile = `${__dirname}/config/datasources.${env}.json`;
|
||||
if (env === 'development') {
|
||||
configPath = `${__dirname}/config`;
|
||||
nginxConfigPath = '../../nginx';
|
||||
}
|
||||
|
||||
let config = require(`${configPath}/datasources.json`);
|
||||
let configEnvFile = `${configPath}/datasources.${env}.json`;
|
||||
|
||||
if (fs.existsSync(configEnvFile))
|
||||
Object.assign(config, require(configEnvFile));
|
||||
|
||||
let proxyConf = require(`../../nginx/config.yml`);
|
||||
let proxyEnvFile = `../../nginx/config.${env}.yml`;
|
||||
let proxyConf = require(`${nginxConfigPath}/config.yml`);
|
||||
let proxyEnvFile = `${nginxConfigPath}/config.${env}.yml`;
|
||||
|
||||
if (fs.existsSync(proxyEnvFile))
|
||||
Object.assign(proxyConf, require(proxyEnvFile));
|
||||
|
||||
config.proxy = proxyConf;
|
||||
config.package = require('../package.json');
|
||||
config.package = package;
|
||||
config.env = env;
|
||||
|
||||
module.exports = config;
|
||||
module.exports = config;
|
|
@ -13,11 +13,6 @@
|
|||
},
|
||||
"pdf": {
|
||||
"format": "A4",
|
||||
"header": {
|
||||
"height": "120px"
|
||||
},
|
||||
"footer": {
|
||||
"height": "130px"
|
||||
}
|
||||
"border": "1.5cm"
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
var mysql = require('mysql');
|
||||
var mysql = require('mysql2/promise');
|
||||
let config = require('./config.js');
|
||||
|
||||
module.exports = {
|
||||
|
@ -12,13 +12,5 @@ module.exports = {
|
|||
*/
|
||||
init: function() {
|
||||
this.pool = mysql.createPool(config.mysql);
|
||||
|
||||
this.pool.getConnection(function(error, connection) {
|
||||
if (error) {
|
||||
throw new Error('Can\'t connect to database: ' + error.code);
|
||||
} else if (config.app.debug) {
|
||||
console.log('Database connection stablished');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
|
@ -87,6 +87,40 @@ router.get('/letter-debtor/:companyId/:clientId/preview', requestToken, function
|
|||
});
|
||||
});
|
||||
|
||||
// Delivery note
|
||||
router.get('/delivery-note/:ticketId/preview', requestToken, function(request, response) {
|
||||
let params = {
|
||||
ticketId: request.params.ticketId,
|
||||
isPreview: true
|
||||
};
|
||||
|
||||
template.get('delivery-note', params, (error, result) => {
|
||||
if (error)
|
||||
return response.status(400).json(error);
|
||||
|
||||
response.send(result.body);
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/delivery-note/:ticketId', requestToken, function(request, response, next) {
|
||||
let params = {
|
||||
ticketId: request.params.ticketId
|
||||
};
|
||||
|
||||
template.get('delivery-note', params, (error, result) => {
|
||||
if (error)
|
||||
return response.status(400).json({message: error.message});
|
||||
|
||||
pdf.create(result.body, config.pdf).toStream(function(error, stream) {
|
||||
if (error)
|
||||
throw Error(error);
|
||||
|
||||
//response.setHeader('Content-Disposition', 'attachment; filename="deliveryNote.pdf"');
|
||||
//response.setHeader('Content-type', 'application/pdf');
|
||||
stream.pipe(response);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ var locale = require('./locale.js');
|
|||
var inlineCss = require('inline-css');
|
||||
var path = require('path');
|
||||
|
||||
|
||||
module.exports = {
|
||||
|
||||
/**
|
||||
* Get template.
|
||||
* @param {String} template - Template name
|
||||
|
@ -42,7 +42,7 @@ module.exports = {
|
|||
|
||||
if (title)
|
||||
params.subject = title[1];
|
||||
}
|
||||
}
|
||||
|
||||
this.renderImages(template, body, params.isPreview, (error, body) => {
|
||||
if (error)
|
||||
|
@ -91,7 +91,7 @@ module.exports = {
|
|||
}
|
||||
|
||||
let parentBody = body;
|
||||
this.renderSub(parentBody, subTpl, params, regexp, (error, body) => {
|
||||
this.renderSub(parentBody, subTpl, data, regexp, (error, body) => {
|
||||
if (error)
|
||||
return cb(error);
|
||||
|
||||
|
@ -131,13 +131,13 @@ module.exports = {
|
|||
*/
|
||||
renderStyles: function(stylePath, html, cb) {
|
||||
// Common components
|
||||
let comPath = path.join(__dirname, '../', 'static', 'css', 'component.css');
|
||||
let comPath = path.join(__dirname, '../', 'static', 'css', 'common.css');
|
||||
|
||||
fs.readFile(comPath, 'utf8', (error, comCss) => {
|
||||
fs.stat(stylePath, error => {
|
||||
if (error)
|
||||
if (error)
|
||||
return cb(new Error('Template stylesheet not found'));
|
||||
|
||||
|
||||
fs.readFile(stylePath, 'utf8', (error, css) => {
|
||||
let style = '<style>' + comCss + css + '</style>';
|
||||
let body = style + html;
|
||||
|
@ -178,7 +178,79 @@ module.exports = {
|
|||
body = body.replace(tplImages[i], `src="file:///${imagePath}"`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
cb(null, body);
|
||||
},
|
||||
|
||||
/**
|
||||
* Get template attachments
|
||||
* @param {String} template - Template name
|
||||
* @param {String} body - template body
|
||||
* @param {Object} cb - Callback
|
||||
*/
|
||||
getAttachments: function(template, body, isPreview, cb) {
|
||||
let attachments = [];
|
||||
let tplAttachments = body.match(new RegExp('src="cid:(.*?)"', 'ig'));
|
||||
|
||||
if (!tplAttachments)
|
||||
tplAttachments = {};
|
||||
|
||||
// Template default attachments
|
||||
for (var i = 0; i < tplAttachments.length; i++) {
|
||||
let src = tplAttachments[i].replace('src="cid:', '').replace('"', '').split('/');
|
||||
let attachmentTpl = src[0];
|
||||
let attachment = src[1];
|
||||
|
||||
if (isPreview) {
|
||||
let attachmentPath = `/mailer/static/${attachmentTpl}/${attachment}`;
|
||||
body = body.replace(tplAttachments[i], `src="${attachmentPath}"`);
|
||||
} else {
|
||||
let attachmentPath = path.join(__dirname, 'template', `${attachmentTpl}`, 'image', attachment);
|
||||
let attachmentName = attachmentTpl + '/' + attachment;
|
||||
attachments.push({filename: attachmentName, path: attachmentPath, cid: attachmentName});
|
||||
}
|
||||
}
|
||||
|
||||
if (isPreview)
|
||||
return cb(null, {body: body, attachments: attachments});
|
||||
|
||||
// Template attachment files
|
||||
let attachmentsPath = path.join(__dirname, 'template', `${template}`, 'attachment.json');
|
||||
|
||||
fs.stat(attachmentsPath, (error, stats) => {
|
||||
if (error)
|
||||
return cb(null, {body: body, attachments: attachments});
|
||||
|
||||
let attachObj = require(attachmentsPath);
|
||||
|
||||
for (var i = 0; i < attachObj.length; i++) {
|
||||
let filename = attachObj[i];
|
||||
let attachmentPath = path.join(__dirname, 'template', `${template}`, 'attachment', filename);
|
||||
|
||||
attachments.push({filename: filename, path: attachmentPath, cid: filename});
|
||||
}
|
||||
|
||||
this.checkAttachments(attachments, error => {
|
||||
if (error)
|
||||
return cb(error);
|
||||
cb(null, {body: body, attachments: attachments});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Check all template attachments
|
||||
* @param {Object} attachments - Attachments object
|
||||
* @param {Object} cb - Callback
|
||||
*/
|
||||
checkAttachments: function(attachments, cb) {
|
||||
for (var i = 0; i < attachments.length; i++) {
|
||||
var attachment = attachments[i];
|
||||
fs.stat(attachment.path, error => {
|
||||
if (error)
|
||||
return cb(new Error(`Could not load attachment file ${attachment.path}`));
|
||||
});
|
||||
}
|
||||
cb();
|
||||
}
|
||||
};
|
||||
};
|
|
@ -0,0 +1,179 @@
|
|||
var path = require('path');
|
||||
var database = require(path.join(__dirname, '../../database.js'));
|
||||
var format = require(path.join(__dirname, '../../util/format.js'));
|
||||
|
||||
module.exports = class DeliveryNote {
|
||||
async getData(params, cb) {
|
||||
let qryHead = `SELECT
|
||||
c.id clientId,
|
||||
c.name clientName,
|
||||
c.socialName,
|
||||
c.street,
|
||||
c.fi,
|
||||
c.postcode,
|
||||
c.city,
|
||||
p.name province,
|
||||
ct.country,
|
||||
a.street,
|
||||
a.city,
|
||||
a.postalCode,
|
||||
t.shipped,
|
||||
tg.gestdoc_id AS docId,
|
||||
g.odbc_date AS docDate
|
||||
FROM ticket t
|
||||
JOIN client c ON c.id = t.clientFk
|
||||
JOIN address a ON a.id = t.addressFk
|
||||
JOIN province p ON p.id = a.provinceFk
|
||||
JOIN country ct ON ct.id = p.countryFk
|
||||
LEFT JOIN vn2008.tickets_gestdoc tg ON tg.Id_Ticket = t.id
|
||||
LEFT JOIN vn2008.gestdoc g ON g.id = tg.gestdoc_id
|
||||
WHERE t.id = ?`;
|
||||
|
||||
let qryBuys = `SELECT
|
||||
s.id,
|
||||
s.itemFk,
|
||||
s.concept,
|
||||
s.quantity,
|
||||
s.price,
|
||||
s.price - SUM(IF(tcs.tarifa_componentes_series_id = 6,
|
||||
sc.value,
|
||||
0)) netPrice,
|
||||
s.discount,
|
||||
i.size,
|
||||
i.stems,
|
||||
ic.type taxType,
|
||||
i.category,
|
||||
it.id itemTypeId,
|
||||
o.code AS origin,
|
||||
i.inkFk,
|
||||
s.ticketFk,
|
||||
ita.tag1,
|
||||
ita.val1,
|
||||
ita.tag2,
|
||||
ita.val2,
|
||||
ita.tag3,
|
||||
ita.val3
|
||||
FROM sale s
|
||||
LEFT JOIN saleComponent sc ON sc.saleFk = s.id
|
||||
LEFT JOIN bi.tarifa_componentes tc ON sc.componentFk = tc.Id_Componente
|
||||
LEFT JOIN bi.tarifa_componentes_series tcs ON tcs.tarifa_componentes_series_id = tc.tarifa_componentes_series_id
|
||||
LEFT JOIN item i ON i.id = s.itemFk
|
||||
LEFT JOIN ticket t ON t.id = s.ticketFk
|
||||
LEFT JOIN origin o ON o.id = i.originFk
|
||||
INNER JOIN supplier sp ON sp.id = t.companyFk
|
||||
INNER JOIN itemType it ON it.id = i.typeFk
|
||||
LEFT JOIN
|
||||
(SELECT *
|
||||
FROM
|
||||
(SELECT tt.countryFk, tcc.taxClassFk, tc.type
|
||||
FROM taxClassCode tcc
|
||||
JOIN taxCode tc ON tc.id = tcc.taxCodeFk
|
||||
JOIN taxType tt ON tt.id = tc.taxTypeFk
|
||||
WHERE tcc.effectived <= '2018-01-29 13:00:00'
|
||||
ORDER BY tcc.effectived DESC) tx
|
||||
GROUP BY tx.countryFk, tx.taxClassFk) ic ON ic.countryFk = sp.countryFk
|
||||
AND ic.taxClassFk = i.taxClassFk
|
||||
JOIN vn.itemTagArranged ita ON ita.itemFk = s.itemFk
|
||||
WHERE s.ticketFk = ?
|
||||
GROUP BY s.id
|
||||
ORDER BY (it.isPackaging), s.concept, s.itemFk`;
|
||||
let qryTax = 'CALL vn.ticketGetTaxAdd(?)';
|
||||
let qryPackaging = `SELECT
|
||||
t.*, i.name, p.itemFk
|
||||
FROM vn.ticketPackaging t
|
||||
JOIN vn.packaging p ON p.id = t.packagingFk
|
||||
JOIN vn.item i ON i.id = p.itemFk
|
||||
WHERE t.ticketFk = ?
|
||||
ORDER BY itemFk`;
|
||||
try {
|
||||
let [headDetail] = await database.pool.query(qryHead, [params.ticketId]);
|
||||
Object.assign(this, headDetail[0]);
|
||||
|
||||
if (!headDetail)
|
||||
throw new Error('No head data found');
|
||||
|
||||
let bodyDetail = await database.pool.query(qryBuys, [params.ticketId]);
|
||||
this.buys = bodyDetail[0];
|
||||
|
||||
if (!bodyDetail)
|
||||
throw new Error('No body data found');
|
||||
|
||||
let [ticketTax] = await database.pool.query(qryTax, [params.ticketId]);
|
||||
this.ticketTax = ticketTax[0];
|
||||
|
||||
let packaging = await database.pool.query(qryPackaging, [params.ticketId]);
|
||||
this.packaging = packaging[0];
|
||||
|
||||
this.ticketId = params.ticketId;
|
||||
this.shipped = format.date(this.shipped);
|
||||
this.docDate = format.date(this.docDate, '%d-%m-%Y %T');
|
||||
|
||||
this.setSubTotal();
|
||||
this.formatBuys();
|
||||
this.formatPackages();
|
||||
this.setTotalTaxes();
|
||||
this.setTotal();
|
||||
this.formatTaxes();
|
||||
cb();
|
||||
} catch (e) {
|
||||
cb(e);
|
||||
}
|
||||
}
|
||||
|
||||
get hasPackages() {
|
||||
if (this.packaging.length)
|
||||
return true;
|
||||
}
|
||||
|
||||
setSubTotal() {
|
||||
this.subTotal = 0.00;
|
||||
|
||||
this.buys.forEach(buy => {
|
||||
buy.netPrice = buy.quantity * buy.price * (1 - buy.discount / 100);
|
||||
this.subTotal += buy.netPrice;
|
||||
});
|
||||
}
|
||||
|
||||
formatBuys() {
|
||||
this.buys.forEach(buy => {
|
||||
buy.itemFk = format.code(buy.itemFk, '000000');
|
||||
buy.quantity = parseInt(buy.quantity);
|
||||
buy.price = format.currency(buy.price);
|
||||
buy.discount = format.currency(buy.discount);
|
||||
buy.netPrice = format.currency(buy.netPrice);
|
||||
});
|
||||
|
||||
this.subTotal = format.currency(this.subTotal);
|
||||
}
|
||||
|
||||
formatPackages() {
|
||||
this.packaging.forEach(item => {
|
||||
item.itemFk = format.code(item.itemFk, '000000');
|
||||
});
|
||||
}
|
||||
|
||||
setTotalTaxes() {
|
||||
this.totalBase = 0.00;
|
||||
this.totalTax = 0.00;
|
||||
|
||||
this.ticketTax.forEach(tax => {
|
||||
this.totalBase += parseFloat(tax.Base);
|
||||
this.totalTax += parseFloat(tax.tax);
|
||||
});
|
||||
}
|
||||
|
||||
setTotal() {
|
||||
this.total = format.currency(this.totalBase + this.totalTax);
|
||||
}
|
||||
|
||||
formatTaxes() {
|
||||
this.ticketTax.forEach(tax => {
|
||||
tax.Base = format.currency(tax.Base);
|
||||
tax.vatPercent = format.percent(tax.vatPercent);
|
||||
tax.tax = format.currency(tax.tax);
|
||||
});
|
||||
|
||||
this.totalBase = format.currency(this.totalBase);
|
||||
this.totalTax = format.currency(this.totalTax);
|
||||
}
|
||||
};
|
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 8.4 KiB |
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="226.229px" height="31.038px" viewBox="0 0 226.229 31.038" enable-background="new 0 0 226.229 31.038" xml:space="preserve" id="svg2" inkscape:version="0.48.1 r9760" sodipodi:docname="logo.svg"><metadata id="metadata61"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/></cc:Work></rdf:RDF></metadata><defs id="defs59"/><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1366" inkscape:window-height="710" id="namedview57" showgrid="false" inkscape:zoom="4.0755163" inkscape:cx="138.56745" inkscape:cy="16.509992" inkscape:window-x="0" inkscape:window-y="26" inkscape:window-maximized="1" inkscape:current-layer="svg2"/>
|
||||
<g id="Background">
|
||||
</g>
|
||||
<g id="Guides">
|
||||
</g>
|
||||
<g id="Foreground">
|
||||
<g id="g7">
|
||||
<g id="g9">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.417,30.321L0,0h8.233l4.26,15.582l0.349,1.276 c0.521,1.866,0.918,3.431,1.191,4.693c0.15-0.618,0.335-1.345,0.555-2.182c0.219-0.837,0.528-1.935,0.925-3.293L19.981,0h8.19 L17.671,30.321H10.417z" id="path11"/>
|
||||
</g>
|
||||
<g id="g13">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#A0CE67" d="M139.809,19.787c-0.665,0.357-1.748,0.686-3.25,0.988 c-0.727,0.137-1.283,0.254-1.667,0.35c-0.95,0.247-1.661,0.563-2.134,0.947c-0.472,0.384-0.799,0.899-0.979,1.544 c-0.223,0.796-0.155,1.438,0.204,1.925c0.359,0.488,0.945,0.731,1.757,0.731c1.252,0,2.375-0.36,3.369-1.081 c0.994-0.721,1.653-1.665,1.98-2.831L139.809,19.787z M144.915,30.321h-7.458c0.017-0.356,0.048-0.726,0.094-1.11l0.159-1.192 c-1.318,1.026-2.627,1.786-3.927,2.279c-1.299,0.493-2.643,0.739-4.031,0.739c-2.158,0-3.7-0.593-4.625-1.779 c-0.925-1.187-1.106-2.788-0.542-4.804c0.519-1.851,1.431-3.356,2.737-4.515c1.307-1.159,3.021-1.972,5.142-2.438 c1.169-0.247,2.641-0.515,4.413-0.803c2.646-0.412,4.082-1.016,4.304-1.812l0.151-0.539c0.182-0.65,0.076-1.145-0.317-1.483 c-0.393-0.339-1.071-0.508-2.033-0.508c-1.045,0-1.934,0.214-2.666,0.643c-0.731,0.428-1.289,1.058-1.673,1.887h-6.748 c1.065-2.53,2.64-4.413,4.723-5.65s4.724-1.856,7.923-1.856c1.991,0,3.602,0.241,4.833,0.722s2.095,1.209,2.59,2.185 c0.339,0.701,0.483,1.536,0.432,2.504c-0.052,0.969-0.377,2.525-0.978,4.669l-2.375,8.483c-0.284,1.014-0.416,1.812-0.396,2.395 s0.188,0.962,0.503,1.141L144.915,30.321z" id="path15" style="fill:#8ed300;fill-opacity:1"/>
|
||||
</g>
|
||||
<g id="g17">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#A0CE67" d="M185.7,30.321l6.27-22.393h7.049l-1.097,3.918 c1.213-1.537,2.502-2.659,3.867-3.366c1.365-0.707,2.951-1.074,4.758-1.101l-2.03,7.25c-0.304-0.042-0.608-0.072-0.912-0.093 c-0.303-0.02-0.592-0.03-0.867-0.03c-1.126,0-2.104,0.168-2.932,0.504c-0.829,0.336-1.561,0.854-2.197,1.555 c-0.406,0.467-0.789,1.136-1.149,2.007c-0.361,0.872-0.814,2.282-1.359,4.232l-2.104,7.516H185.7z" id="path19" style="fill:#8ed300;fill-opacity:1"/>
|
||||
</g>
|
||||
<g id="g21">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#A0CE67" d="M217.631,19.787c-0.664,0.357-1.748,0.686-3.25,0.988 c-0.727,0.137-1.282,0.254-1.667,0.35c-0.95,0.247-1.661,0.563-2.134,0.947c-0.472,0.384-0.799,0.899-0.979,1.544 c-0.223,0.796-0.155,1.438,0.205,1.925c0.359,0.488,0.945,0.731,1.757,0.731c1.252,0,2.375-0.36,3.369-1.081 c0.994-0.721,1.654-1.665,1.98-2.831L217.631,19.787z M222.737,30.321h-7.458c0.017-0.356,0.048-0.726,0.094-1.11l0.159-1.192 c-1.318,1.026-2.627,1.786-3.927,2.279c-1.299,0.493-2.643,0.739-4.031,0.739c-2.158,0-3.7-0.593-4.625-1.779 c-0.926-1.187-1.106-2.788-0.542-4.804c0.519-1.851,1.431-3.356,2.737-4.515c1.306-1.159,3.02-1.972,5.142-2.438 c1.169-0.247,2.641-0.515,4.413-0.803c2.647-0.412,4.082-1.016,4.304-1.812l0.151-0.539c0.182-0.65,0.077-1.145-0.317-1.483 c-0.393-0.339-1.071-0.508-2.033-0.508c-1.045,0-1.934,0.214-2.666,0.643c-0.731,0.428-1.289,1.058-1.672,1.887h-6.748 c1.065-2.53,2.64-4.413,4.723-5.65s4.724-1.856,7.923-1.856c1.99,0,3.601,0.241,4.833,0.722s2.095,1.209,2.591,2.185 c0.339,0.701,0.483,1.536,0.431,2.504c-0.051,0.969-0.377,2.525-0.978,4.669l-2.375,8.483c-0.284,1.014-0.416,1.812-0.396,2.395 c0.02,0.583,0.188,0.962,0.503,1.141L222.737,30.321z" id="path23" style="fill:#8ed300;fill-opacity:1"/>
|
||||
</g>
|
||||
<g id="g25">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#A0CE67" d="M188.386,7.928l-6.269,22.393h-7.174l0.864-3.085 c-1.227,1.246-2.476,2.163-3.746,2.751s-2.625,0.882-4.067,0.882c-2.471,0-4.154-0.634-5.048-1.901 c-0.895-1.268-0.993-3.149-0.294-5.644l4.31-15.396h7.338l-3.508,12.53c-0.516,1.842-0.641,3.109-0.375,3.803 s0.967,1.041,2.105,1.041c1.275,0,2.323-0.422,3.142-1.267c0.819-0.845,1.497-2.223,2.031-4.133l3.353-11.974H188.386z" id="path27" style="fill:#8ed300;fill-opacity:1"/>
|
||||
</g>
|
||||
<g id="g29">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#A0CE67" d="M149.937,12.356l1.239-4.428h2.995l1.771-6.326h7.338 l-1.771,6.326h3.753l-1.24,4.428h-3.753l-2.716,9.702c-0.416,1.483-0.498,2.465-0.247,2.946c0.25,0.48,0.905,0.721,1.964,0.721 l0.549-0.011l0.39-0.031l-1.31,4.678c-0.811,0.148-1.596,0.263-2.354,0.344c-0.758,0.081-1.48,0.122-2.167,0.122 c-2.543,0-4.108-0.621-4.695-1.863c-0.587-1.242-0.313-3.887,0.82-7.936l2.428-8.672H149.937z" id="path31" style="fill:#8ed300;fill-opacity:1"/>
|
||||
</g>
|
||||
<g id="g33">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M73.875,18.896c-0.561,2.004-0.616,3.537-0.167,4.601 s1.375,1.595,2.774,1.595c1.399,0,2.605-0.524,3.62-1.574s1.806-2.59,2.375-4.622c0.526-1.879,0.556-3.334,0.09-4.363 c-0.466-1.029-1.393-1.543-2.778-1.543c-1.304,0-2.487,0.528-3.551,1.585S74.386,17.071,73.875,18.896z M96.513,0l-8.489,30.321 h-7.337l0.824-2.944c-1.166,1.22-2.369,2.121-3.61,2.703s-2.583,0.874-4.025,0.874c-2.802,0-4.772-1.081-5.912-3.243 c-1.139-2.162-1.218-4.993-0.238-8.493c0.988-3.528,2.668-6.404,5.042-8.627c2.374-2.224,4.927-3.336,7.661-3.336 c1.47,0,2.695,0.296,3.676,0.887c0.981,0.591,1.681,1.465,2.099,2.62L89.217,0H96.513z" id="path35"/>
|
||||
<g id="g37">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M73.875,18.896c-0.561,2.004-0.616,3.537-0.167,4.601s1.375,1.595,2.774,1.595 c1.399,0,2.605-0.524,3.62-1.574s1.806-2.59,2.375-4.622c0.526-1.879,0.556-3.334,0.09-4.363 c-0.466-1.029-1.393-1.543-2.778-1.543c-1.304,0-2.487,0.528-3.551,1.585S74.386,17.071,73.875,18.896z M96.513,0l-8.489,30.321 h-7.337l0.824-2.944c-1.166,1.22-2.369,2.121-3.61,2.703s-2.583,0.874-4.025,0.874c-2.802,0-4.772-1.081-5.912-3.243 c-1.139-2.162-1.218-4.993-0.238-8.493c0.988-3.528,2.668-6.404,5.042-8.627c2.374-2.224,4.927-3.336,7.661-3.336 c1.47,0,2.695,0.296,3.676,0.887c0.981,0.591,1.681,1.465,2.099,2.62L89.217,0H96.513z" id="path39"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g41">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M46.488,30.321l6.269-22.393h7.049l-1.098,3.918 c1.213-1.537,2.502-2.659,3.868-3.366s6.015-1.074,7.822-1.101l-2.03,7.25c-0.304-0.042-0.608-0.072-0.911-0.093 c-0.304-0.02-0.592-0.03-0.867-0.03c-1.126,0-5.167,0.168-5.997,0.504c-0.829,0.336-1.561,0.854-2.196,1.555 c-0.406,0.467-0.789,1.136-1.149,2.007c-0.361,0.872-0.814,2.282-1.36,4.232l-2.104,7.516H46.488z" id="path43"/>
|
||||
</g>
|
||||
<g id="g45">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M32.673,16.742l8.351-0.021 c0.375-1.436,0.308-2.558-0.201-3.365s-1.402-1.211-2.68-1.211c-1.209,0-2.285,0.397-3.229,1.19S33.224,15.265,32.673,16.742z M38.817,23.278h7.043c-1.347,2.456-3.172,4.356-5.477,5.7c-2.305,1.345-4.885,2.017-7.74,2.017 c-3.473,0-5.923-1.054-7.351-3.161c-1.427-2.107-1.632-4.98-0.613-8.618c1.038-3.707,2.875-6.641,5.512-8.803 c2.637-2.163,5.678-3.244,9.123-3.244c3.555,0,6.04,1.099,7.456,3.298c1.417,2.198,1.582,5.234,0.498,9.109l-0.239,0.814 l-0.167,0.484H31.721c-0.441,1.575-0.438,2.777,0.01,3.606c0.448,0.829,1.332,1.244,2.65,1.244c0.975,0,1.836-0.206,2.583-0.617 S38.33,24.086,38.817,23.278z" id="path47"/>
|
||||
<g id="g49">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M32.673,16.742l8.351-0.021c0.375-1.436,0.308-2.558-0.201-3.365 s-1.402-1.211-2.68-1.211c-1.209,0-2.285,0.397-3.229,1.19S33.224,15.265,32.673,16.742z M38.817,23.278h7.043 c-1.347,2.456-3.172,4.356-5.477,5.7c-2.305,1.345-4.885,2.017-7.74,2.017c-3.473,0-5.923-1.054-7.351-3.161 c-1.427-2.107-1.632-4.98-0.613-8.618c1.038-3.707,2.875-6.641,5.512-8.803c2.637-2.163,5.678-3.244,9.123-3.244 c3.555,0,6.04,1.099,7.456,3.298c1.417,2.198,1.582,5.234,0.498,9.109l-0.239,0.814l-0.167,0.484H31.721 c-0.441,1.575-0.438,2.777,0.01,3.606c0.448,0.829,1.332,1.244,2.65,1.244c0.975,0,1.836-0.206,2.583-0.617 S38.33,24.086,38.817,23.278z" id="path51"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g53">
|
||||
<path fill="#A0CE67" d="M112.881,30.643l-6.404-18.639l-6.455,18.639h-7.254l9.565-30.321h8.19l4.434,15.582l0.35,1.276 c0.521,1.866,0.917,3.431,1.191,4.693l0.555-2.182c0.219-0.837,0.528-1.935,0.925-3.293l4.468-16.076h8.19l-10.501,30.321 H112.881z" id="path55" style="fill:#8ed300;fill-opacity:1"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.4 KiB |
|
@ -0,0 +1,162 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<title>{{_.subject}}</title>
|
||||
<meta charset="utf8"/>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Header block -->
|
||||
{{$.header}}
|
||||
<!-- Header block end -->
|
||||
|
||||
<!-- Body block -->
|
||||
<main>
|
||||
<div class="columns">
|
||||
<div class="size50">
|
||||
<div class="size50">
|
||||
<h1 style="margin-top:0" class="font extraLarge">ALBARÁN</h1>
|
||||
<div class="row inline font normal">
|
||||
<div class="text font gray">CLIENTE:</div>
|
||||
<div class="control">{{clientId}}</div>
|
||||
</div>
|
||||
<div class="row inline font normal">
|
||||
<div class="text font gray">ALBARÁN:</div>
|
||||
<div class="control">{{ticketId}}</div>
|
||||
</div>
|
||||
<div class="row inline font normal">
|
||||
<div class="text font gray">FECHA:</div>
|
||||
<div class="control">{{shipped}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="size50">
|
||||
<div class="panel">
|
||||
<div class="header">Dirección de entrega</div>
|
||||
<p>
|
||||
<strong>{{clientName}}</strong>
|
||||
</p>
|
||||
<div>
|
||||
{{street}}
|
||||
</div>
|
||||
<div>
|
||||
{{postcode}}, {{city}} ({{province}})
|
||||
</div>
|
||||
<div>
|
||||
{{country}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="header">Datos fiscales</div>
|
||||
<div>
|
||||
{{socialName}}
|
||||
</div>
|
||||
<div>
|
||||
{{street}}
|
||||
</div>
|
||||
<div>
|
||||
{{fi}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid" style="margin-top:20px">
|
||||
<div class="row header inline">
|
||||
<div style="width: 10%">Ref</div>
|
||||
<div style="width: 10%">Cant.</div>
|
||||
<div style="width: 45%">Concepto</div>
|
||||
<div style="width: 10%">PVP/u</div>
|
||||
<div style="width: 10%">Dto</div>
|
||||
<div style="width: 5%">IVA</div>
|
||||
<div style="width: 10%">Importe</div>
|
||||
</div>
|
||||
{{#buys}}
|
||||
<div class="row inline">
|
||||
<div class="font bold" style="width: 10%">{{itemFk}}</div>
|
||||
<div class="font bold" style="width: 10%">{{quantity}}</div>
|
||||
<div class="font bold" style="width: 45%">
|
||||
<div>{{concept}}</div>
|
||||
<div>
|
||||
<font class="font small gray">
|
||||
<span><strong>{{tag1}}</strong> {{val1}} - </span>
|
||||
<span><strong>{{tag2}}</strong> {{val2}} - </span>
|
||||
<span><strong>{{tag3}}</strong> {{val3}}</span>
|
||||
</font>
|
||||
</div>
|
||||
</div>
|
||||
<div class="font bold" style="width: 10%">{{price}}</div>
|
||||
<div class="font bold" style="width: 10%">{{discount}}</div>
|
||||
<div class="font bold" style="width: 5%">{{taxType}}</div>
|
||||
<div class="font bold" style="width: 10%">{{netPrice}}</div>
|
||||
</div>
|
||||
{{/buys}}
|
||||
<div class="row last inline">
|
||||
<div style="width: 90%"><strong>Subtotal {{1+1}}</strong></div>
|
||||
<div style="width: 10%"><strong>{{subTotal}}</strong></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns">
|
||||
<div class="size50" style="padding-right:10px">
|
||||
{{#hasPackages}}
|
||||
<h3 class="font normal gray">Cajas y cubos</h3>
|
||||
<div class="grid" style="margin:30px 5px 0 0">
|
||||
<div class="row header inline font small">
|
||||
<div style="width: 25%">Id</div>
|
||||
<div style="width: 50%">Concepto</div>
|
||||
<div style="width: 25%">Cantidad</div>
|
||||
</div>
|
||||
{{#packaging}}
|
||||
<div class="row inline font small">
|
||||
<div style="width: 25%">{{itemFk}}</div>
|
||||
<div style="width: 50%">{{name}}</div>
|
||||
<div style="width: 25%">{{quantity}}</div>
|
||||
</div>
|
||||
{{/packaging}}
|
||||
</div>
|
||||
{{/hasPackages}}
|
||||
{{^hasPackages}} {{/hasPackages}}
|
||||
|
||||
<div class="panel" style="text-align:center">
|
||||
<div class="header">Firma digital</div>
|
||||
<img width="200" src="http://windows.verdnatura.es/signatures/tickets/{{docId}}.png"/>
|
||||
<section>{{docDate}}</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="size50">
|
||||
<h3 class="font normal gray">Desglose impositivo</h3>
|
||||
<div class="grid" style="margin:30px 0 0 5px">
|
||||
<div class="row header inline font small">
|
||||
<div style="width: 35%">Tipo</div>
|
||||
<div style="width: 25%">Base imp.</div>
|
||||
<div style="width: 15%">Tasa</div>
|
||||
<div style="width: 25%">Cuota</div>
|
||||
</div>
|
||||
{{#ticketTax}}
|
||||
<div class="row inline font small">
|
||||
<div style="width: 35%">{{name}}</div>
|
||||
<div style="width: 25%">{{Base}}</div>
|
||||
<div style="width: 15%">{{vatPercent}}</div>
|
||||
<div style="width: 25%">{{tax}}</div>
|
||||
</div>
|
||||
{{/ticketTax}}
|
||||
<div class="row inline font small gray">
|
||||
<div style="width: 35%">Subtotal</div>
|
||||
<div style="width: 40%">{{totalBase}}</div>
|
||||
<div style="width: 25%">{{totalTax}}</div>
|
||||
</div>
|
||||
<div class="row last inline">
|
||||
<div style="width: 75%"><strong>Total</strong></div>
|
||||
<div style="width: 25%"><strong>{{total}}</strong></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<!-- Body block end -->
|
||||
|
||||
<!-- Footer block -->
|
||||
{{$.footer}}
|
||||
<!-- Footer block end -->
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"title": "Orden de domiciliación de adeudo directo SEPA CORE",
|
||||
"toCompleteBySupplier": "A cumplimentar por el acreedor",
|
||||
"toCompleteByClient": "A cumplimentar por el deudor",
|
||||
"bodyDescription": "Mediante la firma de esta orden de domiciliación, el deudor autoriza (A) al acreedor a enviar instrucciones a la entidad del deudor para adeudar su cuenta y (B) a la entidad para efectuar los adeudos en su cuenta siguiendo las instrucciones del acreedor.Como parte de sus derechos, el deudor está legitimado al reembolso por su entidad en los términos y condiciones del contrato suscrito con la misma. La solicitud de reembolso deberá efectuarse dentro de las ocho semanas que adeudo en cuenta. Puede obtener información adicional sobre sus derechos en su entidad financiera.",
|
||||
"orderReference": "Referencia de la orden de domiciliación",
|
||||
"supplierIdentifier": "Identificador del acreedor",
|
||||
"supplierName": "Nombre del acreedor",
|
||||
"supplierStreet": "Dirección",
|
||||
"supplierLocation": "CP - Población - Provincia",
|
||||
"supplierCountry": "País",
|
||||
"clientAdvice": "Debe llevar a su Entidad Bancaria una copia del documento firmado para que lo registre y evitar la devolución.",
|
||||
"clientName": "Nombre del deudor/es",
|
||||
"clientStreet": "Dirección del deudor",
|
||||
"clientLocation": "CP - Población - Provincia",
|
||||
"clientCountry": "País del deudor",
|
||||
"swift": "Swift BIC",
|
||||
"accountNumber": "Número de cuenta - IBAN",
|
||||
"accountHolder": "(Titular/es de la cuenta de cargo)",
|
||||
"accountNumberFormat": "En España el IBAN consta de 24 posiciones comenzando siempre por ES",
|
||||
"paymentType": "Tipo de pago",
|
||||
"recurrent": "Recurrente",
|
||||
"unique": "Único",
|
||||
"signLocation": "Fecha - Localidad",
|
||||
"sign": "Firma del deudor y sello",
|
||||
"mandatoryFields": "TODOS LOS CAMPOS HAN DE SER CUMPLIMENTADOS OBLIGATORIAMENTE.",
|
||||
"sendOrder": "UNA VEZ FIRMADA ESTA ORDEN DE DOMICILIACIÓN DEBE SER ENVIADA AL ACREEDOR PARA SU CUSTODIA Y ES RECOMENDABLE FACILITAR UNA COPIA A SU ENTIDAD BANCARIA.",
|
||||
"fiscalAddress": "VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla · www.verdnatura.es · clientes@verdnatura.es",
|
||||
"privacy": "- AVISO - Este mensaje es privado y confidencial, y debe ser utilizado exclusivamente por la persona destinataria del mismo. Si usted ha recibido este mensaje por error, le rogamos lo comunique al remitente y borre dicho mensaje y cualquier documento adjunto que pudiera contener. Verdnatura Levante SL no renuncia a la confidencialidad ni a ningún privilegio por causa de transmisión errónea o mal funcionamiento. Igualmente no se hace responsable de los cambios, alteraciones, errores u omisiones que pudieran hacerse al mensaje una vez enviado.",
|
||||
"privacyLaw": "En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal, le comunicamos que los datos personales que facilite se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L., pudiendo en todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, comunicándolo por escrito al domicilio social de la entidad. La finalidad del fichero es la gestión administrativa, contabilidad, y facturación."
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
img {
|
||||
margin: 0
|
||||
}
|
||||
|
||||
.body {
|
||||
font-family: arial, sans-serif;
|
||||
max-width: 90%;
|
||||
margin: 0 auto;
|
||||
font-size: 14px;
|
||||
color: #000
|
||||
}
|
||||
|
||||
body .title {
|
||||
text-align: center;
|
||||
padding-bottom: 20px
|
||||
}
|
||||
|
||||
body .title h1 {
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
margin: 0
|
||||
}
|
|
@ -3,18 +3,18 @@ var database = require(path.join(__dirname, '../../database.js'));
|
|||
var format = require(path.join(__dirname, '../../util/format.js'));
|
||||
|
||||
module.exports = class Footer {
|
||||
getData(params, cb) {
|
||||
async getData(params, cb) {
|
||||
let query = `SELECT
|
||||
socialName
|
||||
FROM client c
|
||||
JOIN country ct ON ct.id = c.countryFk
|
||||
WHERE c.id = ?`;
|
||||
database.pool.query(query, [params.clientId], (error, result) => {
|
||||
if (error || result.length == 0)
|
||||
return cb(new Error('No template data found'));
|
||||
|
||||
try {
|
||||
let [result] = await database.pool.query(query, [params.clientId]);
|
||||
Object.assign(this, result[0]);
|
||||
cb();
|
||||
});
|
||||
} catch (e) {
|
||||
return cb(new Error('No template data found'));
|
||||
}
|
||||
cb();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<div id="pageFooter">
|
||||
<div class="info">{{socialName}}</div>
|
||||
<footer id="pageFooter">
|
||||
<section class="page-footer">
|
||||
{{socialName}}
|
||||
</section>
|
||||
<p>{{_.phytosanitary}}</p>
|
||||
<p>{{_.privacyLaw}}</p>
|
||||
</div>
|
||||
<!-- <p>{{_.privacyLaw}}</p>-->
|
||||
</footer>
|
|
@ -1,24 +1,13 @@
|
|||
img {
|
||||
margin: 0
|
||||
}
|
||||
|
||||
#pageFooter {
|
||||
font-family: arial, sans-serif;
|
||||
font-weight: 100;
|
||||
max-width: 90%;
|
||||
margin: 0 auto;
|
||||
font-size: 9px;
|
||||
margin: 30px;
|
||||
color: #555
|
||||
}
|
||||
|
||||
#pageFooter .info {
|
||||
border-bottom: 2px solid #CCC;
|
||||
padding-bottom: 2px;
|
||||
footer, footer p {
|
||||
text-align: center;
|
||||
font-size: 11px
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
#pageFooter p {
|
||||
text-align: center
|
||||
footer .page-footer {
|
||||
border-bottom: 2px solid #CCC;
|
||||
padding-bottom: 2px
|
||||
}
|
||||
|
||||
#pageFooter {
|
||||
zoom: 0.55
|
||||
}
|
|
@ -4,17 +4,6 @@ var format = require(path.join(__dirname, '../../util/format.js'));
|
|||
|
||||
module.exports = class Header {
|
||||
getData(params, cb) {
|
||||
let query = `SELECT
|
||||
c.name AS clientName
|
||||
FROM client c
|
||||
JOIN country ct ON ct.id = c.countryFk
|
||||
WHERE c.id = ?`;
|
||||
database.pool.query(query, [params.clientId], (error, result) => {
|
||||
if (error || result.length == 0)
|
||||
return cb(new Error('No template data found'));
|
||||
|
||||
Object.assign(this, result[0]);
|
||||
cb();
|
||||
});
|
||||
cb();
|
||||
}
|
||||
};
|
||||
|
|
After Width: | Height: | Size: 19 KiB |
|
@ -1,7 +1,5 @@
|
|||
<div id="pageHeader-first">
|
||||
<img src="cid:header/logo.svg" alt="VerdNatura"/>
|
||||
<p>
|
||||
<div>{{_.mercantileRegistry}}</div>
|
||||
<div>{{_.fiscalAddress}}</div>
|
||||
</p>
|
||||
</div>
|
||||
<header class="report">
|
||||
<img id="logo" src="cid:header/logo.png" alt="VerdNatura" />
|
||||
<section>{{_.mercantileRegistry}}</section>
|
||||
<section>{{_.fiscalAddress}}</section>
|
||||
</header>
|
|
@ -1,16 +1,10 @@
|
|||
img {
|
||||
margin: 0
|
||||
}
|
||||
|
||||
#pageHeader-first {
|
||||
header.report {
|
||||
border-bottom: 1px solid #DDD;
|
||||
font-family: arial, sans-serif;
|
||||
padding-bottom: 10px;
|
||||
text-align: center;
|
||||
font-size: 10px;
|
||||
color: #555
|
||||
font-size: 12px;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.header p {
|
||||
text-align: center
|
||||
header #logo {
|
||||
margin-bottom: 10px
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
let database = require('../database.js');
|
||||
let strftime = require('strftime');
|
||||
|
||||
module.exports = {
|
||||
|
||||
|
@ -37,23 +38,62 @@ module.exports = {
|
|||
return number;
|
||||
},
|
||||
|
||||
/**
|
||||
* Format number
|
||||
* @param {Integer} number Input number
|
||||
* @return {Integer} Formatted number
|
||||
*/
|
||||
number: function(number, minDigits = 0, maxDigits = 2) {
|
||||
let options = {
|
||||
style: 'decimal',
|
||||
minimumFractionDigits: minDigits,
|
||||
maximumFractionDigits: maxDigits
|
||||
};
|
||||
|
||||
return new Intl.NumberFormat('es-ES', options).format(number);
|
||||
},
|
||||
|
||||
/**
|
||||
* Format currency
|
||||
* @param {Integer} ammount Input ammount
|
||||
* @param {String} type Currency type [EUR, USD, ...]
|
||||
* @return {Integer} Formatted currency
|
||||
*/
|
||||
currency: function(ammount, type = 'EUR', minDigits = 2, maxDigits = 2) {
|
||||
let options = {
|
||||
style: 'currency',
|
||||
currency: type,
|
||||
minimumFractionDigits: minDigits,
|
||||
maximumFractionDigits: maxDigits
|
||||
};
|
||||
|
||||
return new Intl.NumberFormat('es-ES', options).format(ammount);
|
||||
},
|
||||
|
||||
percent: function(number, minDigits = 2, maxDigits = 2) {
|
||||
let options = {
|
||||
style: 'percent',
|
||||
minimumFractionDigits: minDigits,
|
||||
maximumFractionDigits: maxDigits
|
||||
};
|
||||
|
||||
return new Intl.NumberFormat('es-ES', options).format(number);
|
||||
},
|
||||
|
||||
/**
|
||||
* Format date dd-mm-yyyy
|
||||
* @param {Object} date - Date object
|
||||
* @param {String} delimiter - Date delimiter
|
||||
* @return {String} Formatted date
|
||||
*/
|
||||
date: function(date, delimiter = '-') {
|
||||
let day = date.getDate();
|
||||
let month = date.getMonth() + 1;
|
||||
let year = date.getFullYear();
|
||||
date: function(date, format = '%d-%m-%Y') {
|
||||
return strftime(format, date);
|
||||
},
|
||||
|
||||
if (day < 10)
|
||||
day = `0${day}`
|
||||
code: function(code, pad) {
|
||||
code = String(code);
|
||||
pad = String(pad);
|
||||
|
||||
if (month < 10)
|
||||
month = `0${month}`
|
||||
|
||||
return day + delimiter + month + delimiter + year;
|
||||
return pad.substring(0, (pad.length - code.length)) + code;
|
||||
}
|
||||
};
|
||||
};
|
|
@ -6,13 +6,14 @@
|
|||
"dependencies": {
|
||||
"body-parser": "^1.17.2",
|
||||
"express": "^4.15.3",
|
||||
"fs-extra": "^5.0.0",
|
||||
"html-pdf": "^2.2.0",
|
||||
"inline-css": "^2.2.2",
|
||||
"mustache": "^2.3.0",
|
||||
"mysql": "^2.13.0",
|
||||
"mysql2": "^1.5.3",
|
||||
"path": "^0.12.7",
|
||||
"require-yaml": "0.0.1",
|
||||
"fs-extra": "^5.0.0"
|
||||
"strftime": "^0.10.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
body {
|
||||
font-family: arial, sans-serif;
|
||||
margin: 0 auto;
|
||||
width: 210mm
|
||||
font-size: 1em;
|
||||
zoom: 0.55
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 20px 0
|
||||
}
|
||||
|
||||
img {
|
||||
|
@ -11,6 +17,10 @@ p {
|
|||
text-align: justify
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box
|
||||
}
|
||||
|
||||
.panel {
|
||||
border: 1px solid #DDD;
|
||||
margin-bottom: 10px;
|
||||
|
@ -18,6 +28,10 @@ p {
|
|||
padding:10px
|
||||
}
|
||||
|
||||
.panel .header {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
.row {
|
||||
margin-bottom: 15px;
|
||||
overflow: hidden
|
||||
|
@ -200,4 +214,3 @@ p {
|
|||
.grid .row.inline > div {
|
||||
float: left;
|
||||
}
|
||||
|
|
@ -21,138 +21,207 @@
|
|||
<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="290" sdnum="3082;">290</td>
|
||||
<td align="left">Componentes de ticket muestra todos los componentes existentes.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="268" sdnum="3082;">268</td>
|
||||
<td align="left">Añadir componente de paginación a rutas con filtros</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="271" sdnum="3082;">271</td>
|
||||
<td align="left">Atajo de teclado para botones +</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="226" sdnum="3082;">226</td>
|
||||
<td align="left">Traduccion de error ticket tracking + e2e</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="269" sdnum="3082;">269</td>
|
||||
<td align="left">Test unitario de createWithInsurance.js</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="217" sdnum="3082;">217</td>
|
||||
<td align="left">Seccion Configuracion paso 3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="289" sdnum="3082;">289</td>
|
||||
<td align="left">Cuando se modifica el crédito mostrar alerta</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="252" sdnum="3082;">252</td>
|
||||
<td align="left">No modifica visualmente el campo Facturar por consignatario al modificar el Recargo en cualquiera de sus consignatarios</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="284" sdnum="3082;">284</td>
|
||||
<td align="left">Seccion ticket.lineas icono papelera para eliminar lineas</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="253" sdnum="3082;">253</td>
|
||||
<td align="left">Actualizar los estilos para que concuerden con la paleta de colores de Vernatura</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="283" sdnum="3082;">283</td>
|
||||
<td align="left">Modificar encabezado el client.summary</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="277" sdnum="3082;">277</td>
|
||||
<td align="left">Hacer que el descriptor de ticket se actualice cuando se modifica el estado</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="278" sdnum="3082;">278</td>
|
||||
<td align="left">Refactor descriptor item</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="160" sdnum="3082;">160</td>
|
||||
<td align="left">Limpiar tablas/vistas obsoletas del esquema salix</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="285" sdnum="3082;">285</td>
|
||||
<td align="left">Optimizar tarea de tocker y añadir funciones compiladas</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="231" sdnum="3082;">231</td>
|
||||
<td align="left">Importar de vn2008 a vn toda la funcionalidad necesaria para mostrar precio</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="287" sdnum="3082;">287</td>
|
||||
<td align="left">Si en client.fiscaldata el nif empieza por B</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="265" sdnum="3082;">265</td>
|
||||
<td align="left">Añadir boton ok y estado</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="260" sdnum="3082;">260</td>
|
||||
<td align="left">Refactorización de rutas en back-end</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="267" sdnum="3082;">267</td>
|
||||
<td align="left">Preparar esqueleto para nueva entidad order</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="292" sdnum="3082;">292</td>
|
||||
<td align="left">En el descriptor de item.list no aparece toda la informacion que deberia</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="270" sdnum="3082;">270</td>
|
||||
<td align="left">Seccion Configuracion paso 2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="264" sdnum="3082;">264</td>
|
||||
<td align="left">sumario ticket no respeta margenes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="281" sdnum="3082;">281</td>
|
||||
<td align="left">ticket.lineas Mostrar boton editar </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="17" align="right" sdval="266" sdnum="3082;">266</td>
|
||||
<td align="left">Al hacer click en el ticket.lineas campo id articulo mostrar el descriptor de item</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ñ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ñ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ó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ñ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ñ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>
|
||||
|
|