Skip to content

Instantly share code, notes, and snippets.

@puppe1990
Created October 12, 2020 19:08
Show Gist options
  • Save puppe1990/227207646ae9e9901355526305f371fd to your computer and use it in GitHub Desktop.
Save puppe1990/227207646ae9e9901355526305f371fd to your computer and use it in GitHub Desktop.
printOrderDC.js
var order_code = [5647, 5648]
for (let index = 0; index <= order_code.length; index++) {
id = order_code[index] + 1
$('.delete').eq(index).attr('name', 'data[Form][selected][' + id + ']')
$('.delete').eq(index).attr('data-id', id)
$('.delete').eq(index).attr('data-pedido', order_code[index])
}
0 < $(".delete:checked").length ? ($("#pedidoViewForm").prop("action", base_url + "venda/pedidos/printOrderDC"), $("#pedidoViewForm").prop("target", "_blank"), $("#pedidoViewForm").submit()) : Backend.modalInfo('<span class="modal-alert-message-content">Nenhum pedido selecionado</span>',
"oka")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment