fix(pricing): auto-recalculate all products on financial settings save and support per-product custom rounding override
This commit is contained in:
1 parent
ac15ece619
commit
c4e4a336d8
17 files changed
+15685
-13745
No files matched your search
@@ -33,6 +33,14 @@ export class UpdatePricingSettingsDto {
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
defaultWholesaleMarginPercent!: number;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: 'آیا قیمت تمام محصولات بر اساس فرمول جدید بلافاصله بهروزرسانی شود؟',
|
||||
default: true,
|
||||
})
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
applyToAllProducts?: boolean;
|
||||
}
|
||||
|
||||
export class ApplyGlobalMarginsDto {
|
||||
|
||||
@@ -83,6 +83,19 @@ export class ProductDto {
|
||||
@IsNumber()
|
||||
wholesaleMarginPercent?: number;
|
||||
|
||||
@ApiPropertyOptional({ description: 'گام گرد کردن اختصاصی این محصول (اختیاری)' })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
roundingStep?: number;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
description: 'جهت گرد کردن اختصاصی این محصول (اختیاری)',
|
||||
enum: ['UP', 'DOWN', 'NEAREST'],
|
||||
})
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
roundingMode?: string;
|
||||
|
||||
@ApiPropertyOptional({ description: 'نمایش متنی قیمت' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
|
||||
Reference in new issue
Block a user