mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-19 06:27:15 +00:00
62 lines
1.9 KiB
C#
62 lines
1.9 KiB
C#
using bnhtrade.Core.Data.Database.Account;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms.Design;
|
|
using System.Xml;
|
|
using System.Xml.Linq;
|
|
|
|
namespace bnhtrade.Core.Test.Account
|
|
{
|
|
public class Account
|
|
{
|
|
public Account()
|
|
{
|
|
InoivceCurrencyConversion();
|
|
}
|
|
|
|
public void UpdateHmrcExchageRates()
|
|
{
|
|
var logic = new bnhtrade.Core.Logic.Account.CurrencyService();
|
|
logic.UpdateHmrcExchageRates();
|
|
}
|
|
|
|
public void PurchaseInvoice()
|
|
{
|
|
var result = new bnhtrade.Core.Logic.Account.PurchaseInvoice().GetPurchaseInvoice( new List<int> { 14718, 100, 101, 102, 300, 400, 1200, 2734, 6339, 9999 }); // 10 in total
|
|
}
|
|
|
|
public void PurchaseInvoiceLine()
|
|
{
|
|
var read = new Data.Database.Account.ReadPurchaseInvoiceLine();
|
|
read.ItemDescription = new List<string> { "xbox", "kill" };
|
|
var result = read.Read();
|
|
}
|
|
|
|
public void Journal()
|
|
{
|
|
var read = new Data.Database.Account.ReadJournal();
|
|
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;
|
|
}
|
|
}
|
|
}
|