factura compra respond js and added pdf