feat(core-flows,types,order,cart): assign tax lines only to regular products (#11994)
what: - assign tax lines only to regular products
This commit is contained in:
1 parent
e950e2b2d2
commit
1f8fab3636
19 files changed
+387
-143
No files matched your search
@@ -2886,6 +2886,7 @@ moduleIntegrationTestRunner<ICartModuleService>({
|
||||
variant_option_values: null,
|
||||
requires_shipping: true,
|
||||
is_discountable: true,
|
||||
is_giftcard: false,
|
||||
is_tax_inclusive: false,
|
||||
is_custom_price: false,
|
||||
raw_compare_at_unit_price: null,
|
||||
@@ -2992,6 +2993,7 @@ moduleIntegrationTestRunner<ICartModuleService>({
|
||||
variant_option_values: null,
|
||||
requires_shipping: true,
|
||||
is_discountable: true,
|
||||
is_giftcard: false,
|
||||
is_tax_inclusive: false,
|
||||
is_custom_price: false,
|
||||
raw_compare_at_unit_price: null,
|
||||
|
||||
@@ -757,6 +757,16 @@
|
||||
"default": "true",
|
||||
"mappedType": "boolean"
|
||||
},
|
||||
"is_giftcard": {
|
||||
"name": "is_giftcard",
|
||||
"type": "boolean",
|
||||
"unsigned": false,
|
||||
"autoincrement": false,
|
||||
"primary": false,
|
||||
"nullable": false,
|
||||
"default": "false",
|
||||
"mappedType": "boolean"
|
||||
},
|
||||
"is_tax_inclusive": {
|
||||
"name": "is_tax_inclusive",
|
||||
"type": "boolean",
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Migration } from "@mikro-orm/migrations"
|
||||
|
||||
export class Migration20250326151602 extends Migration {
|
||||
override async up(): Promise<void> {
|
||||
this.addSql(
|
||||
`alter table if exists "cart_line_item" add column if not exists "is_giftcard" boolean not null default false;`
|
||||
)
|
||||
}
|
||||
|
||||
override async down(): Promise<void> {
|
||||
this.addSql(
|
||||
`alter table if exists "cart_line_item" drop column if exists "is_giftcard";`
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@ const LineItem = model
|
||||
variant_option_values: model.json().nullable(),
|
||||
requires_shipping: model.boolean().default(true),
|
||||
is_discountable: model.boolean().default(true),
|
||||
is_giftcard: model.boolean().default(false),
|
||||
is_tax_inclusive: model.boolean().default(false),
|
||||
is_custom_price: model.boolean().default(false),
|
||||
compare_at_unit_price: model.bigNumber().nullable(),
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,15 @@
|
||||
import { Migration } from "@mikro-orm/migrations"
|
||||
|
||||
export class Migration20250326151554 extends Migration {
|
||||
override async up(): Promise<void> {
|
||||
this.addSql(
|
||||
`alter table if exists "order_line_item" add column if not exists "is_giftcard" boolean not null default false;`
|
||||
)
|
||||
}
|
||||
|
||||
override async down(): Promise<void> {
|
||||
this.addSql(
|
||||
`alter table if exists "order_line_item" drop column if exists "is_giftcard";`
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ const _OrderLineItem = model
|
||||
variant_title: model.text().nullable(),
|
||||
variant_option_values: model.json().nullable(),
|
||||
requires_shipping: model.boolean().default(true),
|
||||
is_giftcard: model.boolean().default(false),
|
||||
is_discountable: model.boolean().default(true),
|
||||
is_tax_inclusive: model.boolean().default(false),
|
||||
compare_at_unit_price: model.bigNumber().nullable(),
|
||||
|
||||
Reference in new issue
Block a user