Production: select all fix
This commit is contained in:
@@ -86,8 +86,14 @@ function copySaleFromTwinpol($record) {
|
||||
if (!isset($fvPrice)) {
|
||||
$price_start = 0;
|
||||
echo " <b>Brak ceny</b><br>";
|
||||
$vat_id = $product->ecmvat_id;
|
||||
$vat_name = $product->ecmvat_name;
|
||||
$vat_value = $product->ecmvat_value;
|
||||
} else {
|
||||
$price_start = $fvPrice['price_start'];
|
||||
$vat_id = $fvPrice['ecmvat_id'];
|
||||
$vat_name = $fvPrice['ecmvat_name'];
|
||||
$vat_value = $fvPrice['ecmvat_value'];
|
||||
echo " Cena: ".$price_start." (<a href=\"https://crm.e5.pl/index.php?module=EcmInvoiceOuts&action=DetailView&record=".$fvPrice['id']."\" target=\"new\">".$fvPrice['document_no']."</a>)<br>";
|
||||
}
|
||||
}
|
||||
@@ -101,9 +107,9 @@ function copySaleFromTwinpol($record) {
|
||||
$prod['discount'] = $product->discount;
|
||||
$prod['price_start'] = $price_start;
|
||||
$prod['price_netto'] = round($price_start - ($price_start * ($product->discount / 100)),2);
|
||||
$prod['ecmvat_id'] = $fvPrice['ecmvat_id'];
|
||||
$prod['ecmvat_value'] = $fvPrice['ecmvat_value'];
|
||||
$prod['ecmvat_name'] = $fvPrice['ecmvat_name'];
|
||||
$prod['ecmvat_id'] = $vat_id;
|
||||
$prod['ecmvat_value'] = $vat_value;
|
||||
$prod['ecmvat_name'] = $vat_name;
|
||||
$prod['price_brutto'] = round($prod['price_netto']+($prod['price_netto']*($prod['ecmvat_value']/100)),2);
|
||||
$prod['total_netto'] = round($prod['price_netto'] * $prod['quantity'], 2);
|
||||
$prod['total_brutto'] = round($prod['total_netto']+($prod['total_netto']*($prod['ecmvat_value']/100)),2);
|
||||
|
||||
@@ -64,6 +64,8 @@ $(document).ready(function () {
|
||||
},
|
||||
});
|
||||
$("#allTable").bind('filterEnd', function () {
|
||||
$("#selectAll").attr('checked', false);
|
||||
$(".allCheck").prop('checked', false);
|
||||
localStorage.setItem("productionSchedule_filter", $.tablesorter.getFilters($("#allTable")));
|
||||
});
|
||||
$("#allTable").bind("sortEnd", function () {
|
||||
@@ -88,7 +90,11 @@ $(document).ready(function () {
|
||||
}, 500);
|
||||
$("#selectAll").click(function () {
|
||||
if (this.checked) {
|
||||
$(".allCheck").prop("checked", true);
|
||||
$(".allCheck").each(function() {
|
||||
if ($(this).closest('tr').is(':visible')) {
|
||||
$(this).prop('checked', true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$(".allCheck").prop("checked", false);
|
||||
}
|
||||
@@ -190,6 +196,8 @@ function drawRawMaterials(data) {
|
||||
sortList: [[2, 0]],
|
||||
});
|
||||
$("#rawMaterialsTable").bind("filterEnd", function (event, config) {
|
||||
$("#selectAllRawMaterials").attr('checked', false);
|
||||
$(".rawMaterialCheck").prop('checked', false);
|
||||
updateRawMaterialsPositions();
|
||||
});
|
||||
$("#rawMaterialsTable").bind("sortEnd", function (event, config) {
|
||||
@@ -201,7 +209,11 @@ function drawRawMaterials(data) {
|
||||
$("#selectAllRawMaterials").attr('checked', false);
|
||||
$("#selectAllRawMaterials").click(function () {
|
||||
if (this.checked) {
|
||||
$(".rawMaterialCheck").prop('checked', true);
|
||||
$(".rawMaterialCheck").each(function() {
|
||||
if ($(this).closest('tr').is(':visible')) {
|
||||
$(this).prop('checked', true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$(".rawMaterialCheck").prop('checked', false);
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ $(document).ready(function () {
|
||||
},
|
||||
});
|
||||
$("#allTable").bind('filterEnd', function (event, config) {
|
||||
$("#selectAll").attr('checked', false);
|
||||
$(".allCheck").prop('checked', false);
|
||||
updateAllPositions();
|
||||
localStorage.setItem('productBySales_filters', $.tablesorter.getFilters($('#allTable')));
|
||||
});
|
||||
@@ -70,7 +72,11 @@ $(document).ready(function () {
|
||||
|
||||
$("#selectAll").click(function () {
|
||||
if (this.checked) {
|
||||
$(".allCheck").prop("checked", true);
|
||||
$(".allCheck").each(function() {
|
||||
if ($(this).closest('tr').is(':visible')) {
|
||||
$(this).prop('checked', true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$(".allCheck").prop("checked", false);
|
||||
}
|
||||
@@ -221,6 +227,8 @@ function drawComponents(data) {
|
||||
widgets: ['filter', 'stickyHeaders'],
|
||||
});
|
||||
$("#componentsTable").bind('filterEnd', function (event, config) {
|
||||
$("#selectAllComponents").attr('checked', false);
|
||||
$(".componentCheck").prop('checked', false);
|
||||
updateComponentsPositions();
|
||||
});
|
||||
$("#componentsTable").bind('sortEnd', function (event, config) {
|
||||
@@ -230,9 +238,14 @@ function drawComponents(data) {
|
||||
})
|
||||
});
|
||||
$("#selectAllComponents").attr('checked', false);
|
||||
$("#selectAllComponents").attr('checked', false);
|
||||
$("#selectAllComponents").click(function () {
|
||||
if (this.checked) {
|
||||
$(".componentCheck").prop('checked', true);
|
||||
$(".componentCheck").each(function() {
|
||||
if ($(this).closest('tr').is(':visible')) {
|
||||
$(this).prop('checked', true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$(".componentCheck").prop('checked', false);
|
||||
}
|
||||
@@ -322,6 +335,8 @@ function drawRawMaterials(data) {
|
||||
widgets: ['filter', 'stickyHeaders'],
|
||||
});
|
||||
$("#rawMaterialsTable").bind('filterEnd', function (event, config) {
|
||||
$("#selectAllRawMaterials").attr('checked', false);
|
||||
$(".rawMaterialCheck").prop('checked', false);
|
||||
updateRawMaterialsPositions();
|
||||
});
|
||||
$("#rawMaterialsTable").bind('sortEnd', function (event, config) {
|
||||
@@ -333,7 +348,11 @@ function drawRawMaterials(data) {
|
||||
$("#selectAllRawMaterials").attr('checked', false);
|
||||
$("#selectAllRawMaterials").click(function () {
|
||||
if (this.checked) {
|
||||
$(".rawMaterialCheck").prop('checked', true);
|
||||
$(".rawMaterialCheck").each(function() {
|
||||
if ($(this).closest('tr').is(':visible')) {
|
||||
$(this).prop('checked', true);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$(".rawMaterialCheck").prop('checked', false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user