små förändringar så köp och säljnotor synkar
This commit is contained in:
@ -81,7 +81,7 @@ public class StockEquityServices : IStockEquityServices
|
||||
};
|
||||
_dbContext.Stocks.Add(equity);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
Debug.WriteLine($"Köpnotering: {equity.StockCode}, {equity.Bought}, {equity.BoughtPrice}, {equity.Quantity}, {equity.BoughtPrice * equity.Quantity}");
|
||||
Debug.WriteLine($"Köpnotering: {equity.StockCode} | {equity.Bought} | {equity.BoughtPrice} | {equity.Quantity} | {equity.BoughtPrice * equity.Quantity}");
|
||||
}
|
||||
|
||||
// Kontrollera om TransactionType är en säljnotering
|
||||
@ -111,7 +111,7 @@ public class StockEquityServices : IStockEquityServices
|
||||
soldQuant -= eq.Quantity;
|
||||
_dbContext.Stocks.Update(eq);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
Debug.WriteLine($"Säljnotering: {eq.StockCode}, {eq.Sold}, {eq.SoldPrice}, {eq.SoldQuant}");
|
||||
Debug.WriteLine($"Säljnotering: {eq.StockCode} | {eq.Sold} | {eq.SoldPrice} | {eq.SoldQuant}");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -127,11 +127,11 @@ public class StockEquityServices : IStockEquityServices
|
||||
};
|
||||
_dbContext.Stocks.Add(splitEquity);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
Debug.WriteLine($"Säljnotering (split): {splitEquity.StockCode}, {splitEquity.Bought},{splitEquity.BoughtPrice},{splitEquity.SoldQuant}, {splitEquity.Sold}, {splitEquity.SoldPrice},{splitEquity.SoldQuant}");
|
||||
Debug.WriteLine($"Säljnotering (split): {splitEquity.StockCode} | {splitEquity.Bought} | {splitEquity.BoughtPrice} | {splitEquity.SoldQuant} | {splitEquity.Sold} | {splitEquity.SoldPrice} | {splitEquity.SoldQuant}");
|
||||
eq.Quantity -= soldQuant;
|
||||
_dbContext.Stocks.Update(eq);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
Debug.WriteLine($"Säljnotering (split): {eq.StockCode}, {eq.Bought},{eq.BoughtPrice},{eq.SoldQuant}, {eq.Sold}, {eq.SoldPrice},{eq.SoldQuant}");
|
||||
Debug.WriteLine($"Säljnotering (split): {eq.StockCode} | {eq.Bought} | {eq.BoughtPrice} | {eq.SoldQuant} | {eq.Sold} | {eq.SoldPrice} | {eq.SoldQuant}");
|
||||
soldQuant = 0;
|
||||
}
|
||||
}
|
||||
|
||||
6
StockHistory/frmStockHistoryAnalyse.Designer.cs
generated
6
StockHistory/frmStockHistoryAnalyse.Designer.cs
generated
@ -128,13 +128,15 @@
|
||||
// chValue
|
||||
//
|
||||
chValue.Text = "Total";
|
||||
chValue.Width = 90;
|
||||
//
|
||||
// lblTotalValue
|
||||
//
|
||||
lblTotalValue.AutoSize = true;
|
||||
lblTotalValue.Location = new Point(345, 295);
|
||||
lblTotalValue.Font = new Font("Segoe UI", 12F, FontStyle.Bold);
|
||||
lblTotalValue.Location = new Point(513, 269);
|
||||
lblTotalValue.Name = "lblTotalValue";
|
||||
lblTotalValue.Size = new Size(16, 15);
|
||||
lblTotalValue.Size = new Size(22, 21);
|
||||
lblTotalValue.TabIndex = 10;
|
||||
lblTotalValue.Text = "...";
|
||||
//
|
||||
|
||||
@ -233,6 +233,11 @@ public partial class frmStockHistoryInit : Form
|
||||
trans.TransactionType = "SÄLJ";
|
||||
break;
|
||||
}
|
||||
if (word.ToUpper().Contains("FÖRSÄLJNING"))
|
||||
{
|
||||
trans.TransactionType = "SÄLJ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (line.StartsWith("Genomsnittlig"))
|
||||
|
||||
Reference in New Issue
Block a user