|
|
@ -71,6 +71,7 @@ |
|
|
qd.currency_total_cost2, |
|
|
qd.currency_total_cost2, |
|
|
qd.quote_currency_total_cost1, |
|
|
qd.quote_currency_total_cost1, |
|
|
qd.quote_currency_total_cost2, |
|
|
qd.quote_currency_total_cost2, |
|
|
|
|
|
type, |
|
|
IIF(qd.qty >= 250000 and |
|
|
IIF(qd.qty >= 250000 and |
|
|
((qd.currency1 = 'USD' and qd.exchange_rate1 > 0) or (qd.currency2 = 'USD' and exchange_rate2 > 0)) |
|
|
((qd.currency1 = 'USD' and qd.exchange_rate1 > 0) or (qd.currency2 = 'USD' and exchange_rate2 > 0)) |
|
|
, (qd.adjust_bom_un_yield + qd.adjust_labour_cost + qd.adjust_fabricate_cost + |
|
|
, (qd.adjust_bom_un_yield + qd.adjust_labour_cost + qd.adjust_fabricate_cost + |
|
|
@ -80,7 +81,7 @@ |
|
|
((qd.currency1 = 'USD' and qd.exchange_rate1 > 0) or (qd.currency2 = 'USD' and exchange_rate2 > 0)) |
|
|
((qd.currency1 = 'USD' and qd.exchange_rate1 > 0) or (qd.currency2 = 'USD' and exchange_rate2 > 0)) |
|
|
, (qd.adjust_bom_un_yield + qd.adjust_labour_cost + qd.adjust_fabricate_cost + |
|
|
, (qd.adjust_bom_un_yield + qd.adjust_labour_cost + qd.adjust_fabricate_cost + |
|
|
qd.adjust_machine_cost) / IIF(qd.currency1 = 'USD', qd.exchange_rate1, qd.exchange_rate2) |
|
|
qd.adjust_machine_cost) / IIF(qd.currency1 = 'USD', qd.exchange_rate1, qd.exchange_rate2) |
|
|
, null) * qd.quote_profit_rate / 100 -1.5 as weighted2 |
|
|
|
|
|
|
|
|
, null) * qd.quote_profit_rate / 100 - 1.5 as weighted2 |
|
|
from plm_quote_detail qd |
|
|
from plm_quote_detail qd |
|
|
left join part pp on qd.part_id = pp.id |
|
|
left join part pp on qd.part_id = pp.id |
|
|
<where> |
|
|
<where> |
|
|
|