#849 order.basic-data
This commit is contained in:
parent
8aa969c5b4
commit
2ed386d12f
|
@ -3,7 +3,7 @@ const app = require(`${servicesDir}/order/server/server`);
|
|||
describe('Order updateBasicData', () => {
|
||||
afterAll(async () => {
|
||||
let validparams = {note: null};
|
||||
let orderId = 22;
|
||||
let orderId = 21;
|
||||
|
||||
await app.models.Order.updateBasicData(validparams, orderId);
|
||||
});
|
||||
|
@ -52,7 +52,7 @@ describe('Order updateBasicData', () => {
|
|||
|
||||
it('should update the client fiscal data and return the count if changes made', async () => {
|
||||
let validparams = {note: 'test note'};
|
||||
let orderId = 22;
|
||||
let orderId = 21;
|
||||
|
||||
let order = await app.models.Order.findById(orderId);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ module.exports = Self => {
|
|||
let order = await Self.app.models.Order.findById(id);
|
||||
let orderRows = await Self.app.models.OrderRow.find({where: {orderFk: id}});
|
||||
|
||||
if (order.confirmed || orderRows.length != 0)
|
||||
if (order.isConfirmed || orderRows.length != 0)
|
||||
throw new UserError(`You can't make changes on the basic data of an confirmed order or with rows`);
|
||||
|
||||
let validUpdateParams = [
|
||||
|
|
Loading…
Reference in New Issue