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 23:26:34 +01:00
committed by GitHub
parent e950e2b2d2
commit 1f8fab3636
19 changed files with 387 additions and 143 deletions

View File

@@ -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";`
)
}
}

View File

@@ -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(),