aboutsummaryrefslogtreecommitdiff
path: root/src/PriceListTools
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2022-01-29 17:47:57 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2022-01-29 17:47:57 +0300
commit913de67a023b877f5c7ab5cd2dfa0517ae48915a (patch)
treef26650be691354f7bd890354a01708de4420aa1b /src/PriceListTools
parent0fac439d951ab1162ad3e6779819814172d3b65d (diff)
Fix missing positions filling into amount columns during joining sheets
Diffstat (limited to 'src/PriceListTools')
-rw-r--r--src/PriceListTools/PriceListTool.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/PriceListTools/PriceListTool.cs b/src/PriceListTools/PriceListTool.cs
index f6231a5..09d4dac 100644
--- a/src/PriceListTools/PriceListTool.cs
+++ b/src/PriceListTools/PriceListTool.cs
@@ -65,7 +65,7 @@ namespace RehauSku.PriceListTools
if (Missing.Count > 0)
{
- FillMissing();
+ FillMissing(columns);
MessageBox.Show
($"{Missing.Count} артикулов отсутствует в таблице заказов {RegistryUtil.PriceListPath}\n" +
$"Под основной таблицей составлен список не найденных артикулов",
@@ -159,7 +159,7 @@ namespace RehauSku.PriceListTools
Missing.Remove(positionAmount);
}
- protected private void FillMissing()
+ protected private void FillMissing(int[] columns)
{
int startRow =
TargetFile.Sheet.AutoFilter.Range.Row +
@@ -170,17 +170,21 @@ namespace RehauSku.PriceListTools
Range group = TargetFile.Sheet.Cells[startRow + i, TargetFile.groupCell.Column];
Range sku = TargetFile.Sheet.Cells[startRow + i, TargetFile.skuCell.Column];
Range name = TargetFile.Sheet.Cells[startRow + i, TargetFile.nameCell.Column];
- Range amount = TargetFile.Sheet.Cells[startRow + i, TargetFile.amountCell.Column];
group.Value2 = Missing[i].Key.Group;
sku.Value2 = Missing[i].Key.Sku;
name.Value2 = Missing[i].Key.Name;
- amount.Value2 = Missing[i].Value;
group.ClearFormats();
sku.ClearFormats();
name.ClearFormats();
- amount.ClearFormats();
+
+ foreach (int column in columns)
+ {
+ Range amount = TargetFile.Sheet.Cells[startRow + i, column];
+ amount.Value2 = Missing[i].Value;
+ amount.ClearFormats();
+ }
}
}