fix: error when no branch is found

This commit is contained in:
Methapon Metanipat 2024-10-28 09:35:36 +07:00
parent 123a6fefb7
commit c45db7332d

View file

@ -570,7 +570,7 @@ export class QuotationController extends Controller {
const [customerBranch, employee, product, work, service] = await prisma.$transaction(
async (tx) =>
await Promise.all([
tx.customerBranch.findUnique({
tx.customerBranch.findFirst({
include: {
customer: {
include: {