Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/controllers/fichas-tombos-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function formataDataSaida(data) {

export default function fichaTomboController(request, response, next) {
const { tombo_id: tomboId } = request.params;
const { qtd } = request.query;
const { qtd, code } = request.query;

if (qtd < 1) {
Promise.reject(new Error('Quantidade inválida'));
Expand Down Expand Up @@ -259,6 +259,7 @@ export default function fichaTomboController(request, response, next) {
romano_data_identificacao: romanoDataIdentificacao,
romano_data_coleta: romanoDataColeta,
numero_copias: qtd || 1,
codigo_barras_selecionado: code,
};

const caminhoArquivoHtml = path.resolve(__dirname, '../views/ficha-tombo.ejs');
Expand Down
2 changes: 1 addition & 1 deletion src/views/ficha-tombo.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
<script>
window.addEventListener('load', () => {
const id = "<%- '#code128_' + fotos[i]['id'] %>";
const cbarra = "<%- fotos[i]['codigo_barra'] %>";
const cbarra = "<%- codigo_barras_selecionado %>";
JsBarcode(id, cbarra, { margin: 0, width: 1.4, height: 40, fontSize: 10 });
});
</script>
Expand Down
Loading