order status when admin create new order for user
deploy to danak / build_and_deploy (push) Has been cancelled
deploy to danak / build_and_deploy (push) Has been cancelled
This commit is contained in:
@@ -205,7 +205,7 @@ export class OrdersService {
|
|||||||
description: dto.description,
|
description: dto.description,
|
||||||
printInvoice: false,
|
printInvoice: false,
|
||||||
tableNumber: dto.tableNumber,
|
tableNumber: dto.tableNumber,
|
||||||
status: OrderStatus.NEW,
|
status: OrderStatus.COMPLETED,
|
||||||
history: [{ status: OrderStatus.NEW, changedAt: new Date() }],
|
history: [{ status: OrderStatus.NEW, changedAt: new Date() }],
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ export class OrdersService {
|
|||||||
const payment = em.create(Payment, {
|
const payment = em.create(Payment, {
|
||||||
order,
|
order,
|
||||||
amount: order.total,
|
amount: order.total,
|
||||||
status: PaymentStatusEnum.Pending,
|
status: PaymentStatusEnum.Paid,
|
||||||
method: order.paymentMethod.method,
|
method: order.paymentMethod.method,
|
||||||
gateway: order.paymentMethod.gateway ?? null,
|
gateway: order.paymentMethod.gateway ?? null,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user