0
0

Fix actual price list parsing

This commit is contained in:
Serghei Cebotari 2024-08-26 18:07:50 +03:00
parent ae7d81e95f
commit 97d601999c

View File

@ -31,9 +31,14 @@ namespace RhSolutions.Api.Services
{
var firstCellAddress = ws.Search("Программа", System.Globalization.CompareOptions.IgnoreCase)
.First()
.CellLeft()
.Address;
var lastCellAddress = ws.LastCellUsed().Address;
var lastCellAddress = ws.Search("Цена брутто", System.Globalization.CompareOptions.IgnoreCase)
.First()
.WorksheetColumn()
.LastCellUsed()
.Address;
return ws.Range(firstCellAddress, lastCellAddress).AsTable();
}
@ -89,16 +94,16 @@ namespace RhSolutions.Api.Services
productWarehouseCount = 0.0;
}
string onWarehouseField = row.Field("Складская программа")
string onWarehouseField = row.Field(0)
.GetString();
bool IsOnWarehouse;
switch (onWarehouseField)
{
case "x":
case "N":
IsOnWarehouse = true;
break;
case "под заказ":
case "Z":
IsOnWarehouse = false;
break;
default: