Browse Source

fixed last report options order

Piotr Labudda 7 years ago
parent
commit
d5d6fc961a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tools/Bocian.php.view.js

+ 2 - 2
tools/Bocian.php.view.js

@@ -2716,7 +2716,7 @@ function addToReportByPreviousReport(event) {
 					case 'kontrahenci': total = parseInt(item.totalKontrahenci); break;
 				}
 				label += ( total > 0 ? "(" + total + ")" : "brak");
-				options[item.id] = label;
+				options['raport-'+item.id] = label;
 			});
 			resolve(options);
 		})
@@ -2739,7 +2739,7 @@ function addToReportByPreviousReport(event) {
 		inputOptions: lastReportOptions,
 		inputClass: "form-control input-lg",
 		preConfirm: function (selected) {
-			var id = parseInt(selected);
+			var id = parseInt(selected.substr('raport-'.length));
 			swal.showLoading();
 			if ('pracownicy' === pageType) {
 				return new Promise(function (resolve) {