LOCAL cResp, cCmd

cTabla = 'item'
TEXT TO cCmd NOSHOW textmerge  
	SELECT 
		id+0 as id,
		name,
		note,
		noteunidad,
		partnumber,
		codigo2,
		price,priceb,pricec,priced,pricee,
		idbrand+0 as idbrand,
		idgrupo+0 as idgrupo,
		idsupplier+0 as idsupplier,
		unidadescaja,
		descEsp,PromDesc,PorcDesc1,PorcDesc2,PorcDesc3,PorcDesc4,PorcDesc5,
		iva,
		isservice,tipo,
		(select stock from stock where iditem=item.id limit 1) as stock,
		(select cantidad from stockbod where iditem=item.id and idbodega=01 limit 1) as stkbod
	FROM item where !baja and aplica_pda
ENDTEXT

*STRTOFILE (cCmd, '\eddy_item.txt')

oApp.sqlexec(cCmd,cTabla)

oJs.android_up(cTabla)
