ticket service
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Javi Gallego 2020-09-21 10:35:39 +02:00
parent 3c203e4c8c
commit 8fb674819a
6 changed files with 9 additions and 29 deletions

View File

@ -0,0 +1,9 @@
ALTER TABLE `vn`.`ticketService`
DROP FOREIGN KEY `ticketServiceIvaGroup`;
ALTER TABLE `vn`.`ticketService`
CHANGE COLUMN `taxClassFk` `taxClassFk` TINYINT(3) UNSIGNED NOT NULL DEFAULT 2 ;
ALTER TABLE `vn`.`ticketService`
ADD CONSTRAINT `ticketServiceIvaGroup`
FOREIGN KEY (`taxClassFk`)
REFERENCES `vn`.`taxClass` (`id`)
ON UPDATE CASCADE;

View File

@ -556,10 +556,8 @@ export default {
firstServiceType: 'vn-ticket-service vn-autocomplete[ng-model="service.ticketServiceTypeFk"]',
firstQuantity: 'vn-ticket-service vn-input-number[ng-model="service.quantity"]',
firstPrice: 'vn-ticket-service vn-horizontal:nth-child(1) vn-input-number[ng-model="service.price"]',
firstVatType: 'vn-ticket-service vn-autocomplete[label="Tax class"]',
fistDeleteServiceButton: 'vn-ticket-service form vn-horizontal:nth-child(1) vn-icon-button[icon="delete"]',
newServiceTypeName: '.vn-dialog.shown vn-textfield[ng-model="newServiceType.name"]',
newServiceTypeExpense: '.vn-dialog.shown vn-autocomplete[ng-model="newServiceType.expenseFk"]',
serviceLine: 'vn-ticket-service > form > vn-card > vn-one:nth-child(2) > vn-horizontal',
saveServiceButton: 'button[type=submit]',
saveServiceTypeButton: '.vn-dialog.shown tpl-buttons > button'

View File

@ -78,7 +78,6 @@ describe('Ticket services path', () => {
it('should create a new service type then add price then create the service', async() => {
await page.write(selectors.ticketService.newServiceTypeName, 'Documentos');
await page.autocompleteSearch(selectors.ticketService.newServiceTypeExpense, 'Retencion');
await page.waitToClick(selectors.ticketService.saveServiceTypeButton);
await page.write(selectors.ticketService.firstPrice, '999');
await page.waitToClick(selectors.ticketService.saveServiceButton);
@ -109,13 +108,6 @@ describe('Ticket services path', () => {
expect(result).toEqual('999');
});
it('should confirm the service VAT was created correctly', async() => {
const result = await page
.waitToGetProperty(selectors.ticketService.firstVatType, 'value');
expect(result).toEqual('General VAT');
});
it('should delete the service', async() => {
await page.waitToClick(selectors.ticketService.fistDeleteServiceButton);
await page.waitForNumberOfElements(selectors.ticketService.serviceLine, 0);

View File

@ -17,7 +17,6 @@
},
"expenseFk": {
"type": "Number",
"required": true,
"mysql": {
"columnName": "expenceFk"
}

View File

@ -41,13 +41,6 @@
ng-model="service.price"
step="0.01">
</vn-input-number>
<vn-autocomplete vn-one
url="TaxClasses"
label="Tax class"
show-field="description"
value-field="id"
ng-model="service.taxClassFk">
</vn-autocomplete>
<vn-auto>
<vn-icon-button
pointer
@ -85,17 +78,6 @@
vn-focus>
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete
vn-one
vn-focus
url="Expenses"
label="Expense"
show-field="name"
value-field="id"
ng-model="newServiceType.expenseFk">
</vn-autocomplete>
</vn-horizontal>
</tpl-body>
<tpl-buttons>
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>