Runner.buttonEvents["Pendientes__pago"] = function( pageObj, proxy, pageid ) {
	//register a new button
	pageObj.buttonNames[ pageObj.buttonNames.length ] = 'Pendientes__pago';
	
	if ( !pageObj.buttonEventBefore['Pendientes__pago'] ) {
		pageObj.buttonEventBefore['Pendientes__pago'] = function( params, ctrl, pageObj, proxy, pageid, rowData, row, submit ) {		
			var ajax = ctrl;

		}
	}
	
	if ( !pageObj.buttonEventAfter['Pendientes__pago'] ) {
		pageObj.buttonEventAfter['Pendientes__pago'] = function( result, ctrl, pageObj, proxy, pageid, rowData, row, params ) {
			var ajax = ctrl;




Swal.fire({
  icon: 'success',
  title: 'Se genero correctamente',
  text: 'La planilla de pagos de la gestion'

 
})
.then((result) => {
  // Reload the Page
  location.reload();
});


		}
	}
	
	$('a[id="Pendientes__pago"]').each( function() {
		if ( $(this).closest('.gridRowAdd').length ) {
			return;
		}
		
		this.id = "Pendientes__pago" + "_" + Runner.genId();
		
		// create object
		var button_Pendientes__pago = new Runner.form.Button({
			id: this.id ,
			btnName: "Pendientes__pago"
		});
		
		// init
		button_Pendientes__pago.init( {args: [ pageObj, proxy, pageid ]} );
	});
};

