Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3599

Need Sp query for purchase order

$
0
0

Dear Experts,

 

I want one SP Query.

When i making purchase order. If i am adding a item in PO and price ill come automatically according to vendor wise price. But i don't want edit price.

If i edit price Document should not to be add and error message need to display.

 

This is my SP query.It is not working on above condition

 

if @object_type=22 and  @transaction_type='u'

begin

declare @price int

set @price=(select price from ospp where ItemCode=@list_of_cols_val_tab_del )

 

begin

if exists(select opor.DocNum from OPOR  INNER JOIN POR1  ON

opor.[DocEntry] = por1.[DocEntry] where por1.Price<>@price and por1.ItemCode=@list_of_cols_val_tab_del )

begin

set @error = -1

set @error_message = 'price cannot to be edit'

end

end

end

 

Thanks & Regards

ram


Viewing all articles
Browse latest Browse all 3599

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>