diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2024-01-23 11:36:35 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2024-01-23 11:36:35 +0700 |
| commit | 9dfd112d244bb2ad3f10f59a864bcbe77162f3b5 (patch) | |
| tree | c980feb02444f08167e3c2484e52ff0d8f956980 /calculate_price_after_disc.ktr | |
| parent | 9c2b9c6ef30aa49b9117156e57259a8581cb2660 (diff) | |
change source purchase price
Diffstat (limited to 'calculate_price_after_disc.ktr')
| -rw-r--r-- | calculate_price_after_disc.ktr | 8 |
1 files changed, 1 insertions, 7 deletions
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 @@ <sql>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 |
