Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 2148-entry_log
gitea/salix/pipeline/head This commit has test failures
Details
gitea/salix/pipeline/head This commit has test failures
Details
This commit is contained in:
commit
6b44715bf6
|
@ -9,6 +9,7 @@ export default {
|
|||
invoiceOutButton: '.modules-menu > li[ui-sref="invoiceOut.index"]',
|
||||
claimsButton: '.modules-menu > li[ui-sref="claim.index"]',
|
||||
returnToModuleIndexButton: 'a[ui-sref="order.index"]',
|
||||
homeButton: 'vn-topbar > div.side.start > a',
|
||||
userMenuButton: '#user',
|
||||
userLocalWarehouse: '.user-popover vn-autocomplete[ng-model="$ctrl.localWarehouseFk"]',
|
||||
userLocalBank: '.user-popover vn-autocomplete[ng-model="$ctrl.localBankFk"]',
|
||||
|
@ -630,6 +631,16 @@ export default {
|
|||
createButton: 'button[type=submit]',
|
||||
cancelButton: 'vn-button[href="#!/client/index"]'
|
||||
},
|
||||
orderSummary: {
|
||||
header: 'vn-order-summary h5',
|
||||
id: 'vn-order-summary vn-one:nth-child(1) > vn-label-value:nth-child(1) span',
|
||||
alias: 'vn-order-summary vn-one:nth-child(1) > vn-label-value:nth-child(2) span',
|
||||
consignee: 'vn-order-summary vn-one:nth-child(2) > vn-label-value:nth-child(3) span',
|
||||
subtotal: 'vn-order-summary vn-one.taxes > p:nth-child(1)',
|
||||
vat: 'vn-order-summary vn-one.taxes > p:nth-child(2)',
|
||||
total: 'vn-order-summary vn-one.taxes > p:nth-child(3)',
|
||||
sale: 'vn-order-summary vn-tbody > vn-tr',
|
||||
},
|
||||
orderCatalog: {
|
||||
plantRealmButton: 'vn-order-catalog > vn-side-menu vn-icon[icon="icon-plant"]',
|
||||
type: 'vn-autocomplete[data="$ctrl.itemTypes"]',
|
||||
|
@ -700,6 +711,17 @@ export default {
|
|||
firstTicketDeleteButton: 'vn-route-tickets vn-tr:nth-child(1) vn-icon[icon="delete"]',
|
||||
confirmButton: '.vn-confirm.shown button[response="accept"]'
|
||||
},
|
||||
workerSummary: {
|
||||
header: 'vn-worker-summary h5',
|
||||
id: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(2) > section > span',
|
||||
email: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(3) > section > span',
|
||||
department: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(4) > section > span',
|
||||
userId: 'vn-worker-summary vn-one:nth-child(2) > vn-label-value:nth-child(2) > section > span',
|
||||
userName: 'vn-worker-summary vn-one:nth-child(2) > vn-label-value:nth-child(3) > section > span',
|
||||
role: 'vn-worker-summary vn-one:nth-child(2) > vn-label-value:nth-child(4) > section > span',
|
||||
extension: 'vn-worker-summary vn-one:nth-child(2) > vn-label-value:nth-child(5) > section > span',
|
||||
|
||||
},
|
||||
workerBasicData: {
|
||||
name: 'vn-worker-basic-data vn-textfield[ng-model="$ctrl.worker.firstName"]',
|
||||
surname: 'vn-worker-basic-data vn-textfield[ng-model="$ctrl.worker.lastName"]',
|
||||
|
@ -783,6 +805,21 @@ export default {
|
|||
ticketOne: 'vn-invoice-out-summary > vn-card > vn-horizontal > vn-auto > vn-table > div > vn-tbody > vn-tr:nth-child(1)',
|
||||
ticketTwo: 'vn-invoice-out-summary > vn-card > vn-horizontal > vn-auto > vn-table > div > vn-tbody > vn-tr:nth-child(2)'
|
||||
},
|
||||
travelBasicDada: {
|
||||
reference: 'vn-travel-basic-data vn-textfield[ng-model="$ctrl.travel.ref"]',
|
||||
agency: 'vn-travel-basic-data vn-autocomplete[ng-model="$ctrl.travel.agencyModeFk"]',
|
||||
shippingDate: 'vn-travel-basic-data vn-date-picker[ng-model="$ctrl.travel.shipped"]',
|
||||
deliveryDate: 'vn-travel-basic-data vn-date-picker[ng-model="$ctrl.travel.landed"]',
|
||||
outputWarehouse: 'vn-travel-basic-data vn-autocomplete[ng-model="$ctrl.travel.warehouseOutFk"]',
|
||||
inputWarehouse: 'vn-travel-basic-data vn-autocomplete[ng-model="$ctrl.travel.warehouseInFk"]',
|
||||
delivered: 'vn-travel-basic-data vn-check[ng-model="$ctrl.travel.isDelivered"]',
|
||||
received: 'vn-travel-basic-data vn-check[ng-model="$ctrl.travel.isReceived"]',
|
||||
save: 'vn-travel-basic-data vn-submit[label="Save"]',
|
||||
undoChanges: 'vn-travel-basic-data vn-button[label="Undo changes"]'
|
||||
},
|
||||
travelLog: {
|
||||
firstLogFirstTD: 'vn-travel-log vn-tbody > vn-tr > vn-td:nth-child(1) > div'
|
||||
},
|
||||
travelThermograph: {
|
||||
add: 'vn-travel-thermograph-index vn-float-button[icon="add"]',
|
||||
thermographID: 'vn-travel-thermograph-create vn-autocomplete[ng-model="$ctrl.dms.thermographId"]',
|
||||
|
@ -806,5 +843,10 @@ export default {
|
|||
header: 'vn-entry-summary > vn-card > h5',
|
||||
reference: 'vn-entry-summary vn-label-value[label="Reference"]',
|
||||
confirmed: 'vn-entry-summary vn-check[label="Confirmed"]',
|
||||
},
|
||||
entryDescriptor: {
|
||||
agency: 'vn-entry-descriptor div.body vn-label-value:nth-child(3) span',
|
||||
travelsQuicklink: 'vn-entry-descriptor vn-quick-links > a:nth-child(1)',
|
||||
entriesQuicklink: 'vn-entry-descriptor vn-quick-links > a:nth-child(2)'
|
||||
}
|
||||
};
|
||||
|
|
|
@ -16,6 +16,12 @@ describe('Client Add notes path', () => {
|
|||
await browser.close();
|
||||
});
|
||||
|
||||
it(`should reach the notes index`, async() => {
|
||||
let url = await page.expectURL('/note');
|
||||
|
||||
expect(url).toBe(true);
|
||||
});
|
||||
|
||||
it(`should click on the add note button`, async() => {
|
||||
await page.waitToClick(selectors.clientNotes.addNoteFloatButton);
|
||||
let url = await page.expectURL('/note/create');
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Worker summary path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('employee', 'worker');
|
||||
await page.accessToSearchResult('agencyNick');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should reach the employee summary section', async() => {
|
||||
const url = await page.expectURL('#!/worker/3/summary');
|
||||
|
||||
expect(url).toBe(true);
|
||||
});
|
||||
|
||||
it('should check the summary contains the name and userName on the header', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.header, 'innerText');
|
||||
|
||||
expect(result).toEqual('agency agency');
|
||||
});
|
||||
|
||||
it('should check the summary contains the basic data id', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.id, 'innerText');
|
||||
|
||||
expect(result).toEqual('3');
|
||||
});
|
||||
|
||||
it('should check the summary contains the basic data email', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.email, 'innerText');
|
||||
|
||||
expect(result).toEqual('agency@verdnatura.es');
|
||||
});
|
||||
|
||||
it('should check the summary contains the basic data department', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.department, 'innerText');
|
||||
|
||||
expect(result).toEqual('CAMARA');
|
||||
});
|
||||
|
||||
it('should check the summary contains the user data id', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.userId, 'innerText');
|
||||
|
||||
expect(result).toEqual('3');
|
||||
});
|
||||
|
||||
it('should check the summary contains the user data name', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.userName, 'innerText');
|
||||
|
||||
expect(result).toEqual('agency');
|
||||
});
|
||||
|
||||
it('should check the summary contains the user data role', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.role, 'innerText');
|
||||
|
||||
expect(result).toEqual('agency');
|
||||
});
|
||||
|
||||
it('should check the summary contains the user data extension', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.workerSummary.extension, 'innerText');
|
||||
|
||||
expect(result).toEqual('1101');
|
||||
});
|
||||
});
|
|
@ -0,0 +1,65 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Order summary path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('employee', 'order');
|
||||
await page.accessToSearchResult('16');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should reach the order summary section', async() => {
|
||||
const url = await page.expectURL('#!/order/16/summary');
|
||||
|
||||
expect(url).toBe(true);
|
||||
});
|
||||
|
||||
it('should check the summary contains the order id', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.orderSummary.id, 'innerText');
|
||||
|
||||
expect(result).toEqual('16');
|
||||
});
|
||||
|
||||
it('should check the summary contains the order alias', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.orderSummary.alias, 'innerText');
|
||||
|
||||
expect(result).toEqual('address 26');
|
||||
});
|
||||
|
||||
it('should check the summary contains the order consignee', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.orderSummary.consignee, 'innerText');
|
||||
|
||||
expect(result).toEqual('Many places - Silla (Province one)');
|
||||
});
|
||||
|
||||
it('should check the summary contains the order subtotal', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.orderSummary.subtotal, 'innerText');
|
||||
|
||||
expect(result.length).toBeGreaterThan(1);
|
||||
});
|
||||
|
||||
it('should check the summary contains the order vat', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.orderSummary.vat, 'innerText');
|
||||
|
||||
expect(result.length).toBeGreaterThan(1);
|
||||
});
|
||||
|
||||
it('should check the summary contains the order total', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.orderSummary.total, 'innerText');
|
||||
|
||||
expect(result.length).toBeGreaterThan(1);
|
||||
});
|
||||
|
||||
it('should check the summary contains the order sales', async() => {
|
||||
const result = await page.countElement(selectors.orderSummary.sale);
|
||||
|
||||
expect(result).toBeGreaterThan(0);
|
||||
});
|
||||
});
|
|
@ -0,0 +1,102 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Travel basic data path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('buyer', 'travel');
|
||||
await page.accessToSearchResult('3');
|
||||
await page.accessToSection('travel.card.basicData');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should reach the thermograph section', async() => {
|
||||
const result = await page.expectURL('/basic-data');
|
||||
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
|
||||
it('should set a wrong delivery date then receive an error on submit', async() => {
|
||||
await page.datePicker(selectors.travelBasicDada.deliveryDate, -1, null);
|
||||
await page.waitToClick(selectors.travelBasicDada.save);
|
||||
const result = await page.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Landing cannot be lesser than shipment');
|
||||
});
|
||||
|
||||
it('should undo the changes', async() => {
|
||||
await page.waitToClick(selectors.travelBasicDada.undoChanges);
|
||||
await page.waitToClick(selectors.travelBasicDada.save);
|
||||
const result = await page.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('No changes to save');
|
||||
});
|
||||
|
||||
it('should now edit the whole form then save', async() => {
|
||||
await page.clearInput(selectors.travelBasicDada.reference);
|
||||
await page.write(selectors.travelBasicDada.reference, 'new reference!');
|
||||
await page.waitFor(2000);
|
||||
await page.autocompleteSearch(selectors.travelBasicDada.agency, 'Entanglement');
|
||||
await page.autocompleteSearch(selectors.travelBasicDada.outputWarehouse, 'Warehouse Three');
|
||||
await page.autocompleteSearch(selectors.travelBasicDada.inputWarehouse, 'Warehouse Four');
|
||||
await page.waitToClick(selectors.travelBasicDada.delivered);
|
||||
await page.waitToClick(selectors.travelBasicDada.received);
|
||||
await page.waitToClick(selectors.travelBasicDada.save);
|
||||
const result = await page.waitForLastSnackbar();
|
||||
|
||||
expect(result).toEqual('Data saved!');
|
||||
});
|
||||
|
||||
it('should reload the section and check the reference was saved', async() => {
|
||||
await page.reloadSection('travel.card.basicData');
|
||||
const result = await page.waitToGetProperty(selectors.travelBasicDada.reference, 'value');
|
||||
|
||||
expect(result).toEqual('new reference!');
|
||||
});
|
||||
|
||||
it('should check the agency was saved', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.travelBasicDada.agency, 'value');
|
||||
|
||||
expect(result).toEqual('Entanglement');
|
||||
});
|
||||
|
||||
it('should check the output warehouse date was saved', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.travelBasicDada.outputWarehouse, 'value');
|
||||
|
||||
expect(result).toEqual('Warehouse Three');
|
||||
});
|
||||
|
||||
it('should check the input warehouse date was saved', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.travelBasicDada.inputWarehouse, 'value');
|
||||
|
||||
expect(result).toEqual('Warehouse Four');
|
||||
});
|
||||
|
||||
it(`should check the delivered checkbox was saved even tho it doesn't make sense`, async() => {
|
||||
await page.waitForClassPresent(selectors.travelBasicDada.delivered, 'checked');
|
||||
});
|
||||
|
||||
it(`should check the received checkbox was saved even tho it doesn't make sense`, async() => {
|
||||
await page.waitForClassPresent(selectors.travelBasicDada.received, 'checked');
|
||||
});
|
||||
|
||||
it('should navigate to the travel logs', async() => {
|
||||
await page.accessToSection('travel.card.log');
|
||||
const result = await page.expectURL('/log');
|
||||
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
|
||||
it('should check the 1st log contains details from the changes made', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.travelLog.firstLogFirstTD, 'innerText');
|
||||
|
||||
expect(result).toContain('new reference!');
|
||||
});
|
||||
});
|
|
@ -0,0 +1,61 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Entry descriptor path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('buyer', 'entry');
|
||||
await page.accessToSearchResult('2');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should reach the second entry summary section', async() => {
|
||||
let url = await page.expectURL('#!/entry/2/summary');
|
||||
|
||||
expect(url).toBe(true);
|
||||
});
|
||||
|
||||
it('should show some entry information', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.entryDescriptor.agency, 'innerText');
|
||||
|
||||
expect(result).toContain('inhouse pickup');
|
||||
});
|
||||
|
||||
it('should click the travels button to be redirected to the travels index filtered by the current agency', async() => {
|
||||
await page.waitToClick(selectors.entryDescriptor.travelsQuicklink);
|
||||
const url = await page.expectURL('/travel/index');
|
||||
const filter = await page.expectURL('agencyFk');
|
||||
|
||||
expect(url).toBe(true);
|
||||
expect(filter).toBe(true);
|
||||
});
|
||||
|
||||
it('should go back to the entry summary', async() => {
|
||||
await page.waitToClick(selectors.globalItems.homeButton);
|
||||
await page.selectModule('entry');
|
||||
await page.accessToSearchResult('2');
|
||||
let url = await page.expectURL('#!/entry/2/summary');
|
||||
|
||||
expect(url).toBe(true);
|
||||
});
|
||||
|
||||
it('should click the entries button to be redirected to the entries index filtered by the current supplier', async() => {
|
||||
await page.waitToClick(selectors.entryDescriptor.entriesQuicklink);
|
||||
const url = await page.expectURL('/entry/index');
|
||||
const supplierFilter = await page.expectURL('supplierFk');
|
||||
const toFilter = await page.expectURL('to');
|
||||
const fromFilter = await page.expectURL('from');
|
||||
|
||||
expect(url).toBe(true);
|
||||
expect(supplierFilter).toBe(true);
|
||||
expect(toFilter).toBe(true);
|
||||
expect(fromFilter).toBe(true);
|
||||
});
|
||||
});
|
|
@ -67,6 +67,10 @@ module.exports = Self => {
|
|||
arg: 'problems',
|
||||
type: 'Boolean',
|
||||
description: `Whether to show only tickets with problems`
|
||||
}, {
|
||||
arg: 'pending',
|
||||
type: 'Boolean',
|
||||
description: `Whether to show only tickets with state 'Pending'`
|
||||
}, {
|
||||
arg: 'mine',
|
||||
type: 'Boolean',
|
||||
|
@ -130,7 +134,7 @@ module.exports = Self => {
|
|||
dateTo.setHours(23, 59, 0, 0);
|
||||
}
|
||||
|
||||
let where = buildFilter(ctx.args, (param, value) => {
|
||||
const where = buildFilter(ctx.args, (param, value) => {
|
||||
switch (param) {
|
||||
case 'search':
|
||||
return /^\d+$/.test(value)
|
||||
|
@ -155,6 +159,17 @@ module.exports = Self => {
|
|||
return {'c.salesPersonFk': {inq: teamIds}};
|
||||
case 'alertLevel':
|
||||
return {'ts.alertLevel': value};
|
||||
case 'pending':
|
||||
if (value) {
|
||||
return {and: [
|
||||
{'st.alertLevel': 0},
|
||||
{'st.code': {neq: 'OK'}}
|
||||
]};
|
||||
} else {
|
||||
return {and: [
|
||||
{'st.alertLevel': {gt: 0}}
|
||||
]};
|
||||
}
|
||||
case 'id':
|
||||
case 'clientFk':
|
||||
case 'agencyModeFk':
|
||||
|
@ -244,7 +259,6 @@ module.exports = Self => {
|
|||
LEFT JOIN tmp.ticketProblems tp ON tp.ticketFk = f.id
|
||||
LEFT JOIN tmp.ticketTotal tt ON tt.ticketFk = f.id`);
|
||||
|
||||
|
||||
let condition;
|
||||
let hasProblem;
|
||||
let range;
|
||||
|
|
|
@ -41,6 +41,34 @@ describe('ticket filter()', () => {
|
|||
const firstRow = result[0];
|
||||
|
||||
expect(result.length).toEqual(1);
|
||||
expect(firstRow.ticketFk).toEqual(11);
|
||||
expect(firstRow.id).toEqual(11);
|
||||
});
|
||||
|
||||
it('should return the tickets with grouped state "Pending" and not "Ok"', async() => {
|
||||
const ctx = {req: {accessToken: {userId: 9}}, args: {pending: true}};
|
||||
const filter = {};
|
||||
const result = await app.models.Ticket.filter(ctx, filter);
|
||||
const firstRow = result[0];
|
||||
const secondRow = result[1];
|
||||
const thirdRow = result[2];
|
||||
|
||||
expect(result.length).toEqual(3);
|
||||
expect(firstRow.state).toEqual('Arreglar');
|
||||
expect(secondRow.state).toEqual('Arreglar');
|
||||
expect(thirdRow.state).toEqual('Arreglar');
|
||||
});
|
||||
|
||||
it('should return the tickets that are not pending', async() => {
|
||||
const ctx = {req: {accessToken: {userId: 9}}, args: {pending: false}};
|
||||
const filter = {};
|
||||
const result = await app.models.Ticket.filter(ctx, filter);
|
||||
const firstRow = result[0];
|
||||
const secondRow = result[1];
|
||||
const thirdRow = result[2];
|
||||
|
||||
expect(result.length).toEqual(13);
|
||||
expect(firstRow.state).toEqual('Entregado');
|
||||
expect(secondRow.state).toEqual('Entregado');
|
||||
expect(thirdRow.state).toEqual('Entregado');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -113,10 +113,16 @@
|
|||
</vn-check>
|
||||
<vn-check
|
||||
vn-one
|
||||
label="Problems"
|
||||
label="With problems"
|
||||
ng-model="filter.problems"
|
||||
triple-state="true">
|
||||
</vn-check>
|
||||
<vn-check
|
||||
vn-one
|
||||
label="Pending"
|
||||
ng-model="filter.pending"
|
||||
triple-state="true">
|
||||
</vn-check>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal class="vn-mt-lg">
|
||||
<vn-submit label="Search"></vn-submit>
|
||||
|
|
|
@ -11,3 +11,5 @@ My team: Mi equipo
|
|||
Order id: Id pedido
|
||||
Grouped States: Estado agrupado
|
||||
Days onward: Días adelante
|
||||
With problems: Con problemas
|
||||
Pending: Pendientes
|
|
@ -157,6 +157,22 @@ table {
|
|||
border-spacing: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent page break fix
|
||||
*/
|
||||
tbody {
|
||||
page-break-inside: avoid;
|
||||
break-inside: avoid;
|
||||
display: block;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
thead, tbody tr {
|
||||
table-layout: fixed;
|
||||
display: table;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.row-oriented, .column-oriented {
|
||||
text-align: left;
|
||||
width: 100%
|
||||
|
@ -181,6 +197,10 @@ table {
|
|||
background-color: #e5e5e5
|
||||
}
|
||||
|
||||
.column-oriented tbody {
|
||||
border-bottom: 1px solid #DDD;
|
||||
}
|
||||
|
||||
.column-oriented tfoot {
|
||||
border-top: 2px solid #808080;
|
||||
}
|
||||
|
@ -190,7 +210,6 @@ table {
|
|||
}
|
||||
|
||||
.column-oriented .description {
|
||||
border-bottom: 1px solid #DDD;
|
||||
font-size: 0.8em
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
font-weight: bold
|
||||
}
|
||||
|
||||
.non-page-break {
|
||||
.no-page-break {
|
||||
page-break-inside: avoid;
|
||||
break-inside: avoid
|
||||
}
|
|
@ -59,37 +59,35 @@
|
|||
<tr>
|
||||
<th>{{$t('Code')}}</th>
|
||||
<th class="number">{{$t('Quantity')}}</th>
|
||||
<th>{{$t('Concept')}}</th>
|
||||
<th width="50%">{{$t('Concept')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="sale in sales">
|
||||
<tr class="font bold">
|
||||
<td>{{sale.itemFk}}</td>
|
||||
<td class="number">{{Math.trunc(sale.subtotal)}}</td>
|
||||
<td>{{sale.concept}}</td>
|
||||
</tr>
|
||||
<tr class="description">
|
||||
<td class="centered">
|
||||
<div v-if="sale.value5">
|
||||
<strong class="font gray">{{sale.tag5}}</strong>
|
||||
<span>{{sale.value5}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="centered">
|
||||
<div v-if="sale.value6">
|
||||
<strong class="font gray">{{sale.tag6}}</strong>
|
||||
<span>{{sale.value6}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="centered">
|
||||
<div v-if="sale.value7">
|
||||
<strong class="font gray">{{sale.tag7}}</strong>
|
||||
<span>{{sale.value7}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
<tbody v-for="sale in sales">
|
||||
<tr class="font bold">
|
||||
<td>{{sale.itemFk}}</td>
|
||||
<td class="number">{{Math.trunc(sale.subtotal)}}</td>
|
||||
<td width="50%">{{sale.concept}}</td>
|
||||
</tr>
|
||||
<tr class="description">
|
||||
<td>
|
||||
<div v-if="sale.value5">
|
||||
<strong class="font gray">{{sale.tag5}}</strong>
|
||||
<span>{{sale.value5}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="centered">
|
||||
<div v-if="sale.value6">
|
||||
<strong class="font gray">{{sale.tag6}}</strong>
|
||||
<span>{{sale.value6}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-right">
|
||||
<div v-if="sale.value7">
|
||||
<strong class="font gray">{{sale.tag7}}</strong>
|
||||
<span>{{sale.value7}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
<th>{{$t('concept')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="sale in sales" v-bind:key="sale.id">
|
||||
<tbody v-for="sale in sales" v-bind:key="sale.id">
|
||||
<tr>
|
||||
<td class="font gray">{{sale.id}}</td>
|
||||
<td class="number">{{sale.quantity}}</td>
|
||||
<td class="number">{{sale.claimQuantity}}</td>
|
||||
|
|
|
@ -76,53 +76,48 @@
|
|||
<tr>
|
||||
<td>{{$t('reference')}}</td>
|
||||
<td class="number">{{$t('quantity')}}</td>
|
||||
<td>{{$t('concept')}}</td>
|
||||
<td width="50%">{{$t('concept')}}</td>
|
||||
<td class="number">{{$t('price')}}</td>
|
||||
<td class="centered">{{$t('discount')}}</td>
|
||||
<td class="centered">{{$t('vat')}}</td>
|
||||
<td class="number">{{$t('amount')}}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="sale in sales">
|
||||
<tr class="font bold">
|
||||
<td>{{sale.itemFk}}</td>
|
||||
<td class="number">{{sale.quantity}}</td>
|
||||
<td>{{sale.concept}}</td>
|
||||
<td class="number">{{sale.price | currency('EUR', locale)}}</td>
|
||||
<td class="centered">{{sale.discount | percentage}}</td>
|
||||
<td class="centered">{{sale.vatType}}</td>
|
||||
<td class="number">{{sale.price * sale.quantity * (1 - sale.discount / 100) | currency('EUR', locale)}}</td>
|
||||
</tr>
|
||||
<tr class="description">
|
||||
<td colspan="2" class="centered">
|
||||
<div v-if="sale.value5">
|
||||
<strong class="font gray">{{sale.tag5}}</strong>
|
||||
<span>{{sale.value5}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="3" class="centered">
|
||||
<div v-if="sale.value6">
|
||||
<strong class="font gray">{{sale.tag6}}</strong>
|
||||
<span>{{sale.value6}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" class="centered">
|
||||
<div v-if="sale.value7">
|
||||
<strong class="font gray">{{sale.tag7}}</strong>
|
||||
<span>{{sale.value7}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="description phytosanitary" v-if="sale.passportNumber">
|
||||
<td colspan="7">
|
||||
{{sale.ediBotanic}} {{sale.denomination}} {{sale.countryCode}}-{{sale.passportNumber}}
|
||||
<span v-if="sale.isProtectedZone">ZP</span>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
<tr >
|
||||
<td colspan="7"></td>
|
||||
<tbody v-for="sale in sales">
|
||||
<tr class="font bold">
|
||||
<td>{{sale.itemFk}}</td>
|
||||
<td class="number">{{sale.quantity}}</td>
|
||||
<td width="50%">{{sale.concept}}</td>
|
||||
<td class="number">{{sale.price | currency('EUR', locale)}}</td>
|
||||
<td class="centered">{{(sale.discount / 100) | percentage}}</td>
|
||||
<td class="centered">{{sale.vatType}}</td>
|
||||
<td class="number">{{sale.price * sale.quantity * (1 - sale.discount / 100) | currency('EUR', locale)}}</td>
|
||||
</tr>
|
||||
<tr class="description">
|
||||
<td colspan="2" class="centered">
|
||||
<div v-if="sale.value5">
|
||||
<strong class="font gray">{{sale.tag5}}</strong>
|
||||
<span>{{sale.value5}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="3" class="centered">
|
||||
<div v-if="sale.value6">
|
||||
<strong class="font gray">{{sale.tag6}}</strong>
|
||||
<span>{{sale.value6}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" class="centered">
|
||||
<div v-if="sale.value7">
|
||||
<strong class="font gray">{{sale.tag7}}</strong>
|
||||
<span>{{sale.value7}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="description phytosanitary" v-if="sale.passportNumber">
|
||||
<td colspan="7">
|
||||
{{sale.ediBotanic}} {{sale.denomination}} {{sale.countryCode}}-{{sale.passportNumber}}
|
||||
<span v-if="sale.isProtectedZone">ZP</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
|
@ -138,7 +133,7 @@
|
|||
|
||||
<div class="columns">
|
||||
<!-- Services block-->
|
||||
<div class="size100" v-if="services.length > 0">
|
||||
<div class="size100 no-page-break" v-if="services.length > 0">
|
||||
<h3>{{$t('services')}}</h3>
|
||||
<table class="column-oriented">
|
||||
<thead>
|
||||
|
@ -168,29 +163,35 @@
|
|||
<!-- End of services block -->
|
||||
|
||||
<!-- Taxes block -->
|
||||
<div id="taxes" class="size50 pull-right" v-if="taxes">
|
||||
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
|
||||
<h3>{{$t('taxBreakdown')}}</h3>
|
||||
<table class="column-oriented">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{$t('type')}}</td>
|
||||
<td class="number">{{$t('taxBase')}}</td>
|
||||
<td width="45%">{{$t('type')}}</td>
|
||||
<td width="20%" class="number">
|
||||
{{$t('taxBase')}}
|
||||
</td>
|
||||
<td>{{$t('tax')}}</td>
|
||||
<td class="number">{{$t('fee')}}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="tax in taxes">
|
||||
<td>{{tax.name}}</td>
|
||||
<td class="number">{{tax.Base | currency('EUR', locale)}}</td>
|
||||
<td width="45%">{{tax.name}}</td>
|
||||
<td width="20%" class="number">
|
||||
{{tax.Base | currency('EUR', locale)}}
|
||||
</td>
|
||||
<td>{{tax.vatPercent | percentage}}</td>
|
||||
<td class="number">{{tax.tax | currency('EUR', locale)}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="font bold">
|
||||
<td>{{$t('subtotal')}}</td>
|
||||
<td class="number">{{getTotalBase() | currency('EUR', locale)}}</td>
|
||||
<td width="45%">{{$t('subtotal')}}</td>
|
||||
<td width="20%" class="number">
|
||||
{{getTotalBase() | currency('EUR', locale)}}
|
||||
</td>
|
||||
<td></td>
|
||||
<td class="number">{{getTotalTax()| currency('EUR', locale)}}</td>
|
||||
</tr>
|
||||
|
@ -204,7 +205,7 @@
|
|||
<!-- End of taxes block -->
|
||||
|
||||
<!-- Packages block -->
|
||||
<div id="packagings" class="size100" v-if="packagings.length > 0">
|
||||
<div id="packagings" class="size100 no-page-break" v-if="packagings.length > 0">
|
||||
<h3>{{$t('packagings')}}</h3>
|
||||
<table class="column-oriented">
|
||||
<thead>
|
||||
|
@ -226,7 +227,7 @@
|
|||
<!-- End of packages block -->
|
||||
|
||||
<!-- Signature block -->
|
||||
<div class="size50 pull-left">
|
||||
<div class="size50 pull-left no-page-break">
|
||||
<div id="signature" class="panel" v-if="signature && signature.id">
|
||||
<div class="header">{{$t('digitalSignature')}}</div>
|
||||
<div class="body centered">
|
||||
|
|
|
@ -84,14 +84,14 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="non-page-break" v-for="ticket in tickets">
|
||||
<div class="no-page-break" v-for="ticket in tickets">
|
||||
<div>
|
||||
<table class="column-oriented repeatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="number">{{$t('order')}}</td>
|
||||
<td class="number">{{$t('ticket')}}</td>
|
||||
<td>{{$t('client')}}</td>
|
||||
<td width="50%">{{$t('client')}}</td>
|
||||
<td class="number">{{$t('address')}}</td>
|
||||
<td class="number">{{$t('packages')}}</td>
|
||||
</tr>
|
||||
|
@ -100,7 +100,7 @@
|
|||
<tr>
|
||||
<td class="number">{{ticket.priority}}</td>
|
||||
<td class="number">{{ticket.id}}</td>
|
||||
<td>{{ticket.clientFk}} {{ticket.addressName}}</td>
|
||||
<td width="50%">{{ticket.clientFk}} {{ticket.addressName}}</td>
|
||||
<td v-if="ticket.addressFk" class="number">
|
||||
{{ticket.addressFk.toString().substr(0, ticket.addressFk.toString().length - 3)}}
|
||||
<span class="black-container">
|
||||
|
@ -141,7 +141,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th class="font gray align-right">{{$t('import')}}</th>
|
||||
<td>{{ticket.import}}</td>
|
||||
<td>{{ticket.import | currency('EUR', locale)}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -63,45 +63,43 @@
|
|||
<table class="column-oriented">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="number">{{$t('boxes')}}</td>
|
||||
<td>{{$t('boxes')}}</td>
|
||||
<td class="number">{{$t('packing')}}</td>
|
||||
<td>{{$t('concept')}}</td>
|
||||
<td width="50%">{{$t('concept')}}</td>
|
||||
<td class="number">{{$t('quantity')}}</td>
|
||||
<td class="number">{{$t('price')}}</td>
|
||||
<td class="number">{{$t('amount')}}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="buy in buys">
|
||||
<tr class="font bold">
|
||||
<td class="number">{{buy.box}}</td>
|
||||
<td class="number">{{buy.packing}}</td>
|
||||
<td>{{buy.itemName}}</td>
|
||||
<td class="number">{{buy.quantity}}</td>
|
||||
<td class="number">{{buy.buyingValue | currency('EUR', locale)}}</td>
|
||||
<td class="number">{{buy.buyingValue * buy.quantity | currency('EUR', locale)}}</td>
|
||||
</tr>
|
||||
<tr class="description">
|
||||
<td colspan="2" class="centered">
|
||||
<div v-if="buy.value5">
|
||||
<strong class="font gray">{{buy.tag5}}</strong>
|
||||
<span>{{buy.value5}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" class="centered">
|
||||
<div v-if="buy.value6">
|
||||
<strong class="font gray">{{buy.tag6}}</strong>
|
||||
<span>{{buy.value6}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" class="centered">
|
||||
<div v-if="buy.value7">
|
||||
<strong class="font gray">{{buy.tag7}}</strong>
|
||||
<span>{{buy.value7}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
<tbody v-for="buy in buys">
|
||||
<tr class="font bold">
|
||||
<td class="number">{{buy.box}}</td>
|
||||
<td class="number">{{buy.packing}}</td>
|
||||
<td width="50%">{{buy.itemName}}</td>
|
||||
<td class="number">{{buy.quantity}}</td>
|
||||
<td class="number">{{buy.buyingValue | currency('EUR', locale)}}</td>
|
||||
<td class="number">{{buy.buyingValue * buy.quantity | currency('EUR', locale)}}</td>
|
||||
</tr>
|
||||
<tr class="description">
|
||||
<td colspan="2">
|
||||
<div v-if="buy.value5">
|
||||
<strong class="font gray">{{buy.tag5}}</strong>
|
||||
<span>{{buy.value5}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" class="centered">
|
||||
<div v-if="buy.value6">
|
||||
<strong class="font gray">{{buy.tag6}}</strong>
|
||||
<span>{{buy.value6}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" class="align-right">
|
||||
<div v-if="buy.value7">
|
||||
<strong class="font gray">{{buy.tag7}}</strong>
|
||||
<span>{{buy.value7}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
|
@ -115,7 +113,7 @@
|
|||
<!-- End of buy block -->
|
||||
<div class="columns">
|
||||
<div class="size50">
|
||||
<div id="notes" class="panel" v-if="entry.notes">
|
||||
<div id="notes" class="panel no-page-break" v-if="entry.notes">
|
||||
<div class="body">
|
||||
<h3>{{$t('notes')}}</h3>
|
||||
<div>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<th>{{client.id}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font gray uppercase">{{$t('dated')}}</td>
|
||||
<td class="font gray uppercase">{{$t('date')}}</td>
|
||||
<th>{{dated}}</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -61,8 +61,8 @@
|
|||
<th class="number">{{$t('balance')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="sale in sales" :key="sale.id">
|
||||
<tbody v-for="sale in sales" :key="sale.id">
|
||||
<tr>
|
||||
<td>{{sale.issued | date('%d-%m-%Y')}}</td>
|
||||
<td>{{sale.ref}}</td>
|
||||
<td class="number">{{sale.debtOut}}</td>
|
||||
|
|
|
@ -2,7 +2,7 @@ title: Extracto
|
|||
claimId: Reclamación
|
||||
clientId: Cliente
|
||||
clientData: Datos del cliente
|
||||
dated: Fecha
|
||||
date: Fecha
|
||||
concept: Concepto
|
||||
invoiced: Facturado
|
||||
payed: Pagado
|
||||
|
|
Loading…
Reference in New Issue