From 9dfd112d244bb2ad3f10f59a864bcbe77162f3b5 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 23 Jan 2024 11:36:35 +0700 Subject: change source purchase price --- calculate_price_after_disc.ktr | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'calculate_price_after_disc.ktr') diff --git a/calculate_price_after_disc.ktr b/calculate_price_after_disc.ktr index 5a11b82..1633db0 100644 --- a/calculate_price_after_disc.ktr +++ b/calculate_price_after_disc.ktr @@ -621,13 +621,7 @@ select p.product_id, p.item_code, p.name, b.pricing_group, coalesce(( select - case - when human_last_update is null then coalesce(system_price, 0) - when system_last_update is null then coalesce(product_price, 0) - when system_last_update >= human_last_update then coalesce(system_price, 0) - --when b.pricing_group is null then 0 - else coalesce(product_price, 0) - end as purchase_price + ppd.include_price as purchase_price from purchase_pricelist_dw ppd join product p2 on p2.product_id = ppd.product_id where ppd.product_id = p.product_id -- cgit v1.2.3