feat(POS-FIX-11): completed feature
This commit is contained in:
@@ -1338,6 +1338,7 @@ export async function registerPosRoutes(app: FastifyInstance, deps: PosRouteDeps
|
||||
items: { type: 'array', minItems: 1, items: { type: 'object' } },
|
||||
payments: { type: 'array', minItems: 0, items: { type: 'object' } },
|
||||
customerId: { type: 'string', format: 'uuid' },
|
||||
posLabel: { type: 'string', maxLength: 100 },
|
||||
},
|
||||
},
|
||||
response: {
|
||||
@@ -1389,6 +1390,7 @@ export async function registerPosRoutes(app: FastifyInstance, deps: PosRouteDeps
|
||||
items: z.array(z.union([freeLine, stockLine])).min(1),
|
||||
payments: z.array(payment).min(0),
|
||||
customerId: z.string().uuid().optional(),
|
||||
posLabel: z.string().max(100).optional(),
|
||||
}),
|
||||
request.body ?? {},
|
||||
);
|
||||
@@ -1655,6 +1657,7 @@ export async function registerPosRoutes(app: FastifyInstance, deps: PosRouteDeps
|
||||
o.discount_cents AS "discountCents", o.created_at AS "createdAt",
|
||||
o.store_id AS "storeId", o.terminal_id AS "terminalId",
|
||||
o.cash_session_id AS "cashSessionId",
|
||||
o.pos_label AS "posLabel",
|
||||
COALESCE(payments.sum_paid, 0)::int AS "paidCents",
|
||||
(o.total_cents - COALESCE(payments.sum_paid, 0))::int AS "outstandingCents",
|
||||
u.email AS "userEmail"
|
||||
|
||||
Reference in New Issue
Block a user