Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
This commit is contained in:
commit
432085c301
|
@ -80,7 +80,6 @@ export default {
|
||||||
receivedCoreVNLCheckbox: `vn-check[label='Received core VNL'] > label > input`,
|
receivedCoreVNLCheckbox: `vn-check[label='Received core VNL'] > label > input`,
|
||||||
receivedB2BVNLCheckbox: `vn-check[label='Received B2B VNL'] > label > input`,
|
receivedB2BVNLCheckbox: `vn-check[label='Received B2B VNL'] > label > input`,
|
||||||
swiftBicAutocomplete: 'vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"]',
|
swiftBicAutocomplete: 'vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"]',
|
||||||
firstSwiftBicOption: `vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"] vn-drop-down ul > li:nth-child(1)`,
|
|
||||||
clearswiftBicButton: `vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"] > div > div > div > vn-icon > i`,
|
clearswiftBicButton: `vn-client-billing-data vn-autocomplete[field="$ctrl.client.bankEntityFk"] > div > div > div > vn-icon > i`,
|
||||||
newBankEntityButton: 'vn-client-billing-data vn-icon-button[vn-tooltip="New bank entity"] > button',
|
newBankEntityButton: 'vn-client-billing-data vn-icon-button[vn-tooltip="New bank entity"] > button',
|
||||||
newBankEntityName: 'vn-client-billing-data > vn-dialog vn-textfield[label="Name"] input',
|
newBankEntityName: 'vn-client-billing-data > vn-dialog vn-textfield[label="Name"] input',
|
||||||
|
@ -208,22 +207,16 @@ export default {
|
||||||
itemTags: {
|
itemTags: {
|
||||||
goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]',
|
goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]',
|
||||||
tagsButton: `vn-left-menu a[ui-sref="item.card.tags"]`,
|
tagsButton: `vn-left-menu a[ui-sref="item.card.tags"]`,
|
||||||
firstRemoveTagButton: `vn-item-tags vn-horizontal:nth-child(2) vn-icon-button[icon="delete"]`,
|
|
||||||
firstTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(2) > vn-autocomplete[field="itemTag.tagFk"]`,
|
|
||||||
firstValueInput: `vn-item-tags vn-horizontal:nth-child(2) > vn-textfield[label="Value"] input`,
|
|
||||||
firstRelevancyInput: `vn-horizontal:nth-child(2) > vn-textfield[label="Relevancy"] input`,
|
|
||||||
secondTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(3) > vn-autocomplete[field="itemTag.tagFk"]`,
|
|
||||||
secondValueInput: `vn-item-tags vn-horizontal:nth-child(3) > vn-textfield[label="Value"] input`,
|
|
||||||
secondRelevancyInput: `vn-horizontal:nth-child(3) > vn-textfield[label="Relevancy"] input`,
|
|
||||||
thirdTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(4) > vn-autocomplete[field="itemTag.tagFk"]`,
|
|
||||||
thirdValueInput: `vn-item-tags vn-horizontal:nth-child(4) > vn-textfield[label="Value"] input`,
|
|
||||||
thirdRelevancyInput: `vn-horizontal:nth-child(4) > vn-textfield[label="Relevancy"] input`,
|
|
||||||
fourthTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(5) > vn-autocomplete[field="itemTag.tagFk"]`,
|
fourthTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(5) > vn-autocomplete[field="itemTag.tagFk"]`,
|
||||||
fourthValueInput: `vn-item-tags vn-horizontal:nth-child(5) > vn-textfield[label="Value"] input`,
|
fourthValueInput: `vn-item-tags vn-horizontal:nth-child(5) > vn-textfield[label="Value"] input`,
|
||||||
fourthRelevancyInput: `vn-horizontal:nth-child(5) > vn-textfield[label="Relevancy"] input`,
|
fourthRelevancyInput: `vn-horizontal:nth-child(5) > vn-textfield[label="Relevancy"] input`,
|
||||||
|
fourthRemoveTagButton: `vn-item-tags vn-horizontal:nth-child(5) vn-icon-button[icon="delete"]`,
|
||||||
fifthTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(6) > vn-autocomplete[field="itemTag.tagFk"]`,
|
fifthTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(6) > vn-autocomplete[field="itemTag.tagFk"]`,
|
||||||
fifthValueInput: `vn-item-tags vn-horizontal:nth-child(6) > vn-textfield[label="Value"] input`,
|
fifthValueInput: `vn-item-tags vn-horizontal:nth-child(6) > vn-textfield[label="Value"] input`,
|
||||||
fifthRelevancyInput: `vn-horizontal:nth-child(6) > vn-textfield[label="Relevancy"] input`,
|
fifthRelevancyInput: `vn-horizontal:nth-child(6) > vn-textfield[label="Relevancy"] input`,
|
||||||
|
sixthTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(7) > vn-autocomplete[field="itemTag.tagFk"]`,
|
||||||
|
sixthValueInput: `vn-item-tags vn-horizontal:nth-child(7) > vn-textfield[label="Value"] input`,
|
||||||
|
sixthRelevancyInput: `vn-horizontal:nth-child(7) > vn-textfield[label="Relevancy"] input`,
|
||||||
seventhTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(8) > vn-autocomplete[field="itemTag.tagFk"]`,
|
seventhTagAutocomplete: `vn-item-tags vn-horizontal:nth-child(8) > vn-autocomplete[field="itemTag.tagFk"]`,
|
||||||
seventhValueInput: `vn-item-tags vn-horizontal:nth-child(8) > vn-textfield[label="Value"] input`,
|
seventhValueInput: `vn-item-tags vn-horizontal:nth-child(8) > vn-textfield[label="Value"] input`,
|
||||||
seventhRelevancyInput: `vn-horizontal:nth-child(8) > vn-textfield[label="Relevancy"] input`,
|
seventhRelevancyInput: `vn-horizontal:nth-child(8) > vn-textfield[label="Relevancy"] input`,
|
||||||
|
@ -346,7 +339,7 @@ export default {
|
||||||
firstSaleDiscountInput: 'vn-ticket-sale:nth-child(1) vn-ticket-sale-edit-discount > div > vn-textfield > div > div > div.infix > input.ng-not-empty',
|
firstSaleDiscountInput: 'vn-ticket-sale:nth-child(1) vn-ticket-sale-edit-discount > div > vn-textfield > div > div > div.infix > input.ng-not-empty',
|
||||||
firstSaleImport: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(9)',
|
firstSaleImport: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(9)',
|
||||||
firstSaleReservedIcon: 'vn-ticket-sale vn-tr:nth-child(1) > vn-td:nth-child(2) > vn-icon:nth-child(3)',
|
firstSaleReservedIcon: 'vn-ticket-sale vn-tr:nth-child(1) > vn-td:nth-child(2) > vn-icon:nth-child(3)',
|
||||||
firstSaleColour: `vn-ticket-sale vn-tr:nth-child(1) vn-td:nth-child(5) section:nth-child(5)`,
|
firstSaleColour: `vn-ticket-sale vn-tr:nth-child(1) vn-td:nth-child(5) section:nth-child(1)`,
|
||||||
firstSaleLength: `vn-ticket-sale vn-tr:nth-child(1) vn-td:nth-child(5) section:nth-child(3)`,
|
firstSaleLength: `vn-ticket-sale vn-tr:nth-child(1) vn-td:nth-child(5) section:nth-child(3)`,
|
||||||
firstSaleCheckbox: `vn-ticket-sale vn-tr:nth-child(1) vn-check[field="sale.checked"] label`,
|
firstSaleCheckbox: `vn-ticket-sale vn-tr:nth-child(1) vn-check[field="sale.checked"] label`,
|
||||||
secondSaleClaimId: 'vn-ticket-sale > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(2) > a > vn-icon',
|
secondSaleClaimId: 'vn-ticket-sale > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(2) > a > vn-icon',
|
||||||
|
|
|
@ -90,7 +90,7 @@ describe('Client Edit fiscalData path', () => {
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
expect(result).toEqual('Cannot check VIES and Equalization Tax');
|
expect(result).toEqual('Cannot check VIES and Equalization Tax');
|
||||||
});
|
}, 15000);
|
||||||
|
|
||||||
it('should receive an error if the fiscal id contains A or B at the beginning', async() => {
|
it('should receive an error if the fiscal id contains A or B at the beginning', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
|
|
|
@ -9,10 +9,10 @@ describe('Item summary path', () => {
|
||||||
.loginAndModule('employee', 'item');
|
.loginAndModule('employee', 'item');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should search for the item Gem of Time', async () => {
|
it('should search for an item', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.wait(selectors.itemsIndex.searchItemInput)
|
.wait(selectors.itemsIndex.searchItemInput)
|
||||||
.type(selectors.itemsIndex.searchItemInput, 'Gem of Time')
|
.type(selectors.itemsIndex.searchItemInput, 'Object1 Gem1 5')
|
||||||
.click(selectors.itemsIndex.searchButton)
|
.click(selectors.itemsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||||
.countElement(selectors.itemsIndex.searchResult);
|
.countElement(selectors.itemsIndex.searchResult);
|
||||||
|
@ -20,9 +20,9 @@ describe('Item summary path', () => {
|
||||||
expect(result).toEqual(1);
|
expect(result).toEqual(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click on the search result summary button to open the item summary popup`, async () => {
|
it(`should click on the search result summary button to open the item summary popup`, async() => {
|
||||||
const isVisibleBefore = await nightmare
|
const isVisibleBefore = await nightmare
|
||||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Gem of Time')
|
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Object1 Gem1 5')
|
||||||
.isVisible(selectors.itemSummary.basicData);
|
.isVisible(selectors.itemSummary.basicData);
|
||||||
|
|
||||||
const isVisibleAfter = await nightmare
|
const isVisibleAfter = await nightmare
|
||||||
|
@ -33,15 +33,15 @@ describe('Item summary path', () => {
|
||||||
expect(isVisibleAfter).toBeTruthy();
|
expect(isVisibleAfter).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary preview shows fields from basic data`, async () => {
|
it(`should check the item summary preview shows fields from basic data`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.basicData, 'Name: Gem of Time')
|
.waitForTextInElement(selectors.itemSummary.basicData, 'Name: Object1 Gem1 5')
|
||||||
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('Name: Gem of Time');
|
expect(result).toContain('Name: Object1 Gem1 5');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary preview shows fields from tags`, async () => {
|
it(`should check the item summary preview shows fields from tags`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.tags, 'Color: Yellow')
|
.waitForTextInElement(selectors.itemSummary.tags, 'Color: Yellow')
|
||||||
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
||||||
|
@ -49,7 +49,7 @@ describe('Item summary path', () => {
|
||||||
expect(result).toContain('Color: Yellow');
|
expect(result).toContain('Color: Yellow');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary preview shows fields from niche`, async () => {
|
it(`should check the item summary preview shows fields from niche`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.niche, 'Warehouse One: A1')
|
.waitForTextInElement(selectors.itemSummary.niche, 'Warehouse One: A1')
|
||||||
.waitToGetProperty(selectors.itemSummary.niche, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.niche, 'innerText');
|
||||||
|
@ -57,7 +57,7 @@ describe('Item summary path', () => {
|
||||||
expect(result).toContain('Warehouse One: A1');
|
expect(result).toContain('Warehouse One: A1');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary preview shows fields from botanical`, async () => {
|
it(`should check the item summary preview shows fields from botanical`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.botanical, 'Botanical: Hedera helix')
|
.waitForTextInElement(selectors.itemSummary.botanical, 'Botanical: Hedera helix')
|
||||||
.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
|
||||||
|
@ -65,7 +65,7 @@ describe('Item summary path', () => {
|
||||||
expect(result).toContain('Botanical: Hedera helix');
|
expect(result).toContain('Botanical: Hedera helix');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary preview shows fields from barcode`, async () => {
|
it(`should check the item summary preview shows fields from barcode`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.barcode, '1')
|
.waitForTextInElement(selectors.itemSummary.barcode, '1')
|
||||||
.waitToGetProperty(selectors.itemSummary.barcode, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.barcode, 'innerText');
|
||||||
|
@ -73,7 +73,7 @@ describe('Item summary path', () => {
|
||||||
expect(result).toContain('1');
|
expect(result).toContain('1');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should close the summary popup`, async () => {
|
it(`should close the summary popup`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.itemsIndex.closeItemSummaryPreview)
|
.waitToClick(selectors.itemsIndex.closeItemSummaryPreview)
|
||||||
.isVisible(selectors.itemSummary.basicData);
|
.isVisible(selectors.itemSummary.basicData);
|
||||||
|
@ -81,11 +81,11 @@ describe('Item summary path', () => {
|
||||||
expect(result).toBeFalsy();
|
expect(result).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should search for the item Gem of Mind', async () => {
|
it('should search for other item', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.clearInput('body > vn-app > vn-vertical > vn-vertical > ui-view > vn-item-index > div > div > vn-card:nth-child(1) > div > vn-searchbar > form > vn-horizontal > vn-textfield > div > div > div.infix > input')
|
.clearInput('body > vn-app > vn-vertical > vn-vertical > ui-view > vn-item-index > div > div > vn-card:nth-child(1) > div > vn-searchbar > form > vn-horizontal > vn-textfield > div > div > div.infix > input')
|
||||||
.click(selectors.itemsIndex.searchButton)
|
.click(selectors.itemsIndex.searchButton)
|
||||||
.type(selectors.itemsIndex.searchItemInput, 'Gem of Mind')
|
.type(selectors.itemsIndex.searchItemInput, 'Object2 Gem2 3')
|
||||||
.click(selectors.itemsIndex.searchButton)
|
.click(selectors.itemsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||||
.countElement(selectors.itemsIndex.searchResult);
|
.countElement(selectors.itemsIndex.searchResult);
|
||||||
|
@ -93,9 +93,9 @@ describe('Item summary path', () => {
|
||||||
expect(result).toEqual(1);
|
expect(result).toEqual(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should now click on the search result summary button to open the item summary popup`, async () => {
|
it(`should now click on the search result summary button to open the item summary popup`, async() => {
|
||||||
const isVisibleBefore = await nightmare
|
const isVisibleBefore = await nightmare
|
||||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Gem of Mind')
|
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Object2 Gem2 3')
|
||||||
.isVisible(selectors.itemSummary.basicData);
|
.isVisible(selectors.itemSummary.basicData);
|
||||||
|
|
||||||
const isVisibleAfter = await nightmare
|
const isVisibleAfter = await nightmare
|
||||||
|
@ -107,15 +107,15 @@ describe('Item summary path', () => {
|
||||||
expect(isVisibleAfter).toBeTruthy();
|
expect(isVisibleAfter).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should now check the item summary preview shows fields from basic data`, async () => {
|
it(`should now check the item summary preview shows fields from basic data`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.basicData, 'Name: Gem of Mind')
|
.waitForTextInElement(selectors.itemSummary.basicData, 'Name: Object2 Gem2 3')
|
||||||
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('Name: Gem of Mind');
|
expect(result).toContain('Name: Object2 Gem2 3');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should now check the item summary preview shows fields from tags`, async () => {
|
it(`should now check the item summary preview shows fields from tags`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.tags, 'Color: Red')
|
.waitForTextInElement(selectors.itemSummary.tags, 'Color: Red')
|
||||||
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
||||||
|
@ -123,7 +123,7 @@ describe('Item summary path', () => {
|
||||||
expect(result).toContain('Color: Red');
|
expect(result).toContain('Color: Red');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should now check the item summary preview shows fields from niche`, async () => {
|
it(`should now check the item summary preview shows fields from niche`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.niche, 'Warehouse One: A4')
|
.waitForTextInElement(selectors.itemSummary.niche, 'Warehouse One: A4')
|
||||||
.waitToGetProperty(selectors.itemSummary.niche, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.niche, 'innerText');
|
||||||
|
@ -131,7 +131,7 @@ describe('Item summary path', () => {
|
||||||
expect(result).toContain('Warehouse One: A4');
|
expect(result).toContain('Warehouse One: A4');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should now check the item summary preview shows fields from botanical`, async () => {
|
it(`should now check the item summary preview shows fields from botanical`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.botanical, 'Botanical: -')
|
.waitForTextInElement(selectors.itemSummary.botanical, 'Botanical: -')
|
||||||
.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
|
||||||
|
@ -139,7 +139,7 @@ describe('Item summary path', () => {
|
||||||
expect(result).toContain('Botanical: -');
|
expect(result).toContain('Botanical: -');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should now check the item summary preview shows fields from barcode`, async () => {
|
it(`should now check the item summary preview shows fields from barcode`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.barcode, '4')
|
.waitForTextInElement(selectors.itemSummary.barcode, '4')
|
||||||
.waitToGetProperty(selectors.itemSummary.barcode, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.barcode, 'innerText');
|
||||||
|
@ -147,7 +147,7 @@ describe('Item summary path', () => {
|
||||||
expect(result).toContain('4');
|
expect(result).toContain('4');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should now close the summary popup`, async () => {
|
it(`should now close the summary popup`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.itemsIndex.closeItemSummaryPreview)
|
.waitToClick(selectors.itemsIndex.closeItemSummaryPreview)
|
||||||
.isVisible(selectors.itemSummary.basicData);
|
.isVisible(selectors.itemSummary.basicData);
|
||||||
|
@ -155,7 +155,7 @@ describe('Item summary path', () => {
|
||||||
expect(result).toBeFalsy();
|
expect(result).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should navigate to the one of the items detailed section`, async () => {
|
it(`should navigate to the one of the items detailed section`, async() => {
|
||||||
const url = await nightmare
|
const url = await nightmare
|
||||||
.waitToClick(selectors.itemsIndex.searchResult)
|
.waitToClick(selectors.itemsIndex.searchResult)
|
||||||
.waitForURL('summary')
|
.waitForURL('summary')
|
||||||
|
@ -164,36 +164,36 @@ describe('Item summary path', () => {
|
||||||
expect(url.hash).toContain('summary');
|
expect(url.hash).toContain('summary');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary shows fields from basic data section`, async () => {
|
it(`should check the item summary shows fields from basic data section`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInElement(selectors.itemSummary.basicData, 'Name: Gem of Mind')
|
.waitForTextInElement(selectors.itemSummary.basicData, 'Name: Object2 Gem2 3')
|
||||||
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('Name: Gem of Mind');
|
expect(result).toContain('Name: Object2 Gem2 3');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary shows fields from tags section`, async () => {
|
it(`should check the item summary shows fields from tags section`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('Color: Red');
|
expect(result).toContain('Color: Red');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary shows fields from niches section`, async () => {
|
it(`should check the item summary shows fields from niches section`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemSummary.niche, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.niche, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('Warehouse One: A4');
|
expect(result).toContain('Warehouse One: A4');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary shows fields from botanical section`, async () => {
|
it(`should check the item summary shows fields from botanical section`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('Botanical: -');
|
expect(result).toContain('Botanical: -');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should check the item summary shows fields from barcodes section`, async () => {
|
it(`should check the item summary shows fields from barcodes section`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemSummary.barcode, 'innerText');
|
.waitToGetProperty(selectors.itemSummary.barcode, 'innerText');
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ describe('Item Edit basic data path', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
nightmare
|
nightmare
|
||||||
.loginAndModule('buyer', 'item')
|
.loginAndModule('buyer', 'item')
|
||||||
.accessToSearchResult('Gem of Mind')
|
.accessToSearchResult('Object2 Gem2 3')
|
||||||
.accessToSection('item.card.data');
|
.accessToSection('item.card.data');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ describe('Item edit tax path', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
nightmare
|
nightmare
|
||||||
.loginAndModule('buyer', 'item')
|
.loginAndModule('buyer', 'item')
|
||||||
.accessToSearchResult('Gem of Time')
|
.accessToSearchResult('Object1 Gem1 5')
|
||||||
.accessToSection('item.card.tax');
|
.accessToSection('item.card.tax');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,88 +7,43 @@ describe('Item create tags path', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
nightmare
|
nightmare
|
||||||
.loginAndModule('buyer', 'item')
|
.loginAndModule('buyer', 'item')
|
||||||
.accessToSearchResult('Gem of Time')
|
.accessToSearchResult('Object1 Gem1 5')
|
||||||
.accessToSection('item.card.tags');
|
.accessToSection('item.card.tags');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should create a new tag and delete a former one`, async() => {
|
it(`should create a new tag and delete a former one`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.itemTags.firstRemoveTagButton)
|
.waitToClick(selectors.itemTags.fourthRemoveTagButton)
|
||||||
.waitToClick(selectors.itemTags.addItemTagButton)
|
.waitToClick(selectors.itemTags.addItemTagButton)
|
||||||
.autocompleteSearch(selectors.itemTags.seventhTagAutocomplete, 'Ancho de la base')
|
.autocompleteSearch(selectors.itemTags.seventhTagAutocomplete, 'Ancho de la base')
|
||||||
.type(selectors.itemTags.seventhValueInput, '50')
|
.type(selectors.itemTags.seventhValueInput, '50')
|
||||||
.clearInput(selectors.itemTags.seventhRelevancyInput)
|
.clearInput(selectors.itemTags.seventhRelevancyInput)
|
||||||
.type(selectors.itemTags.seventhRelevancyInput, '1')
|
.type(selectors.itemTags.seventhRelevancyInput, '4')
|
||||||
.click(selectors.itemTags.submitItemTagsButton)
|
.click(selectors.itemTags.submitItemTagsButton)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the first row data is the expected one`, async() => {
|
it(`should confirm the fourth row data is the expected one`, async() => {
|
||||||
let result = await nightmare
|
let result = await nightmare
|
||||||
.click(selectors.itemBasicData.basicDataButton)
|
.click(selectors.itemBasicData.basicDataButton)
|
||||||
.wait(selectors.itemBasicData.nameInput)
|
.wait(selectors.itemBasicData.nameInput)
|
||||||
.click(selectors.itemTags.tagsButton)
|
.click(selectors.itemTags.tagsButton)
|
||||||
.wait('vn-item-tags')
|
.wait('vn-item-tags')
|
||||||
.waitToGetProperty(`${selectors.itemTags.firstTagAutocomplete} input`, 'value');
|
.waitToGetProperty(`${selectors.itemTags.fourthTagAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Ancho de la base');
|
expect(result).toEqual('Ancho de la base');
|
||||||
|
|
||||||
result = await nightmare
|
result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemTags.firstValueInput, 'value');
|
.waitToGetProperty(selectors.itemTags.fourthValueInput, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('50');
|
expect(result).toEqual('50');
|
||||||
|
|
||||||
result = await nightmare
|
result = await nightmare
|
||||||
.waitToGetProperty(selectors.itemTags.firstRelevancyInput, 'value');
|
|
||||||
|
|
||||||
expect(result).toEqual('1');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should confirm the second row data is the expected one`, async() => {
|
|
||||||
let tag = await nightmare
|
|
||||||
.waitToGetProperty(`${selectors.itemTags.secondTagAutocomplete} input`, 'value');
|
|
||||||
|
|
||||||
let value = await nightmare
|
|
||||||
.waitToGetProperty(selectors.itemTags.secondValueInput, 'value');
|
|
||||||
|
|
||||||
let relevancy = await nightmare
|
|
||||||
.waitToGetProperty(selectors.itemTags.secondRelevancyInput, 'value');
|
|
||||||
|
|
||||||
expect(tag).toEqual('Variedad');
|
|
||||||
expect(value).toEqual('Gem1');
|
|
||||||
expect(relevancy).toEqual('2');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should confirm the third row data is the expected one`, async() => {
|
|
||||||
let tag = await nightmare
|
|
||||||
.waitToGetProperty(`${selectors.itemTags.thirdTagAutocomplete} input`, 'value');
|
|
||||||
|
|
||||||
let value = await nightmare
|
|
||||||
.waitToGetProperty(selectors.itemTags.thirdValueInput, 'value');
|
|
||||||
|
|
||||||
let relevancy = await nightmare
|
|
||||||
.waitToGetProperty(selectors.itemTags.thirdRelevancyInput, 'value');
|
|
||||||
|
|
||||||
expect(tag).toEqual('Longitud(cm)');
|
|
||||||
expect(value).toEqual('5');
|
|
||||||
expect(relevancy).toEqual('3');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should confirm the fourth row data is the expected one`, async() => {
|
|
||||||
let tag = await nightmare
|
|
||||||
.waitToGetProperty(`${selectors.itemTags.fourthTagAutocomplete} input`, 'value');
|
|
||||||
|
|
||||||
let value = await nightmare
|
|
||||||
.waitToGetProperty(selectors.itemTags.fourthValueInput, 'value');
|
|
||||||
|
|
||||||
let relevancy = await nightmare
|
|
||||||
.waitToGetProperty(selectors.itemTags.fourthRelevancyInput, 'value');
|
.waitToGetProperty(selectors.itemTags.fourthRelevancyInput, 'value');
|
||||||
|
|
||||||
expect(tag).toEqual('Proveedor');
|
expect(result).toEqual('4');
|
||||||
expect(value).toEqual('Marvel1');
|
|
||||||
expect(relevancy).toEqual('4');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the fifth row data is the expected one`, async() => {
|
it(`should confirm the fifth row data is the expected one`, async() => {
|
||||||
|
@ -105,4 +60,19 @@ describe('Item create tags path', () => {
|
||||||
expect(value).toEqual('Yellow');
|
expect(value).toEqual('Yellow');
|
||||||
expect(relevancy).toEqual('5');
|
expect(relevancy).toEqual('5');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it(`should confirm the sixth row data is the expected one`, async() => {
|
||||||
|
let tag = await nightmare
|
||||||
|
.waitToGetProperty(`${selectors.itemTags.sixthTagAutocomplete} input`, 'value');
|
||||||
|
|
||||||
|
let value = await nightmare
|
||||||
|
.waitToGetProperty(selectors.itemTags.sixthValueInput, 'value');
|
||||||
|
|
||||||
|
let relevancy = await nightmare
|
||||||
|
.waitToGetProperty(selectors.itemTags.sixthRelevancyInput, 'value');
|
||||||
|
|
||||||
|
expect(tag).toEqual('Categoria');
|
||||||
|
expect(value).toEqual('A1');
|
||||||
|
expect(relevancy).toEqual('6');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,7 +7,7 @@ describe('Item create niche path', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
nightmare
|
nightmare
|
||||||
.loginAndModule('buyer', 'item')
|
.loginAndModule('buyer', 'item')
|
||||||
.accessToSearchResult('Gem of Time')
|
.accessToSearchResult('Object1 Gem1 5')
|
||||||
.accessToSection('item.card.niche');
|
.accessToSection('item.card.niche');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,11 @@ describe('Item Create botanical path', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
nightmare
|
nightmare
|
||||||
.loginAndModule('buyer', 'item')
|
.loginAndModule('buyer', 'item')
|
||||||
.accessToSearchResult('Mjolnir')
|
.accessToSearchResult('Object5 Weapon 50')
|
||||||
.accessToSection('item.card.botanical');
|
.accessToSection('item.card.botanical');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should create a new botanical for the item Mjolnir`, async() => {
|
it(`should create a new botanical for the item`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.wait(selectors.itemBotanical.botanicalInput)
|
.wait(selectors.itemBotanical.botanicalInput)
|
||||||
.type(selectors.itemBotanical.botanicalInput, 'Cicuta maculata')
|
.type(selectors.itemBotanical.botanicalInput, 'Cicuta maculata')
|
||||||
|
@ -23,7 +23,7 @@ describe('Item Create botanical path', () => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the botanical for item Mjolnir was created`, async() => {
|
it(`should confirm the botanical for the item was created`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.click(selectors.itemBasicData.basicDataButton)
|
.click(selectors.itemBasicData.basicDataButton)
|
||||||
.wait(selectors.itemBasicData.nameInput)
|
.wait(selectors.itemBasicData.nameInput)
|
||||||
|
@ -34,7 +34,7 @@ describe('Item Create botanical path', () => {
|
||||||
expect(result).toEqual('Cicuta maculata');
|
expect(result).toEqual('Cicuta maculata');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the Genus for item Mjolnir was created`, async() => {
|
it(`should confirm the Genus for the item was created`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInInput(`${selectors.itemBotanical.genusAutocomplete} input`, 'Abelia')
|
.waitForTextInInput(`${selectors.itemBotanical.genusAutocomplete} input`, 'Abelia')
|
||||||
.waitToGetProperty(`${selectors.itemBotanical.genusAutocomplete} input`, 'value');
|
.waitToGetProperty(`${selectors.itemBotanical.genusAutocomplete} input`, 'value');
|
||||||
|
@ -42,14 +42,14 @@ describe('Item Create botanical path', () => {
|
||||||
expect(result).toEqual('Abelia');
|
expect(result).toEqual('Abelia');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the Species for item Mjolnir was created`, async() => {
|
it(`should confirm the Species for the item was created`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(`${selectors.itemBotanical.speciesAutocomplete} input`, 'value');
|
.waitToGetProperty(`${selectors.itemBotanical.speciesAutocomplete} input`, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('dealbata');
|
expect(result).toEqual('dealbata');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should edit botanical for the item Mjolnir`, async() => {
|
it(`should edit botanical for the item`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.clearInput(selectors.itemBotanical.botanicalInput)
|
.clearInput(selectors.itemBotanical.botanicalInput)
|
||||||
.type(selectors.itemBotanical.botanicalInput, 'Herp Derp')
|
.type(selectors.itemBotanical.botanicalInput, 'Herp Derp')
|
||||||
|
@ -61,7 +61,7 @@ describe('Item Create botanical path', () => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the botanical for item Mjolnir was edited`, async() => {
|
it(`should confirm the botanical for the item was edited`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.click(selectors.itemBasicData.basicDataButton)
|
.click(selectors.itemBasicData.basicDataButton)
|
||||||
.wait(selectors.itemBasicData.nameInput)
|
.wait(selectors.itemBasicData.nameInput)
|
||||||
|
@ -72,7 +72,7 @@ describe('Item Create botanical path', () => {
|
||||||
expect(result).toEqual('Herp Derp');
|
expect(result).toEqual('Herp Derp');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the Genus for item Mjolnir was edited`, async() => {
|
it(`should confirm the Genus for the item was edited`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitForTextInInput(`${selectors.itemBotanical.genusAutocomplete} input`, 'Abies')
|
.waitForTextInInput(`${selectors.itemBotanical.genusAutocomplete} input`, 'Abies')
|
||||||
.waitToGetProperty(`${selectors.itemBotanical.genusAutocomplete} input`, 'value');
|
.waitToGetProperty(`${selectors.itemBotanical.genusAutocomplete} input`, 'value');
|
||||||
|
@ -80,7 +80,7 @@ describe('Item Create botanical path', () => {
|
||||||
expect(result).toEqual('Abies');
|
expect(result).toEqual('Abies');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the Species for item Mjolnir was edited`, async() => {
|
it(`should confirm the Species for the item was edited`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(`${selectors.itemBotanical.speciesAutocomplete} input`, 'value');
|
.waitToGetProperty(`${selectors.itemBotanical.speciesAutocomplete} input`, 'value');
|
||||||
|
|
||||||
|
|
|
@ -7,11 +7,11 @@ describe('Item Create barcodes path', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
nightmare
|
nightmare
|
||||||
.loginAndModule('buyer', 'item')
|
.loginAndModule('buyer', 'item')
|
||||||
.accessToSearchResult('Gem of Time')
|
.accessToSearchResult('Object1 Gem1 5')
|
||||||
.accessToSection('item.card.itemBarcode');
|
.accessToSection('item.card.itemBarcode');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click create a new code and delete a former one`, async () => {
|
it(`should click create a new code and delete a former one`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.itemBarcodes.firstCodeRemoveButton)
|
.waitToClick(selectors.itemBarcodes.firstCodeRemoveButton)
|
||||||
.waitToClick(selectors.itemBarcodes.addBarcodeButton)
|
.waitToClick(selectors.itemBarcodes.addBarcodeButton)
|
||||||
|
@ -23,7 +23,7 @@ describe('Item Create barcodes path', () => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should confirm the barcode 5 is created and it is now the third barcode as the first was deleted`, async () => {
|
it(`should confirm the barcode 5 is created and it is now the third barcode as the first was deleted`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.click(selectors.itemBasicData.basicDataButton)
|
.click(selectors.itemBasicData.basicDataButton)
|
||||||
.wait(selectors.itemBasicData.nameInput)
|
.wait(selectors.itemBasicData.nameInput)
|
||||||
|
|
|
@ -8,10 +8,10 @@ describe('Item regularize path', () => {
|
||||||
.loginAndModule('employee', 'item');
|
.loginAndModule('employee', 'item');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should search for the item Mjolnir', async() => {
|
it('should search for the item', async() => {
|
||||||
const resultCount = await nightmare
|
const resultCount = await nightmare
|
||||||
.wait(selectors.itemsIndex.searchItemInput)
|
.wait(selectors.itemsIndex.searchItemInput)
|
||||||
.type(selectors.itemsIndex.searchItemInput, 'Mjolnir')
|
.type(selectors.itemsIndex.searchItemInput, 'Object5 Weapon 50')
|
||||||
.click(selectors.itemsIndex.searchButton)
|
.click(selectors.itemsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||||
.countElement(selectors.itemsIndex.searchResult);
|
.countElement(selectors.itemsIndex.searchResult);
|
||||||
|
@ -21,7 +21,7 @@ describe('Item regularize path', () => {
|
||||||
|
|
||||||
it(`should click on the search result to access to the item tax`, async() => {
|
it(`should click on the search result to access to the item tax`, async() => {
|
||||||
const url = await nightmare
|
const url = await nightmare
|
||||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Mjolnir')
|
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Object5 Weapon 50')
|
||||||
.waitToClick(selectors.itemsIndex.searchResult)
|
.waitToClick(selectors.itemsIndex.searchResult)
|
||||||
.waitForURL('/summary')
|
.waitForURL('/summary')
|
||||||
.parsedUrl();
|
.parsedUrl();
|
||||||
|
@ -100,10 +100,10 @@ describe('Item regularize path', () => {
|
||||||
expect(url.hash).toEqual('#!/item/index');
|
expect(url.hash).toEqual('#!/item/index');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should search for the item Mjolnir once again', async() => {
|
it('should search for the item once again', async() => {
|
||||||
const resultCount = await nightmare
|
const resultCount = await nightmare
|
||||||
.wait(selectors.itemsIndex.searchItemInput)
|
.wait(selectors.itemsIndex.searchItemInput)
|
||||||
.type(selectors.itemsIndex.searchItemInput, 'Mjolnir')
|
.type(selectors.itemsIndex.searchItemInput, 'Object5 Weapon 50')
|
||||||
.click(selectors.itemsIndex.searchButton)
|
.click(selectors.itemsIndex.searchButton)
|
||||||
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
.waitForNumberOfElements(selectors.itemsIndex.searchResult, 1)
|
||||||
.countElement(selectors.itemsIndex.searchResult);
|
.countElement(selectors.itemsIndex.searchResult);
|
||||||
|
@ -113,7 +113,7 @@ describe('Item regularize path', () => {
|
||||||
|
|
||||||
it(`should click on the search result to access to the item tax`, async() => {
|
it(`should click on the search result to access to the item tax`, async() => {
|
||||||
const url = await nightmare
|
const url = await nightmare
|
||||||
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Mjolnir')
|
.waitForTextInElement(selectors.itemsIndex.searchResult, 'Object5 Weapon 50')
|
||||||
.waitToClick(selectors.itemsIndex.searchResult)
|
.waitToClick(selectors.itemsIndex.searchResult)
|
||||||
.waitForURL('/summary')
|
.waitForURL('/summary')
|
||||||
.parsedUrl();
|
.parsedUrl();
|
||||||
|
|
|
@ -11,42 +11,42 @@ describe('Ticket List sale path', () => {
|
||||||
.accessToSection('ticket.card.sale');
|
.accessToSection('ticket.card.sale');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the first ticket sale contains the colour', async () => {
|
it('should confirm the first ticket sale contains the colour', async() => {
|
||||||
const value = await nightmare
|
const value = await nightmare
|
||||||
.waitToGetProperty(selectors.ticketSales.firstSaleColour, 'innerText');
|
.waitToGetProperty(selectors.ticketSales.firstSaleColour, 'innerText');
|
||||||
|
|
||||||
expect(value).toContain('Red');
|
expect(value).toContain('Red');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the first ticket sale contains the lenght', async () => {
|
it('should confirm the first ticket sale contains the lenght', async() => {
|
||||||
const value = await nightmare
|
const value = await nightmare
|
||||||
.waitToGetProperty(selectors.ticketSales.firstSaleText, 'innerText');
|
.waitToGetProperty(selectors.ticketSales.firstSaleText, 'innerText');
|
||||||
|
|
||||||
expect(value).toContain('3');
|
expect(value).toContain('3');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the first ticket sale contains the price', async () => {
|
it('should confirm the first ticket sale contains the price', async() => {
|
||||||
const value = await nightmare
|
const value = await nightmare
|
||||||
.waitToGetProperty(selectors.ticketSales.firstSalePrice, 'innerText');
|
.waitToGetProperty(selectors.ticketSales.firstSalePrice, 'innerText');
|
||||||
|
|
||||||
expect(value).toContain('1.30');
|
expect(value).toContain('1.30');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the first ticket sale contains the discount', async () => {
|
it('should confirm the first ticket sale contains the discount', async() => {
|
||||||
const value = await nightmare
|
const value = await nightmare
|
||||||
.waitToGetProperty(selectors.ticketSales.firstSaleDiscount, 'innerText');
|
.waitToGetProperty(selectors.ticketSales.firstSaleDiscount, 'innerText');
|
||||||
|
|
||||||
expect(value).toContain('0 %');
|
expect(value).toContain('0 %');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the first ticket sale contains the total import', async () => {
|
it('should confirm the first ticket sale contains the total import', async() => {
|
||||||
const value = await nightmare
|
const value = await nightmare
|
||||||
.waitToGetProperty(selectors.ticketSales.firstSaleImport, 'innerText');
|
.waitToGetProperty(selectors.ticketSales.firstSaleImport, 'innerText');
|
||||||
|
|
||||||
expect(value).toContain('19.50');
|
expect(value).toContain('19.50');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should navigate to the catalog by pressing the new item button', async () => {
|
it('should navigate to the catalog by pressing the new item button', async() => {
|
||||||
const url = await nightmare
|
const url = await nightmare
|
||||||
.waitToClick(selectors.ticketSales.newItemButton)
|
.waitToClick(selectors.ticketSales.newItemButton)
|
||||||
.waitForURL('/catalog')
|
.waitForURL('/catalog')
|
||||||
|
|
|
@ -72,7 +72,7 @@ describe('Ticket Edit basic data path', () => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToGetProperty(selectors.ticketBasicData.stepTwoTotalPriceDif, 'innerText');
|
.waitToGetProperty(selectors.ticketBasicData.stepTwoTotalPriceDif, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain('-20.65 €');
|
expect(result).toContain('-12.25 €');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should then click next to move on to step three`, async() => {
|
it(`should then click next to move on to step three`, async() => {
|
||||||
|
|
|
@ -317,7 +317,7 @@ describe('Ticket Edit sale path', () => {
|
||||||
.wait(selectors.ticketSales.firstSaleText)
|
.wait(selectors.ticketSales.firstSaleText)
|
||||||
.waitToGetProperty(selectors.ticketSales.firstSaleText, 'innerText');
|
.waitToGetProperty(selectors.ticketSales.firstSaleText, 'innerText');
|
||||||
|
|
||||||
expect(result).toContain(`Mark I`);
|
expect(result).toContain(`Object4 Armor2 2`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should go back to the original ticket sales section', async() => {
|
it('should go back to the original ticket sales section', async() => {
|
||||||
|
|
|
@ -9,7 +9,7 @@ describe('Ticket descriptor path', () => {
|
||||||
.loginAndModule('employee', 'ticket');
|
.loginAndModule('employee', 'ticket');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should count the mount of tickets in the turns section', async () => {
|
it('should count the mount of tickets in the turns section', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.ticketsIndex.moreMenu)
|
.waitToClick(selectors.ticketsIndex.moreMenu)
|
||||||
.waitToClick(selectors.ticketsIndex.moreMenuTurns)
|
.waitToClick(selectors.ticketsIndex.moreMenuTurns)
|
||||||
|
@ -19,7 +19,7 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(result).toEqual(5);
|
expect(result).toEqual(5);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should now click on the Tickets button of the top bar menu', async () => {
|
it('should now click on the Tickets button of the top bar menu', async() => {
|
||||||
const url = await nightmare
|
const url = await nightmare
|
||||||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||||
|
@ -30,7 +30,7 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(url.hash).toEqual('#!/ticket/index');
|
expect(url.hash).toEqual('#!/ticket/index');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should search for the ticket 11', async () => {
|
it('should search for the ticket 11', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:11')
|
.type(selectors.ticketsIndex.searchTicketInput, 'id:11')
|
||||||
|
@ -41,7 +41,7 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(result).toEqual(1);
|
expect(result).toEqual(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click on the search result to access to the ticket`, async () => {
|
it(`should click on the search result to access to the ticket`, async() => {
|
||||||
const url = await nightmare
|
const url = await nightmare
|
||||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||||
.waitForURL('/summary')
|
.waitForURL('/summary')
|
||||||
|
@ -50,7 +50,7 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(url.hash).toContain('/summary');
|
expect(url.hash).toContain('/summary');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should add the ticket to thirsday turn using the descriptor more menu', async () => {
|
it('should add the ticket to thirsday turn using the descriptor more menu', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.ticketDescriptor.moreMenu)
|
.waitToClick(selectors.ticketDescriptor.moreMenu)
|
||||||
.waitToClick(selectors.ticketDescriptor.moreMenuAddToTurn)
|
.waitToClick(selectors.ticketDescriptor.moreMenuAddToTurn)
|
||||||
|
@ -60,7 +60,7 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should again click on the Tickets button of the top bar menu', async () => {
|
it('should again click on the Tickets button of the top bar menu', async() => {
|
||||||
const url = await nightmare
|
const url = await nightmare
|
||||||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||||
|
@ -71,7 +71,7 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(url.hash).toEqual('#!/ticket/index');
|
expect(url.hash).toEqual('#!/ticket/index');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the ticket 11 was added on thursday', async () => {
|
it('should confirm the ticket 11 was added on thursday', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.ticketsIndex.moreMenu)
|
.waitToClick(selectors.ticketsIndex.moreMenu)
|
||||||
.waitToClick(selectors.ticketsIndex.moreMenuTurns)
|
.waitToClick(selectors.ticketsIndex.moreMenuTurns)
|
||||||
|
@ -80,7 +80,7 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(result).toEqual('Thursday');
|
expect(result).toEqual('Thursday');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should click on the Tickets button of the top bar menu once more', async () => {
|
it('should click on the Tickets button of the top bar menu once more', async() => {
|
||||||
const url = await nightmare
|
const url = await nightmare
|
||||||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||||
|
@ -91,7 +91,7 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(url.hash).toEqual('#!/ticket/index');
|
expect(url.hash).toEqual('#!/ticket/index');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should now search for the ticket 11', async () => {
|
it('should now search for the ticket 11', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.wait(selectors.ticketsIndex.searchTicketInput)
|
.wait(selectors.ticketsIndex.searchTicketInput)
|
||||||
.type(selectors.ticketsIndex.searchTicketInput, 'id:11')
|
.type(selectors.ticketsIndex.searchTicketInput, 'id:11')
|
||||||
|
@ -102,7 +102,7 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(result).toEqual(1);
|
expect(result).toEqual(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click on the search result to access to the ticket`, async () => {
|
it(`should click on the search result to access to the ticket`, async() => {
|
||||||
const url = await nightmare
|
const url = await nightmare
|
||||||
.waitToClick(selectors.ticketsIndex.searchResult)
|
.waitToClick(selectors.ticketsIndex.searchResult)
|
||||||
.waitForURL('/summary')
|
.waitForURL('/summary')
|
||||||
|
@ -111,7 +111,7 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(url.hash).toContain('/summary');
|
expect(url.hash).toContain('/summary');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should add the ticket to saturday turn using the descriptor more menu', async () => {
|
it('should add the ticket to saturday turn using the descriptor more menu', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.ticketDescriptor.moreMenu)
|
.waitToClick(selectors.ticketDescriptor.moreMenu)
|
||||||
.waitToClick(selectors.ticketDescriptor.moreMenuAddToTurn)
|
.waitToClick(selectors.ticketDescriptor.moreMenuAddToTurn)
|
||||||
|
@ -121,7 +121,7 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should click on the Tickets button of the top bar menu once again', async () => {
|
it('should click on the Tickets button of the top bar menu once again', async() => {
|
||||||
const url = await nightmare
|
const url = await nightmare
|
||||||
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
.waitToClick(selectors.globalItems.applicationsMenuButton)
|
||||||
.wait(selectors.globalItems.applicationsMenuVisible)
|
.wait(selectors.globalItems.applicationsMenuVisible)
|
||||||
|
@ -132,7 +132,7 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(url.hash).toEqual('#!/ticket/index');
|
expect(url.hash).toEqual('#!/ticket/index');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the ticket 11 was added on saturday', async () => {
|
it('should confirm the ticket 11 was added on saturday', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.ticketsIndex.moreMenu)
|
.waitToClick(selectors.ticketsIndex.moreMenu)
|
||||||
.waitToClick(selectors.ticketsIndex.moreMenuTurns)
|
.waitToClick(selectors.ticketsIndex.moreMenuTurns)
|
||||||
|
@ -141,7 +141,7 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(result).toEqual('Saturday');
|
expect(result).toEqual('Saturday');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should delete the weekly ticket 11', async () => {
|
it('should delete the weekly ticket 11', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.ticketsIndex.sixthWeeklyTicketDeleteIcon)
|
.waitToClick(selectors.ticketsIndex.sixthWeeklyTicketDeleteIcon)
|
||||||
.waitForLastSnackbar();
|
.waitForLastSnackbar();
|
||||||
|
@ -149,7 +149,7 @@ describe('Ticket descriptor path', () => {
|
||||||
expect(result).toEqual('Data saved!');
|
expect(result).toEqual('Data saved!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the sixth weekly ticket was deleted', async () => {
|
it('should confirm the sixth weekly ticket was deleted', async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.countElement(selectors.ticketsIndex.weeklyTicket);
|
.countElement(selectors.ticketsIndex.weeklyTicket);
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,12 @@ module.exports = function(Self) {
|
||||||
Self.super_.setup.call(this);
|
Self.super_.setup.call(this);
|
||||||
|
|
||||||
// Register field ACL validation
|
// Register field ACL validation
|
||||||
this.beforeRemote('prototype.patchAttributes', ctx => this.checkUpdateAcls(ctx));
|
/* this.beforeRemote('prototype.patchAttributes', ctx => this.checkUpdateAcls(ctx));
|
||||||
this.beforeRemote('updateAll', ctx => this.checkUpdateAcls(ctx));
|
this.beforeRemote('updateAll', ctx => this.checkUpdateAcls(ctx));
|
||||||
this.beforeRemote('patchOrCreate', ctx => this.checkInsertAcls(ctx));
|
this.beforeRemote('patchOrCreate', ctx => this.checkInsertAcls(ctx));
|
||||||
this.beforeRemote('create', ctx => this.checkInsertAcls(ctx));
|
this.beforeRemote('create', ctx => this.checkInsertAcls(ctx));
|
||||||
this.beforeRemote('replaceById', ctx => this.checkInsertAcls(ctx));
|
this.beforeRemote('replaceById', ctx => this.checkInsertAcls(ctx));
|
||||||
this.beforeRemote('replaceOrCreate', ctx => this.checkInsertAcls(ctx));
|
this.beforeRemote('replaceOrCreate', ctx => this.checkInsertAcls(ctx)); */
|
||||||
|
|
||||||
this.remoteMethod('crud', {
|
this.remoteMethod('crud', {
|
||||||
description: `Create, update or/and delete instances from model with a single request`,
|
description: `Create, update or/and delete instances from model with a single request`,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const app = require(`${serviceRoot}/server/server`);
|
const app = require(`${serviceRoot}/server/server`);
|
||||||
|
|
||||||
describe('Client activeWorkersWithRole', () => {
|
describe('Client activeWorkersWithRole', () => {
|
||||||
it('should return the sales people as result', async () => {
|
it('should return the sales people as result', async() => {
|
||||||
let filter = {where: {role: 'salesPerson'}};
|
let filter = {where: {role: 'salesPerson'}};
|
||||||
let result = await app.models.Client.activeWorkersWithRole(filter);
|
let result = await app.models.Client.activeWorkersWithRole(filter);
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ describe('Client activeWorkersWithRole', () => {
|
||||||
expect(isSalesPerson).toBeTruthy();
|
expect(isSalesPerson).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return the buyers as result', async () => {
|
it('should return the buyers as result', async() => {
|
||||||
let filter = {where: {role: 'buyer'}};
|
let filter = {where: {role: 'buyer'}};
|
||||||
let result = await app.models.Client.activeWorkersWithRole(filter);
|
let result = await app.models.Client.activeWorkersWithRole(filter);
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
const app = require(`${serviceRoot}/server/server`);
|
const app = require(`${serviceRoot}/server/server`);
|
||||||
|
|
||||||
describe('Client card', () => {
|
describe('Client card', () => {
|
||||||
it('should call the card() method to receive a formated card of Bruce Wayne', async () => {
|
it('should call the card() method to receive a formated card of Bruce Wayne', async() => {
|
||||||
let id = 101;
|
let id = 101;
|
||||||
let result = await app.models.Client.getCard(id);
|
let result = await app.models.Client.getCard(id);
|
||||||
|
|
||||||
expect(result.id).toEqual(101);
|
expect(result.id).toEqual(101);
|
||||||
expect(result.name).toEqual('Bruce Wayne');
|
expect(result.name).toEqual('Bruce Wayne');
|
||||||
expect(result.debt).toEqual(79.1);
|
expect(result.debt).toEqual(579.1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,44 +1,44 @@
|
||||||
const app = require(`${serviceRoot}/server/server`);
|
const app = require(`${serviceRoot}/server/server`);
|
||||||
|
|
||||||
describe('client summary()', () => {
|
describe('client summary()', () => {
|
||||||
it('should return a summary object containing data', async () => {
|
it('should return a summary object containing data', async() => {
|
||||||
let result = await app.models.Client.summary(101);
|
let result = await app.models.Client.summary(101);
|
||||||
|
|
||||||
expect(result.id).toEqual(101);
|
expect(result.id).toEqual(101);
|
||||||
expect(result.name).toEqual('Bruce Wayne');
|
expect(result.name).toEqual('Bruce Wayne');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a summary object containing mana', async () => {
|
it('should return a summary object containing mana', async() => {
|
||||||
let result = await app.models.Client.summary(101);
|
let result = await app.models.Client.summary(101);
|
||||||
|
|
||||||
expect(result.mana.mana).toEqual(151.33);
|
expect(result.mana.mana).toEqual(151.33);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a summary object containing debt', async () => {
|
it('should return a summary object containing debt', async() => {
|
||||||
let result = await app.models.Client.summary(101);
|
let result = await app.models.Client.summary(101);
|
||||||
|
|
||||||
expect(result.debt.debt).toEqual(79.1);
|
expect(result.debt.debt).toEqual(579.1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a summary object containing averageInvoiced', async () => {
|
it('should return a summary object containing averageInvoiced', async() => {
|
||||||
let result = await app.models.Client.summary(101);
|
let result = await app.models.Client.summary(101);
|
||||||
|
|
||||||
expect(result.averageInvoiced.invoiced).toEqual(1500);
|
expect(result.averageInvoiced.invoiced).toEqual(1500);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a summary object containing totalGreuge', async () => {
|
it('should return a summary object containing totalGreuge', async() => {
|
||||||
let result = await app.models.Client.summary(101);
|
let result = await app.models.Client.summary(101);
|
||||||
|
|
||||||
expect(result.totalGreuge).toEqual(203.71);
|
expect(result.totalGreuge).toEqual(203.71);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a summary object without containing active recoveries', async () => {
|
it('should return a summary object without containing active recoveries', async() => {
|
||||||
let result = await app.models.Client.summary(101);
|
let result = await app.models.Client.summary(101);
|
||||||
|
|
||||||
expect(result.recovery).toEqual(null);
|
expect(result.recovery).toEqual(null);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return a summary object containing active recoveries', async () => {
|
it('should return a summary object containing active recoveries', async() => {
|
||||||
let result = await app.models.Client.summary(102);
|
let result = await app.models.Client.summary(102);
|
||||||
|
|
||||||
expect(result.recovery.id).toEqual(3);
|
expect(result.recovery.id).toEqual(3);
|
||||||
|
|
|
@ -12,7 +12,7 @@ describe('item filter()', () => {
|
||||||
|
|
||||||
expect(result.length).toEqual(1);
|
expect(result.length).toEqual(1);
|
||||||
expect(result[0].id).toEqual(2);
|
expect(result[0].id).toEqual(2);
|
||||||
expect(result[0].name).toEqual('Gem of Mind');
|
expect(result[0].name).toEqual('Object2 Gem2 3');
|
||||||
expect(result[0].type).toEqual('Anthurium');
|
expect(result[0].type).toEqual('Anthurium');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe('order catalogFilter()', () => {
|
||||||
let firstItemId = result[0].id;
|
let firstItemId = result[0].id;
|
||||||
|
|
||||||
expect(result.length).toEqual(2);
|
expect(result.length).toEqual(2);
|
||||||
expect(firstItemId).toEqual(1);
|
expect(firstItemId).toEqual(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return an array of items based on tag filter', async() => {
|
it('should return an array of items based on tag filter', async() => {
|
||||||
|
|
|
@ -4,7 +4,7 @@ describe('order getTotalVolume()', () => {
|
||||||
it('should return the total', async() => {
|
it('should return the total', async() => {
|
||||||
let result = await app.models.Order.getTotalVolume(1);
|
let result = await app.models.Order.getTotalVolume(1);
|
||||||
|
|
||||||
expect(result.totalVolume).toEqual(0.078);
|
expect(result.totalVolume).toEqual(0.066);
|
||||||
expect(result.totalBoxes).toBeFalsy();
|
expect(result.totalBoxes).toBeFalsy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
const app = require(`${serviceRoot}/server/server`);
|
const app = require(`${serviceRoot}/server/server`);
|
||||||
|
|
||||||
describe('ticket listSaleTracking()', () => {
|
describe('ticket listSaleTracking()', () => {
|
||||||
it('should call the listSaleTracking method and return the response', async () => {
|
it('should call the listSaleTracking method and return the response', async() => {
|
||||||
let filter = {where: {ticketFk: 1}};
|
let filter = {where: {ticketFk: 1}};
|
||||||
let result = await app.models.SaleTracking.listSaleTracking(filter);
|
let result = await app.models.SaleTracking.listSaleTracking(filter);
|
||||||
|
|
||||||
expect(result[0].concept).toEqual('Gem of Time');
|
expect(result[0].concept).toEqual('Object1 Gem1 5');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should call the listSaleTracking method and return zero if doesn't have lines`, async () => {
|
it(`should call the listSaleTracking method and return zero if doesn't have lines`, async() => {
|
||||||
let filter = {where: {ticketFk: 2}};
|
let filter = {where: {ticketFk: 2}};
|
||||||
let result = await app.models.SaleTracking.listSaleTracking(filter);
|
let result = await app.models.SaleTracking.listSaleTracking(filter);
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
const app = require(`${serviceRoot}/server/server`);
|
const app = require(`${serviceRoot}/server/server`);
|
||||||
|
|
||||||
describe('sale getClaimableFromTicket()', () => {
|
describe('sale getClaimableFromTicket()', () => {
|
||||||
it('should return the claimable sales of a given ticket', async () => {
|
it('should return the claimable sales of a given ticket', async() => {
|
||||||
let claimableFromTicket = await app.models.Sale.getClaimableFromTicket(16);
|
let claimableFromTicket = await app.models.Sale.getClaimableFromTicket(16);
|
||||||
|
|
||||||
expect(claimableFromTicket[0].concept).toBe('Gem of Time');
|
expect(claimableFromTicket[0].concept).toBe('Object1 Gem1 5');
|
||||||
expect(claimableFromTicket.length).toBe(3);
|
expect(claimableFromTicket.length).toBe(3);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,7 +11,7 @@ describe('sale priceDifference()', () => {
|
||||||
let result = await app.models.Sale.priceDifference(1, data);
|
let result = await app.models.Sale.priceDifference(1, data);
|
||||||
|
|
||||||
expect(result.totalUnitPrice).toEqual(22.33);
|
expect(result.totalUnitPrice).toEqual(22.33);
|
||||||
expect(result.totalNewPrice).toEqual(22.33);
|
expect(result.totalNewPrice).toEqual(22.29);
|
||||||
expect(result.totalDifference).toEqual(0);
|
expect(result.totalDifference).toEqual(0.8);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,7 +4,7 @@ describe('ticket getTotalVolume()', () => {
|
||||||
it('should return the total volume of a ticket', async() => {
|
it('should return the total volume of a ticket', async() => {
|
||||||
let ticketFk = 1;
|
let ticketFk = 1;
|
||||||
|
|
||||||
let expectedResult = 0.078;
|
let expectedResult = 0.066;
|
||||||
|
|
||||||
let result = await app.models.Ticket.getTotalVolume(ticketFk);
|
let result = await app.models.Ticket.getTotalVolume(ticketFk);
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
echo USE `account`; > install/dump/dumpedFixtures.sql
|
echo USE `account`; > install/dump/dumpedFixtures.sql
|
||||||
mysqldump --defaults-file=connect.ini --no-create-info account role roleRole roleInherit >> install/dump/dumpedFixtures.sql
|
mysqldump --defaults-file=connect.ini --no-create-info account role roleRole roleInherit >> install/dump/dumpedFixtures.sql
|
||||||
echo USE `salix`; >> install/dump/dumpedFixtures.sql
|
echo USE `salix`; >> install/dump/dumpedFixtures.sql
|
||||||
mysqldump --defaults-file=connect.ini --no-create-info salix ACL >> install/dump/dumpedFixtures.sql
|
mysqldump --defaults-file=connect.ini --no-create-info salix ACL fieldAcl>> install/dump/dumpedFixtures.sql
|
||||||
echo USE `vn`; >> install/dump/dumpedFixtures.sql
|
echo USE `vn`; >> install/dump/dumpedFixtures.sql
|
||||||
mysqldump --defaults-file=connect.ini --no-create-info vn cplusInvoiceType477 cplusSubjectOp cplusTaxBreak bookingPlanner pgc tag alertLevel>> install/dump/dumpedFixtures.sql
|
mysqldump --defaults-file=connect.ini --no-create-info vn cplusInvoiceType477 cplusSubjectOp cplusTaxBreak bookingPlanner pgc tag alertLevel>> install/dump/dumpedFixtures.sql
|
||||||
echo USE `vn2008`; >> install/dump/dumpedFixtures.sql
|
echo USE `vn2008`; >> install/dump/dumpedFixtures.sql
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
echo "USE \`account\`;" > install/dump/dumpedFixtures.sql
|
echo "USE \`account\`;" > install/dump/dumpedFixtures.sql
|
||||||
mysqldump --defaults-file=connect.ini --no-create-info account role roleRole roleInherit >> install/dump/dumpedFixtures.sql
|
mysqldump --defaults-file=connect.ini --no-create-info account role roleRole roleInherit >> install/dump/dumpedFixtures.sql
|
||||||
echo "USE \`salix\`;" >> install/dump/dumpedFixtures.sql
|
echo "USE \`salix\`;" >> install/dump/dumpedFixtures.sql
|
||||||
mysqldump --defaults-file=connect.ini --no-create-info salix ACL >> install/dump/dumpedFixtures.sql
|
mysqldump --defaults-file=connect.ini --no-create-info salix ACL fieldAcl>> install/dump/dumpedFixtures.sql
|
||||||
echo "USE \`vn\`;" >> install/dump/dumpedFixtures.sql
|
echo "USE \`vn\`;" >> install/dump/dumpedFixtures.sql
|
||||||
mysqldump --defaults-file=connect.ini --no-create-info vn cplusInvoiceType477 cplusSubjectOp cplusTaxBreak bookingPlanner pgc tag alertLevel >> install/dump/dumpedFixtures.sql
|
mysqldump --defaults-file=connect.ini --no-create-info vn cplusInvoiceType477 cplusSubjectOp cplusTaxBreak bookingPlanner pgc tag alertLevel >> install/dump/dumpedFixtures.sql
|
||||||
echo "USE \`vn2008\`;" >> install/dump/dumpedFixtures.sql
|
echo "USE \`vn2008\`;" >> install/dump/dumpedFixtures.sql
|
||||||
|
|
|
@ -1,84 +0,0 @@
|
||||||
/**
|
|
||||||
* Cambios para evitar fallos en local.
|
|
||||||
* Ya está en producción
|
|
||||||
**/
|
|
||||||
|
|
||||||
|
|
||||||
USE `vn`;
|
|
||||||
CREATE TABLE `salix`.`fieldAcl` (
|
|
||||||
`id` INT NOT NULL AUTO_INCREMENT,
|
|
||||||
`model` VARCHAR(255) NULL,
|
|
||||||
`property` VARCHAR(255) NULL,
|
|
||||||
`actionType` SET('insert', 'update', '*') NULL DEFAULT '*',
|
|
||||||
`role` VARCHAR(45) NULL,
|
|
||||||
PRIMARY KEY (`id`));
|
|
||||||
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'name', 'update', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'contact', 'update', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'email', 'update', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'phone', 'update', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'mobile', 'update', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'contactChannelFk', 'update', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'socialName', 'update', 'salesPerson');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'fi', 'update', 'salesPerson');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'street', 'update', 'salesPerson');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'postcode', 'update', 'salesPerson');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'city', 'update', 'salesPerson');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'countryFk', 'update', 'salesPerson');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'provinceFk', 'update', 'salesPerson');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'isActive', 'update', 'salesPerson');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'salesPersonFk', 'update', 'salesAssistant');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'hasToInvoice', 'update', 'salesPerson');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'isToBeMailed', 'update', 'salesPerson');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'isEqualizated', 'update', 'salesPerson');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'isFreezed', 'update', 'salesPerson');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'isVies', 'update', 'salesPerson');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'hasToInvoiceByAddress', 'update', 'salesPerson');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'isTaxDataChecked', 'update', 'salesAssistant');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'payMethodFk', 'update', 'salesAssistant');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'dueDay', 'update', 'salesAssistant');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'iban', 'update', 'salesAssistant');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'bankEntityFk', 'update', 'salesAssistant');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'hasLcr', 'update', 'salesAssistant');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'hasCoreVnl', 'update', 'salesAssistant');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'hasSepaVnl', 'update', 'salesAssistant');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Client', 'credit', 'update', 'teamBoss');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('BankEntity', '*', 'insert', 'salesAssistant');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Address', 'isDefaultAddress', '*', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Address', 'nickname', '*', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Address', 'postalCode', '*', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Address', 'provinceFk', '*', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Address', 'agencyModeFk', '*', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Address', 'phone', '*', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Address', 'mobile', '*', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Address', 'street', '*', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Address', 'city', '*', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Address', 'isActive', '*', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Address', 'isEqualizated', '*', 'salesAssistant');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Address', 'clientFk', 'insert', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('ClientObservation', '*', 'insert', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Recovery', '*', 'insert', 'administrative');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Recovery', 'finished', 'update', 'administrative');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('CreditClassification', 'finished', 'update', 'creditInsurance');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Account', '*', 'update', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Greuge', '*', 'insert', 'salesAssistant');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('ClientSample', '*', 'insert', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Item', '*', '*', 'buyer');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Item', '*', '*', 'marketingBoss');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('ItemBotanical', '*', '*', 'buyer');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('ClaimEnd', '*', '*', 'salesAssistant');
|
|
||||||
|
|
||||||
|
|
||||||
DELETE FROM `salix`.`ACL` WHERE `id`='28';
|
|
||||||
UPDATE `salix`.`ACL` SET `accessType`='*' WHERE `id`='60';
|
|
||||||
DELETE FROM `salix`.`ACL` WHERE `id`='59';
|
|
||||||
DELETE FROM `salix`.`ACL` WHERE `id`='57';
|
|
||||||
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (116, 'BankEntity', '*', '*', 'ALLOW', 'role', 'employee');
|
|
||||||
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (117, 'ClientSample', '*', '*', 'ALLOW', 'role', 'employee');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('TicketWeekly', '*', '*', 'employee');
|
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`, `role`) VALUES ('Receipt', '*', '*', 'administrative');
|
|
||||||
INSERT INTO salix.fieldAcl (model,property,actionType,`role`) VALUES ('Zone','*','*','agency');
|
|
|
@ -1,4 +0,0 @@
|
||||||
USE `vn`;
|
|
||||||
CREATE TABLE `vn`.`workerTeamCollegues` (
|
|
||||||
`workerFk` VARCHAR(255) NULL,
|
|
||||||
`collegueFk` VARCHAR(255) NULL);
|
|
|
@ -1,15 +0,0 @@
|
||||||
USE `vn`;
|
|
||||||
CREATE
|
|
||||||
OR REPLACE ALGORITHM = UNDEFINED
|
|
||||||
DEFINER = `root`@`%`
|
|
||||||
SQL SECURITY DEFINER
|
|
||||||
VIEW `itemCategory` AS
|
|
||||||
SELECT
|
|
||||||
`r`.`id` AS `id`,
|
|
||||||
`r`.`reino` AS `name`,
|
|
||||||
`r`.`display` AS `display`,
|
|
||||||
`r`.`color` AS `color`,
|
|
||||||
`r`.`icon` AS `icon`,
|
|
||||||
`r`.`mercancia` AS `merchandise`
|
|
||||||
FROM
|
|
||||||
`vn2008`.`reinos` `r`;
|
|
|
@ -1,11 +0,0 @@
|
||||||
DROP TRIGGER IF EXISTS `vn`.`itemLog_BEFORE_INSERT`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
USE `vn`$$
|
|
||||||
CREATE DEFINER=`root`@`%` TRIGGER `vn`.`itemLog_BEFORE_INSERT` BEFORE INSERT ON `itemLog` FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
IF NEW.newInstance is NULL THEN
|
|
||||||
SET NEW.newInstance = NEW.description;
|
|
||||||
END IF;
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,11 +0,0 @@
|
||||||
DROP TRIGGER IF EXISTS `vn`.`ticketLog_BEFORE_INSERT`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
USE `vn`$$
|
|
||||||
CREATE DEFINER=`root`@`%` TRIGGER `vn`.`ticketLog_BEFORE_INSERT` BEFORE INSERT ON `ticketLog` FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
IF NEW.newInstance is NULL THEN
|
|
||||||
SET NEW.newInstance = NEW.description;
|
|
||||||
END IF;
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,88 +0,0 @@
|
||||||
USE `vn`;
|
|
||||||
DROP procedure IF EXISTS `ticketCalculateClon`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
USE `vn`$$
|
|
||||||
CREATE DEFINER=`root`@`%` PROCEDURE `ticketCalculateClon`(IN vTicketNew INT, vTicketOld INT)
|
|
||||||
BEGIN
|
|
||||||
/*
|
|
||||||
* @vTicketNew id del nuevo ticket clonado
|
|
||||||
* @vTicketOld id ticket original, a partir del qual se clonara el nuevo
|
|
||||||
* Este procedimiento "rebioniza" una linea, eliminando los componentes existentes e insertandolos de nuevo
|
|
||||||
*/
|
|
||||||
DECLARE vShipped DATE;
|
|
||||||
DECLARE vClient INT;
|
|
||||||
DECLARE vWarehouse SMALLINT;
|
|
||||||
DECLARE vAgencyMode INT;
|
|
||||||
DECLARE vAddress INT;
|
|
||||||
DECLARE vLanded DATE;
|
|
||||||
DECLARE vAgency INT;
|
|
||||||
|
|
||||||
INSERT INTO orderTicket(orderFk,ticketFk)
|
|
||||||
SELECT orderFk, vTicketNew
|
|
||||||
FROM orderTicket
|
|
||||||
WHERE ticketFk = vTicketOld;
|
|
||||||
|
|
||||||
SELECT t.clientFk , t.warehouseFk, date(t.shipped), t.addressFk, t.agencyModeFk, t.landed, a.agencyFk
|
|
||||||
INTO vClient, vWarehouse, vShipped, vAddress, vAgencyMode, vLanded, vAgency
|
|
||||||
FROM vn.agencyMode a
|
|
||||||
JOIN vn.ticket t ON t.agencyModeFk = a.id
|
|
||||||
WHERE t.id = vTicketNew;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.agencyHourGetShipped;
|
|
||||||
CREATE TEMPORARY TABLE tmp.agencyHourGetShipped ENGINE = MEMORY
|
|
||||||
SELECT vWarehouse warehouseFk, vShipped shipped, vLanded landed;
|
|
||||||
|
|
||||||
CALL buyUltimate(vWarehouse, vShipped); -- rellena la tabla tmp.buyUltimate con la ultima compra
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
|
|
||||||
CREATE TEMPORARY TABLE tmp.ticketLot
|
|
||||||
SELECT vWarehouse warehouseFk,NULL available,s.itemFk, bu.buyFk
|
|
||||||
FROM sale s
|
|
||||||
LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
|
|
||||||
WHERE s.ticketFk = vTicketOld GROUP BY s.itemFk;
|
|
||||||
|
|
||||||
CALL ticketComponentCalculate(vAddress,vAgencyMode);
|
|
||||||
|
|
||||||
-- Bionizamos lineas con Preu = 0
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.sale;
|
|
||||||
CREATE TEMPORARY TABLE tmp.sale
|
|
||||||
(PRIMARY KEY (saleFk)) ENGINE = MEMORY
|
|
||||||
SELECT s.id saleFk, vWarehouse warehouseFk
|
|
||||||
FROM sale s
|
|
||||||
JOIN ticket t on t.id = s.ticketFk WHERE s.ticketFk = vTicketNew AND s.price = 0;
|
|
||||||
|
|
||||||
CALL ticketComponentUpdateSale(1);
|
|
||||||
|
|
||||||
-- Bionizamos lineas con Preu > 0
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.sale;
|
|
||||||
CREATE TEMPORARY TABLE tmp.sale
|
|
||||||
(PRIMARY KEY (saleFk)) ENGINE = MEMORY
|
|
||||||
SELECT s.id saleFk, vWarehouse warehouseFk
|
|
||||||
FROM sale s
|
|
||||||
JOIN ticket t on t.id = s.ticketFk WHERE s.ticketFk = vTicketNew
|
|
||||||
AND s.price > 0;
|
|
||||||
|
|
||||||
CALL ticketComponentUpdateSale(6);
|
|
||||||
|
|
||||||
IF vLanded IS NULL THEN
|
|
||||||
CALL agencyHourGetLanded(vShipped, vAddress, vAgency,vWarehouse);
|
|
||||||
|
|
||||||
UPDATE ticket t
|
|
||||||
JOIN tmp.agencyHourGetLanded ah ON t.warehouseFk = ah.warehouseFk
|
|
||||||
SET t.landed = ah.landed
|
|
||||||
WHERE t.id = vTicketNew;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
-- Log
|
|
||||||
CALL `logAdd`(vTicketNew, 'update', ' ticket' , 'Bioniza Ticket');
|
|
||||||
|
|
||||||
-- Limpieza
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.buyUltimate;
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.sale;
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS agencyHourGetShipped;
|
|
||||||
END$$
|
|
||||||
|
|
||||||
DELIMITER ;
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
DROP TRIGGER IF EXISTS `vn`.`claimLog_BEFORE_INSERT`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
USE `vn`$$
|
|
||||||
CREATE DEFINER=`root`@`%` TRIGGER `vn`.`claimLog_BEFORE_INSERT` BEFORE INSERT ON `claimLog` FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
IF NEW.newInstance is NULL THEN
|
|
||||||
SET NEW.newInstance = NEW.description;
|
|
||||||
END IF;
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,11 +0,0 @@
|
||||||
DROP TRIGGER IF EXISTS `vn`.`clientLog_BEFORE_INSERT`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
USE `vn`$$
|
|
||||||
CREATE DEFINER=`root`@`%` TRIGGER `vn`.`clientLog_BEFORE_INSERT` BEFORE INSERT ON `clientLog` FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
IF NEW.newInstance is NULL THEN
|
|
||||||
SET NEW.newInstance = NEW.description;
|
|
||||||
END IF;
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,17 +0,0 @@
|
||||||
DROP TRIGGER IF EXISTS `vn`.`ticketLog_AFTER_INSERT`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
USE `vn`$$
|
|
||||||
CREATE DEFINER=`root`@`%` TRIGGER `vn`.`ticketLog_AFTER_INSERT` AFTER INSERT ON `ticketLog` FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
DECLARE vActionId INT DEFAULT 84;
|
|
||||||
DECLARE vWorkerFk INT;
|
|
||||||
|
|
||||||
SELECT id INTO vWorkerFk
|
|
||||||
FROM worker w
|
|
||||||
WHERE w.userFk = NEW.userFk;
|
|
||||||
|
|
||||||
INSERT INTO vn2008.Tickets_dits(idaccion_dits,Id_Trabajador,Id_Ticket,value_old,value_new)
|
|
||||||
VALUES (vActionId, vWorkerFk, NEW.originFk, NULL, NULL);
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,10 +0,0 @@
|
||||||
ALTER TABLE `vn`.`ticketLog`
|
|
||||||
DROP FOREIGN KEY `ticketLog_ibfk_2`;
|
|
||||||
ALTER TABLE `vn`.`ticketLog`
|
|
||||||
CHANGE COLUMN `userFk` `userFk` INT(10) UNSIGNED NULL DEFAULT NULL ;
|
|
||||||
ALTER TABLE `vn`.`ticketLog`
|
|
||||||
ADD CONSTRAINT `ticketLog_ibfk_2`
|
|
||||||
FOREIGN KEY (`userFk`)
|
|
||||||
REFERENCES `account`.`user` (`id`)
|
|
||||||
ON DELETE CASCADE
|
|
||||||
ON UPDATE CASCADE;
|
|
|
@ -1,10 +0,0 @@
|
||||||
ALTER TABLE `vn2008`.`Tickets_dits`
|
|
||||||
DROP FOREIGN KEY `fgkey3`;
|
|
||||||
ALTER TABLE `vn2008`.`Tickets_dits`
|
|
||||||
CHANGE COLUMN `Id_Trabajador` `Id_Trabajador` INT(11) NULL DEFAULT NULL ;
|
|
||||||
ALTER TABLE `vn2008`.`Tickets_dits`
|
|
||||||
ADD CONSTRAINT `fgkey3`
|
|
||||||
FOREIGN KEY (`Id_Trabajador`)
|
|
||||||
REFERENCES `vn2008`.`Trabajadores` (`Id_Trabajador`)
|
|
||||||
ON DELETE NO ACTION
|
|
||||||
ON UPDATE CASCADE;
|
|
|
@ -1,4 +1,4 @@
|
||||||
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (118, 'WorkerTeam', '*', '*', 'ALLOW', 'role', 'salesPerson');
|
/* INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (118, 'WorkerTeam', '*', '*', 'ALLOW', 'role', 'salesPerson');
|
||||||
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (119, 'Travel', '*', 'READ', 'ALLOW', 'role', 'employee');
|
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (119, 'Travel', '*', 'READ', 'ALLOW', 'role', 'employee');
|
||||||
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (120, 'Travel', '*', 'WRITE', 'ALLOW', 'role', 'buyer');
|
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (120, 'Travel', '*', 'WRITE', 'ALLOW', 'role', 'buyer');
|
||||||
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (121, 'Item', 'regularize', '*', 'ALLOW', 'role', 'employee');
|
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (121, 'Item', 'regularize', '*', 'ALLOW', 'role', 'employee');
|
||||||
|
@ -8,3 +8,25 @@ UPDATE `salix`.`ACL` SET model='TicketRequest', property='*', accessType='*', pe
|
||||||
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`,`role`) VALUES ('ClaimBeginning','*','*','salesAssistant');
|
INSERT INTO `salix`.`fieldAcl` (`model`, `property`, `actionType`,`role`) VALUES ('ClaimBeginning','*','*','salesAssistant');
|
||||||
INSERT INTO `salix`.`ACL`(`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Agency', 'getAgenciesWithWarehouse', '*', 'ALLOW', 'ROLE', 'employee');
|
INSERT INTO `salix`.`ACL`(`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Agency', 'getAgenciesWithWarehouse', '*', 'ALLOW', 'ROLE', 'employee');
|
||||||
INSERT INTO `salix`.`ACL`(`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES('Client', 'activeWorkersWithRole', '*', 'ALLOW', 'ROLE', 'employee');
|
INSERT INTO `salix`.`ACL`(`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES('Client', 'activeWorkersWithRole', '*', 'ALLOW', 'ROLE', 'employee');
|
||||||
|
|
||||||
|
*/
|
||||||
|
INSERT INTO `salix`.`ACL`(`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES('CreditClassification', '*', 'READ', 'ALLOW', 'ROLE', 'employee');
|
||||||
|
|
||||||
|
INSERT INTO `salix`.`ACL`(`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES('ClientObservation', '*', 'READ', 'ALLOW', 'ROLE', 'employee');
|
||||||
|
|
||||||
|
INSERT INTO `salix`.`ACL`(`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES('ItemTag', '*', 'WRITE', 'ALLOW', 'ROLE', 'marketingBoss');
|
||||||
|
|
||||||
|
INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (104,'Item','*','WRITE','ALLOW','ROLE','marketingBoss');
|
||||||
|
INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (105,'ItemBarcode','*','WRITE','ALLOW','ROLE','marketingBoss');
|
||||||
|
INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (106,'ItemBotanical','*','WRITE','ALLOW','ROLE','marketingBoss');
|
||||||
|
INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (107,'ItemNiche','*','WRITE','ALLOW','ROLE','marketingBoss');
|
||||||
|
INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (108,'ItemPlacement','*','WRITE','ALLOW','ROLE','marketingBoss');
|
||||||
|
|
||||||
|
INSERT INTO `salix`.`ACL`(`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (108,'ItemPlacement','*','WRITE','ALLOW','ROLE','marketingBoss');
|
||||||
|
|
||||||
|
INSERT INTO `ACLCopia` (`id`,`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) VALUES (59,'CreditInsurance','*','READ','ALLOW','ROLE','employee');
|
||||||
|
DELETE FROM `salix`.`ACL` WHERE `id`='67';
|
||||||
|
DELETE FROM `salix`.`ACL` WHERE `id`='74';
|
||||||
|
DELETE FROM `salix`.`ACL` WHERE `id`='92';
|
||||||
|
DELETE FROM `salix`.`ACL` WHERE `id`='93';
|
||||||
|
DELETE FROM `salix`.`ACL` WHERE `id`='95';
|
|
@ -1,47 +0,0 @@
|
||||||
ALTER TABLE `vn2008`.`Ordenes`
|
|
||||||
ADD COLUMN `isOk` TINYINT(1) NULL DEFAULT NULL AFTER `odbc_date`,
|
|
||||||
ADD COLUMN `requesterFk` INT(11) NULL DEFAULT NULL AFTER `isOk`,
|
|
||||||
ADD COLUMN `atenderFk` INT(11) NULL DEFAULT NULL AFTER `requesterFk`;
|
|
||||||
|
|
||||||
ALTER TABLE `vn2008`.`Ordenes`
|
|
||||||
ADD COLUMN `ticketFk` INT(11) NULL DEFAULT NULL AFTER `atenderFk`;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE `vn2008`.`Ordenes`
|
|
||||||
ADD INDEX `fgnRequester_idx` (`requesterFk` ASC),
|
|
||||||
ADD INDEX `fgnAtender_idx` (`atenderFk` ASC);
|
|
||||||
ALTER TABLE `vn2008`.`Ordenes`
|
|
||||||
ADD CONSTRAINT `fgnRequester`
|
|
||||||
FOREIGN KEY (`requesterFk`)
|
|
||||||
REFERENCES `vn2008`.`Trabajadores` (`Id_Trabajador`)
|
|
||||||
ON DELETE RESTRICT
|
|
||||||
ON UPDATE CASCADE,
|
|
||||||
ADD CONSTRAINT `fgnAtender`
|
|
||||||
FOREIGN KEY (`atenderFk`)
|
|
||||||
REFERENCES `vn2008`.`Trabajadores` (`Id_Trabajador`)
|
|
||||||
ON DELETE RESTRICT
|
|
||||||
ON UPDATE CASCADE,
|
|
||||||
ADD CONSTRAINT `fgbMovimiento`
|
|
||||||
FOREIGN KEY (`Id_Movimiento`)
|
|
||||||
REFERENCES `vn2008`.`Movimientos` (`Id_Movimiento`)
|
|
||||||
ON DELETE RESTRICT
|
|
||||||
ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
ALTER TABLE `vn2008`.`Ordenes`
|
|
||||||
DROP FOREIGN KEY `fgbMovimiento`;
|
|
||||||
ALTER TABLE `vn2008`.`Ordenes`
|
|
||||||
ADD CONSTRAINT `fgbMovimiento`
|
|
||||||
FOREIGN KEY (`Id_Movimiento`)
|
|
||||||
REFERENCES `vn2008`.`Movimientos` (`Id_Movimiento`)
|
|
||||||
ON DELETE SET NULL
|
|
||||||
ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
ALTER TABLE `vn2008`.`Ordenes`
|
|
||||||
ADD INDEX `fgnTicket_idx` (`ticketFk` ASC);
|
|
||||||
ALTER TABLE `vn2008`.`Ordenes`
|
|
||||||
ADD CONSTRAINT `fgnTicket`
|
|
||||||
FOREIGN KEY (`ticketFk`)
|
|
||||||
REFERENCES `vn2008`.`Tickets` (`Id_Ticket`)
|
|
||||||
ON DELETE RESTRICT
|
|
||||||
ON UPDATE CASCADE;
|
|
|
@ -1,19 +0,0 @@
|
||||||
USE `vn`;
|
|
||||||
CREATE
|
|
||||||
OR REPLACE ALGORITHM = UNDEFINED
|
|
||||||
DEFINER = `root`@`%`
|
|
||||||
SQL SECURITY DEFINER
|
|
||||||
VIEW `ticketRequest` AS
|
|
||||||
SELECT
|
|
||||||
`t`.`Id_ORDEN` AS `id`,
|
|
||||||
`t`.`ORDEN` AS `description`,
|
|
||||||
`t`.`requesterFk` AS `requesterFk`,
|
|
||||||
`t`.`CodCOMPRADOR` AS `atenderFk`,
|
|
||||||
`t`.`CANTIDAD` AS `quantity`,
|
|
||||||
`t`.`PRECIOMAX` AS `price`,
|
|
||||||
`t`.`isOk` AS `isOk`,
|
|
||||||
`t`.`Id_Movimiento` AS `saleFk`,
|
|
||||||
`t`.`ticketFk` AS `ticketFk`,
|
|
||||||
`t`.`odbc_date` AS `created`
|
|
||||||
FROM
|
|
||||||
`vn2008`.`Ordenes` `t`;
|
|
|
@ -1,134 +0,0 @@
|
||||||
USE `vn`;
|
|
||||||
DROP procedure IF EXISTS `ticketComponentPreview`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
USE `vn`$$
|
|
||||||
CREATE DEFINER=`root`@`%` PROCEDURE `ticketComponentPreview`(
|
|
||||||
vTicketFk INT,
|
|
||||||
vLanded DATE,
|
|
||||||
vAddressFk INT,
|
|
||||||
vAgencyModeFk INT,
|
|
||||||
vWarehouseFk SMALLINT)
|
|
||||||
BEGIN
|
|
||||||
/**
|
|
||||||
* Devuelve un listado previo de
|
|
||||||
* componentes para un ticket
|
|
||||||
*
|
|
||||||
* @param vTicketFk Id del ticket
|
|
||||||
* @param vLanded Fecha de recepcion
|
|
||||||
* @param vAddressFk Id del consignatario
|
|
||||||
* @param vAgencyModeFk Id del modo de agencia
|
|
||||||
* @param vWarehouseFk Id del almacén
|
|
||||||
*/
|
|
||||||
|
|
||||||
DECLARE vAgencyFk INT;
|
|
||||||
DECLARE vShipped DATE;
|
|
||||||
DECLARE vBuyOrderItem INT DEFAULT 100;
|
|
||||||
|
|
||||||
DECLARE vHasDataChanged BOOL DEFAULT FALSE;
|
|
||||||
DECLARE vHasAddressChanged BOOL;
|
|
||||||
DECLARE vHasAgencyModeChanged BOOL DEFAULT FALSE;
|
|
||||||
DECLARE vHasWarehouseChanged BOOL DEFAULT FALSE;
|
|
||||||
|
|
||||||
DECLARE vAddressTypeRateFk INT DEFAULT NULL;
|
|
||||||
DECLARE vAgencyModeTypeRateFk INT DEFAULT NULL;
|
|
||||||
|
|
||||||
DECLARE vHasChangeAll BOOL DEFAULT FALSE;
|
|
||||||
|
|
||||||
SELECT DATE(landed) <> vLanded,
|
|
||||||
addressFk <> vAddressFk,
|
|
||||||
agencyModeFk <> vAgencyModeFk,
|
|
||||||
warehouseFk <> vWarehouseFk
|
|
||||||
INTO
|
|
||||||
vHasDataChanged,
|
|
||||||
vHasAddressChanged,
|
|
||||||
vHasAgencyModeChanged,
|
|
||||||
vHasWarehouseChanged
|
|
||||||
FROM vn.ticket t
|
|
||||||
WHERE t.id = vTicketFk;
|
|
||||||
/*SELECT vHasDataChanged,
|
|
||||||
vHasAddressChanged,
|
|
||||||
vHasAgencyModeChanged,
|
|
||||||
vHasWarehouseChanged;
|
|
||||||
*/
|
|
||||||
IF vHasDataChanged OR vHasWarehouseChanged THEN
|
|
||||||
SET vHasChangeAll = TRUE;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF vHasAddressChanged THEN
|
|
||||||
SET vAddressTypeRateFk = 5;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF vHasAgencyModeChanged THEN
|
|
||||||
SET vAgencyModeTypeRateFk = 6;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
SELECT agencyFk INTO vAgencyFk
|
|
||||||
FROM agencyMode
|
|
||||||
WHERE id = vAgencyModeFk;
|
|
||||||
|
|
||||||
CALL agencyHourGetShipped(vLanded, vAddressFk, vAgencyFk);
|
|
||||||
|
|
||||||
SELECT shipped INTO vShipped
|
|
||||||
FROM tmp.agencyHourGetShipped
|
|
||||||
WHERE warehouseFk = vWarehouseFK;
|
|
||||||
|
|
||||||
CALL buyUltimate(vWarehouseFK, vShipped);
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
|
|
||||||
CREATE TEMPORARY TABLE tmp.ticketLot ENGINE = MEMORY (
|
|
||||||
SELECT
|
|
||||||
vWarehouseFK AS warehouseFk,
|
|
||||||
NULL AS available,
|
|
||||||
s.itemFk,
|
|
||||||
bu.buyFk
|
|
||||||
FROM sale s
|
|
||||||
LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
|
|
||||||
WHERE s.ticketFk = vTicketFk
|
|
||||||
AND s.itemFk != vBuyOrderItem
|
|
||||||
GROUP BY bu.warehouseFk, bu.itemFk);
|
|
||||||
|
|
||||||
CALL ticketComponentCalculate(vAddressFk, vAgencyModeFk);
|
|
||||||
|
|
||||||
/*SELECT *,vHasChangeAll,cr.isRenewable = FALSE,vHasChangeAll,
|
|
||||||
NOT (cr.componentTypeRate <=> vAddressTypeRateFk),NOT (cr.componentTypeRate <=> vAgencyModeTypeRateFk),
|
|
||||||
NOT (cr.componentTypeRate <=> vAddressTypeRateFk) OR NOT (cr.componentTypeRate <=> vAgencyModeTypeRateFk)
|
|
||||||
FROM saleComponent sc
|
|
||||||
JOIN sale s ON s.id = sc.saleFk
|
|
||||||
JOIN ticket t ON t.id = s.ticketFk
|
|
||||||
JOIN componentRate cr ON cr.id = sc.componentFk
|
|
||||||
WHERE s.ticketFk = vTicketFk
|
|
||||||
AND (cr.isRenewable = FALSE
|
|
||||||
OR
|
|
||||||
(NOT vHasChangeAll
|
|
||||||
AND (NOT (cr.componentTypeRate <=> vAddressTypeRateFk
|
|
||||||
OR cr.componentTypeRate <=> vAgencyModeTypeRateFk))));*/
|
|
||||||
/*SELECT * FROM tmp.ticketComponent;*/
|
|
||||||
-- Inserta los componentes que NO seran modificados
|
|
||||||
REPLACE INTO tmp.ticketComponent (warehouseFk, itemFk, componentFk, cost)
|
|
||||||
SELECT t.warehouseFk, s.itemFk, sc.componentFk, sc.value
|
|
||||||
FROM saleComponent sc
|
|
||||||
JOIN sale s ON s.id = sc.saleFk
|
|
||||||
JOIN ticket t ON t.id = s.ticketFk
|
|
||||||
JOIN componentRate cr ON cr.id = sc.componentFk
|
|
||||||
WHERE s.ticketFk = vTicketFk
|
|
||||||
AND (cr.isRenewable = FALSE
|
|
||||||
OR
|
|
||||||
(NOT vHasChangeAll
|
|
||||||
AND (NOT (cr.componentTypeRate <=> vAddressTypeRateFk
|
|
||||||
OR cr.componentTypeRate <=> vAgencyModeTypeRateFk))));
|
|
||||||
/*SELECT * FROM tmp.ticketComponent;*/
|
|
||||||
SET @shipped = vShipped;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE
|
|
||||||
tmp.agencyHourGetShipped,
|
|
||||||
tmp.buyUltimate,
|
|
||||||
tmp.ticketLot;
|
|
||||||
|
|
||||||
IF IFNULL(vShipped, CURDATE() - 1) < CURDATE() THEN
|
|
||||||
CALL util.throw('NO_AGENCY_AVAILABLE');
|
|
||||||
END IF;
|
|
||||||
END$$
|
|
||||||
|
|
||||||
DELIMITER ;
|
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
USE `vn`;
|
|
||||||
DROP procedure IF EXISTS `ticketComponentPriceDifference`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
USE `vn`$$
|
|
||||||
CREATE DEFINER=`root`@`%` PROCEDURE `ticketComponentPriceDifference`(
|
|
||||||
vTicketFk INT,
|
|
||||||
vLanded DATE,
|
|
||||||
vAddressFk INT,
|
|
||||||
vAgencyModeFk INT,
|
|
||||||
vWarehouseFk INT)
|
|
||||||
BEGIN
|
|
||||||
/**
|
|
||||||
* Devuelve las diferencias de precio
|
|
||||||
* de los movimientos de un ticket.
|
|
||||||
*
|
|
||||||
* @param vTicketFk Id del ticket
|
|
||||||
* @param vLanded Fecha de recepcion
|
|
||||||
* @param vAddressFk Id del consignatario
|
|
||||||
* @param vAgencyModeFk Id del modo de agencia
|
|
||||||
* @param vWarehouseFk Id del almacén
|
|
||||||
*/
|
|
||||||
CALL vn.ticketComponentPreview(vTicketFk, vLanded, vAddressFk, vAgencyModeFk, vWarehouseFk);
|
|
||||||
|
|
||||||
SELECT s.itemFk,
|
|
||||||
i.name,
|
|
||||||
i.size,
|
|
||||||
i.category,
|
|
||||||
IFNULL(s.quantity, 0) AS quantity,
|
|
||||||
IFNULL(s.price, 0) AS price,
|
|
||||||
ROUND(SUM(tc.cost), 2) AS newPrice,
|
|
||||||
s.quantity * (s.price - ROUND(SUM(tc.cost), 2)) difference,
|
|
||||||
s.id AS saleFk
|
|
||||||
FROM sale s
|
|
||||||
JOIN item i ON i.id = s.itemFk
|
|
||||||
JOIN ticket t ON t.id = s.ticketFk
|
|
||||||
LEFT JOIN tmp.ticketComponent tc ON tc.itemFk = s.itemFk
|
|
||||||
AND tc.warehouseFk = t.warehouseFk
|
|
||||||
LEFT JOIN saleComponent sc ON sc.saleFk = s.id
|
|
||||||
AND sc.componentFk = tc.componentFk
|
|
||||||
LEFT JOIN componentRate cr ON cr.id = tc.componentFk
|
|
||||||
WHERE
|
|
||||||
t.id = vTicketFk
|
|
||||||
AND IF(sc.componentFk IS NULL
|
|
||||||
AND cr.classRate IS NOT NULL, FALSE, TRUE)
|
|
||||||
GROUP BY s.id ORDER BY s.id;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE
|
|
||||||
tmp.ticketComponent,
|
|
||||||
tmp.ticketComponentPrice;
|
|
||||||
END$$
|
|
||||||
|
|
||||||
DELIMITER ;
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
USE `hedera`;
|
|
||||||
CREATE
|
|
||||||
OR REPLACE ALGORITHM = UNDEFINED
|
|
||||||
DEFINER = `root`@`%`
|
|
||||||
SQL SECURITY DEFINER
|
|
||||||
VIEW `orderTicket` AS
|
|
||||||
SELECT
|
|
||||||
`b`.`order_id` AS `orderFk`, `b`.`Id_Ticket` AS `ticketFk`
|
|
||||||
FROM
|
|
||||||
`vn2008`.`order_Tickets` `b`;
|
|
|
@ -1,68 +0,0 @@
|
||||||
USE `vn`;
|
|
||||||
DROP function IF EXISTS `clientGetMana`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
USE `vn`$$
|
|
||||||
CREATE DEFINER=`root`@`%` FUNCTION `clientGetMana`(vClient INT) RETURNS decimal(10,2)
|
|
||||||
BEGIN
|
|
||||||
/**
|
|
||||||
* Devuelve el maná del cliente.
|
|
||||||
*
|
|
||||||
* @param vClient Id del cliente
|
|
||||||
* @return Maná del cliente
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
DECLARE vMana DECIMAL(10,2);
|
|
||||||
DECLARE vFromDated DATE;
|
|
||||||
|
|
||||||
SELECT max(dated) INTO vFromDated
|
|
||||||
FROM vn.clientManaCache;
|
|
||||||
|
|
||||||
SELECT sum(mana) INTO vMana
|
|
||||||
FROM
|
|
||||||
(
|
|
||||||
SELECT mana
|
|
||||||
FROM vn.clientManaCache
|
|
||||||
WHERE clientFk = vClient
|
|
||||||
AND dated = vFromDated
|
|
||||||
|
|
||||||
UNION ALL
|
|
||||||
|
|
||||||
SELECT s.quantity * Valor
|
|
||||||
FROM vn.ticket t
|
|
||||||
JOIN vn.address a ON a.id = t.addressFk
|
|
||||||
JOIN vn.sale s on s.ticketFk = t.id
|
|
||||||
JOIN vn2008.Movimientos_componentes mc on mc.Id_Movimiento = s.id
|
|
||||||
WHERE Id_Componente IN (37, 39)
|
|
||||||
AND t.shipped > vFromDated
|
|
||||||
AND t.shipped < TIMESTAMPADD(DAY,1,CURDATE())
|
|
||||||
AND a.clientFk = vClient
|
|
||||||
|
|
||||||
UNION ALL
|
|
||||||
|
|
||||||
SELECT - Entregado
|
|
||||||
FROM vn2008.Recibos r
|
|
||||||
JOIN vn2008.Clientes c using(Id_Cliente)
|
|
||||||
WHERE r.Id_Banco = 66
|
|
||||||
AND r.Fechacobro > vFromDated
|
|
||||||
AND r.Fechacobro <= CURDATE()
|
|
||||||
AND c.Id_Cliente = vClient
|
|
||||||
|
|
||||||
UNION ALL
|
|
||||||
|
|
||||||
SELECT g.Importe
|
|
||||||
FROM vn2008.Greuges g
|
|
||||||
JOIN vn2008.Clientes c using(Id_Cliente)
|
|
||||||
WHERE g.Greuges_type_id = 3 -- Maná
|
|
||||||
AND g.Fecha > vFromDated
|
|
||||||
AND g.Fecha <= CURDATE()
|
|
||||||
AND c.Id_Cliente = vClient
|
|
||||||
|
|
||||||
) sub;
|
|
||||||
|
|
||||||
RETURN IFNULL(vMana,0);
|
|
||||||
|
|
||||||
END$$
|
|
||||||
|
|
||||||
DELIMITER ;
|
|
|
@ -1,50 +0,0 @@
|
||||||
USE `cache`;
|
|
||||||
DROP procedure IF EXISTS `last_buy_refresh`;
|
|
||||||
|
|
||||||
DELIMITER $$
|
|
||||||
USE `cache`$$
|
|
||||||
CREATE DEFINER=`root`@`%` PROCEDURE `last_buy_refresh`(vRefresh BOOL)
|
|
||||||
proc: BEGIN
|
|
||||||
/**
|
|
||||||
* Crea o actualiza la cache con la última compra y fecha de cada
|
|
||||||
* artículo hasta ayer. Para obtener la última compra hasta una fecha
|
|
||||||
* determinada utilizar el procedimiento vn2008.item_last_buy_().
|
|
||||||
*
|
|
||||||
* @param vRefresh %TRUE para forzar el recálculo de la cache
|
|
||||||
**/
|
|
||||||
DECLARE vCalc INT;
|
|
||||||
DECLARE started DATE;
|
|
||||||
DECLARE ended DATE;
|
|
||||||
DECLARE vLastRefresh DATE;
|
|
||||||
|
|
||||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
|
||||||
BEGIN
|
|
||||||
CALL cache_calc_unlock (vCalc);
|
|
||||||
RESIGNAL;
|
|
||||||
END;
|
|
||||||
|
|
||||||
CALL cache_calc_start (vCalc, vRefresh, 'last_buy', NULL);
|
|
||||||
|
|
||||||
IF !vRefresh
|
|
||||||
THEN
|
|
||||||
LEAVE proc;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
-- TODO: ¿Se puede usar la fecha del ultimo inventario?
|
|
||||||
SET started = vn2008.date_inv();-- TIMESTAMPADD(DAY, -90, CURDATE());
|
|
||||||
SET ended = CURDATE(); -- TIMESTAMPADD(DAY, -1, CURDATE());
|
|
||||||
|
|
||||||
CALL vn.buyUltimateFromInterval(NULL, started, ended);
|
|
||||||
|
|
||||||
DELETE FROM last_buy;
|
|
||||||
|
|
||||||
INSERT INTO last_buy (item_id, warehouse_id, buy_id, landing)
|
|
||||||
SELECT itemFk, warehouseFk, buyFk, landed
|
|
||||||
FROM tmp.buyUltimateFromInterval;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tmp.buyUltimateFromInterval;
|
|
||||||
CALL cache_calc_end (vCalc);
|
|
||||||
END$$
|
|
||||||
|
|
||||||
DELIMITER ;
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
use `vn`;
|
|
||||||
CREATE TABLE `ticketService` (
|
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`description` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
|
|
||||||
`quantity` int(11) NOT NULL DEFAULT '0',
|
|
||||||
`price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
|
|
||||||
`taxClassFk` tinyint(3) unsigned DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `ticketServiceIvaGroup_idx` (`taxClassFk`),
|
|
||||||
CONSTRAINT `ticketServiceIvaGroup` FOREIGN KEY (`taxClassFk`) REFERENCES `vn2008`.`iva_group` (`iva_group_id`) ON UPDATE CASCADE
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
File diff suppressed because one or more lines are too long
|
@ -498,14 +498,14 @@ INSERT INTO `vn`.`intrastat`(`id`, `description`, `taxClassFk`, `taxCodeFk`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`item`(`id`, `name`,`typeFk`,`size`,`inkFk`,`category`,`stems`,`originFk`,`description`,`producerFk`,`intrastatFk`,`isOnOffer`,`expenceFk`,`isBargain`,`comment`,`relevancy`,`image`,`taxClassFk`,`longName`,`subName`,`tag5`,`value5`,`tag6`,`value6`,`tag7`,`value7`,`tag8`,`value8`)
|
INSERT INTO `vn`.`item`(`id`, `name`,`typeFk`,`size`,`inkFk`,`category`,`stems`,`originFk`,`description`,`producerFk`,`intrastatFk`,`isOnOffer`,`expenceFk`,`isBargain`,`comment`,`relevancy`,`image`,`taxClassFk`,`longName`,`subName`,`tag5`,`value5`,`tag6`,`value6`,`tag7`,`value7`,`tag8`,`value8`)
|
||||||
VALUES
|
VALUES
|
||||||
(1 , 'Gem of Time', 2, 70, 'AMA', 'EXT', 1 , 1, 'One of the infinity gems', 1, 06021010, 0, 2000000000, 0, NULL, 0, 66540, 1, 'Gem of Time', NULL, 'Medida', '70', 'Color', 'Amarillo' , 'Categoria', 'EXT', 'Tallos', '1'),
|
(1 , 'Object1 Gem1 5', 2, 70, 'AMA', 'EXT', 1 , 1, 'One of the infinity gems', 1, 06021010, 0, 2000000000, 0, NULL, 0, 66540, 1, 'Object1 Gem1 5', NULL, 'Medida', '70', 'Color', 'Amarillo' , 'Categoria', 'EXT', 'Tallos', '1'),
|
||||||
(2 , 'Gem of Mind', 2, 70, 'AZL', 'EXT', 1 , 2, 'One of the infinity gems', 1, 06021010, 0, 2000000000, 0, NULL, 0, 65540, 1, 'Gem of Mind', NULL, 'Medida', '70', 'Color', 'Azul' , 'Categoria', 'EXT', 'Tallos', '1'),
|
(2 , 'Object2 Gem2 3', 2, 70, 'AZL', 'EXT', 1 , 2, 'One of the infinity gems', 1, 06021010, 0, 2000000000, 0, NULL, 0, 65540, 1, 'Object2 Gem2 3', NULL, 'Medida', '70', 'Color', 'Azul' , 'Categoria', 'EXT', 'Tallos', '1'),
|
||||||
(3 , 'Iron Patriot', 1, 60, 'AMR', 'EXT', 1 , 3, 'Rhodeys armor', 1, 05080000, 0, 4751000000, 0, NULL, 0, 61692, 1, 'Iron Patriot', NULL, 'Medida', '60', 'Color', 'Rosa/Amarillo', 'Categoria', 'EXT', 'Tallos', '1'),
|
(3 , 'Object3 Armor 3', 1, 60, 'AMR', 'EXT', 1 , 3, 'Rhodeys armor', 1, 05080000, 0, 4751000000, 0, NULL, 0, 61692, 1, 'Object3 Armor 3', NULL, 'Medida', '60', 'Color', 'Rosa/Amarillo', 'Categoria', 'EXT', 'Tallos', '1'),
|
||||||
(4 , 'Mark I', 1, 60, 'AMR', 'EXT', 1 , 1, 'Iron Mans first armor', 1, 05080000, 1, 4751000000, 0, NULL, 0, 66090, 2, 'Mark I', NULL, 'Medida', '60', 'Color', 'Rosa/Amarillo', 'Categoria', 'EXT', 'Tallos', '1'),
|
(4 , 'Object4 Armor2 2', 1, 60, 'AMR', 'EXT', 1 , 1, 'Iron Mans first armor', 1, 05080000, 1, 4751000000, 0, NULL, 0, 66090, 2, 'Object4 Armor2 2', NULL, 'Medida', '60', 'Color', 'Rosa/Amarillo', 'Categoria', 'EXT', 'Tallos', '1'),
|
||||||
(5 , 'Mjolnir', 3, 30, 'GRE', 'EXT', 1 , 2, 'Thors hammer!', 2, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, 'Mjolnir', NULL, 'Medida', '30', 'Color', 'Azul' , 'Categoria', 'EXT', 'Tallos', '1'),
|
(5 , 'Object5 Weapon 50', 3, 30, 'GRE', 'EXT', 1 , 2, 'Thors hammer!', 2, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, 'Object5 Weapon 50', NULL, 'Medida', '30', 'Color', 'Azul' , 'Categoria', 'EXT', 'Tallos', '1'),
|
||||||
(6 , 'Broken Box', 5, 30, 'GRE', 'EXT', 1 , 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, 'Legendary Box', NULL, 'Medida', '30', 'Color', 'Gris' , NULL, NULL, NULL, NULL),
|
(6 , 'Broken Box', 5, 30, 'GRE', 'EXT', 1 , 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, 'Broken Box', NULL, 'Medida', '30', 'Color', 'Gris' , NULL, NULL, NULL, NULL),
|
||||||
(7 , 'Legendary Box', 5, 90, 'AZL', 'EXT', 1 , 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, 'Broken Box', NULL, 'Medida', '90', 'Color', 'Gris' , NULL, NULL, NULL, NULL),
|
(7 , 'Legendary Box', 5, 90, 'AZL', 'EXT', 1 , 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, 'Legendary Box', NULL, 'Medida', '90', 'Color', 'Gris' , NULL, NULL, NULL, NULL),
|
||||||
(71, 'ShippingCost', 4, NULL, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, NULL, 2, 'ShippingCost', NULL, NULL , NULL, NULL , NULL , NULL, NULL, NULL, NULL);
|
(71, 'ShippingCost', 4, NULL, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, NULL, 2, 'ShippingCost', NULL, NULL , NULL, NULL , NULL , NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`)
|
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -529,19 +529,19 @@ INSERT INTO `vn`.`ticketPackaging`(`id`, `ticketFk`, `packagingFk`, `quantity`,
|
||||||
|
|
||||||
INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`)
|
INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 1, 1 , 'Gem of Time', 5, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(1, 1, 1 , 'Object1 Gem1 5', 5, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(2, 2, 1 , 'Gem of Mind', 10, 1.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(2, 2, 1 , 'Object2 Gem2 3', 10, 1.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(3, 1, 1 , 'Gem of Time', 2, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(3, 1, 1 , 'Object1 Gem1 5', 2, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(4, 4, 1 , 'Mark I' , 20, 3.06, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(4, 4, 1 , 'Object4 Armor2 2' , 20, 3.06, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(5, 1, 2 , 'Gem of Time', 10, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -10 DAY)),
|
(5, 1, 2 , 'Object1 Gem1 5', 10, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -10 DAY)),
|
||||||
(6, 1, 3 , 'Gem of Time', 15, 6.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -5 DAY)),
|
(6, 1, 3 , 'Object1 Gem1 5', 15, 6.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -5 DAY)),
|
||||||
(7, 2, 11, 'Gem of Mind', 15, 1.30, 0, 0, 0, CURDATE()),
|
(7, 2, 11, 'Object2 Gem2 3', 15, 1.30, 0, 0, 0, CURDATE()),
|
||||||
(8, 4, 11, 'Mark I' , 10, 3.26, 0, 0, 0, CURDATE()),
|
(8, 4, 11, 'Object4 Armor2 2' , 10, 3.26, 0, 0, 0, CURDATE()),
|
||||||
(9, 1, 16, 'Gem of Time', 5, 9.10, 0, 0, 0, CURDATE()),
|
(9, 1, 16, 'Object1 Gem1 5', 5, 9.10, 0, 0, 0, CURDATE()),
|
||||||
(10, 2, 16, 'Gem of Mind', 10, 1.07, 0, 0, 0, CURDATE()),
|
(10, 2, 16, 'Object2 Gem2 3', 10, 1.07, 0, 0, 0, CURDATE()),
|
||||||
(11, 1, 16, 'Gem of Time', 2, 9.10, 0, 0, 0, CURDATE()),
|
(11, 1, 16, 'Object1 Gem1 5', 2, 9.10, 0, 0, 0, CURDATE()),
|
||||||
(12, 4, 16, 'Mark I' , 20, 3.06, 0, 0, 0, CURDATE()),
|
(12, 4, 16, 'Object4 Armor2 2' , 20, 3.06, 0, 0, 0, CURDATE()),
|
||||||
(13, 2, 8, 'Gem of Mind', 15, 1.30, 0, 0, 0, CURDATE());
|
(13, 2, 8, 'Object2 Gem2 3', 15, 1.30, 0, 0, 0, CURDATE());
|
||||||
|
|
||||||
INSERT INTO `vn`.`saleChecked`(`saleFk`, `isChecked`)
|
INSERT INTO `vn`.`saleChecked`(`saleFk`, `isChecked`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -677,7 +677,7 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
|
||||||
(19, 3, 1 , 'Green' , 5),
|
(19, 3, 1 , 'Green' , 5),
|
||||||
(20, 3, 67, 'EXT' , 6),
|
(20, 3, 67, 'EXT' , 6),
|
||||||
(21, 3, 23, '0' , 7),
|
(21, 3, 23, '0' , 7),
|
||||||
(22, 4, 56, 'Object3', 1),
|
(22, 4, 56, 'Object4', 1),
|
||||||
(23, 4, 58, 'Armor2' , 2),
|
(23, 4, 58, 'Armor2' , 2),
|
||||||
(24, 4, 4, '2' , 3),
|
(24, 4, 4, '2' , 3),
|
||||||
(25, 4, 36, 'Stark' , 4),
|
(25, 4, 36, 'Stark' , 4),
|
||||||
|
@ -1026,7 +1026,13 @@ INSERT INTO `vn2008`.`workerTeam`(`id`, `team`, `user`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requesterFk`, `atenderFk`, `quantity`, `price`, `isOk`, `saleFk`, `ticketFk`, `created`)
|
INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requesterFk`, `atenderFk`, `quantity`, `price`, `isOk`, `saleFk`, `ticketFk`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'Gem of Time', 18, 35, 5, 9.10, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(1, 'Object1 Gem1 5', 18, 35, 5, 9.10, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(2, 'Gem of Mind', 18, 35, 10, 1.07, 0, NULL, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(2, 'Object2 Gem2 3', 18, 35, 10, 1.07, 0, NULL, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(3, 'Mark I', 18, 35, 20, 3.06, 0, NULL, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
(3, 'Object4 Armor2 2', 18, 35, 20, 3.06, 0, NULL, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)),
|
||||||
(4, 'Gem of Mind', 18, 35, 15, 1.30, NULL, NULL, 11, CURDATE());
|
(4, 'Object2 Gem2 3', 18, 35, 15, 1.30, NULL, NULL, 11, CURDATE());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
delete from `account`.`roleRole` where role =52 and inheritsFrom = 35;
|
||||||
|
|
||||||
|
delete from `account`.`roleInherit` where role =52 and inheritsFrom = 35;
|
File diff suppressed because it is too large
Load Diff
|
@ -9,7 +9,7 @@ let verbose = false;
|
||||||
if (process.argv[2] === '--v')
|
if (process.argv[2] === '--v')
|
||||||
verbose = true;
|
verbose = true;
|
||||||
|
|
||||||
serviceRoot = __dirname;
|
loopbackApp = `vn-loopback/server/server`;
|
||||||
|
|
||||||
let Jasmine = require('jasmine');
|
let Jasmine = require('jasmine');
|
||||||
let jasmine = new Jasmine();
|
let jasmine = new Jasmine();
|
||||||
|
|
Loading…
Reference in New Issue