8355-testToMaster #3336
|
@ -2128,7 +2128,7 @@ INSERT INTO `ACL` VALUES (746,'Claim','getSummary','READ','ALLOW','ROLE','claimV
|
||||||
INSERT INTO `ACL` VALUES (747,'CplusRectificationType','*','READ','ALLOW','ROLE','administrative',NULL);
|
INSERT INTO `ACL` VALUES (747,'CplusRectificationType','*','READ','ALLOW','ROLE','administrative',NULL);
|
||||||
INSERT INTO `ACL` VALUES (748,'SiiTypeInvoiceOut','*','READ','ALLOW','ROLE','salesPerson',NULL);
|
INSERT INTO `ACL` VALUES (748,'SiiTypeInvoiceOut','*','READ','ALLOW','ROLE','salesPerson',NULL);
|
||||||
INSERT INTO `ACL` VALUES (749,'InvoiceCorrectionType','*','READ','ALLOW','ROLE','salesPerson',NULL);
|
INSERT INTO `ACL` VALUES (749,'InvoiceCorrectionType','*','READ','ALLOW','ROLE','salesPerson',NULL);
|
||||||
INSERT INTO `ACL` VALUES (750,'InvoiceOut','transferInvoice','WRITE','ALLOW','ROLE','administrative',NULL);
|
INSERT INTO `ACL` VALUES (750,'InvoiceOut','transfer','WRITE','ALLOW','ROLE','administrative',NULL);
|
||||||
INSERT INTO `ACL` VALUES (751,'Application','executeProc','*','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (751,'Application','executeProc','*','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (752,'Application','executeFunc','*','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (752,'Application','executeFunc','*','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (753,'NotificationSubscription','getList','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (753,'NotificationSubscription','getList','READ','ALLOW','ROLE','employee',NULL);
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
ALTER TABLE vn.`zone` MODIFY COLUMN `price` DECIMAL(10,2);
|
||||||
|
|
|
@ -247,5 +247,7 @@
|
||||||
"The raid information is not correct": "The raid information is not correct",
|
"The raid information is not correct": "The raid information is not correct",
|
||||||
"Payment method is required": "Payment method is required",
|
"Payment method is required": "Payment method is required",
|
||||||
"Sales already moved": "Sales already moved",
|
"Sales already moved": "Sales already moved",
|
||||||
"Holidays to past days not available": "Holidays to past days not available"
|
"Holidays to past days not available": "Holidays to past days not available",
|
||||||
|
"There are tickets to be invoiced": "There are tickets to be invoiced for this zone, please delete them first",
|
||||||
|
"Price cannot be blank": "Price cannot be blank"
|
||||||
}
|
}
|
||||||
|
|
|
@ -391,8 +391,8 @@
|
||||||
"Sales already moved": "Ya han sido transferidas",
|
"Sales already moved": "Ya han sido transferidas",
|
||||||
"The raid information is not correct": "La información de la redada no es correcta",
|
"The raid information is not correct": "La información de la redada no es correcta",
|
||||||
"There are tickets to be invoiced": "Hay tickets para esta zona, borralos primero",
|
"There are tickets to be invoiced": "Hay tickets para esta zona, borralos primero",
|
||||||
|
"Price cannot be blank": "Price cannot be blank",
|
||||||
"An item type with the same code already exists": "Un tipo con el mismo código ya existe",
|
"An item type with the same code already exists": "Un tipo con el mismo código ya existe",
|
||||||
"Holidays to past days not available": "Las vacaciones a días pasados no están disponibles",
|
"Holidays to past days not available": "Las vacaciones a días pasados no están disponibles",
|
||||||
"Worker not found": "Trabajador no encontrado"
|
"Worker not found": "Trabajador no encontrado"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,4 +14,18 @@ module.exports = Self => {
|
||||||
Self.validatesPresenceOf('agencyModeFk', {
|
Self.validatesPresenceOf('agencyModeFk', {
|
||||||
message: `Agency cannot be blank`
|
message: `Agency cannot be blank`
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Self.validatesPresenceOf('price', {
|
||||||
|
message: 'Price cannot be blank'
|
||||||
|
});
|
||||||
|
Self.validateAsync('price', priceIsValid, {
|
||||||
|
message: 'Price must be greater than 0'
|
||||||
|
});
|
||||||
|
|
||||||
|
async function priceIsValid(err, done) {
|
||||||
|
if (this.price <= 0)
|
||||||
|
err();
|
||||||
|
|
||||||
|
done();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue