fix product
This commit is contained in:
		| @@ -77,9 +77,9 @@ export class ProductService { | |||||||
|         'product.code', |         'product.code', | ||||||
|         'sub_categories.name', |         'sub_categories.name', | ||||||
|         'category.name', |         'category.name', | ||||||
|       ]); |       ]) | ||||||
|       // .addSelect('current_price.price') |       .addSelect('current_price.price') | ||||||
|       // .addSelect('(current_price.price + current_price.mark_up_price) as mark_up_price'); |       .addSelect('(current_price.price + current_price.mark_up_price) as mark_up_price'); | ||||||
|  |  | ||||||
|     if (subCategories != 'null' && subCategories) { |     if (subCategories != 'null' && subCategories) { | ||||||
|       baseQuery.andWhere('product.sub_categories_id = :id', { |       baseQuery.andWhere('product.sub_categories_id = :id', { | ||||||
| @@ -94,9 +94,9 @@ export class ProductService { | |||||||
|     // } |     // } | ||||||
|  |  | ||||||
|     const data = await baseQuery |     const data = await baseQuery | ||||||
|       .skip(page * 10) |       .offset(page * 10) | ||||||
|       .take(10) |       .limit(10) | ||||||
|       .getMany(); |       .getRawMany(); | ||||||
|  |  | ||||||
|     const totalData = await baseQuery.getCount(); |     const totalData = await baseQuery.getCount(); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user