fix(preprint): added the correct to string for the preprint stuff
This commit is contained in:
@@ -69,6 +69,8 @@ const addProdLabel = async (
|
||||
if (prodLabelError) {
|
||||
log.error({ error: error }, "Error adding the label");
|
||||
}
|
||||
|
||||
return;
|
||||
};
|
||||
|
||||
export const preprintLabels = async (preprint: Preprint, username?: string) => {
|
||||
@@ -85,12 +87,12 @@ export const preprintLabels = async (preprint: Preprint, username?: string) => {
|
||||
"POST",
|
||||
"/public/v1.0/Warehousing/GenerateAndPrintLabel",
|
||||
{
|
||||
scannerId: preprint.scannerId,
|
||||
lotNr: preprint.lotNr,
|
||||
machineId: preprint.machineId, // 457=22, 458=23
|
||||
printerId: preprint.printerId, // 457=22, 458=23
|
||||
layoutId: preprint.layoutId,
|
||||
numberOfCopies: preprint.numberOfCopies,
|
||||
scannerId: preprint.scannerId.toString(),
|
||||
lotNr: preprint.lotNr.toString(),
|
||||
machineId: preprint.machineId.toString(),
|
||||
printerId: preprint.printerId.toString(),
|
||||
layoutId: preprint.layoutId.toString(),
|
||||
numberOfCopies: preprint.numberOfCopies.toString(),
|
||||
},
|
||||
);
|
||||
if (labels?.data.Result === 1) {
|
||||
@@ -116,7 +118,7 @@ export const preprintLabels = async (preprint: Preprint, username?: string) => {
|
||||
}
|
||||
labelsPrinted.push(parseInt(labels?.data.SSCC.slice(10, -1)));
|
||||
// add the label to our label db for tracking purposes
|
||||
addProdLabel(
|
||||
await addProdLabel(
|
||||
preprint,
|
||||
parseInt(labels?.data.SSCC.slice(10, -1)),
|
||||
username || "lst",
|
||||
@@ -141,12 +143,12 @@ export const preprintLabels = async (preprint: Preprint, username?: string) => {
|
||||
"POST",
|
||||
"/public/v1.0/Warehousing/GenerateAndPrintLabel",
|
||||
{
|
||||
scannerId: preprint.scannerId,
|
||||
lotNr: preprint.lotNr,
|
||||
machineId: preprint.machineId, // 457=22, 458=23
|
||||
printerId: preprint.printerId, // 457=22, 458=23
|
||||
layoutId: preprint.layoutId,
|
||||
numberOfCopies: preprint.numberOfCopies,
|
||||
scannerId: preprint.scannerId.toString(),
|
||||
lotNr: preprint.lotNr.toString(),
|
||||
machineId: preprint.machineId.toString(),
|
||||
printerId: preprint.printerId.toString(),
|
||||
layoutId: preprint.layoutId.toString(),
|
||||
numberOfCopies: preprint.numberOfCopies.toString(),
|
||||
},
|
||||
);
|
||||
|
||||
@@ -173,7 +175,7 @@ export const preprintLabels = async (preprint: Preprint, username?: string) => {
|
||||
}
|
||||
|
||||
labelsPrinted.push(parseInt(labels.data.SSCC.slice(10, -1)));
|
||||
addProdLabel(
|
||||
await addProdLabel(
|
||||
preprint,
|
||||
parseInt(labels?.data.SSCC.slice(10, -1)),
|
||||
username || "lst",
|
||||
|
||||
Reference in New Issue
Block a user