
<script>
	function filialsystem_synchronisieren()
	{
		
		var checkVar = "<?php if (FILIALSYSTEM_IST_FILIALSYSTEM == "ja" && FILIALSYSTEM_SYNCHRONISATION_BON == "ja") echo FILIALSYSTEM_SYNCHRONISATION_BON; ?>";
		if (checkVar !== "") {
			$.ajax({
				type: "POST",
				url: "ajax_funktionen.php",
				dataType : "html",
				data: {funktion: "upsync", selVal: "incr"},
				async: true,
				success:function(html){	
					//console.log("sync successful");
					console.log(html);
				}
			});
		}
		//   kp -> let auf var geändert !!!
		var checkProd = "<?php if (FILIALSYSTEM_IST_FILIALSYSTEM == "ja" && FILIALSYSTEM_SYNCHRONISATION_PRODUKTE_BON == "ja") echo FILIALSYSTEM_SYNCHRONISATION_PRODUKTE_BON; ?>";
		if (checkProd !== "") {
			$.ajax({
				type: "POST",
				url: "ajax_funktionen.php",
				dataType : "html",
				data: {funktion: "syncProducts", incremental: "true"/*, origin: "abg_bon"*/},
				async: true,
				success:function(html){	
					//console.log("sync successful");
					console.log(html);
				}
			});
		}
	}

</script>