mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-19 06:27:15 +00:00
Bug fixes in converting invoice to gbp method
This commit is contained in:
@@ -14,7 +14,7 @@ namespace bnhtrade.Core.Test.Account
|
||||
{
|
||||
public Account()
|
||||
{
|
||||
UpdateHmrcExchageRates();
|
||||
InoivceCurrencyConversion();
|
||||
}
|
||||
|
||||
public void UpdateHmrcExchageRates()
|
||||
@@ -41,5 +41,21 @@ namespace bnhtrade.Core.Test.Account
|
||||
read.AccountJournalId = new List<uint> { 123, 300, 324, 5678, 22 };
|
||||
var result = read.Read();
|
||||
}
|
||||
|
||||
public void InoivceCurrencyConversion()
|
||||
{
|
||||
var invoiceService = new bnhtrade.Core.Logic.Export.AccountInvoice.QueueService();
|
||||
var invoiceList = invoiceService.ReadInvoiceById(new List<int> { 349, 371, 375, 379 });
|
||||
var currencyService = new bnhtrade.Core.Logic.Account.CurrencyService();
|
||||
|
||||
foreach (var invoice in invoiceList.Values.ToList())
|
||||
{
|
||||
if (currencyService.ConvertInvoiceToGbp(invoice) == false)
|
||||
{
|
||||
throw new Exception(currencyService.ErrorMessage);
|
||||
}
|
||||
}
|
||||
int i = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user