@@ -184,15 +213,15 @@
viewContent.innerHTML = html;
console.log(rawDecoded);
- JsBarcode("#ean13", idToEAN13(decodedText), {
- format: "EAN13",
+ JsBarcode("#@barcodeType", getBarcodeValue("@barcodeType", decodedText), {
+ format: "@barcodeType",
lineColor: "#000",
width: 2,
height: 80,
displayValue: true
});
- document.getElementById("downloadBtn").addEventListener("click", () => downloadBarcode("ean13", decodedText));
+ document.getElementById("downloadBtn").addEventListener("click", () => downloadBarcode("@barcodeType", decodedText));
document.getElementById("printBtn").addEventListener("click", () => {
addAssetIdToBatch(asset.Cn);
showToast("@T["Successfully added barcode to print batch"]", "success");
diff --git a/src/Views/Shared/_Batch.cshtml b/src/Views/Shared/_Batch.cshtml
index 7521065..b3a2642 100644
--- a/src/Views/Shared/_Batch.cshtml
+++ b/src/Views/Shared/_Batch.cshtml
@@ -1,6 +1,9 @@
@using Microsoft.AspNetCore.Mvc.Localization
@inject IViewLocalizer T
-
+@inject IConfiguration Configuration
+@{
+ string barcodeType = Configuration["BarcodeType"] ?? "EAN13";
+}
@@ -17,6 +20,7 @@