Feat add column admin_price at table product history price
This commit is contained in:
		| @@ -32,4 +32,7 @@ export class ProductHistoryPrice extends BaseModel { | |||||||
|  |  | ||||||
|   @Column('text') |   @Column('text') | ||||||
|   type: productType; |   type: productType; | ||||||
|  |  | ||||||
|  |   @Column() | ||||||
|  |   admin_price: number; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -182,6 +182,7 @@ export class ProductService { | |||||||
|         'supplier.name', |         'supplier.name', | ||||||
|         'category.name', |         'category.name', | ||||||
|         'product.status', |         'product.status', | ||||||
|  |         'current_price.admin_price as admin_price', | ||||||
|       ]) |       ]) | ||||||
|       .addSelect('current_price.price') |       .addSelect('current_price.price') | ||||||
|       .addSelect( |       .addSelect( | ||||||
| @@ -334,7 +335,12 @@ export class ProductService { | |||||||
|         }, |         }, | ||||||
|       ) |       ) | ||||||
|       .select(['product.id']) |       .select(['product.id']) | ||||||
|       .addSelect(['product.name', 'product.code', 'sub_categories.name']) |       .addSelect([ | ||||||
|  |         'product.name', | ||||||
|  |         'product.code', | ||||||
|  |         'sub_categories.name', | ||||||
|  |         'current_price.admin_price as admin_price', | ||||||
|  |       ]) | ||||||
|       .addSelect( |       .addSelect( | ||||||
|         '(current_price.price + current_price.mark_up_price) as price', |         '(current_price.price + current_price.mark_up_price) as price', | ||||||
|       ); |       ); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user