LOCAL cResp, cCmd

cTabla = 'vendedor'
TEXT TO cCmd noshow
	SELECT 
		id+0 as id,
		name,
		login,
		TRIM(barras) as clave,
		"@nombre_empresa" as nombre_empresa,
		"@telf_empresa" as telf_empresa,
		"@web_empresa" as web_empresa,
		"@direcc_empresa" as direcc_empresa,
		"@url_logo" as url_logo,
		"@nro_lin_ped" as nro_lin_ped,
		1 as stock_linea,
		1 as control_cupos,
		1 as cambia_pvp,
		1 as crea_cliente,
		0 as venta_en_linea,
		0 as sincroniza_linea,
		120 as tiempo_sincronizacion,
		"" as nota1,
		"" as nota2,
		"" as nota3,
		idsalesman+0 as idsalesman,
		idcc+0 as idcc,
		idcp+0 as idcp,
		idbodega+0 as idbodega
	FROM user WHERE !bloqueado and !borrado @cond
ENDTEXT


cCmd = STRTRAN(cCmd,"@cond",IIF(EMPTY(oJs.cParam), "", " and id = "+oJs.cParam))

cCmd = STRTRAN(cCmd,"@nombre_empresa",oApp.cbEnterprise)
cCmd = STRTRAN(cCmd,"@telf_empresa",oApp.cbPhone)
cCmd = STRTRAN(cCmd,"@web_empresa",oApp.cbWeb)
cCmd = STRTRAN(cCmd,"@direcc_empresa",oApp.cbDireccion)
cCmd = STRTRAN(cCmd,"@url_logo",oApp.cbURLLogo)
cCmd = STRTRAN(cCmd,"@nro_lin_ped",ALLTRIM(TRANSFORM(oApp.print_lin_factura)))

oApp.sqlexec(cCmd,cTabla)

oJs.android_up(cTabla)
