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:
Riqwan Thamir
2025-03-26 22:26:34 +00:00
committed by GitHub
parent e950e2b2d2
commit 1f8fab3636
19 changed files with 387 additions and 143 deletions
@@ -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(),