mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-19 06:27:15 +00:00
Migrated projects to dotnet8
migrated all projects over to .net8 incomplete feature for gui shipments
This commit is contained in:
23
src/bnhtrade.Core/Logic/Account/Currency.cs
Normal file
23
src/bnhtrade.Core/Logic/Account/Currency.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bnhtrade.Core.Logic.Account
|
||||
{
|
||||
public class Currency
|
||||
{
|
||||
public decimal CurrencyConvertToGbp(string currencyCode, decimal amount, DateTime conversionDate)
|
||||
{
|
||||
return new Data.Database.Account.Currency().CurrencyConvertToGbp(currencyCode, amount, conversionDate);
|
||||
}
|
||||
|
||||
public int CurrencyExchangeRateInsert(int exchangeRateSource, string currencyCode,
|
||||
decimal currencyUnitsPerGbp, DateTime periodStart, DateTime periodEnd, bool checkOverride = false)
|
||||
{
|
||||
return new Data.Database.Account.Currency().CurrencyExchangeRateInsert(exchangeRateSource, currencyCode,
|
||||
currencyUnitsPerGbp, periodStart, periodEnd, checkOverride);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ namespace bnhtrade.Core.Logic.Account
|
||||
|
||||
public List<Model.Account.Account> ByAccountCode(List<int> accountCodeList)
|
||||
{
|
||||
return readAccountCode.ByAccountCode(accountCodeList);
|
||||
return readAccountCode.ByAccountCode(accountCodeList).Values.ToList();
|
||||
}
|
||||
|
||||
public Dictionary<int, Model.Account.Account> ConvertToDictionary(List<Model.Account.Account> accountCodeList)
|
||||
|
||||
25
src/bnhtrade.Core/Logic/Account/Journal.cs
Normal file
25
src/bnhtrade.Core/Logic/Account/Journal.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Transactions;
|
||||
|
||||
namespace bnhtrade.Core.Logic.Account
|
||||
{
|
||||
public class Journal
|
||||
{
|
||||
public int AccountJournalInsert(int journalTypeId, DateTime entryDate, string currencyCode,
|
||||
decimal amount, int debitAccountId = 0, int creditAccountId = 0, bool lockEntry = false)
|
||||
{
|
||||
return new Data.Database.Account.CreateJournal().AccountJournalInsert(journalTypeId, entryDate, currencyCode,
|
||||
amount, debitAccountId, creditAccountId, lockEntry);
|
||||
}
|
||||
|
||||
public bool AccountJournalDelete(int accountJournalId)
|
||||
{
|
||||
return new Data.Database.Account.DeleteJournal().AccountJournalDelete(accountJournalId);
|
||||
}
|
||||
}
|
||||
}
|
||||
12
src/bnhtrade.Core/Logic/Account/PurchaseInvoice.cs
Normal file
12
src/bnhtrade.Core/Logic/Account/PurchaseInvoice.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bnhtrade.Core.Logic.Account
|
||||
{
|
||||
public class PurchaseInvoice : Core.Data.Database.Account.ReadPurchaseInvoice
|
||||
{
|
||||
}
|
||||
}
|
||||
21
src/bnhtrade.Core/Logic/Account/PurchaseInvoiceMisc.cs
Normal file
21
src/bnhtrade.Core/Logic/Account/PurchaseInvoiceMisc.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bnhtrade.Core.Logic.Account
|
||||
{
|
||||
public class PurchaseInvoiceMisc
|
||||
{
|
||||
public List<Model.Account.PurchaseInvoiceLineStatus> ReadLineStatusToList()
|
||||
{
|
||||
return new Data.Database.Account.ReadPurchaseInvoiceLineStatus().Read().Values.ToList();
|
||||
}
|
||||
|
||||
public List<Model.Account.PurchaseInvoiceLineSummary> GetLineSummary(DateTime maxDate, string lineStatus, List<string> wordSearchList)
|
||||
{
|
||||
return new Data.Database.Account.ReadPurchaseInvoiceLineSummary().Read(maxDate,lineStatus, wordSearchList);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using bnhtrade.Core.Data.Amazon.Report;
|
||||
using System.Linq;
|
||||
|
||||
namespace bnhtrade.Core.Logic.Import
|
||||
{
|
||||
@@ -10,6 +11,7 @@ namespace bnhtrade.Core.Logic.Import
|
||||
|
||||
public AmazonSettlement()
|
||||
{
|
||||
amazonReport = new Data.Amazon.Report.SettlementReport();
|
||||
}
|
||||
|
||||
public void SyncDatabase()
|
||||
@@ -53,12 +55,12 @@ namespace bnhtrade.Core.Logic.Import
|
||||
}
|
||||
|
||||
// import into database
|
||||
var dbImport = new Data.Database.Import.AmazonSettlementInsert();
|
||||
var dbInsert = new Data.Database.Import.AmazonSettlementInsert();
|
||||
for (int i = 0; i < spapiReportIdList.Count(); i++)
|
||||
{
|
||||
UI.Console.WriteLine("Importing settlement report " + (i + 1) + " of " + spapiReportIdList.Count() + " (ReportID:" + spapiReportIdList[i] + ").");
|
||||
var filePath = amazonReport.GetFile(spapiReportIdList[i]);
|
||||
bool ack = dbImport.ByFlatFile(filePath, spapiReportIdList[i]);
|
||||
var filePath = amazonReport.GetReportFile(spapiReportIdList[i]);
|
||||
bool ack = dbInsert.ByFlatFile(filePath, spapiReportIdList[i]);
|
||||
log.LogInformation("Settlment Report imported (ReportID:" + spapiReportIdList[i] + ").");
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,10 @@ namespace bnhtrade.Core.Logic.Sku
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return new Data.Database.Sku.InsertSku().InsertNew(productId, conditionId, accountTaxCodeId);
|
||||
else
|
||||
{
|
||||
return new Data.Database.Sku.InsertSku().InsertNew(productId, conditionId, accountTaxCodeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Transactions;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace bnhtrade.Core.Logic.Stock
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user