@flowselections/floriday-verkoop-module 1.0.28 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/components/verkoop/CreateOrderPage.d.ts.map +1 -1
- package/dist-lib/components/verkoop/CreateOrderPage.js +64 -20
- package/dist-lib/integrations/supabase/auth-middleware.d.ts +9 -0
- package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.d.ts +9 -0
- package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/client.server.d.ts +9 -0
- package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
- package/dist-lib/integrations/supabase/types.d.ts +9 -0
- package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
- package/dist-lib/lib/cart-lock.functions.d.ts +9 -0
- package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
- package/dist-lib/lib/cart-planning-settings.functions.d.ts +99 -0
- package/dist-lib/lib/cart-planning-settings.functions.d.ts.map +1 -1
- package/dist-lib/lib/cart-replan.functions.d.ts +27 -0
- package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
- package/dist-lib/lib/cart-replan.functions.js +4 -4
- package/dist-lib/lib/create-order.functions.d.ts +13977 -42
- package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
- package/dist-lib/lib/create-order.functions.js +63 -0
- package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +27 -0
- package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +9 -0
- package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-mirror.functions.d.ts +9 -0
- package/dist-lib/lib/floriday-mirror.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-public.functions.d.ts +63 -0
- package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
- package/dist-lib/lib/floriday-writes.functions.d.ts +45 -0
- package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-buffers.functions.d.ts +27 -0
- package/dist-lib/lib/order-buffers.functions.d.ts.map +1 -1
- package/dist-lib/lib/order-shipments.functions.d.ts +36 -0
- package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
- package/dist-lib/lib/salesorders.functions.d.ts +45 -0
- package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
- package/dist-lib/lib/tradeitems.functions.d.ts +9 -0
- package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -32,7 +32,7 @@ export async function replanBufferInternal(bufferId) {
|
|
|
32
32
|
// Items van alle orders in de buffer.
|
|
33
33
|
const { data: items, error: itErr } = await supabaseAdmin
|
|
34
34
|
.from("order_items")
|
|
35
|
-
.select("id, order_id, product_id, product_name, quantity, products(plants_per_crate, crates_per_layer, layers_per_cart)")
|
|
35
|
+
.select("id, order_id, product_id, product_name, quantity, plants_per_crate, crates_per_layer, layers_per_cart, products(plants_per_crate, crates_per_layer, layers_per_cart)")
|
|
36
36
|
.in("order_id", orderIds.length > 0 ? orderIds : ["00000000-0000-0000-0000-000000000000"]);
|
|
37
37
|
if (itErr)
|
|
38
38
|
throw new Error(itErr.message);
|
|
@@ -43,9 +43,9 @@ export async function replanBufferInternal(bufferId) {
|
|
|
43
43
|
product_id: it.product_id,
|
|
44
44
|
product_name: it.product_name,
|
|
45
45
|
plants: Math.max(0, Number(it.quantity ?? 0)),
|
|
46
|
-
plants_per_crate: Math.max(1, Number(prod.plants_per_crate ?? 1)),
|
|
47
|
-
crates_per_layer: Math.max(1, Number(prod.crates_per_layer ?? 1)),
|
|
48
|
-
layers_per_cart: Math.max(1, Number(prod.layers_per_cart ?? 1)),
|
|
46
|
+
plants_per_crate: Math.max(1, Number(it.plants_per_crate ?? prod.plants_per_crate ?? 1)),
|
|
47
|
+
crates_per_layer: Math.max(1, Number(it.crates_per_layer ?? prod.crates_per_layer ?? 1)),
|
|
48
|
+
layers_per_cart: Math.max(1, Number(it.layers_per_cart ?? prod.layers_per_cart ?? 1)),
|
|
49
49
|
};
|
|
50
50
|
});
|
|
51
51
|
// Item → order-map voor het toewijzen van cart.order_id bij homogene karren.
|