SP-API stock reconciliation

Amazon had depreciated a number of reports that were used for stock reconciliation. Application now uses the new fba ledger report to reconcile. It is currently untested, as this requires data from Amazon. Methods that require testing will return a 'NotImplementedException'.

Also, removed the depreciated ILMerge and replaced with ILRepack.

Plus much more tidying up, and improvements.
This commit is contained in:
Bobbie Hodgetts
2024-05-07 08:24:00 +01:00
committed by GitHub
parent 2f919d7b5a
commit 91ef9acc78
1272 changed files with 4944 additions and 2773311 deletions
@@ -17,7 +17,7 @@ namespace bnhtrade.Core.Data.Database.Log
/// Gets the Date and Time by a unique string.
/// </summary>
/// <param name="logDateTimeId">Unique string</param>
/// <returns>UTC DateTime or null</returns>
/// <returns>UTC DateTime</returns>
public DateTime GetDateTimeUtc(string logDateTimeId)
{
using (SqlConnection conn = new SqlConnection(SqlConnectionString))
@@ -52,7 +52,10 @@ namespace bnhtrade.Core.Data.Database.Log
public void SetDateTimeUtc(string logDateTimeID, DateTime utcDateTime)
{
utcDateTime = DateTime.SpecifyKind(utcDateTime, DateTimeKind.Utc);
if (utcDateTime.Kind != DateTimeKind.Utc)
{
throw new Exception("Datetime kind is not set to UTC");
}
using (SqlConnection conn = new SqlConnection(SqlConnectionString))
{
@@ -86,7 +89,10 @@ namespace bnhtrade.Core.Data.Database.Log
if (string.IsNullOrWhiteSpace(LogDateTimeId))
{ throw new Exception("Invalid LogDateTimeID"); }
utcDateTime = DateTime.SpecifyKind(utcDateTime, DateTimeKind.Utc);
if (utcDateTime.Kind != DateTimeKind.Utc)
{
throw new Exception("Datetime kind is not set to UTC");
}
using (SqlConnection conn = new SqlConnection(SqlConnectionString))
{
@@ -111,7 +117,7 @@ namespace bnhtrade.Core.Data.Database.Log
{
var nowTime = DateTime.UtcNow;
cmd.Parameters.AddWithValue("@logDateTimeId", LogDateTimeId);
cmd.Parameters.AddWithValue("@utcDateTime", utcDateTime);
cmd.Parameters.AddWithValue("@utcDateTime", utcDateTime.ToUniversalTime());
if (string.IsNullOrWhiteSpace(comments)) { cmd.Parameters.AddWithValue("@comments", DBNull.Value); }
else { cmd.Parameters.AddWithValue("@comments", comments); }
cmd.Parameters.AddWithValue("@recordModified", nowTime.ToUniversalTime());