Carry forward Valor da NF in controle recebidos
This commit is contained in:
parent
7ebd4588b0
commit
9424ddfeb3
|
|
@ -1481,6 +1481,7 @@ namespace line_gestao_api.Controllers
|
||||||
var firstRow = ws.FirstRowUsed()?.RowNumber() ?? 1;
|
var firstRow = ws.FirstRowUsed()?.RowNumber() ?? 1;
|
||||||
var lastRow = ws.LastRowUsed()?.RowNumber() ?? firstRow;
|
var lastRow = ws.LastRowUsed()?.RowNumber() ?? firstRow;
|
||||||
var rowIndex = firstRow;
|
var rowIndex = firstRow;
|
||||||
|
decimal? lastValorDaNf = null;
|
||||||
|
|
||||||
while (rowIndex <= lastRow)
|
while (rowIndex <= lastRow)
|
||||||
{
|
{
|
||||||
|
|
@ -1503,6 +1504,7 @@ namespace line_gestao_api.Controllers
|
||||||
&& GetColAny(map, "CHIP") == 0
|
&& GetColAny(map, "CHIP") == 0
|
||||||
&& GetColAny(map, "SERIAL") == 0;
|
&& GetColAny(map, "SERIAL") == 0;
|
||||||
|
|
||||||
|
lastValorDaNf = null;
|
||||||
rowIndex++;
|
rowIndex++;
|
||||||
|
|
||||||
for (; rowIndex <= lastRow; rowIndex++)
|
for (; rowIndex <= lastRow; rowIndex++)
|
||||||
|
|
@ -1524,6 +1526,14 @@ namespace line_gestao_api.Controllers
|
||||||
var numeroLinha = NullIfEmptyDigits(GetCellByHeaderAny(ws, rowIndex, map, "NÚMERO DA LINHA", "NUMERO DA LINHA"));
|
var numeroLinha = NullIfEmptyDigits(GetCellByHeaderAny(ws, rowIndex, map, "NÚMERO DA LINHA", "NUMERO DA LINHA"));
|
||||||
var valorUnit = TryDecimal(GetCellByHeaderAny(ws, rowIndex, map, "VALOR UNIT.", "VALOR UNIT", "VALOR UNITÁRIO", "VALOR UNITARIO"));
|
var valorUnit = TryDecimal(GetCellByHeaderAny(ws, rowIndex, map, "VALOR UNIT.", "VALOR UNIT", "VALOR UNITÁRIO", "VALOR UNITARIO"));
|
||||||
var valorDaNf = TryDecimal(GetCellByHeaderAny(ws, rowIndex, map, "VALOR DA NF", "VALOR DA N F"));
|
var valorDaNf = TryDecimal(GetCellByHeaderAny(ws, rowIndex, map, "VALOR DA NF", "VALOR DA N F"));
|
||||||
|
if (valorDaNf.HasValue)
|
||||||
|
{
|
||||||
|
lastValorDaNf = valorDaNf;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
valorDaNf = lastValorDaNf;
|
||||||
|
}
|
||||||
var dataDaNf = TryDate(ws, rowIndex, map, "DATA DA NF");
|
var dataDaNf = TryDate(ws, rowIndex, map, "DATA DA NF");
|
||||||
var dataReceb = TryDate(ws, rowIndex, map, "DATA DO RECEBIMENTO");
|
var dataReceb = TryDate(ws, rowIndex, map, "DATA DO RECEBIMENTO");
|
||||||
var qtd = TryNullableInt(GetCellByHeaderAny(ws, rowIndex, map, "QTD.", "QTD", "QUANTIDADE"));
|
var qtd = TryNullableInt(GetCellByHeaderAny(ws, rowIndex, map, "QTD.", "QTD", "QUANTIDADE"));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue