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