Update Fix1
Some checks failed
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Failing after 3m17s
Some checks failed
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Failing after 3m17s
This commit is contained in:
parent
1c4c241266
commit
2d955752c5
@ -135,7 +135,6 @@ namespace Transversal.Services
|
|||||||
private static bool LooksLikeNextAi(string s, int index)
|
private static bool LooksLikeNextAi(string s, int index)
|
||||||
{
|
{
|
||||||
if (index + 1 >= s.Length) return false;
|
if (index + 1 >= s.Length) return false;
|
||||||
// AIs que nos interesan acá arrancan con 0–2 y son de 2 dígitos (01,10,11,17,21,22)
|
|
||||||
return char.IsDigit(s[index]) && char.IsDigit(s[index + 1]) &&
|
return char.IsDigit(s[index]) && char.IsDigit(s[index + 1]) &&
|
||||||
(s[index] == '0' || s[index] == '1' || s[index] == '2') &&
|
(s[index] == '0' || s[index] == '1' || s[index] == '2') &&
|
||||||
(s.Substring(index, 2) is "01" or "10" or "11" or "17" or "21" or "22");
|
(s.Substring(index, 2) is "01" or "10" or "11" or "17" or "21" or "22");
|
||||||
@ -156,7 +155,6 @@ namespace Transversal.Services
|
|||||||
int mm = int.Parse(yymmdd.Substring(2, 2));
|
int mm = int.Parse(yymmdd.Substring(2, 2));
|
||||||
int dd = int.Parse(yymmdd.Substring(4, 2));
|
int dd = int.Parse(yymmdd.Substring(4, 2));
|
||||||
|
|
||||||
// GS1 usa 00–99; se suele mapear a 2000–2099. Ajustá si necesitás 1990–1999 para 90–99.
|
|
||||||
int year = 2000 + yy;
|
int year = 2000 + yy;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|||||||
@ -3,6 +3,7 @@ using Domain.Dtos.Stock;
|
|||||||
using Domain.Generics;
|
using Domain.Generics;
|
||||||
using Transversal.Services;
|
using Transversal.Services;
|
||||||
|
|
||||||
|
|
||||||
public class StockScanService : IStockScanService
|
public class StockScanService : IStockScanService
|
||||||
{
|
{
|
||||||
private readonly HttpClient _http;
|
private readonly HttpClient _http;
|
||||||
@ -19,17 +20,6 @@ public class StockScanService : IStockScanService
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
//var parsed = Gs1CodeParser.Parse(rawInput);
|
|
||||||
//var raw = rawInput.Trim();
|
|
||||||
|
|
||||||
//// usar raw como GTIN solo si NO hay AIs parseados
|
|
||||||
//bool hasParsedAis = !string.IsNullOrWhiteSpace(parsed.Lot)
|
|
||||||
// || parsed.ExpirationDate.HasValue
|
|
||||||
// || !string.IsNullOrWhiteSpace(parsed.Serial);
|
|
||||||
|
|
||||||
//string? gtinToSend = parsed.Gtin;
|
|
||||||
//if (gtinToSend is null && !hasParsedAis && IsPlainCode(raw))
|
|
||||||
// gtinToSend = raw; // ej: factory_code tipeado ("336005")
|
|
||||||
var parsed = Gs1CodeParser.Parse(rawInput);
|
var parsed = Gs1CodeParser.Parse(rawInput);
|
||||||
var raw = rawInput.Trim();
|
var raw = rawInput.Trim();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user