function getOrdersPrint() {
$.ajax({
type: "POST",
data: {operation: 'getordersprint'},
url: "manager.php",
dataType: "json",
success: function (json) {
$('#managerTableOrderPrint').empty();
$.each(json.ordersprint, function () {
var id = this['id'];
var filesorder = '';
$.ajax({
type: "POST",
data: {operation: 'getfiles', id_order: id, type: 'print'},
url: "manager.php",
dataType: "json",
success: function (json) {
$.each(json.files, function () {
filesorder =+ '<a href="/upload/' + this['name_file'] + '" download="">' + this['name_file'] + '</a><br>';
});
}
});
var info = '<tr><td class="orderPrintSelect"><input type="checkbox" name="selectOrderPrint" value="' + this['id'] + '">
</td><td class="orderPrintClientName">' + this['client_name'] + '</td><td class="orderPrintDate">' + this['date'] + '</td>
<td class="orderPrintTypeProduct">' + this['type_product'] + '</td><td class="orderPrintTirag">' + this['tirag'] + '</td>
<td class="orderPrintSize">' + this['size'] + '</td><td class="orderPrintPaper">' + this['paper'] + '</td>
<td class="orderPrintTypePrint">' + this['type_print'] + '</td><td class="orderPrintPrice">' + this['price'] + '</td>
<td class="orderPrintMaketFile">' + filesorder + '</td></tr>';
$('#managerTableOrderPrint').append(info);
});
}
});
}