Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: Bloquear articulos para ciertos Socios de Negocios

$
0
0

ok yo lo haría así para rápido algo como

 

if  @object_type in ('17') and @transaction_type in ('A')

begin

declare @validaitem as int

declare @validacliente as nvarchar

 

set @validaitem=(select count (*) from rdr1 a join oitm b on a.itemcode=b.itemcode where b.property1='Y' and a.docentry=@list_of_cols_val_tab_del)

set @validacliente=(select property1 from ocrd a join ordr b on a.cardcode=b.cardcode where docentry=@list_of_cols_val_tab_del)

 

if @validaitem<>0 and @validacliente='Y'

begin

set @error=1

set @error_message='Guarde como preliminar para autorización'

end

end

 

solo para darte una idea


Viewing all articles
Browse latest Browse all 9052

Trending Articles



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